windmill-components 1.89.0 → 1.89.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 (59) hide show
  1. package/package/components/CronInput.svelte +2 -2
  2. package/package/components/ScheduleEditor.svelte +3 -3
  3. package/package/components/SchemaEditor.svelte +4 -5
  4. package/package/components/apps/components/helpers/RunnableComponent.svelte +1 -1
  5. package/package/components/apps/components/inputs/AppSelect.svelte +2 -2
  6. package/package/components/apps/editor/AppEditor.svelte +1 -1
  7. package/package/components/apps/editor/AppEditorHeader.svelte +1 -1
  8. package/package/components/apps/editor/RecomputeAllComponents.svelte +5 -2
  9. package/package/components/apps/editor/componentsPanel/ComponentList.svelte +2 -17
  10. package/package/components/apps/editor/componentsPanel/CssSettings.svelte +57 -71
  11. package/package/components/apps/editor/contextPanel/ContextPanel.svelte +2 -16
  12. package/package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte +9 -9
  13. package/package/components/apps/editor/inlineScriptsPanel/utils.js +7 -1
  14. package/package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte +1 -1
  15. package/package/components/apps/editor/settingsPanel/inputEditor/IconSelectInput.svelte +12 -16
  16. package/package/components/apps/editor/settingsPanel/triggerLists/ComponentTriggerList.svelte +5 -0
  17. package/package/components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte +2 -1
  18. package/package/components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte.d.ts +1 -0
  19. package/package/components/apps/utils.js +7 -0
  20. package/package/components/common/button/ButtonDropdown.svelte +1 -1
  21. package/package/components/common/clearableInput/ClearableInput.svelte +11 -5
  22. package/package/components/flows/content/FlowBranchesAllWrapper.svelte +67 -69
  23. package/package/components/flows/content/FlowBranchesOneWrapper.svelte +66 -65
  24. package/package/components/flows/content/FlowRetries.svelte +11 -12
  25. package/package/components/flows/previousResults.js +1 -1
  26. package/package/components/flows/propPicker/PropPickerWrapper.svelte +1 -1
  27. package/package/components/graph/svelvet/container/views/GraphView.svelte +14 -17
  28. package/package/components/icons/ActivitypubIcon.svelte +64 -0
  29. package/package/components/icons/ActivitypubIcon.svelte.d.ts +17 -0
  30. package/package/components/icons/AwsEcrIcon.svelte +39 -0
  31. package/package/components/icons/AwsEcrIcon.svelte.d.ts +17 -0
  32. package/package/components/icons/CalcomIcon.svelte +18 -0
  33. package/package/components/icons/CalcomIcon.svelte.d.ts +17 -0
  34. package/package/components/icons/ClickupIcon.svelte +50 -0
  35. package/package/components/icons/ClickupIcon.svelte.d.ts +17 -0
  36. package/package/components/icons/CloudflareIcon.svelte +26 -0
  37. package/package/components/icons/CloudflareIcon.svelte.d.ts +17 -0
  38. package/package/components/icons/FirebaseIcon.svelte +52 -0
  39. package/package/components/icons/FirebaseIcon.svelte.d.ts +17 -0
  40. package/package/components/icons/GoogleFormsIcon.svelte +26 -0
  41. package/package/components/icons/GoogleFormsIcon.svelte.d.ts +17 -0
  42. package/package/components/icons/JiraIcon.svelte +50 -0
  43. package/package/components/icons/JiraIcon.svelte.d.ts +17 -0
  44. package/package/components/icons/NotionIcon.svelte +31 -0
  45. package/package/components/icons/NotionIcon.svelte.d.ts +17 -0
  46. package/package/components/icons/PineconeIcon.svelte +135 -0
  47. package/package/components/icons/PineconeIcon.svelte.d.ts +17 -0
  48. package/package/components/icons/RssIcon.svelte +30 -0
  49. package/package/components/icons/RssIcon.svelte.d.ts +17 -0
  50. package/package/components/icons/ShopifyIcon.svelte +26 -0
  51. package/package/components/icons/ShopifyIcon.svelte.d.ts +17 -0
  52. package/package/components/icons/TypeformIcon.svelte +18 -0
  53. package/package/components/icons/TypeformIcon.svelte.d.ts +17 -0
  54. package/package/components/icons/index.d.ts +27 -1
  55. package/package/components/icons/index.js +27 -1
  56. package/package/gen/core/OpenAPI.js +1 -1
  57. package/package/script_helpers.d.ts +1 -1
  58. package/package/script_helpers.js +2 -2
  59. package/package.json +102 -4564
@@ -142,7 +142,7 @@ $: dateFormatter = new Intl.DateTimeFormat('en-GB', {
142
142
  }).format;
143
143
  </script>
144
144
 
145
- <div class="w-full flex space-x-16 p-4">
145
+ <div class="w-full flex space-x-16">
146
146
  <div class="w-full flex flex-col space-y-2">
147
147
  <div class="w-full flex flex-col gap-1">
148
148
  <small class="font-bold">Cron</small>
@@ -316,7 +316,7 @@ $: dateFormatter = new Intl.DateTimeFormat('en-GB', {
316
316
  <small>Estimated upcoming events ({timezone})</small>
317
317
  <div class="flex flex-col rounded-md p-4 border text-gray-600">
318
318
  {#each preview as date}
319
- <div class="flex items-center space-x-2">
319
+ <div class="flex items-center space-x-2 text-sm">
320
320
  <span>{dateFormatter(new Date(date))}</span>
321
321
  </div>
322
322
  {/each}
@@ -180,10 +180,10 @@ let drawer;
180
180
  <div class="mb-8" />
181
181
  {/if}
182
182
 
183
- <h2 class="border-b pb-1 mb-2">
184
- <span class="mr-1">Schedule</span>
183
+ <div class="flex flex-row items-center mb-2 gap-1">
184
+ <div class="text-xl font-extrabold">Schedule</div>
185
185
  <Tooltip>Schedules use CRON syntax. Seconds are mandatory.</Tooltip>
186
- </h2>
186
+ </div>
187
187
 
188
188
  <CronInput disabled={!can_write} bind:schedule bind:timezone bind:validCRON />
189
189
 
@@ -166,11 +166,10 @@ let error = '';
166
166
  }}
167
167
  />
168
168
  <div class="ml-2">
169
- <Tooltip>
170
- Arguments can be edited either using the wizard, or by editing their JSON Schema,
171
- <a href="https://docs.windmill.dev/docs/reference/#script-parameters-to-json-schema"
172
- >see docs</a
173
- >
169
+ <Tooltip
170
+ documentationLink="https://docs.windmill.dev/docs/reference/#script-parameters-to-json-schema"
171
+ >
172
+ Arguments can be edited either using the wizard, or by editing their JSON Schema
174
173
  </Tooltip>
175
174
  </div>
176
175
  </div>
@@ -263,6 +263,7 @@ async function setResult(res) {
263
263
  delete $errorByComponent[previousJobId];
264
264
  $errorByComponent = $errorByComponent;
265
265
  }
266
+ donePromise?.();
266
267
  }
267
268
  function handleInputClick(e) {
268
269
  const event = e;
@@ -301,7 +302,6 @@ function handleInputClick(e) {
301
302
  if (startedAt > lastStartedAt) {
302
303
  lastStartedAt = startedAt
303
304
  setResult(e.detail.result)
304
- donePromise?.()
305
305
  }
306
306
  }
307
307
  loading = false
@@ -31,13 +31,13 @@ function handleItems() {
31
31
  })
32
32
  : [];
33
33
  let rawValue;
34
- if (defaultValue) {
34
+ if (defaultValue !== undefined) {
35
35
  rawValue = defaultValue;
36
36
  }
37
37
  else if (listItems.length > 0) {
38
38
  rawValue = items[0].value;
39
39
  }
40
- if (rawValue) {
40
+ if (rawValue !== undefined) {
41
41
  value = JSON.stringify(rawValue);
42
42
  outputs?.result.set(rawValue);
43
43
  }
@@ -283,7 +283,7 @@ else {
283
283
  <TabContent value="insert">
284
284
  <ComponentList />
285
285
  </TabContent>
286
- <TabContent value="css">
286
+ <TabContent value="css" class="h-full">
287
287
  <CssSettings />
288
288
  </TabContent>
289
289
  </div>
@@ -488,7 +488,7 @@ function onKeyDown(event) {
488
488
  <div class="flex flex-row gap-2 justify-end items-center overflow-visible">
489
489
  <Dropdown
490
490
  placement="bottom-end"
491
- btnClasses="!border !rounded-md"
491
+ btnClasses="!rounded-md"
492
492
  dropdownItems={[
493
493
  {
494
494
  displayName: 'JSON',
@@ -40,13 +40,16 @@ function refresh() {
40
40
  isFirstLoad = true;
41
41
  }
42
42
  loading = true;
43
- Promise.all(Object.keys($runnableComponents).map((id) => {
43
+ const promises = Object.keys($runnableComponents)
44
+ .map((id) => {
44
45
  if (!$runnableComponents?.[id]?.autoRefresh &&
45
46
  (!isFirstLoad || !$runnableComponents?.[id]?.refreshOnStart)) {
46
47
  return;
47
48
  }
48
49
  return $runnableComponents?.[id]?.cb?.();
49
- })).finally(() => {
50
+ })
51
+ .filter(Boolean);
52
+ Promise.all(promises).finally(() => {
50
53
  loading = false;
51
54
  });
52
55
  }
@@ -4,9 +4,9 @@ import { dirtyStore } from '../../../common/confirmationModal/dirtyStore';
4
4
  import { components as componentsRecord, COMPONENT_SETS } from '../component';
5
5
  import ListItem from './ListItem.svelte';
6
6
  import { appComponentFromType, insertNewGridItem } from '../appUtils';
7
- import { X } from 'lucide-svelte';
8
7
  import { push } from '../../../../history';
9
8
  import { flip } from 'svelte/animate';
9
+ import { ClearableInput } from '../../../common';
10
10
  const { app, selectedComponent, focusedGrid } = getContext('AppViewerContext');
11
11
  const { history } = getContext('AppEditorContext');
12
12
  function addComponent(appComponentType) {
@@ -28,22 +28,7 @@ $: componentsFiltered = COMPONENT_SETS.map((set) => ({
28
28
  </script>
29
29
 
30
30
  <section class="p-2 sticky bg-white w-full z-10 top-0">
31
- <div class="relative">
32
- <input
33
- bind:value={search}
34
- class="px-2 py-1 border border-gray-300 rounded-sm !pr-6"
35
- placeholder="Search components..."
36
- />
37
-
38
- {#if search !== ''}
39
- <button
40
- class="absolute right-2 top-1/2 transform -translate-y-1/2 hover:bg-gray-500 bg-gray-300 transition-all rounded-full p-0.5"
41
- on:click|stopPropagation|preventDefault={() => (search = '')}
42
- >
43
- <X size="10" color="white" />
44
- </button>
45
- {/if}
46
- </div>
31
+ <ClearableInput bind:value={search} placeholder="Search components..." />
47
32
  </section>
48
33
 
49
34
  <div class="relative">
@@ -1,17 +1,19 @@
1
1
  <script>import { getContext } from 'svelte';
2
- import { LayoutDashboardIcon, MousePointer2, CurlyBraces, X } from 'lucide-svelte';
2
+ import { LayoutDashboardIcon, MousePointer2, CurlyBraces } from 'lucide-svelte';
3
3
  import SimpleEditor from '../../../SimpleEditor.svelte';
4
4
  import { emptyString } from '../../../../utils';
5
- import { Tab, TabContent, Tabs } from '../../../common';
5
+ import { ClearableInput, Tab, TabContent, Tabs } from '../../../common';
6
6
  import ListItem from './ListItem.svelte';
7
7
  import CssProperty from './CssProperty.svelte';
8
8
  import { ccomponents, components } from '../component';
9
+ import { slide } from 'svelte/transition';
9
10
  const STATIC_ELEMENTS = ['app'];
10
11
  const TITLE_PREFIX = 'Css.';
11
12
  const { app } = getContext('AppViewerContext');
12
13
  let rawCode = '';
13
14
  $: rawCode && parseJson();
14
15
  let jsonError = '';
16
+ let jsonErrorHeight;
15
17
  function parseJson() {
16
18
  try {
17
19
  $app.css = JSON.parse(rawCode ?? '');
@@ -51,8 +53,8 @@ entries.sort((a, b) => a.name.localeCompare(b.name));
51
53
  let search = '';
52
54
  </script>
53
55
 
54
- <div class="w-full text-lg font-semibold text-center text-gray-600 p-2">Global Styling</div>
55
- <Tabs selected="ui" on:selected={(e) => switchTab(e.detail === 'json')} class="relative">
56
+ <!-- <div class="w-full text-lg font-semibold text-center text-gray-600 p-2">Global Styling</div> -->
57
+ <Tabs selected="ui" on:selected={(e) => switchTab(e.detail === 'json')} class="h-full">
56
58
  <Tab value="ui" size="xs" class="w-1/2">
57
59
  <div class="m-1 center-center">
58
60
  <MousePointer2 size={16} />
@@ -65,80 +67,64 @@ let search = '';
65
67
  <span class="pl-1">JSON</span>
66
68
  </div>
67
69
  </Tab>
68
- <div slot="content" class="h-full overflow-y-auto">
69
- <TabContent value="ui">
70
- <div class="sticky top-0 left-0 w-full bg-white p-2">
71
- <div class="relative">
72
- <input
73
- bind:value={search}
74
- class="px-2 pb-1 border border-gray-300 rounded-sm {search ? 'pr-8' : ''}"
75
- placeholder="Search..."
76
- />
77
- {#if search}
78
- <button
79
- class="absolute right-2 top-1/2 transform -translate-y-1/2 hover:bg-gray-200 rounded-full p-0.5"
80
- on:click|stopPropagation|preventDefault={() => (search = '')}
70
+ <div slot="content" class="h-[calc(100%-35px)] overflow-auto">
71
+ <TabContent value="ui" class="h-full">
72
+ <div class="p-2">
73
+ <ClearableInput bind:value={search} placeholder="Search..." />
74
+ </div>
75
+ <div class="h-[calc(100%-50px)] overflow-auto relative">
76
+ {#each search != '' ? entries.filter((x) => x.name
77
+ .toLowerCase()
78
+ .includes(search.toLowerCase())) : entries as { type, name, icon, ids } (name)}
79
+ {#if ids.length > 0}
80
+ <ListItem
81
+ title={name}
82
+ prefix={TITLE_PREFIX}
83
+ on:open={(e) => {
84
+ if ($app.css != undefined) {
85
+ if (e.detail && $app.css[type] == undefined) {
86
+ $app.css[type] = Object.fromEntries(ids.map(({ id }) => [id, {}]))
87
+ }
88
+ }
89
+ }}
81
90
  >
82
- <X size="14" />
83
- </button>
91
+ <div slot="title" class="flex items-center">
92
+ <svelte:component this={icon} size={18} />
93
+ <span class="ml-1">
94
+ {name}
95
+ </span>
96
+ </div>
97
+ <div class="pb-2">
98
+ {#each ids as { id, forceStyle, forceClass }}
99
+ <div class="mb-3">
100
+ {#if $app?.css?.[type]}
101
+ <CssProperty
102
+ {forceClass}
103
+ {forceStyle}
104
+ name={id}
105
+ bind:value={$app.css[type][id]}
106
+ />
107
+ {/if}
108
+ </div>
109
+ {/each}
110
+ </div>
111
+ </ListItem>
84
112
  {/if}
85
- </div>
113
+ {/each}
86
114
  </div>
87
- {#each search != '' ? entries.filter((x) => x.name
88
- .toLowerCase()
89
- .includes(search.toLowerCase())) : entries as { type, name, icon, ids } (name)}
90
- {#if ids.length > 0}
91
- <ListItem
92
- title={name}
93
- prefix={TITLE_PREFIX}
94
- on:open={(e) => {
95
- if ($app.css != undefined) {
96
- if (e.detail && $app.css[type] == undefined) {
97
- $app.css[type] = Object.fromEntries(ids.map(({ id }) => [id, {}]))
98
- }
99
- }
100
- }}
101
- >
102
- <div slot="title" class="flex items-center">
103
- <svelte:component this={icon} size={18} />
104
- <span class="ml-1">
105
- {name}
106
- </span>
107
- </div>
108
- <div class="pb-2">
109
- {#each ids as { id, forceStyle, forceClass }}
110
- <div class="mb-3">
111
- {#if $app?.css?.[type]}
112
- <CssProperty
113
- {forceClass}
114
- {forceStyle}
115
- name={id}
116
- bind:value={$app.css[type][id]}
117
- />
118
- {/if}
119
- </div>
120
- {/each}
121
- </div>
122
- </ListItem>
123
- {/if}
124
- {/each}
125
115
  </TabContent>
126
- <TabContent value="json">
116
+ <TabContent value="json" class="h-full">
127
117
  {#if !emptyString(jsonError)}
128
- <span class="text-red-400 text-xs mb-1 flex flex-row-reverse">
118
+ <div
119
+ transition:slide={{ duration: 200 }}
120
+ bind:clientHeight={jsonErrorHeight}
121
+ class="text-red-500 text-xs p-1"
122
+ >
129
123
  {jsonError}
130
- </span>
131
- {:else}
132
- <div class="py-2" />
124
+ </div>
133
125
  {/if}
134
- <div class="h-full w-full py-1">
135
- <SimpleEditor
136
- autoHeight
137
- class="editor"
138
- lang="json"
139
- bind:code={rawCode}
140
- fixedOverflowWidgets={false}
141
- />
126
+ <div style="height: calc(100% - {jsonErrorHeight || 0}px);">
127
+ <SimpleEditor class="h-full" lang="json" bind:code={rawCode} fixedOverflowWidgets={false} />
142
128
  </div>
143
129
  </TabContent>
144
130
  </div>
@@ -1,5 +1,4 @@
1
1
  <script>import { classNames } from '../../../../utils';
2
- import { X } from 'lucide-svelte';
3
2
  import { getContext } from 'svelte';
4
3
  import { connectInput } from '../appUtils';
5
4
  import PanelSection from '../settingsPanel/common/PanelSection.svelte';
@@ -7,6 +6,7 @@ import ComponentOutput from './ComponentOutput.svelte';
7
6
  import ComponentOutputViewer from './ComponentOutputViewer.svelte';
8
7
  import BackgroundScriptsOutput from './components/BackgroundScriptsOutput.svelte';
9
8
  import OutputHeader from './components/OutputHeader.svelte';
9
+ import { ClearableInput } from '../../../common';
10
10
  const { connectingInput, app } = getContext('AppViewerContext');
11
11
  const { search } = getContext('ContextPanel');
12
12
  let hasState = false;
@@ -21,21 +21,7 @@ let hasState = false;
21
21
  >
22
22
  <div class="min-w-[150px]">
23
23
  <div class="sticky z-10 top-0 left-0 w-full bg-white p-1.5">
24
- <div class="relative w-full">
25
- <input
26
- bind:value={$search}
27
- class="!border-gray-200 !rounded-md !text-xs !pr-6"
28
- placeholder="Search outputs..."
29
- />
30
- {#if $search !== ''}
31
- <button
32
- class="absolute right-2 top-1/2 transform -translate-y-1/2 hover:bg-gray-500 bg-gray-300 transition-all rounded-full p-0.5"
33
- on:click|stopPropagation|preventDefault={() => ($search = '')}
34
- >
35
- <X size="10" color="white" />
36
- </button>
37
- {/if}
38
- </div>
24
+ <ClearableInput bind:value={$search} placeholder="Search outputs..." />
39
25
  </div>
40
26
 
41
27
  <div class="flex flex-col gap-4">
@@ -189,15 +189,15 @@ const langs = ['deno', 'python3', 'go', 'bash'];
189
189
  on:click={() => {
190
190
  const newInlineScript = {
191
191
  content: `// read outputs and ctx
192
- console.log(ctx.email)
193
-
194
- // access a global state store
195
- if (!state.foo) { state.foo = 0 }
196
- state.foo += 1
197
-
198
- // you can also navigate (goto), recompute a script (recompute), or set a tab (setTab)
199
-
200
- return state.foo`,
192
+ console.log(ctx.email)
193
+
194
+ // access a global state store
195
+ if (!state.foo) { state.foo = 0 }
196
+ state.foo += 1
197
+
198
+ // you can also navigate (goto), recompute a script (recompute), or set a tab (setTab)
199
+
200
+ return state.foo`,
201
201
  language: 'frontend',
202
202
  path: 'frontend script',
203
203
  schema: undefined
@@ -18,7 +18,13 @@ export function computeFields(schema, defaultUserInput, fields) {
18
18
  else {
19
19
  if (fieldTypeToTsType(newInput.fieldType) !== fieldTypeToTsType(oldInput.fieldType) ||
20
20
  newInput.format !== oldInput.format ||
21
- newInput.subFieldType !== oldInput.subFieldType) {
21
+ newInput.subFieldType !== oldInput.subFieldType ||
22
+ // An input became a select
23
+ (newInput.fieldType === 'select' && oldInput.fieldType !== 'select') ||
24
+ // The input was already a select, but the values changed
25
+ (newInput.fieldType === 'select' &&
26
+ oldInput.fieldType === 'select' &&
27
+ JSON.stringify(newInput.selectOptions) !== JSON.stringify(oldInput.selectOptions))) {
22
28
  result[key] = newInput;
23
29
  }
24
30
  else {
@@ -42,7 +42,7 @@ function open() {
42
42
  }
43
43
 
44
44
  :global(.color-picker-input) :global(span) > :global(div.wrapper) {
45
- box-shadow: 0 5px 30px -5px rgba(0, 0, 0, 0.25) !important;
45
+ box-shadow: 0 10px 40px -5px rgba(0, 0, 0, 0.25) !important;
46
46
  border-style: none !important;
47
47
  border-radius: 0.375rem !important;
48
48
  top: 6px !important;
@@ -1,5 +1,5 @@
1
- <script>import { Loader2, X } from 'lucide-svelte';
2
- import { Popup } from '../../../../common';
1
+ <script>import { Loader2 } from 'lucide-svelte';
2
+ import { ClearableInput, Popup } from '../../../../common';
3
3
  import { fade } from 'svelte/transition';
4
4
  export let componentInput;
5
5
  let anchor;
@@ -44,11 +44,11 @@ function select(label) {
44
44
  }
45
45
  </script>
46
46
 
47
- <div class="relative">
48
- <input
47
+ <div bind:this={anchor} class="relative">
48
+ <ClearableInput
49
49
  readonly
50
50
  value={formatName(componentInput.value)}
51
- bind:this={anchor}
51
+ on:change={({ detail }) => (componentInput.value = detail)}
52
52
  on:focus={getData}
53
53
  class="!pr-6"
54
54
  />
@@ -56,28 +56,24 @@ function select(label) {
56
56
  <div class="center-center absolute right-2 top-1/2 transform -translate-y-1/2 p-0.5">
57
57
  <Loader2 class="animate-spin" size={16} />
58
58
  </div>
59
- {:else if componentInput.value}
60
- <button
61
- class="absolute right-2 top-1/2 transform -translate-y-1/2 hover:bg-gray-500 bg-gray-300 transition-all rounded-full p-0.5"
62
- on:click|stopPropagation|preventDefault={() => (componentInput.value = undefined)}
63
- title="Clear"
64
- aria-label="Clear"
65
- >
66
- <X size="10" color="white" />
67
- </button>
68
59
  {/if}
69
60
  </div>
70
61
  {#if anchor}
71
62
  <Popup
72
63
  ref={anchor}
73
64
  closeOn={[]}
74
- options={{ placement: 'bottom' }}
65
+ options={{
66
+ placement: 'bottom-start',
67
+ strategy: 'fixed',
68
+ modifiers: [{ name: 'offset', options: { offset: [0, 6] } }]
69
+ }}
75
70
  bind:open={openPopup}
76
71
  let:close
77
72
  transition={fade}
73
+ wrapperClasses=" z-[1002]"
78
74
  >
79
75
  {#if !loading}
80
- <div class="max-w-xs shadow-[0_10px_40px_-5px_rgba(0,0,0,0.25)] bg-white rounded-md p-2">
76
+ <div class="w-72 shadow-[0_10px_40px_-5px_rgba(0,0,0,0.25)] bg-white rounded-md p-2">
81
77
  {#if filteredItems}
82
78
  <input
83
79
  on:keydown={(event) => {
@@ -20,5 +20,10 @@ $: onLoad =
20
20
  {onLoad}
21
21
  {recomputeOnInputChanged}
22
22
  id={$selectedComponent?.[0]}
23
+ shouldHideAddDependencyButton={[
24
+ 'buttoncomponent',
25
+ 'formcomponent',
26
+ 'formbuttoncomponent'
27
+ ].includes(appComponent.type)}
23
28
  {onClick}
24
29
  />
@@ -9,6 +9,7 @@ export let onClick = false;
9
9
  export let onLoad = false;
10
10
  export let id = undefined;
11
11
  export let recomputeOnInputChanged = false;
12
+ export let shouldHideAddDependencyButton = false;
12
13
  const colors = {
13
14
  green: 'text-green-800 border-green-600 bg-green-100',
14
15
  indigo: 'text-indigo-800 border-indigo-600 bg-indigo-100',
@@ -115,7 +116,7 @@ function deleteDep(index) {
115
116
  <div class="w-full">
116
117
  <div class="flex justify-between items-center">
117
118
  <div class="text-xs font-semibold text-slate-800 mb-1">Change on values</div>
118
- {#if inlineScript?.language === 'frontend'}
119
+ {#if inlineScript?.language === 'frontend' && !shouldHideAddDependencyButton}
119
120
  <Button
120
121
  variant="border"
121
122
  size="xs"
@@ -8,6 +8,7 @@ declare const __propDef: {
8
8
  onLoad?: boolean | undefined;
9
9
  id?: string | undefined;
10
10
  recomputeOnInputChanged?: boolean | undefined;
11
+ shouldHideAddDependencyButton?: boolean | undefined;
11
12
  };
12
13
  events: {
13
14
  [evt: string]: CustomEvent<any>;
@@ -48,6 +48,13 @@ export function schemaToInputsSpec(schema, defaultUserInput) {
48
48
  fieldType: property.type,
49
49
  format: property.format
50
50
  };
51
+ if (Array.isArray(property.enum)) {
52
+ accu[key] = {
53
+ ...accu[key],
54
+ selectOptions: property.enum,
55
+ fieldType: 'select'
56
+ };
57
+ }
51
58
  return accu;
52
59
  }, {});
53
60
  }
@@ -3,7 +3,7 @@
3
3
  import { ChevronDown } from 'lucide-svelte'
4
4
  </script>
5
5
 
6
- <Menu let:open as="div" class="relative z-50 flex w-full h-full">
6
+ <Menu let:open as="div" class="relative hover:z-50 flex w-full h-full">
7
7
  <MenuButton class="h-full w-full px-2">
8
8
  <ChevronDown class="w-5 h-5" />
9
9
  </MenuButton>
@@ -8,6 +8,7 @@ export let inputClass = '';
8
8
  export let wrapperClass = '';
9
9
  export let buttonClass = '';
10
10
  const dispatch = createEventDispatcher();
11
+ let isHovered = false;
11
12
  $: isNumeric = ['number', 'range'].includes(type);
12
13
  $: dispatch('change', value);
13
14
  function handleInput(e) {
@@ -18,7 +19,11 @@ function clear() {
18
19
  }
19
20
  </script>
20
21
 
21
- <div class="relative grow {wrapperClass}">
22
+ <div
23
+ class="relative grow {wrapperClass}"
24
+ on:mouseenter={() => (isHovered = true)}
25
+ on:mouseleave={() => (isHovered = false)}
26
+ >
22
27
  {#if type === 'textarea'}
23
28
  <textarea
24
29
  {value}
@@ -42,14 +47,15 @@ function clear() {
42
47
  on:blur
43
48
  />
44
49
  {/if}
45
- {#if value}
50
+ {#if value && isHovered}
46
51
  <button
47
- transition:fade|local={{ duration: 100 }}
48
- class="absolute z-10 top-1.5 right-1 rounded-full p-1 bg-white/60 duration-200 hover:bg-gray-200 {buttonClass}"
52
+ transition:fade|local={{ duration: 80 }}
53
+ class="absolute z-10 top-[9.5px] right-2 rounded-full p-0.5 text-white bg-gray-300
54
+ duration-200 hover:bg-gray-600 focus:bg-gray-600 {buttonClass}"
49
55
  aria-label="Clear"
50
56
  on:click|preventDefault|stopPropagation={clear}
51
57
  >
52
- <X size={14} />
58
+ <X size={11} class="" />
53
59
  </button>
54
60
  {/if}
55
61
  <slot />