binding and json changes
This commit is contained in:
parent
bfa2d53e39
commit
4d2109008b
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { BindingProperty, Block, Subject, JSONProperty, Property, Section } from './components'
|
import { BindingValue, Block, Subject, JSONValue, Property, Section } from './components'
|
||||||
|
|
||||||
export let schema
|
export let schema
|
||||||
export let columnName
|
export let columnName
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
{/each}
|
{/each}
|
||||||
{:else if schema.type === "json"}
|
{:else if schema.type === "json"}
|
||||||
<Property name="Schema">
|
<Property name="Schema">
|
||||||
<JSONProperty
|
<JSONValue
|
||||||
value={JSON.stringify(schema?.schema ?? {}, null, 2)}
|
value={JSON.stringify(schema?.schema ?? {}, null, 2)}
|
||||||
/>
|
/>
|
||||||
</Property>
|
</Property>
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
value={schema?.formulaType === "dynamic" ? "Dynamic" : "Static"}
|
value={schema?.formulaType === "dynamic" ? "Dynamic" : "Static"}
|
||||||
/>
|
/>
|
||||||
<Property name="Formula">
|
<Property name="Formula">
|
||||||
<BindingProperty
|
<BindingValue
|
||||||
value={schema?.formula}
|
value={schema?.formula}
|
||||||
/>
|
/>
|
||||||
</Property>
|
</Property>
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
$: isJs = value?.startsWith?.("{{ js ")
|
$: isJs = value?.startsWith?.("{{ js ")
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<div class="editor">
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
readonly
|
readonly
|
||||||
readonlyLineNumbers
|
readonlyLineNumbers
|
||||||
|
@ -33,6 +34,12 @@
|
||||||
jsBindingWrapping={isJs}
|
jsBindingWrapping={isJs}
|
||||||
mode={isJs ? EditorModes.JS :EditorModes.Handlebars}
|
mode={isJs ? EditorModes.JS :EditorModes.Handlebars}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.editor {
|
||||||
|
border: 1px solid var(--grey-2);
|
||||||
|
border-radius: 2px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -8,6 +8,9 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.pre {
|
.pre {
|
||||||
|
border: 1px solid var(--grey-2);
|
||||||
|
border-radius: 2px;
|
||||||
|
overflow: hidden;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
padding: 4px;
|
padding: 4px;
|
|
@ -21,6 +21,7 @@
|
||||||
<style>
|
<style>
|
||||||
.property {
|
.property {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.truncate {
|
.truncate {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export { default as Subject } from "./Subject.svelte"
|
export { default as Subject } from "./Subject.svelte"
|
||||||
export { default as Property } from "./Property.svelte"
|
export { default as Property } from "./Property.svelte"
|
||||||
export { default as JSONProperty } from "./JSONProperty.svelte"
|
export { default as JSONValue } from "./JSONValue.svelte"
|
||||||
export { default as BindingProperty } from "./BindingProperty.svelte"
|
export { default as BindingValue } from "./BindingValue.svelte"
|
||||||
export { default as Section } from "./Section.svelte"
|
export { default as Section } from "./Section.svelte"
|
||||||
export { default as Block } from "./Block.svelte"
|
export { default as Block } from "./Block.svelte"
|
||||||
|
|
Loading…
Reference in New Issue