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