windmill-components 1.52.0 → 1.55.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 (351) hide show
  1. package/components/ApiConnectForm.svelte +42 -7
  2. package/components/ApiConnectForm.svelte.d.ts +2 -1
  3. package/components/AppConnect.svelte +19 -11
  4. package/components/ArgInfo.svelte +6 -2
  5. package/components/ArgInput.svelte +9 -3
  6. package/components/ArgInput.svelte.d.ts +1 -0
  7. package/components/CenteredPage.svelte +1 -1
  8. package/components/CenteredPage.svelte.d.ts +6 -2
  9. package/components/CronInput.svelte +1 -1
  10. package/components/DisplayResult.svelte +39 -2
  11. package/components/Dropdown.svelte +73 -100
  12. package/components/Dropdown.svelte.d.ts +1 -3
  13. package/components/Editor.svelte +16 -5
  14. package/components/EditorBar.svelte +69 -63
  15. package/components/EditorBar.svelte.d.ts +1 -0
  16. package/components/FlowBuilder.svelte +74 -68
  17. package/components/FlowGraphViewer.svelte +136 -34
  18. package/components/FlowGraphViewer.svelte.d.ts +1 -0
  19. package/components/FlowJobResult.svelte +6 -1
  20. package/components/FlowJobResult.svelte.d.ts +2 -0
  21. package/components/FlowMetadata.svelte +4 -2
  22. package/components/FlowPreviewContent.svelte +10 -23
  23. package/components/FlowPreviewContent.svelte.d.ts +3 -0
  24. package/components/FlowStatusViewer.svelte +155 -30
  25. package/components/FlowStatusViewer.svelte.d.ts +4 -2
  26. package/components/FlowViewer.svelte +5 -5
  27. package/components/FlowViewer.svelte.d.ts +1 -0
  28. package/components/HighlightCode.svelte +1 -1
  29. package/components/HighlightCode.svelte.d.ts +1 -0
  30. package/components/IconedPath.svelte +16 -6
  31. package/components/IconedPath.svelte.d.ts +2 -0
  32. package/components/IconedResourceType.svelte +5 -2
  33. package/components/InputTransformForm.svelte +92 -73
  34. package/components/InviteGlobalUser.svelte +2 -2
  35. package/components/InviteGlobalUser.svelte.d.ts +1 -1
  36. package/components/InviteUser.svelte +20 -6
  37. package/components/InviteUser.svelte.d.ts +1 -1
  38. package/components/ItemPicker.svelte +38 -27
  39. package/components/ItemPicker.svelte.d.ts +2 -1
  40. package/components/JobStatus.svelte +19 -13
  41. package/components/LogViewer.svelte +11 -3
  42. package/components/LogViewer.svelte.d.ts +1 -0
  43. package/components/ModuleStatus.svelte +38 -0
  44. package/components/ModuleStatus.svelte.d.ts +18 -0
  45. package/components/ObjectResourceInput.svelte +8 -52
  46. package/components/ObjectResourceInput.svelte.d.ts +0 -1
  47. package/components/Path.svelte +2 -2
  48. package/components/Path.svelte.d.ts +1 -1
  49. package/components/Popover.svelte +7 -1
  50. package/components/Popover.svelte.d.ts +3 -1
  51. package/components/ResourceEditor.svelte +57 -29
  52. package/components/ResourcePicker.svelte +12 -2
  53. package/components/RunForm.svelte +1 -1
  54. package/components/SchemaEditor.svelte +2 -1
  55. package/components/SchemaForm.svelte +2 -1
  56. package/components/SchemaForm.svelte.d.ts +1 -0
  57. package/components/SchemaModal.svelte +11 -10
  58. package/components/ScriptBuilder.svelte +207 -192
  59. package/components/ScriptBuilder.svelte.d.ts +1 -1
  60. package/components/ScriptEditor.svelte +49 -45
  61. package/components/ScriptEditor.svelte.d.ts +1 -0
  62. package/components/ScriptPicker.svelte.d.ts +1 -1
  63. package/components/ScriptSchema.svelte +11 -30
  64. package/components/ScriptSchema.svelte.d.ts +0 -1
  65. package/components/SharedBadge.svelte +2 -3
  66. package/components/SimpleEditor.svelte +6 -7
  67. package/components/SimpleEditor.svelte.d.ts +1 -0
  68. package/components/Star.svelte +2 -2
  69. package/components/SuperadminSettings.svelte +9 -38
  70. package/components/TableSimple.svelte +1 -1
  71. package/components/TestJobLoader.svelte +20 -8
  72. package/components/ToggleHubWorkspace.svelte +16 -0
  73. package/components/ToggleHubWorkspace.svelte.d.ts +16 -0
  74. package/components/Tooltip.svelte.d.ts +1 -1
  75. package/components/VariableEditor.svelte +22 -9
  76. package/components/apps/CreateApp.svelte +5 -2
  77. package/components/apps/CreateApp.svelte.d.ts +1 -1
  78. package/components/apps/components/DisplayComponent.svelte +7 -14
  79. package/components/apps/components/DisplayComponent.svelte.d.ts +3 -2
  80. package/components/apps/components/buttons/AppButton.svelte +34 -27
  81. package/components/apps/components/buttons/AppButton.svelte.d.ts +6 -6
  82. package/components/apps/components/dataDisplay/AppBarChart.svelte +33 -9
  83. package/components/apps/components/dataDisplay/AppBarChart.svelte.d.ts +3 -5
  84. package/components/apps/components/dataDisplay/AppPieChart.svelte +33 -12
  85. package/components/apps/components/dataDisplay/AppPieChart.svelte.d.ts +3 -5
  86. package/components/apps/components/dataDisplay/AppTable.svelte +27 -30
  87. package/components/apps/components/dataDisplay/AppTable.svelte.d.ts +4 -8
  88. package/components/apps/components/dataDisplay/AppText.svelte +16 -9
  89. package/components/apps/components/dataDisplay/AppText.svelte.d.ts +3 -2
  90. package/components/apps/components/dataDisplay/app.md +49 -0
  91. package/components/apps/components/form/AppForm.svelte +50 -0
  92. package/components/apps/components/form/AppForm.svelte.d.ts +25 -0
  93. package/components/apps/components/helpers/AlignWrapper.svelte +2 -1
  94. package/components/apps/components/helpers/AlignWrapper.svelte.d.ts +1 -0
  95. package/components/apps/components/helpers/DebouncedInput.svelte +9 -1
  96. package/components/apps/components/helpers/DebouncedInput.svelte.d.ts +2 -1
  97. package/components/apps/components/helpers/InputValue.svelte +15 -6
  98. package/components/apps/components/helpers/InputValue.svelte.d.ts +2 -2
  99. package/components/apps/components/helpers/NonRunnableComponent.svelte +20 -0
  100. package/components/apps/components/helpers/NonRunnableComponent.svelte.d.ts +21 -0
  101. package/components/apps/components/helpers/RunnableComponent.svelte +36 -30
  102. package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +6 -7
  103. package/components/apps/components/helpers/RunnableWrapper.svelte +32 -0
  104. package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +26 -0
  105. package/components/apps/components/numberInputs/AppNumberInput.svelte +36 -0
  106. package/components/apps/components/numberInputs/AppNumberInput.svelte.d.ts +20 -0
  107. package/components/apps/components/selectInputs/AppCheckbox.svelte +4 -2
  108. package/components/apps/components/selectInputs/AppCheckbox.svelte.d.ts +2 -2
  109. package/components/apps/components/textInputs/AppTextInput.svelte +21 -0
  110. package/components/apps/components/textInputs/AppTextInput.svelte.d.ts +20 -0
  111. package/components/apps/editor/AppEditor.svelte +66 -55
  112. package/components/apps/editor/AppEditorHeader.svelte +4 -4
  113. package/components/apps/editor/AppPreview.svelte +42 -0
  114. package/components/apps/editor/AppPreview.svelte.d.ts +17 -0
  115. package/components/apps/editor/ComponentEditor.svelte +41 -20
  116. package/components/apps/editor/ComponentEditor.svelte.d.ts +2 -0
  117. package/components/apps/editor/ComponentHeader.svelte +28 -0
  118. package/components/apps/editor/ComponentHeader.svelte.d.ts +20 -0
  119. package/components/apps/editor/GridEditor.svelte +54 -5
  120. package/components/apps/editor/GridEditor.svelte.d.ts +1 -1
  121. package/components/apps/editor/RecomputeAllComponents.svelte +28 -0
  122. package/components/apps/editor/RecomputeAllComponents.svelte.d.ts +14 -0
  123. package/components/apps/editor/componentsPanel/ComponentList.svelte +94 -26
  124. package/components/apps/editor/componentsPanel/ComponentList.svelte.d.ts +1 -1
  125. package/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +2 -6
  126. package/components/apps/editor/componentsPanel/componentDefaultProps.js +1 -5
  127. package/components/apps/editor/componentsPanel/componentStaticValues.d.ts +2 -0
  128. package/components/apps/editor/componentsPanel/componentStaticValues.js +3 -1
  129. package/components/apps/editor/componentsPanel/data.js +191 -76
  130. package/components/apps/editor/contextPanel/ContextPanel.svelte +56 -48
  131. package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte +67 -0
  132. package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte.d.ts +55 -0
  133. package/components/apps/editor/settingsPanel/ComponentPanel.svelte +154 -129
  134. package/components/apps/editor/settingsPanel/ConnectedInputEditor.svelte +70 -0
  135. package/components/apps/editor/settingsPanel/ConnectedInputEditor.svelte.d.ts +17 -0
  136. package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +6 -6
  137. package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte.d.ts +2 -2
  138. package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +55 -87
  139. package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte.d.ts +3 -4
  140. package/components/apps/editor/settingsPanel/PickFlow.svelte +3 -2
  141. package/components/apps/editor/settingsPanel/PickFlow.svelte.d.ts +1 -1
  142. package/components/apps/editor/settingsPanel/PickInlineScript.svelte +3 -3
  143. package/components/apps/editor/settingsPanel/Recompute.svelte +46 -0
  144. package/components/apps/editor/settingsPanel/Recompute.svelte.d.ts +17 -0
  145. package/components/apps/editor/settingsPanel/StaticInputEditor.svelte +31 -14
  146. package/components/apps/editor/settingsPanel/StaticInputEditor.svelte.d.ts +3 -3
  147. package/components/apps/editor/settingsPanel/SubTypeEditor.svelte +17 -0
  148. package/components/apps/editor/settingsPanel/SubTypeEditor.svelte.d.ts +19 -0
  149. package/components/apps/editor/settingsPanel/TableActionLabel.svelte +10 -0
  150. package/components/apps/editor/settingsPanel/TableActionLabel.svelte.d.ts +17 -0
  151. package/components/apps/editor/settingsPanel/TableActions.svelte +13 -9
  152. package/components/apps/editor/settingsPanel/UserInputEditor.svelte.d.ts +1 -1
  153. package/components/apps/editor/settingsPanel/common/PanelSection.svelte +3 -2
  154. package/components/apps/editor/settingsPanel/common/PanelSection.svelte.d.ts +1 -0
  155. package/components/apps/editor/settingsPanel/mainInput/InlineScriptList.svelte +53 -0
  156. package/components/apps/editor/settingsPanel/mainInput/InlineScriptList.svelte.d.ts +21 -0
  157. package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +98 -0
  158. package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte.d.ts +18 -0
  159. package/components/apps/editor/settingsPanel/mainInput/WorkspaceFlowList.svelte +81 -0
  160. package/components/apps/editor/settingsPanel/mainInput/WorkspaceFlowList.svelte.d.ts +20 -0
  161. package/components/apps/editor/settingsPanel/mainInput/WorkspaceScriptList.svelte +81 -0
  162. package/components/apps/editor/settingsPanel/mainInput/WorkspaceScriptList.svelte.d.ts +20 -0
  163. package/components/apps/inputType.d.ts +62 -0
  164. package/components/apps/inputType.js +1 -0
  165. package/components/apps/rx.d.ts +4 -4
  166. package/components/apps/rx.js +16 -4
  167. package/components/apps/types.d.ts +20 -54
  168. package/components/apps/utils.d.ts +11 -34
  169. package/components/apps/utils.js +54 -18
  170. package/components/common/alert/Alert.svelte +2 -1
  171. package/components/common/alert/Alert.svelte.d.ts +1 -0
  172. package/components/common/button/Button.svelte +1 -1
  173. package/components/common/confirmationModal/UnsavedConfirmationModal.svelte.d.ts +1 -1
  174. package/components/common/drawer/DrawerContent.svelte +23 -22
  175. package/components/common/drawer/DrawerContent.svelte.d.ts +1 -3
  176. package/components/common/kbd/Kbd.svelte.d.ts +2 -2
  177. package/components/common/languageIcons/LanguageIcon.svelte +4 -2
  178. package/components/common/languageIcons/LanguageIcon.svelte.d.ts +1 -1
  179. package/components/common/menu/Menu.svelte +0 -1
  180. package/components/common/menu/MenuItem.svelte.d.ts +6 -2
  181. package/components/common/popup/Popup.svelte +0 -13
  182. package/components/common/popup/Popup.svelte.d.ts +0 -4
  183. package/components/common/table/AppRow.svelte +42 -26
  184. package/components/common/table/AppRow.svelte.d.ts +1 -1
  185. package/components/common/table/FlowRow.svelte +54 -49
  186. package/components/common/table/LanguageBadge.svelte +1 -1
  187. package/components/common/table/Row.svelte +27 -16
  188. package/components/common/table/Row.svelte.d.ts +2 -1
  189. package/components/common/table/RowIcon.svelte +13 -8
  190. package/components/common/table/ScriptRow.svelte +65 -57
  191. package/components/common/table/Table.svelte.d.ts +6 -2
  192. package/components/flows/CreateActionsFlow.svelte +14 -41
  193. package/components/flows/CreateActionsFlow.svelte.d.ts +1 -1
  194. package/components/flows/common/FlowCardHeader.svelte +7 -8
  195. package/components/flows/content/BranchPredicateEditor.svelte +30 -0
  196. package/components/flows/content/BranchPredicateEditor.svelte.d.ts +23 -0
  197. package/components/flows/content/CapturePayload.svelte +12 -8
  198. package/components/flows/content/DynamicInputHelpBox.svelte.d.ts +1 -1
  199. package/components/flows/content/FlowBranchAllWrapper.svelte +2 -2
  200. package/components/flows/content/FlowBranchOneWrapper.svelte +4 -36
  201. package/components/flows/content/FlowBranchesAllWrapper.svelte +91 -0
  202. package/components/flows/content/FlowBranchesAllWrapper.svelte.d.ts +18 -0
  203. package/components/flows/content/FlowBranchesOneWrapper.svelte +88 -0
  204. package/components/flows/content/FlowBranchesOneWrapper.svelte.d.ts +18 -0
  205. package/components/flows/content/FlowFailureModule.svelte.d.ts +1 -1
  206. package/components/flows/content/FlowInput.svelte +1 -2
  207. package/components/flows/content/FlowInput.svelte.d.ts +1 -1
  208. package/components/flows/content/FlowInputs.svelte +28 -26
  209. package/components/flows/content/FlowInputsFlow.svelte +101 -0
  210. package/components/flows/content/FlowInputsFlow.svelte.d.ts +20 -0
  211. package/components/flows/content/FlowLoop.svelte +10 -3
  212. package/components/flows/content/FlowModuleComponent.svelte +46 -35
  213. package/components/flows/content/FlowModuleEarlyStop.svelte +4 -3
  214. package/components/flows/content/FlowModuleHeader.svelte +22 -21
  215. package/components/flows/content/FlowModuleHeader.svelte.d.ts +1 -0
  216. package/components/flows/content/FlowModuleSleep.svelte +69 -0
  217. package/components/flows/content/FlowModuleSleep.svelte.d.ts +18 -0
  218. package/components/flows/content/FlowModuleSuspend.svelte +5 -63
  219. package/components/flows/content/FlowModuleSuspend.svelte.d.ts +0 -1
  220. package/components/flows/content/FlowModuleWrapper.svelte +59 -35
  221. package/components/flows/content/FlowPathViewer.svelte +20 -0
  222. package/components/flows/content/FlowPathViewer.svelte.d.ts +17 -0
  223. package/components/flows/content/FlowSchedules.svelte.d.ts +1 -1
  224. package/components/flows/content/FlowSettings.svelte +11 -13
  225. package/components/flows/flowState.js +2 -2
  226. package/components/flows/flowStateUtils.d.ts +7 -3
  227. package/components/flows/flowStateUtils.js +29 -8
  228. package/components/flows/header/FlowImportExportMenu.svelte.d.ts +1 -1
  229. package/components/flows/header/FlowPreviewButtons.svelte +17 -11
  230. package/components/flows/header/FlowPreviewButtons.svelte.d.ts +1 -1
  231. package/components/flows/map/FlowErrorHandlerItem.svelte +5 -5
  232. package/components/flows/map/FlowErrorHandlerItem.svelte.d.ts +1 -1
  233. package/components/flows/map/FlowInputsItem.svelte.d.ts +1 -1
  234. package/components/flows/map/FlowModuleSchemaItem.svelte +30 -11
  235. package/components/flows/map/FlowModuleSchemaMap.svelte +26 -20
  236. package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +1 -1
  237. package/components/flows/map/FlowSettingsItem.svelte +1 -1
  238. package/components/flows/map/FlowSettingsItem.svelte.d.ts +1 -1
  239. package/components/flows/map/InsertModuleButton.svelte +20 -4
  240. package/components/flows/map/InsertModuleButton.svelte.d.ts +1 -1
  241. package/components/flows/map/MapItem.svelte +11 -5
  242. package/components/flows/pickers/FlowScriptPicker.svelte.d.ts +1 -1
  243. package/components/flows/pickers/PickHubFlow.svelte +72 -0
  244. package/components/flows/pickers/PickHubFlow.svelte.d.ts +20 -0
  245. package/components/flows/pickers/PickHubScript.svelte +65 -56
  246. package/components/flows/pickers/PickHubScript.svelte.d.ts +3 -1
  247. package/components/flows/pickers/PickScript.svelte +2 -2
  248. package/components/flows/pickers/WorkspaceScriptPicker.svelte +79 -19
  249. package/components/flows/pickers/WorkspaceScriptPicker.svelte.d.ts +5 -1
  250. package/components/flows/previousResults.d.ts +1 -0
  251. package/components/flows/previousResults.js +2 -1
  252. package/components/flows/propPicker/PropPickerWrapper.svelte +9 -1
  253. package/components/flows/utils.d.ts +0 -1
  254. package/components/flows/utils.js +6 -6
  255. package/components/graph/FlowGraph.svelte +121 -55
  256. package/components/graph/FlowGraph.svelte.d.ts +3 -2
  257. package/components/graph/model.d.ts +46 -1
  258. package/components/home/ItemsList.svelte +265 -0
  259. package/components/home/ItemsList.svelte.d.ts +16 -0
  260. package/components/home/ListFilters.svelte +37 -0
  261. package/components/home/ListFilters.svelte.d.ts +18 -0
  262. package/components/home/NoItemFound.svelte +6 -0
  263. package/components/home/NoItemFound.svelte.d.ts +23 -0
  264. package/components/icons/DatadogIcon.svelte +48 -0
  265. package/components/icons/DatadogIcon.svelte.d.ts +17 -0
  266. package/components/icons/FunkwhaleIcon.svelte +90 -0
  267. package/components/icons/FunkwhaleIcon.svelte.d.ts +17 -0
  268. package/components/icons/GdocsIcon.svelte +9 -0
  269. package/components/icons/GdocsIcon.svelte.d.ts +17 -0
  270. package/components/icons/HubspotIcon.svelte +9 -0
  271. package/components/icons/HubspotIcon.svelte.d.ts +17 -0
  272. package/components/icons/LinkedinIcon.svelte +9 -0
  273. package/components/icons/LinkedinIcon.svelte.d.ts +17 -0
  274. package/components/icons/Mail.svelte +9 -53
  275. package/components/icons/Mysql.svelte +8 -8
  276. package/components/icons/NextcloudIcon.svelte +9 -0
  277. package/components/icons/NextcloudIcon.svelte.d.ts +17 -0
  278. package/components/icons/QRCodeIcon.svelte +5 -0
  279. package/components/icons/QRCodeIcon.svelte.d.ts +16 -0
  280. package/components/icons/SendflakeIcon.svelte +15 -0
  281. package/components/icons/SendflakeIcon.svelte.d.ts +17 -0
  282. package/components/icons/StripeIcon.svelte +9 -0
  283. package/components/icons/StripeIcon.svelte.d.ts +17 -0
  284. package/components/icons/TelegramIcon.svelte +9 -0
  285. package/components/icons/TelegramIcon.svelte.d.ts +17 -0
  286. package/components/icons/WindmillIcon.svelte +3 -3
  287. package/components/icons/index.d.ts +23 -1
  288. package/components/icons/index.js +23 -1
  289. package/components/jobs/JobDetail.svelte +2 -2
  290. package/components/preview/FlowPreviewStatus.svelte +12 -23
  291. package/components/propertyPicker/PropPicker.svelte +16 -0
  292. package/components/propertyPicker/PropPickerResult.svelte +2 -3
  293. package/components/propertyPicker/WarningMessage.svelte.d.ts +6 -2
  294. package/components/scriptEditor/LogPanel.svelte +11 -4
  295. package/components/scripts/CreateActionsScript.svelte +13 -59
  296. package/components/scripts/CreateActionsScript.svelte.d.ts +1 -1
  297. package/components/sidebar/FavoriteMenu.svelte +52 -0
  298. package/components/sidebar/FavoriteMenu.svelte.d.ts +21 -0
  299. package/components/sidebar/SidebarContent.svelte +10 -19
  300. package/components/sidebar/SidebarContent.svelte.d.ts +0 -4
  301. package/components/sidebar/UserMenu.svelte +21 -4
  302. package/components/sidebar/WorkspaceMenu.svelte +6 -7
  303. package/editorUtils.d.ts +2 -0
  304. package/editorUtils.js +3 -1
  305. package/gen/core/OpenAPI.js +1 -1
  306. package/gen/index.d.ts +1 -0
  307. package/gen/models/CompletedJob.d.ts +1 -0
  308. package/gen/models/CreateWorkspace.d.ts +0 -1
  309. package/gen/models/EditWorkspaceUser.d.ts +2 -0
  310. package/gen/models/FlowModuleValue.d.ts +2 -1
  311. package/gen/models/FlowStatus.d.ts +3 -1
  312. package/gen/models/FlowStatusModule.d.ts +1 -1
  313. package/gen/models/FlowStatusModule.js +1 -1
  314. package/gen/models/Identity.d.ts +1 -0
  315. package/gen/models/ListableResource.d.ts +1 -0
  316. package/gen/models/ListableVariable.d.ts +1 -0
  317. package/gen/models/PathFlow.d.ts +6 -0
  318. package/gen/models/PathFlow.js +4 -0
  319. package/gen/models/PathScript.d.ts +1 -0
  320. package/gen/models/QueuedJob.d.ts +1 -0
  321. package/gen/models/Schedule.d.ts +2 -0
  322. package/gen/models/Usage.d.ts +1 -3
  323. package/gen/models/WorkspaceInvite.d.ts +1 -0
  324. package/gen/services/AppService.d.ts +7 -1
  325. package/gen/services/AppService.js +2 -1
  326. package/gen/services/JobService.d.ts +35 -5
  327. package/gen/services/JobService.js +14 -5
  328. package/gen/services/OauthService.d.ts +1 -1
  329. package/gen/services/ResourceService.d.ts +6 -2
  330. package/gen/services/ResourceService.js +2 -1
  331. package/gen/services/UserService.d.ts +6 -0
  332. package/gen/services/UserService.js +11 -0
  333. package/gen/services/WorkspaceService.d.ts +35 -0
  334. package/gen/services/WorkspaceService.js +41 -0
  335. package/package.json +461 -422
  336. package/script_helpers.d.ts +2 -1
  337. package/script_helpers.js +20 -3
  338. package/scripts.d.ts +1 -0
  339. package/scripts.js +8 -1
  340. package/stores.d.ts +11 -2
  341. package/stores.js +24 -6
  342. package/utils.d.ts +3 -1
  343. package/utils.js +11 -4
  344. package/components/ButtonAndDropdown.svelte +0 -25
  345. package/components/ButtonAndDropdown.svelte.d.ts +0 -23
  346. package/components/apps/components/index.d.ts +0 -22
  347. package/components/apps/components/index.js +0 -42
  348. package/components/apps/editor/settingsPanel/DynamicInputEditor.svelte +0 -64
  349. package/components/apps/editor/settingsPanel/DynamicInputEditor.svelte.d.ts +0 -17
  350. package/components/flows/content/FlowBranchesWrapper.svelte +0 -140
  351. package/components/flows/content/FlowBranchesWrapper.svelte.d.ts +0 -19
@@ -1,66 +1,39 @@
1
1
  <script>import { goto } from '$app/navigation';
2
- import { faPlus } from '@fortawesome/free-solid-svg-icons';
3
- import Fuse from 'fuse.js';
4
- import { loadHubFlows } from '../../utils';
2
+ import { faBarsStaggered, faPlus } from '@fortawesome/free-solid-svg-icons';
5
3
  import { Button, ButtonPopup, ButtonPopupItem } from '../common';
6
- import ItemPicker from '../ItemPicker.svelte';
7
4
  import Drawer from '../common/drawer/Drawer.svelte';
8
5
  import DrawerContent from '../common/drawer/DrawerContent.svelte';
9
6
  import SimpleEditor from '../SimpleEditor.svelte';
10
7
  import { flowStore, initFlow } from './flowStore';
11
- let hubFlows = undefined;
12
- const drawers = {
13
- hub: undefined,
14
- json: undefined
15
- };
8
+ import { Icon } from 'svelte-awesome';
9
+ let drawer = undefined;
16
10
  let pendingJson;
17
- let hubFilter = '';
18
- const flowHubFuse = new Fuse([], {
19
- includeScore: false,
20
- keys: ['summary']
21
- });
22
- $: filteredHubFlows =
23
- hubFilter.length > 0 ? flowHubFuse.search(hubFilter).map((value) => value.item) : hubFlows ?? [];
24
11
  async function importJson() {
25
12
  await goto('/flows/add');
26
13
  Object.assign($flowStore, JSON.parse(pendingJson));
27
14
  initFlow($flowStore);
28
- drawers.json?.closeDrawer();
29
- }
30
- async function loadHubFlowsWFuse() {
31
- hubFlows = await loadHubFlows();
32
- flowHubFuse.setCollection(hubFlows ?? []);
15
+ drawer?.closeDrawer?.();
33
16
  }
34
17
  </script>
35
18
 
36
19
  <!-- Buttons -->
37
20
  <div class="flex flex-row gap-2">
38
21
  <ButtonPopup size="sm" spacingSize="xl" startIcon={{ icon: faPlus }} href="/flows/add">
39
- <svelte:fragment slot="main">New Flow</svelte:fragment>
40
- <ButtonPopupItem on:click={() => drawers.json?.toggleDrawer()}>
22
+ <svelte:fragment slot="main"
23
+ >New Flow <Icon data={faBarsStaggered} scale={0.8} class="ml-1.5" />
24
+ </svelte:fragment>
25
+ <ButtonPopupItem on:click={() => drawer?.toggleDrawer?.()}>
41
26
  Import from raw JSON
42
27
  </ButtonPopupItem>
43
28
  </ButtonPopup>
44
29
  </div>
45
30
 
46
- <!-- WindmillHub script list -->
47
- <ItemPicker
48
- bind:this={drawers.hub}
49
- pickCallback={(path) => {
50
- goto('/flows/add?hub=' + path)
51
- }}
52
- itemName={'Flow'}
53
- extraField="summary"
54
- loadItems={async () => {
55
- await loadHubFlowsWFuse()
56
- return filteredHubFlows.map((x) => ({ ...x, path: x.flow_id }))
57
- }}
58
- />
59
-
60
31
  <!-- Raw JSON -->
61
- <Drawer bind:this={drawers.json} size="800px">
62
- <DrawerContent title="Import flow from JSON" on:close={() => drawers.json?.toggleDrawer()}>
63
- <SimpleEditor bind:code={pendingJson} lang="json" class="h-full" />
64
- <span slot="submission"><Button size="sm" on:click={importJson}>Import</Button></span>
32
+ <Drawer bind:this={drawer} size="800px">
33
+ <DrawerContent title="Import flow from JSON" on:close={() => drawer?.toggleDrawer?.()}>
34
+ <SimpleEditor bind:code={pendingJson} lang="json" class="h-full" fixedOverflowWidgets={false} />
35
+ <svelte:fragment slot="actions">
36
+ <Button size="sm" on:click={importJson}>Import</Button>
37
+ </svelte:fragment>
65
38
  </DrawerContent>
66
39
  </Drawer>
@@ -1,6 +1,6 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
- props: {};
3
+ props: Record<string, never>;
4
4
  events: {
5
5
  [evt: string]: CustomEvent<any>;
6
6
  };
@@ -1,10 +1,9 @@
1
1
  <script>import Badge from '../../common/badge/Badge.svelte';
2
2
  import IconedPath from '../../IconedPath.svelte';
3
3
  import { RawScript } from '../../../gen';
4
- import { isEmptyFlowModule } from '../utils';
4
+ import { truncateHash } from '../../../utils';
5
5
  export let flowModule = undefined;
6
6
  export let title = undefined;
7
- $: shouldPick = flowModule && isEmptyFlowModule(flowModule);
8
7
  const languageColors = {
9
8
  [RawScript.language.GO]: 'dark-indigo',
10
9
  [RawScript.language.DENO]: 'dark-blue',
@@ -17,18 +16,18 @@ const languageColors = {
17
16
  class="flex items-center justify-between py-2 px-4 border-b border-gray-300 space-x-2 h-full max-h-12 flex-nowrap"
18
17
  >
19
18
  {#if flowModule}
20
- <span class="text-sm w-full">
19
+ <span class="text-sm w-full mr-4">
21
20
  <div class="flex items-center space-x-2">
22
- {#if shouldPick}
23
- <span class="font-bold text-xs">Select a step kind</span>
21
+ {#if flowModule.value.type === 'identity'}
22
+ <span class="font-bold text-xs">Identity (input copied to output)</span>
24
23
  {:else if flowModule?.value.type === 'rawscript'}
25
24
  <Badge color={languageColors[flowModule?.value.language] ?? 'gray'} capitalize>
26
25
  {flowModule?.value.language}
27
26
  </Badge>
28
- <input bind:value={flowModule.summary} placeholder={'Summary'} />
27
+ <input bind:value={flowModule.summary} placeholder={'Summary'} class="w-full grow" />
29
28
  {:else if flowModule?.value.type === 'script' && 'path' in flowModule.value && flowModule.value.path}
30
- <IconedPath path={flowModule.value.path} />
31
- <input bind:value={flowModule.summary} placeholder="Summary" class="ml-2" />
29
+ <IconedPath path={flowModule.value.path} hash={flowModule.value.hash} class="grow" />
30
+ <input bind:value={flowModule.summary} placeholder="Summary" class="w-full grow" />
32
31
  {/if}
33
32
  </div>
34
33
  </span>
@@ -0,0 +1,30 @@
1
+ <script>import { getContext } from 'svelte';
2
+ import { flowStore } from '../flowStore';
3
+ import PropPickerWrapper from '../propPicker/PropPickerWrapper.svelte';
4
+ import SimpleEditor from '../../SimpleEditor.svelte';
5
+ import { flowStateStore } from '../flowState';
6
+ import { getStepPropPicker } from '../previousResults';
7
+ export let branch;
8
+ export let parentModule;
9
+ export let previousModule;
10
+ const { previewArgs } = getContext('FlowEditorContext');
11
+ let editor = undefined;
12
+ $: stepPropPicker = getStepPropPicker($flowStateStore, parentModule, previousModule, parentModule.id, $flowStore, $previewArgs, false, true);
13
+ </script>
14
+
15
+ <PropPickerWrapper
16
+ notSelectable
17
+ pickableProperties={stepPropPicker.pickableProperties}
18
+ on:select={({ detail }) => {
19
+ editor?.insertAtCursor(detail)
20
+ }}
21
+ >
22
+ <SimpleEditor
23
+ bind:this={editor}
24
+ lang="javascript"
25
+ bind:code={branch.expr}
26
+ class="small-editor"
27
+ shouldBindKey={false}
28
+ extraLib={stepPropPicker.extraLib}
29
+ />
30
+ </PropPickerWrapper>
@@ -0,0 +1,23 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { FlowModule } from '../../../gen';
3
+ declare const __propDef: {
4
+ props: {
5
+ branch: {
6
+ summary?: string;
7
+ expr: string;
8
+ modules: Array<FlowModule>;
9
+ };
10
+ parentModule: FlowModule;
11
+ previousModule: FlowModule | undefined;
12
+ };
13
+ events: {
14
+ [evt: string]: CustomEvent<any>;
15
+ };
16
+ slots: {};
17
+ };
18
+ export type BranchPredicateEditorProps = typeof __propDef.props;
19
+ export type BranchPredicateEditorEvents = typeof __propDef.events;
20
+ export type BranchPredicateEditorSlots = typeof __propDef.slots;
21
+ export default class BranchPredicateEditor extends SvelteComponentTyped<BranchPredicateEditorProps, BranchPredicateEditorEvents, BranchPredicateEditorSlots> {
22
+ }
23
+ export {};
@@ -84,24 +84,28 @@ async function getCaptureInput() {
84
84
  <div class="box p-2 my-2 mb-4">
85
85
  <ObjectViewer topBrackets={true} json={captureInput} />
86
86
  </div>
87
- <div class="flex flex-row-reverse gap-2" slot="submission">
87
+ <svelte:fragment slot="actions">
88
88
  <Button
89
89
  size="sm"
90
+ variant="border"
90
91
  on:click={() => {
91
92
  $previewArgs = captureInput
92
- $flowStore.schema = jsonSchema
93
- sendUserToast('Copied as flow inputs and test args')
94
- }}>Copy as flow inputs and test args</Button
93
+ sendUserToast('Copied as test args')
94
+ }}
95
95
  >
96
+ Copy only as test args
97
+ </Button>
96
98
  <Button
97
99
  size="sm"
98
- variant="border"
99
100
  on:click={() => {
100
101
  $previewArgs = captureInput
101
- sendUserToast('Copied as test args')
102
- }}>Copy only as test args</Button
102
+ $flowStore.schema = jsonSchema
103
+ sendUserToast('Copied as flow inputs and test args')
104
+ }}
103
105
  >
104
- </div>
106
+ Copy as flow inputs and test args
107
+ </Button>
108
+ </svelte:fragment>
105
109
  <h3 class="mt-2">Derived inputs schema</h3>
106
110
  <div class="box p-2">
107
111
  <SchemaViewer schema={jsonSchema} />
@@ -1,6 +1,6 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
- props: {};
3
+ props: Record<string, never>;
4
4
  events: {
5
5
  [evt: string]: CustomEvent<any>;
6
6
  };
@@ -9,11 +9,11 @@ export let branch;
9
9
  <input bind:value={branch.summary} placeholder={'Summary'} />
10
10
  </div>
11
11
  <div class="p-4">
12
- <div class="mt-6 mb-2 text-sm font-bold">Skip failures</div>
12
+ <div class="mt-2 mb-2 text-sm font-bold">Skip failures</div>
13
13
  <Toggle
14
14
  bind:checked={branch.skip_failure}
15
15
  options={{
16
- right: 'Skip failure'
16
+ right: 'Skip failures'
17
17
  }}
18
18
  />
19
19
  </div>
@@ -1,17 +1,8 @@
1
- <script>import { getContext } from 'svelte';
2
- import FlowCard from '../common/FlowCard.svelte';
3
- import { flowStore } from '../flowStore';
4
- import PropPickerWrapper from '../propPicker/PropPickerWrapper.svelte';
5
- import SimpleEditor from '../../SimpleEditor.svelte';
6
- import { flowStateStore } from '../flowState';
7
- import { Pane, Splitpanes } from 'svelte-splitpanes';
8
- import { getStepPropPicker } from '../previousResults';
1
+ <script>import FlowCard from '../common/FlowCard.svelte';
2
+ import BranchPredicateEditor from './BranchPredicateEditor.svelte';
9
3
  export let branch;
10
4
  export let parentModule;
11
5
  export let previousModule;
12
- const { previewArgs } = getContext('FlowEditorContext');
13
- let editor = undefined;
14
- $: stepPropPicker = getStepPropPicker($flowStateStore, parentModule, previousModule, parentModule.id, $flowStore, $previewArgs, false, true);
15
6
  </script>
16
7
 
17
8
  <div class="h-full flex flex-col">
@@ -20,31 +11,8 @@ $: stepPropPicker = getStepPropPicker($flowStateStore, parentModule, previousMod
20
11
  <input bind:value={branch.summary} placeholder={'Summary'} />
21
12
  </div>
22
13
  <div class="overflow-hidden flex-grow">
23
- <Splitpanes>
24
- <Pane>
25
- <div class="p-6 flex flex-col h-full overflow-clip">
26
- <span class="mb-2 text-sm font-bold">Branch predicate</span>
27
- <div class="border w-full">
28
- <PropPickerWrapper
29
- notSelectable
30
- pickableProperties={stepPropPicker.pickableProperties}
31
- on:select={({ detail }) => {
32
- editor?.insertAtCursor(detail)
33
- }}
34
- >
35
- <SimpleEditor
36
- bind:this={editor}
37
- lang="javascript"
38
- bind:code={branch.expr}
39
- class="small-editor"
40
- shouldBindKey={false}
41
- extraLib={stepPropPicker.extraLib}
42
- />
43
- </PropPickerWrapper>
44
- </div>
45
- </div>
46
- </Pane>
47
- </Splitpanes>
14
+ <h3 class="p-2">Predicate expression</h3>
15
+ <BranchPredicateEditor {branch} {parentModule} {previousModule} />
48
16
  </div>
49
17
  </FlowCard>
50
18
  </div>
@@ -0,0 +1,91 @@
1
+ <script>import { Alert, Badge, Button, Tab } from '../../common';
2
+ import TabContent from '../../common/tabs/TabContent.svelte';
3
+ import Tabs from '../../common/tabs/Tabs.svelte';
4
+ import Toggle from '../../Toggle.svelte';
5
+ import FlowCard from '../common/FlowCard.svelte';
6
+ import FlowModuleEarlyStop from './FlowModuleEarlyStop.svelte';
7
+ import FlowModuleSleep from './FlowModuleSleep.svelte';
8
+ import FlowModuleSuspend from './FlowModuleSuspend.svelte';
9
+ // import FlowRetries from './FlowRetries.svelte'
10
+ export let flowModule;
11
+ export let previousModule;
12
+ let value = flowModule.value;
13
+ $: value = flowModule.value;
14
+ let selected = 'early-stop';
15
+ </script>
16
+
17
+ <div class="h-full flex flex-col w-full">
18
+ <FlowCard title={value.type == 'branchall' ? 'Run all branches' : 'Run one branch'}>
19
+ <div class="flex flex-col h-full w-full">
20
+ <div class="border w-full">
21
+ <Alert notRounded type="info" title="All branches will be run">
22
+ The result of this step is the list of the result of each branch.
23
+ </Alert>
24
+
25
+ <div class="p-4 mt-4 w-full">
26
+ <h3 class="mb-4">{value.branches.length} branch{value.branches.length > 1 ? 'es' : ''}</h3
27
+ >
28
+ <div class="flex flex-col gap-y-4 py-2 w-full max-w-xl">
29
+ {#each value.branches as branch, i}
30
+ <div class="flex flex-row gap-x-4 w-full">
31
+ <div class="grow">
32
+ <input type="text" bind:value={branch.summary} placeholder="Summary" />
33
+ </div>
34
+ <div class="w-min-sm">
35
+ <Toggle
36
+ bind:checked={branch.skip_failure}
37
+ options={{
38
+ right: 'Skip failure'
39
+ }}
40
+ />
41
+ </div>
42
+ </div>
43
+ {/each}
44
+ </div>
45
+ <div class="mt-6 mb-2 text-sm font-bold">Run in parallel</div>
46
+ <Toggle
47
+ bind:checked={value.parallel}
48
+ options={{
49
+ right: 'All branches run in parallel'
50
+ }}
51
+ />
52
+ </div>
53
+ </div>
54
+ {#if flowModule}
55
+ <Tabs bind:selected>
56
+ <!-- <Tab value="retries">Retries</Tab> -->
57
+ <Tab value="early-stop">Early Stop/Break</Tab>
58
+ <Tab value="suspend">Suspend</Tab>
59
+ <Tab value="sleep">Sleep</Tab>
60
+
61
+ <svelte:fragment slot="content">
62
+ <div class="overflow-hidden bg-white">
63
+ <!-- <TabContent value="retries" class="flex flex-col flex-1 h-full">
64
+ <div class="p-4 overflow-y-auto">
65
+ <FlowRetries bind:flowModule />
66
+ </div>
67
+ </TabContent> -->
68
+
69
+ <TabContent value="early-stop" class="flex flex-col flex-1 h-full">
70
+ <div class="p-4 overflow-y-auto">
71
+ <FlowModuleEarlyStop bind:flowModule />
72
+ </div>
73
+ </TabContent>
74
+
75
+ <TabContent value="suspend" class="flex flex-col flex-1 h-full">
76
+ <div class="p-4 overflow-y-auto">
77
+ <FlowModuleSuspend bind:flowModule />
78
+ </div>
79
+ </TabContent>
80
+ <TabContent value="sleep" class="flex flex-col flex-1 h-full">
81
+ <div class="p-4 overflow-y-auto">
82
+ <FlowModuleSleep previousModuleId={previousModule?.id} bind:flowModule />
83
+ </div>
84
+ </TabContent>
85
+ </div>
86
+ </svelte:fragment>
87
+ </Tabs>
88
+ {/if}
89
+ </div>
90
+ </FlowCard>
91
+ </div>
@@ -0,0 +1,18 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { FlowModule } from '../../../gen';
3
+ declare const __propDef: {
4
+ props: {
5
+ flowModule: FlowModule;
6
+ previousModule: FlowModule | undefined;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {};
12
+ };
13
+ export type FlowBranchesAllWrapperProps = typeof __propDef.props;
14
+ export type FlowBranchesAllWrapperEvents = typeof __propDef.events;
15
+ export type FlowBranchesAllWrapperSlots = typeof __propDef.slots;
16
+ export default class FlowBranchesAllWrapper extends SvelteComponentTyped<FlowBranchesAllWrapperProps, FlowBranchesAllWrapperEvents, FlowBranchesAllWrapperSlots> {
17
+ }
18
+ export {};
@@ -0,0 +1,88 @@
1
+ <script>import { Alert, Badge, Button, Tab } from '../../common';
2
+ import TabContent from '../../common/tabs/TabContent.svelte';
3
+ import Tabs from '../../common/tabs/Tabs.svelte';
4
+ import FlowCard from '../common/FlowCard.svelte';
5
+ import BranchPredicateEditor from './BranchPredicateEditor.svelte';
6
+ import FlowModuleEarlyStop from './FlowModuleEarlyStop.svelte';
7
+ import FlowModuleSleep from './FlowModuleSleep.svelte';
8
+ import FlowModuleSuspend from './FlowModuleSuspend.svelte';
9
+ // import FlowRetries from './FlowRetries.svelte'
10
+ export let flowModule;
11
+ export let previousModule;
12
+ let value = flowModule.value;
13
+ $: value = flowModule.value;
14
+ let selected = 'early-stop';
15
+ </script>
16
+
17
+ <div class="h-full">
18
+ <FlowCard title="Run one branch">
19
+ <div class="flex flex-col h-full overflow-auto">
20
+ <div class="border">
21
+ <Alert notRounded type="info" title="Only one branch will be run">
22
+ The result of this step is the result of the branch.
23
+ </Alert>
24
+
25
+ <div class="p-2">
26
+ <h3 class="my-4"
27
+ >{value.branches.length + 1} branch{value.branches.length + 1 > 1 ? 'es' : ''}</h3
28
+ >
29
+ <div class="flex flex-col gap-y-4 py-2">
30
+ <div class="flex flex-row gap-2 text-sm border border-gray-400 p-2">
31
+ <Badge large={true} color="blue">Default branch</Badge>
32
+ <p class="italic text-gray-600"
33
+ >If none of the predicates' expressions evaluated in-order match, this branch is
34
+ chosen</p
35
+ >
36
+ </div>
37
+ {#each value.branches as branch, i}
38
+ <div class="flex flex-col gap-x-2 p-2 items-center border border-gray-400">
39
+ <input
40
+ class="w-full"
41
+ type="text"
42
+ bind:value={branch.summary}
43
+ placeholder="Summary"
44
+ />
45
+ <BranchPredicateEditor {branch} parentModule={flowModule} {previousModule} />
46
+ </div>
47
+ {/each}
48
+ </div>
49
+ </div>
50
+ </div>
51
+ {#if flowModule}
52
+ <Tabs bind:selected>
53
+ <!-- <Tab value="retries">Retries</Tab> -->
54
+ <Tab value="early-stop">Early Stop/Break</Tab>
55
+ <Tab value="suspend">Suspend</Tab>
56
+ <Tab value="sleep">Sleep</Tab>
57
+
58
+ <svelte:fragment slot="content">
59
+ <div class="overflow-hidden bg-white">
60
+ <!-- <TabContent value="retries" class="flex flex-col flex-1 h-full">
61
+ <div class="p-4 overflow-y-auto">
62
+ <FlowRetries bind:flowModule />
63
+ </div>
64
+ </TabContent> -->
65
+
66
+ <TabContent value="early-stop" class="flex flex-col flex-1 h-full">
67
+ <div class="p-4 overflow-y-auto">
68
+ <FlowModuleEarlyStop bind:flowModule />
69
+ </div>
70
+ </TabContent>
71
+
72
+ <TabContent value="suspend" class="flex flex-col flex-1 h-full">
73
+ <div class="p-4 overflow-y-auto">
74
+ <FlowModuleSuspend bind:flowModule />
75
+ </div>
76
+ </TabContent>
77
+ <TabContent value="sleep" class="flex flex-col flex-1 h-full">
78
+ <div class="p-4 overflow-y-auto">
79
+ <FlowModuleSleep previousModuleId={previousModule?.id} bind:flowModule />
80
+ </div>
81
+ </TabContent>
82
+ </div>
83
+ </svelte:fragment>
84
+ </Tabs>
85
+ {/if}
86
+ </div>
87
+ </FlowCard>
88
+ </div>
@@ -0,0 +1,18 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { FlowModule } from '../../../gen';
3
+ declare const __propDef: {
4
+ props: {
5
+ flowModule: FlowModule;
6
+ previousModule: FlowModule | undefined;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {};
12
+ };
13
+ export type FlowBranchesOneWrapperProps = typeof __propDef.props;
14
+ export type FlowBranchesOneWrapperEvents = typeof __propDef.events;
15
+ export type FlowBranchesOneWrapperSlots = typeof __propDef.slots;
16
+ export default class FlowBranchesOneWrapper extends SvelteComponentTyped<FlowBranchesOneWrapperProps, FlowBranchesOneWrapperEvents, FlowBranchesOneWrapperSlots> {
17
+ }
18
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
- props: {};
3
+ props: Record<string, never>;
4
4
  events: {
5
5
  [evt: string]: CustomEvent<any>;
6
6
  };
@@ -3,7 +3,6 @@ import SchemaEditor from '../../SchemaEditor.svelte';
3
3
  import SchemaForm from '../../SchemaForm.svelte';
4
4
  import FlowCard from '../common/FlowCard.svelte';
5
5
  import { copyFirstStepSchema, flowStore } from '../flowStore';
6
- import { isEmptyFlowModule } from '../utils';
7
6
  import CapturePayload from './CapturePayload.svelte';
8
7
  let capturePayload;
9
8
  </script>
@@ -26,7 +25,7 @@ let capturePayload;
26
25
  color="dark"
27
26
  size="sm"
28
27
  disabled={$flowStore.value.modules.length === 0 ||
29
- isEmptyFlowModule($flowStore.value.modules[0])}
28
+ $flowStore.value.modules[0].value.type == 'identity'}
30
29
  on:click={copyFirstStepSchema}
31
30
  >
32
31
  First step's inputs
@@ -1,6 +1,6 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
- props: {};
3
+ props: Record<string, never>;
4
4
  events: {
5
5
  [evt: string]: CustomEvent<any>;
6
6
  };
@@ -1,8 +1,8 @@
1
1
  <script>import { ToggleButton, ToggleButtonGroup } from '../../common';
2
- import WindmillIcon from '../../icons/WindmillIcon.svelte';
2
+ import ToggleHubWorkspace from '../../ToggleHubWorkspace.svelte';
3
3
  import Tooltip from '../../Tooltip.svelte';
4
4
  import { RawScript, Script } from '../../../gen';
5
- import { faBolt, faBuilding, faCheck, faCode } from '@fortawesome/free-solid-svg-icons';
5
+ import { faBolt, faCheck, faCode } from '@fortawesome/free-solid-svg-icons';
6
6
  import { createEventDispatcher } from 'svelte';
7
7
  import FlowScriptPicker from '../pickers/FlowScriptPicker.svelte';
8
8
  import PickHubScript from '../pickers/PickHubScript.svelte';
@@ -21,11 +21,14 @@ let filter = '';
21
21
  <div class="max-w-min">
22
22
  <ToggleButtonGroup bind:selected={kind}>
23
23
  <ToggleButton position="left" value="script" size="sm" startIcon={{ icon: faCode }}>
24
- Common
24
+ Common &nbsp;<Tooltip>
25
+ A common script is simply a script that is neither a trigger nor an approval script.
26
+ Those are the majority of the scripts.
27
+ </Tooltip>
25
28
  </ToggleButton>
26
29
  {#if !shouldDisableTriggerScripts}
27
30
  <ToggleButton position="center" value="trigger" size="sm" startIcon={{ icon: faBolt }}>
28
- Trigger <Tooltip>
31
+ Trigger &nbsp;<Tooltip>
29
32
  Used as a first step most commonly with a state and a schedule to watch for changes
30
33
  on an external system, compute the diff since last time, set the new state. The
31
34
  diffs are then treated one by one with a for-loop.
@@ -33,22 +36,22 @@ let filter = '';
33
36
  </ToggleButton>
34
37
  {/if}
35
38
  <ToggleButton position="right" value="approval" size="sm" startIcon={{ icon: faCheck }}>
36
- Approval <Tooltip>
39
+ Approval &nbsp;<Tooltip>
37
40
  An approval step will suspend the execution of a flow until it has been approved
38
41
  through the resume endpoints or the approval page by and solely by the recipients of
39
- those secret urls. Use getResumeEndpoints from the wmill client to generate those
40
- URLs.
42
+ those secret urls. Use `wmill.getResumeUrls()` in Typescript or
43
+ `wmill.get_resume_urls()` in Python from the wmill client to generate those URLs.
41
44
  </Tooltip>
42
45
  </ToggleButton>
43
46
  </ToggleButtonGroup>
44
47
  </div>
45
48
  </div>
46
49
  {/if}
47
- <h3 class="pb-2">
48
- Inline new
50
+ <h3 class="pb-2 pt-4">
51
+ Inline new <span class="text-blue-500">{kind == 'script' ? 'common' : kind}</span> script
49
52
  <Tooltip>
50
53
  Embed a script directly inside a flow instead of saving the script into your workspace for
51
- reuse. You can always save an inline script later.
54
+ reuse. You can always save an inline script to your workspace later.
52
55
  </Tooltip>
53
56
  </h3>
54
57
  <div class="flex flex-row">
@@ -111,29 +114,28 @@ let filter = '';
111
114
  on:click={() =>
112
115
  dispatch('new', { language: RawScript.language.DENO, kind, subkind: 'pgsql' })}
113
116
  />
117
+
118
+ <FlowScriptPicker
119
+ label={`MySQL`}
120
+ lang="mysql"
121
+ on:click={() =>
122
+ dispatch('new', { language: RawScript.language.DENO, kind, subkind: 'mysql' })}
123
+ />
114
124
  {/if}
115
125
  {/if}
116
126
  </div>
117
127
  </div>
118
128
 
119
- <div class="flex flex-row gap-x-2 mt-8 mb-2"
120
- ><h3>Use pre-made</h3>
121
- <div class="max-w-min">
122
- <ToggleButtonGroup bind:selected={pick_existing}>
123
- <ToggleButton position="left" value="hub" size="xs">
124
- <WindmillIcon white={pick_existing == 'hub'} height="16px" width="16px" /><div
125
- class="mr-1"
126
- />Hub
127
- </ToggleButton>
128
- <ToggleButton position="right" value="workspace" size="xs" startIcon={{ icon: faBuilding }}>
129
- Workspace
130
- </ToggleButton>
131
- </ToggleButtonGroup>
132
- </div></div
129
+ <h3 class="mb-2 mt-6"
130
+ >Use pre-made <span class="text-blue-500">{kind == 'script' ? 'common' : kind}</span> script</h3
133
131
  >
134
132
  {#if pick_existing == 'hub'}
135
- <PickHubScript bind:filter {kind} on:pick />
133
+ <PickHubScript bind:filter {kind} on:pick>
134
+ <ToggleHubWorkspace bind:selected={pick_existing} />
135
+ </PickHubScript>
136
136
  {:else}
137
- <WorkspaceScriptPicker bind:filter {kind} on:pick />
137
+ <WorkspaceScriptPicker displayLock bind:filter {kind} on:pick>
138
+ <ToggleHubWorkspace bind:selected={pick_existing} />
139
+ </WorkspaceScriptPicker>
138
140
  {/if}
139
141
  </div>