windmill-components 1.70.0 → 1.75.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.
- package/assets/app.css +12 -1
- package/components/AppConnect.svelte +4 -3
- package/components/DisplayResult.svelte +27 -9
- package/components/FieldHeader.svelte +12 -8
- package/components/FlowBuilder.svelte +107 -39
- package/components/FlowBuilder.svelte.d.ts +5 -0
- package/components/FlowGraphViewer.svelte +5 -4
- package/components/FlowJobResult.svelte +3 -3
- package/components/FlowPreviewContent.svelte +3 -8
- package/components/FlowStatusViewer.svelte +21 -8
- package/components/GroupEditor.svelte +8 -0
- package/components/InputTransformForm.svelte +13 -20
- package/components/InputTransformSchemaForm.svelte +103 -0
- package/components/InputTransformSchemaForm.svelte.d.ts +24 -0
- package/components/LogViewer.svelte +1 -1
- package/components/ModulePreview.svelte +3 -2
- package/components/Multiselect.svelte +1 -1
- package/components/Path.svelte +15 -11
- package/components/Popover.svelte +2 -13
- package/components/ResourcePicker.svelte +33 -14
- package/components/RunChart.svelte +24 -5
- package/components/RunForm.svelte +5 -6
- package/components/RunForm.svelte.d.ts +1 -0
- package/components/SchemaForm.svelte +59 -57
- package/components/SchemaForm.svelte.d.ts +0 -5
- package/components/ScriptBuilder.svelte +30 -14
- package/components/ScriptPicker.svelte +3 -0
- package/components/SimpleEditor.svelte +4 -1
- package/components/SimpleEditor.svelte.d.ts +2 -0
- package/components/Slider.svelte +6 -1
- package/components/Slider.svelte.d.ts +1 -0
- package/components/TemplateEditor.svelte +1 -1
- package/components/TestJobLoader.svelte +2 -2
- package/components/Toggle.svelte +17 -4
- package/components/Toggle.svelte.d.ts +2 -0
- package/components/Tooltip.svelte +1 -1
- package/components/UserSettings.svelte +2 -0
- package/components/apps/components/buttons/AppButton.svelte +38 -22
- package/components/apps/components/buttons/AppButton.svelte.d.ts +1 -0
- package/components/apps/components/buttons/AppForm.svelte +16 -6
- package/components/apps/components/buttons/AppForm.svelte.d.ts +3 -0
- package/components/apps/components/buttons/AppFormButton.svelte +12 -4
- package/components/apps/components/buttons/AppFormButton.svelte.d.ts +3 -0
- package/components/apps/components/display/AppBarChart.svelte +15 -7
- package/components/apps/components/display/AppBarChart.svelte.d.ts +3 -0
- package/components/apps/components/display/AppDisplayComponent.svelte +17 -12
- package/components/apps/components/display/AppDisplayComponent.svelte.d.ts +1 -0
- package/components/apps/components/display/AppHtml.svelte +18 -4
- package/components/apps/components/display/AppHtml.svelte.d.ts +3 -0
- package/components/apps/components/display/AppIcon.svelte +20 -8
- package/components/apps/components/display/AppIcon.svelte.d.ts +3 -0
- package/components/apps/components/display/AppImage.svelte +17 -10
- package/components/apps/components/display/AppImage.svelte.d.ts +3 -0
- package/components/apps/components/display/AppMap.svelte +214 -0
- package/components/apps/components/display/AppMap.svelte.d.ts +23 -0
- package/components/apps/components/display/AppPdf.svelte +304 -0
- package/components/apps/components/display/AppPdf.svelte.d.ts +24 -0
- package/components/apps/components/display/AppPieChart.svelte +15 -7
- package/components/apps/components/display/AppPieChart.svelte.d.ts +3 -0
- package/components/apps/components/display/AppScatterChart.svelte +12 -4
- package/components/apps/components/display/AppScatterChart.svelte.d.ts +3 -0
- package/components/apps/components/display/AppText.svelte +38 -32
- package/components/apps/components/display/AppText.svelte.d.ts +1 -0
- package/components/apps/components/display/AppTimeseries.svelte +12 -4
- package/components/apps/components/display/AppTimeseries.svelte.d.ts +3 -0
- package/components/apps/components/display/PlotlyHtml.svelte +8 -14
- package/components/apps/components/display/PlotlyHtml.svelte.d.ts +1 -1
- package/components/apps/components/display/VegaLiteHtml.svelte +3 -8
- package/components/apps/components/display/VegaLiteHtml.svelte.d.ts +1 -0
- package/components/apps/components/display/index.d.ts +3 -0
- package/components/apps/components/display/index.js +3 -0
- package/components/apps/components/display/table/AppAggridTable.svelte +16 -7
- package/components/apps/components/display/table/AppAggridTable.svelte.d.ts +1 -0
- package/components/apps/components/display/table/AppTable.svelte +65 -20
- package/components/apps/components/display/table/AppTable.svelte.d.ts +3 -1
- package/components/apps/components/display/table/AppTableFooter.svelte +8 -1
- package/components/apps/components/display/table/AppTableFooter.svelte.d.ts +2 -0
- package/components/apps/components/helpers/AlignWrapper.svelte +13 -7
- package/components/apps/components/helpers/AlignWrapper.svelte.d.ts +3 -1
- package/components/apps/components/helpers/HiddenComponent.svelte +2 -1
- package/components/apps/components/helpers/InputValue.svelte +38 -15
- package/components/apps/components/helpers/NonRunnableComponent.svelte +18 -3
- package/components/apps/components/helpers/NonRunnableComponent.svelte.d.ts +1 -0
- package/components/apps/components/helpers/RefreshButton.svelte +1 -1
- package/components/apps/components/helpers/ResizeWrapper.svelte +24 -0
- package/components/apps/components/helpers/ResizeWrapper.svelte.d.ts +19 -0
- package/components/apps/components/helpers/RunnableComponent.svelte +76 -68
- package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +3 -1
- package/components/apps/components/helpers/RunnableWrapper.svelte +9 -5
- package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +3 -1
- package/components/apps/components/inputs/AppCheckbox.svelte +8 -2
- package/components/apps/components/inputs/AppCheckbox.svelte.d.ts +3 -0
- package/components/apps/components/inputs/AppDateInput.svelte +25 -18
- package/components/apps/components/inputs/AppDateInput.svelte.d.ts +6 -1
- package/components/apps/components/inputs/AppFileInput.svelte +22 -14
- package/components/apps/components/inputs/AppFileInput.svelte.d.ts +3 -0
- package/components/apps/components/inputs/AppMultiSelect.svelte +82 -0
- package/components/apps/components/inputs/AppMultiSelect.svelte.d.ts +27 -0
- package/components/apps/components/inputs/AppNumberInput.svelte +20 -16
- package/components/apps/components/inputs/AppNumberInput.svelte.d.ts +5 -0
- package/components/apps/components/inputs/AppRangeInput.svelte +55 -14
- package/components/apps/components/inputs/AppRangeInput.svelte.d.ts +3 -0
- package/components/apps/components/inputs/AppSelect.svelte +58 -21
- package/components/apps/components/inputs/AppSelect.svelte.d.ts +3 -0
- package/components/apps/components/inputs/AppSliderInputs.svelte +41 -9
- package/components/apps/components/inputs/AppSliderInputs.svelte.d.ts +3 -0
- package/components/apps/components/inputs/AppTextInput.svelte +53 -19
- package/components/apps/components/inputs/AppTextInput.svelte.d.ts +6 -0
- package/components/apps/components/inputs/currency/AppCurrencyInput.svelte +13 -3
- package/components/apps/components/inputs/currency/AppCurrencyInput.svelte.d.ts +3 -0
- package/components/apps/components/inputs/currency/CurrencyInput.svelte +2 -0
- package/components/apps/components/inputs/currency/CurrencyInput.svelte.d.ts +1 -0
- package/components/apps/components/layout/AppContainer.svelte +21 -13
- package/components/apps/components/layout/AppContainer.svelte.d.ts +3 -0
- package/components/apps/components/layout/AppDivider.svelte +24 -4
- package/components/apps/components/layout/AppDivider.svelte.d.ts +3 -1
- package/components/apps/components/layout/AppDrawer.svelte +89 -0
- package/components/apps/components/layout/AppDrawer.svelte.d.ts +24 -0
- package/components/apps/components/layout/AppSplitpanes.svelte +88 -0
- package/components/apps/components/layout/AppSplitpanes.svelte.d.ts +26 -0
- package/components/apps/components/layout/AppTabs.svelte +62 -21
- package/components/apps/components/layout/AppTabs.svelte.d.ts +3 -0
- package/components/apps/components/layout/index.d.ts +2 -0
- package/components/apps/components/layout/index.js +2 -0
- package/components/apps/editor/AppEditor.svelte +83 -19
- package/components/apps/editor/AppEditor.svelte.d.ts +3 -1
- package/components/apps/editor/AppEditorHeader.svelte +107 -32
- package/components/apps/editor/AppInputs.svelte +3 -3
- package/components/apps/editor/AppPreview.svelte +20 -7
- package/components/apps/editor/ComponentHeader.svelte +14 -3
- package/components/apps/editor/ComponentHeader.svelte.d.ts +1 -0
- package/components/apps/editor/GridEditor.svelte +85 -71
- package/components/apps/editor/GridPanel.svelte +29 -0
- package/components/apps/editor/GridPanel.svelte.d.ts +18 -0
- package/components/apps/editor/RecomputeAllComponents.svelte +8 -6
- package/components/apps/editor/SettingsPanel.svelte +14 -24
- package/components/apps/editor/SubGridEditor.svelte +46 -18
- package/components/apps/editor/SubGridEditor.svelte.d.ts +5 -0
- package/components/apps/editor/appUtils.d.ts +12 -2
- package/components/apps/editor/appUtils.js +121 -21
- package/components/apps/editor/component/Component.svelte +282 -57
- package/components/apps/editor/component/Component.svelte.d.ts +3 -1
- package/components/apps/editor/component/ComponentNavigation.svelte +125 -0
- package/components/apps/editor/component/ComponentNavigation.svelte.d.ts +14 -0
- package/components/apps/editor/component/components.d.ts +14 -2
- package/components/apps/editor/component/components.js +417 -43
- package/components/apps/editor/component/default-codes.js +6 -6
- package/components/apps/editor/component/sets.js +11 -3
- package/components/apps/editor/componentsPanel/ComponentList.svelte +72 -29
- package/components/apps/editor/componentsPanel/CssProperty.svelte +59 -23
- package/components/apps/editor/componentsPanel/CssProperty.svelte.d.ts +2 -1
- package/components/apps/editor/componentsPanel/CssSettings.svelte +56 -9
- package/components/apps/editor/componentsPanel/ListItem.svelte +23 -12
- package/components/apps/editor/componentsPanel/componentStaticValues.d.ts +1 -0
- package/components/apps/editor/componentsPanel/componentStaticValues.js +14 -2
- package/components/apps/editor/contextPanel/ComponentOutputViewer.svelte +1 -1
- package/components/apps/editor/contextPanel/ContextPanel.svelte +107 -61
- package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte +13 -3
- package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte.d.ts +1 -0
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +63 -25
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte.d.ts +5 -0
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte +11 -5
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte.d.ts +1 -0
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanel.svelte +26 -17
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +95 -85
- package/components/apps/editor/inlineScriptsPanel/utils.d.ts +5 -9
- package/components/apps/editor/inlineScriptsPanel/utils.js +19 -8
- package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte +10 -9
- package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte.d.ts +21 -12
- package/components/apps/editor/settingsPanel/ComponentInputTypeEditor.svelte +1 -1
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte +95 -56
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte.d.ts +1 -0
- package/components/apps/editor/settingsPanel/GridPane.svelte +75 -0
- package/components/apps/editor/settingsPanel/GridPane.svelte.d.ts +20 -0
- package/components/apps/editor/settingsPanel/GridTab.svelte +5 -5
- package/components/apps/editor/settingsPanel/GridTab.svelte.d.ts +2 -0
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +2 -1
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +1 -1
- package/components/apps/editor/settingsPanel/MoveToOtherGrid.svelte +13 -6
- package/components/apps/editor/settingsPanel/Recompute.svelte +1 -1
- package/components/apps/editor/settingsPanel/SelectedRunnable.svelte +1 -1
- package/components/apps/editor/settingsPanel/TableActions.svelte +28 -1
- package/components/apps/editor/settingsPanel/common/PanelSection.svelte +2 -2
- package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte +48 -0
- package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte.d.ts +19 -0
- package/components/apps/editor/settingsPanel/inputEditor/ConnectedInputEditor.svelte +1 -1
- package/components/apps/editor/settingsPanel/inputEditor/EvalInputEditor.svelte +1 -1
- package/components/apps/editor/settingsPanel/inputEditor/IconSelectInput.svelte +27 -3
- package/components/apps/editor/settingsPanel/inputEditor/IconSelectInput.svelte.d.ts +2 -0
- package/components/apps/editor/settingsPanel/inputEditor/JsonEditor.svelte +2 -2
- package/components/apps/editor/settingsPanel/inputEditor/JsonEditor.svelte.d.ts +2 -1
- package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +54 -6
- package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte.d.ts +1 -0
- package/components/apps/editor/settingsPanel/inputEditor/UploadInputEditor.svelte +7 -9
- package/components/apps/editor/settingsPanel/inputEditor/UploadInputEditor.svelte.d.ts +1 -1
- package/components/apps/editor/settingsPanel/mainInput/InlineScriptList.svelte +1 -0
- package/components/apps/editor/settingsPanel/mainInput/InlineScriptList.svelte.d.ts +1 -0
- package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +1 -1
- package/components/apps/inputType.d.ts +6 -5
- package/components/apps/rx.js +2 -1
- package/components/apps/store.d.ts +6 -1
- package/components/apps/types.d.ts +14 -4
- package/components/apps/utils.d.ts +2 -2
- package/components/apps/utils.js +21 -49
- package/components/common/button/ButtonPopup.svelte +2 -0
- package/components/common/button/ButtonPopup.svelte.d.ts +1 -0
- package/components/common/button/UndoRedo.svelte +32 -0
- package/components/common/button/UndoRedo.svelte.d.ts +20 -0
- package/components/common/drawer/Drawer.svelte +10 -4
- package/components/common/drawer/Drawer.svelte.d.ts +3 -1
- package/components/common/drawer/DrawerContent.svelte +0 -1
- package/components/common/fileInput/FileInput.svelte +47 -21
- package/components/common/fileInput/FileInput.svelte.d.ts +3 -1
- package/components/common/fileInput/model.d.ts +1 -0
- package/components/common/fileInput/model.js +1 -0
- package/components/common/index.d.ts +1 -0
- package/components/common/index.js +1 -0
- package/components/common/menu/Menu.svelte +3 -2
- package/components/common/menu/Menu.svelte.d.ts +2 -1
- package/components/common/modal/Modal.svelte +9 -4
- package/components/common/modal/Modal.svelte.d.ts +2 -0
- package/components/common/table/AppRow.svelte +13 -4
- package/components/common/table/AppRow.svelte.d.ts +1 -0
- package/components/common/table/FlowRow.svelte +21 -8
- package/components/common/table/FlowRow.svelte.d.ts +1 -0
- package/components/common/table/ScriptRow.svelte +42 -10
- package/components/common/table/ScriptRow.svelte.d.ts +1 -0
- package/components/common/tabs/Tab.svelte +12 -5
- package/components/common/tabs/Tab.svelte.d.ts +4 -1
- package/components/common/tabs/Tabs.svelte +8 -6
- package/components/common/tabs/Tabs.svelte.d.ts +3 -1
- package/components/flows/FlowEditor.svelte +6 -4
- package/components/flows/common/FlowCardHeader.svelte +4 -1
- package/components/flows/content/BranchPredicateEditor.svelte +3 -4
- package/components/flows/content/CapturePayload.svelte +1 -2
- package/components/flows/content/FlowBranchesAllWrapper.svelte +1 -1
- package/components/flows/content/FlowConstants.svelte +7 -13
- package/components/flows/content/FlowEditorPanel.svelte +4 -3
- package/components/flows/content/FlowFailureModule.svelte +2 -1
- package/components/flows/content/FlowInput.svelte +4 -2
- package/components/flows/content/FlowLoop.svelte +3 -4
- package/components/flows/content/FlowModuleComponent.svelte +23 -11
- package/components/flows/content/FlowModuleEarlyStop.svelte +3 -1
- package/components/flows/content/FlowModuleHeader.svelte +26 -3
- package/components/flows/content/FlowModuleHeader.svelte.d.ts +1 -0
- package/components/flows/content/FlowModuleSleep.svelte +2 -2
- package/components/flows/content/FlowModuleWrapper.svelte +2 -8
- package/components/flows/content/FlowSchedules.svelte +1 -2
- package/components/flows/content/FlowSettings.svelte +17 -37
- package/components/flows/content/ScriptEditorDrawer.svelte +98 -0
- package/components/flows/content/ScriptEditorDrawer.svelte.d.ts +19 -0
- package/components/flows/flowState.d.ts +2 -3
- package/components/flows/flowState.js +1 -4
- package/components/flows/flowStateUtils.d.ts +7 -6
- package/components/flows/flowStateUtils.js +5 -9
- package/components/flows/flowStore.d.ts +5 -4
- package/components/flows/flowStore.js +5 -17
- package/components/flows/header/FlowImportExportMenu.svelte +2 -1
- package/components/flows/map/FlowConstantsItem.svelte +2 -2
- package/components/flows/map/FlowErrorHandlerItem.svelte +12 -13
- package/components/flows/map/FlowInputsItem.svelte +2 -3
- package/components/flows/map/FlowModuleSchemaItem.svelte +88 -91
- package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +3 -3
- package/components/flows/map/FlowModuleSchemaMap.svelte +164 -138
- package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +1 -2
- package/components/flows/map/FlowSettingsItem.svelte +5 -4
- package/components/flows/map/InsertModuleButton.svelte +12 -10
- package/components/flows/map/InsertModuleButton.svelte.d.ts +1 -0
- package/components/flows/map/MapItem.svelte +176 -103
- package/components/flows/map/MapItem.svelte.d.ts +20 -2
- package/components/flows/map/VirtualItem.svelte +129 -0
- package/components/flows/map/VirtualItem.svelte.d.ts +44 -0
- package/components/flows/pickers/WorkspaceScriptPicker.svelte +1 -1
- package/components/flows/previousResults.d.ts +1 -1
- package/components/flows/previousResults.js +32 -17
- package/components/flows/types.d.ts +13 -1
- package/components/flows/utils.js +1 -1
- package/components/graph/FlowGraph.svelte +227 -167
- package/components/graph/FlowGraph.svelte.d.ts +14 -1
- package/components/graph/model.d.ts +6 -36
- package/components/graph/model.js +1 -1
- package/components/graph/svelvet/LICENSE +21 -0
- package/components/graph/svelvet/collapsible/controllers/util.d.ts +15 -0
- package/components/graph/svelvet/collapsible/controllers/util.js +144 -0
- package/components/graph/svelvet/collapsible/models/Collapsible.d.ts +17 -0
- package/components/graph/svelvet/collapsible/models/Collapsible.js +25 -0
- package/components/graph/svelvet/collapsible/types/types.d.ts +8 -0
- package/components/graph/svelvet/collapsible/types/types.js +1 -0
- package/components/graph/svelvet/container/README.md +7 -0
- package/components/graph/svelvet/container/controllers/middleware.d.ts +18 -0
- package/components/graph/svelvet/container/controllers/middleware.js +101 -0
- package/components/graph/svelvet/container/views/GraphView.svelte +252 -0
- package/components/graph/svelvet/container/views/GraphView.svelte.d.ts +25 -0
- package/components/graph/svelvet/container/views/Svelvet.svelte +131 -0
- package/components/graph/svelvet/container/views/Svelvet.svelte.d.ts +41 -0
- package/components/graph/svelvet/customCss/controllers/getCss.d.ts +2 -0
- package/components/graph/svelvet/customCss/controllers/getCss.js +57 -0
- package/components/graph/svelvet/d3/controllers/README.md +3 -0
- package/components/graph/svelvet/d3/controllers/d3.d.ts +5 -0
- package/components/graph/svelvet/d3/controllers/d3.js +59 -0
- package/components/graph/svelvet/d3/controllers/d3Old.d.ts +1 -0
- package/components/graph/svelvet/d3/controllers/d3Old.js +43 -0
- package/components/graph/svelvet/docs/CHANGELOG.md +145 -0
- package/components/graph/svelvet/docs/DESIGN_PATTERNS.md +44 -0
- package/components/graph/svelvet/docs/DOCUMENTATION.md +5 -0
- package/components/graph/svelvet/docs/README.md +34 -0
- package/components/graph/svelvet/docs/TODO.md +14 -0
- package/components/graph/svelvet/docs/Tutorials.md +25 -0
- package/components/graph/svelvet/docs/images/css-background-after.png +0 -0
- package/components/graph/svelvet/docs/images/css-background-before.png +0 -0
- package/components/graph/svelvet/docs/images/custom-edges-after.png +0 -0
- package/components/graph/svelvet/docs/images/custom-edges-before.png +0 -0
- package/components/graph/svelvet/docs/images/custom-nodes-after.png +0 -0
- package/components/graph/svelvet/docs/images/custom-nodes-before.png +0 -0
- package/components/graph/svelvet/docs/images/custom-svelte-components-after.png +0 -0
- package/components/graph/svelvet/docs/images/custom-svelte-components-before.png +0 -0
- package/components/graph/svelvet/docs/images/html-docs-after.png +0 -0
- package/components/graph/svelvet/docs/images/html-docs-before.png +0 -0
- package/components/graph/svelvet/docs/images/minimap-after.png +0 -0
- package/components/graph/svelvet/docs/images/minimap-before.png +0 -0
- package/components/graph/svelvet/docs/images/node-classes-after.png +0 -0
- package/components/graph/svelvet/docs/images/node-classes-before.png +0 -0
- package/components/graph/svelvet/docs/images/node-create-after.png +0 -0
- package/components/graph/svelvet/docs/images/node-create-before.png +0 -0
- package/components/graph/svelvet/edges/controllers/anchorCbDev.d.ts +4 -0
- package/components/graph/svelvet/edges/controllers/anchorCbDev.js +92 -0
- package/components/graph/svelvet/edges/controllers/anchorCbUser.d.ts +57 -0
- package/components/graph/svelvet/edges/controllers/anchorCbUser.js +73 -0
- package/components/graph/svelvet/edges/controllers/util.d.ts +37 -0
- package/components/graph/svelvet/edges/controllers/util.js +72 -0
- package/components/graph/svelvet/edges/models/Anchor.d.ts +48 -0
- package/components/graph/svelvet/edges/models/Anchor.js +122 -0
- package/components/graph/svelvet/edges/models/Edge.d.ts +47 -0
- package/components/graph/svelvet/edges/models/Edge.js +107 -0
- package/components/graph/svelvet/edges/types/types.d.ts +18 -0
- package/components/graph/svelvet/edges/types/types.js +1 -0
- package/components/graph/svelvet/edges/views/Edges/BaseEdge.svelte +105 -0
- package/components/graph/svelvet/edges/views/Edges/BaseEdge.svelte.d.ts +18 -0
- package/components/graph/svelvet/edges/views/Edges/EdgeAnchor.svelte +12 -0
- package/components/graph/svelvet/edges/views/Edges/EdgeAnchor.svelte.d.ts +17 -0
- package/components/graph/svelvet/edges/views/Edges/EdgeText.svelte +43 -0
- package/components/graph/svelvet/edges/views/Edges/EdgeText.svelte.d.ts +17 -0
- package/components/graph/svelvet/edges/views/Edges/SimpleBezierEdge.svelte +137 -0
- package/components/graph/svelvet/edges/views/Edges/SimpleBezierEdge.svelte.d.ts +17 -0
- package/components/graph/svelvet/edges/views/Edges/SmoothStepEdge.svelte +176 -0
- package/components/graph/svelvet/edges/views/Edges/SmoothStepEdge.svelte.d.ts +60 -0
- package/components/graph/svelvet/edges/views/Edges/StepEdge.svelte +8 -0
- package/components/graph/svelvet/edges/views/Edges/StepEdge.svelte.d.ts +25 -0
- package/components/graph/svelvet/edges/views/Edges/types.d.ts +52 -0
- package/components/graph/svelvet/edges/views/Edges/types.js +1 -0
- package/components/graph/svelvet/edges/views/Edges/utils.d.ts +33 -0
- package/components/graph/svelvet/edges/views/Edges/utils.js +31 -0
- package/components/graph/svelvet/editEdges/views/EditEdge.svelte +151 -0
- package/components/graph/svelvet/editEdges/views/EditEdge.svelte.d.ts +20 -0
- package/components/graph/svelvet/nodes/controllers/util.d.ts +9 -0
- package/components/graph/svelvet/nodes/controllers/util.js +13 -0
- package/components/graph/svelvet/nodes/models/Node.d.ts +78 -0
- package/components/graph/svelvet/nodes/models/Node.js +195 -0
- package/components/graph/svelvet/nodes/views/EditNode.svelte +147 -0
- package/components/graph/svelvet/nodes/views/EditNode.svelte.d.ts +33 -0
- package/components/graph/svelvet/nodes/views/Node.svelte +85 -0
- package/components/graph/svelvet/nodes/views/Node.svelte.d.ts +22 -0
- package/components/graph/svelvet/resizableNodes/controllers/util.d.ts +11 -0
- package/components/graph/svelvet/resizableNodes/controllers/util.js +24 -0
- package/components/graph/svelvet/resizableNodes/models/ResizeNode.d.ts +33 -0
- package/components/graph/svelvet/resizableNodes/models/ResizeNode.js +71 -0
- package/components/graph/svelvet/resizableNodes/views/ResizeNode.svelte +81 -0
- package/components/graph/svelvet/resizableNodes/views/ResizeNode.svelte.d.ts +20 -0
- package/components/graph/svelvet/store/controllers/storeApi.d.ts +32 -0
- package/components/graph/svelvet/store/controllers/storeApi.js +111 -0
- package/components/graph/svelvet/store/controllers/userApi.d.ts +3 -0
- package/components/graph/svelvet/store/controllers/userApi.js +18 -0
- package/components/graph/svelvet/store/controllers/util.d.ts +31 -0
- package/components/graph/svelvet/store/controllers/util.js +180 -0
- package/components/graph/svelvet/store/models/store.d.ts +12 -0
- package/components/graph/svelvet/store/models/store.js +9 -0
- package/components/graph/svelvet/store/types/types.d.ts +134 -0
- package/components/graph/svelvet/store/types/types.js +1 -0
- package/components/graph/svelvet/types/README.md +3 -0
- package/components/graph/svelvet/types/index.d.ts +2 -0
- package/components/graph/svelvet/types/index.js +1 -0
- package/components/graph/svelvet/types/types.d.ts +49 -0
- package/components/graph/svelvet/types/types.js +18 -0
- package/components/graph/util.js +2 -2
- package/components/home/ItemsList.svelte +53 -5
- package/components/home/ItemsList.svelte.d.ts +1 -0
- package/components/home/ListFilters.svelte +7 -2
- package/components/jobs/JobDetail.svelte +12 -1
- package/components/propertyPicker/ObjectViewer.svelte +6 -4
- package/consts.d.ts +1 -0
- package/consts.js +1 -0
- package/defaults.d.ts +4 -0
- package/defaults.js +4 -0
- package/history.d.ts +9 -0
- package/history.js +56 -0
- package/package.json +92 -8
- package/script_helpers.d.ts +1 -1
- package/script_helpers.js +1 -0
- package/scripts.d.ts +1 -1
- package/scripts.js +8 -1
- package/utils.d.ts +9 -4
- package/utils.js +44 -8
- package/components/apps/editor/TablePanel.svelte +0 -19
- package/components/apps/editor/TablePanel.svelte.d.ts +0 -17
- package/components/flows/map/FlowBranchAllMap.svelte +0 -100
- package/components/flows/map/FlowBranchAllMap.svelte.d.ts +0 -17
- package/components/flows/map/FlowBranchOneMap.svelte +0 -124
- package/components/flows/map/FlowBranchOneMap.svelte.d.ts +0 -17
|
@@ -28,7 +28,7 @@ $: $workspaceStore &&
|
|
|
28
28
|
</script>
|
|
29
29
|
|
|
30
30
|
<div
|
|
31
|
-
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"
|
|
31
|
+
class="overflow-x-auto scrollbar-hidden flex items-center justify-between py-2 px-4 border-b border-gray-300 space-x-2 h-full max-h-12 flex-nowrap"
|
|
32
32
|
>
|
|
33
33
|
{#if flowModule}
|
|
34
34
|
<span class="text-sm w-full mr-4">
|
|
@@ -55,6 +55,9 @@ $: $workspaceStore &&
|
|
|
55
55
|
>
|
|
56
56
|
{/if}
|
|
57
57
|
<input bind:value={flowModule.summary} placeholder="Summary" class="w-full grow" />
|
|
58
|
+
{:else if flowModule?.value.type === 'flow'}
|
|
59
|
+
<Badge color="indigo" capitalize>flow</Badge>
|
|
60
|
+
<input bind:value={flowModule.summary} placeholder="Summary" class="w-full grow" />
|
|
58
61
|
{/if}
|
|
59
62
|
</div>
|
|
60
63
|
</span>
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
<script>import { getContext } from 'svelte';
|
|
2
|
-
import { flowStore } from '../flowStore';
|
|
3
2
|
import PropPickerWrapper from '../propPicker/PropPickerWrapper.svelte';
|
|
4
3
|
import SimpleEditor from '../../SimpleEditor.svelte';
|
|
5
|
-
import { flowStateStore } from '../flowState';
|
|
6
4
|
import { getStepPropPicker } from '../previousResults';
|
|
7
5
|
export let branch;
|
|
8
6
|
export let parentModule;
|
|
9
7
|
export let previousModule;
|
|
10
|
-
const { previewArgs } = getContext('FlowEditorContext');
|
|
8
|
+
const { previewArgs, flowStateStore, flowStore } = getContext('FlowEditorContext');
|
|
11
9
|
let editor = undefined;
|
|
12
|
-
$: stepPropPicker = getStepPropPicker($flowStateStore, parentModule, previousModule, parentModule.id, $flowStore, $previewArgs, false
|
|
10
|
+
$: stepPropPicker = getStepPropPicker($flowStateStore, parentModule, previousModule, parentModule.id, $flowStore, $previewArgs, false);
|
|
13
11
|
</script>
|
|
14
12
|
|
|
15
13
|
<PropPickerWrapper
|
|
@@ -17,6 +15,7 @@ $: stepPropPicker = getStepPropPicker($flowStateStore, parentModule, previousMod
|
|
|
17
15
|
pickableProperties={stepPropPicker.pickableProperties}
|
|
18
16
|
on:select={({ detail }) => {
|
|
19
17
|
editor?.insertAtCursor(detail)
|
|
18
|
+
editor?.focus()
|
|
20
19
|
}}
|
|
21
20
|
>
|
|
22
21
|
<div class="border border-gray-400">
|
|
@@ -6,7 +6,6 @@ import WindmillIcon from '../../icons/WindmillIcon.svelte';
|
|
|
6
6
|
import ObjectViewer from '../../propertyPicker/ObjectViewer.svelte';
|
|
7
7
|
import { CaptureService } from '../../../gen';
|
|
8
8
|
import { workspaceStore } from '../../../stores';
|
|
9
|
-
import { flowStore } from '../flowStore';
|
|
10
9
|
import { convert } from '@redocly/json-to-json-schema';
|
|
11
10
|
import SchemaViewer from '../../SchemaViewer.svelte';
|
|
12
11
|
import { getContext } from 'svelte';
|
|
@@ -14,7 +13,7 @@ import { copyToClipboard, sendUserToast } from '../../../utils';
|
|
|
14
13
|
import Icon from 'svelte-awesome';
|
|
15
14
|
import { faClipboard } from '@fortawesome/free-solid-svg-icons';
|
|
16
15
|
import SchemaForm from '../../SchemaForm.svelte';
|
|
17
|
-
const { previewArgs } = getContext('FlowEditorContext');
|
|
16
|
+
const { previewArgs, flowStore } = getContext('FlowEditorContext');
|
|
18
17
|
let drawer;
|
|
19
18
|
let interval = undefined;
|
|
20
19
|
let captureInput = undefined;
|
|
@@ -27,7 +27,7 @@ let selected = 'early-stop';
|
|
|
27
27
|
>
|
|
28
28
|
<div class="flex flex-col gap-y-4 py-2 w-full max-w-xl">
|
|
29
29
|
{#each value.branches as branch, i}
|
|
30
|
-
<div class="flex flex-row gap-x-4 w-full">
|
|
30
|
+
<div class="flex flex-row gap-x-4 w-full items-center">
|
|
31
31
|
<div class="grow">
|
|
32
32
|
<input type="text" bind:value={branch.summary} placeholder="Summary" />
|
|
33
33
|
</div>
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
<script>import { dfs
|
|
1
|
+
<script>import { dfs } from '../flowStore';
|
|
2
2
|
import FlowCard from '../common/FlowCard.svelte';
|
|
3
3
|
import { Alert, Badge } from '../../common';
|
|
4
|
-
import
|
|
5
|
-
import { flowStateStore } from '../flowState';
|
|
6
|
-
import { setContext } from 'svelte';
|
|
4
|
+
import { getContext, setContext } from 'svelte';
|
|
7
5
|
import { writable } from 'svelte/store';
|
|
8
|
-
import { slide } from 'svelte/transition';
|
|
9
6
|
import Toggle from '../../Toggle.svelte';
|
|
7
|
+
import InputTransformSchemaForm from '../../InputTransformSchemaForm.svelte';
|
|
10
8
|
let hideOptional = false;
|
|
9
|
+
const { flowStateStore, flowStore } = getContext('FlowEditorContext');
|
|
11
10
|
$: steps = dfs($flowStore.value.modules, (x) => x)
|
|
12
11
|
.map((x) => [x.value, x])
|
|
13
12
|
.filter((x) => x[0].type == 'script' || x[0].type == 'rawscript')
|
|
@@ -33,11 +32,7 @@ setContext('PropPickerWrapper', {
|
|
|
33
32
|
|
|
34
33
|
<div class="min-h-full">
|
|
35
34
|
<FlowCard title="All Static Inputs">
|
|
36
|
-
<Toggle
|
|
37
|
-
slot="header"
|
|
38
|
-
bind:checked={hideOptional}
|
|
39
|
-
options={{left: 'Hide optional inputs'}}
|
|
40
|
-
/>
|
|
35
|
+
<Toggle slot="header" bind:checked={hideOptional} options={{ left: 'Hide optional inputs' }} />
|
|
41
36
|
<div class="min-h-full flex-1">
|
|
42
37
|
<Alert type="info" title="Static Inputs" class="m-4"
|
|
43
38
|
>This page centralizes the static inputs of every steps. It is akin to a file containing all
|
|
@@ -60,15 +55,14 @@ setContext('PropPickerWrapper', {
|
|
|
60
55
|
{/if}
|
|
61
56
|
{#each steps as [args, filter, m] (m.id)}
|
|
62
57
|
{#if filter.length > 0}
|
|
63
|
-
<div
|
|
58
|
+
<div class="relative h-full border-t p-4">
|
|
64
59
|
<h2 class="sticky w-full top-0 z-10 inline-flex items-center bg-white py-2">
|
|
65
60
|
<span class="mr-4">{m.summary || m.value['path'] || 'Inline script'}</span>
|
|
66
61
|
<Badge large color="indigo">{m.id}</Badge>
|
|
67
62
|
</h2>
|
|
68
63
|
|
|
69
|
-
<
|
|
64
|
+
<InputTransformSchemaForm
|
|
70
65
|
noDynamicToggle
|
|
71
|
-
inputTransform
|
|
72
66
|
{filter}
|
|
73
67
|
class="mt-2"
|
|
74
68
|
schema={$flowStateStore[m.id]?.schema ?? {}}
|
|
@@ -3,16 +3,17 @@ import FlowModuleWrapper from './FlowModuleWrapper.svelte';
|
|
|
3
3
|
import FlowSettings from './FlowSettings.svelte';
|
|
4
4
|
import FlowInput from './FlowInput.svelte';
|
|
5
5
|
import FlowFailureModule from './FlowFailureModule.svelte';
|
|
6
|
-
import { flowStore } from '../flowStore';
|
|
7
6
|
import FlowConstants from './FlowConstants.svelte';
|
|
8
7
|
export let initialPath;
|
|
9
|
-
const { selectedId } = getContext('FlowEditorContext');
|
|
8
|
+
const { selectedId, flowStore } = getContext('FlowEditorContext');
|
|
10
9
|
</script>
|
|
11
10
|
|
|
12
11
|
{#if $selectedId?.startsWith('settings')}
|
|
13
12
|
<FlowSettings {initialPath} />
|
|
14
|
-
{:else if $selectedId === '
|
|
13
|
+
{:else if $selectedId === 'Input'}
|
|
15
14
|
<FlowInput />
|
|
15
|
+
{:else if $selectedId === 'Result'}
|
|
16
|
+
<p class="p-4 text-gray-600">Nothing to show about the result node. Happy flow building!</p>
|
|
16
17
|
{:else if $selectedId === 'constants'}
|
|
17
18
|
<FlowConstants />
|
|
18
19
|
{:else if $selectedId === 'failure'}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { getContext } from 'svelte';
|
|
2
2
|
import FlowModuleWrapper from './FlowModuleWrapper.svelte';
|
|
3
|
+
const { flowStore } = getContext('FlowEditorContext');
|
|
3
4
|
</script>
|
|
4
5
|
|
|
5
6
|
{#if $flowStore.value.failure_module}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script>import { Button } from '../../common';
|
|
2
2
|
import SchemaEditor from '../../SchemaEditor.svelte';
|
|
3
3
|
import SchemaForm from '../../SchemaForm.svelte';
|
|
4
|
+
import { getContext } from 'svelte';
|
|
4
5
|
import FlowCard from '../common/FlowCard.svelte';
|
|
5
|
-
import { copyFirstStepSchema
|
|
6
|
+
import { copyFirstStepSchema } from '../flowStore';
|
|
6
7
|
import CapturePayload from './CapturePayload.svelte';
|
|
8
|
+
const { flowStore, flowStateStore } = getContext('FlowEditorContext');
|
|
7
9
|
let capturePayload;
|
|
8
10
|
</script>
|
|
9
11
|
|
|
@@ -26,7 +28,7 @@ let capturePayload;
|
|
|
26
28
|
size="sm"
|
|
27
29
|
disabled={$flowStore.value.modules.length === 0 ||
|
|
28
30
|
$flowStore.value.modules[0].value.type == 'identity'}
|
|
29
|
-
on:click={copyFirstStepSchema}
|
|
31
|
+
on:click={() => copyFirstStepSchema($flowStateStore, flowStore)}
|
|
30
32
|
>
|
|
31
33
|
First step's inputs
|
|
32
34
|
</Button>
|
|
@@ -10,16 +10,14 @@ import FlowModuleSuspend from './FlowModuleSuspend.svelte';
|
|
|
10
10
|
import { Button, Tab, TabContent, Tabs } from '../../common';
|
|
11
11
|
import { Pane, Splitpanes } from 'svelte-splitpanes';
|
|
12
12
|
import { getStepPropPicker } from '../previousResults';
|
|
13
|
-
import { flowStateStore } from '../flowState';
|
|
14
|
-
import { flowStore } from '../flowStore';
|
|
15
13
|
import FlowModuleSleep from './FlowModuleSleep.svelte';
|
|
16
|
-
const { previewArgs } = getContext('FlowEditorContext');
|
|
14
|
+
const { previewArgs, flowStateStore, flowStore } = getContext('FlowEditorContext');
|
|
17
15
|
export let mod;
|
|
18
16
|
export let parentModule;
|
|
19
17
|
export let previousModule;
|
|
20
18
|
let editor = undefined;
|
|
21
19
|
let selected = 'early-stop';
|
|
22
|
-
$: stepPropPicker = getStepPropPicker($flowStateStore, parentModule, previousModule, mod.id, $flowStore, $previewArgs, false
|
|
20
|
+
$: stepPropPicker = getStepPropPicker($flowStateStore, parentModule, previousModule, mod.id, $flowStore, $previewArgs, false);
|
|
23
21
|
</script>
|
|
24
22
|
|
|
25
23
|
<div class="h-full flex flex-col">
|
|
@@ -44,6 +42,7 @@ $: stepPropPicker = getStepPropPicker($flowStateStore, parentModule, previousMod
|
|
|
44
42
|
pickableProperties={stepPropPicker.pickableProperties}
|
|
45
43
|
on:select={({ detail }) => {
|
|
46
44
|
editor?.insertAtCursor(detail)
|
|
45
|
+
editor?.focus()
|
|
47
46
|
}}
|
|
48
47
|
>
|
|
49
48
|
<SimpleEditor
|
|
@@ -5,13 +5,10 @@ import Editor from '../../Editor.svelte';
|
|
|
5
5
|
import EditorBar from '../../EditorBar.svelte';
|
|
6
6
|
import ModulePreview from '../../ModulePreview.svelte';
|
|
7
7
|
import { createScriptFromInlineScript, fork } from '../flowStateUtils';
|
|
8
|
-
import { flowStore } from '../flowStore';
|
|
9
|
-
import SchemaForm from '../../SchemaForm.svelte';
|
|
10
8
|
import { RawScript } from '../../../gen';
|
|
11
9
|
import FlowCard from '../common/FlowCard.svelte';
|
|
12
10
|
import FlowModuleHeader from './FlowModuleHeader.svelte';
|
|
13
|
-
import {
|
|
14
|
-
import { schemaToObject, scriptLangToEditorLang } from '../../../utils';
|
|
11
|
+
import { getLatestHashForScript, schemaToObject, scriptLangToEditorLang } from '../../../utils';
|
|
15
12
|
import PropPickerWrapper from '../propPicker/PropPickerWrapper.svelte';
|
|
16
13
|
import { afterUpdate, getContext } from 'svelte';
|
|
17
14
|
import { loadSchemaFromModule } from '../utils';
|
|
@@ -25,7 +22,8 @@ import Button from '../../common/button/Button.svelte';
|
|
|
25
22
|
import Alert from '../../common/alert/Alert.svelte';
|
|
26
23
|
import FlowModuleSleep from './FlowModuleSleep.svelte';
|
|
27
24
|
import FlowPathViewer from './FlowPathViewer.svelte';
|
|
28
|
-
|
|
25
|
+
import InputTransformSchemaForm from '../../InputTransformSchemaForm.svelte';
|
|
26
|
+
const { selectedId, previewArgs, flowStateStore, flowStore } = getContext('FlowEditorContext');
|
|
29
27
|
export let flowModule;
|
|
30
28
|
export let failureModule = false;
|
|
31
29
|
export let parentModule = undefined;
|
|
@@ -53,7 +51,7 @@ $: stepPropPicker = failureModule
|
|
|
53
51
|
},
|
|
54
52
|
extraLib: ''
|
|
55
53
|
}
|
|
56
|
-
: getStepPropPicker($flowStateStore, parentModule, previousModule, flowModule.id, $flowStore, $previewArgs, false
|
|
54
|
+
: getStepPropPicker($flowStateStore, parentModule, previousModule, flowModule.id, $flowStore, $previewArgs, false);
|
|
57
55
|
function onKeyDown(event) {
|
|
58
56
|
if ((event.ctrlKey || event.metaKey) && event.key == 'Enter') {
|
|
59
57
|
event.preventDefault();
|
|
@@ -93,6 +91,7 @@ afterUpdate(() => {
|
|
|
93
91
|
});
|
|
94
92
|
let isScript = true;
|
|
95
93
|
$: isScript != (value.type === 'script') && (isScript = value.type === 'script');
|
|
94
|
+
let forceReload = 0;
|
|
96
95
|
</script>
|
|
97
96
|
|
|
98
97
|
<svelte:window on:keydown={onKeyDown} />
|
|
@@ -112,11 +111,22 @@ $: isScript != (value.type === 'script') && (isScript = value.type === 'script')
|
|
|
112
111
|
flowModule = module
|
|
113
112
|
$flowStateStore[module.id] = state
|
|
114
113
|
}}
|
|
114
|
+
on:reload={async () => {
|
|
115
|
+
if (flowModule.value.type == 'script') {
|
|
116
|
+
console.log('reload')
|
|
117
|
+
if (flowModule.value.hash != undefined) {
|
|
118
|
+
flowModule.value.hash = await getLatestHashForScript(flowModule.value.path)
|
|
119
|
+
}
|
|
120
|
+
forceReload++
|
|
121
|
+
await reload(flowModule)
|
|
122
|
+
}
|
|
123
|
+
}}
|
|
115
124
|
on:createScriptFromInlineScript={async () => {
|
|
116
125
|
const [module, state] = await createScriptFromInlineScript(
|
|
117
126
|
flowModule,
|
|
118
127
|
$selectedId,
|
|
119
|
-
$flowStateStore[flowModule.id].schema
|
|
128
|
+
$flowStateStore[flowModule.id].schema,
|
|
129
|
+
$flowStore
|
|
120
130
|
)
|
|
121
131
|
flowModule = module
|
|
122
132
|
$flowStateStore[module.id] = state
|
|
@@ -131,7 +141,7 @@ $: isScript != (value.type === 'script') && (isScript = value.type === 'script')
|
|
|
131
141
|
{editor}
|
|
132
142
|
lang={value['language'] ?? 'deno'}
|
|
133
143
|
{websocketAlive}
|
|
134
|
-
iconOnly={width <
|
|
144
|
+
iconOnly={width < 850}
|
|
135
145
|
/>
|
|
136
146
|
</div>
|
|
137
147
|
{/if}
|
|
@@ -168,10 +178,13 @@ $: isScript != (value.type === 'script') && (isScript = value.type === 'script')
|
|
|
168
178
|
await reload(flowModule)
|
|
169
179
|
}}
|
|
170
180
|
formatAction={() => reload(flowModule)}
|
|
181
|
+
fixedOverflowWidgets
|
|
171
182
|
/>
|
|
172
183
|
</div>
|
|
173
184
|
{:else if value.type === 'script'}
|
|
174
|
-
|
|
185
|
+
{#key forceReload}
|
|
186
|
+
<FlowModuleScript path={value.path} hash={value.hash} />
|
|
187
|
+
{/key}
|
|
175
188
|
{:else if value.type === 'flow'}
|
|
176
189
|
<FlowPathViewer path={value.path} />
|
|
177
190
|
{/if}
|
|
@@ -189,9 +202,8 @@ $: isScript != (value.type === 'script') && (isScript = value.type === 'script')
|
|
|
189
202
|
pickableProperties={stepPropPicker.pickableProperties}
|
|
190
203
|
error={failureModule}
|
|
191
204
|
>
|
|
192
|
-
<
|
|
205
|
+
<InputTransformSchemaForm
|
|
193
206
|
schema={$flowStateStore[$selectedId]?.schema ?? {}}
|
|
194
|
-
inputTransform={true}
|
|
195
207
|
previousModuleId={previousModule?.id}
|
|
196
208
|
bind:args={value.input_transforms}
|
|
197
209
|
bind:extraLib={stepPropPicker.extraLib}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script>import SimpleEditor from '../../SimpleEditor.svelte';
|
|
2
2
|
import Toggle from '../../Toggle.svelte';
|
|
3
3
|
import PropPickerWrapper from '../propPicker/PropPickerWrapper.svelte';
|
|
4
|
-
import { flowStateStore } from '../flowState';
|
|
5
4
|
import Tooltip from '../../Tooltip.svelte';
|
|
6
5
|
import { NEVER_TESTED_THIS_FAR } from '../utils';
|
|
6
|
+
import { getContext } from 'svelte';
|
|
7
|
+
const { flowStateStore } = getContext('FlowEditorContext');
|
|
7
8
|
export let flowModule;
|
|
8
9
|
let editor = undefined;
|
|
9
10
|
$: isStopAfterIfEnabled = Boolean(flowModule.stop_after_if);
|
|
@@ -51,6 +52,7 @@ $: result = $flowStateStore[flowModule.id]?.previewResult ?? NEVER_TESTED_THIS_F
|
|
|
51
52
|
pickableProperties={undefined}
|
|
52
53
|
on:select={({ detail }) => {
|
|
53
54
|
editor?.insertAtCursor(detail)
|
|
55
|
+
editor?.focus()
|
|
54
56
|
}}
|
|
55
57
|
>
|
|
56
58
|
<SimpleEditor
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<script>import Button from '../../common/button/Button.svelte';
|
|
2
|
-
import { faCodeBranch, faSave } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
-
import { createEventDispatcher } from 'svelte';
|
|
2
|
+
import { faCodeBranch, faPen, faSave } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
+
import { createEventDispatcher, getContext } from 'svelte';
|
|
4
4
|
import { Bed, PhoneIncoming, Repeat, Square } from 'lucide-svelte';
|
|
5
5
|
import Popover from '../../Popover.svelte';
|
|
6
|
+
import { getLatestHashForScript, sendUserToast } from '../../../utils';
|
|
6
7
|
export let module;
|
|
8
|
+
const { scriptEditorDrawer } = getContext('FlowEditorContext');
|
|
7
9
|
const dispatch = createEventDispatcher();
|
|
8
10
|
$: moduleRetry = module.retry?.constant || module.retry?.exponential;
|
|
9
11
|
</script>
|
|
10
12
|
|
|
11
13
|
<div class="flex flex-row space-x-2">
|
|
12
|
-
{#if module.value.type === 'script' || module.value.type === 'rawscript'}
|
|
14
|
+
{#if module.value.type === 'script' || module.value.type === 'rawscript' || module.value.type == 'flow'}
|
|
13
15
|
<Popover
|
|
14
16
|
placement="bottom"
|
|
15
17
|
class="center-center rounded border p-2
|
|
@@ -57,6 +59,27 @@ $: moduleRetry = module.retry?.constant || module.retry?.exponential;
|
|
|
57
59
|
{/if}
|
|
58
60
|
{#if module.value.type === 'script'}
|
|
59
61
|
<div class="w-2" />
|
|
62
|
+
{#if !module.value.path.startsWith('hub/')}
|
|
63
|
+
<Button
|
|
64
|
+
size="xs"
|
|
65
|
+
color="light"
|
|
66
|
+
variant="border"
|
|
67
|
+
on:click={async () => {
|
|
68
|
+
if (module.value.type == 'script') {
|
|
69
|
+
const hash = module.value.hash ?? (await getLatestHashForScript(module.value.path))
|
|
70
|
+
$scriptEditorDrawer?.openDrawer(hash, () => {
|
|
71
|
+
dispatch('reload')
|
|
72
|
+
sendUserToast('Script has been updated')
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
}}
|
|
76
|
+
startIcon={{ icon: faPen }}
|
|
77
|
+
iconOnly={false}
|
|
78
|
+
disabled={module.value.hash != undefined}
|
|
79
|
+
>
|
|
80
|
+
Edit {#if module.value.hash != undefined} (locked hash){/if}
|
|
81
|
+
</Button>
|
|
82
|
+
{/if}
|
|
60
83
|
<Button
|
|
61
84
|
size="xs"
|
|
62
85
|
color="light"
|
|
@@ -3,11 +3,10 @@ import Toggle from '../../Toggle.svelte';
|
|
|
3
3
|
import Tooltip from '../../Tooltip.svelte';
|
|
4
4
|
import { emptySchema } from '../../../utils';
|
|
5
5
|
import { getContext } from 'svelte';
|
|
6
|
-
import { flowStateStore } from '../flowState';
|
|
7
6
|
import PropPickerWrapper from '../propPicker/PropPickerWrapper.svelte';
|
|
8
7
|
export let flowModule;
|
|
9
8
|
export let previousModuleId;
|
|
10
|
-
const { selectedId } = getContext('FlowEditorContext');
|
|
9
|
+
const { selectedId, flowStateStore } = getContext('FlowEditorContext');
|
|
11
10
|
let schema = emptySchema();
|
|
12
11
|
schema.properties['sleep'] = {
|
|
13
12
|
type: 'number',
|
|
@@ -53,6 +52,7 @@ $: isSleepEnabled = Boolean(flowModule.sleep);
|
|
|
53
52
|
pickableProperties={undefined}
|
|
54
53
|
on:select={({ detail }) => {
|
|
55
54
|
editor?.insertAtCursor(detail)
|
|
55
|
+
editor?.focus()
|
|
56
56
|
}}
|
|
57
57
|
>
|
|
58
58
|
<InputTransformForm
|
|
@@ -6,12 +6,11 @@ import FlowBranchAllWrapper from './FlowBranchAllWrapper.svelte';
|
|
|
6
6
|
import FlowBranchOneWrapper from './FlowBranchOneWrapper.svelte';
|
|
7
7
|
import { createInlineScriptModule, pickFlow, pickScript } from '../flowStateUtils';
|
|
8
8
|
import FlowInputs from './FlowInputs.svelte';
|
|
9
|
-
import { flowStateStore } from '../flowState';
|
|
10
9
|
import { Alert } from '../../common';
|
|
11
10
|
import FlowInputsFlow from './FlowInputsFlow.svelte';
|
|
12
11
|
import FlowBranchesAllWrapper from './FlowBranchesAllWrapper.svelte';
|
|
13
12
|
import FlowBranchesOneWrapper from './FlowBranchesOneWrapper.svelte';
|
|
14
|
-
const { selectedId, schedule } = getContext('FlowEditorContext');
|
|
13
|
+
const { selectedId, schedule, flowStateStore } = getContext('FlowEditorContext');
|
|
15
14
|
export let flowModule;
|
|
16
15
|
// These pointers are used to easily access previewArgs of parent module, and previous module
|
|
17
16
|
// Pointer to parent module, only defined within Branches or Loops.
|
|
@@ -30,12 +29,7 @@ export let previousModule = undefined;
|
|
|
30
29
|
{:else if flowModule.value.type === 'identity'}
|
|
31
30
|
{#if $selectedId == 'failure'}
|
|
32
31
|
<Alert type="info" title="Error handlers are triggered upon non recovered errors">
|
|
33
|
-
If defined, the error handler will take
|
|
34
|
-
has its error in the 'error field').
|
|
35
|
-
<br />
|
|
36
|
-
<br />
|
|
37
|
-
Steps are retried until they succeed, or until the maximum number of retries defined for that
|
|
38
|
-
spec is reached, at which point the error handler is called.
|
|
32
|
+
If defined, the error handler will take the error as input.
|
|
39
33
|
</Alert>
|
|
40
34
|
{/if}
|
|
41
35
|
|
|
@@ -3,8 +3,7 @@ import SchemaForm from '../../SchemaForm.svelte';
|
|
|
3
3
|
import Toggle from '../../Toggle.svelte';
|
|
4
4
|
import { emptyString } from '../../../utils';
|
|
5
5
|
import { getContext } from 'svelte';
|
|
6
|
-
|
|
7
|
-
const { schedule } = getContext('FlowEditorContext');
|
|
6
|
+
const { schedule, flowStore } = getContext('FlowEditorContext');
|
|
8
7
|
</script>
|
|
9
8
|
|
|
10
9
|
<CronInput bind:schedule={$schedule.cron} />
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
<script>import Tabs from '../../common/tabs/Tabs.svelte';
|
|
2
2
|
import Tab from '../../common/tabs/Tab.svelte';
|
|
3
3
|
import TabContent from '../../common/tabs/TabContent.svelte';
|
|
4
|
-
import { flowStore } from '../flowStore';
|
|
5
4
|
import Path from '../../Path.svelte';
|
|
6
5
|
import Required from '../../Required.svelte';
|
|
7
6
|
import FlowCard from '../common/FlowCard.svelte';
|
|
8
7
|
import FlowSchedules from './FlowSchedules.svelte';
|
|
9
8
|
import Toggle from '../../Toggle.svelte';
|
|
10
9
|
import { Alert } from '../../common';
|
|
11
|
-
import { FlowGraph } from '../../graph';
|
|
12
10
|
import { getContext } from 'svelte';
|
|
13
11
|
import autosize from 'svelte-autosize';
|
|
14
12
|
import Slider from '../../Slider.svelte';
|
|
@@ -17,9 +15,8 @@ import { workspaceStore } from '../../../stores';
|
|
|
17
15
|
import { copyToClipboard } from '../../../utils';
|
|
18
16
|
import { Icon } from 'svelte-awesome';
|
|
19
17
|
import { faClipboard } from '@fortawesome/free-solid-svg-icons';
|
|
20
|
-
const { selectedId } = getContext('FlowEditorContext');
|
|
18
|
+
const { selectedId, flowStore } = getContext('FlowEditorContext');
|
|
21
19
|
export let initialPath;
|
|
22
|
-
let topHeight = 0;
|
|
23
20
|
$: url = `${$page.url.hostname}/api/w/${$workspaceStore}/jobs/run/f/${$flowStore?.path}`;
|
|
24
21
|
</script>
|
|
25
22
|
|
|
@@ -30,7 +27,6 @@ $: url = `${$page.url.hostname}/api/w/${$workspaceStore}/jobs/run/f/${$flowStore
|
|
|
30
27
|
<Tab value="settings-metadata">Metadata</Tab>
|
|
31
28
|
<Tab value="settings-schedule">Schedule</Tab>
|
|
32
29
|
<Tab value="settings-same-worker">Shared Directory</Tab>
|
|
33
|
-
<Tab value="settings-graph">Graph</Tab>
|
|
34
30
|
|
|
35
31
|
<svelte:fragment slot="content">
|
|
36
32
|
<TabContent value="settings-metadata" class="p-4 h-full">
|
|
@@ -82,18 +78,22 @@ $: url = `${$page.url.hostname}/api/w/${$workspaceStore}/jobs/run/f/${$flowStore
|
|
|
82
78
|
</a>
|
|
83
79
|
</li>
|
|
84
80
|
<li class="mt-2">
|
|
85
|
-
<div class="flex flex-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
81
|
+
<div class="flex flex-col gap-2">
|
|
82
|
+
<p>
|
|
83
|
+
2. Use a trigger script and schedule this flow to run as frequently as
|
|
84
|
+
needed and compare a state persisted in Windmill to the state of the
|
|
85
|
+
external system. If a difference is detected, then the rest of the flow is
|
|
86
|
+
triggered. Oftentimes, the second step of a flow is a for-loop that will
|
|
87
|
+
iterate over every elements. When using a trigger, a default schedule will
|
|
88
|
+
be created.
|
|
89
|
+
</p>
|
|
90
|
+
<div>
|
|
91
|
+
<img
|
|
92
|
+
class="shadow-lg border rounded"
|
|
93
|
+
alt="static button"
|
|
94
|
+
src="/trigger_button.png"
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
97
|
</div>
|
|
98
98
|
</li></ul
|
|
99
99
|
>
|
|
@@ -125,26 +125,6 @@ $: url = `${$page.url.hostname}/api/w/${$workspaceStore}/jobs/run/f/${$flowStore
|
|
|
125
125
|
}}
|
|
126
126
|
/>
|
|
127
127
|
</TabContent>
|
|
128
|
-
<TabContent value="settings-graph">
|
|
129
|
-
<div
|
|
130
|
-
bind:clientHeight={topHeight}
|
|
131
|
-
class="max-w-full w-full overflow-hidden h-screen bg-gray-50"
|
|
132
|
-
>
|
|
133
|
-
{#if $flowStore.value.modules}
|
|
134
|
-
<FlowGraph
|
|
135
|
-
on:click={(e) => {
|
|
136
|
-
if (e.detail.id) {
|
|
137
|
-
$selectedId = e.detail.id
|
|
138
|
-
}
|
|
139
|
-
}}
|
|
140
|
-
minHeight={topHeight}
|
|
141
|
-
modules={$flowStore.value.modules}
|
|
142
|
-
failureModule={$flowStore.value.failure_module}
|
|
143
|
-
notSelectable
|
|
144
|
-
/>
|
|
145
|
-
{/if}
|
|
146
|
-
</div>
|
|
147
|
-
</TabContent>
|
|
148
128
|
</svelte:fragment>
|
|
149
129
|
</Tabs>
|
|
150
130
|
</div>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script>import { Button, Drawer, DrawerContent } from '../../common';
|
|
2
|
+
import ScriptEditor from '../../ScriptEditor.svelte';
|
|
3
|
+
import { ScriptService } from '../../../gen';
|
|
4
|
+
import { inferArgs } from '../../../infer';
|
|
5
|
+
import { workspaceStore } from '../../../stores';
|
|
6
|
+
import { emptySchema, getScriptByPath, sendUserToast } from '../../../utils';
|
|
7
|
+
import { faSave } from '@fortawesome/free-solid-svg-icons';
|
|
8
|
+
import { Loader2 } from 'lucide-svelte';
|
|
9
|
+
import { createEventDispatcher } from 'svelte';
|
|
10
|
+
import { fade } from 'svelte/transition';
|
|
11
|
+
let scriptEditorDrawer;
|
|
12
|
+
const dispatch = createEventDispatcher();
|
|
13
|
+
export async function openDrawer(hash, cb) {
|
|
14
|
+
script = undefined;
|
|
15
|
+
scriptEditorDrawer.openDrawer?.();
|
|
16
|
+
script = await ScriptService.getScriptByHash({
|
|
17
|
+
workspace: $workspaceStore,
|
|
18
|
+
hash
|
|
19
|
+
});
|
|
20
|
+
callback = cb;
|
|
21
|
+
}
|
|
22
|
+
let callback = undefined;
|
|
23
|
+
let script = undefined;
|
|
24
|
+
async function saveScript() {
|
|
25
|
+
if (script) {
|
|
26
|
+
try {
|
|
27
|
+
script.schema = script.schema ?? emptySchema();
|
|
28
|
+
try {
|
|
29
|
+
await inferArgs(script.language, script.content, script.schema);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
sendUserToast(`Impossible to infer the schema. Assuming this is a script without main function`, true);
|
|
33
|
+
}
|
|
34
|
+
await ScriptService.createScript({
|
|
35
|
+
workspace: $workspaceStore,
|
|
36
|
+
requestBody: {
|
|
37
|
+
path: script.path,
|
|
38
|
+
summary: script.summary,
|
|
39
|
+
description: script.description ?? '',
|
|
40
|
+
content: script.content,
|
|
41
|
+
parent_hash: script.hash != '' ? script.hash : undefined,
|
|
42
|
+
schema: script.schema,
|
|
43
|
+
is_template: false,
|
|
44
|
+
language: script.language,
|
|
45
|
+
kind: script.kind
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
callback?.();
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
sendUserToast(`Impossible to save the script: ${error.body}`, true);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<Drawer bind:this={scriptEditorDrawer} size="1200px">
|
|
58
|
+
<DrawerContent
|
|
59
|
+
title="Script Editor"
|
|
60
|
+
noPadding
|
|
61
|
+
forceOverflowVisible
|
|
62
|
+
on:close={() => {
|
|
63
|
+
scriptEditorDrawer.closeDrawer()
|
|
64
|
+
}}
|
|
65
|
+
>
|
|
66
|
+
{#if script}
|
|
67
|
+
{#key script.hash}
|
|
68
|
+
<ScriptEditor
|
|
69
|
+
noSyncFromGithub
|
|
70
|
+
lang={script.language}
|
|
71
|
+
path={script.path}
|
|
72
|
+
fixedOverflowWidgets={false}
|
|
73
|
+
bind:code={script.content}
|
|
74
|
+
bind:schema={script.schema}
|
|
75
|
+
/>
|
|
76
|
+
{/key}
|
|
77
|
+
{:else}
|
|
78
|
+
<div
|
|
79
|
+
out:fade={{ duration: 200 }}
|
|
80
|
+
class="absolute inset-0 center-center flex-col bg-white text-gray-600 border"
|
|
81
|
+
>
|
|
82
|
+
<Loader2 class="animate-spin" size={16} />
|
|
83
|
+
<span class="text-xs mt-1">Loading</span>
|
|
84
|
+
</div>
|
|
85
|
+
{/if}
|
|
86
|
+
<svelte:fragment slot="actions">
|
|
87
|
+
<Button
|
|
88
|
+
on:click={async () => {
|
|
89
|
+
await saveScript()
|
|
90
|
+
dispatch('save')
|
|
91
|
+
scriptEditorDrawer.closeDrawer()
|
|
92
|
+
}}
|
|
93
|
+
disabled={!script}
|
|
94
|
+
startIcon={{ icon: faSave }}>Save</Button
|
|
95
|
+
>
|
|
96
|
+
</svelte:fragment>
|
|
97
|
+
</DrawerContent>
|
|
98
|
+
</Drawer>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
openDrawer?: ((hash: string, cb: () => void) => Promise<void>) | undefined;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
save: CustomEvent<any>;
|
|
8
|
+
} & {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export type ScriptEditorDrawerProps = typeof __propDef.props;
|
|
14
|
+
export type ScriptEditorDrawerEvents = typeof __propDef.events;
|
|
15
|
+
export type ScriptEditorDrawerSlots = typeof __propDef.slots;
|
|
16
|
+
export default class ScriptEditorDrawer extends SvelteComponentTyped<ScriptEditorDrawerProps, ScriptEditorDrawerEvents, ScriptEditorDrawerSlots> {
|
|
17
|
+
get openDrawer(): (hash: string, cb: () => void) => Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export {};
|