@flowdrop/flowdrop 1.5.0 → 1.7.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/README.md +46 -47
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/WorkflowAdapter.js +26 -26
- package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +2 -2
- package/dist/adapters/agentspec/AgentSpecAdapter.js +122 -133
- package/dist/adapters/agentspec/agentAdapter.d.ts +2 -2
- package/dist/adapters/agentspec/agentAdapter.js +10 -10
- package/dist/adapters/agentspec/autoLayout.d.ts +1 -1
- package/dist/adapters/agentspec/autoLayout.js +7 -9
- package/dist/adapters/agentspec/componentTypeDefaults.d.ts +1 -1
- package/dist/adapters/agentspec/componentTypeDefaults.js +120 -120
- package/dist/adapters/agentspec/defaultNodeTypes.d.ts +2 -2
- package/dist/adapters/agentspec/defaultNodeTypes.js +307 -307
- package/dist/adapters/agentspec/index.d.ts +10 -10
- package/dist/adapters/agentspec/index.js +6 -6
- package/dist/adapters/agentspec/validator.d.ts +2 -2
- package/dist/adapters/agentspec/validator.js +20 -22
- package/dist/api/enhanced-client.d.ts +3 -3
- package/dist/api/enhanced-client.js +72 -73
- package/dist/chat/commandClassifier.js +6 -6
- package/dist/chat/index.d.ts +5 -5
- package/dist/chat/index.js +4 -4
- package/dist/chat/responseParser.d.ts +6 -6
- package/dist/chat/responseParser.js +28 -24
- package/dist/commands/batch.d.ts +1 -1
- package/dist/commands/batch.js +5 -7
- package/dist/commands/executor.d.ts +2 -2
- package/dist/commands/executor.js +320 -231
- package/dist/commands/index.d.ts +6 -6
- package/dist/commands/index.js +5 -5
- package/dist/commands/parser.d.ts +1 -1
- package/dist/commands/parser.js +91 -74
- package/dist/commands/positioner.d.ts +2 -2
- package/dist/commands/positioner.js +1 -1
- package/dist/commands/storeIntegration.svelte.d.ts +2 -2
- package/dist/commands/storeIntegration.svelte.js +5 -5
- package/dist/commands/types.d.ts +42 -42
- package/dist/commands/types.js +2 -2
- package/dist/components/App.svelte +280 -303
- package/dist/components/App.svelte.d.ts +11 -9
- package/dist/components/CanvasBanner.stories.svelte +10 -16
- package/dist/components/CanvasBanner.stories.svelte.d.ts +1 -1
- package/dist/components/CanvasBanner.svelte +2 -2
- package/dist/components/CanvasBanner.svelte.d.ts +1 -1
- package/dist/components/CanvasController.svelte +3 -4
- package/dist/components/ConfigForm.svelte +118 -256
- package/dist/components/ConfigForm.svelte.d.ts +2 -2
- package/dist/components/ConfigMappingRow.svelte +7 -9
- package/dist/components/ConfigMappingRow.svelte.d.ts +1 -1
- package/dist/components/ConfigModal.svelte +3 -3
- package/dist/components/ConfigModal.svelte.d.ts +1 -1
- package/dist/components/ConfigPanel.stories.svelte +19 -19
- package/dist/components/ConfigPanel.stories.svelte.d.ts +1 -1
- package/dist/components/ConfigPanel.svelte +9 -20
- package/dist/components/ConfigPanel.svelte.d.ts +1 -1
- package/dist/components/ConnectionLine.svelte +4 -4
- package/dist/components/EdgeRefresher.svelte +1 -1
- package/dist/components/FlowDropEdge.stories.svelte +110 -110
- package/dist/components/FlowDropEdge.svelte +9 -9
- package/dist/components/FlowDropEdge.svelte.d.ts +1 -1
- package/dist/components/FlowDropZone.svelte +6 -9
- package/dist/components/FlowDropZone.svelte.d.ts +1 -1
- package/dist/components/LoadingSpinner.stories.svelte +13 -13
- package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
- package/dist/components/LoadingSpinner.svelte +3 -3
- package/dist/components/LoadingSpinner.svelte.d.ts +1 -1
- package/dist/components/Logo.stories.svelte +4 -4
- package/dist/components/Logo.stories.svelte.d.ts +1 -1
- package/dist/components/Logo.svelte +3 -9
- package/dist/components/LogsSidebar.svelte +41 -48
- package/dist/components/LogsSidebar.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.stories.svelte +10 -14
- package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.svelte +4 -6
- package/dist/components/Navbar.stories.svelte +19 -19
- package/dist/components/Navbar.stories.svelte.d.ts +1 -1
- package/dist/components/Navbar.svelte +28 -49
- package/dist/components/Navbar.svelte.d.ts +2 -2
- package/dist/components/NodeSidebar.svelte +42 -88
- package/dist/components/NodeSidebar.svelte.d.ts +1 -1
- package/dist/components/NodeStatusOverlay.stories.svelte +19 -31
- package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
- package/dist/components/NodeStatusOverlay.svelte +40 -55
- package/dist/components/NodeStatusOverlay.svelte.d.ts +3 -3
- package/dist/components/NodeSwapPicker.svelte +20 -64
- package/dist/components/NodeSwapPicker.svelte.d.ts +1 -1
- package/dist/components/PipelineStatus.svelte +63 -89
- package/dist/components/PipelineStatus.svelte.d.ts +4 -4
- package/dist/components/PortCoordinateTracker.svelte +5 -7
- package/dist/components/PortCoordinateTracker.svelte.d.ts +1 -1
- package/dist/components/PortMappingRow.svelte +20 -24
- package/dist/components/PortMappingRow.svelte.d.ts +2 -2
- package/dist/components/ReadOnlyDetails.svelte +1 -1
- package/dist/components/SchemaForm.stories.svelte +53 -53
- package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
- package/dist/components/SchemaForm.svelte +24 -51
- package/dist/components/SchemaForm.svelte.d.ts +2 -2
- package/dist/components/SettingsModal.svelte +6 -9
- package/dist/components/SettingsModal.svelte.d.ts +1 -1
- package/dist/components/SettingsPanel.svelte +138 -158
- package/dist/components/SettingsPanel.svelte.d.ts +1 -1
- package/dist/components/StatusIcon.stories.svelte +16 -29
- package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
- package/dist/components/StatusIcon.svelte +19 -19
- package/dist/components/StatusIcon.svelte.d.ts +2 -2
- package/dist/components/StatusLabel.stories.svelte +8 -8
- package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
- package/dist/components/SwapMappingEditor.svelte +35 -56
- package/dist/components/SwapMappingEditor.svelte.d.ts +2 -2
- package/dist/components/ThemeToggle.stories.svelte +10 -10
- package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
- package/dist/components/ThemeToggle.svelte +22 -33
- package/dist/components/ThemeToggle.svelte.d.ts +1 -1
- package/dist/components/UniversalNode.svelte +29 -41
- package/dist/components/UniversalNode.svelte.d.ts +3 -3
- package/dist/components/WorkflowEditor.svelte +113 -168
- package/dist/components/WorkflowEditor.svelte.d.ts +4 -4
- package/dist/components/chat/AIChatPanel.svelte +272 -133
- package/dist/components/chat/AIChatPanel.svelte.d.ts +3 -3
- package/dist/components/chat/CommandPreview.svelte +74 -24
- package/dist/components/chat/CommandPreview.svelte.d.ts +1 -1
- package/dist/components/console/CommandConsole.stories.svelte +71 -53
- package/dist/components/console/CommandConsole.stories.svelte.d.ts +1 -1
- package/dist/components/console/CommandConsole.svelte +39 -35
- package/dist/components/console/CommandConsole.svelte.d.ts +2 -2
- package/dist/components/console/ConsoleAutocomplete.svelte +6 -3
- package/dist/components/console/ConsoleInput.svelte +148 -89
- package/dist/components/console/ConsoleInput.svelte.d.ts +1 -1
- package/dist/components/console/ConsoleOutput.svelte +5 -10
- package/dist/components/console/ConsoleOutput.svelte.d.ts +1 -1
- package/dist/components/console/formatters.d.ts +1 -1
- package/dist/components/console/formatters.js +27 -29
- package/dist/components/form/FormArray.svelte +75 -132
- package/dist/components/form/FormArray.svelte.d.ts +1 -1
- package/dist/components/form/FormAutocomplete.svelte +65 -108
- package/dist/components/form/FormAutocomplete.svelte.d.ts +1 -1
- package/dist/components/form/FormCheckboxGroup.stories.svelte +13 -16
- package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormCheckboxGroup.svelte +2 -2
- package/dist/components/form/FormCodeEditor.svelte +46 -59
- package/dist/components/form/FormField.svelte +79 -90
- package/dist/components/form/FormField.svelte.d.ts +2 -2
- package/dist/components/form/FormFieldLight.svelte +72 -88
- package/dist/components/form/FormFieldLight.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldWrapper.stories.svelte +14 -14
- package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldWrapper.svelte +2 -9
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldset.svelte +3 -3
- package/dist/components/form/FormFieldset.svelte.d.ts +2 -2
- package/dist/components/form/FormMarkdownEditor.svelte +123 -156
- package/dist/components/form/FormNumberField.stories.svelte +18 -18
- package/dist/components/form/FormNumberField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormNumberField.svelte +6 -6
- package/dist/components/form/FormRangeField.stories.svelte +13 -13
- package/dist/components/form/FormRangeField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormRangeField.svelte +4 -12
- package/dist/components/form/FormSelect.stories.svelte +21 -21
- package/dist/components/form/FormSelect.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormSelect.svelte +5 -5
- package/dist/components/form/FormSelect.svelte.d.ts +1 -1
- package/dist/components/form/FormTemplateEditor.svelte +126 -175
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +1 -1
- package/dist/components/form/FormTextField.stories.svelte +17 -23
- package/dist/components/form/FormTextField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormTextField.svelte +4 -4
- package/dist/components/form/FormTextarea.stories.svelte +18 -21
- package/dist/components/form/FormTextarea.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormTextarea.svelte +4 -4
- package/dist/components/form/FormToggle.stories.svelte +13 -16
- package/dist/components/form/FormToggle.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormToggle.svelte +3 -3
- package/dist/components/form/FormUISchemaRenderer.svelte +12 -19
- package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +3 -3
- package/dist/components/form/index.d.ts +19 -19
- package/dist/components/form/index.js +18 -18
- package/dist/components/form/templateAutocomplete.d.ts +2 -2
- package/dist/components/form/templateAutocomplete.js +55 -64
- package/dist/components/form/types.d.ts +6 -6
- package/dist/components/form/types.js +4 -9
- package/dist/components/icons/AlertCircleIcon.svelte +1 -6
- package/dist/components/icons/CogIcon.svelte +1 -6
- package/dist/components/interrupt/ChoicePrompt.stories.svelte +27 -27
- package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ChoicePrompt.svelte +17 -41
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +17 -17
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ConfirmationPrompt.svelte +10 -16
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/FormPrompt.svelte +10 -15
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/InterruptBubble.svelte +87 -121
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +2 -2
- package/dist/components/interrupt/ReviewPrompt.stories.svelte +37 -37
- package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ReviewPrompt.svelte +55 -75
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/TextInputPrompt.stories.svelte +16 -17
- package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/TextInputPrompt.svelte +13 -18
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/index.d.ts +6 -6
- package/dist/components/interrupt/index.js +6 -6
- package/dist/components/layouts/MainLayout.svelte +46 -84
- package/dist/components/layouts/MainLayout.svelte.d.ts +6 -6
- package/dist/components/nodes/GatewayNode.stories.svelte +64 -65
- package/dist/components/nodes/GatewayNode.svelte +37 -70
- package/dist/components/nodes/GatewayNode.svelte.d.ts +3 -3
- package/dist/components/nodes/IdeaNode.stories.svelte +25 -26
- package/dist/components/nodes/IdeaNode.svelte +22 -36
- package/dist/components/nodes/IdeaNode.svelte.d.ts +1 -1
- package/dist/components/nodes/NotesNode.stories.svelte +37 -38
- package/dist/components/nodes/NotesNode.svelte +28 -39
- package/dist/components/nodes/NotesNode.svelte.d.ts +1 -1
- package/dist/components/nodes/SimpleNode.stories.svelte +137 -138
- package/dist/components/nodes/SimpleNode.svelte +51 -81
- package/dist/components/nodes/SimpleNode.svelte.d.ts +1 -1
- package/dist/components/nodes/SquareNode.stories.svelte +75 -75
- package/dist/components/nodes/SquareNode.svelte +42 -68
- package/dist/components/nodes/SquareNode.svelte.d.ts +1 -1
- package/dist/components/nodes/TerminalNode.stories.svelte +10 -10
- package/dist/components/nodes/TerminalNode.svelte +74 -112
- package/dist/components/nodes/TerminalNode.svelte.d.ts +1 -1
- package/dist/components/nodes/ToolNode.stories.svelte +115 -116
- package/dist/components/nodes/ToolNode.svelte +31 -64
- package/dist/components/nodes/ToolNode.svelte.d.ts +1 -1
- package/dist/components/nodes/WorkflowNode.stories.svelte +84 -89
- package/dist/components/nodes/WorkflowNode.svelte +50 -103
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +3 -3
- package/dist/components/playground/ChatPanel.svelte +47 -103
- package/dist/components/playground/ExecutionLogs.svelte +45 -68
- package/dist/components/playground/InputCollector.svelte +32 -51
- package/dist/components/playground/MessageBubble.stories.svelte +25 -25
- package/dist/components/playground/MessageBubble.stories.svelte.d.ts +1 -1
- package/dist/components/playground/MessageBubble.svelte +54 -70
- package/dist/components/playground/MessageBubble.svelte.d.ts +1 -1
- package/dist/components/playground/Playground.svelte +60 -91
- package/dist/components/playground/Playground.svelte.d.ts +3 -3
- package/dist/components/playground/PlaygroundModal.svelte +8 -12
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +3 -3
- package/dist/components/playground/SessionManager.svelte +34 -40
- package/dist/components/playground/SessionManager.svelte.d.ts +1 -1
- package/dist/config/agentSpecEndpoints.d.ts +1 -1
- package/dist/config/agentSpecEndpoints.js +20 -20
- package/dist/config/constants.js +2 -2
- package/dist/config/defaultCategories.d.ts +1 -1
- package/dist/config/defaultCategories.js +86 -86
- package/dist/config/defaultPortConfig.d.ts +1 -1
- package/dist/config/defaultPortConfig.js +144 -144
- package/dist/config/endpoints.d.ts +4 -4
- package/dist/config/endpoints.js +68 -68
- package/dist/config/runtimeConfig.d.ts +2 -2
- package/dist/config/runtimeConfig.js +8 -8
- package/dist/core/index.d.ts +68 -68
- package/dist/core/index.js +38 -38
- package/dist/display/index.d.ts +2 -2
- package/dist/display/index.js +2 -2
- package/dist/editor/index.d.ts +64 -64
- package/dist/editor/index.js +54 -54
- package/dist/form/code.d.ts +5 -5
- package/dist/form/code.js +14 -14
- package/dist/form/fieldRegistry.d.ts +3 -3
- package/dist/form/fieldRegistry.js +9 -11
- package/dist/form/full.d.ts +8 -8
- package/dist/form/full.js +9 -9
- package/dist/form/index.d.ts +18 -18
- package/dist/form/index.js +16 -16
- package/dist/form/markdown.d.ts +4 -4
- package/dist/form/markdown.js +8 -8
- package/dist/helpers/proximityConnect.d.ts +3 -3
- package/dist/helpers/proximityConnect.js +32 -34
- package/dist/helpers/workflowEditorHelper.d.ts +6 -6
- package/dist/helpers/workflowEditorHelper.js +64 -68
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/mocks/app-environment.js +2 -2
- package/dist/mocks/app-forms.js +1 -1
- package/dist/mocks/app-navigation.js +2 -2
- package/dist/mocks/app-stores.js +3 -3
- package/dist/playground/index.d.ts +19 -19
- package/dist/playground/index.js +16 -16
- package/dist/playground/mount.d.ts +3 -3
- package/dist/playground/mount.js +24 -24
- package/dist/registry/builtinFormats.js +13 -13
- package/dist/registry/builtinNodes.d.ts +2 -2
- package/dist/registry/builtinNodes.js +77 -77
- package/dist/registry/index.d.ts +4 -4
- package/dist/registry/index.js +4 -4
- package/dist/registry/nodeComponentRegistry.d.ts +8 -8
- package/dist/registry/nodeComponentRegistry.js +9 -11
- package/dist/registry/plugin.d.ts +2 -2
- package/dist/registry/plugin.js +11 -11
- package/dist/registry/workflowFormatRegistry.d.ts +3 -3
- package/dist/registry/workflowFormatRegistry.js +2 -2
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.js +2 -2
- package/dist/schemas/v1/workflow.schema.json +5 -0
- package/dist/services/agentSpecExecutionService.d.ts +3 -3
- package/dist/services/agentSpecExecutionService.js +55 -56
- package/dist/services/api.d.ts +2 -2
- package/dist/services/api.js +37 -37
- package/dist/services/apiVariableService.d.ts +1 -1
- package/dist/services/apiVariableService.js +34 -41
- package/dist/services/autoSaveService.js +8 -8
- package/dist/services/categoriesApi.d.ts +2 -2
- package/dist/services/categoriesApi.js +8 -8
- package/dist/services/chatService.d.ts +1 -1
- package/dist/services/chatService.js +18 -18
- package/dist/services/draftStorage.d.ts +1 -1
- package/dist/services/draftStorage.js +11 -11
- package/dist/services/dynamicSchemaService.d.ts +1 -1
- package/dist/services/dynamicSchemaService.js +39 -41
- package/dist/services/globalSave.d.ts +2 -2
- package/dist/services/globalSave.js +38 -41
- package/dist/services/historyService.d.ts +1 -1
- package/dist/services/historyService.js +10 -10
- package/dist/services/interruptService.d.ts +1 -1
- package/dist/services/interruptService.js +29 -35
- package/dist/services/nodeExecutionService.d.ts +1 -1
- package/dist/services/nodeExecutionService.js +44 -45
- package/dist/services/playgroundService.d.ts +1 -1
- package/dist/services/playgroundService.js +29 -29
- package/dist/services/portConfigApi.d.ts +2 -2
- package/dist/services/portConfigApi.js +8 -8
- package/dist/services/settingsService.d.ts +2 -2
- package/dist/services/settingsService.js +19 -25
- package/dist/services/toastService.d.ts +4 -4
- package/dist/services/toastService.js +33 -33
- package/dist/services/variableService.d.ts +1 -1
- package/dist/services/variableService.js +36 -36
- package/dist/services/workflowStorage.d.ts +2 -2
- package/dist/services/workflowStorage.js +13 -13
- package/dist/settings/index.d.ts +7 -7
- package/dist/settings/index.js +6 -6
- package/dist/skins/default.d.ts +1 -1
- package/dist/skins/default.js +1 -1
- package/dist/skins/index.d.ts +3 -3
- package/dist/skins/index.js +7 -7
- package/dist/skins/slate.d.ts +1 -1
- package/dist/skins/slate.js +69 -69
- package/dist/stores/categoriesStore.svelte.d.ts +1 -1
- package/dist/stores/categoriesStore.svelte.js +5 -5
- package/dist/stores/editorStateMachine.svelte.d.ts +2 -2
- package/dist/stores/editorStateMachine.svelte.js +34 -34
- package/dist/stores/historyStore.svelte.d.ts +4 -4
- package/dist/stores/historyStore.svelte.js +4 -4
- package/dist/stores/interruptStore.svelte.d.ts +3 -3
- package/dist/stores/interruptStore.svelte.js +21 -21
- package/dist/stores/playgroundStore.svelte.d.ts +2 -2
- package/dist/stores/playgroundStore.svelte.js +18 -21
- package/dist/stores/portCoordinateStore.svelte.d.ts +2 -2
- package/dist/stores/portCoordinateStore.svelte.js +10 -13
- package/dist/stores/settingsStore.svelte.d.ts +2 -2
- package/dist/stores/settingsStore.svelte.js +57 -62
- package/dist/stores/workflowStore.svelte.d.ts +4 -3
- package/dist/stores/workflowStore.svelte.js +47 -47
- package/dist/stories/CanvasDecorator.svelte +7 -10
- package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
- package/dist/stories/EdgeDecorator.svelte +28 -31
- package/dist/stories/EdgeDecorator.svelte.d.ts +1 -1
- package/dist/stories/NodeDecorator.svelte +14 -20
- package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
- package/dist/stories/utils.d.ts +2 -2
- package/dist/stories/utils.js +89 -93
- package/dist/styles/base.css +16 -50
- package/dist/styles/tokens.css +10 -28
- package/dist/svelte-app.d.ts +10 -10
- package/dist/svelte-app.js +39 -39
- package/dist/themes/default.d.ts +1 -1
- package/dist/themes/default.js +4 -4
- package/dist/themes/index.d.ts +3 -3
- package/dist/themes/index.js +11 -11
- package/dist/themes/minimal.d.ts +1 -1
- package/dist/themes/minimal.js +5 -5
- package/dist/types/agentspec.d.ts +18 -18
- package/dist/types/agentspec.js +2 -2
- package/dist/types/auth.d.ts +1 -1
- package/dist/types/auth.js +6 -6
- package/dist/types/chat.d.ts +2 -2
- package/dist/types/config.d.ts +6 -6
- package/dist/types/events.d.ts +3 -3
- package/dist/types/events.js +2 -2
- package/dist/types/index.d.ts +34 -32
- package/dist/types/index.js +6 -6
- package/dist/types/interrupt.d.ts +6 -6
- package/dist/types/interrupt.js +21 -21
- package/dist/types/interruptState.d.ts +12 -12
- package/dist/types/interruptState.js +66 -66
- package/dist/types/playground.d.ts +7 -7
- package/dist/types/playground.js +14 -14
- package/dist/types/settings.d.ts +7 -5
- package/dist/types/settings.js +19 -24
- package/dist/types/skin.d.ts +1 -1
- package/dist/types/theme.d.ts +2 -2
- package/dist/types/uischema.d.ts +4 -4
- package/dist/types/uischema.js +3 -3
- package/dist/utils/colors.d.ts +1 -1
- package/dist/utils/colors.js +95 -97
- package/dist/utils/config.d.ts +2 -2
- package/dist/utils/config.js +48 -48
- package/dist/utils/connections.d.ts +6 -2
- package/dist/utils/connections.js +21 -15
- package/dist/utils/edgeStyling.d.ts +2 -2
- package/dist/utils/edgeStyling.js +36 -39
- package/dist/utils/errors.js +3 -3
- package/dist/utils/fetchWithAuth.d.ts +1 -1
- package/dist/utils/fetchWithAuth.js +2 -2
- package/dist/utils/handleIds.d.ts +2 -2
- package/dist/utils/handleIds.js +8 -8
- package/dist/utils/handlePositioning.d.ts +1 -1
- package/dist/utils/handlePositioning.js +2 -2
- package/dist/utils/icons.d.ts +1 -1
- package/dist/utils/icons.js +74 -74
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/logger.js +7 -7
- package/dist/utils/nodeIds.d.ts +1 -1
- package/dist/utils/nodeIds.js +1 -1
- package/dist/utils/nodeStatus.d.ts +1 -1
- package/dist/utils/nodeStatus.js +48 -48
- package/dist/utils/nodeSwap.d.ts +9 -9
- package/dist/utils/nodeSwap.js +52 -58
- package/dist/utils/nodeTypes.d.ts +1 -1
- package/dist/utils/nodeTypes.js +20 -21
- package/dist/utils/nodeWrapper.d.ts +7 -7
- package/dist/utils/nodeWrapper.js +19 -21
- package/dist/utils/performanceUtils.d.ts +1 -1
- package/dist/utils/performanceUtils.js +1 -2
- package/dist/utils/portUtils.d.ts +2 -2
- package/dist/utils/portUtils.js +1 -1
- package/dist/utils/sanitize.js +1 -1
- package/dist/utils/uischema.d.ts +2 -2
- package/dist/utils/uischema.js +8 -8
- package/dist/utils/validation.js +8 -8
- package/package.json +7 -11
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
-->
|
|
22
22
|
|
|
23
23
|
<script lang="ts">
|
|
24
|
-
import { getContext, onMount } from
|
|
25
|
-
import Icon from
|
|
26
|
-
import type { AutocompleteConfig, AuthProvider } from
|
|
27
|
-
import type { FieldOption } from
|
|
28
|
-
import { buildFetchHeaders } from
|
|
29
|
-
import { logger } from
|
|
24
|
+
import { getContext, onMount } from 'svelte';
|
|
25
|
+
import Icon from '@iconify/svelte';
|
|
26
|
+
import type { AutocompleteConfig, AuthProvider } from '../../types/index.js';
|
|
27
|
+
import type { FieldOption } from './types.js';
|
|
28
|
+
import { buildFetchHeaders } from '../../utils/fetchWithAuth.js';
|
|
29
|
+
import { logger } from '../../utils/logger.js';
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Props interface for FormAutocomplete component
|
|
@@ -52,31 +52,29 @@
|
|
|
52
52
|
|
|
53
53
|
let {
|
|
54
54
|
id,
|
|
55
|
-
value =
|
|
55
|
+
value = '',
|
|
56
56
|
autocomplete,
|
|
57
57
|
required = false,
|
|
58
|
-
placeholder =
|
|
58
|
+
placeholder = '',
|
|
59
59
|
disabled = false,
|
|
60
60
|
ariaDescribedBy,
|
|
61
|
-
onChange
|
|
61
|
+
onChange
|
|
62
62
|
}: Props = $props();
|
|
63
63
|
|
|
64
64
|
// Get AuthProvider and baseUrl from context via getter functions
|
|
65
65
|
// This pattern ensures we always get the current value, even if props change after mount
|
|
66
|
-
const getAuthProvider = getContext<
|
|
67
|
-
|
|
68
|
-
>("flowdrop:getAuthProvider");
|
|
69
|
-
const getBaseUrl = getContext<(() => string) | undefined>(
|
|
70
|
-
"flowdrop:getBaseUrl",
|
|
66
|
+
const getAuthProvider = getContext<(() => AuthProvider | undefined) | undefined>(
|
|
67
|
+
'flowdrop:getAuthProvider'
|
|
71
68
|
);
|
|
69
|
+
const getBaseUrl = getContext<(() => string) | undefined>('flowdrop:getBaseUrl');
|
|
72
70
|
|
|
73
71
|
// Configuration with defaults
|
|
74
|
-
const queryParam = $derived(autocomplete.queryParam ??
|
|
72
|
+
const queryParam = $derived(autocomplete.queryParam ?? 'q');
|
|
75
73
|
const minChars = $derived(autocomplete.minChars ?? 0);
|
|
76
74
|
const debounceMs = $derived(autocomplete.debounceMs ?? 300);
|
|
77
75
|
const fetchOnFocus = $derived(autocomplete.fetchOnFocus ?? false);
|
|
78
|
-
const labelField = $derived(autocomplete.labelField ??
|
|
79
|
-
const valueField = $derived(autocomplete.valueField ??
|
|
76
|
+
const labelField = $derived(autocomplete.labelField ?? 'label');
|
|
77
|
+
const valueField = $derived(autocomplete.valueField ?? 'value');
|
|
80
78
|
const allowFreeText = $derived(autocomplete.allowFreeText ?? false);
|
|
81
79
|
const multiple = $derived(autocomplete.multiple ?? false);
|
|
82
80
|
|
|
@@ -84,7 +82,7 @@
|
|
|
84
82
|
let inputElement: HTMLInputElement | undefined = $state(undefined);
|
|
85
83
|
let containerElement: HTMLDivElement | undefined = $state(undefined);
|
|
86
84
|
let popoverElement: HTMLDivElement | undefined = $state(undefined);
|
|
87
|
-
let inputValue = $state(
|
|
85
|
+
let inputValue = $state('');
|
|
88
86
|
let suggestions = $state<FieldOption[]>([]);
|
|
89
87
|
let isOpen = $state(false);
|
|
90
88
|
let isLoading = $state(false);
|
|
@@ -94,7 +92,7 @@
|
|
|
94
92
|
let abortController: AbortController | null = null;
|
|
95
93
|
|
|
96
94
|
// Popover positioning style
|
|
97
|
-
let popoverStyle = $state(
|
|
95
|
+
let popoverStyle = $state('');
|
|
98
96
|
|
|
99
97
|
// Cache of value-to-label mappings for selected items
|
|
100
98
|
let labelCache = $state<Map<string, string>>(new Map());
|
|
@@ -117,7 +115,7 @@
|
|
|
117
115
|
: []
|
|
118
116
|
: value
|
|
119
117
|
? [String(value)]
|
|
120
|
-
: []
|
|
118
|
+
: []
|
|
121
119
|
);
|
|
122
120
|
|
|
123
121
|
/**
|
|
@@ -151,12 +149,12 @@
|
|
|
151
149
|
* @returns Full URL with query parameter
|
|
152
150
|
*/
|
|
153
151
|
function buildUrl(query: string): string {
|
|
154
|
-
const baseUrl = getBaseUrl?.() ??
|
|
155
|
-
const url = autocomplete.url.startsWith(
|
|
152
|
+
const baseUrl = getBaseUrl?.() ?? '';
|
|
153
|
+
const url = autocomplete.url.startsWith('http')
|
|
156
154
|
? autocomplete.url
|
|
157
155
|
: `${baseUrl}${autocomplete.url}`;
|
|
158
156
|
|
|
159
|
-
const separator = url.includes(
|
|
157
|
+
const separator = url.includes('?') ? '&' : '?';
|
|
160
158
|
return `${url}${separator}${encodeURIComponent(queryParam)}=${encodeURIComponent(query)}`;
|
|
161
159
|
}
|
|
162
160
|
|
|
@@ -167,13 +165,13 @@
|
|
|
167
165
|
*/
|
|
168
166
|
function mapResponse(data: unknown): FieldOption[] {
|
|
169
167
|
if (!Array.isArray(data)) {
|
|
170
|
-
logger.warn(
|
|
168
|
+
logger.warn('[FormAutocomplete] Response is not an array:', data);
|
|
171
169
|
return [];
|
|
172
170
|
}
|
|
173
171
|
|
|
174
172
|
return data.map((item: Record<string, unknown>) => ({
|
|
175
|
-
label: String(item[labelField] ?? item[valueField] ??
|
|
176
|
-
value: String(item[valueField] ??
|
|
173
|
+
label: String(item[labelField] ?? item[valueField] ?? ''),
|
|
174
|
+
value: String(item[valueField] ?? '')
|
|
177
175
|
}));
|
|
178
176
|
}
|
|
179
177
|
|
|
@@ -207,9 +205,9 @@
|
|
|
207
205
|
}, 5000);
|
|
208
206
|
|
|
209
207
|
const response = await fetch(buildUrl(query), {
|
|
210
|
-
method:
|
|
208
|
+
method: 'GET',
|
|
211
209
|
headers,
|
|
212
|
-
signal: abortController.signal
|
|
210
|
+
signal: abortController.signal
|
|
213
211
|
});
|
|
214
212
|
|
|
215
213
|
clearTimeout(timeoutId);
|
|
@@ -229,13 +227,12 @@
|
|
|
229
227
|
suggestions = mapped;
|
|
230
228
|
highlightedIndex = -1;
|
|
231
229
|
} catch (err) {
|
|
232
|
-
if (err instanceof Error && err.name ===
|
|
230
|
+
if (err instanceof Error && err.name === 'AbortError') {
|
|
233
231
|
// Request was cancelled, ignore
|
|
234
232
|
return;
|
|
235
233
|
}
|
|
236
|
-
logger.error(
|
|
237
|
-
error =
|
|
238
|
-
err instanceof Error ? err.message : "Failed to fetch suggestions";
|
|
234
|
+
logger.error('[FormAutocomplete] Fetch error:', err);
|
|
235
|
+
error = err instanceof Error ? err.message : 'Failed to fetch suggestions';
|
|
239
236
|
suggestions = [];
|
|
240
237
|
} finally {
|
|
241
238
|
isLoading = false;
|
|
@@ -296,15 +293,13 @@
|
|
|
296
293
|
hideDropdown();
|
|
297
294
|
|
|
298
295
|
// If not allowFreeText and single mode, validate the input
|
|
299
|
-
if (!allowFreeText && !multiple && inputValue !==
|
|
296
|
+
if (!allowFreeText && !multiple && inputValue !== '') {
|
|
300
297
|
const currentVal = selectedValues;
|
|
301
298
|
const matchingSuggestion = suggestions.find(
|
|
302
|
-
(s) =>
|
|
303
|
-
s.value === currentVal[0] ||
|
|
304
|
-
s.label.toLowerCase() === inputValue.toLowerCase(),
|
|
299
|
+
(s) => s.value === currentVal[0] || s.label.toLowerCase() === inputValue.toLowerCase()
|
|
305
300
|
);
|
|
306
301
|
if (!matchingSuggestion && currentVal.length === 0) {
|
|
307
|
-
inputValue =
|
|
302
|
+
inputValue = '';
|
|
308
303
|
}
|
|
309
304
|
}
|
|
310
305
|
}, 200);
|
|
@@ -330,11 +325,11 @@
|
|
|
330
325
|
onChange(newValues);
|
|
331
326
|
}
|
|
332
327
|
// Clear input and keep dropdown open for more selections
|
|
333
|
-
inputValue =
|
|
328
|
+
inputValue = '';
|
|
334
329
|
inputElement?.focus();
|
|
335
330
|
} else {
|
|
336
331
|
// Single selection mode
|
|
337
|
-
inputValue =
|
|
332
|
+
inputValue = '';
|
|
338
333
|
onChange(option.value);
|
|
339
334
|
hideDropdown();
|
|
340
335
|
}
|
|
@@ -353,7 +348,7 @@
|
|
|
353
348
|
const newValues = current.filter((v) => v !== valueToRemove);
|
|
354
349
|
onChange(newValues);
|
|
355
350
|
} else {
|
|
356
|
-
onChange(
|
|
351
|
+
onChange('');
|
|
357
352
|
}
|
|
358
353
|
inputElement?.focus();
|
|
359
354
|
}
|
|
@@ -364,28 +359,24 @@
|
|
|
364
359
|
*/
|
|
365
360
|
function handleKeydown(event: KeyboardEvent): void {
|
|
366
361
|
// Handle backspace to remove last tag in multiple mode
|
|
367
|
-
if (
|
|
368
|
-
event.key === "Backspace" &&
|
|
369
|
-
inputValue === "" &&
|
|
370
|
-
selectedValues.length > 0
|
|
371
|
-
) {
|
|
362
|
+
if (event.key === 'Backspace' && inputValue === '' && selectedValues.length > 0) {
|
|
372
363
|
event.preventDefault();
|
|
373
364
|
const current = selectedValues;
|
|
374
365
|
if (multiple) {
|
|
375
366
|
const newValues = current.slice(0, -1);
|
|
376
367
|
onChange(newValues);
|
|
377
368
|
} else {
|
|
378
|
-
onChange(
|
|
369
|
+
onChange('');
|
|
379
370
|
}
|
|
380
371
|
return;
|
|
381
372
|
}
|
|
382
373
|
|
|
383
|
-
if (!isOpen && event.key !==
|
|
374
|
+
if (!isOpen && event.key !== 'ArrowDown' && event.key !== 'Enter') {
|
|
384
375
|
return;
|
|
385
376
|
}
|
|
386
377
|
|
|
387
378
|
switch (event.key) {
|
|
388
|
-
case
|
|
379
|
+
case 'ArrowDown':
|
|
389
380
|
event.preventDefault();
|
|
390
381
|
if (!isOpen) {
|
|
391
382
|
showDropdown();
|
|
@@ -393,29 +384,26 @@
|
|
|
393
384
|
fetchSuggestions(inputValue);
|
|
394
385
|
}
|
|
395
386
|
} else {
|
|
396
|
-
highlightedIndex = Math.min(
|
|
397
|
-
highlightedIndex + 1,
|
|
398
|
-
suggestions.length - 1,
|
|
399
|
-
);
|
|
387
|
+
highlightedIndex = Math.min(highlightedIndex + 1, suggestions.length - 1);
|
|
400
388
|
}
|
|
401
389
|
break;
|
|
402
390
|
|
|
403
|
-
case
|
|
391
|
+
case 'ArrowUp':
|
|
404
392
|
event.preventDefault();
|
|
405
393
|
highlightedIndex = Math.max(highlightedIndex - 1, -1);
|
|
406
394
|
break;
|
|
407
395
|
|
|
408
|
-
case
|
|
396
|
+
case 'Enter':
|
|
409
397
|
event.preventDefault();
|
|
410
398
|
if (highlightedIndex >= 0 && highlightedIndex < suggestions.length) {
|
|
411
399
|
selectOption(suggestions[highlightedIndex]);
|
|
412
|
-
} else if (allowFreeText && inputValue !==
|
|
400
|
+
} else if (allowFreeText && inputValue !== '') {
|
|
413
401
|
if (multiple) {
|
|
414
402
|
const current = selectedValues;
|
|
415
403
|
if (!current.includes(inputValue)) {
|
|
416
404
|
onChange([...current, inputValue]);
|
|
417
405
|
}
|
|
418
|
-
inputValue =
|
|
406
|
+
inputValue = '';
|
|
419
407
|
} else {
|
|
420
408
|
onChange(inputValue);
|
|
421
409
|
hideDropdown();
|
|
@@ -423,13 +411,13 @@
|
|
|
423
411
|
}
|
|
424
412
|
break;
|
|
425
413
|
|
|
426
|
-
case
|
|
414
|
+
case 'Escape':
|
|
427
415
|
event.preventDefault();
|
|
428
416
|
hideDropdown();
|
|
429
417
|
highlightedIndex = -1;
|
|
430
418
|
break;
|
|
431
419
|
|
|
432
|
-
case
|
|
420
|
+
case 'Tab':
|
|
433
421
|
// Allow tab to close dropdown naturally
|
|
434
422
|
hideDropdown();
|
|
435
423
|
break;
|
|
@@ -448,8 +436,8 @@
|
|
|
448
436
|
* Clear all selections
|
|
449
437
|
*/
|
|
450
438
|
function handleClearAll(): void {
|
|
451
|
-
inputValue =
|
|
452
|
-
onChange(multiple ? [] :
|
|
439
|
+
inputValue = '';
|
|
440
|
+
onChange(multiple ? [] : '');
|
|
453
441
|
suggestions = [];
|
|
454
442
|
inputElement?.focus();
|
|
455
443
|
}
|
|
@@ -539,12 +527,12 @@
|
|
|
539
527
|
updatePopoverPosition();
|
|
540
528
|
};
|
|
541
529
|
|
|
542
|
-
window.addEventListener(
|
|
543
|
-
window.addEventListener(
|
|
530
|
+
window.addEventListener('scroll', handlePositionUpdate, true);
|
|
531
|
+
window.addEventListener('resize', handlePositionUpdate);
|
|
544
532
|
|
|
545
533
|
return () => {
|
|
546
|
-
window.removeEventListener(
|
|
547
|
-
window.removeEventListener(
|
|
534
|
+
window.removeEventListener('scroll', handlePositionUpdate, true);
|
|
535
|
+
window.removeEventListener('resize', handlePositionUpdate);
|
|
548
536
|
};
|
|
549
537
|
}
|
|
550
538
|
});
|
|
@@ -586,9 +574,7 @@
|
|
|
586
574
|
<div class="form-autocomplete__tags">
|
|
587
575
|
{#each selectedValues as selectedVal (selectedVal)}
|
|
588
576
|
<span class="form-autocomplete__tag">
|
|
589
|
-
<span class="form-autocomplete__tag-label"
|
|
590
|
-
>{getDisplayLabel(selectedVal)}</span
|
|
591
|
-
>
|
|
577
|
+
<span class="form-autocomplete__tag-label">{getDisplayLabel(selectedVal)}</span>
|
|
592
578
|
{#if !disabled}
|
|
593
579
|
<button
|
|
594
580
|
type="button"
|
|
@@ -616,16 +602,14 @@
|
|
|
616
602
|
{id}
|
|
617
603
|
class="form-autocomplete__input"
|
|
618
604
|
value={inputValue}
|
|
619
|
-
placeholder={selectedValues.length === 0 ? placeholder :
|
|
605
|
+
placeholder={selectedValues.length === 0 ? placeholder : ''}
|
|
620
606
|
{disabled}
|
|
621
607
|
aria-required={required}
|
|
622
608
|
aria-describedby={ariaDescribedBy}
|
|
623
609
|
role="combobox"
|
|
624
610
|
aria-expanded={isOpen}
|
|
625
611
|
aria-controls={listboxId}
|
|
626
|
-
aria-activedescendant={highlightedIndex >= 0
|
|
627
|
-
? getOptionId(highlightedIndex)
|
|
628
|
-
: undefined}
|
|
612
|
+
aria-activedescendant={highlightedIndex >= 0 ? getOptionId(highlightedIndex) : undefined}
|
|
629
613
|
aria-autocomplete="list"
|
|
630
614
|
autocomplete="off"
|
|
631
615
|
oninput={handleInput}
|
|
@@ -638,10 +622,7 @@
|
|
|
638
622
|
<!-- Status icons -->
|
|
639
623
|
<div class="form-autocomplete__icons">
|
|
640
624
|
{#if isLoading}
|
|
641
|
-
<span
|
|
642
|
-
class="form-autocomplete__spinner"
|
|
643
|
-
aria-label="Loading suggestions"
|
|
644
|
-
>
|
|
625
|
+
<span class="form-autocomplete__spinner" aria-label="Loading suggestions">
|
|
645
626
|
<Icon icon="heroicons:arrow-path" />
|
|
646
627
|
</span>
|
|
647
628
|
{:else if selectedValues.length > 0 && !disabled}
|
|
@@ -676,42 +657,23 @@
|
|
|
676
657
|
style={popoverStyle}
|
|
677
658
|
onmousedown={(e) => e.preventDefault()}
|
|
678
659
|
>
|
|
679
|
-
<ul
|
|
680
|
-
class="form-autocomplete__listbox"
|
|
681
|
-
role="listbox"
|
|
682
|
-
aria-label="Suggestions"
|
|
683
|
-
>
|
|
660
|
+
<ul class="form-autocomplete__listbox" role="listbox" aria-label="Suggestions">
|
|
684
661
|
{#if isLoading}
|
|
685
|
-
<li
|
|
686
|
-
class="form-autocomplete__status
|
|
687
|
-
>
|
|
688
|
-
<Icon
|
|
689
|
-
icon="heroicons:arrow-path"
|
|
690
|
-
class="form-autocomplete__status-icon"
|
|
691
|
-
/>
|
|
662
|
+
<li class="form-autocomplete__status form-autocomplete__status--loading">
|
|
663
|
+
<Icon icon="heroicons:arrow-path" class="form-autocomplete__status-icon" />
|
|
692
664
|
<span>Loading suggestions...</span>
|
|
693
665
|
</li>
|
|
694
666
|
{:else if error}
|
|
695
667
|
<li class="form-autocomplete__status form-autocomplete__status--error">
|
|
696
|
-
<Icon
|
|
697
|
-
icon="heroicons:exclamation-triangle"
|
|
698
|
-
class="form-autocomplete__status-icon"
|
|
699
|
-
/>
|
|
668
|
+
<Icon icon="heroicons:exclamation-triangle" class="form-autocomplete__status-icon" />
|
|
700
669
|
<span>{error}</span>
|
|
701
|
-
<button
|
|
702
|
-
type="button"
|
|
703
|
-
class="form-autocomplete__retry"
|
|
704
|
-
onclick={handleRetry}
|
|
705
|
-
>
|
|
670
|
+
<button type="button" class="form-autocomplete__retry" onclick={handleRetry}>
|
|
706
671
|
Retry
|
|
707
672
|
</button>
|
|
708
673
|
</li>
|
|
709
674
|
{:else if suggestions.length === 0}
|
|
710
675
|
<li class="form-autocomplete__status form-autocomplete__status--empty">
|
|
711
|
-
<Icon
|
|
712
|
-
icon="heroicons:magnifying-glass"
|
|
713
|
-
class="form-autocomplete__status-icon"
|
|
714
|
-
/>
|
|
676
|
+
<Icon icon="heroicons:magnifying-glass" class="form-autocomplete__status-icon" />
|
|
715
677
|
<span>No results found</span>
|
|
716
678
|
</li>
|
|
717
679
|
{:else}
|
|
@@ -720,8 +682,7 @@
|
|
|
720
682
|
<li
|
|
721
683
|
id={getOptionId(index)}
|
|
722
684
|
class="form-autocomplete__option"
|
|
723
|
-
class:form-autocomplete__option--highlighted={index ===
|
|
724
|
-
highlightedIndex}
|
|
685
|
+
class:form-autocomplete__option--highlighted={index === highlightedIndex}
|
|
725
686
|
class:form-autocomplete__option--selected={isSelected(option.value)}
|
|
726
687
|
role="option"
|
|
727
688
|
aria-selected={isSelected(option.value)}
|
|
@@ -730,10 +691,7 @@
|
|
|
730
691
|
>
|
|
731
692
|
<span class="form-autocomplete__option-label">{option.label}</span>
|
|
732
693
|
{#if isSelected(option.value)}
|
|
733
|
-
<Icon
|
|
734
|
-
icon="heroicons:check"
|
|
735
|
-
class="form-autocomplete__option-check"
|
|
736
|
-
/>
|
|
694
|
+
<Icon icon="heroicons:check" class="form-autocomplete__option-check" />
|
|
737
695
|
{/if}
|
|
738
696
|
</li>
|
|
739
697
|
{/each}
|
|
@@ -805,8 +763,7 @@
|
|
|
805
763
|
display: inline-flex;
|
|
806
764
|
align-items: center;
|
|
807
765
|
gap: var(--fd-space-3xs);
|
|
808
|
-
padding: var(--fd-space-3xs) var(--fd-space-3xs) var(--fd-space-3xs)
|
|
809
|
-
var(--fd-space-xs);
|
|
766
|
+
padding: var(--fd-space-3xs) var(--fd-space-3xs) var(--fd-space-3xs) var(--fd-space-xs);
|
|
810
767
|
background-color: var(--fd-primary-muted);
|
|
811
768
|
border: 1px solid var(--fd-primary-muted);
|
|
812
769
|
border-radius: var(--fd-radius-md);
|
|
@@ -1,31 +1,28 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import FormCheckboxGroup from
|
|
4
|
-
import { fn } from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import FormCheckboxGroup from './FormCheckboxGroup.svelte';
|
|
4
|
+
import { fn } from 'storybook/test';
|
|
5
5
|
|
|
6
6
|
const { Story } = defineMeta({
|
|
7
|
-
title:
|
|
7
|
+
title: 'Form/FormCheckboxGroup',
|
|
8
8
|
component: FormCheckboxGroup,
|
|
9
|
-
tags: [
|
|
9
|
+
tags: ['autodocs'],
|
|
10
10
|
argTypes: {
|
|
11
|
-
disabled: { control:
|
|
11
|
+
disabled: { control: 'boolean' }
|
|
12
12
|
},
|
|
13
13
|
args: {
|
|
14
|
-
id:
|
|
15
|
-
options: [
|
|
14
|
+
id: 'demo-checkbox-group',
|
|
15
|
+
options: ['Email', 'SMS', 'Push Notification', 'Webhook'],
|
|
16
16
|
value: [],
|
|
17
|
-
onChange: fn()
|
|
18
|
-
}
|
|
17
|
+
onChange: fn()
|
|
18
|
+
}
|
|
19
19
|
});
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<Story name="No Selection" args={{ value: [] }} />
|
|
23
23
|
|
|
24
|
-
<Story name="Pre-selected" args={{ value: [
|
|
24
|
+
<Story name="Pre-selected" args={{ value: ['Email', 'Push Notification'] }} />
|
|
25
25
|
|
|
26
|
-
<Story
|
|
27
|
-
name="All Selected"
|
|
28
|
-
args={{ value: ["Email", "SMS", "Push Notification", "Webhook"] }}
|
|
29
|
-
/>
|
|
26
|
+
<Story name="All Selected" args={{ value: ['Email', 'SMS', 'Push Notification', 'Webhook'] }} />
|
|
30
27
|
|
|
31
|
-
<Story name="Disabled" args={{ value: [
|
|
28
|
+
<Story name="Disabled" args={{ value: ['Email'], disabled: true }} />
|
|
@@ -11,7 +11,7 @@ declare const FormCheckboxGroup: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import FormCheckboxGroup from
|
|
14
|
+
import FormCheckboxGroup from './FormCheckboxGroup.svelte';
|
|
15
15
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
16
|
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
17
|
$$bindings?: Bindings;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
-->
|
|
10
10
|
|
|
11
11
|
<script lang="ts">
|
|
12
|
-
import Icon from
|
|
12
|
+
import Icon from '@iconify/svelte';
|
|
13
13
|
|
|
14
14
|
interface Props {
|
|
15
15
|
/** Field identifier (used for ARIA) */
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
options = [],
|
|
33
33
|
disabled = false,
|
|
34
34
|
ariaDescribedBy,
|
|
35
|
-
onChange
|
|
35
|
+
onChange
|
|
36
36
|
}: Props = $props();
|
|
37
37
|
|
|
38
38
|
/**
|