forked from MapComplete/MapComplete
Cleanup of empty classes, partial use of default export
This commit is contained in:
parent
cc75f5c4fd
commit
9970c4b8bb
55 changed files with 939 additions and 206 deletions
28
test.ts
28
test.ts
|
@ -1,13 +1,27 @@
|
|||
import OpeningHours, {OpeningHour} from "./UI/Input/OpeningHours";
|
||||
/*
|
||||
import {VariableUiElement} from "./UI/Base/VariableUIElement";
|
||||
import OpeningHoursPicker from "./UI/Input/OpeningHoursPicker";
|
||||
|
||||
|
||||
let oh = new OpeningHours();
|
||||
oh.AttachTo('maindiv');
|
||||
let oh = new OpeningHoursPicker();
|
||||
oh.SetStyle("height:100vh;display:block;").AttachTo('maindiv');
|
||||
|
||||
oh.GetValue().addCallback(data => console.log(data))
|
||||
|
||||
new VariableUiElement(oh.GetValue().map(ohs => {
|
||||
return ohs.map((oh: OpeningHour) => oh.weekdayStart + " " + oh.startHour + ":" + oh.startMinutes + " --> " +
|
||||
oh.weekdayEnd + " " + oh.endHour + ":" + oh.endMinutes).join(",")
|
||||
new VariableUiElement(oh.GetValue().map(oh => {
|
||||
if(oh === undefined){
|
||||
return "<no value selected>";
|
||||
}
|
||||
return oh.weekdayStart + " " + oh.startHour + ":" + oh.startMinutes + " --> " +
|
||||
oh.weekdayEnd + " " + oh.endHour + ":" + oh.endMinutes
|
||||
})).AttachTo("extradiv");
|
||||
|
||||
/*/
|
||||
|
||||
|
||||
import {Utils} from "./Utils";
|
||||
import {FixedUiElement} from "./UI/Base/FixedUiElement";
|
||||
|
||||
Utils.generateStats((stats) => {
|
||||
new FixedUiElement(stats).AttachTo('maindiv')
|
||||
})
|
||||
//*/
|
Loading…
Add table
Add a link
Reference in a new issue