forked from MapComplete/MapComplete
Formatting
This commit is contained in:
parent
d5d2c08706
commit
72ca67e3ab
34 changed files with 616 additions and 566 deletions
32
test.ts
32
test.ts
|
|
@ -1,24 +1,26 @@
|
|||
import {LanguageElement} from "./UI/Popup/LanguageElement";
|
||||
import {ImmutableStore, UIEventSource} from "./Logic/UIEventSource";
|
||||
import {VariableUiElement} from "./UI/Base/VariableUIElement";
|
||||
import Locale from "./UI/i18n/Locale";
|
||||
import {OsmConnection} from "./Logic/Osm/OsmConnection";
|
||||
import { LanguageElement } from "./UI/Popup/LanguageElement"
|
||||
import { ImmutableStore, UIEventSource } from "./Logic/UIEventSource"
|
||||
import { VariableUiElement } from "./UI/Base/VariableUIElement"
|
||||
import Locale from "./UI/i18n/Locale"
|
||||
import { OsmConnection } from "./Logic/Osm/OsmConnection"
|
||||
|
||||
const tgs = new UIEventSource({
|
||||
"name": "xyz",
|
||||
"id": "node/1234",
|
||||
"_country" : "BE",
|
||||
name: "xyz",
|
||||
id: "node/1234",
|
||||
_country: "BE",
|
||||
})
|
||||
Locale.language.setData("nl")
|
||||
console.log(tgs)
|
||||
console.log("Locale", Locale.language)
|
||||
const conn = new OsmConnection({})
|
||||
new LanguageElement().constr(<any> {osmConnection: conn, featureSwitchIsTesting: new ImmutableStore(true)}, tgs, [
|
||||
"language",
|
||||
"What languages are spoken here?",
|
||||
"{language()} is spoken here",
|
||||
"{language()} is the only language spoken here",
|
||||
"The following languages are spoken here: {list()}"
|
||||
]).AttachTo("maindiv")
|
||||
new LanguageElement()
|
||||
.constr(<any>{ osmConnection: conn, featureSwitchIsTesting: new ImmutableStore(true) }, tgs, [
|
||||
"language",
|
||||
"What languages are spoken here?",
|
||||
"{language()} is spoken here",
|
||||
"{language()} is the only language spoken here",
|
||||
"The following languages are spoken here: {list()}",
|
||||
])
|
||||
.AttachTo("maindiv")
|
||||
|
||||
new VariableUiElement(tgs.map(JSON.stringify)).AttachTo("extradiv")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue