windmill-components 1.58.1 → 1.60.1

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.
Files changed (118) hide show
  1. package/components/AddUser.svelte +66 -0
  2. package/components/AddUser.svelte.d.ts +16 -0
  3. package/components/AppConnect.svelte +6 -5
  4. package/components/ArgInput.svelte +39 -14
  5. package/components/Dropdown.svelte +2 -1
  6. package/components/EditorBar.svelte +3 -2
  7. package/components/FlowStatusViewer.svelte +24 -4
  8. package/components/IconedResourceType.svelte +3 -3
  9. package/components/InviteUser.svelte +0 -1
  10. package/components/ItemPicker.svelte +5 -5
  11. package/components/ModulePreview.svelte +1 -1
  12. package/components/MoveDrawer.svelte +2 -2
  13. package/components/Path.svelte +5 -3
  14. package/components/Popover.svelte +22 -11
  15. package/components/Popover.svelte.d.ts +1 -0
  16. package/components/ResourcePicker.svelte +9 -2
  17. package/components/RunForm.svelte +4 -2
  18. package/components/RunForm.svelte.d.ts +1 -0
  19. package/components/SchemaForm.svelte +7 -5
  20. package/components/SchemaModal.svelte +8 -0
  21. package/components/ScriptBuilder.svelte +0 -1
  22. package/components/Tooltip.svelte +2 -1
  23. package/components/Tooltip.svelte.d.ts +3 -1
  24. package/components/apps/components/DisplayComponent.svelte +1 -1
  25. package/components/apps/components/buttons/AppButton.svelte +2 -5
  26. package/components/apps/components/dataDisplay/AppBarChart.svelte +1 -1
  27. package/components/apps/components/dataDisplay/AppHtml.svelte +1 -1
  28. package/components/apps/components/dataDisplay/AppPieChart.svelte +1 -1
  29. package/components/apps/components/dataDisplay/AppScatterChart.svelte +1 -1
  30. package/components/apps/components/dataDisplay/AppText.svelte +32 -9
  31. package/components/apps/components/dataDisplay/AppTimeseries.svelte +1 -1
  32. package/components/apps/components/form/AppForm.svelte +39 -26
  33. package/components/apps/components/helpers/RunnableComponent.svelte +12 -7
  34. package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +3 -0
  35. package/components/apps/components/helpers/RunnableWrapper.svelte +6 -0
  36. package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +3 -0
  37. package/components/apps/components/numberInputs/AppSliderInputs.svelte +1 -1
  38. package/components/apps/components/table/AppTable.svelte +21 -15
  39. package/components/apps/components/table/AppTableFooter.svelte +7 -1
  40. package/components/apps/editor/AppEditorHeader.svelte +30 -25
  41. package/components/apps/editor/AppExportButton.svelte +4 -3
  42. package/components/apps/editor/AppExportButton.svelte.d.ts +2 -3
  43. package/components/apps/editor/GridEditor.svelte +0 -1
  44. package/components/apps/editor/GridEditor.svelte.d.ts +0 -2
  45. package/components/apps/editor/componentsPanel/data.js +9 -3
  46. package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +7 -8
  47. package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte +1 -1
  48. package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +1 -1
  49. package/components/apps/editor/settingsPanel/ComponentPanel.svelte +4 -1
  50. package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +1 -3
  51. package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +52 -33
  52. package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte.d.ts +2 -4
  53. package/components/apps/editor/settingsPanel/TableActions.svelte +1 -1
  54. package/components/apps/editor/settingsPanel/inputEditor/RowInputEditor.svelte +1 -1
  55. package/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte +2 -1
  56. package/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte.d.ts +1 -0
  57. package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +1 -1
  58. package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +4 -3
  59. package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte.d.ts +1 -0
  60. package/components/apps/editorUtils.js +251 -9
  61. package/components/apps/inputType.d.ts +1 -1
  62. package/components/apps/types.d.ts +3 -2
  63. package/components/apps/utils.d.ts +6 -2
  64. package/components/apps/utils.js +16 -3
  65. package/components/common/button/Button.svelte +2 -2
  66. package/components/common/drawer/Drawer.svelte +1 -1
  67. package/components/common/table/AppRow.svelte +5 -0
  68. package/components/common/table/LanguageBadge.svelte +3 -1
  69. package/components/common/table/Row.svelte +5 -3
  70. package/components/flows/CreateActionsApp.svelte +1 -3
  71. package/components/flows/CreateActionsFlow.svelte +1 -1
  72. package/components/flows/content/CapturePayload.svelte +4 -4
  73. package/components/flows/content/FlowSettings.svelte +0 -1
  74. package/components/flows/utils.js +8 -6
  75. package/components/home/ItemsList.svelte +10 -4
  76. package/components/home/ListFilters.svelte +9 -1
  77. package/components/icons/AppwriteIcon.svelte +11 -13
  78. package/components/icons/AwsIcon.svelte +9 -0
  79. package/components/icons/AwsIcon.svelte.d.ts +17 -0
  80. package/components/icons/BcryptIcon.svelte +10 -0
  81. package/components/icons/BcryptIcon.svelte.d.ts +17 -0
  82. package/components/icons/{GItlabIcon.svelte → GitlabIcon.svelte} +0 -0
  83. package/components/icons/GitlabIcon.svelte.d.ts +17 -0
  84. package/components/icons/GoogleIcon.svelte +10 -0
  85. package/components/icons/GoogleIcon.svelte.d.ts +17 -0
  86. package/components/icons/HackernewsIcon.svelte +15 -0
  87. package/components/icons/HackernewsIcon.svelte.d.ts +17 -0
  88. package/components/icons/MongodbIcon.svelte +7 -0
  89. package/components/icons/MongodbIcon.svelte.d.ts +17 -0
  90. package/components/icons/RedditIcon.svelte +8 -0
  91. package/components/icons/RedditIcon.svelte.d.ts +17 -0
  92. package/components/icons/SupabaseIcon.svelte +19 -0
  93. package/components/icons/SupabaseIcon.svelte.d.ts +17 -0
  94. package/components/icons/WebdavIcon.svelte +7 -0
  95. package/components/icons/WebdavIcon.svelte.d.ts +17 -0
  96. package/components/icons/ZammadIcon.svelte +23 -0
  97. package/components/icons/ZammadIcon.svelte.d.ts +17 -0
  98. package/components/icons/index.d.ts +21 -3
  99. package/components/icons/index.js +22 -4
  100. package/components/jobs/JobDetail.svelte +33 -38
  101. package/components/preview/FlowPreviewStatus.svelte +1 -1
  102. package/components/scripts/CreateActionsScript.svelte +1 -1
  103. package/gen/core/OpenAPI.js +1 -1
  104. package/gen/services/AppService.js +2 -2
  105. package/gen/services/CaptureService.d.ts +8 -8
  106. package/gen/services/CaptureService.js +9 -9
  107. package/gen/services/FlowService.d.ts +8 -0
  108. package/gen/services/FlowService.js +14 -0
  109. package/gen/services/JobService.d.ts +9 -1
  110. package/gen/services/JobService.js +10 -8
  111. package/gen/services/ScriptService.d.ts +8 -0
  112. package/gen/services/ScriptService.js +14 -0
  113. package/gen/services/WorkspaceService.d.ts +17 -0
  114. package/gen/services/WorkspaceService.js +16 -0
  115. package/package.json +18 -9
  116. package/utils.d.ts +2 -1
  117. package/utils.js +9 -0
  118. package/components/icons/GItlabIcon.svelte.d.ts +0 -17
@@ -24,6 +24,7 @@ import { getContext } from 'svelte';
24
24
  import { Icon } from 'svelte-awesome';
25
25
  import { Pane, Splitpanes } from 'svelte-splitpanes';
26
26
  import { appToHubUrl, classNames, copyToClipboard, sendUserToast } from '../../../utils';
27
+ import { toStatic } from '../utils';
27
28
  import AppExportButton from './AppExportButton.svelte';
28
29
  import PanelSection from './settingsPanel/common/PanelSection.svelte';
29
30
  async function hash(message) {
@@ -48,34 +49,30 @@ let publishDrawerOpen = false;
48
49
  function closeSaveDrawer() {
49
50
  saveDrawerOpen = false;
50
51
  }
51
- function toStatic() {
52
- const newApp = JSON.parse(JSON.stringify($app));
53
- newApp.grid.forEach((x) => {
54
- let c = x.data;
55
- if (c.componentInput?.type == 'runnable') {
56
- c.componentInput.value = $staticExporter[x.id]();
57
- }
58
- });
59
- return { app: newApp, summary: $summary };
60
- }
61
52
  async function computeTriggerables() {
62
- const allTriggers = await Promise.all($app.grid.map(async (x) => {
53
+ const allTriggers = await Promise.all($app.grid
54
+ .flatMap((x) => {
63
55
  let c = x.data;
64
- if (c.componentInput?.type == 'runnable') {
65
- const staticInputs = Object.fromEntries(Object.entries(c.componentInput.fields ?? {})
56
+ let r = [c.componentInput];
57
+ if (c.type === 'tablecomponent') {
58
+ r.push(...c.actionButtons.map((x) => x.componentInput));
59
+ }
60
+ return r.filter((x) => x);
61
+ })
62
+ .map(async (input) => {
63
+ if (input?.type == 'runnable') {
64
+ const staticInputs = Object.fromEntries(Object.entries(input.fields ?? {})
66
65
  .filter(([k, v]) => v.type == 'static')
67
66
  .map(([k, v]) => {
68
67
  return [k, v['value']];
69
68
  }));
70
- if (c.componentInput.runnable?.type == 'runnableByName') {
71
- let hex = await hash(c.componentInput.runnable.inlineScript?.content);
69
+ if (input.runnable?.type == 'runnableByName') {
70
+ let hex = await hash(input.runnable.inlineScript?.content);
72
71
  return [`rawscript/${hex}`, staticInputs];
73
72
  }
74
- else if (c.componentInput.runnable?.type == 'runnableByPath') {
75
- return [
76
- `${c.componentInput.runnable.runType}/${c.componentInput.runnable.path}`,
77
- staticInputs
78
- ];
73
+ else if (input.runnable?.type == 'runnableByPath') {
74
+ let prefix = input.runnable.runType !== 'hubscript' ? input.runnable.runType : 'script';
75
+ return [`${prefix}/${input.runnable.path}`, staticInputs];
79
76
  }
80
77
  }
81
78
  return [];
@@ -96,6 +93,7 @@ async function createApp(path) {
96
93
  policy
97
94
  }
98
95
  });
96
+ closeSaveDrawer();
99
97
  goto(`/apps/edit/${appId}`);
100
98
  }
101
99
  catch (e) {
@@ -353,9 +351,9 @@ $: selectedJobId && testJobLoader?.watchJob(selectedJobId);
353
351
  <div class="hidden lg:block">
354
352
  <ToggleButtonGroup bind:selected={$app.fullscreen}>
355
353
  <ToggleButton position="left" value={false} size="xs">
356
- <div class="flex gap-1 justify-start">
354
+ <div class="flex gap-1 justify-start items-center">
357
355
  <AlignHorizontalSpaceAround size={14} />
358
- <Tooltip>
356
+ <Tooltip light>
359
357
  The max width is 1168px and the content stay centered instead of taking the full page
360
358
  width
361
359
  </Tooltip>
@@ -376,16 +374,23 @@ $: selectedJobId && testJobLoader?.watchJob(selectedJobId);
376
374
  displayName: 'JSON',
377
375
  icon: faFileExport,
378
376
  action: () => {
379
- appExport.open()
377
+ appExport.open($app)
380
378
  }
381
379
  },
382
380
  {
383
381
  displayName: 'Publish to Hub',
384
382
  icon: faGlobe,
385
383
  action: () => {
386
- const url = appToHubUrl(toStatic())
384
+ const url = appToHubUrl(toStatic($app, $staticExporter, $summary))
387
385
  window.open(url.toString(), '_blank')
388
386
  }
387
+ },
388
+ {
389
+ displayName: 'Hub compatible JSON',
390
+ icon: faFileExport,
391
+ action: () => {
392
+ appExport.open(toStatic($app, $staticExporter, $summary).app)
393
+ }
389
394
  }
390
395
  ]}
391
396
  >
@@ -402,7 +407,7 @@ $: selectedJobId && testJobLoader?.watchJob(selectedJobId);
402
407
  <span class="hidden md:inline">Debug Runs</span>
403
408
  </Button>
404
409
  </span>
405
- <AppExportButton bind:this={appExport} app={$app} />
410
+ <AppExportButton bind:this={appExport} />
406
411
  <Button
407
412
  on:click={() => (publishDrawerOpen = true)}
408
413
  color="light"
@@ -6,10 +6,11 @@ import { Highlight } from 'svelte-highlight';
6
6
  import json from 'svelte-highlight/languages/json';
7
7
  import { Button } from '../../common';
8
8
  let jsonViewerDrawer;
9
- export function open() {
9
+ let app = undefined;
10
+ export function open(app_l) {
11
+ app = app_l;
10
12
  jsonViewerDrawer?.toggleDrawer();
11
13
  }
12
- export let app;
13
14
  </script>
14
15
 
15
16
  <Drawer bind:this={jsonViewerDrawer} size="800px">
@@ -25,7 +26,7 @@ export let app;
25
26
  >
26
27
  Copy content
27
28
  </Button>
28
- <Highlight language={json} code={JSON.stringify(app, null, 4)} />
29
+ <Highlight language={json} code={JSON.stringify(app ?? {}, null, 4)} />
29
30
  </div>
30
31
  </DrawerContent>
31
32
  </Drawer>
@@ -2,8 +2,7 @@ import { SvelteComponentTyped } from "svelte";
2
2
  import type { App } from '../types';
3
3
  declare const __propDef: {
4
4
  props: {
5
- open?: (() => void) | undefined;
6
- app: App;
5
+ open?: ((app_l: App) => void) | undefined;
7
6
  };
8
7
  events: {
9
8
  [evt: string]: CustomEvent<any>;
@@ -14,6 +13,6 @@ export type AppExportButtonProps = typeof __propDef.props;
14
13
  export type AppExportButtonEvents = typeof __propDef.events;
15
14
  export type AppExportButtonSlots = typeof __propDef.slots;
16
15
  export default class AppExportButton extends SvelteComponentTyped<AppExportButtonProps, AppExportButtonEvents, AppExportButtonSlots> {
17
- get open(): () => void;
16
+ get open(): (app_l: App) => void;
18
17
  }
19
18
  export {};
@@ -125,7 +125,6 @@ const onpointerup = () => {
125
125
  'h-full w-full flex justify-center align-center items-center',
126
126
  gridComponent.data.card ? 'border border-gray-100' : ''
127
127
  )}
128
- on:click|preventDefault|capture|once|stopPropagation
129
128
  >
130
129
  <ComponentEditor
131
130
  {pointerdown}
@@ -5,8 +5,6 @@ declare const __propDef: {
5
5
  policy: Policy;
6
6
  };
7
7
  events: {
8
- click: MouseEvent;
9
- } & {
10
8
  [evt: string]: CustomEvent<any>;
11
9
  };
12
10
  slots: {};
@@ -220,10 +220,9 @@ const display = {
220
220
  value: `<img
221
221
  src="https://images.unsplash.com/photo-1554629947-334ff61d85dc?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&amp;ixlib=rb-1.2.1&amp;auto=format&amp;fit=crop&amp;w=1024&amp;h=1280&amp;q=80"
222
222
  >
223
- <div class="absolute top-4 left-2 text-white">
223
+ <h1 class="absolute top-4 left-2 text-white">
224
224
  Hello \${ctx.username}
225
- </div>
226
- `,
225
+ </h1>`,
227
226
  },
228
227
  configuration: {},
229
228
  card: false
@@ -251,6 +250,13 @@ const display = {
251
250
  type: 'static',
252
251
  fieldType: 'text',
253
252
  value: '',
253
+ tooltip: 'CSS rules like "color: blue;"',
254
+ },
255
+ copyButton: {
256
+ type: 'static',
257
+ value: false,
258
+ fieldType: 'boolean',
259
+ onlyStatic: true,
254
260
  },
255
261
  },
256
262
  card: false
@@ -7,7 +7,7 @@ import { inferArgs } from '../../../../infer';
7
7
  import Badge from '../../../common/badge/Badge.svelte';
8
8
  import { fly } from 'svelte/transition';
9
9
  import Editor from '../../../Editor.svelte';
10
- import { scriptLangToEditorLang } from '../../../../utils';
10
+ import { emptySchema, scriptLangToEditorLang } from '../../../../utils';
11
11
  import Tooltip from '../../../Tooltip.svelte';
12
12
  let inlineScriptEditorDrawer;
13
13
  export let inlineScript;
@@ -15,7 +15,7 @@ export let name = undefined;
15
15
  export let id;
16
16
  const { runnableComponents } = getContext('AppEditorContext');
17
17
  let editor;
18
- let validCode = false;
18
+ let validCode = true;
19
19
  async function inferInlineScriptSchema(language, content, schema) {
20
20
  try {
21
21
  await inferArgs(language, content, schema);
@@ -28,8 +28,8 @@ async function inferInlineScriptSchema(language, content, schema) {
28
28
  return schema;
29
29
  }
30
30
  onMount(async () => {
31
- if (inlineScript) {
32
- inlineScript.schema = await inferInlineScriptSchema(inlineScript?.language, inlineScript?.content, inlineScript?.schema);
31
+ if (inlineScript && !inlineScript.schema) {
32
+ inlineScript.schema = await inferInlineScriptSchema(inlineScript?.language, inlineScript?.content, emptySchema());
33
33
  }
34
34
  });
35
35
  const dispatch = createEventDispatcher();
@@ -73,7 +73,7 @@ let runLoading = false;
73
73
  startIcon={{ icon: faTrash }}
74
74
  on:click={() => dispatch('delete')}
75
75
  />
76
- {:else}
76
+ {:else if $runnableComponents[id] != undefined}
77
77
  <Button
78
78
  loading={runLoading}
79
79
  size="xs"
@@ -84,9 +84,8 @@ let runLoading = false;
84
84
  runLoading = false
85
85
  }}
86
86
  >
87
- Run&nbsp;<Tooltip
88
- >Ctrl+Enter to run the script and see the result in the component directly</Tooltip
89
- >
87
+ Run&nbsp;
88
+ <Tooltip light>Ctrl+Enter</Tooltip>
90
89
  </Button>
91
90
  {/if}
92
91
 
@@ -13,7 +13,7 @@ export let id;
13
13
  async function fork(path) {
14
14
  let { content, language, schema } = await getScriptByPath(path);
15
15
  if (componentInput && componentInput.type == 'runnable') {
16
- if (!schema || Object.keys(schema).length == 0) {
16
+ if (!schema || typeof schema == 'string' || Object.keys(schema).length == 0) {
17
17
  schema = emptySchema();
18
18
  await inferArgs(language, content, schema);
19
19
  }
@@ -68,7 +68,7 @@ $: {
68
68
  }
69
69
  </script>
70
70
 
71
- <div class="h-full flex flex-col gap-4">
71
+ <div class="min-h-full flex flex-col gap-4">
72
72
  <PanelSection title="Inline scripts" smallPadding>
73
73
  <div class="flex flex-col gap-2 w-full">
74
74
  {#if runnablesByName.length > 0}
@@ -109,7 +109,10 @@ $: extraLib =
109
109
  {:else if component.componentInput.type === 'connected' && component.componentInput !== undefined}
110
110
  <ConnectedInputEditor bind:componentInput={component.componentInput} />
111
111
  {:else if component.componentInput?.type === 'runnable' && component.componentInput !== undefined}
112
- <RunnableInputEditor bind:appInput={component.componentInput} />
112
+ <RunnableInputEditor
113
+ bind:appInput={component.componentInput}
114
+ defaultUserInput={component.type == 'formcomponent'}
115
+ />
113
116
  {/if}
114
117
  </div>
115
118
  {#if component.componentInput?.type === 'runnable' && Object.keys(component.componentInput.fields ?? {}).length > 0}
@@ -12,7 +12,5 @@ export let componentInput;
12
12
  {:else if componentInput.type === 'static'}
13
13
  <StaticInputEditor bind:componentInput />
14
14
  {:else if componentInput.type === 'user'}
15
- <span class="text-2xs italic text-gray-6f00"
16
- >Field's value is set by the user in the visible field</span
17
- >
15
+ <span class="text-2xs italic text-gray-6f00">Field's value is set by the user</span>
18
16
  {/if}
@@ -1,9 +1,11 @@
1
1
  <script>import { Badge, ToggleButton, ToggleButtonGroup } from '../../../common';
2
- import { capitalize } from '../../../../utils';
2
+ import { addWhitespaceBeforeCapitals, capitalize } from '../../../../utils';
3
3
  import { faArrowRight, faPen, faTableCells, faUser } from '@fortawesome/free-solid-svg-icons';
4
4
  import { fieldTypeToTsType } from '../../utils';
5
5
  import InputsSpecEditor from './InputsSpecEditor.svelte';
6
6
  import { getContext } from 'svelte';
7
+ import Tooltip from '../../../Tooltip.svelte';
8
+ import Popover from '../../../Popover.svelte';
7
9
  export let inputSpecs;
8
10
  export let userInputEnabled = true;
9
11
  export let staticOnly = false;
@@ -19,10 +21,17 @@ const { connectingInput } = getContext('AppEditorContext');
19
21
  <div class="flex flex-col gap-1">
20
22
  <div class="flex justify-between items-end gap-1">
21
23
  <span class="text-sm font-semibold truncate">
22
- {shouldCapitalize ? capitalize(inputSpecKey) : inputSpecKey}
24
+ {shouldCapitalize
25
+ ? capitalize(addWhitespaceBeforeCapitals(inputSpecKey))
26
+ : inputSpecKey}
27
+ {#if input.tooltip}
28
+ <Tooltip>
29
+ {input.tooltip}
30
+ </Tooltip>
31
+ {/if}
23
32
  </span>
24
33
 
25
- <div class="flex gap-2 flex-wrap items-center">
34
+ <div class="flex gap-x-2 gap-y-1 flex-wrap justify-end items-center">
26
35
  <Badge color="blue">
27
36
  {input.fieldType === 'array' && input.subFieldType
28
37
  ? `${capitalize(fieldTypeToTsType(input.subFieldType))}[]`
@@ -33,7 +42,6 @@ const { connectingInput } = getContext('AppEditorContext');
33
42
  <ToggleButtonGroup
34
43
  bind:selected={inputSpecs[inputSpecKey].type}
35
44
  on:selected={(e) => {
36
- console.log(inputSpecs[inputSpecKey])
37
45
  if (e.detail == 'connected' && !inputSpecs[inputSpecKey]['connection']) {
38
46
  $connectingInput = {
39
47
  opened: true,
@@ -43,45 +51,56 @@ const { connectingInput } = getContext('AppEditorContext');
43
51
  }
44
52
  }}
45
53
  >
46
- <ToggleButton
47
- title="Static"
48
- position="left"
49
- value="static"
50
- startIcon={{ icon: faPen }}
51
- size="xs"
52
- iconOnly
53
- />
54
- {#if rowColumns}
54
+ <Popover placement="bottom" notClickable disapperTimoout={0}>
55
55
  <ToggleButton
56
- title="From Row"
57
- position="center"
58
- value="row"
59
- startIcon={{ icon: faTableCells }}
56
+ position="left"
57
+ value="static"
58
+ startIcon={{ icon: faPen }}
60
59
  size="xs"
61
60
  iconOnly
62
- disabled={staticOnly}
63
61
  />
62
+ <svelte:fragment slot="text">Static</svelte:fragment>
63
+ </Popover>
64
+ {#if rowColumns}
65
+ <Popover placement="bottom" notClickable disapperTimoout={0}>
66
+ <ToggleButton
67
+ position="center"
68
+ value="row"
69
+ startIcon={{ icon: faTableCells }}
70
+ size="xs"
71
+ disabled={staticOnly}
72
+ >
73
+ <Tooltip>
74
+ Use the column name to have the value of the cell be passed to the action
75
+ </Tooltip>
76
+ </ToggleButton>
77
+ <svelte:fragment slot="text">Column</svelte:fragment>
78
+ </Popover>
79
+ {/if}
80
+ {#if userInputEnabled && !input.format?.startsWith('resource-')}
81
+ <Popover placement="bottom" notClickable disapperTimoout={0}>
82
+ <ToggleButton
83
+ position="center"
84
+ value="user"
85
+ startIcon={{ icon: faUser }}
86
+ size="xs"
87
+ iconOnly
88
+ disabled={staticOnly}
89
+ />
90
+ <svelte:fragment slot="text">User Input</svelte:fragment>
91
+ </Popover>
64
92
  {/if}
65
- {#if userInputEnabled && (!input.format?.startsWith('resource-') || true)}
93
+ <Popover placement="bottom" notClickable disapperTimoout={0}>
66
94
  <ToggleButton
67
- title="User Input"
68
- position="center"
69
- value="user"
70
- startIcon={{ icon: faUser }}
95
+ position="right"
96
+ value="connected"
97
+ startIcon={{ icon: faArrowRight }}
71
98
  size="xs"
72
99
  iconOnly
73
100
  disabled={staticOnly}
74
101
  />
75
- {/if}
76
- <ToggleButton
77
- title="Connect"
78
- position="right"
79
- value="connected"
80
- startIcon={{ icon: faArrowRight }}
81
- size="xs"
82
- iconOnly
83
- disabled={staticOnly}
84
- />
102
+ <svelte:fragment slot="text">Connect</svelte:fragment>
103
+ </Popover>
85
104
  </ToggleButtonGroup>
86
105
  {/if}
87
106
  </div>
@@ -1,10 +1,8 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { ConnectedAppInput, RowAppInput, StaticAppInput, UserAppInput } from '../../inputType';
2
+ import type { BaseAppComponent } from '../../types';
3
3
  declare const __propDef: {
4
4
  props: {
5
- inputSpecs: Record<string, (StaticAppInput | ConnectedAppInput | UserAppInput | RowAppInput) & {
6
- onlyStatic?: boolean;
7
- }>;
5
+ inputSpecs: BaseAppComponent['configuration'];
8
6
  userInputEnabled?: boolean | undefined;
9
7
  staticOnly?: boolean | undefined;
10
8
  shouldCapitalize?: boolean | undefined;
@@ -13,7 +13,7 @@ const { selectedComponent, staticOutputs } = getContext('AppEditorContext');
13
13
  function addComponent() {
14
14
  const actionId = getNextId(components.map((x) => x.id.split('-')[1]));
15
15
  const newComponent = {
16
- id: `${id}-${actionId}`,
16
+ id: `${id}_${actionId}`,
17
17
  type: 'buttoncomponent',
18
18
  configuration: {
19
19
  label: {
@@ -2,5 +2,5 @@
2
2
  </script>
3
3
 
4
4
  {#if componentInput}
5
- <input type="text" placeholder="column" bind:value={componentInput.column} />
5
+ <input type="text" placeholder="column name" bind:value={componentInput.column} />
6
6
  {/if}
@@ -2,11 +2,12 @@
2
2
  import RunnableSelector from '../mainInput/RunnableSelector.svelte';
3
3
  import SelectedRunnable from '../SelectedRunnable.svelte';
4
4
  export let appInput;
5
+ export let defaultUserInput = false;
5
6
  $: isRunnableSelected = isScriptByPathDefined(appInput) || isScriptByNameDefined(appInput);
6
7
  </script>
7
8
 
8
9
  {#if isRunnableSelected}
9
10
  <SelectedRunnable bind:appInput />
10
11
  {:else}
11
- <RunnableSelector bind:appInput />
12
+ <RunnableSelector {defaultUserInput} bind:appInput />
12
13
  {/if}
@@ -3,6 +3,7 @@ import type { ResultAppInput } from '../../../inputType';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  appInput: ResultAppInput;
6
+ defaultUserInput?: boolean | undefined;
6
7
  };
7
8
  events: {
8
9
  [evt: string]: CustomEvent<any>;
@@ -13,7 +13,7 @@ $: componentInput && onchange?.();
13
13
  {#if componentInput.fieldType === 'number'}
14
14
  <input type="number" bind:value={componentInput.value} />
15
15
  {:else if componentInput.fieldType === 'textarea'}
16
- <textarea type="text" bind:value={componentInput.value} />
16
+ <textarea bind:value={componentInput.value} />
17
17
  {:else if componentInput.fieldType === 'boolean'}
18
18
  <Toggle bind:checked={componentInput.value} />
19
19
  {:else if componentInput.fieldType === 'select'}
@@ -9,6 +9,7 @@ import { getContext } from 'svelte';
9
9
  import { loadSchema, schemaToInputsSpec } from '../../../utils';
10
10
  import { emptySchema } from '../../../../../utils';
11
11
  export let appInput;
12
+ export let defaultUserInput = false;
12
13
  let tab = 'inlinescripts';
13
14
  let filter = '';
14
15
  let picker;
@@ -19,7 +20,7 @@ async function loadSchemaFromTriggerable(path, runType) {
19
20
  async function pickScript(path) {
20
21
  if (appInput.type === 'runnable') {
21
22
  const schema = await loadSchemaFromTriggerable(path, 'script');
22
- const fields = schemaToInputsSpec(schema);
23
+ const fields = schemaToInputsSpec(schema, defaultUserInput);
23
24
  appInput.runnable = {
24
25
  type: 'runnableByPath',
25
26
  path,
@@ -32,7 +33,7 @@ async function pickScript(path) {
32
33
  async function pickFlow(path) {
33
34
  if (appInput.type === 'runnable') {
34
35
  const schema = await loadSchemaFromTriggerable(path, 'flow');
35
- const fields = schemaToInputsSpec(schema);
36
+ const fields = schemaToInputsSpec(schema, defaultUserInput);
36
37
  appInput.runnable = {
37
38
  type: 'runnableByPath',
38
39
  path,
@@ -45,7 +46,7 @@ async function pickFlow(path) {
45
46
  async function pickHubScript(path) {
46
47
  if (appInput.type === 'runnable') {
47
48
  const schema = await loadSchemaFromTriggerable(path, 'hubscript');
48
- const fields = schemaToInputsSpec(schema);
49
+ const fields = schemaToInputsSpec(schema, defaultUserInput);
49
50
  appInput.runnable = {
50
51
  type: 'runnableByPath',
51
52
  path,
@@ -3,6 +3,7 @@ import type { ResultAppInput } from '../../../inputType';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  appInput: ResultAppInput;
6
+ defaultUserInput?: boolean | undefined;
6
7
  };
7
8
  events: {
8
9
  [evt: string]: CustomEvent<any>;