forked from MapComplete/MapComplete
Merge master
This commit is contained in:
commit
80168f5d0d
919 changed files with 95585 additions and 8504 deletions
16
src/UI/Studio/SchemaBasedTranslationInput.svelte
Normal file
16
src/UI/Studio/SchemaBasedTranslationInput.svelte
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<script lang="ts">
|
||||
import EditLayerState from "./EditLayerState";
|
||||
import type { ConfigMeta } from "./configMeta";
|
||||
import { UIEventSource } from "../../Logic/UIEventSource";
|
||||
import TranslationInput from "../InputElement/Helpers/TranslationInput.svelte";
|
||||
|
||||
export let state: EditLayerState;
|
||||
export let path: (string | number)[] = [];
|
||||
export let schema: ConfigMeta;
|
||||
|
||||
let value = new UIEventSource<string>("{}");
|
||||
console.log("Registering translation to path", path)
|
||||
state.register(path, value.mapD(v => JSON.parse(value.data )));
|
||||
</script>
|
||||
|
||||
<TranslationInput {value} />
|
||||
Loading…
Add table
Add a link
Reference in a new issue