next-workflow-builder 0.1.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/dist/client/components/ai-elements/canvas.d.ts +9 -0
- package/dist/client/components/ai-elements/canvas.d.ts.map +1 -0
- package/dist/client/components/ai-elements/canvas.js +7 -0
- package/dist/client/components/ai-elements/canvas.js.map +1 -0
- package/dist/client/components/ai-elements/connection.d.ts +3 -0
- package/dist/client/components/ai-elements/connection.d.ts.map +1 -0
- package/dist/client/components/ai-elements/connection.js +4 -0
- package/dist/client/components/ai-elements/connection.js.map +1 -0
- package/dist/client/components/ai-elements/controls.d.ts +2 -0
- package/dist/client/components/ai-elements/controls.d.ts.map +1 -0
- package/dist/client/components/ai-elements/controls.js +26 -0
- package/dist/client/components/ai-elements/controls.js.map +1 -0
- package/dist/client/components/ai-elements/edge.d.ts +6 -0
- package/dist/client/components/ai-elements/edge.d.ts.map +1 -0
- package/dist/client/components/ai-elements/edge.js +86 -0
- package/dist/client/components/ai-elements/edge.js.map +1 -0
- package/dist/client/components/ai-elements/node.d.ts +23 -0
- package/dist/client/components/ai-elements/node.d.ts.map +1 -0
- package/dist/client/components/ai-elements/node.js +13 -0
- package/dist/client/components/ai-elements/node.js.map +1 -0
- package/dist/client/components/ai-elements/panel.d.ts +6 -0
- package/dist/client/components/ai-elements/panel.d.ts.map +1 -0
- package/dist/client/components/ai-elements/panel.js +5 -0
- package/dist/client/components/ai-elements/panel.js.map +1 -0
- package/dist/client/components/ai-elements/prompt.d.ts +7 -0
- package/dist/client/components/ai-elements/prompt.d.ts.map +1 -0
- package/dist/client/components/ai-elements/prompt.js +220 -0
- package/dist/client/components/ai-elements/prompt.js.map +1 -0
- package/dist/client/components/ai-elements/shimmer.d.ts +10 -0
- package/dist/client/components/ai-elements/shimmer.d.ts.map +1 -0
- package/dist/client/components/ai-elements/shimmer.js +19 -0
- package/dist/client/components/ai-elements/shimmer.js.map +1 -0
- package/dist/client/components/auth/dialog.d.ts +8 -0
- package/dist/client/components/auth/dialog.d.ts.map +1 -0
- package/dist/client/components/auth/dialog.js +181 -0
- package/dist/client/components/auth/dialog.js.map +1 -0
- package/dist/client/components/deploy-button.d.ts +2 -0
- package/dist/client/components/deploy-button.d.ts.map +1 -0
- package/dist/client/components/deploy-button.js +8 -0
- package/dist/client/components/deploy-button.js.map +1 -0
- package/dist/client/components/global-modals.d.ts +2 -0
- package/dist/client/components/global-modals.d.ts.map +1 -0
- package/dist/client/components/global-modals.js +8 -0
- package/dist/client/components/global-modals.js.map +1 -0
- package/dist/client/components/icons/github-icon.d.ts +4 -0
- package/dist/client/components/icons/github-icon.d.ts.map +1 -0
- package/dist/client/components/icons/github-icon.js +5 -0
- package/dist/client/components/icons/github-icon.js.map +1 -0
- package/dist/client/components/index.d.ts +7 -0
- package/dist/client/components/index.d.ts.map +1 -0
- package/dist/client/components/index.js +8 -0
- package/dist/client/components/index.js.map +1 -0
- package/dist/client/components/layout-provider.d.ts +4 -0
- package/dist/client/components/layout-provider.d.ts.map +1 -0
- package/dist/client/components/layout-provider.js +20 -0
- package/dist/client/components/layout-provider.js.map +1 -0
- package/dist/client/components/overlays/add-connection-overlay.d.ts +14 -0
- package/dist/client/components/overlays/add-connection-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/add-connection-overlay.js +218 -0
- package/dist/client/components/overlays/add-connection-overlay.js.map +1 -0
- package/dist/client/components/overlays/api-keys-overlay.d.ts +6 -0
- package/dist/client/components/overlays/api-keys-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/api-keys-overlay.js +124 -0
- package/dist/client/components/overlays/api-keys-overlay.js.map +1 -0
- package/dist/client/components/overlays/configuration-overlay.d.ts +5 -0
- package/dist/client/components/overlays/configuration-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/configuration-overlay.js +325 -0
- package/dist/client/components/overlays/configuration-overlay.js.map +1 -0
- package/dist/client/components/overlays/confirm-overlay.d.ts +15 -0
- package/dist/client/components/overlays/confirm-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/confirm-overlay.js +31 -0
- package/dist/client/components/overlays/confirm-overlay.js.map +1 -0
- package/dist/client/components/overlays/edit-connection-overlay.d.ts +16 -0
- package/dist/client/components/overlays/edit-connection-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/edit-connection-overlay.js +213 -0
- package/dist/client/components/overlays/edit-connection-overlay.js.map +1 -0
- package/dist/client/components/overlays/export-workflow-overlay.d.ts +8 -0
- package/dist/client/components/overlays/export-workflow-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/export-workflow-overlay.js +22 -0
- package/dist/client/components/overlays/export-workflow-overlay.js.map +1 -0
- package/dist/client/components/overlays/integrations-overlay.d.ts +6 -0
- package/dist/client/components/overlays/integrations-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/integrations-overlay.js +56 -0
- package/dist/client/components/overlays/integrations-overlay.js.map +1 -0
- package/dist/client/components/overlays/make-public-overlay.d.ts +7 -0
- package/dist/client/components/overlays/make-public-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/make-public-overlay.js +17 -0
- package/dist/client/components/overlays/make-public-overlay.js.map +1 -0
- package/dist/client/components/overlays/overlay-container.d.ts +2 -0
- package/dist/client/components/overlays/overlay-container.d.ts.map +1 -0
- package/dist/client/components/overlays/overlay-container.js +236 -0
- package/dist/client/components/overlays/overlay-container.js.map +1 -0
- package/dist/client/components/overlays/overlay-footer.d.ts +3 -0
- package/dist/client/components/overlays/overlay-footer.d.ts.map +1 -0
- package/dist/client/components/overlays/overlay-footer.js +25 -0
- package/dist/client/components/overlays/overlay-footer.js.map +1 -0
- package/dist/client/components/overlays/overlay-header.d.ts +8 -0
- package/dist/client/components/overlays/overlay-header.d.ts.map +1 -0
- package/dist/client/components/overlays/overlay-header.js +32 -0
- package/dist/client/components/overlays/overlay-header.js.map +1 -0
- package/dist/client/components/overlays/overlay-provider.d.ts +17 -0
- package/dist/client/components/overlays/overlay-provider.d.ts.map +1 -0
- package/dist/client/components/overlays/overlay-provider.js +120 -0
- package/dist/client/components/overlays/overlay-provider.js.map +1 -0
- package/dist/client/components/overlays/overlay-sync.d.ts +2 -0
- package/dist/client/components/overlays/overlay-sync.d.ts.map +1 -0
- package/dist/client/components/overlays/overlay-sync.js +21 -0
- package/dist/client/components/overlays/overlay-sync.js.map +1 -0
- package/dist/client/components/overlays/overlay.d.ts +7 -0
- package/dist/client/components/overlays/overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/overlay.js +9 -0
- package/dist/client/components/overlays/overlay.js.map +1 -0
- package/dist/client/components/overlays/settings-overlay.d.ts +6 -0
- package/dist/client/components/overlays/settings-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/settings-overlay.js +64 -0
- package/dist/client/components/overlays/settings-overlay.js.map +1 -0
- package/dist/client/components/overlays/types.d.ts +64 -0
- package/dist/client/components/overlays/types.d.ts.map +1 -0
- package/dist/client/components/overlays/types.js +2 -0
- package/dist/client/components/overlays/types.js.map +1 -0
- package/dist/client/components/overlays/workflow-issues-overlay.d.ts +37 -0
- package/dist/client/components/overlays/workflow-issues-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/workflow-issues-overlay.js +67 -0
- package/dist/client/components/overlays/workflow-issues-overlay.js.map +1 -0
- package/dist/client/components/pages/home-page.d.ts +3 -0
- package/dist/client/components/pages/home-page.d.ts.map +1 -0
- package/dist/client/components/pages/home-page.js +100 -0
- package/dist/client/components/pages/home-page.js.map +1 -0
- package/dist/client/components/pages/workflow-page.d.ts +4 -0
- package/dist/client/components/pages/workflow-page.d.ts.map +1 -0
- package/dist/client/components/pages/workflow-page.js +23 -0
- package/dist/client/components/pages/workflow-page.js.map +1 -0
- package/dist/client/components/pages/workflows-redirect.d.ts +3 -0
- package/dist/client/components/pages/workflows-redirect.d.ts.map +1 -0
- package/dist/client/components/pages/workflows-redirect.js +30 -0
- package/dist/client/components/pages/workflows-redirect.js.map +1 -0
- package/dist/client/components/settings/account-settings.d.ts +9 -0
- package/dist/client/components/settings/account-settings.d.ts.map +1 -0
- package/dist/client/components/settings/account-settings.js +8 -0
- package/dist/client/components/settings/account-settings.js.map +1 -0
- package/dist/client/components/settings/integrations-manager.d.ts +7 -0
- package/dist/client/components/settings/integrations-manager.d.ts.map +1 -0
- package/dist/client/components/settings/integrations-manager.js +120 -0
- package/dist/client/components/settings/integrations-manager.js.map +1 -0
- package/dist/client/components/theme-provider.d.ts +5 -0
- package/dist/client/components/theme-provider.d.ts.map +1 -0
- package/dist/client/components/theme-provider.js +6 -0
- package/dist/client/components/theme-provider.js.map +1 -0
- package/dist/client/components/ui/alert-dialog.d.ts +15 -0
- package/dist/client/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/client/components/ui/alert-dialog.js +40 -0
- package/dist/client/components/ui/alert-dialog.js.map +1 -0
- package/dist/client/components/ui/alert.d.ts +10 -0
- package/dist/client/components/ui/alert.d.ts.map +1 -0
- package/dist/client/components/ui/alert.js +25 -0
- package/dist/client/components/ui/alert.js.map +1 -0
- package/dist/client/components/ui/animated-border.d.ts +6 -0
- package/dist/client/components/ui/animated-border.d.ts.map +1 -0
- package/dist/client/components/ui/animated-border.js +34 -0
- package/dist/client/components/ui/animated-border.js.map +1 -0
- package/dist/client/components/ui/avatar.d.ts +7 -0
- package/dist/client/components/ui/avatar.d.ts.map +1 -0
- package/dist/client/components/ui/avatar.js +15 -0
- package/dist/client/components/ui/avatar.js.map +1 -0
- package/dist/client/components/ui/button-group.d.ts +12 -0
- package/dist/client/components/ui/button-group.d.ts.map +1 -0
- package/dist/client/components/ui/button-group.js +28 -0
- package/dist/client/components/ui/button-group.js.map +1 -0
- package/dist/client/components/ui/button.d.ts +11 -0
- package/dist/client/components/ui/button.d.ts.map +1 -0
- package/dist/client/components/ui/button.js +34 -0
- package/dist/client/components/ui/button.js.map +1 -0
- package/dist/client/components/ui/card.d.ts +10 -0
- package/dist/client/components/ui/card.d.ts.map +1 -0
- package/dist/client/components/ui/card.js +25 -0
- package/dist/client/components/ui/card.js.map +1 -0
- package/dist/client/components/ui/checkbox.d.ts +5 -0
- package/dist/client/components/ui/checkbox.d.ts.map +1 -0
- package/dist/client/components/ui/checkbox.js +10 -0
- package/dist/client/components/ui/checkbox.js.map +1 -0
- package/dist/client/components/ui/code-editor.d.ts +3 -0
- package/dist/client/components/ui/code-editor.d.ts.map +1 -0
- package/dist/client/components/ui/code-editor.js +17 -0
- package/dist/client/components/ui/code-editor.js.map +1 -0
- package/dist/client/components/ui/collapsible.d.ts +6 -0
- package/dist/client/components/ui/collapsible.d.ts.map +1 -0
- package/dist/client/components/ui/collapsible.js +14 -0
- package/dist/client/components/ui/collapsible.js.map +1 -0
- package/dist/client/components/ui/context-menu.d.ts +26 -0
- package/dist/client/components/ui/context-menu.d.ts.map +1 -0
- package/dist/client/components/ui/context-menu.js +52 -0
- package/dist/client/components/ui/context-menu.js.map +1 -0
- package/dist/client/components/ui/dialog.d.ts +16 -0
- package/dist/client/components/ui/dialog.d.ts.map +1 -0
- package/dist/client/components/ui/dialog.js +37 -0
- package/dist/client/components/ui/dialog.js.map +1 -0
- package/dist/client/components/ui/drawer.d.ts +14 -0
- package/dist/client/components/ui/drawer.d.ts.map +1 -0
- package/dist/client/components/ui/drawer.js +36 -0
- package/dist/client/components/ui/drawer.js.map +1 -0
- package/dist/client/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/client/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/client/components/ui/dropdown-menu.js +52 -0
- package/dist/client/components/ui/dropdown-menu.js.map +1 -0
- package/dist/client/components/ui/input.d.ts +4 -0
- package/dist/client/components/ui/input.d.ts.map +1 -0
- package/dist/client/components/ui/input.js +7 -0
- package/dist/client/components/ui/input.js.map +1 -0
- package/dist/client/components/ui/integration-icon.d.ts +7 -0
- package/dist/client/components/ui/integration-icon.d.ts.map +1 -0
- package/dist/client/components/ui/integration-icon.js +25 -0
- package/dist/client/components/ui/integration-icon.js.map +1 -0
- package/dist/client/components/ui/integration-selector.d.ts +12 -0
- package/dist/client/components/ui/integration-selector.d.ts.map +1 -0
- package/dist/client/components/ui/integration-selector.js +198 -0
- package/dist/client/components/ui/integration-selector.js.map +1 -0
- package/dist/client/components/ui/label.d.ts +5 -0
- package/dist/client/components/ui/label.d.ts.map +1 -0
- package/dist/client/components/ui/label.js +9 -0
- package/dist/client/components/ui/label.js.map +1 -0
- package/dist/client/components/ui/resizable.d.ts +9 -0
- package/dist/client/components/ui/resizable.d.ts.map +1 -0
- package/dist/client/components/ui/resizable.js +16 -0
- package/dist/client/components/ui/resizable.js.map +1 -0
- package/dist/client/components/ui/select.d.ts +16 -0
- package/dist/client/components/ui/select.d.ts.map +1 -0
- package/dist/client/components/ui/select.js +39 -0
- package/dist/client/components/ui/select.js.map +1 -0
- package/dist/client/components/ui/separator.d.ts +5 -0
- package/dist/client/components/ui/separator.d.ts.map +1 -0
- package/dist/client/components/ui/separator.js +9 -0
- package/dist/client/components/ui/separator.js.map +1 -0
- package/dist/client/components/ui/sheet.d.ts +14 -0
- package/dist/client/components/ui/sheet.d.ts.map +1 -0
- package/dist/client/components/ui/sheet.js +41 -0
- package/dist/client/components/ui/sheet.js.map +1 -0
- package/dist/client/components/ui/sonner.d.ts +4 -0
- package/dist/client/components/ui/sonner.d.ts.map +1 -0
- package/dist/client/components/ui/sonner.js +22 -0
- package/dist/client/components/ui/sonner.js.map +1 -0
- package/dist/client/components/ui/spinner.d.ts +4 -0
- package/dist/client/components/ui/spinner.d.ts.map +1 -0
- package/dist/client/components/ui/spinner.js +9 -0
- package/dist/client/components/ui/spinner.js.map +1 -0
- package/dist/client/components/ui/tabs.d.ts +8 -0
- package/dist/client/components/ui/tabs.d.ts.map +1 -0
- package/dist/client/components/ui/tabs.js +18 -0
- package/dist/client/components/ui/tabs.js.map +1 -0
- package/dist/client/components/ui/template-autocomplete.d.ts +14 -0
- package/dist/client/components/ui/template-autocomplete.d.ts.map +1 -0
- package/dist/client/components/ui/template-autocomplete.js +239 -0
- package/dist/client/components/ui/template-autocomplete.js.map +1 -0
- package/dist/client/components/ui/template-badge-input.d.ts +10 -0
- package/dist/client/components/ui/template-badge-input.d.ts.map +1 -0
- package/dist/client/components/ui/template-badge-input.js +360 -0
- package/dist/client/components/ui/template-badge-input.js.map +1 -0
- package/dist/client/components/ui/template-badge-textarea.d.ts +11 -0
- package/dist/client/components/ui/template-badge-textarea.d.ts.map +1 -0
- package/dist/client/components/ui/template-badge-textarea.js +431 -0
- package/dist/client/components/ui/template-badge-textarea.js.map +1 -0
- package/dist/client/components/ui/timezone-select.d.ts +9 -0
- package/dist/client/components/ui/timezone-select.d.ts.map +1 -0
- package/dist/client/components/ui/timezone-select.js +87 -0
- package/dist/client/components/ui/timezone-select.js.map +1 -0
- package/dist/client/components/ui/tooltip.d.ts +8 -0
- package/dist/client/components/ui/tooltip.d.ts.map +1 -0
- package/dist/client/components/ui/tooltip.js +18 -0
- package/dist/client/components/ui/tooltip.js.map +1 -0
- package/dist/client/components/ui/workflow-icon.d.ts +4 -0
- package/dist/client/components/ui/workflow-icon.d.ts.map +1 -0
- package/dist/client/components/ui/workflow-icon.js +5 -0
- package/dist/client/components/ui/workflow-icon.js.map +1 -0
- package/dist/client/components/workflow/config/action-config-renderer.d.ts +10 -0
- package/dist/client/components/workflow/config/action-config-renderer.d.ts.map +1 -0
- package/dist/client/components/workflow/config/action-config-renderer.js +64 -0
- package/dist/client/components/workflow/config/action-config-renderer.js.map +1 -0
- package/dist/client/components/workflow/config/action-config.d.ts +9 -0
- package/dist/client/components/workflow/config/action-config.d.ts.map +1 -0
- package/dist/client/components/workflow/config/action-config.js +174 -0
- package/dist/client/components/workflow/config/action-config.js.map +1 -0
- package/dist/client/components/workflow/config/action-grid.d.ts +8 -0
- package/dist/client/components/workflow/config/action-grid.d.ts.map +1 -0
- package/dist/client/components/workflow/config/action-grid.js +162 -0
- package/dist/client/components/workflow/config/action-grid.js.map +1 -0
- package/dist/client/components/workflow/config/condition-config.d.ts +8 -0
- package/dist/client/components/workflow/config/condition-config.d.ts.map +1 -0
- package/dist/client/components/workflow/config/condition-config.js +7 -0
- package/dist/client/components/workflow/config/condition-config.js.map +1 -0
- package/dist/client/components/workflow/config/editor-config.d.ts +13 -0
- package/dist/client/components/workflow/config/editor-config.d.ts.map +1 -0
- package/dist/client/components/workflow/config/editor-config.js +34 -0
- package/dist/client/components/workflow/config/editor-config.js.map +1 -0
- package/dist/client/components/workflow/config/schema-builder.d.ts +17 -0
- package/dist/client/components/workflow/config/schema-builder.d.ts.map +1 -0
- package/dist/client/components/workflow/config/schema-builder.js +55 -0
- package/dist/client/components/workflow/config/schema-builder.js.map +1 -0
- package/dist/client/components/workflow/config/system-action.d.ts +9 -0
- package/dist/client/components/workflow/config/system-action.d.ts.map +1 -0
- package/dist/client/components/workflow/config/system-action.js +33 -0
- package/dist/client/components/workflow/config/system-action.js.map +1 -0
- package/dist/client/components/workflow/config/trigger-config.d.ts +9 -0
- package/dist/client/components/workflow/config/trigger-config.d.ts.map +1 -0
- package/dist/client/components/workflow/config/trigger-config.js +33 -0
- package/dist/client/components/workflow/config/trigger-config.js.map +1 -0
- package/dist/client/components/workflow/node-config-panel.d.ts +3 -0
- package/dist/client/components/workflow/node-config-panel.d.ts.map +1 -0
- package/dist/client/components/workflow/node-config-panel.js +353 -0
- package/dist/client/components/workflow/node-config-panel.js.map +1 -0
- package/dist/client/components/workflow/nodes/action-node.d.ts +10 -0
- package/dist/client/components/workflow/nodes/action-node.d.ts.map +1 -0
- package/dist/client/components/workflow/nodes/action-node.js +176 -0
- package/dist/client/components/workflow/nodes/action-node.js.map +1 -0
- package/dist/client/components/workflow/nodes/add-node.d.ts +9 -0
- package/dist/client/components/workflow/nodes/add-node.d.ts.map +1 -0
- package/dist/client/components/workflow/nodes/add-node.js +8 -0
- package/dist/client/components/workflow/nodes/add-node.js.map +1 -0
- package/dist/client/components/workflow/nodes/trigger-node.d.ts +8 -0
- package/dist/client/components/workflow/nodes/trigger-node.d.ts.map +1 -0
- package/dist/client/components/workflow/nodes/trigger-node.js +25 -0
- package/dist/client/components/workflow/nodes/trigger-node.js.map +1 -0
- package/dist/client/components/workflow/persistent-canvas.d.ts +2 -0
- package/dist/client/components/workflow/persistent-canvas.d.ts.map +1 -0
- package/dist/client/components/workflow/persistent-canvas.js +13 -0
- package/dist/client/components/workflow/persistent-canvas.js.map +1 -0
- package/dist/client/components/workflow/utils/code-generators.d.ts +12 -0
- package/dist/client/components/workflow/utils/code-generators.d.ts.map +1 -0
- package/dist/client/components/workflow/utils/code-generators.js +70 -0
- package/dist/client/components/workflow/utils/code-generators.js.map +1 -0
- package/dist/client/components/workflow/workflow-canvas.d.ts +3 -0
- package/dist/client/components/workflow/workflow-canvas.d.ts.map +1 -0
- package/dist/client/components/workflow/workflow-canvas.js +347 -0
- package/dist/client/components/workflow/workflow-canvas.js.map +1 -0
- package/dist/client/components/workflow/workflow-context-menu.d.ts +27 -0
- package/dist/client/components/workflow/workflow-context-menu.d.ts.map +1 -0
- package/dist/client/components/workflow/workflow-context-menu.js +156 -0
- package/dist/client/components/workflow/workflow-context-menu.js.map +1 -0
- package/dist/client/components/workflow/workflow-editor.d.ts +6 -0
- package/dist/client/components/workflow/workflow-editor.d.ts.map +1 -0
- package/dist/client/components/workflow/workflow-editor.js +443 -0
- package/dist/client/components/workflow/workflow-editor.js.map +1 -0
- package/dist/client/components/workflow/workflow-runs.d.ts +8 -0
- package/dist/client/components/workflow/workflow-runs.d.ts.map +1 -0
- package/dist/client/components/workflow/workflow-runs.js +336 -0
- package/dist/client/components/workflow/workflow-runs.js.map +1 -0
- package/dist/client/components/workflow/workflow-toolbar.d.ts +6 -0
- package/dist/client/components/workflow/workflow-toolbar.d.ts.map +1 -0
- package/dist/client/components/workflow/workflow-toolbar.js +707 -0
- package/dist/client/components/workflow/workflow-toolbar.js.map +1 -0
- package/dist/client/components/workflows/user-menu.d.ts +2 -0
- package/dist/client/components/workflows/user-menu.d.ts.map +1 -0
- package/dist/client/components/workflows/user-menu.js +65 -0
- package/dist/client/components/workflows/user-menu.js.map +1 -0
- package/dist/client/hooks/use-mobile.d.ts +2 -0
- package/dist/client/hooks/use-mobile.d.ts.map +1 -0
- package/dist/client/hooks/use-mobile.js +16 -0
- package/dist/client/hooks/use-mobile.js.map +1 -0
- package/dist/client/hooks/use-touch.d.ts +2 -0
- package/dist/client/hooks/use-touch.d.ts.map +1 -0
- package/dist/client/hooks/use-touch.js +12 -0
- package/dist/client/hooks/use-touch.js.map +1 -0
- package/dist/client/index.d.ts +11 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +12 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/package.json +1 -0
- package/dist/lib/api-client.d.ts +330 -0
- package/dist/lib/api-client.d.ts.map +1 -0
- package/dist/lib/api-client.js +274 -0
- package/dist/lib/api-client.js.map +1 -0
- package/dist/lib/atoms/overlay.d.ts +15 -0
- package/dist/lib/atoms/overlay.d.ts.map +1 -0
- package/dist/lib/atoms/overlay.js +78 -0
- package/dist/lib/atoms/overlay.js.map +1 -0
- package/dist/lib/auth-client.d.ts +871 -0
- package/dist/lib/auth-client.d.ts.map +1 -0
- package/dist/lib/auth-client.js +10 -0
- package/dist/lib/auth-client.js.map +1 -0
- package/dist/lib/auth-providers.d.ts +12 -0
- package/dist/lib/auth-providers.d.ts.map +1 -0
- package/dist/lib/auth-providers.js +27 -0
- package/dist/lib/auth-providers.js.map +1 -0
- package/dist/lib/auth.d.ts +5 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +62 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/codegen-templates/condition.d.ts +3 -0
- package/dist/lib/codegen-templates/condition.d.ts.map +1 -0
- package/dist/lib/codegen-templates/condition.js +9 -0
- package/dist/lib/codegen-templates/condition.js.map +1 -0
- package/dist/lib/codegen-templates/database-query.d.ts +3 -0
- package/dist/lib/codegen-templates/database-query.d.ts.map +1 -0
- package/dist/lib/codegen-templates/database-query.js +24 -0
- package/dist/lib/codegen-templates/database-query.js.map +1 -0
- package/dist/lib/codegen-templates/http-request.d.ts +3 -0
- package/dist/lib/codegen-templates/http-request.d.ts.map +1 -0
- package/dist/lib/codegen-templates/http-request.js +44 -0
- package/dist/lib/codegen-templates/http-request.js.map +1 -0
- package/dist/lib/condition-validator.d.ts +10 -0
- package/dist/lib/condition-validator.d.ts.map +1 -0
- package/dist/lib/condition-validator.js +230 -0
- package/dist/lib/condition-validator.js.map +1 -0
- package/dist/lib/constants.d.ts +3 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +3 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/credential-fetcher.d.ts +4 -0
- package/dist/lib/credential-fetcher.d.ts.map +1 -0
- package/dist/lib/credential-fetcher.js +38 -0
- package/dist/lib/credential-fetcher.js.map +1 -0
- package/dist/lib/db/index.d.ts +4 -0
- package/dist/lib/db/index.d.ts.map +1 -0
- package/dist/lib/db/index.js +17 -0
- package/dist/lib/db/index.js.map +1 -0
- package/dist/lib/db/integrations.d.ts +36 -0
- package/dist/lib/db/integrations.d.ts.map +1 -0
- package/dist/lib/db/integrations.js +170 -0
- package/dist/lib/db/integrations.js.map +1 -0
- package/dist/lib/db/schema.d.ts +1474 -0
- package/dist/lib/db/schema.d.ts.map +1 -0
- package/dist/lib/db/schema.js +143 -0
- package/dist/lib/db/schema.js.map +1 -0
- package/dist/lib/integrations-store.d.ts +13 -0
- package/dist/lib/integrations-store.d.ts.map +1 -0
- package/dist/lib/integrations-store.js +10 -0
- package/dist/lib/integrations-store.js.map +1 -0
- package/dist/lib/managed-connection.d.ts +49 -0
- package/dist/lib/managed-connection.d.ts.map +1 -0
- package/dist/lib/managed-connection.js +21 -0
- package/dist/lib/managed-connection.js.map +1 -0
- package/dist/lib/monaco-theme.d.ts +29 -0
- package/dist/lib/monaco-theme.d.ts.map +1 -0
- package/dist/lib/monaco-theme.js +54 -0
- package/dist/lib/monaco-theme.js.map +1 -0
- package/dist/lib/plugin-registry.d.ts +10 -0
- package/dist/lib/plugin-registry.d.ts.map +1 -0
- package/dist/lib/plugin-registry.js +16 -0
- package/dist/lib/plugin-registry.js.map +1 -0
- package/dist/lib/steps/credentials.d.ts +14 -0
- package/dist/lib/steps/credentials.d.ts.map +1 -0
- package/dist/lib/steps/credentials.js +65 -0
- package/dist/lib/steps/credentials.js.map +1 -0
- package/dist/lib/steps/http-request.d.ts +22 -0
- package/dist/lib/steps/http-request.d.ts.map +1 -0
- package/dist/lib/steps/http-request.js +72 -0
- package/dist/lib/steps/http-request.js.map +1 -0
- package/dist/lib/steps/index.d.ts +10 -0
- package/dist/lib/steps/index.d.ts.map +1 -0
- package/dist/lib/steps/index.js +14 -0
- package/dist/lib/steps/index.js.map +1 -0
- package/dist/lib/steps/step-handler.d.ts +30 -0
- package/dist/lib/steps/step-handler.d.ts.map +1 -0
- package/dist/lib/steps/step-handler.js +105 -0
- package/dist/lib/steps/step-handler.js.map +1 -0
- package/dist/lib/steps/trigger.d.ts +21 -0
- package/dist/lib/steps/trigger.d.ts.map +1 -0
- package/dist/lib/steps/trigger.js +17 -0
- package/dist/lib/steps/trigger.js.map +1 -0
- package/dist/lib/types/integration.d.ts +3 -0
- package/dist/lib/types/integration.d.ts.map +1 -0
- package/dist/lib/types/integration.js +2 -0
- package/dist/lib/types/integration.js.map +1 -0
- package/dist/lib/utils/format-number.d.ts +2 -0
- package/dist/lib/utils/format-number.d.ts.map +1 -0
- package/dist/lib/utils/format-number.js +16 -0
- package/dist/lib/utils/format-number.js.map +1 -0
- package/dist/lib/utils/id.d.ts +2 -0
- package/dist/lib/utils/id.d.ts.map +1 -0
- package/dist/lib/utils/id.js +6 -0
- package/dist/lib/utils/id.js.map +1 -0
- package/dist/lib/utils/redact.d.ts +4 -0
- package/dist/lib/utils/redact.d.ts.map +1 -0
- package/dist/lib/utils/redact.js +143 -0
- package/dist/lib/utils/redact.js.map +1 -0
- package/dist/lib/utils/template.d.ts +18 -0
- package/dist/lib/utils/template.d.ts.map +1 -0
- package/dist/lib/utils/template.js +323 -0
- package/dist/lib/utils/template.js.map +1 -0
- package/dist/lib/utils/time.d.ts +2 -0
- package/dist/lib/utils/time.d.ts.map +1 -0
- package/dist/lib/utils/time.js +34 -0
- package/dist/lib/utils/time.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +99 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/workflow-codegen-sdk.d.ts +4 -0
- package/dist/lib/workflow-codegen-sdk.d.ts.map +1 -0
- package/dist/lib/workflow-codegen-sdk.js +482 -0
- package/dist/lib/workflow-codegen-sdk.js.map +1 -0
- package/dist/lib/workflow-codegen-shared.d.ts +26 -0
- package/dist/lib/workflow-codegen-shared.d.ts.map +1 -0
- package/dist/lib/workflow-codegen-shared.js +232 -0
- package/dist/lib/workflow-codegen-shared.js.map +1 -0
- package/dist/lib/workflow-codegen.d.ts +18 -0
- package/dist/lib/workflow-codegen.d.ts.map +1 -0
- package/dist/lib/workflow-codegen.js +786 -0
- package/dist/lib/workflow-codegen.js.map +1 -0
- package/dist/lib/workflow-executor.workflow.d.ts +33 -0
- package/dist/lib/workflow-executor.workflow.d.ts.map +1 -0
- package/dist/lib/workflow-executor.workflow.js +605 -0
- package/dist/lib/workflow-executor.workflow.js.map +1 -0
- package/dist/lib/workflow-logging.d.ts +29 -0
- package/dist/lib/workflow-logging.d.ts.map +1 -0
- package/dist/lib/workflow-logging.js +48 -0
- package/dist/lib/workflow-logging.js.map +1 -0
- package/dist/lib/workflow-store.d.ts +118 -0
- package/dist/lib/workflow-store.d.ts.map +1 -0
- package/dist/lib/workflow-store.js +351 -0
- package/dist/lib/workflow-store.js.map +1 -0
- package/dist/plugins/condition/components/condition-fields.d.ts +7 -0
- package/dist/plugins/condition/components/condition-fields.d.ts.map +1 -0
- package/dist/plugins/condition/components/condition-fields.js +8 -0
- package/dist/plugins/condition/components/condition-fields.js.map +1 -0
- package/dist/plugins/condition/index.d.ts +4 -0
- package/dist/plugins/condition/index.d.ts.map +1 -0
- package/dist/plugins/condition/index.js +23 -0
- package/dist/plugins/condition/index.js.map +1 -0
- package/dist/plugins/condition/steps/evaluate.d.ts +15 -0
- package/dist/plugins/condition/steps/evaluate.d.ts.map +1 -0
- package/dist/plugins/condition/steps/evaluate.js +10 -0
- package/dist/plugins/condition/steps/evaluate.js.map +1 -0
- package/dist/plugins/database/components/database-query-fields.d.ts +7 -0
- package/dist/plugins/database/components/database-query-fields.d.ts.map +1 -0
- package/dist/plugins/database/components/database-query-fields.js +18 -0
- package/dist/plugins/database/components/database-query-fields.js.map +1 -0
- package/dist/plugins/database/index.d.ts +4 -0
- package/dist/plugins/database/index.d.ts.map +1 -0
- package/dist/plugins/database/index.js +23 -0
- package/dist/plugins/database/index.js.map +1 -0
- package/dist/plugins/database/steps/query.d.ts +20 -0
- package/dist/plugins/database/steps/query.d.ts.map +1 -0
- package/dist/plugins/database/steps/query.js +92 -0
- package/dist/plugins/database/steps/query.js.map +1 -0
- package/dist/plugins/index.d.ts +10 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +6 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/legacy-mappings.d.ts +2 -0
- package/dist/plugins/legacy-mappings.d.ts.map +1 -0
- package/dist/plugins/legacy-mappings.js +2 -0
- package/dist/plugins/legacy-mappings.js.map +1 -0
- package/dist/plugins/loop/components/loop-fields.d.ts +7 -0
- package/dist/plugins/loop/components/loop-fields.d.ts.map +1 -0
- package/dist/plugins/loop/components/loop-fields.js +8 -0
- package/dist/plugins/loop/components/loop-fields.js.map +1 -0
- package/dist/plugins/loop/icon.d.ts +4 -0
- package/dist/plugins/loop/icon.d.ts.map +1 -0
- package/dist/plugins/loop/icon.js +5 -0
- package/dist/plugins/loop/icon.js.map +1 -0
- package/dist/plugins/loop/index.d.ts +4 -0
- package/dist/plugins/loop/index.d.ts.map +1 -0
- package/dist/plugins/loop/index.js +52 -0
- package/dist/plugins/loop/index.js.map +1 -0
- package/dist/plugins/loop/steps/iterate.d.ts +24 -0
- package/dist/plugins/loop/steps/iterate.d.ts.map +1 -0
- package/dist/plugins/loop/steps/iterate.js +31 -0
- package/dist/plugins/loop/steps/iterate.js.map +1 -0
- package/dist/plugins/registry.d.ts +136 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +241 -0
- package/dist/plugins/registry.js.map +1 -0
- package/dist/plugins/switch/icon.d.ts +4 -0
- package/dist/plugins/switch/icon.d.ts.map +1 -0
- package/dist/plugins/switch/icon.js +5 -0
- package/dist/plugins/switch/icon.js.map +1 -0
- package/dist/plugins/switch/index.d.ts +4 -0
- package/dist/plugins/switch/index.d.ts.map +1 -0
- package/dist/plugins/switch/index.js +81 -0
- package/dist/plugins/switch/index.js.map +1 -0
- package/dist/plugins/switch/steps/evaluate.d.ts +27 -0
- package/dist/plugins/switch/steps/evaluate.d.ts.map +1 -0
- package/dist/plugins/switch/steps/evaluate.js +81 -0
- package/dist/plugins/switch/steps/evaluate.js.map +1 -0
- package/dist/scripts/create-plugin.d.ts +3 -0
- package/dist/scripts/create-plugin.d.ts.map +1 -0
- package/dist/scripts/create-plugin.js +205 -0
- package/dist/scripts/create-plugin.js.map +1 -0
- package/dist/scripts/discover-plugins.d.ts +3 -0
- package/dist/scripts/discover-plugins.d.ts.map +1 -0
- package/dist/scripts/discover-plugins.js +729 -0
- package/dist/scripts/discover-plugins.js.map +1 -0
- package/dist/scripts/migrate-prod.d.ts +2 -0
- package/dist/scripts/migrate-prod.d.ts.map +1 -0
- package/dist/scripts/migrate-prod.js +17 -0
- package/dist/scripts/migrate-prod.js.map +1 -0
- package/dist/scripts/nwb.d.ts +3 -0
- package/dist/scripts/nwb.d.ts.map +1 -0
- package/dist/scripts/nwb.js +33 -0
- package/dist/scripts/nwb.js.map +1 -0
- package/dist/server/api/handler-utils.d.ts +22 -0
- package/dist/server/api/handler-utils.d.ts.map +1 -0
- package/dist/server/api/handler-utils.js +42 -0
- package/dist/server/api/handler-utils.js.map +1 -0
- package/dist/server/api/handlers/ai/generate/route.d.ts +3 -0
- package/dist/server/api/handlers/ai/generate/route.d.ts.map +1 -0
- package/dist/server/api/handlers/ai/generate/route.js +260 -0
- package/dist/server/api/handlers/ai/generate/route.js.map +1 -0
- package/dist/server/api/handlers/api-keys/[keyId]/route.d.ts +3 -0
- package/dist/server/api/handlers/api-keys/[keyId]/route.d.ts.map +1 -0
- package/dist/server/api/handlers/api-keys/[keyId]/route.js +25 -0
- package/dist/server/api/handlers/api-keys/[keyId]/route.js.map +1 -0
- package/dist/server/api/handlers/api-keys/route.d.ts +3 -0
- package/dist/server/api/handlers/api-keys/route.d.ts.map +1 -0
- package/dist/server/api/handlers/api-keys/route.js +84 -0
- package/dist/server/api/handlers/api-keys/route.js.map +1 -0
- package/dist/server/api/handlers/auth/route.d.ts +3 -0
- package/dist/server/api/handlers/auth/route.d.ts.map +1 -0
- package/dist/server/api/handlers/auth/route.js +14 -0
- package/dist/server/api/handlers/auth/route.js.map +1 -0
- package/dist/server/api/handlers/integrations/[integrationId]/route.d.ts +16 -0
- package/dist/server/api/handlers/integrations/[integrationId]/route.d.ts.map +1 -0
- package/dist/server/api/handlers/integrations/[integrationId]/route.js +117 -0
- package/dist/server/api/handlers/integrations/[integrationId]/route.js.map +1 -0
- package/dist/server/api/handlers/integrations/[integrationId]/test/route.d.ts +7 -0
- package/dist/server/api/handlers/integrations/[integrationId]/test/route.d.ts.map +1 -0
- package/dist/server/api/handlers/integrations/[integrationId]/test/route.js +96 -0
- package/dist/server/api/handlers/integrations/[integrationId]/test/route.js.map +1 -0
- package/dist/server/api/handlers/integrations/route.d.ts +24 -0
- package/dist/server/api/handlers/integrations/route.d.ts.map +1 -0
- package/dist/server/api/handlers/integrations/route.js +80 -0
- package/dist/server/api/handlers/integrations/route.js.map +1 -0
- package/dist/server/api/handlers/integrations/test/route.d.ts +12 -0
- package/dist/server/api/handlers/integrations/test/route.d.ts.map +1 -0
- package/dist/server/api/handlers/integrations/test/route.js +76 -0
- package/dist/server/api/handlers/integrations/test/route.js.map +1 -0
- package/dist/server/api/handlers/og/workflow/[workflowId]/route.d.ts +7 -0
- package/dist/server/api/handlers/og/workflow/[workflowId]/route.d.ts.map +1 -0
- package/dist/server/api/handlers/og/workflow/[workflowId]/route.js +197 -0
- package/dist/server/api/handlers/og/workflow/[workflowId]/route.js.map +1 -0
- package/dist/server/api/handlers/user/route.d.ts +3 -0
- package/dist/server/api/handlers/user/route.d.ts.map +1 -0
- package/dist/server/api/handlers/user/route.js +81 -0
- package/dist/server/api/handlers/user/route.js.map +1 -0
- package/dist/server/api/handlers/workflow/[workflowId]/cron/route.d.ts +3 -0
- package/dist/server/api/handlers/workflow/[workflowId]/cron/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflow/[workflowId]/cron/route.js +65 -0
- package/dist/server/api/handlers/workflow/[workflowId]/cron/route.js.map +1 -0
- package/dist/server/api/handlers/workflow/[workflowId]/execute/route.d.ts +3 -0
- package/dist/server/api/handlers/workflow/[workflowId]/execute/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflow/[workflowId]/execute/route.js +72 -0
- package/dist/server/api/handlers/workflow/[workflowId]/execute/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/code/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/code/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/code/route.js +24 -0
- package/dist/server/api/handlers/workflows/[workflowId]/code/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/cron/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/cron/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/cron/route.js +65 -0
- package/dist/server/api/handlers/workflows/[workflowId]/cron/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/download/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/download/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/download/route.js +24 -0
- package/dist/server/api/handlers/workflows/[workflowId]/download/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/duplicate/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/duplicate/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/duplicate/route.js +89 -0
- package/dist/server/api/handlers/workflows/[workflowId]/duplicate/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/execute/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/execute/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/execute/route.js +72 -0
- package/dist/server/api/handlers/workflows/[workflowId]/execute/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/executions/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/executions/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/executions/route.js +63 -0
- package/dist/server/api/handlers/workflows/[workflowId]/executions/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/route.js +132 -0
- package/dist/server/api/handlers/workflows/[workflowId]/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/webhook/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/webhook/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/webhook/route.js +111 -0
- package/dist/server/api/handlers/workflows/[workflowId]/webhook/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/create/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/create/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/create/route.js +67 -0
- package/dist/server/api/handlers/workflows/create/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/current/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/current/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/current/route.js +89 -0
- package/dist/server/api/handlers/workflows/current/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/logs/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/logs/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/logs/route.js +38 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/logs/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/status/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/status/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/status/route.js +35 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/status/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/route.js +22 -0
- package/dist/server/api/handlers/workflows/route.js.map +1 -0
- package/dist/server/api/routes.d.ts +4 -0
- package/dist/server/api/routes.d.ts.map +1 -0
- package/dist/server/api/routes.js +51 -0
- package/dist/server/api/routes.js.map +1 -0
- package/dist/server/api/types.d.ts +41 -0
- package/dist/server/api/types.d.ts.map +1 -0
- package/dist/server/api/types.js +2 -0
- package/dist/server/api/types.js.map +1 -0
- package/dist/server/api/workflows.d.ts +8 -0
- package/dist/server/api/workflows.d.ts.map +1 -0
- package/dist/server/api/workflows.js +75 -0
- package/dist/server/api/workflows.js.map +1 -0
- package/dist/server/db/migrate.d.ts +2 -0
- package/dist/server/db/migrate.d.ts.map +1 -0
- package/dist/server/db/migrate.js +2 -0
- package/dist/server/db/migrate.js.map +1 -0
- package/dist/server/db/schema.d.ts +1465 -0
- package/dist/server/db/schema.d.ts.map +1 -0
- package/dist/server/db/schema.js +15 -0
- package/dist/server/db/schema.js.map +1 -0
- package/dist/server/index.d.ts +11 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +9 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/plugin.d.ts +17 -0
- package/dist/server/plugin.d.ts.map +1 -0
- package/dist/server/plugin.js +27 -0
- package/dist/server/plugin.js.map +1 -0
- package/dist/server/utils.d.ts +3 -0
- package/dist/server/utils.d.ts.map +1 -0
- package/dist/server/utils.js +7 -0
- package/dist/server/utils.js.map +1 -0
- package/dist/styles/globals.css +254 -0
- package/package.json +130 -0
- package/src/plugins/_template/credentials.ts.txt +10 -0
- package/src/plugins/_template/icon.tsx.txt +28 -0
- package/src/plugins/_template/index.ts.txt +122 -0
- package/src/plugins/_template/steps/action.ts.txt +103 -0
- package/src/plugins/_template/test.ts.txt +57 -0
- package/src/plugins/condition/components/condition-fields.tsx +32 -0
- package/src/plugins/condition/index.ts +27 -0
- package/src/plugins/condition/steps/evaluate.ts +32 -0
- package/src/plugins/database/components/database-query-fields.tsx +58 -0
- package/src/plugins/database/index.ts +27 -0
- package/src/plugins/database/steps/query.ts +141 -0
- package/src/plugins/index.ts +37 -0
- package/src/plugins/legacy-mappings.ts +11 -0
- package/src/plugins/loop/components/loop-fields.tsx +46 -0
- package/src/plugins/loop/icon.tsx +21 -0
- package/src/plugins/loop/index.ts +57 -0
- package/src/plugins/loop/steps/iterate.ts +74 -0
- package/src/plugins/loop/workflow-executor.patch +241 -0
- package/src/plugins/registry.ts +660 -0
- package/src/plugins/switch/icon.tsx +23 -0
- package/src/plugins/switch/index.ts +87 -0
- package/src/plugins/switch/steps/evaluate.ts +139 -0
- package/src/plugins/switch/workflow-executor.patch +130 -0
- package/src/scripts/create-plugin.ts +301 -0
- package/src/scripts/discover-plugins.ts +1122 -0
- package/src/scripts/migrate-prod.ts +16 -0
- package/src/scripts/nwb.ts +54 -0
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useReactFlow } from "@xyflow/react";
|
|
4
|
+
import { useAtom, useAtomValue, useSetAtom } from "jotai";
|
|
5
|
+
import { Check, ChevronDown, Copy, Download, Globe, Loader2, Lock, Play, Plus, Redo2, Save, Settings2, Trash2, Undo2, } from "lucide-react";
|
|
6
|
+
import { nanoid } from "nanoid";
|
|
7
|
+
import { useRouter } from "next/navigation";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { useEffect, useRef, useState } from "react";
|
|
10
|
+
import { toast } from "sonner";
|
|
11
|
+
import { api } from "../../../lib/api-client.js";
|
|
12
|
+
import { authClient, useSession } from "../../../lib/auth-client.js";
|
|
13
|
+
import { integrationsAtom } from "../../../lib/integrations-store.js";
|
|
14
|
+
import { addNodeAtom, canRedoAtom, canUndoAtom, clearWorkflowAtom, currentWorkflowIdAtom, currentWorkflowNameAtom, currentWorkflowVisibilityAtom, deleteEdgeAtom, deleteNodeAtom, edgesAtom, hasUnsavedChangesAtom, isExecutingAtom, isGeneratingAtom, isSavingAtom, isWorkflowOwnerAtom, nodesAtom, propertiesPanelActiveTabAtom, redoAtom, selectedEdgeAtom, selectedExecutionIdAtom, selectedNodeAtom, triggerExecuteAtom, undoAtom, updateNodeDataAtom, } from "../../../lib/workflow-store.js";
|
|
15
|
+
import { findActionById, flattenConfigFields, getIntegrationLabels } from "../../../plugins/registry.js";
|
|
16
|
+
import { Panel } from "../ai-elements/panel.js";
|
|
17
|
+
import { DeployButton } from "../deploy-button.js";
|
|
18
|
+
import { ConfigurationOverlay } from "../overlays/configuration-overlay.js";
|
|
19
|
+
import { ConfirmOverlay } from "../overlays/confirm-overlay.js";
|
|
20
|
+
import { ExportWorkflowOverlay } from "../overlays/export-workflow-overlay.js";
|
|
21
|
+
import { MakePublicOverlay } from "../overlays/make-public-overlay.js";
|
|
22
|
+
import { useOverlay } from "../overlays/overlay-provider.js";
|
|
23
|
+
import { WorkflowIssuesOverlay } from "../overlays/workflow-issues-overlay.js";
|
|
24
|
+
import { Button } from "../ui/button.js";
|
|
25
|
+
import { ButtonGroup } from "../ui/button-group.js";
|
|
26
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from "../ui/dropdown-menu.js";
|
|
27
|
+
import { WorkflowIcon } from "../ui/workflow-icon.js";
|
|
28
|
+
import { UserMenu } from "../workflows/user-menu.js";
|
|
29
|
+
function updateNodesStatus(nodes, updateNodeData, status) {
|
|
30
|
+
for (const node of nodes) {
|
|
31
|
+
updateNodeData({ id: node.id, data: { status } });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const BUILTIN_ACTION_INTEGRATIONS = {
|
|
35
|
+
"Database Query": "database",
|
|
36
|
+
};
|
|
37
|
+
const BUILTIN_INTEGRATION_LABELS = {
|
|
38
|
+
database: "Database",
|
|
39
|
+
};
|
|
40
|
+
function extractTemplateReferences(value) {
|
|
41
|
+
if (typeof value !== "string") {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
const pattern = /\{\{@([^:]+):([^}]+)\}\}/g;
|
|
45
|
+
const matches = value.matchAll(pattern);
|
|
46
|
+
return Array.from(matches).map((match) => ({
|
|
47
|
+
nodeId: match[1],
|
|
48
|
+
displayText: match[2],
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
function extractAllTemplateReferences(config, prefix = "") {
|
|
52
|
+
const results = [];
|
|
53
|
+
for (const [key, value] of Object.entries(config)) {
|
|
54
|
+
const fieldPath = prefix ? `${prefix}.${key}` : key;
|
|
55
|
+
if (typeof value === "string") {
|
|
56
|
+
const refs = extractTemplateReferences(value);
|
|
57
|
+
for (const ref of refs) {
|
|
58
|
+
results.push({ field: fieldPath, ...ref });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else if (typeof value === "object" &&
|
|
62
|
+
value !== null &&
|
|
63
|
+
!Array.isArray(value)) {
|
|
64
|
+
results.push(...extractAllTemplateReferences(value, fieldPath));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return results;
|
|
68
|
+
}
|
|
69
|
+
function getBrokenTemplateReferences(nodes) {
|
|
70
|
+
const nodeIds = new Set(nodes.map((n) => n.id));
|
|
71
|
+
const brokenByNode = [];
|
|
72
|
+
for (const node of nodes) {
|
|
73
|
+
if (node.data.enabled === false) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const config = node.data.config;
|
|
77
|
+
if (!config || typeof config !== "object") {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const allRefs = extractAllTemplateReferences(config);
|
|
81
|
+
const brokenRefs = allRefs.filter((ref) => !nodeIds.has(ref.nodeId));
|
|
82
|
+
if (brokenRefs.length > 0) {
|
|
83
|
+
const actionType = config.actionType;
|
|
84
|
+
const action = actionType ? findActionById(actionType) : undefined;
|
|
85
|
+
const flatFields = action ? flattenConfigFields(action.configFields) : [];
|
|
86
|
+
brokenByNode.push({
|
|
87
|
+
nodeId: node.id,
|
|
88
|
+
nodeLabel: node.data.label || action?.label || "Unnamed Step",
|
|
89
|
+
brokenReferences: brokenRefs.map((ref) => {
|
|
90
|
+
const configField = flatFields.find((f) => f.key === ref.field);
|
|
91
|
+
return {
|
|
92
|
+
fieldKey: ref.field,
|
|
93
|
+
fieldLabel: configField?.label || ref.field,
|
|
94
|
+
referencedNodeId: ref.nodeId,
|
|
95
|
+
displayText: ref.displayText,
|
|
96
|
+
};
|
|
97
|
+
}),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return brokenByNode;
|
|
102
|
+
}
|
|
103
|
+
function isFieldEmpty(value) {
|
|
104
|
+
if (value === undefined || value === null) {
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
if (typeof value === "string" && value.trim() === "") {
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
function shouldShowField(field, config) {
|
|
113
|
+
if (!field.showWhen) {
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
return config[field.showWhen.field] === field.showWhen.equals;
|
|
117
|
+
}
|
|
118
|
+
function getNodeMissingFields(node) {
|
|
119
|
+
if (node.data.enabled === false) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
const config = node.data.config;
|
|
123
|
+
const actionType = config?.actionType;
|
|
124
|
+
if (!actionType) {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
const action = findActionById(actionType);
|
|
128
|
+
if (!action) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
const flatFields = flattenConfigFields(action.configFields);
|
|
132
|
+
const missingFields = flatFields
|
|
133
|
+
.filter((field) => field.required &&
|
|
134
|
+
shouldShowField(field, config || {}) &&
|
|
135
|
+
isFieldEmpty(config?.[field.key]))
|
|
136
|
+
.map((field) => ({
|
|
137
|
+
fieldKey: field.key,
|
|
138
|
+
fieldLabel: field.label,
|
|
139
|
+
}));
|
|
140
|
+
if (missingFields.length === 0) {
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
nodeId: node.id,
|
|
145
|
+
nodeLabel: node.data.label || action.label || "Unnamed Step",
|
|
146
|
+
missingFields,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function getMissingRequiredFields(nodes) {
|
|
150
|
+
return nodes
|
|
151
|
+
.map(getNodeMissingFields)
|
|
152
|
+
.filter((result) => result !== null);
|
|
153
|
+
}
|
|
154
|
+
function getMissingIntegrations(nodes, userIntegrations) {
|
|
155
|
+
const userIntegrationTypes = new Set(userIntegrations.map((i) => i.type));
|
|
156
|
+
const userIntegrationIds = new Set(userIntegrations.map((i) => i.id));
|
|
157
|
+
const missingByType = new Map();
|
|
158
|
+
const integrationLabels = getIntegrationLabels();
|
|
159
|
+
for (const node of nodes) {
|
|
160
|
+
if (node.data.enabled === false) {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
const actionType = node.data.config?.actionType;
|
|
164
|
+
if (!actionType) {
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
const action = findActionById(actionType);
|
|
168
|
+
const requiredIntegrationType = action?.integration || BUILTIN_ACTION_INTEGRATIONS[actionType];
|
|
169
|
+
if (!requiredIntegrationType) {
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
const configuredIntegrationId = node.data.config?.integrationId;
|
|
173
|
+
const hasValidIntegration = configuredIntegrationId &&
|
|
174
|
+
userIntegrationIds.has(configuredIntegrationId);
|
|
175
|
+
if (hasValidIntegration) {
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
if (!userIntegrationTypes.has(requiredIntegrationType)) {
|
|
179
|
+
const existing = missingByType.get(requiredIntegrationType) || [];
|
|
180
|
+
const actionInfo = findActionById(actionType);
|
|
181
|
+
existing.push(node.data.label || actionInfo?.label || actionType);
|
|
182
|
+
missingByType.set(requiredIntegrationType, existing);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return Array.from(missingByType.entries()).map(([integrationType, nodeNames]) => ({
|
|
186
|
+
integrationType,
|
|
187
|
+
integrationLabel: integrationLabels[integrationType] ||
|
|
188
|
+
BUILTIN_INTEGRATION_LABELS[integrationType] ||
|
|
189
|
+
integrationType,
|
|
190
|
+
nodeNames,
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
193
|
+
async function executeTestWorkflow({ workflowId, nodes, updateNodeData, pollingIntervalRef, setIsExecuting, setSelectedExecutionId, }) {
|
|
194
|
+
updateNodesStatus(nodes, updateNodeData, "idle");
|
|
195
|
+
for (const node of nodes) {
|
|
196
|
+
if (node.data.type === "trigger") {
|
|
197
|
+
updateNodeData({ id: node.id, data: { status: "running" } });
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
try {
|
|
201
|
+
const response = await fetch(`/api/workflow/${workflowId}/execute`, {
|
|
202
|
+
method: "POST",
|
|
203
|
+
headers: {
|
|
204
|
+
"Content-Type": "application/json",
|
|
205
|
+
},
|
|
206
|
+
body: JSON.stringify({ input: {} }),
|
|
207
|
+
});
|
|
208
|
+
if (!response.ok) {
|
|
209
|
+
throw new Error("Failed to execute workflow");
|
|
210
|
+
}
|
|
211
|
+
const result = await response.json();
|
|
212
|
+
setSelectedExecutionId(result.executionId);
|
|
213
|
+
const pollInterval = setInterval(async () => {
|
|
214
|
+
try {
|
|
215
|
+
const statusData = await api.workflow.getExecutionStatus(result.executionId);
|
|
216
|
+
for (const nodeStatus of statusData.nodeStatuses) {
|
|
217
|
+
updateNodeData({
|
|
218
|
+
id: nodeStatus.nodeId,
|
|
219
|
+
data: {
|
|
220
|
+
status: nodeStatus.status,
|
|
221
|
+
},
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
if (statusData.status !== "running") {
|
|
225
|
+
if (pollingIntervalRef.current) {
|
|
226
|
+
clearInterval(pollingIntervalRef.current);
|
|
227
|
+
pollingIntervalRef.current = null;
|
|
228
|
+
}
|
|
229
|
+
setIsExecuting(false);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
console.error("Failed to poll execution status:", error);
|
|
234
|
+
}
|
|
235
|
+
}, 500);
|
|
236
|
+
pollingIntervalRef.current = pollInterval;
|
|
237
|
+
}
|
|
238
|
+
catch (error) {
|
|
239
|
+
console.error("Failed to execute workflow:", error);
|
|
240
|
+
toast.error(error instanceof Error ? error.message : "Failed to execute workflow");
|
|
241
|
+
updateNodesStatus(nodes, updateNodeData, "error");
|
|
242
|
+
setIsExecuting(false);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
function useWorkflowHandlers({ currentWorkflowId, nodes, edges, updateNodeData, isExecuting, setIsExecuting, setIsSaving, setHasUnsavedChanges, setActiveTab, setNodes, setEdges, setSelectedNodeId, setSelectedExecutionId, userIntegrations, }) {
|
|
246
|
+
const { open: openOverlay } = useOverlay();
|
|
247
|
+
const pollingIntervalRef = useRef(null);
|
|
248
|
+
useEffect(() => () => {
|
|
249
|
+
if (pollingIntervalRef.current) {
|
|
250
|
+
clearInterval(pollingIntervalRef.current);
|
|
251
|
+
}
|
|
252
|
+
}, []);
|
|
253
|
+
const handleSave = async () => {
|
|
254
|
+
if (!currentWorkflowId) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
setIsSaving(true);
|
|
258
|
+
try {
|
|
259
|
+
await api.workflow.update(currentWorkflowId, { nodes, edges });
|
|
260
|
+
setHasUnsavedChanges(false);
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
console.error("Failed to save workflow:", error);
|
|
264
|
+
toast.error("Failed to save workflow. Please try again.");
|
|
265
|
+
}
|
|
266
|
+
finally {
|
|
267
|
+
setIsSaving(false);
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
const executeWorkflow = async () => {
|
|
271
|
+
if (!currentWorkflowId) {
|
|
272
|
+
toast.error("Please save the workflow before executing");
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
setActiveTab("runs");
|
|
276
|
+
setNodes(nodes.map((node) => ({ ...node, selected: false })));
|
|
277
|
+
setEdges(edges.map((edge) => ({ ...edge, selected: false })));
|
|
278
|
+
setSelectedNodeId(null);
|
|
279
|
+
setIsExecuting(true);
|
|
280
|
+
await executeTestWorkflow({
|
|
281
|
+
workflowId: currentWorkflowId,
|
|
282
|
+
nodes,
|
|
283
|
+
updateNodeData,
|
|
284
|
+
pollingIntervalRef,
|
|
285
|
+
setIsExecuting,
|
|
286
|
+
setSelectedExecutionId,
|
|
287
|
+
});
|
|
288
|
+
};
|
|
289
|
+
const handleGoToStep = (nodeId, fieldKey) => {
|
|
290
|
+
setSelectedNodeId(nodeId);
|
|
291
|
+
setActiveTab("properties");
|
|
292
|
+
if (fieldKey) {
|
|
293
|
+
setTimeout(() => {
|
|
294
|
+
const element = document.getElementById(fieldKey);
|
|
295
|
+
if (element) {
|
|
296
|
+
element.focus();
|
|
297
|
+
element.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
298
|
+
}
|
|
299
|
+
}, 100);
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
const handleExecute = async () => {
|
|
303
|
+
if (isExecuting) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
const brokenRefs = getBrokenTemplateReferences(nodes);
|
|
307
|
+
const missingFields = getMissingRequiredFields(nodes);
|
|
308
|
+
const missingIntegrations = getMissingIntegrations(nodes, userIntegrations);
|
|
309
|
+
if (brokenRefs.length > 0 ||
|
|
310
|
+
missingFields.length > 0 ||
|
|
311
|
+
missingIntegrations.length > 0) {
|
|
312
|
+
openOverlay(WorkflowIssuesOverlay, {
|
|
313
|
+
issues: {
|
|
314
|
+
brokenReferences: brokenRefs,
|
|
315
|
+
missingRequiredFields: missingFields,
|
|
316
|
+
missingIntegrations,
|
|
317
|
+
},
|
|
318
|
+
onGoToStep: handleGoToStep,
|
|
319
|
+
onRunAnyway: executeWorkflow,
|
|
320
|
+
});
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
await executeWorkflow();
|
|
324
|
+
};
|
|
325
|
+
return {
|
|
326
|
+
handleSave,
|
|
327
|
+
handleExecute,
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
function useWorkflowState() {
|
|
331
|
+
const [nodes, setNodes] = useAtom(nodesAtom);
|
|
332
|
+
const [edges, setEdges] = useAtom(edgesAtom);
|
|
333
|
+
const [isExecuting, setIsExecuting] = useAtom(isExecutingAtom);
|
|
334
|
+
const [isGenerating] = useAtom(isGeneratingAtom);
|
|
335
|
+
const clearWorkflow = useSetAtom(clearWorkflowAtom);
|
|
336
|
+
const updateNodeData = useSetAtom(updateNodeDataAtom);
|
|
337
|
+
const [currentWorkflowId] = useAtom(currentWorkflowIdAtom);
|
|
338
|
+
const [workflowName, setCurrentWorkflowName] = useAtom(currentWorkflowNameAtom);
|
|
339
|
+
const [workflowVisibility, setWorkflowVisibility] = useAtom(currentWorkflowVisibilityAtom);
|
|
340
|
+
const isOwner = useAtomValue(isWorkflowOwnerAtom);
|
|
341
|
+
const router = useRouter();
|
|
342
|
+
const [isSaving, setIsSaving] = useAtom(isSavingAtom);
|
|
343
|
+
const [hasUnsavedChanges, setHasUnsavedChanges] = useAtom(hasUnsavedChangesAtom);
|
|
344
|
+
const undo = useSetAtom(undoAtom);
|
|
345
|
+
const redo = useSetAtom(redoAtom);
|
|
346
|
+
const addNode = useSetAtom(addNodeAtom);
|
|
347
|
+
const [canUndo] = useAtom(canUndoAtom);
|
|
348
|
+
const [canRedo] = useAtom(canRedoAtom);
|
|
349
|
+
const { data: session } = useSession();
|
|
350
|
+
const setActiveTab = useSetAtom(propertiesPanelActiveTabAtom);
|
|
351
|
+
const setSelectedNodeId = useSetAtom(selectedNodeAtom);
|
|
352
|
+
const setSelectedExecutionId = useSetAtom(selectedExecutionIdAtom);
|
|
353
|
+
const userIntegrations = useAtomValue(integrationsAtom);
|
|
354
|
+
const [triggerExecute, setTriggerExecute] = useAtom(triggerExecuteAtom);
|
|
355
|
+
const [isDownloading, setIsDownloading] = useState(false);
|
|
356
|
+
const [isDuplicating, setIsDuplicating] = useState(false);
|
|
357
|
+
const [allWorkflows, setAllWorkflows] = useState([]);
|
|
358
|
+
useEffect(() => {
|
|
359
|
+
const loadAllWorkflows = async () => {
|
|
360
|
+
try {
|
|
361
|
+
const workflows = await api.workflow.getAll();
|
|
362
|
+
setAllWorkflows(workflows);
|
|
363
|
+
}
|
|
364
|
+
catch (error) {
|
|
365
|
+
console.error("Failed to load workflows:", error);
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
loadAllWorkflows();
|
|
369
|
+
}, []);
|
|
370
|
+
return {
|
|
371
|
+
nodes,
|
|
372
|
+
edges,
|
|
373
|
+
isExecuting,
|
|
374
|
+
setIsExecuting,
|
|
375
|
+
isGenerating,
|
|
376
|
+
clearWorkflow,
|
|
377
|
+
updateNodeData,
|
|
378
|
+
currentWorkflowId,
|
|
379
|
+
workflowName,
|
|
380
|
+
setCurrentWorkflowName,
|
|
381
|
+
workflowVisibility,
|
|
382
|
+
setWorkflowVisibility,
|
|
383
|
+
isOwner,
|
|
384
|
+
router,
|
|
385
|
+
isSaving,
|
|
386
|
+
setIsSaving,
|
|
387
|
+
hasUnsavedChanges,
|
|
388
|
+
setHasUnsavedChanges,
|
|
389
|
+
undo,
|
|
390
|
+
redo,
|
|
391
|
+
addNode,
|
|
392
|
+
canUndo,
|
|
393
|
+
canRedo,
|
|
394
|
+
session,
|
|
395
|
+
isDownloading,
|
|
396
|
+
setIsDownloading,
|
|
397
|
+
isDuplicating,
|
|
398
|
+
setIsDuplicating,
|
|
399
|
+
allWorkflows,
|
|
400
|
+
setAllWorkflows,
|
|
401
|
+
setActiveTab,
|
|
402
|
+
setNodes,
|
|
403
|
+
setEdges,
|
|
404
|
+
setSelectedNodeId,
|
|
405
|
+
setSelectedExecutionId,
|
|
406
|
+
userIntegrations,
|
|
407
|
+
triggerExecute,
|
|
408
|
+
setTriggerExecute,
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
function useWorkflowActions(state) {
|
|
412
|
+
const { open: openOverlay } = useOverlay();
|
|
413
|
+
const { currentWorkflowId, workflowName, nodes, edges, updateNodeData, isExecuting, setIsExecuting, setIsSaving, setHasUnsavedChanges, clearWorkflow, setWorkflowVisibility, setAllWorkflows, setIsDownloading, setIsDuplicating, setActiveTab, setNodes, setEdges, setSelectedNodeId, setSelectedExecutionId, userIntegrations, triggerExecute, setTriggerExecute, router, session, } = state;
|
|
414
|
+
const { handleSave, handleExecute } = useWorkflowHandlers({
|
|
415
|
+
currentWorkflowId,
|
|
416
|
+
nodes,
|
|
417
|
+
edges,
|
|
418
|
+
updateNodeData,
|
|
419
|
+
isExecuting,
|
|
420
|
+
setIsExecuting,
|
|
421
|
+
setIsSaving,
|
|
422
|
+
setHasUnsavedChanges,
|
|
423
|
+
setActiveTab,
|
|
424
|
+
setNodes,
|
|
425
|
+
setEdges,
|
|
426
|
+
setSelectedNodeId,
|
|
427
|
+
setSelectedExecutionId,
|
|
428
|
+
userIntegrations,
|
|
429
|
+
});
|
|
430
|
+
useEffect(() => {
|
|
431
|
+
if (triggerExecute) {
|
|
432
|
+
setTriggerExecute(false);
|
|
433
|
+
handleExecute();
|
|
434
|
+
}
|
|
435
|
+
}, [triggerExecute, setTriggerExecute, handleExecute]);
|
|
436
|
+
const handleClearWorkflow = () => {
|
|
437
|
+
openOverlay(ConfirmOverlay, {
|
|
438
|
+
title: "Clear Workflow",
|
|
439
|
+
message: "Are you sure you want to clear all nodes and connections? This action cannot be undone.",
|
|
440
|
+
confirmLabel: "Clear Workflow",
|
|
441
|
+
confirmVariant: "destructive",
|
|
442
|
+
destructive: true,
|
|
443
|
+
onConfirm: () => {
|
|
444
|
+
clearWorkflow();
|
|
445
|
+
},
|
|
446
|
+
});
|
|
447
|
+
};
|
|
448
|
+
const handleDeleteWorkflow = () => {
|
|
449
|
+
openOverlay(ConfirmOverlay, {
|
|
450
|
+
title: "Delete Workflow",
|
|
451
|
+
message: `Are you sure you want to delete "${workflowName}"? This will permanently delete the workflow. This cannot be undone.`,
|
|
452
|
+
confirmLabel: "Delete Workflow",
|
|
453
|
+
confirmVariant: "destructive",
|
|
454
|
+
destructive: true,
|
|
455
|
+
onConfirm: async () => {
|
|
456
|
+
if (!currentWorkflowId)
|
|
457
|
+
return;
|
|
458
|
+
try {
|
|
459
|
+
await api.workflow.delete(currentWorkflowId);
|
|
460
|
+
toast.success("Workflow deleted successfully");
|
|
461
|
+
window.location.href = "/";
|
|
462
|
+
}
|
|
463
|
+
catch (error) {
|
|
464
|
+
console.error("Failed to delete workflow:", error);
|
|
465
|
+
toast.error("Failed to delete workflow. Please try again.");
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
});
|
|
469
|
+
};
|
|
470
|
+
const handleDownload = async () => {
|
|
471
|
+
if (!currentWorkflowId) {
|
|
472
|
+
toast.error("Please save the workflow before downloading");
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
setIsDownloading(true);
|
|
476
|
+
toast.info("Preparing workflow files for download...");
|
|
477
|
+
try {
|
|
478
|
+
const result = await api.workflow.download(currentWorkflowId);
|
|
479
|
+
if (!result.success) {
|
|
480
|
+
throw new Error(result.error || "Failed to prepare download");
|
|
481
|
+
}
|
|
482
|
+
if (!result.files) {
|
|
483
|
+
throw new Error("No files to download");
|
|
484
|
+
}
|
|
485
|
+
const JSZip = (await import("jszip")).default;
|
|
486
|
+
const zip = new JSZip();
|
|
487
|
+
for (const [path, content] of Object.entries(result.files)) {
|
|
488
|
+
zip.file(path, content);
|
|
489
|
+
}
|
|
490
|
+
const blob = await zip.generateAsync({ type: "blob" });
|
|
491
|
+
const url = URL.createObjectURL(blob);
|
|
492
|
+
const a = document.createElement("a");
|
|
493
|
+
a.href = url;
|
|
494
|
+
a.download = `${workflowName.toLowerCase().replace(/[^a-z0-9]/g, "-")}-workflow.zip`;
|
|
495
|
+
document.body.appendChild(a);
|
|
496
|
+
a.click();
|
|
497
|
+
document.body.removeChild(a);
|
|
498
|
+
URL.revokeObjectURL(url);
|
|
499
|
+
toast.success("Workflow downloaded successfully!");
|
|
500
|
+
}
|
|
501
|
+
catch (error) {
|
|
502
|
+
toast.error(error instanceof Error ? error.message : "Failed to download workflow");
|
|
503
|
+
}
|
|
504
|
+
finally {
|
|
505
|
+
setIsDownloading(false);
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
const loadWorkflows = async () => {
|
|
509
|
+
try {
|
|
510
|
+
const workflows = await api.workflow.getAll();
|
|
511
|
+
setAllWorkflows(workflows);
|
|
512
|
+
}
|
|
513
|
+
catch (error) {
|
|
514
|
+
console.error("Failed to load workflows:", error);
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
const handleToggleVisibility = async (newVisibility) => {
|
|
518
|
+
if (!currentWorkflowId) {
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
if (newVisibility === "public") {
|
|
522
|
+
openOverlay(MakePublicOverlay, {
|
|
523
|
+
onConfirm: async () => {
|
|
524
|
+
try {
|
|
525
|
+
await api.workflow.update(currentWorkflowId, {
|
|
526
|
+
visibility: "public",
|
|
527
|
+
});
|
|
528
|
+
setWorkflowVisibility("public");
|
|
529
|
+
toast.success("Workflow is now public");
|
|
530
|
+
}
|
|
531
|
+
catch (error) {
|
|
532
|
+
console.error("Failed to update visibility:", error);
|
|
533
|
+
toast.error("Failed to update visibility. Please try again.");
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
});
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
try {
|
|
540
|
+
await api.workflow.update(currentWorkflowId, {
|
|
541
|
+
visibility: newVisibility,
|
|
542
|
+
});
|
|
543
|
+
setWorkflowVisibility(newVisibility);
|
|
544
|
+
toast.success("Workflow is now private");
|
|
545
|
+
}
|
|
546
|
+
catch (error) {
|
|
547
|
+
console.error("Failed to update visibility:", error);
|
|
548
|
+
toast.error("Failed to update visibility. Please try again.");
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
const handleDuplicate = async () => {
|
|
552
|
+
if (!currentWorkflowId) {
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
setIsDuplicating(true);
|
|
556
|
+
try {
|
|
557
|
+
if (!session?.user) {
|
|
558
|
+
await authClient.signIn.anonymous();
|
|
559
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
560
|
+
}
|
|
561
|
+
const newWorkflow = await api.workflow.duplicate(currentWorkflowId);
|
|
562
|
+
toast.success("Workflow duplicated successfully");
|
|
563
|
+
router.push(`/workflows/${newWorkflow.id}`);
|
|
564
|
+
}
|
|
565
|
+
catch (error) {
|
|
566
|
+
console.error("Failed to duplicate workflow:", error);
|
|
567
|
+
toast.error("Failed to duplicate workflow. Please try again.");
|
|
568
|
+
}
|
|
569
|
+
finally {
|
|
570
|
+
setIsDuplicating(false);
|
|
571
|
+
}
|
|
572
|
+
};
|
|
573
|
+
return {
|
|
574
|
+
handleSave,
|
|
575
|
+
handleExecute,
|
|
576
|
+
handleClearWorkflow,
|
|
577
|
+
handleDeleteWorkflow,
|
|
578
|
+
handleDownload,
|
|
579
|
+
loadWorkflows,
|
|
580
|
+
handleToggleVisibility,
|
|
581
|
+
handleDuplicate,
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
function ToolbarActions({ workflowId, state, actions, }) {
|
|
585
|
+
const { open: openOverlay, push } = useOverlay();
|
|
586
|
+
const [selectedNodeId] = useAtom(selectedNodeAtom);
|
|
587
|
+
const [selectedEdgeId] = useAtom(selectedEdgeAtom);
|
|
588
|
+
const [nodes] = useAtom(nodesAtom);
|
|
589
|
+
const [edges] = useAtom(edgesAtom);
|
|
590
|
+
const deleteNode = useSetAtom(deleteNodeAtom);
|
|
591
|
+
const deleteEdge = useSetAtom(deleteEdgeAtom);
|
|
592
|
+
const { screenToFlowPosition } = useReactFlow();
|
|
593
|
+
const selectedNode = nodes.find((node) => node.id === selectedNodeId);
|
|
594
|
+
const selectedEdge = edges.find((edge) => edge.id === selectedEdgeId);
|
|
595
|
+
const hasSelection = selectedNode || selectedEdge;
|
|
596
|
+
if (workflowId && !state.isOwner) {
|
|
597
|
+
return null;
|
|
598
|
+
}
|
|
599
|
+
if (!workflowId) {
|
|
600
|
+
return null;
|
|
601
|
+
}
|
|
602
|
+
const handleDeleteConfirm = () => {
|
|
603
|
+
const isNode = Boolean(selectedNodeId);
|
|
604
|
+
const itemType = isNode ? "Node" : "Connection";
|
|
605
|
+
push(ConfirmOverlay, {
|
|
606
|
+
title: `Delete ${itemType}`,
|
|
607
|
+
message: `Are you sure you want to delete this ${itemType.toLowerCase()}? This action cannot be undone.`,
|
|
608
|
+
confirmLabel: "Delete",
|
|
609
|
+
confirmVariant: "destructive",
|
|
610
|
+
onConfirm: () => {
|
|
611
|
+
if (selectedNodeId) {
|
|
612
|
+
deleteNode(selectedNodeId);
|
|
613
|
+
}
|
|
614
|
+
else if (selectedEdgeId) {
|
|
615
|
+
deleteEdge(selectedEdgeId);
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
});
|
|
619
|
+
};
|
|
620
|
+
const handleAddStep = () => {
|
|
621
|
+
const flowWrapper = document.querySelector(".react-flow");
|
|
622
|
+
if (!flowWrapper) {
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
const rect = flowWrapper.getBoundingClientRect();
|
|
626
|
+
const centerX = rect.left + rect.width / 2;
|
|
627
|
+
const centerY = rect.top + rect.height / 2;
|
|
628
|
+
const position = screenToFlowPosition({ x: centerX, y: centerY });
|
|
629
|
+
const nodeWidth = 192;
|
|
630
|
+
const nodeHeight = 192;
|
|
631
|
+
position.x -= nodeWidth / 2;
|
|
632
|
+
position.y -= nodeHeight / 2;
|
|
633
|
+
const offset = 20;
|
|
634
|
+
const threshold = 20;
|
|
635
|
+
const finalPosition = { ...position };
|
|
636
|
+
let hasOverlap = true;
|
|
637
|
+
let attempts = 0;
|
|
638
|
+
const maxAttempts = 20;
|
|
639
|
+
while (hasOverlap && attempts < maxAttempts) {
|
|
640
|
+
hasOverlap = state.nodes.some((node) => {
|
|
641
|
+
const dx = Math.abs(node.position.x - finalPosition.x);
|
|
642
|
+
const dy = Math.abs(node.position.y - finalPosition.y);
|
|
643
|
+
return dx < threshold && dy < threshold;
|
|
644
|
+
});
|
|
645
|
+
if (hasOverlap) {
|
|
646
|
+
finalPosition.x += offset;
|
|
647
|
+
finalPosition.y += offset;
|
|
648
|
+
attempts += 1;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
const newNode = {
|
|
652
|
+
id: nanoid(),
|
|
653
|
+
type: "action",
|
|
654
|
+
position: finalPosition,
|
|
655
|
+
data: {
|
|
656
|
+
label: "",
|
|
657
|
+
description: "",
|
|
658
|
+
type: "action",
|
|
659
|
+
config: {},
|
|
660
|
+
status: "idle",
|
|
661
|
+
},
|
|
662
|
+
};
|
|
663
|
+
state.addNode(newNode);
|
|
664
|
+
state.setSelectedNodeId(newNode.id);
|
|
665
|
+
state.setActiveTab("properties");
|
|
666
|
+
};
|
|
667
|
+
return (_jsxs(_Fragment, { children: [_jsx(ButtonGroup, { className: "flex lg:hidden", orientation: "vertical", children: _jsx(Button, { className: "border hover:bg-black/5 disabled:opacity-100 dark:hover:bg-white/5 disabled:[&>svg]:text-muted-foreground", disabled: state.isGenerating, onClick: handleAddStep, size: "icon", title: "Add Step", variant: "secondary", children: _jsx(Plus, { className: "size-4" }) }) }), _jsxs(ButtonGroup, { className: "flex lg:hidden", orientation: "vertical", children: [_jsx(Button, { className: "border hover:bg-black/5 dark:hover:bg-white/5", onClick: () => openOverlay(ConfigurationOverlay, {}), size: "icon", title: "Configuration", variant: "secondary", children: _jsx(Settings2, { className: "size-4" }) }), hasSelection && (_jsx(Button, { className: "border hover:bg-black/5 dark:hover:bg-white/5", onClick: handleDeleteConfirm, size: "icon", title: "Delete", variant: "secondary", children: _jsx(Trash2, { className: "size-4" }) }))] }), _jsx(ButtonGroup, { className: "hidden lg:flex", orientation: "horizontal", children: _jsx(Button, { className: "border hover:bg-black/5 disabled:opacity-100 dark:hover:bg-white/5 disabled:[&>svg]:text-muted-foreground", disabled: state.isGenerating, onClick: handleAddStep, size: "icon", title: "Add Step", variant: "secondary", children: _jsx(Plus, { className: "size-4" }) }) }), _jsxs(ButtonGroup, { className: "flex lg:hidden", orientation: "vertical", children: [_jsx(Button, { className: "border hover:bg-black/5 disabled:opacity-100 dark:hover:bg-white/5 disabled:[&>svg]:text-muted-foreground", disabled: !state.canUndo || state.isGenerating, onClick: () => state.undo(), size: "icon", title: "Undo", variant: "secondary", children: _jsx(Undo2, { className: "size-4" }) }), _jsx(Button, { className: "border hover:bg-black/5 disabled:opacity-100 dark:hover:bg-white/5 disabled:[&>svg]:text-muted-foreground", disabled: !state.canRedo || state.isGenerating, onClick: () => state.redo(), size: "icon", title: "Redo", variant: "secondary", children: _jsx(Redo2, { className: "size-4" }) })] }), _jsxs(ButtonGroup, { className: "hidden lg:flex", orientation: "horizontal", children: [_jsx(Button, { className: "border hover:bg-black/5 disabled:opacity-100 dark:hover:bg-white/5 disabled:[&>svg]:text-muted-foreground", disabled: !state.canUndo || state.isGenerating, onClick: () => state.undo(), size: "icon", title: "Undo", variant: "secondary", children: _jsx(Undo2, { className: "size-4" }) }), _jsx(Button, { className: "border hover:bg-black/5 disabled:opacity-100 dark:hover:bg-white/5 disabled:[&>svg]:text-muted-foreground", disabled: !state.canRedo || state.isGenerating, onClick: () => state.redo(), size: "icon", title: "Redo", variant: "secondary", children: _jsx(Redo2, { className: "size-4" }) })] }), _jsxs(ButtonGroup, { className: "flex lg:hidden", orientation: "vertical", children: [_jsx(SaveButton, { handleSave: actions.handleSave, state: state }), _jsx(DownloadButton, { actions: actions, state: state })] }), _jsxs(ButtonGroup, { className: "hidden lg:flex", orientation: "horizontal", children: [_jsx(SaveButton, { handleSave: actions.handleSave, state: state }), _jsx(DownloadButton, { actions: actions, state: state })] }), _jsx(VisibilityButton, { actions: actions, state: state }), _jsx(RunButtonGroup, { actions: actions, state: state })] }));
|
|
668
|
+
}
|
|
669
|
+
function SaveButton({ state, handleSave, }) {
|
|
670
|
+
return (_jsxs(Button, { className: "relative border hover:bg-black/5 disabled:opacity-100 dark:hover:bg-white/5 disabled:[&>svg]:text-muted-foreground", disabled: !state.currentWorkflowId || state.isGenerating || state.isSaving, onClick: handleSave, size: "icon", title: state.isSaving ? "Saving..." : "Save workflow", variant: "secondary", children: [state.isSaving ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : (_jsx(Save, { className: "size-4" })), state.hasUnsavedChanges && !state.isSaving && (_jsx("div", { className: "absolute top-1.5 right-1.5 size-2 rounded-full bg-primary" }))] }));
|
|
671
|
+
}
|
|
672
|
+
function DownloadButton({ state, actions, }) {
|
|
673
|
+
const { open: openOverlay } = useOverlay();
|
|
674
|
+
const handleClick = () => {
|
|
675
|
+
openOverlay(ExportWorkflowOverlay, {
|
|
676
|
+
onExport: actions.handleDownload,
|
|
677
|
+
isDownloading: state.isDownloading,
|
|
678
|
+
});
|
|
679
|
+
};
|
|
680
|
+
return (_jsx(Button, { className: "border hover:bg-black/5 disabled:opacity-100 dark:hover:bg-white/5 disabled:[&>svg]:text-muted-foreground", disabled: state.isDownloading ||
|
|
681
|
+
state.nodes.length === 0 ||
|
|
682
|
+
state.isGenerating ||
|
|
683
|
+
!state.currentWorkflowId, onClick: handleClick, size: "icon", title: state.isDownloading
|
|
684
|
+
? "Preparing download..."
|
|
685
|
+
: "Export workflow as code", variant: "secondary", children: state.isDownloading ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : (_jsx(Download, { className: "size-4" })) }));
|
|
686
|
+
}
|
|
687
|
+
function VisibilityButton({ state, actions, }) {
|
|
688
|
+
const isPublic = state.workflowVisibility === "public";
|
|
689
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { className: "border hover:bg-black/5 dark:hover:bg-white/5", disabled: !state.currentWorkflowId || state.isGenerating, size: "icon", title: isPublic ? "Public workflow" : "Private workflow", variant: "secondary", children: isPublic ? (_jsx(Globe, { className: "size-4" })) : (_jsx(Lock, { className: "size-4" })) }) }), _jsxs(DropdownMenuContent, { align: "end", children: [_jsxs(DropdownMenuItem, { className: "flex items-center gap-2", onClick: () => actions.handleToggleVisibility("private"), children: [_jsx(Lock, { className: "size-4" }), "Private", !isPublic && _jsx(Check, { className: "ml-auto size-4" })] }), _jsxs(DropdownMenuItem, { className: "flex items-center gap-2", onClick: () => actions.handleToggleVisibility("public"), children: [_jsx(Globe, { className: "size-4" }), "Public", isPublic && _jsx(Check, { className: "ml-auto size-4" })] })] })] }));
|
|
690
|
+
}
|
|
691
|
+
function RunButtonGroup({ state, actions, }) {
|
|
692
|
+
return (_jsx(Button, { className: "border hover:bg-black/5 disabled:opacity-100 dark:hover:bg-white/5 disabled:[&>svg]:text-muted-foreground", disabled: state.isExecuting || state.nodes.length === 0 || state.isGenerating, onClick: () => actions.handleExecute(), size: "icon", title: "Run Workflow", variant: "secondary", children: state.isExecuting ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : (_jsx(Play, { className: "size-4" })) }));
|
|
693
|
+
}
|
|
694
|
+
function DuplicateButton({ isDuplicating, onDuplicate, }) {
|
|
695
|
+
return (_jsxs(Button, { className: "h-9 border hover:bg-black/5 dark:hover:bg-white/5", disabled: isDuplicating, onClick: onDuplicate, size: "sm", title: "Duplicate to your workflows", variant: "secondary", children: [isDuplicating ? (_jsx(Loader2, { className: "mr-2 size-4 animate-spin" })) : (_jsx(Copy, { className: "mr-2 size-4" })), "Duplicate"] }));
|
|
696
|
+
}
|
|
697
|
+
function WorkflowMenuComponent({ workflowId, state, actions, }) {
|
|
698
|
+
return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "flex h-9 max-w-[160px] items-center overflow-hidden rounded-md border bg-secondary text-secondary-foreground sm:max-w-none", children: _jsxs(DropdownMenu, { onOpenChange: (open) => open && actions.loadWorkflows(), children: [_jsxs(DropdownMenuTrigger, { className: "flex h-full cursor-pointer items-center gap-2 px-3 font-medium text-sm transition-all hover:bg-black/5 dark:hover:bg-white/5", children: [_jsx(WorkflowIcon, { className: "size-4 shrink-0" }), _jsx("p", { className: "truncate font-medium text-sm", children: workflowId ? (state.workflowName) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "sm:hidden", children: "New" }), _jsx("span", { className: "hidden sm:inline", children: "New Workflow" })] })) }), _jsx(ChevronDown, { className: "size-3 shrink-0 opacity-50" })] }), _jsxs(DropdownMenuContent, { align: "start", className: "w-64", children: [_jsx(DropdownMenuItem, { asChild: true, className: "flex items-center justify-between", children: _jsxs("a", { href: "/", children: ["New Workflow", " ", !workflowId && _jsx(Check, { className: "size-4 shrink-0" })] }) }), _jsx(DropdownMenuSeparator, {}), state.allWorkflows.length === 0 ? (_jsx(DropdownMenuItem, { disabled: true, children: "No workflows found" })) : (state.allWorkflows
|
|
699
|
+
.filter((w) => w.name !== "__current__")
|
|
700
|
+
.map((workflow) => (_jsxs(DropdownMenuItem, { className: "flex items-center justify-between", onClick: () => state.router.push(`/workflows/${workflow.id}`), children: [_jsx("span", { className: "truncate", children: workflow.name }), workflow.id === state.currentWorkflowId && (_jsx(Check, { className: "size-4 shrink-0" }))] }, workflow.id))))] })] }) }), workflowId && !state.isOwner && (_jsx("span", { className: "text-muted-foreground text-xs uppercase lg:hidden", children: "Read-only" }))] }));
|
|
701
|
+
}
|
|
702
|
+
export const WorkflowToolbar = ({ workflowId }) => {
|
|
703
|
+
const state = useWorkflowState();
|
|
704
|
+
const actions = useWorkflowActions(state);
|
|
705
|
+
return (_jsxs(React.Fragment, { children: [_jsx(Panel, { className: "flex flex-col gap-2 rounded-none border-none bg-transparent p-0 lg:flex-row lg:items-center", position: "top-left", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(WorkflowMenuComponent, { actions: actions, state: state, workflowId: workflowId }), workflowId && !state.isOwner && (_jsx("span", { className: "hidden text-muted-foreground text-xs uppercase lg:inline", children: "Read-only" }))] }) }), _jsx("div", { className: "pointer-events-auto absolute top-4 right-4 z-10", children: _jsxs("div", { className: "flex flex-col-reverse items-end gap-2 lg:flex-row lg:items-center", children: [_jsx(ToolbarActions, { actions: actions, state: state, workflowId: workflowId }), _jsxs("div", { className: "flex items-center gap-2", children: [!workflowId && _jsx(DeployButton, {}), workflowId && !state.isOwner && (_jsx(DuplicateButton, { isDuplicating: state.isDuplicating, onDuplicate: actions.handleDuplicate })), _jsx(UserMenu, {})] })] }) })] }));
|
|
706
|
+
};
|
|
707
|
+
//# sourceMappingURL=workflow-toolbar.js.map
|