windmill-components 1.82.6 → 1.82.8
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 +0 -6
- package/components/FlowBuilder.svelte +5 -0
- package/components/LightweightArgInput.svelte +0 -5
- package/components/Multiselect.svelte.d.ts +2 -2
- package/components/Toggle.svelte +1 -1
- package/components/Toggle.svelte.d.ts +0 -1
- package/components/apps/components/buttons/AppButton.svelte +3 -17
- package/components/apps/components/buttons/AppForm.svelte +2 -10
- package/components/apps/components/buttons/AppFormButton.svelte +58 -82
- package/components/apps/components/display/AppDisplayComponent.svelte +23 -17
- package/components/apps/components/display/AppHtml.svelte +7 -1
- package/components/apps/components/display/AppHtml.svelte.d.ts +2 -0
- package/components/apps/components/display/AppMap.svelte +1 -1
- package/components/apps/components/display/AppPdf.svelte +1 -1
- package/components/apps/components/display/PlotlyHtml.svelte +20 -3
- package/components/apps/components/display/PlotlyHtml.svelte.d.ts +2 -0
- package/components/apps/components/display/table/AppAggridTable.svelte +1 -1
- package/components/apps/components/display/table/AppTable.svelte +21 -14
- package/components/apps/components/helpers/HiddenComponent.svelte +3 -2
- package/components/apps/components/helpers/HiddenComponent.svelte.d.ts +2 -1
- package/components/apps/components/helpers/RefreshButton.svelte +3 -10
- package/components/apps/components/helpers/RefreshButton.svelte.d.ts +1 -0
- package/components/apps/components/helpers/RunnableComponent.svelte +17 -13
- package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +2 -1
- package/components/apps/components/helpers/RunnableWrapper.svelte +3 -1
- package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +1 -0
- package/components/apps/components/inputs/AppCheckbox.svelte +0 -4
- package/components/apps/components/inputs/AppDateInput.svelte +2 -2
- package/components/apps/components/inputs/AppMultiSelect.svelte +7 -3
- package/components/apps/components/inputs/AppNumberInput.svelte +3 -3
- package/components/apps/components/inputs/AppSelect.svelte +3 -4
- package/components/apps/components/inputs/AppSliderInputs.svelte +1 -1
- package/components/apps/components/inputs/AppTextInput.svelte +7 -10
- package/components/apps/components/inputs/currency/AppCurrencyInput.svelte +1 -1
- package/components/apps/components/layout/AppContainer.svelte +2 -2
- package/components/apps/components/layout/AppDrawer.svelte +1 -2
- package/components/apps/components/layout/AppSplitpanes.svelte +3 -3
- package/components/apps/components/layout/AppTabs.svelte +1 -1
- package/components/apps/editor/AppEditor.svelte +48 -20
- package/components/apps/editor/AppEditorHeader.svelte +5 -0
- package/components/apps/editor/AppPreview.svelte +18 -7
- package/components/apps/editor/ComponentHeader.svelte +1 -0
- package/components/apps/editor/ComponentHeader.svelte.d.ts +1 -1
- package/components/apps/editor/GridEditor.svelte +21 -11
- package/components/apps/editor/GridViewer.svelte +2 -2
- package/components/apps/editor/GridViewer.svelte.d.ts +1 -1
- package/components/apps/editor/RecomputeAllComponents.svelte +5 -7
- package/components/apps/editor/SettingsPanel.svelte +3 -3
- package/components/apps/editor/SubGridEditor.svelte +13 -12
- package/components/apps/editor/appUtils.d.ts +1 -0
- package/components/apps/editor/appUtils.js +19 -0
- package/components/apps/editor/component/Component.svelte +6 -7
- package/components/apps/editor/component/Component.svelte.d.ts +1 -1
- package/components/apps/editor/component/ComponentNavigation.svelte +57 -47
- package/components/apps/editor/component/README.md +4 -0
- package/components/apps/editor/component/components.d.ts +9 -26
- package/components/apps/editor/component/components.js +10 -26
- package/components/apps/editor/componentsPanel/ComponentList.svelte +1 -1
- package/components/apps/editor/componentsPanel/CssProperty.svelte +62 -48
- package/components/apps/editor/componentsPanel/CssProperty.svelte.d.ts +3 -2
- package/components/apps/editor/componentsPanel/CssSettings.svelte +1 -0
- package/components/apps/editor/componentsPanel/QuickStyleMenu.svelte +170 -0
- package/components/apps/editor/componentsPanel/QuickStyleMenu.svelte.d.ts +18 -0
- package/components/apps/editor/componentsPanel/QuickStyleProperty.svelte +130 -0
- package/components/apps/editor/componentsPanel/QuickStyleProperty.svelte.d.ts +21 -0
- package/components/apps/editor/componentsPanel/quickStyleProperties.d.ts +535 -0
- package/components/apps/editor/componentsPanel/quickStyleProperties.js +595 -0
- package/components/apps/editor/contextPanel/ComponentOutput.svelte +2 -26
- package/components/apps/editor/contextPanel/ComponentOutput.svelte.d.ts +0 -1
- package/components/apps/editor/contextPanel/ComponentOutputViewer.svelte +8 -6
- package/components/apps/editor/contextPanel/ContextPanel.svelte +4 -11
- package/components/apps/editor/contextPanel/components/BackgroundScriptOutput.svelte +2 -25
- package/components/apps/editor/contextPanel/components/OutputHeader.svelte +29 -40
- package/components/apps/editor/contextPanel/components/OutputHeader.svelte.d.ts +1 -2
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +3 -3
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +2 -2
- package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte +2 -2
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte +38 -12
- package/components/apps/editor/settingsPanel/StylePanel.svelte +61 -0
- package/components/apps/editor/settingsPanel/StylePanel.svelte.d.ts +17 -0
- package/components/apps/editor/settingsPanel/TableActions.svelte +3 -3
- package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte +12 -12
- package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte.d.ts +3 -2
- package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +2 -2
- package/components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte +47 -0
- package/components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte.d.ts +14 -0
- package/components/apps/editor/settingsPanel/secondaryMenu/index.d.ts +2 -0
- package/components/apps/editor/settingsPanel/secondaryMenu/index.js +2 -0
- package/components/apps/editor/settingsPanel/secondaryMenu/menuStore.d.ts +12 -0
- package/components/apps/editor/settingsPanel/secondaryMenu/menuStore.js +10 -0
- package/components/apps/editor/settingsPanel/triggerLists/ComponentTriggerList.svelte +1 -1
- package/components/apps/inputType.d.ts +2 -2
- package/components/apps/svelte-grid/Grid.svelte +50 -34
- package/components/apps/svelte-grid/Grid.svelte.d.ts +14 -9
- package/components/apps/svelte-grid/MoveResize.svelte +76 -55
- package/components/apps/svelte-grid/MoveResize.svelte.d.ts +15 -9
- package/components/apps/svelte-grid/utils/helper.d.ts +0 -1
- package/components/apps/svelte-grid/utils/helper.js +0 -3
- package/components/apps/types.d.ts +9 -5
- package/components/apps/utils.d.ts +2 -0
- package/components/apps/utils.js +30 -1
- package/components/common/button/ButtonPopup.svelte +5 -2
- package/components/common/button/ButtonPopup.svelte.d.ts +5 -1
- package/components/common/button/ButtonPopupItem.svelte +2 -1
- package/components/common/button/ButtonPopupItem.svelte.d.ts +1 -0
- package/components/common/clearableInput/ClearableInput.svelte +56 -0
- package/components/common/clearableInput/ClearableInput.svelte.d.ts +28 -0
- package/components/common/index.d.ts +1 -0
- package/components/common/index.js +1 -0
- package/components/common/kbd/Kbd.svelte +4 -1
- package/components/common/kbd/Kbd.svelte.d.ts +6 -14
- package/components/common/menu/Menu.svelte +8 -2
- package/components/common/menu/Menu.svelte.d.ts +4 -1
- package/components/common/modal/AlwaysMountedModal.svelte +109 -0
- package/components/common/modal/AlwaysMountedModal.svelte.d.ts +22 -0
- package/infer.js +3 -1
- package/package.json +11 -2
- package/utils.d.ts +1 -0
- package/utils.js +3 -0
- package/components/apps/editor/contextPanel/components/MinMaxButton.svelte +0 -25
- package/components/apps/editor/contextPanel/components/MinMaxButton.svelte.d.ts +0 -16
|
@@ -112,7 +112,7 @@ $componentControl[id] = {
|
|
|
112
112
|
}
|
|
113
113
|
const hasActions = actionButtons.length >= 1;
|
|
114
114
|
if (hasActions) {
|
|
115
|
-
$selectedComponent = actionButtons[0].id;
|
|
115
|
+
$selectedComponent = [actionButtons[0].id];
|
|
116
116
|
return true;
|
|
117
117
|
}
|
|
118
118
|
return false;
|
|
@@ -221,7 +221,8 @@ $componentControl[id] = {
|
|
|
221
221
|
on:click={() => toggleRow(row, rowIndex)}
|
|
222
222
|
>
|
|
223
223
|
<div class="center-center h-full w-full flex-wrap gap-1 ">
|
|
224
|
-
{#each actionButtons as actionButton, actionIndex (
|
|
224
|
+
{#each actionButtons as actionButton, actionIndex (actionButton?.id)}
|
|
225
|
+
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
|
|
225
226
|
<div
|
|
226
227
|
on:mouseover|stopPropagation={() => {
|
|
227
228
|
if (actionButton.id !== $hoverStore) {
|
|
@@ -233,13 +234,13 @@ $componentControl[id] = {
|
|
|
233
234
|
$hoverStore = undefined
|
|
234
235
|
}
|
|
235
236
|
}}
|
|
236
|
-
class={(actionButton.id
|
|
237
|
+
class={($selectedComponent?.includes(actionButton.id) ||
|
|
237
238
|
$hoverStore === actionButton.id) &&
|
|
238
239
|
$mode !== 'preview'
|
|
239
240
|
? 'outline outline-indigo-500 outline-1 outline-offset-1 relative '
|
|
240
241
|
: ''}
|
|
241
242
|
>
|
|
242
|
-
{#if actionButton.id
|
|
243
|
+
{#if $selectedComponent?.includes(actionButton.id) || $hoverStore === actionButton.id}
|
|
243
244
|
<span
|
|
244
245
|
title={`Id: ${actionButton.id}`}
|
|
245
246
|
class={classNames(
|
|
@@ -255,19 +256,22 @@ $componentControl[id] = {
|
|
|
255
256
|
extraKey={'idx' + rowIndex}
|
|
256
257
|
{render}
|
|
257
258
|
noWFull
|
|
258
|
-
{...actionButton}
|
|
259
259
|
preclickAction={async () => {
|
|
260
260
|
toggleRow(row, rowIndex)
|
|
261
261
|
}}
|
|
262
|
+
id={actionButton.id}
|
|
263
|
+
customCss={actionButton.customCss}
|
|
264
|
+
configuration={actionButton.configuration}
|
|
265
|
+
recomputeIds={actionButton.recomputeIds}
|
|
262
266
|
extraQueryParams={{ row: row.original }}
|
|
263
|
-
|
|
267
|
+
componentInput={actionButton.componentInput}
|
|
264
268
|
controls={{
|
|
265
269
|
left: () => {
|
|
266
270
|
if (actionIndex === 0) {
|
|
267
|
-
$selectedComponent = id
|
|
271
|
+
$selectedComponent = [id]
|
|
268
272
|
return true
|
|
269
273
|
} else if (actionIndex > 0) {
|
|
270
|
-
$selectedComponent = actionButtons[actionIndex - 1].id
|
|
274
|
+
$selectedComponent = [actionButtons[actionIndex - 1].id]
|
|
271
275
|
return true
|
|
272
276
|
}
|
|
273
277
|
return false
|
|
@@ -276,7 +280,7 @@ $componentControl[id] = {
|
|
|
276
280
|
if (actionIndex === actionButtons.length - 1) {
|
|
277
281
|
return id
|
|
278
282
|
} else if (actionIndex < actionButtons.length - 1) {
|
|
279
|
-
$selectedComponent = actionButtons[actionIndex + 1].id
|
|
283
|
+
$selectedComponent = [actionButtons[actionIndex + 1].id]
|
|
280
284
|
return true
|
|
281
285
|
}
|
|
282
286
|
return false
|
|
@@ -288,12 +292,15 @@ $componentControl[id] = {
|
|
|
288
292
|
extraKey={'idx' + rowIndex}
|
|
289
293
|
{render}
|
|
290
294
|
noWFull
|
|
291
|
-
{
|
|
295
|
+
id={actionButton.id}
|
|
296
|
+
customCss={actionButton.customCss}
|
|
297
|
+
configuration={actionButton.configuration}
|
|
298
|
+
recomputeIds={actionButton.recomputeIds}
|
|
292
299
|
preclickAction={async () => {
|
|
293
300
|
toggleRow(row, rowIndex)
|
|
294
301
|
}}
|
|
295
302
|
extraQueryParams={{ row: row.original }}
|
|
296
|
-
|
|
303
|
+
componentInput={actionButton.componentInput}
|
|
297
304
|
/>
|
|
298
305
|
{/if}
|
|
299
306
|
</div>
|
|
@@ -319,9 +326,9 @@ $componentControl[id] = {
|
|
|
319
326
|
<div class="flex flex-col h-full w-full overflow-auto">
|
|
320
327
|
<Alert title="Parsing issues" type="error" size="xs" class="h-full w-full ">
|
|
321
328
|
The result should be an array of objects. Received:
|
|
322
|
-
<pre class="w-full bg-white p-2 rounded-md"
|
|
323
|
-
|
|
324
|
-
|
|
329
|
+
<pre class="w-full bg-white p-2 rounded-md whitespace-pre-wrap"
|
|
330
|
+
>{JSON.stringify(result, null, 4)}</pre
|
|
331
|
+
>
|
|
325
332
|
</Alert>
|
|
326
333
|
</div>
|
|
327
334
|
{/if}
|
|
@@ -5,7 +5,8 @@ export let id;
|
|
|
5
5
|
export let name;
|
|
6
6
|
export let inlineScript;
|
|
7
7
|
export let fields;
|
|
8
|
-
export let doNotRecomputeOnInputChanged
|
|
8
|
+
export let doNotRecomputeOnInputChanged;
|
|
9
|
+
export let recomputableByRefreshButton;
|
|
9
10
|
let result = undefined;
|
|
10
11
|
const { worldStore } = getContext('AppViewerContext');
|
|
11
12
|
let outputs = initOutput($worldStore, id, {
|
|
@@ -28,8 +29,8 @@ let outputs = initOutput($worldStore, id, {
|
|
|
28
29
|
type: 'runnableByName'
|
|
29
30
|
}}
|
|
30
31
|
wrapperClass="hidden"
|
|
31
|
-
recomputable
|
|
32
32
|
{outputs}
|
|
33
|
+
{recomputableByRefreshButton}
|
|
33
34
|
>
|
|
34
35
|
<slot />
|
|
35
36
|
</RunnableComponent>
|
|
@@ -7,7 +7,8 @@ declare const __propDef: {
|
|
|
7
7
|
name: string;
|
|
8
8
|
inlineScript: InlineScript | undefined;
|
|
9
9
|
fields: Record<string, StaticAppInput | ConnectedAppInput | RowAppInput | UserAppInput>;
|
|
10
|
-
doNotRecomputeOnInputChanged
|
|
10
|
+
doNotRecomputeOnInputChanged: boolean;
|
|
11
|
+
recomputableByRefreshButton: boolean;
|
|
11
12
|
};
|
|
12
13
|
events: {
|
|
13
14
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
<script>import { RefreshCw } from 'lucide-svelte';
|
|
2
2
|
import { getContext } from 'svelte';
|
|
3
3
|
export let componentId;
|
|
4
|
-
|
|
4
|
+
export let loading;
|
|
5
|
+
const { runnableComponents } = getContext('AppViewerContext');
|
|
5
6
|
async function refresh() {
|
|
6
|
-
|
|
7
|
-
await $runnableComponents[componentId]?.();
|
|
7
|
+
await $runnableComponents[componentId]?.cb?.();
|
|
8
8
|
}
|
|
9
|
-
let loading = false;
|
|
10
|
-
$: $worldStore?.outputsById[componentId]?.['loading']?.subscribe({
|
|
11
|
-
id: 'refresh-' + componentId,
|
|
12
|
-
next: (value) => {
|
|
13
|
-
loading = value;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
9
|
</script>
|
|
17
10
|
|
|
18
11
|
<button
|
|
@@ -23,22 +23,25 @@ export let wrapperClass = '';
|
|
|
23
23
|
export let wrapperStyle = '';
|
|
24
24
|
export let initializing = undefined;
|
|
25
25
|
export let render;
|
|
26
|
-
export let recomputable = false;
|
|
27
26
|
export let outputs;
|
|
28
27
|
export let extraKey = '';
|
|
29
28
|
export let doNotRecomputeOnInputChanged = false;
|
|
29
|
+
export let loading = false;
|
|
30
|
+
export let recomputableByRefreshButton = true;
|
|
30
31
|
const { worldStore, runnableComponents, workspace, appPath, isEditor, jobs, noBackend, errorByComponent, mode, stateId, state, componentControl } = getContext('AppViewerContext');
|
|
31
32
|
const dispatch = createEventDispatcher();
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
$runnableComponents[id] = {
|
|
34
|
+
autoRefresh: autoRefresh && recomputableByRefreshButton,
|
|
35
|
+
cb: async (inlineScript) => {
|
|
34
36
|
await executeComponent(true, inlineScript);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
$runnableComponents = $runnableComponents;
|
|
38
40
|
let args = undefined;
|
|
39
41
|
let testIsLoading = false;
|
|
40
42
|
let runnableInputValues = {};
|
|
41
43
|
let executeTimeout = undefined;
|
|
44
|
+
$: outputs.loading?.set(loading);
|
|
42
45
|
function setDebouncedExecute() {
|
|
43
46
|
executeTimeout && clearTimeout(executeTimeout);
|
|
44
47
|
executeTimeout = setTimeout(() => {
|
|
@@ -103,7 +106,7 @@ function stripSchema(inputs, s) {
|
|
|
103
106
|
}
|
|
104
107
|
async function executeComponent(noToast = false, inlineScriptOverride) {
|
|
105
108
|
if (runnable?.type === 'runnableByName' && runnable.inlineScript?.language === 'frontend') {
|
|
106
|
-
|
|
109
|
+
loading = true;
|
|
107
110
|
try {
|
|
108
111
|
const r = await eval_like(runnable.inlineScript?.content, computeGlobalContext($worldStore, id, {}), false, $state, $mode == 'dnd', $componentControl, $worldStore);
|
|
109
112
|
await setResult(r);
|
|
@@ -112,7 +115,7 @@ async function executeComponent(noToast = false, inlineScriptOverride) {
|
|
|
112
115
|
catch (e) {
|
|
113
116
|
sendUserToast('Error running frontend script: ' + e.message, true);
|
|
114
117
|
}
|
|
115
|
-
|
|
118
|
+
loading = false;
|
|
116
119
|
return;
|
|
117
120
|
}
|
|
118
121
|
if (noBackend) {
|
|
@@ -124,7 +127,7 @@ async function executeComponent(noToast = false, inlineScriptOverride) {
|
|
|
124
127
|
if (runnable?.type === 'runnableByName' && !runnable.inlineScript) {
|
|
125
128
|
return;
|
|
126
129
|
}
|
|
127
|
-
|
|
130
|
+
loading = true;
|
|
128
131
|
try {
|
|
129
132
|
let njob = await testJobLoader?.abstractRun(() => {
|
|
130
133
|
const nonStaticRunnableInputs = {};
|
|
@@ -172,7 +175,8 @@ async function executeComponent(noToast = false, inlineScriptOverride) {
|
|
|
172
175
|
}
|
|
173
176
|
}
|
|
174
177
|
catch (e) {
|
|
175
|
-
|
|
178
|
+
setResult({ error: e.body ?? e.message });
|
|
179
|
+
loading = false;
|
|
176
180
|
}
|
|
177
181
|
}
|
|
178
182
|
export async function runComponent() {
|
|
@@ -180,7 +184,7 @@ export async function runComponent() {
|
|
|
180
184
|
await executeComponent();
|
|
181
185
|
}
|
|
182
186
|
catch (e) {
|
|
183
|
-
|
|
187
|
+
setResult({ error: e.body ?? e.message });
|
|
184
188
|
}
|
|
185
189
|
}
|
|
186
190
|
let lastStartedAt = Date.now();
|
|
@@ -256,7 +260,7 @@ async function setResult(res) {
|
|
|
256
260
|
setResult(e.detail.result)
|
|
257
261
|
}
|
|
258
262
|
}
|
|
259
|
-
|
|
263
|
+
loading = false
|
|
260
264
|
}}
|
|
261
265
|
bind:isLoading={testIsLoading}
|
|
262
266
|
bind:job={testJob}
|
|
@@ -307,7 +311,7 @@ async function setResult(res) {
|
|
|
307
311
|
{/if}
|
|
308
312
|
{#if !initializing && autoRefresh === true}
|
|
309
313
|
<div class="flex absolute top-1 right-1 z-50">
|
|
310
|
-
<RefreshButton componentId={id} />
|
|
314
|
+
<RefreshButton {loading} componentId={id} />
|
|
311
315
|
</div>
|
|
312
316
|
{/if}
|
|
313
317
|
</div>
|
|
@@ -18,13 +18,14 @@ declare const __propDef: {
|
|
|
18
18
|
wrapperStyle?: string | undefined;
|
|
19
19
|
initializing?: boolean | undefined;
|
|
20
20
|
render: boolean;
|
|
21
|
-
recomputable?: boolean | undefined;
|
|
22
21
|
outputs: {
|
|
23
22
|
result: Output<any>;
|
|
24
23
|
loading: Output<boolean>;
|
|
25
24
|
};
|
|
26
25
|
extraKey?: string | undefined;
|
|
27
26
|
doNotRecomputeOnInputChanged?: boolean | undefined;
|
|
27
|
+
loading?: boolean | undefined;
|
|
28
|
+
recomputableByRefreshButton?: boolean | undefined;
|
|
28
29
|
runComponent?: (() => Promise<void>) | undefined;
|
|
29
30
|
};
|
|
30
31
|
events: {
|
|
@@ -8,6 +8,7 @@ export let componentInput;
|
|
|
8
8
|
export let id;
|
|
9
9
|
export let result = undefined;
|
|
10
10
|
export let initializing = true;
|
|
11
|
+
export let loading = false;
|
|
11
12
|
export let extraQueryParams = {};
|
|
12
13
|
export let autoRefresh = true;
|
|
13
14
|
export let runnableComponent = undefined;
|
|
@@ -34,7 +35,7 @@ function isRunnableDefined(componentInput) {
|
|
|
34
35
|
}
|
|
35
36
|
export function onSuccess() {
|
|
36
37
|
if (recomputeIds) {
|
|
37
|
-
recomputeIds.map((id) => $runnableComponents?.[id]?.());
|
|
38
|
+
recomputeIds.map((id) => $runnableComponents?.cb?.[id]?.());
|
|
38
39
|
}
|
|
39
40
|
if (!doOnSuccess)
|
|
40
41
|
return;
|
|
@@ -73,6 +74,7 @@ export function onSuccess() {
|
|
|
73
74
|
{:else if componentInput.type === 'runnable' && isRunnableDefined(componentInput)}
|
|
74
75
|
<RunnableComponent
|
|
75
76
|
{extraKey}
|
|
77
|
+
bind:loading
|
|
76
78
|
bind:this={runnableComponent}
|
|
77
79
|
fields={componentInput.fields}
|
|
78
80
|
bind:result
|
|
@@ -8,6 +8,7 @@ declare const __propDef: {
|
|
|
8
8
|
id: string;
|
|
9
9
|
result?: any;
|
|
10
10
|
initializing?: boolean | undefined;
|
|
11
|
+
loading?: boolean | undefined;
|
|
11
12
|
extraQueryParams?: Record<string, any> | undefined;
|
|
12
13
|
autoRefresh?: boolean | undefined;
|
|
13
14
|
runnableComponent?: RunnableComponent | undefined;
|
|
@@ -27,10 +27,6 @@ $: css = concatCustomCss($app.css?.checkboxcomponent, customCss);
|
|
|
27
27
|
|
|
28
28
|
<AlignWrapper {render} {horizontalAlignment} {verticalAlignment}>
|
|
29
29
|
<Toggle
|
|
30
|
-
on:pointerdown={(e) => {
|
|
31
|
-
e?.stopPropagation()
|
|
32
|
-
window.dispatchEvent(new Event('pointerup'))
|
|
33
|
-
}}
|
|
34
30
|
checked={defaultValue}
|
|
35
31
|
options={{ right: labelValue }}
|
|
36
32
|
textClass={css?.text?.class ?? ''}
|
|
@@ -35,14 +35,14 @@ $: css = concatCustomCss($app.css?.dateinputcomponent, customCss);
|
|
|
35
35
|
<AlignWrapper {render} {verticalAlignment}>
|
|
36
36
|
{#if inputType === 'date'}
|
|
37
37
|
<input
|
|
38
|
-
on:focus={() => ($selectedComponent = id)}
|
|
38
|
+
on:focus={() => ($selectedComponent = [id])}
|
|
39
39
|
on:pointerdown|stopPropagation
|
|
40
40
|
type="date"
|
|
41
41
|
bind:value
|
|
42
42
|
min={minValue}
|
|
43
43
|
max={maxValue}
|
|
44
44
|
placeholder="Type..."
|
|
45
|
-
class={twMerge(
|
|
45
|
+
class={twMerge(css?.input?.class ?? '')}
|
|
46
46
|
style={css?.input?.style ?? ''}
|
|
47
47
|
/>
|
|
48
48
|
{/if}
|
|
@@ -42,7 +42,11 @@ $: css = concatCustomCss($app.css?.selectcomponent, customCss);
|
|
|
42
42
|
<InputValue {id} input={configuration.placeholder} bind:value={placeholder} />
|
|
43
43
|
|
|
44
44
|
<AlignWrapper {render} {horizontalAlignment} {verticalAlignment}>
|
|
45
|
-
<div
|
|
45
|
+
<div
|
|
46
|
+
class="app-select w-full"
|
|
47
|
+
style="height: 34px; overflow: auto;"
|
|
48
|
+
on:pointerdown|stopPropagation
|
|
49
|
+
>
|
|
46
50
|
{#if !value || Array.isArray(value)}
|
|
47
51
|
<Select
|
|
48
52
|
--border-radius="0"
|
|
@@ -58,11 +62,11 @@ $: css = concatCustomCss($app.css?.selectcomponent, customCss);
|
|
|
58
62
|
{placeholder}
|
|
59
63
|
on:click={() => {
|
|
60
64
|
if (!$connectingInput.opened) {
|
|
61
|
-
$selectedComponent = id
|
|
65
|
+
$selectedComponent = [id]
|
|
62
66
|
}
|
|
63
67
|
}}
|
|
64
68
|
on:focus={() => {
|
|
65
|
-
$selectedComponent = id
|
|
69
|
+
$selectedComponent = [id]
|
|
66
70
|
}}
|
|
67
71
|
floatingConfig={{
|
|
68
72
|
strategy: 'fixed'
|
|
@@ -35,10 +35,10 @@ $: css = concatCustomCss($app.css?.numberinputcomponent, customCss);
|
|
|
35
35
|
|
|
36
36
|
<AlignWrapper {render} {verticalAlignment}>
|
|
37
37
|
<input
|
|
38
|
-
on:pointerdown|stopPropagation={() => ($selectedComponent = id)}
|
|
39
|
-
on:focus={() => ($selectedComponent = id)}
|
|
38
|
+
on:pointerdown|stopPropagation={() => ($selectedComponent = [id])}
|
|
39
|
+
on:focus={() => ($selectedComponent = [id])}
|
|
40
40
|
class={twMerge(
|
|
41
|
-
'windmillapp w-full py-1.5 text-sm focus:ring-indigo-100 px-2
|
|
41
|
+
'windmillapp w-full py-1.5 text-sm focus:ring-indigo-100 px-2',
|
|
42
42
|
css?.input?.class ?? ''
|
|
43
43
|
)}
|
|
44
44
|
style={css?.input?.style ?? ''}
|
|
@@ -43,7 +43,6 @@ function handleItems() {
|
|
|
43
43
|
}
|
|
44
44
|
function onChange(e) {
|
|
45
45
|
e?.stopPropagation();
|
|
46
|
-
window.dispatchEvent(new Event('pointerup'));
|
|
47
46
|
if (create) {
|
|
48
47
|
listItems = listItems.map((i) => {
|
|
49
48
|
delete i.created;
|
|
@@ -88,7 +87,7 @@ let filterText = '';
|
|
|
88
87
|
<InputValue {id} input={configuration.create} bind:value={create} />
|
|
89
88
|
|
|
90
89
|
<AlignWrapper {render} {horizontalAlignment} {verticalAlignment}>
|
|
91
|
-
<div class="app-select w-full
|
|
90
|
+
<div class="app-select w-full" style="height: 34px;" on:pointerdown|stopPropagation>
|
|
92
91
|
<Select
|
|
93
92
|
--border-radius="0"
|
|
94
93
|
--border-color="#999"
|
|
@@ -105,11 +104,11 @@ let filterText = '';
|
|
|
105
104
|
{placeholder}
|
|
106
105
|
on:click={() => {
|
|
107
106
|
if (!$connectingInput.opened) {
|
|
108
|
-
$selectedComponent = id
|
|
107
|
+
$selectedComponent = [id]
|
|
109
108
|
}
|
|
110
109
|
}}
|
|
111
110
|
on:focus={() => {
|
|
112
|
-
$selectedComponent = id
|
|
111
|
+
$selectedComponent = [id]
|
|
113
112
|
}}
|
|
114
113
|
floatingConfig={{
|
|
115
114
|
strategy: 'fixed'
|
|
@@ -59,7 +59,7 @@ $: if (css && slider && lastStyle !== css?.handle?.style) {
|
|
|
59
59
|
class="grow"
|
|
60
60
|
style="--range-handle-focus: {'#7e9abd'}; --range-handle: {'#7e9abd'}; {css?.bar?.style ??
|
|
61
61
|
''}"
|
|
62
|
-
on:pointerdown|stopPropagation={() => ($selectedComponent = id)}
|
|
62
|
+
on:pointerdown|stopPropagation={() => ($selectedComponent = [id])}
|
|
63
63
|
>
|
|
64
64
|
<RangeSlider bind:slider bind:values {step} min={+min} max={+max} />
|
|
65
65
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>import { getContext } from 'svelte';
|
|
2
2
|
import { twMerge } from 'tailwind-merge';
|
|
3
3
|
import { initOutput } from '../../editor/appUtils';
|
|
4
|
-
import { concatCustomCss } from '../../utils';
|
|
4
|
+
import { concatCustomCss, selectId } from '../../utils';
|
|
5
5
|
import AlignWrapper from '../helpers/AlignWrapper.svelte';
|
|
6
6
|
import InputValue from '../helpers/InputValue.svelte';
|
|
7
7
|
export let id;
|
|
@@ -33,12 +33,11 @@ $: css = concatCustomCss($app.css?.[appCssKey], customCss);
|
|
|
33
33
|
{#if inputType === 'password'}
|
|
34
34
|
<input
|
|
35
35
|
class={twMerge(
|
|
36
|
-
'windmillapp w-full py-1.5 text-sm focus:ring-indigo-100 px-2
|
|
36
|
+
'windmillapp w-full py-1.5 text-sm focus:ring-indigo-100 px-2 ',
|
|
37
37
|
css?.input?.class ?? ''
|
|
38
38
|
)}
|
|
39
39
|
style={css?.input?.style ?? ''}
|
|
40
|
-
on:
|
|
41
|
-
on:pointerdown|stopPropagation={() => ($selectedComponent = id)}
|
|
40
|
+
on:pointerdown|stopPropagation={(e) => selectId(e, id, selectedComponent, $app)}
|
|
42
41
|
type="password"
|
|
43
42
|
bind:value
|
|
44
43
|
{placeholder}
|
|
@@ -46,12 +45,11 @@ $: css = concatCustomCss($app.css?.[appCssKey], customCss);
|
|
|
46
45
|
{:else if inputType === 'text'}
|
|
47
46
|
<input
|
|
48
47
|
class={twMerge(
|
|
49
|
-
'windmillapp w-full py-1.5 text-sm focus:ring-indigo-100 px-2
|
|
48
|
+
'windmillapp w-full py-1.5 text-sm focus:ring-indigo-100 px-2 ',
|
|
50
49
|
css?.input?.class ?? ''
|
|
51
50
|
)}
|
|
52
51
|
style={css?.input?.style ?? ''}
|
|
53
|
-
on:
|
|
54
|
-
on:pointerdown|stopPropagation={() => ($selectedComponent = id)}
|
|
52
|
+
on:pointerdown|stopPropagation={(e) => selectId(e, id, selectedComponent, $app)}
|
|
55
53
|
type="text"
|
|
56
54
|
bind:value
|
|
57
55
|
{placeholder}
|
|
@@ -59,12 +57,11 @@ $: css = concatCustomCss($app.css?.[appCssKey], customCss);
|
|
|
59
57
|
{:else if inputType === 'email'}
|
|
60
58
|
<input
|
|
61
59
|
class={twMerge(
|
|
62
|
-
'windmillapp w-full py-1.5 text-sm focus:ring-indigo-100 px-2
|
|
60
|
+
'windmillapp w-full py-1.5 text-sm focus:ring-indigo-100 px-2 ',
|
|
63
61
|
css?.input?.class ?? ''
|
|
64
62
|
)}
|
|
65
63
|
style={css?.input?.style ?? ''}
|
|
66
|
-
on:
|
|
67
|
-
on:pointerdown|stopPropagation={() => ($selectedComponent = id)}
|
|
64
|
+
on:pointerdown|stopPropagation={(e) => selectId(e, id, selectedComponent, $app)}
|
|
68
65
|
type="email"
|
|
69
66
|
bind:value
|
|
70
67
|
{placeholder}
|
|
@@ -40,7 +40,7 @@ $: css = concatCustomCss($app.css?.currencycomponent, customCss);
|
|
|
40
40
|
{#key isNegativeAllowed}
|
|
41
41
|
{#key locale}
|
|
42
42
|
{#key currency}
|
|
43
|
-
<div class="w-full" on:pointerdown|stopPropagation={() => ($selectedComponent = id)}>
|
|
43
|
+
<div class="w-full" on:pointerdown|stopPropagation={() => ($selectedComponent = [id])}>
|
|
44
44
|
<CurrencyInput
|
|
45
45
|
inputClasses={{
|
|
46
46
|
formatted: twMerge('px-2 w-full py-1.5 windmillapp', css?.input?.class),
|
|
@@ -15,7 +15,6 @@ function onFocus() {
|
|
|
15
15
|
subGridIndex: 0
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
$: $selectedComponent === id && onFocus();
|
|
19
18
|
$: css = concatCustomCss($app.css?.containercomponent, customCss);
|
|
20
19
|
</script>
|
|
21
20
|
|
|
@@ -29,7 +28,8 @@ $: css = concatCustomCss($app.css?.containercomponent, customCss);
|
|
|
29
28
|
subGridId={`${id}-0`}
|
|
30
29
|
containerHeight={componentContainerHeight}
|
|
31
30
|
on:focus={() => {
|
|
32
|
-
$selectedComponent = id
|
|
31
|
+
$selectedComponent = [id]
|
|
32
|
+
onFocus()
|
|
33
33
|
}}
|
|
34
34
|
/>
|
|
35
35
|
{/if}
|
|
@@ -38,7 +38,6 @@ $: css = concatCustomCss($app.css?.containercomponent, customCss);
|
|
|
38
38
|
{disabled}
|
|
39
39
|
on:pointerdown={(e) => {
|
|
40
40
|
e?.stopPropagation()
|
|
41
|
-
window.dispatchEvent(new Event('pointerup'))
|
|
42
41
|
}}
|
|
43
42
|
on:click={async (e) => {
|
|
44
43
|
$focusedGrid = {
|
|
@@ -80,7 +79,7 @@ $: css = concatCustomCss($app.css?.containercomponent, customCss);
|
|
|
80
79
|
subGridId={`${id}-0`}
|
|
81
80
|
containerHeight={1200}
|
|
82
81
|
on:focus={() => {
|
|
83
|
-
$selectedComponent = id
|
|
82
|
+
$selectedComponent = [id]
|
|
84
83
|
}}
|
|
85
84
|
/>
|
|
86
85
|
{/if}
|
|
@@ -19,7 +19,7 @@ function onFocus() {
|
|
|
19
19
|
subGridIndex: 0
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
$: $selectedComponent
|
|
22
|
+
$: $selectedComponent?.includes(id) && onFocus();
|
|
23
23
|
$: css = concatCustomCss($app.css?.containercomponent, customCss);
|
|
24
24
|
$componentControl[id] = {
|
|
25
25
|
left: () => {
|
|
@@ -60,7 +60,7 @@ $: {
|
|
|
60
60
|
<div
|
|
61
61
|
class="w-full h-full"
|
|
62
62
|
on:pointerdown|stopPropagation={() => {
|
|
63
|
-
$selectedComponent = id
|
|
63
|
+
$selectedComponent = [id]
|
|
64
64
|
$focusedGrid = {
|
|
65
65
|
parentComponentId: id,
|
|
66
66
|
subGridIndex: index
|
|
@@ -77,7 +77,7 @@ $: {
|
|
|
77
77
|
subGridId={`${id}-${index}`}
|
|
78
78
|
containerHeight={horizontal ? undefined : componentContainerHeight - 8}
|
|
79
79
|
on:focus={() => {
|
|
80
|
-
$selectedComponent = id
|
|
80
|
+
$selectedComponent = [id]
|
|
81
81
|
$focusedGrid = {
|
|
82
82
|
parentComponentId: id,
|
|
83
83
|
subGridIndex: index
|