windmill-components 1.78.0 → 1.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ArgInput.svelte +3 -0
- package/components/ArgInput.svelte.d.ts +1 -0
- package/components/DisplayResult.svelte +18 -15
- package/components/SchemaEditor.svelte +15 -10
- package/components/SettingSection.svelte +1 -1
- package/components/Toggle.svelte +5 -2
- package/components/Toggle.svelte.d.ts +1 -0
- package/components/apps/components/buttons/AppButton.svelte +50 -70
- package/components/apps/components/buttons/AppButton.svelte.d.ts +8 -3
- package/components/apps/components/buttons/AppForm.svelte +22 -15
- package/components/apps/components/buttons/AppForm.svelte.d.ts +3 -3
- package/components/apps/components/buttons/AppFormButton.svelte +32 -24
- package/components/apps/components/buttons/AppFormButton.svelte.d.ts +3 -5
- package/components/apps/components/display/AppBarChart.svelte +2 -2
- package/components/apps/components/display/AppBarChart.svelte.d.ts +3 -3
- package/components/apps/components/display/AppDisplayComponent.svelte +2 -2
- package/components/apps/components/display/AppDisplayComponent.svelte.d.ts +1 -1
- package/components/apps/components/display/AppHtml.svelte +10 -2
- package/components/apps/components/display/AppHtml.svelte.d.ts +1 -1
- package/components/apps/components/display/AppIcon.svelte +4 -1
- package/components/apps/components/display/AppIcon.svelte.d.ts +3 -4
- package/components/apps/components/display/AppImage.svelte +28 -15
- package/components/apps/components/display/AppImage.svelte.d.ts +3 -4
- package/components/apps/components/display/AppMap.svelte +3 -3
- package/components/apps/components/display/AppMap.svelte.d.ts +3 -4
- package/components/apps/components/display/AppPdf.svelte +3 -2
- package/components/apps/components/display/AppPdf.svelte.d.ts +3 -4
- package/components/apps/components/display/AppPieChart.svelte +2 -2
- package/components/apps/components/display/AppPieChart.svelte.d.ts +3 -3
- package/components/apps/components/display/AppScatterChart.svelte +2 -2
- package/components/apps/components/display/AppScatterChart.svelte.d.ts +3 -3
- package/components/apps/components/display/AppText.svelte +35 -22
- package/components/apps/components/display/AppText.svelte.d.ts +3 -3
- package/components/apps/components/display/AppTimeseries.svelte +2 -2
- package/components/apps/components/display/AppTimeseries.svelte.d.ts +3 -3
- package/components/apps/components/display/PlotlyHtml.svelte +2 -2
- package/components/apps/components/display/VegaLiteHtml.svelte +2 -2
- package/components/apps/components/display/VegaLiteHtml.svelte.d.ts +2 -1
- package/components/apps/components/display/table/AppAggridTable.svelte +1 -1
- package/components/apps/components/display/table/AppAggridTable.svelte.d.ts +2 -1
- package/components/apps/components/display/table/AppTable.svelte +102 -34
- package/components/apps/components/display/table/AppTable.svelte.d.ts +3 -3
- package/components/apps/components/helpers/HiddenComponent.svelte +6 -3
- package/components/apps/components/helpers/HiddenComponent.svelte.d.ts +1 -1
- package/components/apps/components/helpers/InputValue.svelte +11 -7
- package/components/apps/components/helpers/InputValue.svelte.d.ts +3 -1
- package/components/apps/components/helpers/Loader.svelte +18 -0
- package/components/apps/components/helpers/Loader.svelte.d.ts +18 -0
- package/components/apps/components/helpers/NonRunnableComponent.svelte +1 -12
- package/components/apps/components/helpers/ResolveConfig.svelte +29 -0
- package/components/apps/components/helpers/ResolveConfig.svelte.d.ts +21 -0
- package/components/apps/components/helpers/RunnableComponent.svelte +126 -93
- package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +13 -3
- package/components/apps/components/helpers/RunnableWrapper.svelte +48 -9
- package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +26 -2
- package/components/apps/components/helpers/eval.js +36 -1
- package/components/apps/components/inputs/AppCheckbox.svelte +1 -1
- package/components/apps/components/inputs/AppCheckbox.svelte.d.ts +3 -4
- package/components/apps/components/inputs/AppDateInput.svelte.d.ts +3 -4
- package/components/apps/components/inputs/AppFileInput.svelte.d.ts +3 -4
- package/components/apps/components/inputs/AppMultiSelect.svelte +0 -1
- package/components/apps/components/inputs/AppMultiSelect.svelte.d.ts +3 -4
- package/components/apps/components/inputs/AppNumberInput.svelte +1 -1
- package/components/apps/components/inputs/AppNumberInput.svelte.d.ts +3 -6
- package/components/apps/components/inputs/AppRangeInput.svelte +7 -1
- package/components/apps/components/inputs/AppRangeInput.svelte.d.ts +4 -4
- package/components/apps/components/inputs/AppSelect.svelte +8 -2
- package/components/apps/components/inputs/AppSelect.svelte.d.ts +3 -4
- package/components/apps/components/inputs/AppSliderInputs.svelte +7 -1
- package/components/apps/components/inputs/AppSliderInputs.svelte.d.ts +4 -4
- package/components/apps/components/inputs/AppTextInput.svelte +4 -4
- package/components/apps/components/inputs/AppTextInput.svelte.d.ts +3 -6
- package/components/apps/components/inputs/currency/AppCurrencyInput.svelte +17 -19
- package/components/apps/components/inputs/currency/AppCurrencyInput.svelte.d.ts +3 -4
- package/components/apps/components/layout/AppContainer.svelte +7 -5
- package/components/apps/components/layout/AppContainer.svelte.d.ts +1 -3
- package/components/apps/components/layout/AppDivider.svelte +4 -1
- package/components/apps/components/layout/AppDivider.svelte.d.ts +3 -4
- package/components/apps/components/layout/AppDrawer.svelte +7 -4
- package/components/apps/components/layout/AppDrawer.svelte.d.ts +3 -4
- package/components/apps/components/layout/AppSplitpanes.svelte +34 -25
- package/components/apps/components/layout/AppSplitpanes.svelte.d.ts +1 -5
- package/components/apps/components/layout/AppTabs.svelte +22 -37
- package/components/apps/components/layout/AppTabs.svelte.d.ts +3 -5
- package/components/apps/editor/AppEditor.svelte +6 -3
- package/components/apps/editor/AppEditorHeader.svelte +4 -5
- package/components/apps/editor/AppInputs.svelte +13 -14
- package/components/apps/editor/AppPreview.svelte +12 -16
- package/components/apps/editor/ComponentHeader.svelte +58 -57
- package/components/apps/editor/ComponentHeader.svelte.d.ts +1 -2
- package/components/apps/editor/GridEditor.svelte +21 -50
- package/components/apps/editor/GridEditor.svelte.d.ts +0 -2
- package/components/apps/editor/RecomputeAllComponents.svelte +13 -2
- package/components/apps/editor/SettingsPanel.svelte +104 -30
- package/components/apps/editor/SubGridEditor.svelte +34 -43
- package/components/apps/editor/SubGridEditor.svelte.d.ts +2 -3
- package/components/apps/editor/appUtils.d.ts +49 -6
- package/components/apps/editor/appUtils.js +145 -37
- package/components/apps/editor/component/Component.svelte +37 -22
- package/components/apps/editor/component/Component.svelte.d.ts +1 -2
- package/components/apps/editor/component/ComponentNavigation.svelte +28 -12
- package/components/apps/editor/component/components.d.ts +1550 -16
- package/components/apps/editor/component/components.js +295 -304
- package/components/apps/editor/component/default-codes.d.ts +1 -1
- package/components/apps/editor/component/default-codes.js +25 -25
- package/components/apps/editor/componentsPanel/ComponentList.svelte +18 -3
- package/components/apps/editor/componentsPanel/CssProperty.svelte +5 -3
- package/components/apps/editor/componentsPanel/CssProperty.svelte.d.ts +3 -1
- package/components/apps/editor/componentsPanel/CssSettings.svelte +48 -90
- package/components/apps/editor/componentsPanel/ListItem.svelte +3 -0
- package/components/apps/editor/componentsPanel/ListItem.svelte.d.ts +2 -0
- package/components/apps/editor/contextPanel/ContextPanel.svelte +4 -5
- package/components/apps/editor/contextPanel/components/BackgroundScriptsOutput.svelte +0 -1
- package/components/apps/editor/contextPanel/components/BackgroundScriptsOutput.svelte.d.ts +1 -3
- package/components/apps/editor/contextPanel/components/OutputHeader.svelte +12 -2
- package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte +2 -2
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +158 -129
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte.d.ts +2 -1
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte +31 -3
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte.d.ts +1 -0
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanel.svelte +42 -74
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +68 -18
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte.d.ts +1 -3
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelWithTable.svelte +27 -0
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelWithTable.svelte.d.ts +17 -0
- package/components/apps/editor/inlineScriptsPanel/utils.d.ts +2 -0
- package/components/apps/editor/inlineScriptsPanel/utils.js +6 -5
- package/components/apps/editor/settingsPanel/AlignmentEditor.svelte +10 -2
- package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte +37 -31
- package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte.d.ts +4 -104
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte +108 -87
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte.d.ts +5 -3
- package/components/apps/editor/settingsPanel/GridTab.svelte +0 -1
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +128 -13
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte.d.ts +14 -2
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +35 -100
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte.d.ts +3 -2
- package/components/apps/editor/settingsPanel/OneOfInputSpecsEditor.svelte +52 -0
- package/components/apps/editor/settingsPanel/OneOfInputSpecsEditor.svelte.d.ts +28 -0
- package/components/apps/editor/settingsPanel/SelectedRunnable.svelte +73 -25
- package/components/apps/editor/settingsPanel/SelectedRunnable.svelte.d.ts +2 -0
- package/components/apps/editor/settingsPanel/SubTypeEditor.svelte +7 -5
- package/components/apps/editor/settingsPanel/SubTypeEditor.svelte.d.ts +3 -2
- package/components/apps/editor/settingsPanel/TableActionLabel.svelte.d.ts +2 -2
- package/components/apps/editor/settingsPanel/TableActions.svelte +8 -63
- package/components/apps/editor/settingsPanel/common/PanelSection.svelte +1 -2
- package/components/apps/editor/settingsPanel/common/PanelSection.svelte.d.ts +0 -1
- package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte.d.ts +2 -4
- package/components/apps/editor/settingsPanel/inputEditor/ConnectedInputEditor.svelte +3 -1
- package/components/apps/editor/settingsPanel/inputEditor/IconSelectInput.svelte.d.ts +2 -4
- package/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte +5 -5
- package/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte.d.ts +2 -0
- package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +59 -37
- package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte.d.ts +8 -2
- package/components/apps/editor/settingsPanel/inputEditor/TabSelectInput.svelte +46 -0
- package/components/apps/editor/settingsPanel/inputEditor/TabSelectInput.svelte.d.ts +20 -0
- package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +7 -0
- package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte.d.ts +1 -0
- package/components/apps/editor/settingsPanel/triggerLists/BackgroundScriptTriggerList.svelte +31 -0
- package/components/apps/editor/settingsPanel/triggerLists/BackgroundScriptTriggerList.svelte.d.ts +22 -0
- package/components/apps/editor/settingsPanel/triggerLists/ComponentTriggerList.svelte +24 -0
- package/components/apps/editor/settingsPanel/triggerLists/ComponentTriggerList.svelte.d.ts +21 -0
- package/components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte +156 -0
- package/components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte.d.ts +22 -0
- package/components/apps/editor/settingsPanel/triggerLists/triggerListUtils.d.ts +2 -0
- package/components/apps/editor/settingsPanel/triggerLists/triggerListUtils.js +11 -0
- package/components/apps/gridUtils.js +1 -1
- package/components/apps/inputType.d.ts +23 -18
- package/components/apps/rx.d.ts +2 -0
- package/components/apps/rx.js +10 -3
- package/components/apps/svelte-grid/Grid.svelte +1 -5
- package/components/apps/svelte-grid/Grid.svelte.d.ts +1 -1
- package/components/apps/svelte-grid/MoveResize.svelte +24 -30
- package/components/apps/svelte-grid/MoveResize.svelte.d.ts +0 -4
- package/components/apps/svelte-grid/types.d.ts +1 -7
- package/components/apps/svelte-grid/utils/helper.js +6 -10
- package/components/apps/types.d.ts +32 -15
- package/components/apps/utils.d.ts +2 -2
- package/components/apps/utils.js +13 -11
- package/components/common/skeleton/Skeleton.svelte +1 -1
- package/components/flows/flowStateUtils.js +8 -1
- package/components/flows/flowStore.js +1 -1
- package/components/graph/FlowGraph.svelte +0 -2
- package/components/graph/FlowGraph.svelte.d.ts +0 -1
- package/components/graph/svelvet/container/views/GraphView.svelte +3 -28
- package/components/graph/svelvet/container/views/GraphView.svelte.d.ts +0 -3
- package/components/graph/svelvet/container/views/Svelvet.svelte +1 -17
- package/components/graph/svelvet/container/views/Svelvet.svelte.d.ts +0 -8
- package/components/graph/svelvet/customCss/controllers/getCss.js +0 -11
- package/components/graph/svelvet/edges/controllers/util.js +1 -2
- package/components/graph/svelvet/edges/views/Edges/SmoothStepEdge.svelte.d.ts +2 -2
- package/components/graph/svelvet/nodes/controllers/util.js +1 -1
- package/components/graph/svelvet/nodes/models/Node.d.ts +0 -4
- package/components/graph/svelvet/nodes/models/Node.js +3 -41
- package/components/graph/svelvet/store/controllers/storeApi.js +2 -7
- package/components/graph/svelvet/store/controllers/util.d.ts +0 -7
- package/components/graph/svelvet/store/controllers/util.js +4 -36
- package/components/graph/svelvet/store/types/types.d.ts +0 -5
- package/components/home/ItemsList.svelte +1 -1
- package/package.json +13 -8
- package/utils.d.ts +2 -0
- package/utils.js +6 -0
- package/components/apps/editor/GridPanel.svelte +0 -31
- package/components/apps/editor/GridPanel.svelte.d.ts +0 -18
- package/components/apps/editor/componentsPanel/componentStaticValues.d.ts +0 -12
- package/components/apps/editor/componentsPanel/componentStaticValues.js +0 -25
- package/components/graph/svelvet/nodes/views/EditNode.svelte +0 -147
- package/components/graph/svelvet/nodes/views/EditNode.svelte.d.ts +0 -33
- package/components/graph/svelvet/resizableNodes/controllers/util.d.ts +0 -11
- package/components/graph/svelvet/resizableNodes/controllers/util.js +0 -24
- package/components/graph/svelvet/resizableNodes/models/ResizeNode.d.ts +0 -33
- package/components/graph/svelvet/resizableNodes/models/ResizeNode.js +0 -71
- package/components/graph/svelvet/resizableNodes/views/ResizeNode.svelte +0 -81
- package/components/graph/svelvet/resizableNodes/views/ResizeNode.svelte.d.ts +0 -20
|
@@ -164,6 +164,7 @@ $: inputCat = computeInputCat(type, format, itemsType?.type, enum_, contentEncod
|
|
|
164
164
|
use:autosize
|
|
165
165
|
rows="1"
|
|
166
166
|
bind:value={description}
|
|
167
|
+
on:keydown|stopPropagation
|
|
167
168
|
placeholder="Field description"
|
|
168
169
|
/>
|
|
169
170
|
{#if type == 'string' && format != 'date-time'}
|
|
@@ -315,6 +316,7 @@ $: inputCat = computeInputCat(type, format, itemsType?.type, enum_, contentEncod
|
|
|
315
316
|
{autofocus}
|
|
316
317
|
{disabled}
|
|
317
318
|
use:autosize
|
|
319
|
+
on:keydown|stopPropagation
|
|
318
320
|
style="max-height: {maxHeight}"
|
|
319
321
|
on:input={() => {
|
|
320
322
|
dispatch('input', { rawValue: value, isRaw: false })
|
|
@@ -390,6 +392,7 @@ $: inputCat = computeInputCat(type, format, itemsType?.type, enum_, contentEncod
|
|
|
390
392
|
}}
|
|
391
393
|
on:blur={() => dispatch('blur')}
|
|
392
394
|
use:autosize
|
|
395
|
+
on:keydown|stopPropagation
|
|
393
396
|
type="text"
|
|
394
397
|
{disabled}
|
|
395
398
|
class="col-span-10 {valid
|
|
@@ -5,6 +5,7 @@ import { copyToClipboard, truncate } from '../utils';
|
|
|
5
5
|
import { Button, Drawer, DrawerContent } from './common';
|
|
6
6
|
import autosize from 'svelte-autosize';
|
|
7
7
|
import { ClipboardCopy } from 'lucide-svelte';
|
|
8
|
+
import Portal from 'svelte-portal';
|
|
8
9
|
export let result;
|
|
9
10
|
export let requireHtmlApproval = false;
|
|
10
11
|
let resultKind;
|
|
@@ -74,20 +75,22 @@ let payload = '';
|
|
|
74
75
|
let jsonViewer;
|
|
75
76
|
</script>
|
|
76
77
|
|
|
77
|
-
<
|
|
78
|
-
<
|
|
79
|
-
<
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
</
|
|
78
|
+
<Portal>
|
|
79
|
+
<Drawer bind:this={jsonViewer} size="900px">
|
|
80
|
+
<DrawerContent title="Expanded Result" on:close={jsonViewer.closeDrawer}>
|
|
81
|
+
<svelte:fragment slot="actions">
|
|
82
|
+
<Button
|
|
83
|
+
on:click={() => copyToClipboard(JSON.stringify(result, null, 4))}
|
|
84
|
+
color="light"
|
|
85
|
+
size="xs"
|
|
86
|
+
>
|
|
87
|
+
<div class="flex gap-2 items-center">Copy to clipboard <ClipboardCopy /> </div>
|
|
88
|
+
</Button>
|
|
89
|
+
</svelte:fragment>
|
|
90
|
+
<Highlight language={json} code={JSON.stringify(result, null, 4).replace(/\\n/g, '\n')} />
|
|
91
|
+
</DrawerContent>
|
|
92
|
+
</Drawer>
|
|
93
|
+
</Portal>
|
|
91
94
|
|
|
92
95
|
<div class="inline-highlight">
|
|
93
96
|
{#if result != undefined}
|
|
@@ -95,7 +98,7 @@ let jsonViewer;
|
|
|
95
98
|
<div class="mb-2 text-gray-500 text-sm bg-gray-50/20">
|
|
96
99
|
as JSON <input class="windmillapp" type="checkbox" bind:checked={forceJson} /></div
|
|
97
100
|
>{/if}{#if typeof result == 'object' && Object.keys(result).length > 0}<div
|
|
98
|
-
class="mb-2 min-w-[
|
|
101
|
+
class="mb-2 min-w-[360px] text-sm text-gray-700 relative"
|
|
99
102
|
>The result keys are: <b>{truncate(Object.keys(result).join(', '), 50)}</b>
|
|
100
103
|
<div class="text-gray-500 text-sm absolute top-0 right-2">
|
|
101
104
|
<button on:click={jsonViewer.openDrawer}>Expand JSON</button>
|
|
@@ -9,6 +9,7 @@ import TableCustom from './TableCustom.svelte';
|
|
|
9
9
|
import Toggle from './Toggle.svelte';
|
|
10
10
|
import Tooltip from './Tooltip.svelte';
|
|
11
11
|
import { flip } from 'svelte/animate';
|
|
12
|
+
import Portal from 'svelte-portal';
|
|
12
13
|
const dispatch = createEventDispatcher();
|
|
13
14
|
export let schema = emptySchema();
|
|
14
15
|
if (!schema) {
|
|
@@ -166,8 +167,10 @@ let error = '';
|
|
|
166
167
|
/>
|
|
167
168
|
<div class="ml-2">
|
|
168
169
|
<Tooltip>
|
|
169
|
-
Arguments can be edited either using the wizard, or by editing their JSON Schema,
|
|
170
|
-
<a href="https://docs.windmill.dev/docs/reference/#script-parameters-to-json-schema"
|
|
170
|
+
Arguments can be edited either using the wizard, or by editing their JSON Schema,
|
|
171
|
+
<a href="https://docs.windmill.dev/docs/reference/#script-parameters-to-json-schema"
|
|
172
|
+
>see docs</a
|
|
173
|
+
>
|
|
171
174
|
</Tooltip>
|
|
172
175
|
</div>
|
|
173
176
|
</div>
|
|
@@ -269,11 +272,13 @@ let error = '';
|
|
|
269
272
|
</div>
|
|
270
273
|
</div>
|
|
271
274
|
|
|
272
|
-
<
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
275
|
+
<Portal>
|
|
276
|
+
<SchemaModal
|
|
277
|
+
bind:this={schemaModal}
|
|
278
|
+
bind:property={modalProperty}
|
|
279
|
+
bind:error={argError}
|
|
280
|
+
on:save={handleAddOrEditArgument}
|
|
281
|
+
bind:editing
|
|
282
|
+
bind:oldArgName
|
|
283
|
+
/>
|
|
284
|
+
</Portal>
|
package/components/Toggle.svelte
CHANGED
|
@@ -5,6 +5,7 @@ export let checked = false;
|
|
|
5
5
|
export let disabled = false;
|
|
6
6
|
export let textClass = '';
|
|
7
7
|
export let textStyle = '';
|
|
8
|
+
export let color = 'blue';
|
|
8
9
|
export let size = 'sm';
|
|
9
10
|
const id = (Math.random() + 1).toString(36).substring(10);
|
|
10
11
|
const dispatch = createEventDispatcher();
|
|
@@ -20,7 +21,7 @@ const dispatch = createEventDispatcher();
|
|
|
20
21
|
{#if Boolean(options?.left)}
|
|
21
22
|
<span
|
|
22
23
|
class={twMerge(
|
|
23
|
-
'
|
|
24
|
+
'mr-2 font-medium duration-200',
|
|
24
25
|
disabled ? 'text-gray-500' : 'text-gray-900',
|
|
25
26
|
size === 'xs' ? 'text-xs' : 'text-sm',
|
|
26
27
|
textClass
|
|
@@ -49,7 +50,9 @@ const dispatch = createEventDispatcher();
|
|
|
49
50
|
class="w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-4 peer-focus:ring-blue-300
|
|
50
51
|
peer-checked:after:translate-x-full peer-checked:after:border-white after:content-['']
|
|
51
52
|
after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300
|
|
52
|
-
after:border after:rounded-full after:h-5 after:w-5 after:transition-all
|
|
53
|
+
after:border after:rounded-full after:h-5 after:w-5 after:transition-all {color == 'red'
|
|
54
|
+
? 'peer-checked:bg-red-600'
|
|
55
|
+
: 'peer-checked:bg-blue-600'}"
|
|
53
56
|
/>
|
|
54
57
|
</div>
|
|
55
58
|
{#if Boolean(options?.right)}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script>import { Button } from '../../../common';
|
|
2
2
|
import { getContext } from 'svelte';
|
|
3
3
|
import AlignWrapper from '../helpers/AlignWrapper.svelte';
|
|
4
|
-
import InputValue from '../helpers/InputValue.svelte';
|
|
5
4
|
import RunnableWrapper from '../helpers/RunnableWrapper.svelte';
|
|
6
5
|
import { loadIcon } from '../icon';
|
|
7
6
|
import { twMerge } from 'tailwind-merge';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { initConfig, initOutput } from '../../editor/appUtils';
|
|
8
|
+
import { components } from '../../editor/component';
|
|
9
|
+
import ResolveConfig from '../helpers/ResolveConfig.svelte';
|
|
10
10
|
export let id;
|
|
11
11
|
export let componentInput;
|
|
12
12
|
export let configuration;
|
|
@@ -18,40 +18,37 @@ export let noWFull = false;
|
|
|
18
18
|
export let preclickAction = undefined;
|
|
19
19
|
export let customCss = undefined;
|
|
20
20
|
export let render;
|
|
21
|
-
export let initializing =
|
|
22
|
-
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
let
|
|
21
|
+
export let initializing = false;
|
|
22
|
+
export let extraKey = undefined;
|
|
23
|
+
export let controls = undefined;
|
|
24
|
+
const { worldStore, app, componentControl, selectedComponent } = getContext('AppViewerContext');
|
|
25
|
+
let resolvedConfig = initConfig(components['buttoncomponent'].initialData.configuration, configuration);
|
|
26
|
+
$: initializing = resolvedConfig?.label == undefined;
|
|
27
|
+
let outputs = initOutput($worldStore, id, {
|
|
28
|
+
result: undefined,
|
|
29
|
+
loading: false
|
|
30
|
+
});
|
|
31
|
+
if (controls) {
|
|
32
|
+
$componentControl[id] = controls;
|
|
33
|
+
}
|
|
26
34
|
let runnableComponent;
|
|
27
|
-
let disabled = undefined;
|
|
28
|
-
let fillContainer = undefined;
|
|
29
|
-
let gotoUrl = undefined;
|
|
30
|
-
let gotoNewTab = undefined;
|
|
31
35
|
let isLoading = false;
|
|
32
36
|
let ownClick = false;
|
|
33
|
-
let triggerOnAppLoad = false;
|
|
34
|
-
let beforeIcon = undefined;
|
|
35
|
-
let afterIcon = undefined;
|
|
36
37
|
let beforeIconComponent;
|
|
37
38
|
let afterIconComponent;
|
|
38
|
-
$: beforeIcon && handleBeforeIcon();
|
|
39
|
-
$: afterIcon && handleAfterIcon();
|
|
39
|
+
$: resolvedConfig.beforeIcon && handleBeforeIcon();
|
|
40
|
+
$: resolvedConfig.afterIcon && handleAfterIcon();
|
|
40
41
|
async function handleBeforeIcon() {
|
|
41
|
-
if (beforeIcon) {
|
|
42
|
-
beforeIconComponent = await loadIcon(beforeIcon);
|
|
42
|
+
if (resolvedConfig.beforeIcon) {
|
|
43
|
+
beforeIconComponent = await loadIcon(resolvedConfig.beforeIcon);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
async function handleAfterIcon() {
|
|
46
|
-
if (afterIcon) {
|
|
47
|
-
afterIconComponent = await loadIcon(afterIcon);
|
|
47
|
+
if (resolvedConfig.afterIcon) {
|
|
48
|
+
afterIconComponent = await loadIcon(resolvedConfig.afterIcon);
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
-
result: undefined,
|
|
52
|
-
loading: false
|
|
53
|
-
});
|
|
54
|
-
$: triggerOnAppLoad && runnableComponent?.runComponent();
|
|
51
|
+
$: resolvedConfig?.triggerOnAppLoad && runnableComponent?.runComponent();
|
|
55
52
|
$: if (outputs?.loading != undefined) {
|
|
56
53
|
outputs.loading.set(false, true);
|
|
57
54
|
}
|
|
@@ -69,22 +66,17 @@ let errors = {};
|
|
|
69
66
|
$: errorsMessage = Object.values(errors)
|
|
70
67
|
.filter((x) => x != '')
|
|
71
68
|
.join('\n');
|
|
69
|
+
let runnableWrapper;
|
|
72
70
|
async function handleClick(event) {
|
|
73
71
|
event?.stopPropagation();
|
|
74
72
|
event?.preventDefault();
|
|
73
|
+
$selectedComponent = id;
|
|
75
74
|
if (preclickAction) {
|
|
76
75
|
await preclickAction();
|
|
77
76
|
}
|
|
78
77
|
ownClick = true;
|
|
79
78
|
if (!runnableComponent) {
|
|
80
|
-
|
|
81
|
-
if (gotoNewTab) {
|
|
82
|
-
window.open(gotoUrl, '_blank');
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
goto(gotoUrl);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
79
|
+
runnableWrapper.onSuccess();
|
|
88
80
|
}
|
|
89
81
|
else {
|
|
90
82
|
await runnableComponent?.runComponent();
|
|
@@ -92,67 +84,55 @@ async function handleClick(event) {
|
|
|
92
84
|
}
|
|
93
85
|
</script>
|
|
94
86
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<InputValue {id} input={configuration.beforeIcon} bind:value={beforeIcon} />
|
|
105
|
-
<InputValue {id} input={configuration.afterIcon} bind:value={afterIcon} />
|
|
106
|
-
<InputValue {id} input={configuration.triggerOnAppLoad} bind:value={triggerOnAppLoad} />
|
|
87
|
+
{#each Object.keys(components['buttoncomponent'].initialData.configuration) as key (key)}
|
|
88
|
+
<ResolveConfig
|
|
89
|
+
{id}
|
|
90
|
+
{extraKey}
|
|
91
|
+
{key}
|
|
92
|
+
bind:resolvedConfig={resolvedConfig[key]}
|
|
93
|
+
configuration={configuration[key]}
|
|
94
|
+
/>
|
|
95
|
+
{/each}
|
|
107
96
|
|
|
108
|
-
|
|
109
|
-
{id}
|
|
110
|
-
input={configuration.disabled}
|
|
111
|
-
extraContext={extraQueryParams}
|
|
112
|
-
bind:value={disabled}
|
|
113
|
-
bind:error={errors.disabled}
|
|
114
|
-
/>
|
|
115
|
-
<InputValue {id} input={configuration.fillContainer} bind:value={fillContainer} />
|
|
116
|
-
<InputValue {id} input={configuration.gotoNewTab} bind:value={gotoNewTab} />
|
|
97
|
+
<!-- gotoNewTab={resolvedConfig.onSuccess.selected == 'goto'} -->
|
|
117
98
|
|
|
118
99
|
<RunnableWrapper
|
|
100
|
+
bind:this={runnableWrapper}
|
|
119
101
|
{recomputeIds}
|
|
120
102
|
bind:runnableComponent
|
|
121
103
|
{componentInput}
|
|
104
|
+
doOnSuccess={resolvedConfig.onSuccess}
|
|
122
105
|
{id}
|
|
123
106
|
{extraQueryParams}
|
|
124
107
|
autoRefresh={false}
|
|
125
|
-
goto={gotoUrl}
|
|
126
|
-
{gotoNewTab}
|
|
127
108
|
{render}
|
|
109
|
+
{outputs}
|
|
110
|
+
{extraKey}
|
|
128
111
|
>
|
|
129
112
|
<AlignWrapper {noWFull} {horizontalAlignment} {verticalAlignment}>
|
|
130
113
|
{#if errorsMessage}
|
|
131
114
|
<div class="text-red-500 text-xs">{errorsMessage}</div>
|
|
132
115
|
{/if}
|
|
133
116
|
<Button
|
|
117
|
+
on:pointerdown={(e) => e.stopPropagation()}
|
|
134
118
|
btnClasses={twMerge(
|
|
135
119
|
$app.css?.['buttoncomponent']?.['button']?.class,
|
|
136
|
-
customCss?.button
|
|
137
|
-
fillContainer ? 'w-full h-full' : ''
|
|
120
|
+
customCss?.button?.class,
|
|
121
|
+
resolvedConfig.fillContainer ? 'w-full h-full' : ''
|
|
138
122
|
)}
|
|
139
|
-
style={[$app.css?.['buttoncomponent']?.['button']?.style, customCss?.button
|
|
140
|
-
{disabled}
|
|
141
|
-
on:pointerdown={(e) => {
|
|
142
|
-
e?.stopPropagation()
|
|
143
|
-
window.dispatchEvent(new Event('pointerup'))
|
|
144
|
-
}}
|
|
123
|
+
style={[$app.css?.['buttoncomponent']?.['button']?.style, customCss?.button?.style].join(';')}
|
|
124
|
+
disabled={resolvedConfig.disabled}
|
|
145
125
|
on:click={handleClick}
|
|
146
|
-
{size}
|
|
147
|
-
{color}
|
|
126
|
+
size={resolvedConfig.size}
|
|
127
|
+
color={resolvedConfig.color}
|
|
148
128
|
{loading}
|
|
149
129
|
>
|
|
150
130
|
<span class="truncate inline-flex gap-2 items-center">
|
|
151
|
-
{#if beforeIcon && beforeIconComponent}
|
|
131
|
+
{#if resolvedConfig.beforeIcon && beforeIconComponent}
|
|
152
132
|
<svelte:component this={beforeIconComponent} size={14} />
|
|
153
133
|
{/if}
|
|
154
|
-
<div>{
|
|
155
|
-
{#if afterIcon && afterIconComponent}
|
|
134
|
+
<div>{resolvedConfig.label}</div>
|
|
135
|
+
{#if resolvedConfig.afterIcon && afterIconComponent}
|
|
156
136
|
<svelte:component this={afterIconComponent} size={14} />
|
|
157
137
|
{/if}
|
|
158
138
|
</span>
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { AppInput } from '../../inputType';
|
|
3
|
-
import type { ComponentCustomCSS } from '../../types';
|
|
3
|
+
import type { ComponentCustomCSS, RichConfigurations } from '../../types';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
id: string;
|
|
7
7
|
componentInput: AppInput | undefined;
|
|
8
|
-
configuration:
|
|
8
|
+
configuration: RichConfigurations;
|
|
9
9
|
recomputeIds?: string[] | undefined;
|
|
10
10
|
extraQueryParams?: Record<string, any> | undefined;
|
|
11
11
|
horizontalAlignment?: 'left' | 'center' | 'right' | undefined;
|
|
12
12
|
verticalAlignment?: 'top' | 'center' | 'bottom' | undefined;
|
|
13
13
|
noWFull?: boolean | undefined;
|
|
14
14
|
preclickAction?: (() => Promise<void>) | undefined;
|
|
15
|
-
customCss?: ComponentCustomCSS<'
|
|
15
|
+
customCss?: ComponentCustomCSS<'buttoncomponent'> | undefined;
|
|
16
16
|
render: boolean;
|
|
17
17
|
initializing?: boolean | undefined;
|
|
18
|
+
extraKey?: string | undefined;
|
|
19
|
+
controls?: {
|
|
20
|
+
left: () => boolean;
|
|
21
|
+
right: () => boolean | string;
|
|
22
|
+
} | undefined;
|
|
18
23
|
};
|
|
19
24
|
events: {
|
|
20
25
|
[evt: string]: CustomEvent<any>;
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
import { faUser } from '@fortawesome/free-solid-svg-icons';
|
|
3
3
|
import { getContext } from 'svelte';
|
|
4
4
|
import { Icon } from 'svelte-awesome';
|
|
5
|
+
import { initConfig, initOutput } from '../../editor/appUtils';
|
|
6
|
+
import { components } from '../../editor/component';
|
|
5
7
|
import { concatCustomCss } from '../../utils';
|
|
6
8
|
import AlignWrapper from '../helpers/AlignWrapper.svelte';
|
|
7
|
-
import
|
|
9
|
+
import ResolveConfig from '../helpers/ResolveConfig.svelte';
|
|
8
10
|
import RunnableWrapper from '../helpers/RunnableWrapper.svelte';
|
|
9
11
|
export let id;
|
|
10
12
|
export let componentInput;
|
|
@@ -16,16 +18,16 @@ export let customCss = undefined;
|
|
|
16
18
|
export let render;
|
|
17
19
|
export const staticOutputs = ['loading', 'result'];
|
|
18
20
|
const { app, worldStore, stateId } = getContext('AppViewerContext');
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
let outputs = initOutput($worldStore, id, {
|
|
22
|
+
result: undefined,
|
|
23
|
+
loading: false
|
|
24
|
+
});
|
|
25
|
+
let resolvedConfig = initConfig(components['formcomponent'].initialData.configuration, configuration);
|
|
22
26
|
let runnableComponent;
|
|
23
|
-
let goto = undefined;
|
|
24
27
|
let isLoading = false;
|
|
25
28
|
$: noInputs =
|
|
26
29
|
$stateId != undefined &&
|
|
27
30
|
(componentInput?.type != 'runnable' || Object.keys(componentInput?.fields ?? {}).length == 0);
|
|
28
|
-
$: outputs = $worldStore?.outputsById[id];
|
|
29
31
|
$: if (outputs?.loading != undefined) {
|
|
30
32
|
outputs.loading.set(false, true);
|
|
31
33
|
}
|
|
@@ -38,10 +40,14 @@ $: outputs?.loading.subscribe({
|
|
|
38
40
|
$: css = concatCustomCss($app.css?.formcomponent, customCss);
|
|
39
41
|
</script>
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
{#each Object.keys(components['formcomponent'].initialData.configuration) as key (key)}
|
|
44
|
+
<ResolveConfig
|
|
45
|
+
{id}
|
|
46
|
+
{key}
|
|
47
|
+
bind:resolvedConfig={resolvedConfig[key]}
|
|
48
|
+
configuration={configuration[key]}
|
|
49
|
+
/>
|
|
50
|
+
{/each}
|
|
45
51
|
|
|
46
52
|
<RunnableWrapper
|
|
47
53
|
{recomputeIds}
|
|
@@ -49,12 +55,13 @@ $: css = concatCustomCss($app.css?.formcomponent, customCss);
|
|
|
49
55
|
bind:runnableComponent
|
|
50
56
|
{componentInput}
|
|
51
57
|
{id}
|
|
52
|
-
{
|
|
58
|
+
doOnSuccess={resolvedConfig.onSuccess}
|
|
53
59
|
{extraQueryParams}
|
|
54
60
|
autoRefresh={false}
|
|
55
61
|
forceSchemaDisplay={true}
|
|
56
62
|
runnableClass="!block"
|
|
57
|
-
runnableStyle={css?.container
|
|
63
|
+
runnableStyle={css?.container?.style}
|
|
64
|
+
{outputs}
|
|
58
65
|
>
|
|
59
66
|
<AlignWrapper {horizontalAlignment}>
|
|
60
67
|
<div
|
|
@@ -87,10 +94,10 @@ $: css = concatCustomCss($app.css?.formcomponent, customCss);
|
|
|
87
94
|
on:click={() => {
|
|
88
95
|
runnableComponent?.runComponent()
|
|
89
96
|
}}
|
|
90
|
-
{size}
|
|
91
|
-
{color}
|
|
97
|
+
size={resolvedConfig.size}
|
|
98
|
+
color={resolvedConfig.color}
|
|
92
99
|
>
|
|
93
|
-
{
|
|
100
|
+
{resolvedConfig.label}
|
|
94
101
|
</Button>
|
|
95
102
|
{/if}
|
|
96
103
|
</div>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { AppInput } from '../../inputType';
|
|
3
|
-
import type { ComponentCustomCSS } from '../../types';
|
|
3
|
+
import type { ComponentCustomCSS, RichConfigurations } from '../../types';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
id: string;
|
|
7
7
|
componentInput: AppInput | undefined;
|
|
8
|
-
configuration:
|
|
8
|
+
configuration: RichConfigurations;
|
|
9
9
|
recomputeIds?: string[] | undefined;
|
|
10
10
|
extraQueryParams?: Record<string, any> | undefined;
|
|
11
11
|
horizontalAlignment?: 'left' | 'center' | 'right' | undefined;
|
|
12
|
-
customCss?: ComponentCustomCSS<'
|
|
12
|
+
customCss?: ComponentCustomCSS<'formcomponent'> | undefined;
|
|
13
13
|
render: boolean;
|
|
14
14
|
staticOutputs?: string[] | undefined;
|
|
15
15
|
};
|
|
@@ -8,6 +8,9 @@ import RunnableWrapper from '../helpers/RunnableWrapper.svelte';
|
|
|
8
8
|
import Portal from 'svelte-portal';
|
|
9
9
|
import Modal from '../../../common/modal/Modal.svelte';
|
|
10
10
|
import { concatCustomCss } from '../../utils';
|
|
11
|
+
import { initConfig, initOutput } from '../../editor/appUtils';
|
|
12
|
+
import { components } from '../../editor/component';
|
|
13
|
+
import ResolveConfig from '../helpers/ResolveConfig.svelte';
|
|
11
14
|
export let id;
|
|
12
15
|
export let componentInput;
|
|
13
16
|
export let configuration;
|
|
@@ -17,13 +20,13 @@ export let horizontalAlignment = undefined;
|
|
|
17
20
|
export let verticalAlignment = undefined;
|
|
18
21
|
export let customCss = undefined;
|
|
19
22
|
export let render;
|
|
20
|
-
export const staticOutputs = ['loading', 'result'];
|
|
21
23
|
const { app, worldStore } = getContext('AppViewerContext');
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
let outputs = initOutput($worldStore, id, {
|
|
25
|
+
result: undefined,
|
|
26
|
+
loading: false
|
|
27
|
+
});
|
|
28
|
+
let resolvedConfig = initConfig(components['formbuttoncomponent'].initialData.configuration, configuration);
|
|
25
29
|
let runnableComponent;
|
|
26
|
-
let disabled = undefined;
|
|
27
30
|
let isLoading = false;
|
|
28
31
|
let ownClick = false;
|
|
29
32
|
let errors = {};
|
|
@@ -33,7 +36,6 @@ $: errorsMessage = Object.values(errors)
|
|
|
33
36
|
.join('\n');
|
|
34
37
|
$: noInputs =
|
|
35
38
|
componentInput?.type != 'runnable' || Object.keys(componentInput?.fields ?? {}).length == 0;
|
|
36
|
-
$: outputs = $worldStore?.outputsById[id];
|
|
37
39
|
$: if (outputs?.loading != undefined) {
|
|
38
40
|
outputs.loading.set(false, true);
|
|
39
41
|
}
|
|
@@ -48,24 +50,24 @@ $: outputs?.loading.subscribe({
|
|
|
48
50
|
});
|
|
49
51
|
$: loading = isLoading && ownClick;
|
|
50
52
|
$: css = concatCustomCss($app?.css?.formbuttoncomponent, customCss);
|
|
53
|
+
let runnableWrapper;
|
|
51
54
|
</script>
|
|
52
55
|
|
|
53
|
-
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
/>
|
|
56
|
+
{#each Object.keys(components['formbuttoncomponent'].initialData.configuration) as key (key)}
|
|
57
|
+
<ResolveConfig
|
|
58
|
+
{id}
|
|
59
|
+
{key}
|
|
60
|
+
bind:resolvedConfig={resolvedConfig[key]}
|
|
61
|
+
configuration={configuration[key]}
|
|
62
|
+
/>
|
|
63
|
+
{/each}
|
|
62
64
|
|
|
63
65
|
<Portal>
|
|
64
66
|
<Modal
|
|
65
67
|
{open}
|
|
66
|
-
title={
|
|
67
|
-
class={css?.popup
|
|
68
|
-
style={css?.popup
|
|
68
|
+
title={resolvedConfig.label ?? ''}
|
|
69
|
+
class={css?.popup?.class}
|
|
70
|
+
style={css?.popup?.style}
|
|
69
71
|
on:canceled={() => {
|
|
70
72
|
open = false
|
|
71
73
|
}}
|
|
@@ -74,6 +76,7 @@ $: css = concatCustomCss($app?.css?.formbuttoncomponent, customCss);
|
|
|
74
76
|
}}
|
|
75
77
|
>
|
|
76
78
|
<RunnableWrapper
|
|
79
|
+
bind:this={runnableWrapper}
|
|
77
80
|
{recomputeIds}
|
|
78
81
|
{render}
|
|
79
82
|
bind:runnableComponent
|
|
@@ -83,6 +86,8 @@ $: css = concatCustomCss($app?.css?.formbuttoncomponent, customCss);
|
|
|
83
86
|
autoRefresh={false}
|
|
84
87
|
forceSchemaDisplay={true}
|
|
85
88
|
runnableClass="!block"
|
|
89
|
+
{outputs}
|
|
90
|
+
doOnSuccess={resolvedConfig.onSuccess}
|
|
86
91
|
>
|
|
87
92
|
<div class="flex flex-col gap-2 px-4 w-full">
|
|
88
93
|
<div>
|
|
@@ -107,8 +112,11 @@ $: css = concatCustomCss($app?.css?.formbuttoncomponent, customCss);
|
|
|
107
112
|
window.dispatchEvent(new Event('pointerup'))
|
|
108
113
|
}}
|
|
109
114
|
on:click={async () => {
|
|
110
|
-
|
|
111
|
-
|
|
115
|
+
if (!runnableComponent) {
|
|
116
|
+
runnableWrapper.onSuccess()
|
|
117
|
+
} else {
|
|
118
|
+
await runnableComponent?.runComponent()
|
|
119
|
+
}
|
|
112
120
|
open = false
|
|
113
121
|
}}
|
|
114
122
|
size="xs"
|
|
@@ -127,15 +135,15 @@ $: css = concatCustomCss($app?.css?.formbuttoncomponent, customCss);
|
|
|
127
135
|
<div class="text-red-500 text-xs">{errorsMessage}</div>
|
|
128
136
|
{/if}
|
|
129
137
|
<Button
|
|
130
|
-
{disabled}
|
|
131
|
-
{size}
|
|
132
|
-
{color}
|
|
138
|
+
disabled={resolvedConfig.disabled ?? false}
|
|
139
|
+
size={resolvedConfig.size ?? 'md'}
|
|
140
|
+
color={resolvedConfig.color}
|
|
133
141
|
btnClasses={css?.button?.class ?? ''}
|
|
134
142
|
style={css?.button?.style ?? ''}
|
|
135
143
|
on:click={(e) => {
|
|
136
144
|
open = true
|
|
137
145
|
}}
|
|
138
146
|
>
|
|
139
|
-
{
|
|
147
|
+
{resolvedConfig.label}
|
|
140
148
|
</Button>
|
|
141
149
|
</AlignWrapper>
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { AppInput } from '../../inputType';
|
|
3
|
-
import type { ComponentCustomCSS } from '../../types';
|
|
3
|
+
import type { ComponentCustomCSS, RichConfigurations } from '../../types';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
id: string;
|
|
7
7
|
componentInput: AppInput | undefined;
|
|
8
|
-
configuration:
|
|
8
|
+
configuration: RichConfigurations;
|
|
9
9
|
recomputeIds?: string[] | undefined;
|
|
10
10
|
extraQueryParams?: Record<string, any> | undefined;
|
|
11
11
|
horizontalAlignment?: 'left' | 'center' | 'right' | undefined;
|
|
12
12
|
verticalAlignment?: 'top' | 'center' | 'bottom' | undefined;
|
|
13
|
-
customCss?: ComponentCustomCSS<'
|
|
13
|
+
customCss?: ComponentCustomCSS<'formbuttoncomponent'> | undefined;
|
|
14
14
|
render: boolean;
|
|
15
|
-
staticOutputs?: string[] | undefined;
|
|
16
15
|
};
|
|
17
16
|
events: {
|
|
18
17
|
[evt: string]: CustomEvent<any>;
|
|
@@ -23,6 +22,5 @@ export type AppFormButtonProps = typeof __propDef.props;
|
|
|
23
22
|
export type AppFormButtonEvents = typeof __propDef.events;
|
|
24
23
|
export type AppFormButtonSlots = typeof __propDef.slots;
|
|
25
24
|
export default class AppFormButton extends SvelteComponentTyped<AppFormButtonProps, AppFormButtonEvents, AppFormButtonSlots> {
|
|
26
|
-
get staticOutputs(): string[];
|
|
27
25
|
}
|
|
28
26
|
export {};
|