@flowdrop/flowdrop 1.0.1 → 1.2.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 +50 -50
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/WorkflowAdapter.js +25 -25
- package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +2 -2
- package/dist/adapters/agentspec/AgentSpecAdapter.js +133 -122
- 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 +2 -2
- 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 +22 -20
- package/dist/api/enhanced-client.d.ts +3 -3
- package/dist/api/enhanced-client.js +73 -72
- package/dist/components/App.svelte +1090 -961
- package/dist/components/App.svelte.d.ts +9 -6
- package/dist/components/CanvasBanner.stories.svelte +23 -20
- package/dist/components/CanvasBanner.stories.svelte.d.ts +1 -1
- package/dist/components/CanvasBanner.svelte +52 -46
- package/dist/components/ConfigForm.svelte +1164 -1065
- package/dist/components/ConfigForm.svelte.d.ts +2 -2
- package/dist/components/ConfigModal.svelte +180 -180
- package/dist/components/ConfigModal.svelte.d.ts +1 -1
- package/dist/components/ConfigPanel.stories.svelte +35 -35
- package/dist/components/ConfigPanel.stories.svelte.d.ts +1 -1
- package/dist/components/ConfigPanel.svelte +178 -167
- package/dist/components/ConfigPanel.svelte.d.ts +1 -1
- package/dist/components/ConnectionLine.svelte +25 -25
- package/dist/components/EdgeRefresher.svelte +26 -26
- package/dist/components/FlowDropEdge.stories.svelte +179 -143
- package/dist/components/FlowDropEdge.svelte +147 -147
- package/dist/components/FlowDropEdge.svelte.d.ts +1 -1
- package/dist/components/FlowDropZone.svelte +63 -60
- package/dist/components/FlowDropZone.svelte.d.ts +1 -1
- package/dist/components/LoadingSpinner.stories.svelte +19 -19
- package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
- package/dist/components/LoadingSpinner.svelte +21 -21
- package/dist/components/LoadingSpinner.svelte.d.ts +1 -1
- package/dist/components/Logo.stories.svelte +13 -13
- package/dist/components/Logo.stories.svelte.d.ts +1 -1
- package/dist/components/Logo.svelte +101 -95
- package/dist/components/LogsSidebar.svelte +553 -546
- package/dist/components/LogsSidebar.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.stories.svelte +29 -23
- package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.svelte +16 -14
- package/dist/components/Navbar.stories.svelte +43 -38
- package/dist/components/Navbar.stories.svelte.d.ts +1 -1
- package/dist/components/Navbar.svelte +760 -706
- package/dist/components/Navbar.svelte.d.ts +1 -1
- package/dist/components/NodeSidebar.svelte +905 -746
- package/dist/components/NodeSidebar.svelte.d.ts +5 -1
- package/dist/components/NodeStatusOverlay.stories.svelte +82 -70
- package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
- package/dist/components/NodeStatusOverlay.svelte +295 -280
- package/dist/components/NodeStatusOverlay.svelte.d.ts +3 -3
- package/dist/components/PipelineStatus.svelte +326 -300
- package/dist/components/PipelineStatus.svelte.d.ts +4 -4
- package/dist/components/PortCoordinateTracker.svelte +49 -47
- package/dist/components/PortCoordinateTracker.svelte.d.ts +1 -1
- package/dist/components/ReadOnlyDetails.svelte +156 -156
- package/dist/components/SchemaForm.stories.svelte +106 -98
- package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
- package/dist/components/SchemaForm.svelte +490 -463
- package/dist/components/SchemaForm.svelte.d.ts +2 -2
- package/dist/components/SettingsModal.svelte +226 -223
- package/dist/components/SettingsModal.svelte.d.ts +1 -1
- package/dist/components/SettingsPanel.svelte +637 -601
- package/dist/components/SettingsPanel.svelte.d.ts +1 -1
- package/dist/components/StatusIcon.stories.svelte +62 -49
- package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
- package/dist/components/StatusIcon.svelte +87 -87
- package/dist/components/StatusIcon.svelte.d.ts +2 -2
- package/dist/components/StatusLabel.stories.svelte +12 -12
- package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
- package/dist/components/StatusLabel.svelte +19 -19
- package/dist/components/ThemeToggle.stories.svelte +16 -16
- package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
- package/dist/components/ThemeToggle.svelte +180 -169
- package/dist/components/ThemeToggle.svelte.d.ts +1 -1
- package/dist/components/UniversalNode.svelte +150 -138
- package/dist/components/UniversalNode.svelte.d.ts +3 -3
- package/dist/components/WorkflowEditor.svelte +1069 -1014
- package/dist/components/WorkflowEditor.svelte.d.ts +4 -4
- package/dist/components/form/FormArray.svelte +1034 -973
- package/dist/components/form/FormArray.svelte.d.ts +1 -1
- package/dist/components/form/FormAutocomplete.svelte +1021 -978
- package/dist/components/form/FormAutocomplete.svelte.d.ts +1 -1
- package/dist/components/form/FormCheckboxGroup.stories.svelte +23 -20
- package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormCheckboxGroup.svelte +136 -136
- package/dist/components/form/FormCodeEditor.svelte +452 -434
- package/dist/components/form/FormField.svelte +366 -355
- package/dist/components/form/FormField.svelte.d.ts +2 -2
- package/dist/components/form/FormFieldLight.svelte +400 -384
- package/dist/components/form/FormFieldLight.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldWrapper.stories.svelte +42 -42
- package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldWrapper.svelte +100 -93
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldset.svelte +108 -108
- package/dist/components/form/FormFieldset.svelte.d.ts +2 -2
- package/dist/components/form/FormMarkdownEditor.svelte +758 -725
- package/dist/components/form/FormNumberField.stories.svelte +25 -25
- package/dist/components/form/FormNumberField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormNumberField.svelte +88 -88
- package/dist/components/form/FormRangeField.stories.svelte +20 -20
- package/dist/components/form/FormRangeField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormRangeField.svelte +234 -226
- package/dist/components/form/FormSelect.stories.svelte +38 -38
- package/dist/components/form/FormSelect.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormSelect.svelte +101 -101
- package/dist/components/form/FormSelect.svelte.d.ts +1 -1
- package/dist/components/form/FormTemplateEditor.svelte +847 -798
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +1 -1
- package/dist/components/form/FormTextField.stories.svelte +29 -23
- package/dist/components/form/FormTextField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormTextField.svelte +68 -68
- package/dist/components/form/FormTextarea.stories.svelte +28 -25
- package/dist/components/form/FormTextarea.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormTextarea.svelte +74 -74
- package/dist/components/form/FormToggle.stories.svelte +23 -20
- package/dist/components/form/FormToggle.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormToggle.svelte +98 -98
- package/dist/components/form/FormUISchemaRenderer.svelte +120 -113
- 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 +64 -55
- package/dist/components/form/types.d.ts +6 -6
- package/dist/components/form/types.js +9 -4
- package/dist/components/icons/AlertCircleIcon.svelte +11 -0
- package/dist/components/icons/AlertCircleIcon.svelte.d.ts +26 -0
- package/dist/components/icons/CogIcon.svelte +11 -0
- package/dist/components/icons/CogIcon.svelte.d.ts +26 -0
- package/dist/components/interrupt/ChoicePrompt.stories.svelte +54 -38
- package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ChoicePrompt.svelte +407 -383
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +48 -48
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ConfirmationPrompt.svelte +280 -274
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/FormPrompt.svelte +223 -218
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/InterruptBubble.svelte +617 -583
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +2 -2
- package/dist/components/interrupt/ReviewPrompt.stories.svelte +66 -56
- package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ReviewPrompt.svelte +861 -841
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/TextInputPrompt.stories.svelte +38 -33
- package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/TextInputPrompt.svelte +333 -328
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/index.d.ts +5 -5
- package/dist/components/interrupt/index.js +5 -5
- package/dist/components/layouts/MainLayout.svelte +724 -691
- package/dist/components/layouts/MainLayout.svelte.d.ts +6 -6
- package/dist/components/nodes/GatewayNode.stories.svelte +100 -99
- package/dist/components/nodes/GatewayNode.svelte +605 -571
- package/dist/components/nodes/GatewayNode.svelte.d.ts +3 -3
- package/dist/components/nodes/IdeaNode.stories.svelte +44 -43
- package/dist/components/nodes/IdeaNode.svelte +451 -437
- package/dist/components/nodes/IdeaNode.svelte.d.ts +1 -1
- package/dist/components/nodes/NotesNode.stories.svelte +65 -64
- package/dist/components/nodes/NotesNode.svelte +380 -369
- package/dist/components/nodes/NotesNode.svelte.d.ts +1 -1
- package/dist/components/nodes/SimpleNode.stories.svelte +145 -144
- package/dist/components/nodes/SimpleNode.svelte +486 -424
- package/dist/components/nodes/SimpleNode.svelte.d.ts +1 -1
- package/dist/components/nodes/SquareNode.stories.svelte +73 -73
- package/dist/components/nodes/SquareNode.svelte +439 -380
- package/dist/components/nodes/SquareNode.svelte.d.ts +1 -1
- package/dist/components/nodes/TerminalNode.stories.svelte +13 -13
- package/dist/components/nodes/TerminalNode.svelte +709 -670
- package/dist/components/nodes/TerminalNode.svelte.d.ts +1 -1
- package/dist/components/nodes/ToolNode.stories.svelte +181 -180
- package/dist/components/nodes/ToolNode.svelte +505 -447
- package/dist/components/nodes/ToolNode.svelte.d.ts +1 -1
- package/dist/components/nodes/WorkflowNode.stories.svelte +70 -46
- package/dist/components/nodes/WorkflowNode.svelte +621 -551
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +3 -3
- package/dist/components/playground/ChatPanel.svelte +945 -889
- package/dist/components/playground/ExecutionLogs.svelte +495 -472
- package/dist/components/playground/InputCollector.svelte +449 -428
- package/dist/components/playground/MessageBubble.stories.svelte +47 -47
- package/dist/components/playground/MessageBubble.stories.svelte.d.ts +1 -1
- package/dist/components/playground/MessageBubble.svelte +626 -610
- package/dist/components/playground/MessageBubble.svelte.d.ts +1 -1
- package/dist/components/playground/Playground.svelte +1088 -1057
- package/dist/components/playground/Playground.svelte.d.ts +3 -3
- package/dist/components/playground/PlaygroundModal.svelte +208 -204
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +3 -3
- package/dist/components/playground/SessionManager.svelte +527 -521
- 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 +65 -65
- package/dist/config/runtimeConfig.d.ts +2 -2
- package/dist/config/runtimeConfig.js +8 -8
- package/dist/core/index.d.ts +63 -59
- package/dist/core/index.js +35 -33
- package/dist/display/index.d.ts +2 -2
- package/dist/display/index.js +2 -2
- package/dist/editor/index.d.ts +62 -62
- package/dist/editor/index.js +53 -53
- 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 +11 -9
- 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 +34 -32
- package/dist/helpers/workflowEditorHelper.d.ts +5 -5
- package/dist/helpers/workflowEditorHelper.js +108 -96
- 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 +9 -9
- package/dist/mocks/app-navigation.js +11 -11
- package/dist/mocks/app-stores.js +8 -8
- 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 +11 -9
- 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/services/agentSpecExecutionService.d.ts +3 -3
- package/dist/services/agentSpecExecutionService.js +59 -55
- 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 +41 -34
- 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/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 +41 -39
- package/dist/services/globalSave.d.ts +2 -2
- package/dist/services/globalSave.js +41 -38
- package/dist/services/historyService.d.ts +1 -1
- package/dist/services/historyService.js +8 -8
- package/dist/services/interruptService.d.ts +1 -1
- package/dist/services/interruptService.js +35 -29
- package/dist/services/nodeExecutionService.d.ts +1 -1
- package/dist/services/nodeExecutionService.js +45 -44
- 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 +25 -19
- 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 +2 -0
- package/dist/skins/default.js +1 -0
- package/dist/skins/index.d.ts +13 -0
- package/dist/skins/index.js +30 -0
- package/dist/skins/slate.d.ts +2 -0
- package/dist/skins/slate.js +78 -0
- 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 +65 -33
- 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 +25 -18
- package/dist/stores/portCoordinateStore.svelte.d.ts +2 -2
- package/dist/stores/portCoordinateStore.svelte.js +15 -8
- package/dist/stores/settingsStore.svelte.d.ts +2 -2
- package/dist/stores/settingsStore.svelte.js +62 -57
- package/dist/stores/workflowStore.svelte.d.ts +3 -3
- package/dist/stores/workflowStore.svelte.js +50 -47
- package/dist/stories/CanvasDecorator.svelte +35 -32
- package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
- package/dist/stories/EdgeDecorator.svelte +102 -99
- package/dist/stories/EdgeDecorator.svelte.d.ts +1 -1
- package/dist/stories/NodeDecorator.svelte +59 -53
- package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
- package/dist/stories/utils.d.ts +2 -2
- package/dist/stories/utils.js +105 -67
- package/dist/styles/base.css +599 -595
- package/dist/styles/toast.css +14 -14
- package/dist/styles/tokens.css +409 -378
- package/dist/svelte-app.d.ts +12 -9
- package/dist/svelte-app.js +40 -39
- package/dist/themes/default.d.ts +2 -0
- package/dist/themes/default.js +9 -0
- package/dist/themes/index.d.ts +13 -0
- package/dist/themes/index.js +44 -0
- package/dist/themes/minimal.d.ts +2 -0
- package/dist/themes/minimal.js +11 -0
- 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/config.d.ts +6 -6
- package/dist/types/events.d.ts +2 -2
- package/dist/types/events.js +2 -2
- package/dist/types/index.d.ts +32 -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 +5 -3
- package/dist/types/settings.js +25 -18
- package/dist/types/skin.d.ts +31 -0
- package/dist/types/skin.js +1 -0
- package/dist/types/theme.d.ts +35 -0
- package/dist/types/theme.js +1 -0
- 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 +97 -95
- package/dist/utils/config.d.ts +2 -2
- package/dist/utils/config.js +48 -48
- package/dist/utils/connections.d.ts +2 -2
- package/dist/utils/connections.js +15 -15
- 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/nodeStatus.d.ts +1 -1
- package/dist/utils/nodeStatus.js +48 -48
- package/dist/utils/nodeTypes.d.ts +1 -1
- package/dist/utils/nodeTypes.js +21 -20
- package/dist/utils/nodeWrapper.d.ts +7 -7
- package/dist/utils/nodeWrapper.js +21 -19
- package/dist/utils/performanceUtils.d.ts +1 -1
- package/dist/utils/performanceUtils.js +2 -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 +20 -8
- package/package.json +1 -1
|
@@ -54,483 +54,510 @@
|
|
|
54
54
|
-->
|
|
55
55
|
|
|
56
56
|
<script lang="ts">
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
57
|
+
import { setContext } from "svelte";
|
|
58
|
+
import Icon from "@iconify/svelte";
|
|
59
|
+
import type { ConfigSchema, AuthProvider } from "../types/index.js";
|
|
60
|
+
import type { UISchemaElement } from "../types/uischema.js";
|
|
61
|
+
import { FormField } from "./form/index.js";
|
|
62
|
+
import FormUISchemaRenderer from "./form/FormUISchemaRenderer.svelte";
|
|
63
|
+
import type { FieldSchema } from "./form/index.js";
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Props interface for SchemaForm component
|
|
67
|
+
*/
|
|
68
|
+
interface Props {
|
|
69
|
+
/**
|
|
70
|
+
* JSON Schema definition for the form.
|
|
71
|
+
* Should follow JSON Schema draft-07 format with type: "object".
|
|
72
|
+
*/
|
|
73
|
+
schema: ConfigSchema;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Optional UI Schema that controls field layout and grouping.
|
|
77
|
+
* When provided, fields render according to the UISchema tree structure.
|
|
78
|
+
* When absent, fields render in flat order from schema.properties.
|
|
79
|
+
* @see https://jsonforms.io/docs/uischema
|
|
80
|
+
*/
|
|
81
|
+
uiSchema?: UISchemaElement;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Current form values as key-value pairs.
|
|
85
|
+
* Keys should correspond to properties defined in the schema.
|
|
86
|
+
*/
|
|
87
|
+
values?: Record<string, unknown>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Callback fired whenever any field value changes.
|
|
91
|
+
* Receives the complete updated values object.
|
|
92
|
+
* @param values - Updated form values
|
|
93
|
+
*/
|
|
94
|
+
onChange?: (values: Record<string, unknown>) => void;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Whether to display Save and Cancel action buttons.
|
|
98
|
+
* @default false
|
|
99
|
+
*/
|
|
100
|
+
showActions?: boolean;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Label for the save button.
|
|
104
|
+
* @default "Save"
|
|
105
|
+
*/
|
|
106
|
+
saveLabel?: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Label for the cancel button.
|
|
110
|
+
* @default "Cancel"
|
|
111
|
+
*/
|
|
112
|
+
cancelLabel?: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Callback fired when the Save button is clicked.
|
|
116
|
+
* Receives the final form values.
|
|
117
|
+
* @param values - Final form values
|
|
118
|
+
*/
|
|
119
|
+
onSave?: (values: Record<string, unknown>) => void;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Callback fired when the Cancel button is clicked.
|
|
123
|
+
*/
|
|
124
|
+
onCancel?: () => void;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Whether the form is in a loading state.
|
|
128
|
+
* Disables all inputs when true.
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
131
|
+
loading?: boolean;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Whether the form is disabled.
|
|
135
|
+
* @default false
|
|
136
|
+
*/
|
|
137
|
+
disabled?: boolean;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Custom CSS class for the form container.
|
|
141
|
+
*/
|
|
142
|
+
class?: string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Authentication provider for autocomplete fields.
|
|
146
|
+
* Used to add authentication headers when fetching suggestions from callback URLs.
|
|
147
|
+
*/
|
|
148
|
+
authProvider?: AuthProvider;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Base URL for resolving relative autocomplete callback URLs.
|
|
152
|
+
* @default ""
|
|
153
|
+
*/
|
|
154
|
+
baseUrl?: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
let {
|
|
158
|
+
schema,
|
|
159
|
+
uiSchema,
|
|
160
|
+
values = {},
|
|
161
|
+
onChange,
|
|
162
|
+
showActions = false,
|
|
163
|
+
saveLabel = "Save",
|
|
164
|
+
cancelLabel = "Cancel",
|
|
165
|
+
onSave,
|
|
166
|
+
onCancel,
|
|
167
|
+
loading = false,
|
|
168
|
+
disabled = false,
|
|
169
|
+
class: className = "",
|
|
170
|
+
authProvider,
|
|
171
|
+
baseUrl = "",
|
|
172
|
+
}: Props = $props();
|
|
173
|
+
|
|
174
|
+
// Set context for child components (e.g., FormAutocomplete)
|
|
175
|
+
// Use getter functions to ensure child components always get the current prop value,
|
|
176
|
+
// even if the prop changes after initial mount
|
|
177
|
+
setContext<() => AuthProvider | undefined>(
|
|
178
|
+
"flowdrop:getAuthProvider",
|
|
179
|
+
() => authProvider,
|
|
180
|
+
);
|
|
181
|
+
setContext<() => string>("flowdrop:getBaseUrl", () => baseUrl);
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Reference to this component's form element
|
|
185
|
+
*/
|
|
186
|
+
let formRef: HTMLFormElement | undefined = $state();
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Internal reactive state for form values
|
|
190
|
+
*/
|
|
191
|
+
let formValues = $state<Record<string, unknown>>({});
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Initialize form values when schema or values change
|
|
195
|
+
* Merges default values from schema with provided values
|
|
196
|
+
*/
|
|
197
|
+
$effect(() => {
|
|
198
|
+
if (schema?.properties) {
|
|
199
|
+
const mergedValues: Record<string, unknown> = {};
|
|
200
|
+
Object.entries(schema.properties).forEach(([key, field]) => {
|
|
201
|
+
const fieldConfig = field as Record<string, unknown>;
|
|
202
|
+
// Use provided value if available, otherwise use schema default
|
|
203
|
+
mergedValues[key] =
|
|
204
|
+
values[key] !== undefined ? values[key] : fieldConfig.default;
|
|
205
|
+
});
|
|
206
|
+
formValues = mergedValues;
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Check if a field is required based on schema
|
|
212
|
+
* @param key - Field key to check
|
|
213
|
+
* @returns Whether the field is required
|
|
214
|
+
*/
|
|
215
|
+
function isFieldRequired(key: string): boolean {
|
|
216
|
+
if (!schema?.required) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
return schema.required.includes(key);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Handle field value changes from FormField components
|
|
224
|
+
* Updates internal state and fires onChange callback
|
|
225
|
+
* @param key - Field key that changed
|
|
226
|
+
* @param value - New field value
|
|
227
|
+
*/
|
|
228
|
+
function handleFieldChange(key: string, value: unknown): void {
|
|
229
|
+
formValues[key] = value;
|
|
230
|
+
|
|
231
|
+
// Notify parent of the change
|
|
232
|
+
if (onChange) {
|
|
233
|
+
onChange({ ...formValues });
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Handle form submission
|
|
239
|
+
* Collects all form values and fires onSave callback
|
|
240
|
+
*/
|
|
241
|
+
function handleSave(): void {
|
|
242
|
+
if (loading || disabled) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// Collect all form values including hidden fields
|
|
247
|
+
const updatedValues: Record<string, unknown> = { ...formValues };
|
|
248
|
+
|
|
249
|
+
if (formRef) {
|
|
250
|
+
const inputs = formRef.querySelectorAll("input, select, textarea");
|
|
251
|
+
inputs.forEach((input: Element) => {
|
|
252
|
+
const inputEl = input as
|
|
253
|
+
| HTMLInputElement
|
|
254
|
+
| HTMLSelectElement
|
|
255
|
+
| HTMLTextAreaElement;
|
|
256
|
+
if (inputEl.id) {
|
|
257
|
+
if (
|
|
258
|
+
inputEl instanceof HTMLInputElement &&
|
|
259
|
+
inputEl.type === "checkbox"
|
|
260
|
+
) {
|
|
261
|
+
updatedValues[inputEl.id] = inputEl.checked;
|
|
262
|
+
} else if (
|
|
263
|
+
inputEl instanceof HTMLInputElement &&
|
|
264
|
+
(inputEl.type === "number" || inputEl.type === "range")
|
|
265
|
+
) {
|
|
266
|
+
updatedValues[inputEl.id] = inputEl.value
|
|
267
|
+
? Number(inputEl.value)
|
|
268
|
+
: inputEl.value;
|
|
269
|
+
} else if (
|
|
270
|
+
inputEl instanceof HTMLInputElement &&
|
|
271
|
+
inputEl.type === "hidden"
|
|
272
|
+
) {
|
|
273
|
+
// Parse hidden field values that might be JSON
|
|
274
|
+
try {
|
|
275
|
+
const parsed = JSON.parse(inputEl.value);
|
|
276
|
+
updatedValues[inputEl.id] = parsed;
|
|
277
|
+
} catch {
|
|
278
|
+
// If not JSON, use raw value
|
|
279
|
+
updatedValues[inputEl.id] = inputEl.value;
|
|
280
|
+
}
|
|
281
|
+
} else {
|
|
282
|
+
updatedValues[inputEl.id] = inputEl.value;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Preserve hidden field values from original values if not collected from form
|
|
289
|
+
if (values && schema?.properties) {
|
|
290
|
+
Object.entries(schema.properties).forEach(
|
|
291
|
+
([key, property]: [string, Record<string, unknown>]) => {
|
|
292
|
+
if (
|
|
293
|
+
property.format === "hidden" &&
|
|
294
|
+
!(key in updatedValues) &&
|
|
295
|
+
key in values
|
|
296
|
+
) {
|
|
297
|
+
updatedValues[key] = values[key];
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if (onSave) {
|
|
304
|
+
onSave(updatedValues);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Handle cancel action
|
|
310
|
+
*/
|
|
311
|
+
function handleCancel(): void {
|
|
312
|
+
if (onCancel) {
|
|
313
|
+
onCancel();
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Convert ConfigProperty to FieldSchema for FormField component
|
|
319
|
+
* @param property - Schema property definition
|
|
320
|
+
* @returns FieldSchema compatible with FormField
|
|
321
|
+
*/
|
|
322
|
+
function toFieldSchema(property: Record<string, unknown>): FieldSchema {
|
|
323
|
+
return property as FieldSchema;
|
|
324
|
+
}
|
|
306
325
|
</script>
|
|
307
326
|
|
|
308
327
|
{#if schema?.properties}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
328
|
+
<form
|
|
329
|
+
bind:this={formRef}
|
|
330
|
+
class="schema-form {className}"
|
|
331
|
+
class:schema-form--loading={loading}
|
|
332
|
+
class:schema-form--disabled={disabled}
|
|
333
|
+
onsubmit={(e) => {
|
|
334
|
+
e.preventDefault();
|
|
335
|
+
handleSave();
|
|
336
|
+
}}
|
|
337
|
+
>
|
|
338
|
+
<div class="schema-form__fields">
|
|
339
|
+
{#if uiSchema}
|
|
340
|
+
<FormUISchemaRenderer
|
|
341
|
+
element={uiSchema}
|
|
342
|
+
{schema}
|
|
343
|
+
values={formValues}
|
|
344
|
+
requiredFields={schema.required ?? []}
|
|
345
|
+
onFieldChange={handleFieldChange}
|
|
346
|
+
{toFieldSchema}
|
|
347
|
+
/>
|
|
348
|
+
{:else}
|
|
349
|
+
{#each Object.entries(schema.properties) as [key, field], index (key)}
|
|
350
|
+
{@const fieldSchema = toFieldSchema(field as Record<string, unknown>)}
|
|
351
|
+
{@const required = isFieldRequired(key)}
|
|
352
|
+
|
|
353
|
+
<FormField
|
|
354
|
+
fieldKey={key}
|
|
355
|
+
schema={fieldSchema}
|
|
356
|
+
value={formValues[key]}
|
|
357
|
+
{required}
|
|
358
|
+
animationIndex={index}
|
|
359
|
+
onChange={(val) => handleFieldChange(key, val)}
|
|
360
|
+
/>
|
|
361
|
+
{/each}
|
|
362
|
+
{/if}
|
|
363
|
+
</div>
|
|
364
|
+
|
|
365
|
+
{#if showActions}
|
|
366
|
+
<div class="schema-form__footer">
|
|
367
|
+
<button
|
|
368
|
+
type="button"
|
|
369
|
+
class="schema-form__button schema-form__button--secondary"
|
|
370
|
+
onclick={handleCancel}
|
|
371
|
+
disabled={loading}
|
|
372
|
+
>
|
|
373
|
+
<Icon icon="heroicons:x-mark" class="schema-form__button-icon" />
|
|
374
|
+
<span>{cancelLabel}</span>
|
|
375
|
+
</button>
|
|
376
|
+
<button
|
|
377
|
+
type="submit"
|
|
378
|
+
class="schema-form__button schema-form__button--primary"
|
|
379
|
+
disabled={loading || disabled}
|
|
380
|
+
>
|
|
381
|
+
{#if loading}
|
|
382
|
+
<span class="schema-form__button-spinner"></span>
|
|
383
|
+
{:else}
|
|
384
|
+
<Icon icon="heroicons:check" class="schema-form__button-icon" />
|
|
385
|
+
{/if}
|
|
386
|
+
<span>{saveLabel}</span>
|
|
387
|
+
</button>
|
|
388
|
+
</div>
|
|
389
|
+
{/if}
|
|
390
|
+
</form>
|
|
372
391
|
{:else}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
392
|
+
<div class="schema-form__empty">
|
|
393
|
+
<div class="schema-form__empty-icon">
|
|
394
|
+
<Icon icon="heroicons:document-text" />
|
|
395
|
+
</div>
|
|
396
|
+
<p class="schema-form__empty-text">No schema properties defined.</p>
|
|
397
|
+
</div>
|
|
379
398
|
{/if}
|
|
380
399
|
|
|
381
400
|
<style>
|
|
382
|
-
|
|
401
|
+
/* ============================================
|
|
383
402
|
SCHEMA FORM - Container Styles
|
|
384
403
|
============================================ */
|
|
385
404
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
+
.schema-form {
|
|
406
|
+
display: flex;
|
|
407
|
+
flex-direction: column;
|
|
408
|
+
gap: var(--fd-space-3xl);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.schema-form--loading,
|
|
412
|
+
.schema-form--disabled {
|
|
413
|
+
opacity: 0.7;
|
|
414
|
+
pointer-events: none;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.schema-form__fields {
|
|
418
|
+
display: flex;
|
|
419
|
+
flex-direction: column;
|
|
420
|
+
gap: var(--fd-space-2xl);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/* ============================================
|
|
405
424
|
FOOTER ACTIONS
|
|
406
425
|
============================================ */
|
|
407
426
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
427
|
+
.schema-form__footer {
|
|
428
|
+
display: flex;
|
|
429
|
+
gap: var(--fd-space-md);
|
|
430
|
+
justify-content: flex-end;
|
|
431
|
+
padding-top: var(--fd-space-xl);
|
|
432
|
+
border-top: 1px solid var(--fd-border-muted);
|
|
433
|
+
margin-top: var(--fd-space-xs);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.schema-form__button {
|
|
437
|
+
display: inline-flex;
|
|
438
|
+
align-items: center;
|
|
439
|
+
justify-content: center;
|
|
440
|
+
gap: var(--fd-space-xs);
|
|
441
|
+
padding: 0.625rem var(--fd-space-xl);
|
|
442
|
+
border-radius: var(--fd-radius-lg);
|
|
443
|
+
font-size: var(--fd-text-sm);
|
|
444
|
+
font-weight: 600;
|
|
445
|
+
font-family: inherit;
|
|
446
|
+
cursor: pointer;
|
|
447
|
+
transition: all var(--fd-transition-normal);
|
|
448
|
+
border: 1px solid transparent;
|
|
449
|
+
min-height: 2.5rem;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.schema-form__button:disabled {
|
|
453
|
+
opacity: 0.5;
|
|
454
|
+
cursor: not-allowed;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.schema-form__button :global(svg) {
|
|
458
|
+
width: 1rem;
|
|
459
|
+
height: 1rem;
|
|
460
|
+
flex-shrink: 0;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.schema-form__button--secondary {
|
|
464
|
+
background-color: var(--fd-background);
|
|
465
|
+
border-color: var(--fd-border);
|
|
466
|
+
color: var(--fd-foreground);
|
|
467
|
+
box-shadow: var(--fd-shadow-sm);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.schema-form__button--secondary:hover:not(:disabled) {
|
|
471
|
+
background-color: var(--fd-muted);
|
|
472
|
+
border-color: var(--fd-border-strong);
|
|
473
|
+
color: var(--fd-foreground);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.schema-form__button--secondary:focus-visible {
|
|
477
|
+
outline: none;
|
|
478
|
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.schema-form__button--primary {
|
|
482
|
+
background: linear-gradient(
|
|
483
|
+
135deg,
|
|
484
|
+
var(--fd-primary) 0%,
|
|
485
|
+
var(--fd-primary-hover) 100%
|
|
486
|
+
);
|
|
487
|
+
color: var(--fd-primary-foreground);
|
|
488
|
+
box-shadow:
|
|
489
|
+
0 1px 3px rgba(59, 130, 246, 0.3),
|
|
490
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.schema-form__button--primary:hover:not(:disabled) {
|
|
494
|
+
background: linear-gradient(
|
|
495
|
+
135deg,
|
|
496
|
+
var(--fd-primary-hover) 0%,
|
|
497
|
+
var(--fd-primary-hover) 100%
|
|
498
|
+
);
|
|
499
|
+
box-shadow:
|
|
500
|
+
0 4px 12px rgba(59, 130, 246, 0.35),
|
|
501
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
|
502
|
+
transform: translateY(-1px);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.schema-form__button--primary:active:not(:disabled) {
|
|
506
|
+
transform: translateY(0);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.schema-form__button--primary:focus-visible {
|
|
510
|
+
outline: none;
|
|
511
|
+
box-shadow:
|
|
512
|
+
0 0 0 3px rgba(59, 130, 246, 0.4),
|
|
513
|
+
0 4px 12px rgba(59, 130, 246, 0.35);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.schema-form__button-spinner {
|
|
517
|
+
width: 1rem;
|
|
518
|
+
height: 1rem;
|
|
519
|
+
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
520
|
+
border-top-color: white;
|
|
521
|
+
border-radius: 50%;
|
|
522
|
+
animation: schema-form-spin 0.6s linear infinite;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
@keyframes schema-form-spin {
|
|
526
|
+
to {
|
|
527
|
+
transform: rotate(360deg);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/* ============================================
|
|
505
532
|
EMPTY STATE
|
|
506
533
|
============================================ */
|
|
507
534
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
535
|
+
.schema-form__empty {
|
|
536
|
+
display: flex;
|
|
537
|
+
flex-direction: column;
|
|
538
|
+
align-items: center;
|
|
539
|
+
justify-content: center;
|
|
540
|
+
padding: var(--fd-space-6xl) var(--fd-space-3xl);
|
|
541
|
+
text-align: center;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.schema-form__empty-icon {
|
|
545
|
+
width: 3rem;
|
|
546
|
+
height: 3rem;
|
|
547
|
+
margin-bottom: var(--fd-space-xl);
|
|
548
|
+
color: var(--fd-border);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.schema-form__empty-icon :global(svg) {
|
|
552
|
+
width: 100%;
|
|
553
|
+
height: 100%;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.schema-form__empty-text {
|
|
557
|
+
margin: 0;
|
|
558
|
+
font-size: var(--fd-text-sm);
|
|
559
|
+
color: var(--fd-muted-foreground);
|
|
560
|
+
font-style: italic;
|
|
561
|
+
line-height: 1.5;
|
|
562
|
+
}
|
|
536
563
|
</style>
|