windmill-components 1.22.42 → 1.28.3

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 (250) hide show
  1. package/components/AppConnect.svelte +93 -47
  2. package/components/AppConnect.svelte.d.ts +2 -2
  3. package/components/ArgInfo.svelte +0 -5
  4. package/components/ArgInput.svelte +91 -64
  5. package/components/ArgInput.svelte.d.ts +8 -3
  6. package/components/Button.svelte +4 -4
  7. package/components/CenteredPage.svelte +1 -1
  8. package/components/CollapseLink.svelte +12 -0
  9. package/components/CollapseLink.svelte.d.ts +19 -0
  10. package/components/CronInput.svelte +84 -0
  11. package/components/CronInput.svelte.d.ts +18 -0
  12. package/components/DisplayResult.svelte +28 -15
  13. package/components/Editor.svelte +136 -66
  14. package/components/Editor.svelte.d.ts +2 -0
  15. package/components/EditorBar.svelte +56 -45
  16. package/components/FlowBuilder.svelte +155 -70
  17. package/components/FlowEditor.svelte +79 -200
  18. package/components/FlowEditor.svelte.d.ts +3 -2
  19. package/components/FlowJobResult.svelte +1 -1
  20. package/components/FlowPreview.svelte +18 -24
  21. package/components/FlowPreviewContent.svelte +68 -0
  22. package/components/FlowPreviewContent.svelte.d.ts +21 -0
  23. package/components/FlowStatusViewer.svelte +85 -37
  24. package/components/FlowStatusViewer.svelte.d.ts +3 -2
  25. package/components/FlowViewer.svelte +85 -45
  26. package/components/FlowViewer.svelte.d.ts +2 -1
  27. package/components/IconedResourceType.svelte +30 -5
  28. package/components/InputTransformForm.svelte +209 -0
  29. package/components/InputTransformForm.svelte.d.ts +26 -0
  30. package/components/InputTransformsViewer.svelte +19 -0
  31. package/components/InputTransformsViewer.svelte.d.ts +17 -0
  32. package/components/InviteGlobalUser.svelte +2 -2
  33. package/components/InviteUser.svelte +2 -2
  34. package/components/JobStatus.svelte +32 -25
  35. package/components/Modal.svelte +44 -42
  36. package/components/ModuleStep.svelte +94 -79
  37. package/components/ObjectResourceInput.svelte +58 -38
  38. package/components/ObjectTypeNarrowing.svelte +4 -19
  39. package/components/Path.svelte +1 -0
  40. package/components/Path.svelte.d.ts +1 -1
  41. package/components/RadioButton.svelte +11 -96
  42. package/components/RadioButton.svelte.d.ts +4 -2
  43. package/components/ResourceEditor.svelte +4 -5
  44. package/components/ResourceEditor.svelte.d.ts +2 -2
  45. package/components/ResourcePicker.svelte +25 -2
  46. package/components/ResourcePicker.svelte.d.ts +3 -0
  47. package/components/ResourceTypePicker.svelte +17 -29
  48. package/components/ResourceTypePicker.svelte.d.ts +1 -0
  49. package/components/RunForm.svelte +14 -15
  50. package/components/RunForm.svelte.d.ts +1 -1
  51. package/components/SchemaEditor.svelte +87 -71
  52. package/components/SchemaEditor.svelte.d.ts +2 -0
  53. package/components/SchemaEditorProperty.svelte +11 -0
  54. package/components/SchemaEditorProperty.svelte.d.ts +17 -0
  55. package/components/SchemaForm.svelte +21 -127
  56. package/components/SchemaForm.svelte.d.ts +3 -4
  57. package/components/SchemaModal.svelte +20 -33
  58. package/components/SchemaModal.svelte.d.ts +1 -1
  59. package/components/SchemaViewer.svelte +4 -6
  60. package/components/ScriptBuilder.svelte +40 -43
  61. package/components/ScriptEditor.svelte +71 -66
  62. package/components/ScriptPicker.svelte +10 -12
  63. package/components/ScriptPicker.svelte.d.ts +1 -1
  64. package/components/ScriptSchema.svelte +0 -5
  65. package/components/ShareModal.svelte +1 -1
  66. package/components/SharedBadge.svelte +12 -10
  67. package/components/StringTypeNarrowing.svelte +8 -4
  68. package/components/StringTypeNarrowing.svelte.d.ts +1 -0
  69. package/components/TableCustom.svelte +7 -9
  70. package/components/TableSimple.svelte +1 -1
  71. package/components/Toggle.svelte +8 -10
  72. package/components/Toggle.svelte.d.ts +5 -11
  73. package/components/Tooltip.svelte +3 -2
  74. package/components/VariableEditor.svelte +21 -6
  75. package/components/flows/CopyFirstStepSchema.svelte +7 -5
  76. package/components/flows/DynamicInputHelpBox.svelte +1 -1
  77. package/components/flows/FlowBox.svelte +3 -0
  78. package/components/flows/FlowBox.svelte.d.ts +23 -0
  79. package/components/flows/FlowBoxHeader.svelte +9 -0
  80. package/components/flows/FlowBoxHeader.svelte.d.ts +18 -0
  81. package/components/flows/FlowInput.svelte +20 -0
  82. package/components/flows/FlowInput.svelte.d.ts +14 -0
  83. package/components/flows/FlowInputs.svelte +7 -3
  84. package/components/flows/FlowModuleHeader.svelte +42 -40
  85. package/components/flows/FlowModuleHeader.svelte.d.ts +1 -1
  86. package/components/flows/FlowSettings.svelte +174 -0
  87. package/components/flows/FlowSettings.svelte.d.ts +21 -0
  88. package/components/flows/flowStore.d.ts +5 -2
  89. package/components/flows/flowStore.js +65 -9
  90. package/components/flows/pickers/FlowScriptPicker.svelte +6 -1
  91. package/components/flows/pickers/FlowScriptPicker.svelte.d.ts +1 -0
  92. package/components/flows/utils.d.ts +11 -7
  93. package/components/flows/utils.js +114 -45
  94. package/components/icons/AirtableIcon.svelte +17 -0
  95. package/components/icons/AirtableIcon.svelte.d.ts +17 -0
  96. package/components/icons/GCloudIcon.svelte +16 -0
  97. package/components/icons/GCloudIcon.svelte.d.ts +17 -0
  98. package/components/icons/GItlabIcon.svelte +16 -0
  99. package/components/icons/GItlabIcon.svelte.d.ts +17 -0
  100. package/components/icons/GSheetsIcon.svelte +16 -0
  101. package/components/icons/GSheetsIcon.svelte.d.ts +17 -0
  102. package/components/icons/GcalIcon.svelte +16 -0
  103. package/components/icons/GcalIcon.svelte.d.ts +17 -0
  104. package/components/icons/GdriveIcon.svelte +16 -0
  105. package/components/icons/GdriveIcon.svelte.d.ts +17 -0
  106. package/components/icons/GmailIcon.svelte +16 -0
  107. package/components/icons/GmailIcon.svelte.d.ts +17 -0
  108. package/components/icons/PostgresIcon.svelte +8 -49
  109. package/components/icons/Slack.svelte +9 -18
  110. package/components/icons/TogglIcon.svelte +59 -0
  111. package/components/icons/TogglIcon.svelte.d.ts +17 -0
  112. package/components/propertyPicker/ObjectViewer.svelte +35 -37
  113. package/components/propertyPicker/ObjectViewer.svelte.d.ts +2 -0
  114. package/components/propertyPicker/OverlayPropertyPicker.svelte +53 -53
  115. package/components/propertyPicker/OverlayPropertyPicker.svelte.d.ts +5 -2
  116. package/components/propertyPicker/PropPicker.svelte +13 -15
  117. package/components/propertyPicker/PropPicker.svelte.d.ts +1 -1
  118. package/components/propertyPicker/WarningMessage.svelte +14 -41
  119. package/components/propertyPicker/WarningMessage.svelte.d.ts +11 -8
  120. package/components/propertyPicker/utils.d.ts +1 -0
  121. package/components/propertyPicker/utils.js +25 -0
  122. package/gen/core/OpenAPI.js +1 -1
  123. package/gen/index.d.ts +11 -2
  124. package/gen/index.js +1 -2
  125. package/gen/models/CompletedJob.d.ts +1 -1
  126. package/gen/models/Flow.d.ts +3 -13
  127. package/gen/models/FlowMetadata.d.ts +9 -0
  128. package/gen/models/FlowMetadata.js +4 -0
  129. package/gen/models/FlowModuleValue.d.ts +5 -22
  130. package/gen/models/FlowModuleValue.js +1 -15
  131. package/gen/models/ForloopFlow.d.ts +8 -0
  132. package/gen/models/ForloopFlow.js +4 -0
  133. package/gen/models/InputTransform.d.ts +3 -12
  134. package/gen/models/InputTransform.js +1 -8
  135. package/gen/models/JavascriptTransform.d.ts +4 -0
  136. package/gen/models/JavascriptTransform.js +4 -0
  137. package/gen/models/MainArgSignature.d.ts +1 -1
  138. package/gen/models/NewSchedule.d.ts +1 -0
  139. package/gen/models/OpenFlowWPath.d.ts +4 -0
  140. package/gen/models/OpenFlowWPath.js +4 -0
  141. package/gen/models/PathFlow.d.ts +4 -0
  142. package/gen/models/PathFlow.js +4 -0
  143. package/gen/models/PathScript.d.ts +4 -0
  144. package/gen/models/PathScript.js +4 -0
  145. package/gen/models/RawScript.d.ts +12 -0
  146. package/gen/models/RawScript.js +11 -0
  147. package/gen/models/Schedule.d.ts +1 -1
  148. package/gen/models/StaticTransform.d.ts +4 -0
  149. package/gen/models/StaticTransform.js +4 -0
  150. package/gen/models/TokenResponse.d.ts +3 -3
  151. package/gen/models/Usage.d.ts +5 -0
  152. package/gen/models/Usage.js +4 -0
  153. package/gen/models/User.d.ts +2 -0
  154. package/gen/schemas/$AuditLog.d.ts +32 -0
  155. package/gen/schemas/$AuditLog.js +35 -0
  156. package/gen/schemas/$CompletedJob.d.ts +98 -0
  157. package/gen/schemas/$CompletedJob.js +103 -0
  158. package/gen/schemas/$ContextualVariable.d.ts +16 -0
  159. package/gen/schemas/$ContextualVariable.js +19 -0
  160. package/gen/schemas/$CreateResource.d.ts +22 -0
  161. package/gen/schemas/$CreateResource.js +25 -0
  162. package/gen/schemas/$CreateVariable.d.ts +26 -0
  163. package/gen/schemas/$CreateVariable.js +29 -0
  164. package/gen/schemas/$CreateWorkspace.d.ts +20 -0
  165. package/gen/schemas/$CreateWorkspace.js +23 -0
  166. package/gen/schemas/$EditResource.d.ts +13 -0
  167. package/gen/schemas/$EditResource.js +16 -0
  168. package/gen/schemas/$EditResourceType.d.ts +10 -0
  169. package/gen/schemas/$EditResourceType.js +13 -0
  170. package/gen/schemas/$EditSchedule.d.ts +20 -0
  171. package/gen/schemas/$EditSchedule.js +23 -0
  172. package/gen/schemas/$EditVariable.d.ts +16 -0
  173. package/gen/schemas/$EditVariable.js +19 -0
  174. package/gen/schemas/$EditWorkspaceUser.d.ts +7 -0
  175. package/gen/schemas/$EditWorkspaceUser.js +10 -0
  176. package/gen/schemas/$Flow.d.ts +23 -0
  177. package/gen/schemas/$Flow.js +26 -0
  178. package/gen/schemas/$FlowMetadata.d.ts +31 -0
  179. package/gen/schemas/$FlowMetadata.js +34 -0
  180. package/gen/schemas/$FlowPreview.d.ts +80 -0
  181. package/gen/schemas/$FlowPreview.js +83 -0
  182. package/gen/schemas/$GlobalUserInfo.d.ts +26 -0
  183. package/gen/schemas/$GlobalUserInfo.js +29 -0
  184. package/gen/schemas/$Group.d.ts +23 -0
  185. package/gen/schemas/$Group.js +26 -0
  186. package/gen/schemas/$Job.d.ts +17 -0
  187. package/gen/schemas/$Job.js +20 -0
  188. package/gen/schemas/$ListableVariable.d.ts +35 -0
  189. package/gen/schemas/$ListableVariable.js +38 -0
  190. package/gen/schemas/$Login.d.ts +12 -0
  191. package/gen/schemas/$Login.js +15 -0
  192. package/gen/schemas/$MainArgSignature.d.ts +50 -0
  193. package/gen/schemas/$MainArgSignature.js +53 -0
  194. package/gen/schemas/$NewSchedule.d.ts +30 -0
  195. package/gen/schemas/$NewSchedule.js +33 -0
  196. package/gen/schemas/$NewToken.d.ts +11 -0
  197. package/gen/schemas/$NewToken.js +14 -0
  198. package/gen/schemas/$NewUser.d.ts +16 -0
  199. package/gen/schemas/$NewUser.js +19 -0
  200. package/gen/schemas/$Preview.d.ts +19 -0
  201. package/gen/schemas/$Preview.js +22 -0
  202. package/gen/schemas/$QueuedJob.d.ts +139 -0
  203. package/gen/schemas/$QueuedJob.js +144 -0
  204. package/gen/schemas/$Resource.d.ts +31 -0
  205. package/gen/schemas/$Resource.js +34 -0
  206. package/gen/schemas/$ResourceType.d.ts +17 -0
  207. package/gen/schemas/$ResourceType.js +20 -0
  208. package/gen/schemas/$Schedule.d.ts +47 -0
  209. package/gen/schemas/$Schedule.js +50 -0
  210. package/gen/schemas/$Script.d.ts +77 -0
  211. package/gen/schemas/$Script.js +80 -0
  212. package/gen/schemas/$ScriptArgs.d.ts +6 -0
  213. package/gen/schemas/$ScriptArgs.js +9 -0
  214. package/gen/schemas/$SlackToken.d.ts +24 -0
  215. package/gen/schemas/$SlackToken.js +27 -0
  216. package/gen/schemas/$TokenResponse.d.ts +23 -0
  217. package/gen/schemas/$TokenResponse.js +26 -0
  218. package/gen/schemas/$TruncatedToken.d.ts +25 -0
  219. package/gen/schemas/$TruncatedToken.js +28 -0
  220. package/gen/schemas/$Usage.d.ts +13 -0
  221. package/gen/schemas/$Usage.js +16 -0
  222. package/gen/schemas/$User.d.ts +42 -0
  223. package/gen/schemas/$User.js +45 -0
  224. package/gen/schemas/$UserWorkspaceList.d.ts +28 -0
  225. package/gen/schemas/$UserWorkspaceList.js +31 -0
  226. package/gen/schemas/$WorkerPing.d.ts +31 -0
  227. package/gen/schemas/$WorkerPing.js +34 -0
  228. package/gen/schemas/$Workspace.d.ts +19 -0
  229. package/gen/schemas/$Workspace.js +22 -0
  230. package/gen/schemas/$WorkspaceInvite.d.ts +16 -0
  231. package/gen/schemas/$WorkspaceInvite.js +19 -0
  232. package/gen/services/FlowService.d.ts +24 -23
  233. package/gen/services/FlowService.js +14 -0
  234. package/gen/services/JobService.d.ts +1 -1
  235. package/gen/services/ScriptService.d.ts +13 -19
  236. package/gen/services/ScriptService.js +0 -14
  237. package/gen/services/WorkspaceService.d.ts +1 -1
  238. package/gen/services/WorkspaceService.js +1 -1
  239. package/infer.js +8 -1
  240. package/package.json +85 -16
  241. package/script_helpers.d.ts +1 -1
  242. package/script_helpers.js +11 -13
  243. package/sql.d.ts +89 -0
  244. package/sql.js +817 -0
  245. package/stores.d.ts +0 -1
  246. package/stores.js +0 -6
  247. package/utils.d.ts +12 -5
  248. package/utils.js +55 -9
  249. package/components/RadioButtonV2.svelte +0 -33
  250. package/components/RadioButtonV2.svelte.d.ts +0 -20
@@ -3,6 +3,7 @@ import ResourceTypePicker from './ResourceTypePicker.svelte';
3
3
  export let pattern;
4
4
  export let enum_;
5
5
  export let format;
6
+ export let contentEncoding;
6
7
  let kind = 'none';
7
8
  let patternStr = pattern ?? '';
8
9
  let resource;
@@ -21,13 +22,14 @@ const FORMATS = [
21
22
  $: format =
22
23
  kind == 'resource' ? (resource != undefined ? `resource-${resource}` : 'resource') : undefined;
23
24
  $: pattern = patternStr == '' ? undefined : patternStr;
25
+ $: contentEncoding = kind == 'base64' ? 'base64' : undefined;
24
26
  </script>
25
27
 
26
28
  <RadioButton
27
29
  label="Kind"
28
- small={true}
29
30
  options={[
30
31
  ['None', 'none'],
32
+ ['File (base64)', 'base64'],
31
33
  ['Enum', 'enum'],
32
34
  ['Resource Path', 'resource'],
33
35
  ['Format', 'format'],
@@ -35,12 +37,14 @@ $: pattern = patternStr == '' ? undefined : patternStr;
35
37
  ]}
36
38
  bind:value={kind}
37
39
  />
40
+ <div class="my-2" />
38
41
 
39
42
  {#if kind == 'pattern'}
40
- <label class="mb-2 text-gray-700 text-xs"
43
+ <label for="input" class="mb-2 text-gray-700 text-xs"
41
44
  >Pattern (Regex)
42
45
  <div class="flex flex-row">
43
46
  <input
47
+ id="input"
44
48
  type="text"
45
49
  placeholder="^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$"
46
50
  bind:value={patternStr}
@@ -54,11 +58,11 @@ $: pattern = patternStr == '' ? undefined : patternStr;
54
58
  </div>
55
59
  </label>
56
60
  {:else if kind == 'enum'}
57
- <label class="mb-2 text-gray-700 text-xs"
61
+ <label for="input" class="mb-2 text-gray-700 text-xs"
58
62
  >Enums
59
63
  {#each enum_ ?? [] as e}
60
64
  <div class="flex flex-row max-w-md">
61
- <input type="text" bind:value={e} />
65
+ <input id="input" type="text" bind:value={e} />
62
66
  <button
63
67
  class="default-button mx-6"
64
68
  on:click={() => {
@@ -4,6 +4,7 @@ declare const __propDef: {
4
4
  pattern: string | undefined;
5
5
  enum_: string[] | undefined;
6
6
  format: string | undefined;
7
+ contentEncoding: 'base64' | 'binary' | undefined;
7
8
  };
8
9
  events: {
9
10
  [evt: string]: CustomEvent<any>;
@@ -10,7 +10,7 @@ const dispatch = createEventDispatcher();
10
10
  - the second slot should be a <tbody>, containing th elements
11
11
  -->
12
12
  <div class="flex flex-col {$$props.class} min-w-full">
13
- <div class="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8">
13
+ <div class="inline-block min-w-full py-2 align-middle">
14
14
  <table id="table-custom" class="min-w-full divide-y divide-gray-300 table-auto">
15
15
  <thead>
16
16
  <slot name="header-row" />
@@ -22,18 +22,16 @@ const dispatch = createEventDispatcher();
22
22
  <div class="flex flex-row-reverse text-gray-500 mb-6">
23
23
  <button
24
24
  class="ml-2 drop-shadow-md {showNext ? 'visible' : 'invisible'}"
25
- on:click={() => {
26
- dispatch('next')
27
- }}>Next</button
25
+ on:click={() => dispatch('next')}
28
26
  >
27
+ Next
28
+ </button>
29
29
  <button
30
30
  class="mx-2 drop-shadow-md {currentPage === 1 ? 'hidden' : ''}"
31
- on:click={() => {
32
- dispatch('previous')
33
- }}>Previous</button
31
+ on:click={() => dispatch('previous')}
34
32
  >
33
+ Previous
34
+ </button>
35
35
  </div>
36
36
  {/if}
37
37
  </div>
38
-
39
- <style></style>
@@ -10,7 +10,7 @@ const dispatch = createEventDispatcher();
10
10
  </script>
11
11
 
12
12
  <div class="mt-8 flex flex-col {$$props.class}">
13
- <div class="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8">
13
+ <div class="inline-block min-w-full align-middle">
14
14
  <table class="min-w-full divide-y divide-gray-300 table-auto">
15
15
  <thead>
16
16
  <tr class={twTextSize}>
@@ -1,15 +1,14 @@
1
1
  <script>import { createEventDispatcher } from 'svelte';
2
- export let value;
3
- export let options;
4
- let checked = options.right.value === value;
5
- const id = Date.now().toString(36);
2
+ export let options = {};
3
+ export let checked = false;
4
+ const id = (Math.random() + 1).toString(36).substring(10);
6
5
  const dispatch = createEventDispatcher();
7
6
  </script>
8
7
 
9
8
  <span>
10
9
  <label for={id} class="inline-flex items-center cursor-pointer mt-2">
11
- {#if Boolean(options.left.label)}
12
- <span class="mr-2 text-sm font-medium text-gray-900">{options.left.label}</span>
10
+ {#if Boolean(options?.left)}
11
+ <span class="mr-2 text-sm font-medium text-gray-900">{options?.left}</span>
13
12
  {/if}
14
13
  <div class="relative">
15
14
  <input
@@ -19,16 +18,15 @@ const dispatch = createEventDispatcher();
19
18
  class="sr-only peer"
20
19
  bind:checked
21
20
  on:change={() => {
22
- value = checked ? options.right.value : options.left.value
23
- dispatch('change', value)
21
+ dispatch('change', checked)
24
22
  }}
25
23
  />
26
24
  <div
27
25
  class="w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-4 peer-focus:ring-blue-300 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"
28
26
  />
29
27
  </div>
30
- {#if Boolean(options.right.label)}
31
- <span class="ml-2 text-sm font-medium text-gray-900">{options.right.label}</span>
28
+ {#if Boolean(options?.right)}
29
+ <span class="ml-2 text-sm font-medium text-gray-900">{options?.right}</span>
32
30
  {/if}
33
31
  </label>
34
32
  </span>
@@ -1,17 +1,11 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
- value: any;
5
- options: {
6
- left: {
7
- label?: string | undefined;
8
- value: any;
9
- };
10
- right: {
11
- label?: string | undefined;
12
- value: any;
13
- };
14
- };
4
+ options?: {
5
+ left?: string | undefined;
6
+ right?: string | undefined;
7
+ } | undefined;
8
+ checked?: boolean | undefined;
15
9
  };
16
10
  events: {
17
11
  change: CustomEvent<any>;
@@ -1,5 +1,5 @@
1
- <script>import Icon from 'svelte-awesome';
2
- import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
1
+ <script>import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
2
+ import Icon from 'svelte-awesome';
3
3
  import { createPopperActions } from 'svelte-popperjs';
4
4
  import { fade } from 'svelte/transition';
5
5
  const [popperRef, popperContent] = createPopperActions({
@@ -46,6 +46,7 @@ function close() {
46
46
  use:popperContent={extraOpts}
47
47
  on:mouseenter={open}
48
48
  on:mouseleave={close}
49
+ class="w-96 text-left"
49
50
  >
50
51
  <slot />
51
52
  <div id="arrow" data-popper-arrow />
@@ -7,6 +7,7 @@ import Modal from './Modal.svelte';
7
7
  import { createEventDispatcher } from 'svelte';
8
8
  import { workspaceStore } from '../stores';
9
9
  import Required from './Required.svelte';
10
+ import Tooltip from './Tooltip.svelte';
10
11
  const dispatch = createEventDispatcher();
11
12
  let path = '';
12
13
  let variable = {
@@ -120,19 +121,33 @@ async function updateVariable() {
120
121
  <label class="block pb-6">
121
122
  <input type="checkbox" bind:checked={variable.is_secret} />
122
123
  <span class="ml-2">Secret</span>
123
- </label>
124
- <div class="font-semibold text-gray-700 col-span-10 }">
125
124
  {#if variable.is_secret}
125
+ <div
126
+ class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-1 mt-1 text-sm"
127
+ role="alert"
128
+ >
129
+ When a secret, you will not be able to read this variable value from the variable editor
130
+ UI but only within scripts. <Tooltip>
131
+ Within scripts, every read of the value create the audit log:
132
+ 'variables.decrypt_secret'</Tooltip
133
+ >
134
+ </div>
135
+ {/if}
136
+ </label>
137
+ {#if variable.is_secret}
138
+ <div class="font-semibold text-gray-700 col-span-10 }">
126
139
  <Password
127
140
  bind:password={variable.value}
128
141
  placeholder={'******** (only fill to update value)'}
129
142
  label={'variable (max 3000 characters)'}
130
143
  />
131
- {:else}
132
- <span>variable (max 3000 characters)</span>
144
+ </div>
145
+ {:else}
146
+ <div>
147
+ <span>Variable (max 3000 characters)</span>
133
148
  <AutosizedTextarea bind:value={variable.value} minRows={5} />
134
- {/if}
135
- </div>
149
+ </div>
150
+ {/if}
136
151
 
137
152
  <div class="flex flex-col w-full">
138
153
  <span class="text-gray-700">Description<Required required={false} /></span>
@@ -1,10 +1,12 @@
1
- <script>import { copyFirstStepSchema, isCopyFirstStepSchemaDisabled } from './flowStore';
1
+ <script>import { Button } from 'flowbite-svelte';
2
+ import { copyFirstStepSchema, isCopyFirstStepSchemaDisabled } from './flowStore';
2
3
  </script>
3
4
 
4
- <button
5
- class="default-secondary-button-v2"
5
+ <Button
6
+ color="alternative"
7
+ size="sm"
6
8
  disabled={$isCopyFirstStepSchemaDisabled}
7
9
  on:click={copyFirstStepSchema}
8
10
  >
9
- Copy from step 1's schema
10
- </button>
11
+ Copy from first step schema
12
+ </Button>
@@ -58,7 +58,7 @@ belong to us`</code
58
58
  <li><b>params</b>: the object containing the current step static values</li>
59
59
  <li>
60
60
  <b>step(n)</b>: the function returning the result of step number n. One can also use a
61
- negative n. step(0) == flow_input , step(-1) == previous_result
61
+ negative n. step(0) == result of the first step , step(-1) == previous_result
62
62
  </li>
63
63
  <li>
64
64
  <b>variable(path)</b>: the function returning the variable (including secrets) at given path
@@ -0,0 +1,3 @@
1
+ <div class="bg-white border border-gray-300 rounded-lg w-full shadow-md">
2
+ <slot />
3
+ </div>
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} FlowBoxProps */
2
+ /** @typedef {typeof __propDef.events} FlowBoxEvents */
3
+ /** @typedef {typeof __propDef.slots} FlowBoxSlots */
4
+ export default class FlowBox extends SvelteComponentTyped<{}, {
5
+ [evt: string]: CustomEvent<any>;
6
+ }, {
7
+ default: {};
8
+ }> {
9
+ }
10
+ export type FlowBoxProps = typeof __propDef.props;
11
+ export type FlowBoxEvents = typeof __propDef.events;
12
+ export type FlowBoxSlots = typeof __propDef.slots;
13
+ import { SvelteComponentTyped } from "svelte";
14
+ declare const __propDef: {
15
+ props: {};
16
+ events: {
17
+ [evt: string]: CustomEvent<any>;
18
+ };
19
+ slots: {
20
+ default: {};
21
+ };
22
+ };
23
+ export {};
@@ -0,0 +1,9 @@
1
+ <script>export let title = undefined;
2
+ </script>
3
+
4
+ <div class="flex items-center justify-between flex-wra px-6 py-4 border-b border-gray-300">
5
+ {#if title}
6
+ <h3 class="text-lg leading-6 font-bold text-gray-900">{title}</h3>
7
+ {/if}
8
+ <slot />
9
+ </div>
@@ -0,0 +1,18 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ title?: string | undefined;
5
+ };
6
+ events: {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots: {
10
+ default: {};
11
+ };
12
+ };
13
+ export declare type FlowBoxHeaderProps = typeof __propDef.props;
14
+ export declare type FlowBoxHeaderEvents = typeof __propDef.events;
15
+ export declare type FlowBoxHeaderSlots = typeof __propDef.slots;
16
+ export default class FlowBoxHeader extends SvelteComponentTyped<FlowBoxHeaderProps, FlowBoxHeaderEvents, FlowBoxHeaderSlots> {
17
+ }
18
+ export {};
@@ -0,0 +1,20 @@
1
+ <script>import SchemaEditor from '../SchemaEditor.svelte';
2
+ import { flowStore } from './../flows/flowStore';
3
+ import CopyFirstStepSchema from './CopyFirstStepSchema.svelte';
4
+ import FlowBox from './FlowBox.svelte';
5
+ import FlowBoxHeader from './FlowBoxHeader.svelte';
6
+ </script>
7
+
8
+ <FlowBox>
9
+ <FlowBoxHeader title="Flow Inputs">
10
+ <CopyFirstStepSchema />
11
+ </FlowBoxHeader>
12
+ <div class="p-6 ">
13
+ <SchemaEditor
14
+ on:change={() => {
15
+ $flowStore = $flowStore
16
+ }}
17
+ schema={$flowStore.schema}
18
+ />
19
+ </div>
20
+ </FlowBox>
@@ -0,0 +1,14 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {};
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export declare type FlowInputProps = typeof __propDef.props;
10
+ export declare type FlowInputEvents = typeof __propDef.events;
11
+ export declare type FlowInputSlots = typeof __propDef.slots;
12
+ export default class FlowInput extends SvelteComponentTyped<FlowInputProps, FlowInputEvents, FlowInputSlots> {
13
+ }
14
+ export {};
@@ -1,4 +1,4 @@
1
- <script>import { FlowModuleValue } from '../../gen/models/FlowModuleValue';
1
+ <script>import { RawScript } from '../../gen';
2
2
  import { faCode } from '@fortawesome/free-solid-svg-icons';
3
3
  import { createEventDispatcher } from 'svelte';
4
4
  import FlowScriptPicker from './pickers/FlowScriptPicker.svelte';
@@ -15,13 +15,17 @@ const dispatch = createEventDispatcher();
15
15
  label="New Typescript {isTrigger ? 'trigger ' : ''}script (Deno)"
16
16
  icon={faCode}
17
17
  iconColor="text-blue-800"
18
- on:click={() => dispatch('new', { language: FlowModuleValue.language.DENO })}
18
+ on:click={() => dispatch('new', { language: RawScript.language.DENO })}
19
19
  />
20
+
20
21
  <FlowScriptPicker
21
22
  disabled={isTrigger}
22
23
  label="New Python {isTrigger ? 'trigger ' : ''}script (3.10)"
23
24
  icon={faCode}
24
25
  iconColor="text-yellow-500"
25
- on:click={() => dispatch('new', { language: FlowModuleValue.language.PYTHON3 })}
26
+ on:click={() => dispatch('new', { language: RawScript.language.PYTHON3 })}
27
+ tooltip={isTrigger
28
+ ? 'Python is not supported for trigger scripts yet but is supported for every other steps'
29
+ : undefined}
26
30
  />
27
31
  </div>
@@ -1,11 +1,12 @@
1
- <script>import { FlowModuleValue, Script } from '../../gen';
2
- import { getScriptByPath } from '../../utils';
1
+ <script>import { getScriptByPath } from '../../utils';
3
2
  import { faCode, faCodeBranch, faSave, faTrashAlt } from '@fortawesome/free-solid-svg-icons';
3
+ import { Button } from 'flowbite-svelte';
4
4
  import Icon from 'svelte-awesome';
5
5
  import { Highlight } from 'svelte-highlight';
6
- import { python, typescript } from 'svelte-highlight/languages';
7
- import github from 'svelte-highlight/styles/github';
6
+ import python from 'svelte-highlight/languages/python';
7
+ import typescript from 'svelte-highlight/languages/typescript';
8
8
  import Modal from '../Modal.svelte';
9
+ import FlowBoxHeader from './FlowBoxHeader.svelte';
9
10
  import { createScriptFromInlineScript, fork, removeModule } from './flowStore';
10
11
  import { scrollIntoView } from './utils';
11
12
  export let open;
@@ -16,10 +17,15 @@ let modalViewer;
16
17
  let modalViewerContent = '';
17
18
  let modalViewerLanguage = 'deno';
18
19
  async function viewCode() {
19
- const { content, language } = await getScriptByPath(mod.value.path);
20
- modalViewerContent = content;
21
- modalViewerLanguage = language;
22
- modalViewer.openModal();
20
+ if (mod.value.type == 'script') {
21
+ const { content, language } = await getScriptByPath(mod.value.path);
22
+ modalViewerContent = content;
23
+ modalViewerLanguage = language;
24
+ modalViewer.openModal();
25
+ }
26
+ else {
27
+ throw Error('Not a script');
28
+ }
23
29
  }
24
30
  function scrollTo({ target }) {
25
31
  const el = document.querySelector(target.getAttribute('href'));
@@ -27,61 +33,57 @@ function scrollTo({ target }) {
27
33
  }
28
34
  </script>
29
35
 
30
- <svelte:head>
31
- {@html github}
32
- </svelte:head>
33
-
34
- <div class="flex flex-row w-full space-x-2">
35
- <slot />
36
- <a href="#module-{i}" class="grow" on:click={() => (open = i)} on:click|preventDefault={scrollTo}
37
- ><div class="w-full" /></a
36
+ <FlowBoxHeader>
37
+ <a
38
+ href="#module-{i}"
39
+ class="grow text-inherit"
40
+ on:click={() => (open = i)}
41
+ on:click|preventDefault={scrollTo}
38
42
  >
43
+ <slot />
44
+ </a>
39
45
 
40
46
  <div class="flex flex-row space-x-2">
41
- {#if mod.value.type === FlowModuleValue.type.SCRIPT && !shouldPick}
42
- <button
43
- type="button"
47
+ {#if mod.value.type === 'script' && !shouldPick}
48
+ <Button
44
49
  on:click={() => {
45
50
  open = i
46
51
  fork(i)
47
52
  }}
48
- class="default-secondary-button-v2 text-xs"
53
+ size="sm"
54
+ color="alternative"
49
55
  >
50
- <Icon data={faCodeBranch} class={`w-4 mr-2 h-4`} />
56
+ <Icon data={faCodeBranch} class="mr-2" />
51
57
  Fork
52
- </button>
53
- <button type="button" on:click={viewCode} class="default-secondary-button-v2 text-xs">
54
- <Icon data={faCode} class="w-4 mr-2 h-4" />
58
+ </Button>
59
+ <Button size="sm" color="alternative" on:click={viewCode}>
60
+ <Icon data={faCode} class="mr-2" />
55
61
  View code
56
- </button>
62
+ </Button>
57
63
  {/if}
58
64
 
59
- {#if mod.value.type === FlowModuleValue.type.RAWSCRIPT && !shouldPick}
60
- <button
61
- type="button"
62
- on:click={() => createScriptFromInlineScript(i)}
63
- class="default-secondary-button-v2 text-sm"
64
- >
65
- <Icon data={faSave} class="w-4 mr-4" />
65
+ {#if mod.value.type === 'rawscript' && !shouldPick}
66
+ <Button size="sm" color="alternative" on:click={() => createScriptFromInlineScript(i)}>
67
+ <Icon data={faSave} class="mr-2" />
66
68
  Save to workspace
67
- </button>
69
+ </Button>
68
70
  {/if}
69
- <button
70
- type="button"
71
+ <Button
72
+ size="sm"
73
+ color="alternative"
71
74
  on:click={() => {
72
75
  open = -1
73
76
  removeModule(i)
74
77
  }}
75
- class="default-secondary-button-v2 text-xs"
76
78
  >
77
- <Icon data={faTrashAlt} class="w-4 mr-2 h-4" />
79
+ <Icon data={faTrashAlt} class="mr-2" />
78
80
  Remove step
79
- </button>
81
+ </Button>
80
82
  </div>
81
- </div>
83
+ </FlowBoxHeader>
82
84
 
83
85
  <Modal bind:this={modalViewer}>
84
- <div slot="title">Script {mod?.value.path}</div>
86
+ <div slot="title">Script {'path' in mod?.value ? mod?.value.path : ''}</div>
85
87
  <div slot="content">
86
88
  {#if modalViewerLanguage === 'python3'}
87
89
  <Highlight language={python} code={modalViewerContent} />
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import { type FlowModule } from '../../gen';
2
+ import type { FlowModule } from '../../gen';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  open: number;