diff --git a/frontend/src/lib/components/apps/components/buttons/AppButton.svelte b/frontend/src/lib/components/apps/components/buttons/AppButton.svelte index 0c70232808..7ba2a060ff 100644 --- a/frontend/src/lib/components/apps/components/buttons/AppButton.svelte +++ b/frontend/src/lib/components/apps/components/buttons/AppButton.svelte @@ -23,6 +23,7 @@ export let preclickAction: (() => Promise) | undefined = undefined export let customCss: ComponentCustomCSS<'button'> | undefined = undefined export let render: boolean + export let initializing: boolean | undefined = true export const staticOutputs: string[] = ['loading', 'result'] @@ -112,7 +113,12 @@ } - + initializing && (initializing = false)} + {id} + input={configuration.label} + bind:value={labelValue} +/> diff --git a/frontend/src/lib/components/apps/components/helpers/InputValue.svelte b/frontend/src/lib/components/apps/components/helpers/InputValue.svelte index adc3b4e21f..0578b11dc0 100644 --- a/frontend/src/lib/components/apps/components/helpers/InputValue.svelte +++ b/frontend/src/lib/components/apps/components/helpers/InputValue.svelte @@ -1,7 +1,7 @@ - - -
+
{#if $app.subgrids?.[`${id}-0`]} ('AppViewerContext') let gridContent: string[] | undefined = undefined - let noPadding: boolean | undefined = undefined let drawerTitle: string | undefined = undefined let appDrawer: Drawer @@ -62,7 +61,6 @@
- @@ -81,7 +79,6 @@ {#if $app.subgrids?.[`${id}-0`]} ('AppEditorContext') - let noPadding: boolean | undefined = undefined - function onFocus() { $focusedGrid = { parentComponentId: id, @@ -66,8 +64,6 @@ } - -
{#each sumedup as paneSize, index (index)} @@ -76,7 +72,6 @@ | undefined = undefined export let render: boolean + export let initializing: boolean | undefined = true export const staticOutputs: string[] = ['selectedTabIndex'] - const { app, worldStore, focusedGrid, selectedComponent } = + const { app, worldStore, focusedGrid, selectedComponent, mode } = getContext('AppViewerContext') const { componentControl } = getContext('AppEditorContext') let selected: string = tabs[0] - let noPadding: boolean | undefined = undefined + let kind: 'tabs' | 'sidebar' | 'invisibleOnView' | undefined = undefined let tabHeight: number = 0 $: outputs = $worldStore @@ -86,40 +86,64 @@ $: selectedIndex = tabs?.indexOf(selected) ?? -1 $: css = concatCustomCss($app.css?.tabscomponent, customCss) + + let subgridWidth: number | undefined = undefined - + initializing && (initializing = false)} + {id} + input={configuration.tabsKind} + bind:value={kind} +/> -
-
- +
+ {#if !kind || kind == 'tabs' || (kind == 'invisibleOnView' && $mode == 'dnd')} +
+ + {#each tabs ?? [] as res} + + {res} + + {/each} + +
+ {:else if kind == 'sidebar'} +
{#each tabs ?? [] as res} - (selected = res)}>{res} - {res} - {/each} - -
- {#if $app.subgrids} - {#each tabs ?? [] as res, i} - { - $selectedComponent = id - }} - /> - {/each} +
{/if} + +
+ {#if $app.subgrids} + {#each tabs ?? [] as res, i} { + $selectedComponent = id + }} + />{/each} + {/if} +
diff --git a/frontend/src/lib/components/apps/editor/SubGridEditor.svelte b/frontend/src/lib/components/apps/editor/SubGridEditor.svelte index a194d3f073..fffe7fec2d 100644 --- a/frontend/src/lib/components/apps/editor/SubGridEditor.svelte +++ b/frontend/src/lib/components/apps/editor/SubGridEditor.svelte @@ -10,6 +10,7 @@ import Grid from '../svelte-grid/Grid.svelte' export let containerHeight: number + export let containerWidth: number | undefined = undefined let classes = '' export { classes as class } export let style = '' @@ -71,7 +72,9 @@