windmill-components 1.46.3 → 1.52.0

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 (496) hide show
  1. package/common.d.ts +6 -5
  2. package/components/ApiConnectForm.svelte +21 -0
  3. package/components/ApiConnectForm.svelte.d.ts +18 -0
  4. package/components/AppConnect.svelte +229 -174
  5. package/components/AppConnect.svelte.d.ts +4 -3
  6. package/components/ArgInfo.svelte +2 -2
  7. package/components/ArgInfo.svelte.d.ts +3 -3
  8. package/components/ArgInput.svelte +82 -28
  9. package/components/ArgInput.svelte.d.ts +10 -3
  10. package/components/Badge.svelte.d.ts +3 -3
  11. package/components/Button.svelte +1 -1
  12. package/components/Button.svelte.d.ts +3 -3
  13. package/components/ButtonAndDropdown.svelte.d.ts +3 -3
  14. package/components/CenteredModal.svelte +20 -13
  15. package/components/CenteredModal.svelte.d.ts +3 -3
  16. package/components/ChevronButton.svelte.d.ts +3 -3
  17. package/components/CollapseLink.svelte.d.ts +3 -3
  18. package/components/CronInput.svelte +1 -1
  19. package/components/CronInput.svelte.d.ts +3 -3
  20. package/components/DisplayResult.svelte.d.ts +3 -3
  21. package/components/Dropdown.svelte +13 -7
  22. package/components/Dropdown.svelte.d.ts +3 -3
  23. package/components/Editor.svelte +3 -2
  24. package/components/Editor.svelte.d.ts +4 -3
  25. package/components/EditorBar.svelte +34 -38
  26. package/components/EditorBar.svelte.d.ts +3 -3
  27. package/components/FieldHeader.svelte +4 -3
  28. package/components/FieldHeader.svelte.d.ts +3 -3
  29. package/components/FlowBuilder.svelte +37 -14
  30. package/components/FlowBuilder.svelte.d.ts +4 -3
  31. package/components/FlowGraphViewer.svelte +76 -0
  32. package/components/FlowGraphViewer.svelte.d.ts +23 -0
  33. package/components/FlowJobResult.svelte.d.ts +3 -3
  34. package/components/FlowMetadata.svelte.d.ts +3 -3
  35. package/components/FlowPreviewContent.svelte +54 -64
  36. package/components/FlowPreviewContent.svelte.d.ts +3 -3
  37. package/components/FlowStatusViewer.svelte +156 -106
  38. package/components/FlowStatusViewer.svelte.d.ts +5 -4
  39. package/components/FlowViewer.svelte +3 -78
  40. package/components/FlowViewer.svelte.d.ts +3 -3
  41. package/components/GroupModal.svelte.d.ts +3 -3
  42. package/components/HighlightCode.svelte.d.ts +3 -3
  43. package/components/IconedPath.svelte.d.ts +3 -3
  44. package/components/IconedResourceType.svelte +3 -61
  45. package/components/IconedResourceType.svelte.d.ts +3 -3
  46. package/components/InputTransformForm.svelte +108 -77
  47. package/components/InputTransformForm.svelte.d.ts +10 -5
  48. package/components/InputTransformsViewer.svelte.d.ts +3 -3
  49. package/components/InviteGlobalUser.svelte.d.ts +3 -3
  50. package/components/InviteUser.svelte.d.ts +3 -3
  51. package/components/ItemPicker.svelte +77 -29
  52. package/components/ItemPicker.svelte.d.ts +6 -4
  53. package/components/JobArgs.svelte +5 -5
  54. package/components/JobArgs.svelte.d.ts +3 -3
  55. package/components/JobStatus.svelte.d.ts +3 -3
  56. package/components/LogViewer.svelte +19 -4
  57. package/components/LogViewer.svelte.d.ts +3 -3
  58. package/components/Modal.svelte.d.ts +3 -3
  59. package/components/ModulePreview.svelte +8 -0
  60. package/components/ModulePreview.svelte.d.ts +3 -3
  61. package/components/ObjectResourceInput.svelte +37 -21
  62. package/components/ObjectResourceInput.svelte.d.ts +4 -3
  63. package/components/ObjectTypeNarrowing.svelte.d.ts +3 -3
  64. package/components/PageHeader.svelte +2 -2
  65. package/components/PageHeader.svelte.d.ts +3 -3
  66. package/components/Password.svelte +2 -2
  67. package/components/Password.svelte.d.ts +4 -4
  68. package/components/Path.svelte +4 -1
  69. package/components/Path.svelte.d.ts +5 -4
  70. package/components/Popover.svelte.d.ts +3 -3
  71. package/components/RadioButton.svelte.d.ts +3 -3
  72. package/components/Required.svelte.d.ts +3 -3
  73. package/components/ResourceEditor.svelte +73 -163
  74. package/components/ResourceEditor.svelte.d.ts +3 -5
  75. package/components/ResourcePicker.svelte +33 -30
  76. package/components/ResourcePicker.svelte.d.ts +3 -3
  77. package/components/ResourceTypePicker.svelte.d.ts +3 -3
  78. package/components/RunChart.svelte.d.ts +3 -3
  79. package/components/RunForm.svelte.d.ts +3 -3
  80. package/components/SchemaEditor.svelte +55 -23
  81. package/components/SchemaEditor.svelte.d.ts +3 -3
  82. package/components/SchemaEditorProperty.svelte.d.ts +3 -3
  83. package/components/SchemaForm.svelte +97 -33
  84. package/components/SchemaForm.svelte.d.ts +8 -4
  85. package/components/SchemaModal.svelte.d.ts +4 -4
  86. package/components/SchemaViewer.svelte.d.ts +3 -3
  87. package/components/ScriptBuilder.svelte +64 -66
  88. package/components/ScriptBuilder.svelte.d.ts +3 -3
  89. package/components/ScriptEditor.svelte +26 -28
  90. package/components/ScriptEditor.svelte.d.ts +4 -3
  91. package/components/ScriptPicker.svelte +28 -38
  92. package/components/ScriptPicker.svelte.d.ts +4 -3
  93. package/components/ScriptSchema.svelte +1 -1
  94. package/components/ScriptSchema.svelte.d.ts +3 -3
  95. package/components/SearchItems.svelte +29 -0
  96. package/components/SearchItems.svelte.d.ts +23 -0
  97. package/components/ShareModal.svelte.d.ts +3 -3
  98. package/components/SharedBadge.svelte +4 -2
  99. package/components/SharedBadge.svelte.d.ts +3 -3
  100. package/components/SimpleEditor.svelte +33 -7
  101. package/components/SimpleEditor.svelte.d.ts +4 -4
  102. package/components/Star.svelte +42 -0
  103. package/components/Star.svelte.d.ts +19 -0
  104. package/components/StringTypeNarrowing.svelte.d.ts +3 -3
  105. package/components/SuperadminSettings.svelte +18 -15
  106. package/components/SuperadminSettings.svelte.d.ts +3 -3
  107. package/components/TableCustom.svelte +1 -1
  108. package/components/TableCustom.svelte.d.ts +3 -3
  109. package/components/TableSimple.svelte.d.ts +3 -3
  110. package/components/TestJobLoader.svelte +41 -24
  111. package/components/TestJobLoader.svelte.d.ts +9 -3
  112. package/components/Toggle.svelte.d.ts +3 -3
  113. package/components/Tooltip.svelte.d.ts +3 -3
  114. package/components/UserSettings.svelte.d.ts +3 -3
  115. package/components/VariableEditor.svelte +71 -32
  116. package/components/VariableEditor.svelte.d.ts +5 -3
  117. package/components/apps/CreateApp.svelte +65 -0
  118. package/components/apps/CreateApp.svelte.d.ts +14 -0
  119. package/components/apps/components/DisplayComponent.svelte +23 -0
  120. package/components/apps/components/DisplayComponent.svelte.d.ts +19 -0
  121. package/components/apps/components/buttons/AppButton.svelte +42 -0
  122. package/components/apps/components/buttons/AppButton.svelte.d.ts +25 -0
  123. package/components/apps/components/dataDisplay/AppBarChart.svelte +18 -0
  124. package/components/apps/components/dataDisplay/AppBarChart.svelte.d.ts +23 -0
  125. package/components/apps/components/dataDisplay/AppPieChart.svelte +22 -0
  126. package/components/apps/components/dataDisplay/AppPieChart.svelte.d.ts +23 -0
  127. package/components/apps/components/dataDisplay/AppTable.svelte +135 -0
  128. package/components/apps/components/dataDisplay/AppTable.svelte.d.ts +27 -0
  129. package/components/apps/components/dataDisplay/AppText.svelte +15 -0
  130. package/components/apps/components/dataDisplay/AppText.svelte.d.ts +21 -0
  131. package/components/apps/components/helpers/AlignWrapper.svelte +29 -0
  132. package/components/apps/components/helpers/AlignWrapper.svelte.d.ts +19 -0
  133. package/components/apps/components/helpers/DebouncedInput.svelte +16 -0
  134. package/components/apps/components/helpers/DebouncedInput.svelte.d.ts +19 -0
  135. package/components/apps/components/helpers/InputValue.svelte +37 -0
  136. package/components/apps/components/helpers/InputValue.svelte.d.ts +18 -0
  137. package/components/apps/components/helpers/RunnableComponent.svelte +182 -0
  138. package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +28 -0
  139. package/components/apps/components/index.d.ts +22 -0
  140. package/components/apps/components/index.js +42 -0
  141. package/components/apps/components/selectInputs/AppCheckbox.svelte +26 -0
  142. package/components/apps/components/selectInputs/AppCheckbox.svelte.d.ts +22 -0
  143. package/components/apps/editor/AppEditor.svelte +105 -0
  144. package/components/apps/editor/AppEditor.svelte.d.ts +19 -0
  145. package/components/apps/editor/AppEditorHeader.svelte +75 -0
  146. package/components/apps/editor/AppEditorHeader.svelte.d.ts +19 -0
  147. package/components/apps/editor/ComponentEditor.svelte +64 -0
  148. package/components/apps/editor/ComponentEditor.svelte.d.ts +18 -0
  149. package/components/apps/editor/GridEditor.svelte +45 -0
  150. package/components/apps/editor/GridEditor.svelte.d.ts +14 -0
  151. package/components/apps/editor/componentsPanel/ComponentList.svelte +92 -0
  152. package/components/apps/editor/componentsPanel/ComponentList.svelte.d.ts +14 -0
  153. package/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +7 -0
  154. package/components/apps/editor/componentsPanel/componentDefaultProps.js +9 -0
  155. package/components/apps/editor/componentsPanel/componentStaticValues.d.ts +4 -0
  156. package/components/apps/editor/componentsPanel/componentStaticValues.js +6 -0
  157. package/components/apps/editor/componentsPanel/data.d.ts +3 -0
  158. package/components/apps/editor/componentsPanel/data.js +158 -0
  159. package/components/apps/editor/componentsPanel/store.d.ts +9 -0
  160. package/components/apps/editor/componentsPanel/store.js +16 -0
  161. package/components/apps/editor/contextPanel/ComponentOutputViewer.svelte +22 -0
  162. package/components/apps/editor/contextPanel/ComponentOutputViewer.svelte.d.ts +19 -0
  163. package/components/apps/editor/contextPanel/ContextPanel.svelte +184 -0
  164. package/components/apps/editor/contextPanel/ContextPanel.svelte.d.ts +16 -0
  165. package/components/apps/editor/contextPanel/InlineScriptCreationPanel.svelte +29 -0
  166. package/components/apps/editor/contextPanel/InlineScriptCreationPanel.svelte.d.ts +16 -0
  167. package/components/apps/editor/settingsPanel/ComponentPanel.svelte +196 -0
  168. package/components/apps/editor/settingsPanel/ComponentPanel.svelte.d.ts +18 -0
  169. package/components/apps/editor/settingsPanel/DynamicInputEditor.svelte +64 -0
  170. package/components/apps/editor/settingsPanel/DynamicInputEditor.svelte.d.ts +17 -0
  171. package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +11 -0
  172. package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte.d.ts +18 -0
  173. package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +99 -0
  174. package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte.d.ts +20 -0
  175. package/components/apps/editor/settingsPanel/PickFlow.svelte +37 -0
  176. package/components/apps/editor/settingsPanel/PickFlow.svelte.d.ts +16 -0
  177. package/components/apps/editor/settingsPanel/PickInlineScript.svelte +38 -0
  178. package/components/apps/editor/settingsPanel/PickInlineScript.svelte.d.ts +20 -0
  179. package/components/apps/editor/settingsPanel/SectionPanel.svelte +70 -0
  180. package/components/apps/editor/settingsPanel/SectionPanel.svelte.d.ts +19 -0
  181. package/components/apps/editor/settingsPanel/StaticInputEditor.svelte +29 -0
  182. package/components/apps/editor/settingsPanel/StaticInputEditor.svelte.d.ts +18 -0
  183. package/components/apps/editor/settingsPanel/TableActions.svelte +107 -0
  184. package/components/apps/editor/settingsPanel/TableActions.svelte.d.ts +19 -0
  185. package/components/apps/editor/settingsPanel/UserInputEditor.svelte +2 -0
  186. package/components/apps/editor/settingsPanel/UserInputEditor.svelte.d.ts +14 -0
  187. package/components/apps/editor/settingsPanel/common/PanelSection.svelte +11 -0
  188. package/components/apps/editor/settingsPanel/common/PanelSection.svelte.d.ts +19 -0
  189. package/components/apps/gridUtils.d.ts +11 -0
  190. package/components/apps/gridUtils.js +24 -0
  191. package/components/apps/rx.d.ts +27 -0
  192. package/components/apps/rx.js +87 -0
  193. package/components/apps/types.d.ts +120 -0
  194. package/components/apps/types.js +1 -0
  195. package/components/apps/utils.d.ts +36 -0
  196. package/components/apps/utils.js +96 -0
  197. package/components/common/actionRow/ActionRow.svelte.d.ts +3 -3
  198. package/components/common/alert/Alert.svelte +29 -7
  199. package/components/common/alert/Alert.svelte.d.ts +4 -3
  200. package/components/common/alert/model.d.ts +1 -1
  201. package/components/common/badge/Badge.svelte +3 -7
  202. package/components/common/badge/Badge.svelte.d.ts +6 -4
  203. package/components/common/badge/model.d.ts +2 -2
  204. package/components/common/breadcrumb/Breadcrumb.svelte.d.ts +3 -3
  205. package/components/common/button/Button.svelte +24 -6
  206. package/components/common/button/Button.svelte.d.ts +6 -4
  207. package/components/common/button/ButtonPopup.svelte +3 -1
  208. package/components/common/button/ButtonPopup.svelte.d.ts +5 -4
  209. package/components/common/button/ButtonPopupItem.svelte.d.ts +3 -3
  210. package/components/common/button/model.d.ts +2 -1
  211. package/components/common/button/model.js +2 -1
  212. package/components/common/confirmationModal/ConfirmationModal.svelte.d.ts +3 -3
  213. package/components/common/confirmationModal/UnsavedConfirmationModal.svelte.d.ts +3 -3
  214. package/components/common/drawer/Drawer.svelte +5 -1
  215. package/components/common/drawer/Drawer.svelte.d.ts +3 -3
  216. package/components/common/drawer/DrawerContent.svelte +11 -3
  217. package/components/common/drawer/DrawerContent.svelte.d.ts +5 -3
  218. package/components/common/languageIcons/LanguageIcon.svelte +6 -4
  219. package/components/common/languageIcons/LanguageIcon.svelte.d.ts +4 -4
  220. package/components/common/menu/Menu.svelte +7 -5
  221. package/components/common/menu/Menu.svelte.d.ts +7 -6
  222. package/components/common/menu/MenuItem.svelte +1 -0
  223. package/components/common/popup/Popup.svelte.d.ts +3 -3
  224. package/components/common/skeleton/Skeleton.svelte.d.ts +3 -3
  225. package/components/common/skeleton/SkeletonElement.svelte.d.ts +3 -3
  226. package/components/common/skeleton/model.d.ts +4 -4
  227. package/components/common/table/AppRow.svelte +61 -0
  228. package/components/common/table/AppRow.svelte.d.ts +23 -0
  229. package/components/common/table/FlowRow.svelte +136 -0
  230. package/components/common/table/FlowRow.svelte.d.ts +25 -0
  231. package/components/common/table/LanguageBadge.svelte +32 -0
  232. package/components/common/table/LanguageBadge.svelte.d.ts +24 -0
  233. package/components/common/table/Row.svelte +47 -0
  234. package/components/common/table/Row.svelte.d.ts +27 -0
  235. package/components/common/table/RowIcon.svelte +23 -0
  236. package/components/common/table/RowIcon.svelte.d.ts +16 -0
  237. package/components/common/table/ScriptRow.svelte +147 -0
  238. package/components/common/table/ScriptRow.svelte.d.ts +25 -0
  239. package/components/common/table/Table.svelte +9 -0
  240. package/components/common/table/Table.svelte.d.ts +23 -0
  241. package/components/common/tabs/Tab.svelte +15 -4
  242. package/components/common/tabs/Tab.svelte.d.ts +5 -3
  243. package/components/common/tabs/TabContent.svelte.d.ts +3 -3
  244. package/components/common/tabs/Tabs.svelte +5 -1
  245. package/components/common/tabs/Tabs.svelte.d.ts +4 -4
  246. package/components/common/toggleButton/ToggleButton.svelte +12 -9
  247. package/components/common/toggleButton/ToggleButton.svelte.d.ts +6 -4
  248. package/components/common/toggleButton/ToggleButtonGroup.svelte +12 -19
  249. package/components/common/toggleButton/ToggleButtonGroup.svelte.d.ts +10 -8
  250. package/components/flows/CreateActionsFlow.svelte +66 -0
  251. package/components/flows/CreateActionsFlow.svelte.d.ts +14 -0
  252. package/components/flows/FlowEditor.svelte +22 -5
  253. package/components/flows/FlowEditor.svelte.d.ts +4 -3
  254. package/components/flows/FlowProgressBar.svelte.d.ts +3 -3
  255. package/components/flows/common/FlowCard.svelte.d.ts +3 -3
  256. package/components/flows/common/FlowCardHeader.svelte +3 -1
  257. package/components/flows/common/FlowCardHeader.svelte.d.ts +3 -3
  258. package/components/flows/content/CapturePayload.svelte.d.ts +3 -3
  259. package/components/flows/content/DynamicInputHelpBox.svelte +2 -32
  260. package/components/flows/content/DynamicInputHelpBox.svelte.d.ts +4 -6
  261. package/components/flows/content/FlowBranchAllWrapper.svelte.d.ts +3 -3
  262. package/components/flows/content/FlowBranchOneWrapper.svelte +3 -2
  263. package/components/flows/content/FlowBranchOneWrapper.svelte.d.ts +3 -3
  264. package/components/flows/content/FlowBranchesWrapper.svelte +2 -2
  265. package/components/flows/content/FlowBranchesWrapper.svelte.d.ts +3 -3
  266. package/components/flows/content/FlowEditorPanel.svelte +2 -0
  267. package/components/flows/content/FlowEditorPanel.svelte.d.ts +3 -3
  268. package/components/flows/content/FlowFailureModule.svelte.d.ts +3 -3
  269. package/components/flows/content/FlowInput.svelte +9 -12
  270. package/components/flows/content/FlowInput.svelte.d.ts +3 -3
  271. package/components/flows/content/FlowInputs.svelte +119 -140
  272. package/components/flows/content/FlowInputs.svelte.d.ts +4 -7
  273. package/components/flows/content/FlowLoop.svelte +3 -2
  274. package/components/flows/content/FlowLoop.svelte.d.ts +3 -3
  275. package/components/flows/content/FlowModuleComponent.svelte +49 -45
  276. package/components/flows/content/FlowModuleComponent.svelte.d.ts +3 -3
  277. package/components/flows/content/FlowModuleEarlyStop.svelte +3 -2
  278. package/components/flows/content/FlowModuleEarlyStop.svelte.d.ts +3 -3
  279. package/components/flows/content/FlowModuleHeader.svelte +6 -3
  280. package/components/flows/content/FlowModuleHeader.svelte.d.ts +3 -3
  281. package/components/flows/content/FlowModuleScript.svelte.d.ts +3 -3
  282. package/components/flows/content/FlowModuleSuspend.svelte +9 -3
  283. package/components/flows/content/FlowModuleSuspend.svelte.d.ts +3 -3
  284. package/components/flows/content/FlowModuleWrapper.svelte +0 -22
  285. package/components/flows/content/FlowModuleWrapper.svelte.d.ts +3 -3
  286. package/components/flows/content/FlowRetries.svelte.d.ts +3 -3
  287. package/components/flows/content/FlowSchedules.svelte.d.ts +3 -3
  288. package/components/flows/content/FlowSettings.svelte +88 -93
  289. package/components/flows/content/FlowSettings.svelte.d.ts +3 -3
  290. package/components/flows/content/RemoveStepConfirmationModal.svelte.d.ts +3 -3
  291. package/components/flows/flowState.d.ts +2 -2
  292. package/components/flows/flowStateUtils.d.ts +1 -0
  293. package/components/flows/flowStateUtils.js +13 -2
  294. package/components/flows/flowStore.d.ts +1 -1
  295. package/components/flows/flowStore.js +1 -1
  296. package/components/flows/header/FlowImportExportMenu.svelte +9 -23
  297. package/components/flows/header/FlowImportExportMenu.svelte.d.ts +3 -3
  298. package/components/flows/header/FlowPreviewButtons.svelte +20 -16
  299. package/components/flows/header/FlowPreviewButtons.svelte.d.ts +3 -3
  300. package/components/flows/map/FlowBranchAllMap.svelte +47 -37
  301. package/components/flows/map/FlowBranchAllMap.svelte.d.ts +3 -3
  302. package/components/flows/map/FlowBranchOneMap.svelte +50 -42
  303. package/components/flows/map/FlowBranchOneMap.svelte.d.ts +3 -3
  304. package/components/flows/map/FlowErrorHandlerItem.svelte +5 -3
  305. package/components/flows/map/FlowErrorHandlerItem.svelte.d.ts +3 -3
  306. package/components/flows/map/FlowInputsItem.svelte +3 -2
  307. package/components/flows/map/FlowInputsItem.svelte.d.ts +3 -3
  308. package/components/flows/map/FlowModuleSchemaItem.svelte +26 -31
  309. package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +5 -5
  310. package/components/flows/map/FlowModuleSchemaMap.svelte +50 -92
  311. package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +3 -4
  312. package/components/flows/map/FlowSettingsItem.svelte +8 -7
  313. package/components/flows/map/FlowSettingsItem.svelte.d.ts +3 -3
  314. package/components/flows/map/InsertModuleButton.svelte +62 -8
  315. package/components/flows/map/InsertModuleButton.svelte.d.ts +4 -4
  316. package/components/flows/map/MapItem.svelte +30 -16
  317. package/components/flows/map/MapItem.svelte.d.ts +4 -6
  318. package/components/flows/pickers/FlowScriptPicker.svelte +11 -4
  319. package/components/flows/pickers/FlowScriptPicker.svelte.d.ts +8 -6
  320. package/components/flows/pickers/PickHubScript.svelte +74 -29
  321. package/components/flows/pickers/PickHubScript.svelte.d.ts +5 -6
  322. package/components/flows/pickers/PickScript.svelte +16 -9
  323. package/components/flows/pickers/PickScript.svelte.d.ts +3 -4
  324. package/components/flows/pickers/WorkspaceScriptPicker.svelte +53 -0
  325. package/components/flows/pickers/WorkspaceScriptPicker.svelte.d.ts +19 -0
  326. package/components/flows/pickers/model.d.ts +5 -3
  327. package/components/flows/previousResults.d.ts +2 -2
  328. package/components/flows/previousResults.js +5 -5
  329. package/components/flows/propPicker/PropPickerWrapper.svelte +2 -2
  330. package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +7 -7
  331. package/components/flows/scheduleUtils.d.ts +1 -1
  332. package/components/flows/scheduleUtils.js +1 -1
  333. package/components/flows/types.d.ts +1 -1
  334. package/components/flows/utils.d.ts +1 -1
  335. package/components/flows/utils.js +4 -9
  336. package/components/graph/FlowGraph.svelte +57 -18
  337. package/components/graph/FlowGraph.svelte.d.ts +6 -4
  338. package/components/graph/model.d.ts +7 -6
  339. package/components/icons/AirtableIcon.svelte.d.ts +3 -3
  340. package/components/icons/DbIcon.svelte.d.ts +3 -3
  341. package/components/icons/DiscordIcon.svelte.d.ts +3 -3
  342. package/components/icons/GCloudIcon.svelte.d.ts +3 -3
  343. package/components/icons/GItlabIcon.svelte.d.ts +3 -3
  344. package/components/icons/GSheetsIcon.svelte.d.ts +3 -3
  345. package/components/icons/GcalIcon.svelte.d.ts +3 -3
  346. package/components/icons/GdriveIcon.svelte.d.ts +3 -3
  347. package/components/icons/GithubIcon.svelte.d.ts +3 -3
  348. package/components/icons/GmailIcon.svelte.d.ts +3 -3
  349. package/components/icons/HatIcon.svelte.d.ts +3 -3
  350. package/components/icons/HttpIcon.svelte.d.ts +3 -3
  351. package/components/icons/Mail.svelte.d.ts +3 -3
  352. package/components/icons/MailchimpIcon.svelte +18 -0
  353. package/components/icons/MailchimpIcon.svelte.d.ts +17 -0
  354. package/components/icons/MastodonIcon.svelte.d.ts +3 -3
  355. package/components/icons/MatrixIcon.svelte.d.ts +3 -3
  356. package/components/icons/Mysql.svelte.d.ts +3 -3
  357. package/components/icons/PostgresIcon.svelte.d.ts +3 -3
  358. package/components/icons/S3Icon.svelte.d.ts +3 -3
  359. package/components/icons/SendgridIcon.svelte +66 -0
  360. package/components/icons/SendgridIcon.svelte.d.ts +17 -0
  361. package/components/icons/Slack.svelte.d.ts +3 -3
  362. package/components/icons/TogglIcon.svelte.d.ts +3 -3
  363. package/components/icons/WindmillIcon.svelte.d.ts +3 -3
  364. package/components/icons/index.d.ts +48 -0
  365. package/components/icons/index.js +48 -0
  366. package/components/jobs/JobDetail.svelte +2 -2
  367. package/components/jobs/JobDetail.svelte.d.ts +3 -3
  368. package/components/preview/FlowPreviewStatus.svelte.d.ts +3 -3
  369. package/components/progressBar/ProgressBar.svelte.d.ts +3 -3
  370. package/components/progressBar/ProgressBarGeneralPart.svelte.d.ts +3 -3
  371. package/components/progressBar/ProgressBarLoopAccessor.svelte.d.ts +3 -3
  372. package/components/progressBar/ProgressBarLoopPart.svelte.d.ts +3 -3
  373. package/components/progressBar/model.d.ts +9 -9
  374. package/components/propertyPicker/ObjectViewer.svelte +34 -9
  375. package/components/propertyPicker/ObjectViewer.svelte.d.ts +4 -3
  376. package/components/propertyPicker/PropPicker.svelte +118 -110
  377. package/components/propertyPicker/PropPicker.svelte.d.ts +3 -3
  378. package/components/propertyPicker/PropPickerResult.svelte +0 -1
  379. package/components/propertyPicker/PropPickerResult.svelte.d.ts +3 -3
  380. package/components/scriptEditor/LogPanel.svelte +4 -4
  381. package/components/scriptEditor/LogPanel.svelte.d.ts +3 -3
  382. package/components/scripts/{CreateActions.svelte → CreateActionsScript.svelte} +7 -46
  383. package/components/scripts/CreateActionsScript.svelte.d.ts +14 -0
  384. package/components/sidebar/MenuLink.svelte +7 -4
  385. package/components/sidebar/MenuLink.svelte.d.ts +4 -3
  386. package/components/sidebar/SidebarContent.svelte +25 -18
  387. package/components/sidebar/SidebarContent.svelte.d.ts +7 -3
  388. package/components/sidebar/UserMenu.svelte +1 -1
  389. package/components/sidebar/UserMenu.svelte.d.ts +3 -3
  390. package/components/sidebar/WorkspaceMenu.svelte +3 -3
  391. package/components/sidebar/WorkspaceMenu.svelte.d.ts +3 -3
  392. package/components/splitPanes/SplitPanesWrapper.svelte.d.ts +3 -3
  393. package/editorUtils.d.ts +1 -1
  394. package/editorUtils.js +2 -2
  395. package/gen/core/ApiRequestOptions.d.ts +1 -1
  396. package/gen/core/ApiResult.d.ts +1 -1
  397. package/gen/core/OpenAPI.d.ts +3 -3
  398. package/gen/core/OpenAPI.js +1 -1
  399. package/gen/index.d.ts +2 -0
  400. package/gen/index.js +1 -0
  401. package/gen/models/AppWithLastVersion.d.ts +12 -12
  402. package/gen/models/AuditLog.d.ts +1 -1
  403. package/gen/models/BranchAll.d.ts +1 -1
  404. package/gen/models/BranchOne.d.ts +1 -1
  405. package/gen/models/CompletedJob.d.ts +1 -1
  406. package/gen/models/ContextualVariable.d.ts +1 -1
  407. package/gen/models/CreateResource.d.ts +1 -2
  408. package/gen/models/CreateVariable.d.ts +1 -1
  409. package/gen/models/CreateWorkspace.d.ts +1 -1
  410. package/gen/models/EditResource.d.ts +1 -1
  411. package/gen/models/EditResourceType.d.ts +1 -1
  412. package/gen/models/EditSchedule.d.ts +1 -1
  413. package/gen/models/EditVariable.d.ts +1 -1
  414. package/gen/models/EditWorkspaceUser.d.ts +1 -1
  415. package/gen/models/Flow.d.ts +1 -1
  416. package/gen/models/FlowMetadata.d.ts +2 -1
  417. package/gen/models/FlowModule.d.ts +1 -1
  418. package/gen/models/FlowModuleValue.d.ts +1 -1
  419. package/gen/models/FlowPreview.d.ts +1 -1
  420. package/gen/models/FlowStatus.d.ts +1 -1
  421. package/gen/models/FlowStatusModule.d.ts +1 -1
  422. package/gen/models/FlowValue.d.ts +1 -1
  423. package/gen/models/ForloopFlow.d.ts +1 -1
  424. package/gen/models/GlobalUserInfo.d.ts +1 -1
  425. package/gen/models/Group.d.ts +1 -1
  426. package/gen/models/Identity.d.ts +1 -1
  427. package/gen/models/InputTransform.d.ts +1 -1
  428. package/gen/models/JavascriptTransform.d.ts +1 -1
  429. package/gen/models/Job.d.ts +1 -1
  430. package/gen/models/ListableApp.d.ts +10 -8
  431. package/gen/models/ListableResource.d.ts +13 -0
  432. package/gen/models/ListableResource.js +4 -0
  433. package/gen/models/ListableVariable.d.ts +4 -1
  434. package/gen/models/Login.d.ts +1 -1
  435. package/gen/models/MainArgSignature.d.ts +1 -1
  436. package/gen/models/NewSchedule.d.ts +1 -1
  437. package/gen/models/NewToken.d.ts +1 -1
  438. package/gen/models/NewUser.d.ts +1 -1
  439. package/gen/models/OpenFlow.d.ts +1 -1
  440. package/gen/models/OpenFlowWPath.d.ts +1 -1
  441. package/gen/models/PathScript.d.ts +1 -1
  442. package/gen/models/Policy.d.ts +1 -1
  443. package/gen/models/Preview.d.ts +1 -1
  444. package/gen/models/QueuedJob.d.ts +1 -1
  445. package/gen/models/RawScript.d.ts +2 -1
  446. package/gen/models/Resource.d.ts +1 -1
  447. package/gen/models/ResourceType.d.ts +1 -1
  448. package/gen/models/Retry.d.ts +1 -1
  449. package/gen/models/Schedule.d.ts +1 -1
  450. package/gen/models/Script.d.ts +2 -1
  451. package/gen/models/ScriptArgs.d.ts +1 -1
  452. package/gen/models/SlackToken.d.ts +1 -1
  453. package/gen/models/StaticTransform.d.ts +1 -1
  454. package/gen/models/TokenResponse.d.ts +1 -1
  455. package/gen/models/TruncatedToken.d.ts +1 -1
  456. package/gen/models/Usage.d.ts +1 -1
  457. package/gen/models/User.d.ts +1 -1
  458. package/gen/models/UserWorkspaceList.d.ts +1 -1
  459. package/gen/models/WorkerPing.d.ts +1 -1
  460. package/gen/models/Workspace.d.ts +1 -1
  461. package/gen/models/WorkspaceInvite.d.ts +1 -1
  462. package/gen/services/AppService.d.ts +101 -1
  463. package/gen/services/AppService.js +88 -1
  464. package/gen/services/FavoriteService.d.ts +27 -0
  465. package/gen/services/FavoriteService.js +36 -0
  466. package/gen/services/FlowService.d.ts +7 -91
  467. package/gen/services/FlowService.js +2 -73
  468. package/gen/services/JobService.d.ts +15 -0
  469. package/gen/services/JobService.js +19 -0
  470. package/gen/services/ResourceService.d.ts +3 -2
  471. package/gen/services/ResourceService.js +1 -1
  472. package/gen/services/ScheduleService.d.ts +1 -1
  473. package/gen/services/ScheduleService.js +1 -1
  474. package/gen/services/ScriptService.d.ts +7 -1
  475. package/gen/services/ScriptService.js +2 -1
  476. package/package.json +422 -361
  477. package/script_helpers.d.ts +3 -1
  478. package/script_helpers.js +73 -25
  479. package/stateMachine.d.ts +4 -4
  480. package/stores.d.ts +2 -0
  481. package/stores.js +1 -0
  482. package/utils.d.ts +4 -2
  483. package/utils.js +20 -3
  484. package/components/FlowModulesViewer.svelte +0 -191
  485. package/components/FlowModulesViewer.svelte.d.ts +0 -18
  486. package/components/landing/FlowGettingStarted.svelte +0 -50
  487. package/components/landing/FlowGettingStarted.svelte.d.ts +0 -19
  488. package/components/landing/FlowLandingBox.svelte +0 -39
  489. package/components/landing/FlowLandingBox.svelte.d.ts +0 -17
  490. package/components/landing/RessourceGettingStarted.svelte +0 -21
  491. package/components/landing/RessourceGettingStarted.svelte.d.ts +0 -19
  492. package/components/landing/ScriptBox.svelte +0 -52
  493. package/components/landing/ScriptBox.svelte.d.ts +0 -17
  494. package/components/landing/ScriptGettingStarted.svelte +0 -48
  495. package/components/landing/ScriptGettingStarted.svelte.d.ts +0 -19
  496. package/components/scripts/CreateActions.svelte.d.ts +0 -14
@@ -0,0 +1,120 @@
1
+ import type { Schema } from '../../common';
2
+ import type { Preview } from '../../gen';
3
+ import type { FilledItem } from 'svelte-grid';
4
+ import type { Writable } from 'svelte/store';
5
+ import type { staticValues } from './editor/componentsPanel/componentStaticValues';
6
+ import type { World } from './rx';
7
+ export type UserInput<T, V> = {
8
+ type: 'user';
9
+ value: V | undefined;
10
+ defaultValue: V;
11
+ fieldType: T;
12
+ };
13
+ export type DynamicInput<T, V> = {
14
+ type: 'output';
15
+ id: FieldID | undefined;
16
+ name: string | undefined;
17
+ defaultValue: V;
18
+ fieldType: T;
19
+ };
20
+ export type InputType = 'text' | 'textarea' | 'number' | 'boolean' | 'select' | 'date' | 'time' | 'datetime' | 'object';
21
+ export type StaticInput<T, V> = {
22
+ value: V | undefined;
23
+ type: 'static';
24
+ visible?: boolean;
25
+ defaultValue: V;
26
+ fieldType: T;
27
+ };
28
+ type AppInput<T extends InputType, V> = StaticInput<T, V> | DynamicInput<T, V> | UserInput<T, V>;
29
+ export type AppInputTransform = AppInput<'text', string> | AppInput<'textarea', string> | AppInput<'number', number> | AppInput<'boolean', boolean> | (AppInput<'select', string> & {
30
+ /**
31
+ * One of the keys of `staticValues` from `lib/components/apps/editor/componentsPanel/componentStaticValues`
32
+ */
33
+ optionValuesKey: keyof typeof staticValues;
34
+ }) | AppInput<'date', string> | AppInput<'time', string> | AppInput<'datetime', string> | AppInput<'object', Record<string | number, any>>;
35
+ export type InputsSpec = Record<FieldID, AppInputTransform>;
36
+ type Runnable = {
37
+ inlineScriptName?: string;
38
+ path?: string;
39
+ runType?: 'script' | 'flow';
40
+ };
41
+ type BaseComponent<T extends string> = {
42
+ type: T;
43
+ };
44
+ export type TextComponent = BaseComponent<'textcomponent'>;
45
+ export type TextInputComponent = BaseComponent<'textinputcomponent'>;
46
+ export type ButtonComponent = Runnable & BaseComponent<'buttoncomponent'>;
47
+ export type RunFormComponent = Runnable & BaseComponent<'runformcomponent'>;
48
+ export type BarChartComponent = BaseComponent<'barchartcomponent'>;
49
+ export type PieChartComponent = Runnable & BaseComponent<'piechartcomponent'>;
50
+ export type TableComponent = Runnable & BaseComponent<'tablecomponent'> & {
51
+ actionButtons: (BaseAppComponent & ButtonComponent)[];
52
+ };
53
+ export type DisplayComponent = BaseComponent<'displaycomponent'>;
54
+ export type ImageComponent = BaseComponent<'imagecomponent'>;
55
+ export type InputComponent = BaseComponent<'inputcomponent'>;
56
+ export type SelectComponent = BaseComponent<'selectcomponent'>;
57
+ export type CheckboxComponent = BaseComponent<'checkboxcomponent'>;
58
+ export type RadioComponent = BaseComponent<'radiocomponent'>;
59
+ export type HorizontalAlignment = 'left' | 'center' | 'right';
60
+ export type VerticalAlignment = 'top' | 'center' | 'bottom';
61
+ export type Aligned = {
62
+ horizontalAlignment: HorizontalAlignment;
63
+ verticalAlignment: VerticalAlignment;
64
+ };
65
+ export interface BaseAppComponent extends Partial<Aligned> {
66
+ id: ComponentID;
67
+ inputs: InputsSpec;
68
+ componentInputs: InputsSpec;
69
+ runnable?: boolean | undefined;
70
+ card?: boolean | undefined;
71
+ }
72
+ export type AppComponent = BaseAppComponent & (RunFormComponent | DisplayComponent | TextInputComponent | BarChartComponent | TableComponent | TextComponent | TableComponent | ButtonComponent | PieChartComponent | ImageComponent | InputComponent | SelectComponent | CheckboxComponent | RadioComponent);
73
+ export type ComponentSet = {
74
+ title: string;
75
+ components: AppComponent[];
76
+ };
77
+ type SectionID = string;
78
+ export type AppSection = {
79
+ components: AppComponent[];
80
+ id: SectionID;
81
+ };
82
+ export type GridItem = FilledItem<{
83
+ data: AppComponent;
84
+ id: string;
85
+ }>;
86
+ export type InlineScript = {
87
+ content: string;
88
+ language: Preview.language;
89
+ path: string;
90
+ schema: Schema;
91
+ };
92
+ export type App = {
93
+ grid: GridItem[];
94
+ inlineScripts: Record<string, InlineScript>;
95
+ title: string;
96
+ };
97
+ export type ConnectingInput<T, V> = {
98
+ opened: boolean;
99
+ input?: DynamicInput<T, V>;
100
+ };
101
+ export type AppEditorContext = {
102
+ worldStore: Writable<World | undefined>;
103
+ staticOutputs: Writable<Record<string, string[]>>;
104
+ app: Writable<App>;
105
+ selectedComponent: Writable<string | undefined>;
106
+ mode: Writable<EditorMode>;
107
+ connectingInput: Writable<ConnectingInput<any, any>>;
108
+ breakpoint: Writable<EditorBreakpoint>;
109
+ };
110
+ export type EditorMode = 'dnd' | 'preview';
111
+ export type EditorBreakpoint = 'sm' | 'lg';
112
+ type FieldID = string;
113
+ type ComponentID = string;
114
+ export type EditorConfig = {
115
+ staticInputDisabled: boolean;
116
+ outputInputDisabled: boolean;
117
+ userInputEnabled: boolean;
118
+ visibiltyEnabled: boolean;
119
+ };
120
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,36 @@
1
+ import type { InputsSpec, InputType } from './types';
2
+ import type { Schema } from '../../common';
3
+ export declare function loadSchema(workspace: string, path: string, runType: 'script' | 'flow'): Promise<Schema>;
4
+ export declare function schemaToInputsSpec(schema: Schema): InputsSpec;
5
+ export declare const displayData: {
6
+ displaycomponent: {
7
+ name: string;
8
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
9
+ };
10
+ textcomponent: {
11
+ name: string;
12
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
13
+ };
14
+ buttoncomponent: {
15
+ name: string;
16
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
17
+ };
18
+ piechartcomponent: {
19
+ name: string;
20
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
21
+ };
22
+ barchartcomponent: {
23
+ name: string;
24
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
25
+ };
26
+ tablecomponent: {
27
+ name: string;
28
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
29
+ };
30
+ checkboxcomponent: {
31
+ name: string;
32
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
33
+ };
34
+ };
35
+ export declare function accessPropertyByPath<T>(object: T, path: string): T | undefined;
36
+ export declare function fieldTypeToTsType(InputType: InputType): string;
@@ -0,0 +1,96 @@
1
+ import { FlowService, ScriptService } from '../../gen';
2
+ import { faBarChart, faDisplay, faFile, faMobileScreenButton, faPieChart } from '@fortawesome/free-solid-svg-icons';
3
+ export async function loadSchema(workspace, path, runType) {
4
+ if (runType === 'script') {
5
+ const script = await ScriptService.getScriptByPath({
6
+ workspace,
7
+ path
8
+ });
9
+ return script.schema;
10
+ }
11
+ else {
12
+ const flow = await FlowService.getFlowByPath({
13
+ workspace,
14
+ path
15
+ });
16
+ return flow.schema;
17
+ }
18
+ }
19
+ export function schemaToInputsSpec(schema) {
20
+ return Object.keys(schema.properties).reduce((accu, key) => {
21
+ const property = schema.properties[key];
22
+ accu[key] = {
23
+ type: 'static',
24
+ defaultValue: property.default,
25
+ value: undefined,
26
+ visible: true,
27
+ fieldType: property.type
28
+ };
29
+ return accu;
30
+ }, {});
31
+ }
32
+ export const displayData = {
33
+ displaycomponent: {
34
+ name: 'Result',
35
+ icon: faDisplay
36
+ },
37
+ textcomponent: {
38
+ name: 'Text',
39
+ icon: faFile
40
+ },
41
+ buttoncomponent: {
42
+ name: 'Button',
43
+ icon: faMobileScreenButton
44
+ },
45
+ piechartcomponent: {
46
+ name: 'Pie chart',
47
+ icon: faPieChart
48
+ },
49
+ barchartcomponent: {
50
+ name: 'Bar chart',
51
+ icon: faBarChart
52
+ },
53
+ tablecomponent: {
54
+ name: 'Table',
55
+ icon: faBarChart
56
+ },
57
+ checkboxcomponent: {
58
+ name: 'Checkbox',
59
+ icon: faBarChart
60
+ }
61
+ };
62
+ export function accessPropertyByPath(object, path) {
63
+ // convert indexes to properties
64
+ path = path.replace(/\[(\w+)\]/g, '.$1');
65
+ // strip a leading dot
66
+ path = path.replace(/^\./, '');
67
+ let a = path.split('.');
68
+ for (let i = 0, depth = a.length; i < depth; ++i) {
69
+ let key = a[i];
70
+ if (object[key]) {
71
+ object = object[key];
72
+ }
73
+ else {
74
+ // Value not found
75
+ return;
76
+ }
77
+ }
78
+ return object;
79
+ }
80
+ export function fieldTypeToTsType(InputType) {
81
+ switch (InputType) {
82
+ case 'text':
83
+ case 'textarea':
84
+ case 'date':
85
+ case 'time':
86
+ case 'datetime':
87
+ case 'select':
88
+ return 'string';
89
+ case 'number':
90
+ return 'number';
91
+ case 'boolean':
92
+ return 'boolean';
93
+ case 'object':
94
+ return 'object';
95
+ }
96
+ }
@@ -14,9 +14,9 @@ declare const __propDef: {
14
14
  right: {};
15
15
  };
16
16
  };
17
- export declare type ActionRowProps = typeof __propDef.props;
18
- export declare type ActionRowEvents = typeof __propDef.events;
19
- export declare type ActionRowSlots = typeof __propDef.slots;
17
+ export type ActionRowProps = typeof __propDef.props;
18
+ export type ActionRowEvents = typeof __propDef.events;
19
+ export type ActionRowSlots = typeof __propDef.slots;
20
20
  export default class ActionRow extends SvelteComponentTyped<ActionRowProps, ActionRowEvents, ActionRowSlots> {
21
21
  }
22
22
  export {};
@@ -3,6 +3,7 @@ import { faCheckCircle, faInfoCircle, faWarning } from '@fortawesome/free-solid-
3
3
  import Icon from 'svelte-awesome';
4
4
  export let type = 'info';
5
5
  export let title;
6
+ export let size = 'sm';
6
7
  const icons = {
7
8
  info: faInfoCircle,
8
9
  warning: faWarning,
@@ -11,25 +12,25 @@ const icons = {
11
12
  };
12
13
  const classes = {
13
14
  info: {
14
- bgClass: 'bg-blue-50',
15
+ bgClass: 'bg-blue-50 border-blue-200 border',
15
16
  iconClass: 'text-blue-500',
16
17
  titleClass: 'text-blue-800',
17
18
  descriptionClass: 'text-blue-700'
18
19
  },
19
20
  warning: {
20
- bgClass: 'bg-yellow-50',
21
+ bgClass: 'bg-yellow-50 border-yellow-200 border',
21
22
  iconClass: 'text-yellow-500',
22
23
  titleClass: 'text-yellow-800',
23
24
  descriptionClass: 'text-yellow-700'
24
25
  },
25
26
  error: {
26
- bgClass: 'bg-red-50',
27
+ bgClass: 'bg-red-50 border-red-200 border',
27
28
  iconClass: 'text-red-500',
28
29
  titleClass: 'text-red-800',
29
30
  descriptionClass: 'text-red-700'
30
31
  },
31
32
  success: {
32
- bgClass: 'bg-green-50',
33
+ bgClass: 'bg-green-50 border-green-200 border',
33
34
  iconClass: 'text-green-500',
34
35
  titleClass: 'text-green-800',
35
36
  descriptionClass: 'text-green-700'
@@ -37,15 +38,36 @@ const classes = {
37
38
  };
38
39
  </script>
39
40
 
40
- <div class={classNames('rounded-md p-4', classes[type].bgClass, $$props.class)}>
41
+ <div
42
+ class={classNames(
43
+ 'rounded-md',
44
+ size === 'sm' ? 'p-4' : 'p-2 ',
45
+ classes[type].bgClass,
46
+ $$props.class
47
+ )}
48
+ >
41
49
  <div class="flex">
42
50
  <div class="flex h-8 w-8 items-center justify-center rounded-full">
43
51
  <Icon data={icons[type]} class={classes[type].iconClass} />
44
52
  </div>
45
53
 
46
54
  <div class="ml-2 w-full">
47
- <span class={classNames('text-sm font-medium', classes[type].titleClass)}>{title}</span>
48
- <div class={classNames('mt-2 text-sm', classes[type].descriptionClass)}>
55
+ <span
56
+ class={classNames(
57
+ size === 'sm' ? 'text-sm' : 'text-xs ',
58
+ 'font-medium',
59
+ classes[type].titleClass
60
+ )}
61
+ >
62
+ {title}
63
+ </span>
64
+ <div
65
+ class={classNames(
66
+ size === 'sm' ? 'text-sm' : 'text-xs ',
67
+ 'mt-2',
68
+ classes[type].descriptionClass
69
+ )}
70
+ >
49
71
  <slot />
50
72
  </div>
51
73
  </div>
@@ -5,6 +5,7 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  type?: AlertType | undefined;
7
7
  title: string;
8
+ size?: "xs" | "sm" | undefined;
8
9
  };
9
10
  events: {
10
11
  [evt: string]: CustomEvent<any>;
@@ -13,9 +14,9 @@ declare const __propDef: {
13
14
  default: {};
14
15
  };
15
16
  };
16
- export declare type AlertProps = typeof __propDef.props;
17
- export declare type AlertEvents = typeof __propDef.events;
18
- export declare type AlertSlots = typeof __propDef.slots;
17
+ export type AlertProps = typeof __propDef.props;
18
+ export type AlertEvents = typeof __propDef.events;
19
+ export type AlertSlots = typeof __propDef.slots;
19
20
  export default class Alert extends SvelteComponentTyped<AlertProps, AlertEvents, AlertSlots> {
20
21
  }
21
22
  export {};
@@ -1 +1 @@
1
- export declare type AlertType = 'success' | 'error' | 'warning' | 'info';
1
+ export type AlertType = 'success' | 'error' | 'warning' | 'info';
@@ -6,9 +6,8 @@ export let color = 'gray';
6
6
  export let large = false;
7
7
  export let href = '';
8
8
  export let rounded = false;
9
- export let index = false;
10
9
  export let dismissable = false;
11
- export let baseClass = 'text-center -mb-0.5';
10
+ export let baseClass = 'text-center';
12
11
  export let capitalize = false;
13
12
  export let icon = undefined;
14
13
  let defaulIconProps = {
@@ -40,15 +39,12 @@ const hovers = {
40
39
  indigo: 'hover:bg-indigo-200 dark:hover:bg-indigo-300'
41
40
  };
42
41
  $: badgeClass = classNames(baseClass, large ? 'text-sm font-medium' : 'text-xs font-semibold', colors[color], href &&
43
- (color.startsWith(ColorModifier) ? hovers[color.replace(ColorModifier, '')] : hovers[color]), rounded ? 'rounded-full px-2 py-1' : 'rounded px-2.5 py-0.5', index
44
- ? 'absolute flex justify-center items-center font-bold overflow-hidden border-2 border-white dark:border-gray-900' +
45
- (large ? 'w-7 h-7 -top-3.5 -right-3.5' : 'w-6 h-6 -top-3 -right-3')
46
- : '', $$props.class);
42
+ (color.startsWith(ColorModifier) ? hovers[color.replace(ColorModifier, '')] : hovers[color]), rounded ? 'rounded-full px-2 py-1' : 'rounded px-2.5 py-0.5', $$props.class);
47
43
  $: iconProps = icon ? { ...defaulIconProps, ...icon } : { data: undefined };
48
44
  const handleHide = () => (hidden = !hidden);
49
45
  </script>
50
46
 
51
- <span class="inline-flex justify-center items-center whitespace-nowrap">
47
+ <span on:click on:keydown class="inline-flex justify-center items-center whitespace-nowrap">
52
48
  <svelte:element
53
49
  this={href ? 'a' : 'span'}
54
50
  {href}
@@ -7,22 +7,24 @@ declare const __propDef: {
7
7
  large?: boolean | undefined;
8
8
  href?: string | undefined;
9
9
  rounded?: boolean | undefined;
10
- index?: boolean | undefined;
11
10
  dismissable?: boolean | undefined;
12
11
  baseClass?: string | undefined;
13
12
  capitalize?: boolean | undefined;
14
13
  icon?: BadgeIconProps | undefined;
15
14
  };
16
15
  events: {
16
+ click: MouseEvent;
17
+ keydown: KeyboardEvent;
18
+ } & {
17
19
  [evt: string]: CustomEvent<any>;
18
20
  };
19
21
  slots: {
20
22
  default: {};
21
23
  };
22
24
  };
23
- export declare type BadgeProps = typeof __propDef.props;
24
- export declare type BadgeEvents = typeof __propDef.events;
25
- export declare type BadgeSlots = typeof __propDef.slots;
25
+ export type BadgeProps = typeof __propDef.props;
26
+ export type BadgeEvents = typeof __propDef.events;
27
+ export type BadgeSlots = typeof __propDef.slots;
26
28
  export default class Badge extends SvelteComponentTyped<BadgeProps, BadgeEvents, BadgeSlots> {
27
29
  }
28
30
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { IconProps } from 'svelte-awesome/components/Icon.svelte';
2
- declare type BaseColor = 'blue' | 'gray' | 'red' | 'green' | 'yellow' | 'indigo';
2
+ type BaseColor = 'blue' | 'gray' | 'red' | 'green' | 'yellow' | 'indigo';
3
3
  export declare const ColorModifier = "dark-";
4
- export declare type BadgeColor = BaseColor | `${typeof ColorModifier}${BaseColor}`;
4
+ export type BadgeColor = BaseColor | `${typeof ColorModifier}${BaseColor}`;
5
5
  export interface BadgeIconProps extends IconProps {
6
6
  position?: 'left' | 'right';
7
7
  }
@@ -14,9 +14,9 @@ declare const __propDef: {
14
14
  separator: {};
15
15
  };
16
16
  };
17
- export declare type BreadcrumbProps = typeof __propDef.props;
18
- export declare type BreadcrumbEvents = typeof __propDef.events;
19
- export declare type BreadcrumbSlots = typeof __propDef.slots;
17
+ export type BreadcrumbProps = typeof __propDef.props;
18
+ export type BreadcrumbEvents = typeof __propDef.events;
19
+ export type BreadcrumbSlots = typeof __propDef.slots;
20
20
  export default class Breadcrumb extends SvelteComponentTyped<BreadcrumbProps, BreadcrumbEvents, BreadcrumbSlots> {
21
21
  }
22
22
  export {};
@@ -3,6 +3,7 @@ import { classNames } from '../../../utils';
3
3
  import Icon from 'svelte-awesome';
4
4
  import { ButtonType } from './model';
5
5
  import { goto } from '$app/navigation';
6
+ import { faArrowsRotate, faSpinner } from '@fortawesome/free-solid-svg-icons';
6
7
  export let size = 'md';
7
8
  export let spacingSize = size;
8
9
  export let color = 'blue';
@@ -17,6 +18,8 @@ export let endIcon = undefined;
17
18
  export let element = undefined;
18
19
  export let id = '';
19
20
  export let nonCaptureEvent = false;
21
+ export let buttonType = 'button';
22
+ export let loading = false;
20
23
  const dispatch = createEventDispatcher();
21
24
  // Order of classes: border, border modifier, bg, bg modifier, text, text modifier, everything else
22
25
  const colorVariants = {
@@ -36,6 +39,10 @@ const colorVariants = {
36
39
  border: 'border-gray-800 hover:border-gray-900 focus:border-gray-900 bg-white hover:bg-gray-200 focus:bg-gray-200 text-gray-800 hover:text-gray-900 focus:text-gray-900 focus:ring-gray-300',
37
40
  contained: 'bg-gray-700 hover:bg-gray-900 focus:bg-gray-900 text-white focus:ring-gray-300'
38
41
  },
42
+ gray: {
43
+ border: 'border-gray-600 hover:border-gray-900 focus:border-gray-900 bg-white hover:bg-gray-200 focus:bg-gray-200 text-gray-800 hover:text-gray-900 focus:text-gray-900 focus:ring-gray-300',
44
+ contained: 'bg-gray-700/90 hover:bg-gray-900/90 focus:bg-gray-900/90 text-white focus:ring-gray-300'
45
+ },
39
46
  light: {
40
47
  border: 'border border-gray-300 bg-white hover:bg-gray-100 focus:bg-gray-100 text-gray-700 hover:text-gray-800 focus:text-gray-800 focus:ring-gray-300',
41
48
  contained: 'bg-white border-gray-300 hover:bg-gray-100 focus:bg-gray-100 text-gray-700 focus:ring-gray-300'
@@ -43,13 +50,13 @@ const colorVariants = {
43
50
  };
44
51
  $: buttonProps = {
45
52
  id,
46
- class: classNames(colorVariants[color][variant], variant === 'border' ? 'border' : '', ButtonType.FontSizeClasses[size], ButtonType.SpacingClasses[spacingSize], 'focus:ring-4 font-semibold', 'rounded-md', 'justify-center items-center text-center whitespace-nowrap inline-flex', btnClasses, disabled ? 'bg-gray-300' : ''),
47
- disabled,
53
+ class: classNames(colorVariants[color][variant], variant === 'border' ? 'border' : '', ButtonType.FontSizeClasses[size], ButtonType.SpacingClasses[spacingSize], 'focus:ring-2 font-semibold', 'rounded-md', 'justify-center items-center text-center whitespace-nowrap inline-flex', btnClasses, disabled ? 'bg-gray-300' : ''),
48
54
  href,
49
55
  target,
50
- tabindex: disabled ? -1 : 0
56
+ tabindex: disabled ? -1 : 0,
57
+ type: buttonType
51
58
  };
52
- function onClick(event) {
59
+ async function onClick(event) {
53
60
  if (!nonCaptureEvent) {
54
61
  event.preventDefault();
55
62
  dispatch('click', event);
@@ -58,7 +65,9 @@ function onClick(event) {
58
65
  window.open(href, target);
59
66
  }
60
67
  else {
61
- goto(href);
68
+ loading = true;
69
+ await goto(href);
70
+ loading = false;
62
71
  }
63
72
  }
64
73
  }
@@ -75,10 +84,19 @@ $: endIconClass = classNames(iconOnly ? undefined : isSmall ? 'ml-1' : 'ml-2', e
75
84
  on:focus
76
85
  on:blur
77
86
  {...buttonProps}
87
+ disabled={disabled || loading}
88
+ type="submit"
78
89
  >
79
- {#if startIcon}
90
+ {#if loading}
91
+ <Icon
92
+ data={faSpinner}
93
+ class={`animate-spin ${startIconClass}`}
94
+ scale={ButtonType.IconScale[size]}
95
+ />
96
+ {:else if startIcon}
80
97
  <Icon data={startIcon.icon} class={startIconClass} scale={ButtonType.IconScale[size]} />
81
98
  {/if}
99
+
82
100
  {#if !iconOnly}
83
101
  <slot />
84
102
  {/if}
@@ -5,7 +5,7 @@ declare const __propDef: {
5
5
  props: {
6
6
  size?: ButtonType.Size | undefined;
7
7
  spacingSize?: ButtonType.Size | undefined;
8
- color?: ButtonType.Color | undefined;
8
+ color?: "blue" | "gray" | "red" | "green" | "dark" | "light" | undefined;
9
9
  variant?: ButtonType.Variant | undefined;
10
10
  btnClasses?: string | undefined;
11
11
  disabled?: boolean | undefined;
@@ -17,6 +17,8 @@ declare const __propDef: {
17
17
  element?: ButtonType.Element | undefined;
18
18
  id?: string | undefined;
19
19
  nonCaptureEvent?: boolean | undefined;
20
+ buttonType?: "reset" | "submit" | "button" | undefined;
21
+ loading?: boolean | undefined;
20
22
  };
21
23
  events: {
22
24
  focus: FocusEvent;
@@ -29,9 +31,9 @@ declare const __propDef: {
29
31
  default: {};
30
32
  };
31
33
  };
32
- export declare type ButtonProps = typeof __propDef.props;
33
- export declare type ButtonEvents = typeof __propDef.events;
34
- export declare type ButtonSlots = typeof __propDef.slots;
34
+ export type ButtonProps = typeof __propDef.props;
35
+ export type ButtonEvents = typeof __propDef.events;
36
+ export type ButtonSlots = typeof __propDef.slots;
35
37
  export default class Button extends SvelteComponentTyped<ButtonProps, ButtonEvents, ButtonSlots> {
36
38
  }
37
39
  export {};
@@ -12,6 +12,7 @@ export let href = undefined;
12
12
  export let target = '_self';
13
13
  export let startIcon = undefined;
14
14
  export let endIcon = undefined;
15
+ export let spacingSize = size;
15
16
  let ref;
16
17
  setContext(ButtonType.ItemContextKey, { size, color });
17
18
  $: separator = color === 'red' || color === 'blue' ? 'border-gray-200' : 'border-gray-400';
@@ -19,7 +20,8 @@ $: commonProps = {
19
20
  size,
20
21
  color,
21
22
  variant,
22
- disabled
23
+ disabled,
24
+ spacingSize
23
25
  };
24
26
  </script>
25
27
 
@@ -4,7 +4,7 @@ import { ButtonType } from '..';
4
4
  declare const __propDef: {
5
5
  props: {
6
6
  size?: ButtonType.Size | undefined;
7
- color?: ButtonType.Color | undefined;
7
+ color?: "blue" | "gray" | "red" | "green" | "dark" | "light" | undefined;
8
8
  variant?: ButtonType.Variant | undefined;
9
9
  mainClasses?: string | undefined;
10
10
  toggleClasses?: string | undefined;
@@ -13,6 +13,7 @@ declare const __propDef: {
13
13
  target?: ButtonType.Target | undefined;
14
14
  startIcon?: ButtonType.Icon | undefined;
15
15
  endIcon?: ButtonType.Icon | undefined;
16
+ spacingSize?: ButtonType.Size | undefined;
16
17
  };
17
18
  events: {
18
19
  click: CustomEvent<any>;
@@ -25,9 +26,9 @@ declare const __propDef: {
25
26
  default: {};
26
27
  };
27
28
  };
28
- export declare type ButtonPopupProps = typeof __propDef.props;
29
- export declare type ButtonPopupEvents = typeof __propDef.events;
30
- export declare type ButtonPopupSlots = typeof __propDef.slots;
29
+ export type ButtonPopupProps = typeof __propDef.props;
30
+ export type ButtonPopupEvents = typeof __propDef.events;
31
+ export type ButtonPopupSlots = typeof __propDef.slots;
31
32
  export default class ButtonPopup extends SvelteComponentTyped<ButtonPopupProps, ButtonPopupEvents, ButtonPopupSlots> {
32
33
  }
33
34
  export {};
@@ -19,9 +19,9 @@ declare const __propDef: {
19
19
  default: {};
20
20
  };
21
21
  };
22
- export declare type ButtonPopupItemProps = typeof __propDef.props;
23
- export declare type ButtonPopupItemEvents = typeof __propDef.events;
24
- export declare type ButtonPopupItemSlots = typeof __propDef.slots;
22
+ export type ButtonPopupItemProps = typeof __propDef.props;
23
+ export type ButtonPopupItemEvents = typeof __propDef.events;
24
+ export type ButtonPopupItemSlots = typeof __propDef.slots;
25
25
  export default class ButtonPopupItem extends SvelteComponentTyped<ButtonPopupItemProps, ButtonPopupItemEvents, ButtonPopupItemSlots> {
26
26
  }
27
27
  export {};
@@ -1,6 +1,7 @@
1
+ export declare const BUTTON_COLORS: readonly ["blue", "red", "dark", "light", "green", "gray"];
1
2
  export declare namespace ButtonType {
2
3
  type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
- type Color = 'blue' | 'red' | 'dark' | 'light' | 'green';
4
+ type Color = typeof BUTTON_COLORS[number];
4
5
  type Variant = 'contained' | 'border';
5
6
  type Target = '_self' | '_blank';
6
7
  type Element = HTMLButtonElement | HTMLAnchorElement;
@@ -1,3 +1,4 @@
1
+ export const BUTTON_COLORS = ['blue', 'red', 'dark', 'light', 'green', 'gray'];
1
2
  export var ButtonType;
2
3
  (function (ButtonType) {
3
4
  ButtonType.FontSizeClasses = {
@@ -10,7 +11,7 @@ export var ButtonType;
10
11
  ButtonType.SpacingClasses = {
11
12
  xs: 'px-3 py-1.5',
12
13
  sm: 'px-3 py-1.5',
13
- md: 'px-4 py-2',
14
+ md: 'px-3 py-1.5',
14
15
  lg: 'px-4 py-2',
15
16
  xl: 'px-4 py-2'
16
17
  };
@@ -15,9 +15,9 @@ declare const __propDef: {
15
15
  default: {};
16
16
  };
17
17
  };
18
- export declare type ConfirmationModalProps = typeof __propDef.props;
19
- export declare type ConfirmationModalEvents = typeof __propDef.events;
20
- export declare type ConfirmationModalSlots = typeof __propDef.slots;
18
+ export type ConfirmationModalProps = typeof __propDef.props;
19
+ export type ConfirmationModalEvents = typeof __propDef.events;
20
+ export type ConfirmationModalSlots = typeof __propDef.slots;
21
21
  export default class ConfirmationModal extends SvelteComponentTyped<ConfirmationModalProps, ConfirmationModalEvents, ConfirmationModalSlots> {
22
22
  }
23
23
  export {};