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
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { RichConfigurations } from '../../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
id: string;
|
|
6
|
-
inputSpecs:
|
|
6
|
+
inputSpecs: RichConfigurations;
|
|
7
|
+
inputSpecsConfiguration?: RichConfigurations | undefined;
|
|
7
8
|
userInputEnabled?: boolean | undefined;
|
|
8
9
|
shouldCapitalize?: boolean | undefined;
|
|
9
10
|
rowColumns?: boolean | undefined;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script>import Tooltip from '../../../Tooltip.svelte';
|
|
2
|
+
import InputsSpecEditor from './InputsSpecEditor.svelte';
|
|
3
|
+
export let key;
|
|
4
|
+
export let oneOf;
|
|
5
|
+
export let inputSpecsConfiguration;
|
|
6
|
+
export let labels;
|
|
7
|
+
export let shouldCapitalize;
|
|
8
|
+
export let id;
|
|
9
|
+
export let resourceOnly;
|
|
10
|
+
export let rowColumns;
|
|
11
|
+
export let tooltip;
|
|
12
|
+
$: if (oneOf.configuration[oneOf.selected] == undefined) {
|
|
13
|
+
oneOf.configuration[oneOf.selected] = {};
|
|
14
|
+
}
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div class="p-2 border">
|
|
18
|
+
<h4 class="mb-2">{key} <Tooltip>{tooltip}</Tooltip></h4>
|
|
19
|
+
<select
|
|
20
|
+
class="w-full border border-gray-300 rounded-md p-2"
|
|
21
|
+
value={oneOf.selected}
|
|
22
|
+
on:change={(e) => {
|
|
23
|
+
oneOf = { ...oneOf, selected: e?.target?.['value'] }
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
{#each Object.keys(inputSpecsConfiguration ?? {}) as choice}
|
|
27
|
+
<option value={choice}>{labels?.[choice] ?? choice}</option>
|
|
28
|
+
{/each}
|
|
29
|
+
</select>
|
|
30
|
+
<div class="mb-4" />
|
|
31
|
+
<div class="flex flex-col gap-4">
|
|
32
|
+
{#each Object.keys(inputSpecsConfiguration?.[oneOf.selected] ?? {}) as nestedKey}
|
|
33
|
+
{@const config = inputSpecsConfiguration?.[oneOf.selected]?.[nestedKey]}
|
|
34
|
+
{#if config && oneOf.configuration[oneOf.selected]}
|
|
35
|
+
<InputsSpecEditor
|
|
36
|
+
key={nestedKey}
|
|
37
|
+
bind:componentInput={oneOf.configuration[oneOf.selected][nestedKey]}
|
|
38
|
+
{id}
|
|
39
|
+
userInputEnabled={false}
|
|
40
|
+
{shouldCapitalize}
|
|
41
|
+
{resourceOnly}
|
|
42
|
+
hasRows={rowColumns}
|
|
43
|
+
fieldType={config?.['fieldType']}
|
|
44
|
+
subFieldType={config?.['subFieldType']}
|
|
45
|
+
format={config?.['format']}
|
|
46
|
+
selectOptions={config?.['selectOptions']}
|
|
47
|
+
placeholder={config?.['placeholder']}
|
|
48
|
+
/>
|
|
49
|
+
{/if}
|
|
50
|
+
{/each}
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { RichConfiguration } from '../../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
key: string;
|
|
6
|
+
oneOf: {
|
|
7
|
+
selected: string;
|
|
8
|
+
configuration: RichConfiguration;
|
|
9
|
+
} | any;
|
|
10
|
+
inputSpecsConfiguration: RichConfiguration | any;
|
|
11
|
+
labels: Record<string, string> | undefined;
|
|
12
|
+
shouldCapitalize: boolean;
|
|
13
|
+
id: string;
|
|
14
|
+
resourceOnly: boolean;
|
|
15
|
+
rowColumns: boolean;
|
|
16
|
+
tooltip: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export type OneOfInputSpecsEditorProps = typeof __propDef.props;
|
|
24
|
+
export type OneOfInputSpecsEditorEvents = typeof __propDef.events;
|
|
25
|
+
export type OneOfInputSpecsEditorSlots = typeof __propDef.slots;
|
|
26
|
+
export default class OneOfInputSpecsEditor extends SvelteComponentTyped<OneOfInputSpecsEditorProps, OneOfInputSpecsEditorEvents, OneOfInputSpecsEditorSlots> {
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
<script>import Button from '../../../common/button/Button.svelte';
|
|
2
|
+
import Toggle from '../../../Toggle.svelte';
|
|
2
3
|
import Tooltip from '../../../Tooltip.svelte';
|
|
3
4
|
import { faClose, faEdit } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
import { includes } from 'lodash';
|
|
4
6
|
import { getContext } from 'svelte';
|
|
5
7
|
import { clearResultAppInput } from '../../utils';
|
|
6
|
-
import
|
|
8
|
+
import ComponentTriggerList from './triggerLists/ComponentTriggerList.svelte';
|
|
7
9
|
const { app } = getContext('AppViewerContext');
|
|
10
|
+
const { selectedComponentInEditor } = getContext('AppEditorContext');
|
|
8
11
|
export let appInput;
|
|
9
|
-
let
|
|
10
|
-
function edit() {
|
|
11
|
-
if (appInput.runnable?.type === 'runnableByName') {
|
|
12
|
-
inlineScriptEditorDrawer?.openDrawer();
|
|
13
|
-
}
|
|
14
|
-
}
|
|
12
|
+
export let appComponent;
|
|
15
13
|
function detach() {
|
|
16
14
|
if (appInput.runnable?.type === 'runnableByName' && appInput.runnable.inlineScript) {
|
|
17
15
|
$app.unusedInlineScripts.push({
|
|
@@ -27,13 +25,7 @@ function clear() {
|
|
|
27
25
|
}
|
|
28
26
|
</script>
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
<InlineScriptEditorDrawer
|
|
32
|
-
bind:this={inlineScriptEditorDrawer}
|
|
33
|
-
bind:inlineScript={appInput.runnable.inlineScript}
|
|
34
|
-
/>
|
|
35
|
-
{/if}
|
|
36
|
-
<div class="flex flex-col xl:flex-row justify-between w-full flex-wrap items-center gap-1">
|
|
28
|
+
<div class="flex justify-between w-full items-center gap-1">
|
|
37
29
|
<span class="text-xs font-semibold truncate">
|
|
38
30
|
{#if appInput.runnable?.type === 'runnableByName'}
|
|
39
31
|
{appInput.runnable.name}
|
|
@@ -41,13 +33,10 @@ function clear() {
|
|
|
41
33
|
{appInput.runnable.path}
|
|
42
34
|
{/if}
|
|
43
35
|
</span>
|
|
44
|
-
<div class="flex gap-1
|
|
36
|
+
<div class="flex gap-1 justify-center">
|
|
45
37
|
{#if appInput.runnable?.type === 'runnableByName' && appInput.runnable.inlineScript}
|
|
46
|
-
<Button size="xs" color="light" variant="border" startIcon={{ icon: faEdit }} on:click={edit}>
|
|
47
|
-
Edit
|
|
48
|
-
</Button>
|
|
49
38
|
<Button size="xs" color="light" variant="border" on:click={detach}>
|
|
50
|
-
Detach
|
|
39
|
+
Detach
|
|
51
40
|
<Tooltip>
|
|
52
41
|
Detaching an inline script keep it for later to be reused by another component
|
|
53
42
|
</Tooltip>
|
|
@@ -58,14 +47,73 @@ function clear() {
|
|
|
58
47
|
</Button>
|
|
59
48
|
</div>
|
|
60
49
|
</div>
|
|
50
|
+
<div>
|
|
51
|
+
<div class="w-full"><div class="mx-auto w-0">↓</div></div>
|
|
52
|
+
<div class="flex gap-1 justify-between items-center">
|
|
53
|
+
<span class="text-xs font-semibold truncate">
|
|
54
|
+
Transformer <Tooltip
|
|
55
|
+
>A transformer is an optional frontend script that is executed right after the component's
|
|
56
|
+
script whose purpose is to do lightweight transformation in the browser. It takes the
|
|
57
|
+
previous computation's result as `result`</Tooltip
|
|
58
|
+
></span
|
|
59
|
+
>
|
|
60
|
+
<div class="flex gap-1">
|
|
61
|
+
{#if !appInput.transformer}
|
|
62
|
+
<div>
|
|
63
|
+
<Button
|
|
64
|
+
variant="border"
|
|
65
|
+
color="light"
|
|
66
|
+
size="xs"
|
|
67
|
+
on:click={() => {
|
|
68
|
+
appInput.transformer = {
|
|
69
|
+
language: 'frontend',
|
|
70
|
+
content: 'return result'
|
|
71
|
+
}
|
|
72
|
+
$selectedComponentInEditor = appComponent.id + '_transformer'
|
|
73
|
+
}}>Add Transformer</Button
|
|
74
|
+
>
|
|
75
|
+
</div>
|
|
76
|
+
{:else}
|
|
77
|
+
<Button
|
|
78
|
+
size="xs"
|
|
79
|
+
color="red"
|
|
80
|
+
variant="border"
|
|
81
|
+
startIcon={{ icon: faClose }}
|
|
82
|
+
on:click={() => {
|
|
83
|
+
appInput.transformer = undefined
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
Clear
|
|
87
|
+
</Button>
|
|
88
|
+
{/if}
|
|
89
|
+
</div></div
|
|
90
|
+
>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
{#if appInput.runnable?.type === 'runnableByName' && appInput.runnable.inlineScript}
|
|
94
|
+
{#if !['buttoncomponent', 'formbuttoncomponent', 'formcomponent'].includes(appComponent.type)}
|
|
95
|
+
<div class="flex items-center">
|
|
96
|
+
<Toggle
|
|
97
|
+
size="xs"
|
|
98
|
+
color="red"
|
|
99
|
+
bind:checked={appInput.doNotRecomputeOnInputChanged}
|
|
100
|
+
options={{ right: 'do NOT recompute on input changes' }}
|
|
101
|
+
/>
|
|
102
|
+
<Tooltip>If not toggled, whenever an input is changed, the script will be re-run.</Tooltip>
|
|
103
|
+
</div>
|
|
104
|
+
{/if}
|
|
105
|
+
|
|
106
|
+
<div>
|
|
107
|
+
<ComponentTriggerList
|
|
108
|
+
bind:runnable={appInput.runnable}
|
|
109
|
+
{appComponent}
|
|
110
|
+
fields={appInput.fields}
|
|
111
|
+
doNotRecomputeOnInputChanged={appInput.doNotRecomputeOnInputChanged}
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
{/if}
|
|
61
115
|
{#if appInput.runnable?.type === 'runnableByName' && !appInput.runnable.inlineScript}
|
|
62
116
|
<span class="text-xs text-gray-500">
|
|
63
117
|
Please configure the language in the inline script panel
|
|
64
118
|
</span>
|
|
65
119
|
{/if}
|
|
66
|
-
{#if appInput.runnable?.type === 'runnableByName' && appInput.runnable.inlineScript?.language === 'frontend'}
|
|
67
|
-
<span class="text-xs text-gray-500">
|
|
68
|
-
If the component is a display component. The script will be recomputed upon any changes to any
|
|
69
|
-
output or to the state.
|
|
70
|
-
</span>
|
|
71
|
-
{/if}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { ResultAppInput } from '../../inputType';
|
|
3
|
+
import type { AppComponent } from '../component';
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
5
6
|
appInput: ResultAppInput;
|
|
7
|
+
appComponent: AppComponent;
|
|
6
8
|
};
|
|
7
9
|
events: {
|
|
8
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<script>import StaticInputEditor from './inputEditor/StaticInputEditor.svelte';
|
|
2
2
|
export let value;
|
|
3
3
|
export let componentInput;
|
|
4
|
+
export let subFieldType;
|
|
4
5
|
let fakeComponentInput = {
|
|
5
6
|
...componentInput,
|
|
6
|
-
value
|
|
7
|
-
// We don't support array of arrays
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
fieldType: componentInput.subFieldType
|
|
7
|
+
value
|
|
10
8
|
};
|
|
11
9
|
// Bubble up changes to the real componentInput
|
|
12
10
|
$: fakeComponentInput && (value = fakeComponentInput.value);
|
|
13
11
|
</script>
|
|
14
12
|
|
|
15
|
-
<StaticInputEditor
|
|
13
|
+
<StaticInputEditor
|
|
14
|
+
noVariablePicker
|
|
15
|
+
fieldType={subFieldType}
|
|
16
|
+
bind:componentInput={fakeComponentInput}
|
|
17
|
+
/>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { InputType, StaticInput } from '../../inputType';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
value: any;
|
|
6
|
-
componentInput:
|
|
6
|
+
componentInput: StaticInput<any>;
|
|
7
|
+
subFieldType: InputType | undefined;
|
|
7
8
|
};
|
|
8
9
|
events: {
|
|
9
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { RichConfiguration } from '../../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
componentInput:
|
|
5
|
+
componentInput: RichConfiguration | undefined;
|
|
6
6
|
};
|
|
7
7
|
events: {
|
|
8
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -5,82 +5,27 @@ import { classNames } from '../../../../utils';
|
|
|
5
5
|
import { faPlus, faTrashAlt } from '@fortawesome/free-solid-svg-icons';
|
|
6
6
|
import { getContext } from 'svelte';
|
|
7
7
|
import { Icon } from 'svelte-awesome';
|
|
8
|
+
import { appComponentFromType, clearErrorByComponentId, clearJobsByComponentId } from '../appUtils';
|
|
8
9
|
import PanelSection from './common/PanelSection.svelte';
|
|
9
10
|
import TableActionLabel from './TableActionLabel.svelte';
|
|
10
11
|
export let components;
|
|
11
12
|
export let id;
|
|
12
|
-
const { selectedComponent } = getContext('AppViewerContext');
|
|
13
|
+
const { selectedComponent, app, errorByComponent, jobs } = getContext('AppViewerContext');
|
|
13
14
|
function addComponent() {
|
|
14
15
|
const actionId = getNextId(components.map((x) => x.id.split('_')[1]));
|
|
15
16
|
const newComponent = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
configuration: {
|
|
19
|
-
label: {
|
|
20
|
-
type: 'static',
|
|
21
|
-
value: 'Action',
|
|
22
|
-
fieldType: 'text'
|
|
23
|
-
},
|
|
24
|
-
color: {
|
|
25
|
-
fieldType: 'select',
|
|
26
|
-
type: 'static',
|
|
27
|
-
value: 'dark',
|
|
28
|
-
optionValuesKey: 'buttonColorOptions'
|
|
29
|
-
},
|
|
30
|
-
size: {
|
|
31
|
-
fieldType: 'select',
|
|
32
|
-
type: 'static',
|
|
33
|
-
value: 'xs',
|
|
34
|
-
optionValuesKey: 'buttonSizeOptions'
|
|
35
|
-
},
|
|
36
|
-
disabled: {
|
|
37
|
-
fieldType: 'boolean',
|
|
38
|
-
type: 'eval',
|
|
39
|
-
expr: 'false',
|
|
40
|
-
tooltip: "Disabled based on a predicate. Use `row` to access the current row's data"
|
|
41
|
-
},
|
|
42
|
-
goto: {
|
|
43
|
-
tooltip: 'Go to an url on success if not empty',
|
|
44
|
-
fieldType: 'text',
|
|
45
|
-
type: 'static',
|
|
46
|
-
value: ''
|
|
47
|
-
},
|
|
48
|
-
gotoNewTab: {
|
|
49
|
-
tooltip: 'Go to create a new tab',
|
|
50
|
-
fieldType: 'boolean',
|
|
51
|
-
type: 'static',
|
|
52
|
-
value: true
|
|
53
|
-
},
|
|
54
|
-
beforeIcon: {
|
|
55
|
-
type: 'static',
|
|
56
|
-
value: undefined,
|
|
57
|
-
fieldType: 'icon-select',
|
|
58
|
-
onlyStatic: true
|
|
59
|
-
},
|
|
60
|
-
afterIcon: {
|
|
61
|
-
type: 'static',
|
|
62
|
-
value: undefined,
|
|
63
|
-
fieldType: 'icon-select',
|
|
64
|
-
onlyStatic: true
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
componentInput: {
|
|
68
|
-
type: 'runnable',
|
|
69
|
-
fieldType: 'any',
|
|
70
|
-
fields: {},
|
|
71
|
-
runnable: undefined,
|
|
72
|
-
value: undefined
|
|
73
|
-
},
|
|
74
|
-
recomputeIds: undefined,
|
|
75
|
-
customCss: {
|
|
76
|
-
button: { style: '', class: '' }
|
|
77
|
-
}
|
|
17
|
+
...appComponentFromType('buttoncomponent')(`${id}_${actionId}`),
|
|
18
|
+
recomputeIds: []
|
|
78
19
|
};
|
|
79
20
|
components = [...components, newComponent];
|
|
21
|
+
$app = $app;
|
|
80
22
|
}
|
|
81
23
|
function deleteComponent(cid) {
|
|
82
24
|
components = components.filter((x) => x.id !== cid);
|
|
25
|
+
$errorByComponent = clearErrorByComponentId(cid, $errorByComponent);
|
|
26
|
+
$jobs = clearJobsByComponentId(cid, $jobs);
|
|
83
27
|
$selectedComponent = id;
|
|
28
|
+
$app = $app;
|
|
84
29
|
}
|
|
85
30
|
</script>
|
|
86
31
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script>import { classNames } from '../../../../../utils';
|
|
2
2
|
import Tooltip from '../../../../Tooltip.svelte';
|
|
3
3
|
export let title;
|
|
4
|
-
export let smallPadding = false;
|
|
5
4
|
export let noPadding = false;
|
|
6
5
|
export let titlePadding = '';
|
|
7
6
|
export let tooltip = '';
|
|
@@ -11,7 +10,7 @@ export let tooltip = '';
|
|
|
11
10
|
class={classNames(
|
|
12
11
|
$$props.class,
|
|
13
12
|
'flex flex-col h-full gap-2 items-start',
|
|
14
|
-
noPadding ? '' :
|
|
13
|
+
noPadding ? '' : 'p-3'
|
|
15
14
|
)}
|
|
16
15
|
>
|
|
17
16
|
<div class="flex justify-between flex-wrap items-center w-full gap-1">
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { StaticInput } from '../../../inputType';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
componentInput: StaticInput<string
|
|
6
|
-
fieldType: 'color';
|
|
7
|
-
}>;
|
|
5
|
+
componentInput: StaticInput<string>;
|
|
8
6
|
};
|
|
9
7
|
events: {
|
|
10
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { faArrowRight, faClose } from '@fortawesome/free-solid-svg-icons';
|
|
3
3
|
import { getContext } from 'svelte';
|
|
4
4
|
export let componentInput;
|
|
5
|
-
const { connectingInput, app } = getContext('AppViewerContext');
|
|
5
|
+
const { connectingInput, app, worldStore } = getContext('AppViewerContext');
|
|
6
6
|
function applyConnection() {
|
|
7
7
|
if (!$connectingInput.opened &&
|
|
8
8
|
$connectingInput.input !== undefined &&
|
|
@@ -14,6 +14,8 @@ function applyConnection() {
|
|
|
14
14
|
hoveredComponent: undefined
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
+
$app = $app;
|
|
18
|
+
$worldStore = $worldStore;
|
|
17
19
|
}
|
|
18
20
|
$: $connectingInput && applyConnection();
|
|
19
21
|
</script>
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { StaticInput } from '../../../inputType';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
componentInput: StaticInput<string
|
|
6
|
-
fieldType: 'icon-select';
|
|
7
|
-
}>;
|
|
5
|
+
componentInput: StaticInput<string>;
|
|
8
6
|
};
|
|
9
7
|
events: {
|
|
10
8
|
keydown: KeyboardEvent;
|
|
@@ -3,11 +3,11 @@ import RunnableSelector from '../mainInput/RunnableSelector.svelte';
|
|
|
3
3
|
import SelectedRunnable from '../SelectedRunnable.svelte';
|
|
4
4
|
export let appInput;
|
|
5
5
|
export let defaultUserInput = false;
|
|
6
|
-
|
|
6
|
+
export let appComponent;
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
|
-
{#if
|
|
10
|
-
<SelectedRunnable bind:appInput />
|
|
11
|
-
{:else}
|
|
12
|
-
<RunnableSelector {defaultUserInput} bind:appInput />
|
|
9
|
+
{#if isScriptByPathDefined(appInput) || isScriptByNameDefined(appInput)}
|
|
10
|
+
<SelectedRunnable {appComponent} bind:appInput />
|
|
11
|
+
{:else if appInput !== undefined}
|
|
12
|
+
<RunnableSelector id={appComponent.id} {defaultUserInput} bind:appInput />
|
|
13
13
|
{/if}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { ResultAppInput } from '../../../inputType';
|
|
3
|
+
import type { AppComponent } from '../../component';
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
5
6
|
appInput: ResultAppInput;
|
|
6
7
|
defaultUserInput?: boolean | undefined;
|
|
8
|
+
appComponent: AppComponent;
|
|
7
9
|
};
|
|
8
10
|
events: {
|
|
9
11
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script>import Toggle from '../../../../Toggle.svelte';
|
|
2
|
-
import { staticValues } from '../../componentsPanel/componentStaticValues';
|
|
3
2
|
import ArrayStaticInputEditor from '../ArrayStaticInputEditor.svelte';
|
|
4
3
|
import ResourcePicker from '../../../../ResourcePicker.svelte';
|
|
5
4
|
import JsonEditor from './JsonEditor.svelte';
|
|
@@ -8,32 +7,47 @@ import IconSelectInput from './IconSelectInput.svelte';
|
|
|
8
7
|
import ColorInput from './ColorInput.svelte';
|
|
9
8
|
import { Icon } from 'svelte-awesome';
|
|
10
9
|
import { faDollarSign } from '@fortawesome/free-solid-svg-icons';
|
|
10
|
+
import TabSelectInput from './TabSelectInput.svelte';
|
|
11
11
|
export let componentInput;
|
|
12
|
+
export let fieldType = undefined;
|
|
13
|
+
export let subFieldType = undefined;
|
|
14
|
+
export let selectOptions = undefined;
|
|
15
|
+
export let placeholder = undefined;
|
|
16
|
+
export let format = undefined;
|
|
17
|
+
export let noVariablePicker = false;
|
|
12
18
|
const { onchange } = getContext('AppViewerContext');
|
|
13
19
|
const { pickVariableCallback } = getContext('AppEditorContext');
|
|
14
20
|
$: componentInput && onchange?.();
|
|
15
21
|
</script>
|
|
16
22
|
|
|
17
23
|
{#if componentInput?.type === 'static'}
|
|
18
|
-
{#if
|
|
24
|
+
{#if fieldType === 'number'}
|
|
19
25
|
<input on:keydown|stopPropagation type="number" bind:value={componentInput.value} />
|
|
20
|
-
{:else if
|
|
26
|
+
{:else if fieldType === 'textarea'}
|
|
21
27
|
<textarea on:keydown|stopPropagation bind:value={componentInput.value} />
|
|
22
|
-
{:else if
|
|
28
|
+
{:else if fieldType === 'date'}
|
|
23
29
|
<input on:keydown|stopPropagation type="date" bind:value={componentInput.value} />
|
|
24
|
-
{:else if
|
|
30
|
+
{:else if fieldType === 'boolean'}
|
|
25
31
|
<Toggle bind:checked={componentInput.value} />
|
|
26
|
-
{:else if
|
|
32
|
+
{:else if fieldType === 'select' && selectOptions}
|
|
27
33
|
<select on:keydown|stopPropagation on:keydown|stopPropagation bind:value={componentInput.value}>
|
|
28
|
-
{#each
|
|
29
|
-
|
|
30
|
-
{option}
|
|
31
|
-
|
|
34
|
+
{#each selectOptions ?? [] as option}
|
|
35
|
+
{#if typeof option == 'string'}
|
|
36
|
+
<option value={option}>
|
|
37
|
+
{option}
|
|
38
|
+
</option>
|
|
39
|
+
{:else}
|
|
40
|
+
<option value={option.value}>
|
|
41
|
+
{option.label}
|
|
42
|
+
</option>
|
|
43
|
+
{/if}
|
|
32
44
|
{/each}
|
|
33
45
|
</select>
|
|
34
|
-
{:else if
|
|
46
|
+
{:else if fieldType === 'icon-select'}
|
|
35
47
|
<IconSelectInput bind:componentInput />
|
|
36
|
-
{:else if
|
|
48
|
+
{:else if fieldType === 'tab-select'}
|
|
49
|
+
<TabSelectInput bind:componentInput />
|
|
50
|
+
{:else if fieldType === 'labeledresource'}
|
|
37
51
|
{#if componentInput?.value && typeof componentInput?.value == 'object' && 'label' in componentInput?.value}
|
|
38
52
|
<div class="flex flex-col gap-1 w-full">
|
|
39
53
|
<input
|
|
@@ -46,9 +60,12 @@ $: componentInput && onchange?.();
|
|
|
46
60
|
initialValue={componentInput.value?.['value']?.split('$res:')[1] || ''}
|
|
47
61
|
on:change={(e) => {
|
|
48
62
|
let path = e.detail
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
63
|
+
if (componentInput) {
|
|
64
|
+
if (path) {
|
|
65
|
+
componentInput.value['value'] = `$res:${path}`
|
|
66
|
+
} else {
|
|
67
|
+
componentInput.value['value'] = undefined
|
|
68
|
+
}
|
|
52
69
|
}
|
|
53
70
|
}}
|
|
54
71
|
/>
|
|
@@ -56,21 +73,24 @@ $: componentInput && onchange?.();
|
|
|
56
73
|
{:else}
|
|
57
74
|
Inconsistent labeled resource object
|
|
58
75
|
{/if}
|
|
59
|
-
{:else if
|
|
76
|
+
{:else if fieldType === 'color'}
|
|
60
77
|
<ColorInput bind:componentInput />
|
|
61
|
-
{:else if
|
|
62
|
-
{#if
|
|
78
|
+
{:else if fieldType === 'object'}
|
|
79
|
+
{#if format?.startsWith('resource-')}
|
|
63
80
|
<ResourcePicker
|
|
64
81
|
initialValue={componentInput.value?.split('$res:')[1] || ''}
|
|
65
82
|
on:change={(e) => {
|
|
66
83
|
let path = e.detail
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
84
|
+
if (componentInput) {
|
|
85
|
+
if (path) {
|
|
86
|
+
componentInput.value = `$res:${path}`
|
|
87
|
+
} else {
|
|
88
|
+
componentInput.value = undefined
|
|
89
|
+
}
|
|
70
90
|
}
|
|
71
91
|
}}
|
|
72
|
-
resourceType={
|
|
73
|
-
?
|
|
92
|
+
resourceType={format.split('-').length > 1
|
|
93
|
+
? format.substring('resource-'.length)
|
|
74
94
|
: undefined}
|
|
75
95
|
/>
|
|
76
96
|
{:else}
|
|
@@ -81,28 +101,30 @@ $: componentInput && onchange?.();
|
|
|
81
101
|
/>
|
|
82
102
|
</div>
|
|
83
103
|
{/if}
|
|
84
|
-
{:else if
|
|
85
|
-
<ArrayStaticInputEditor bind:componentInput on:deleteArrayItem />
|
|
104
|
+
{:else if fieldType === 'array'}
|
|
105
|
+
<ArrayStaticInputEditor {subFieldType} bind:componentInput on:deleteArrayItem />
|
|
86
106
|
{:else}
|
|
87
107
|
<div class="flex gap-1">
|
|
88
108
|
<input
|
|
89
109
|
on:keydown|stopPropagation
|
|
90
110
|
type="text"
|
|
91
|
-
placeholder=
|
|
111
|
+
placeholder={placeholder ?? 'Static value'}
|
|
92
112
|
bind:value={componentInput.value}
|
|
93
113
|
/>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
componentInput
|
|
114
|
+
{#if !noVariablePicker}
|
|
115
|
+
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
116
|
+
<div
|
|
117
|
+
class="min-w-min min-h-[34px] items-center leading-4 px-3 text-gray-600 cursor-pointer border border-gray-700 rounded center-center"
|
|
118
|
+
on:click={() => {
|
|
119
|
+
$pickVariableCallback = (variable) => {
|
|
120
|
+
if (componentInput) {
|
|
121
|
+
componentInput.value = `$var:${variable}`
|
|
122
|
+
}
|
|
101
123
|
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
124
|
+
}}
|
|
125
|
+
><Icon data={faDollarSign} />
|
|
126
|
+
</div>
|
|
127
|
+
{/if}
|
|
106
128
|
</div>
|
|
107
129
|
{/if}
|
|
108
130
|
{/if}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { InputType, StaticInput, StaticOptions } from '../../../inputType';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
componentInput:
|
|
5
|
+
componentInput: StaticInput<any> | undefined;
|
|
6
|
+
fieldType?: InputType | undefined;
|
|
7
|
+
subFieldType?: InputType | undefined;
|
|
8
|
+
selectOptions?: StaticOptions['selectOptions'] | undefined;
|
|
9
|
+
placeholder?: string | undefined;
|
|
10
|
+
format?: string | undefined;
|
|
11
|
+
noVariablePicker?: boolean | undefined;
|
|
6
12
|
};
|
|
7
13
|
events: {
|
|
8
14
|
keydown: KeyboardEvent;
|