@d34dman/flowdrop 0.0.22 → 0.0.24
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/components/App.svelte +26 -25
- package/dist/components/ConfigForm.svelte +141 -520
- package/dist/components/ConfigForm.svelte.d.ts +5 -3
- package/dist/components/form/FormArray.svelte +1049 -0
- package/dist/components/form/FormArray.svelte.d.ts +22 -0
- package/dist/components/form/FormCheckboxGroup.svelte +152 -0
- package/dist/components/form/FormCheckboxGroup.svelte.d.ts +15 -0
- package/dist/components/form/FormField.svelte +297 -0
- package/dist/components/form/FormField.svelte.d.ts +18 -0
- package/dist/components/form/FormFieldWrapper.svelte +133 -0
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +18 -0
- package/dist/components/form/FormNumberField.svelte +109 -0
- package/dist/components/form/FormNumberField.svelte.d.ts +23 -0
- package/dist/components/form/FormRangeField.svelte +252 -0
- package/dist/components/form/FormRangeField.svelte.d.ts +21 -0
- package/dist/components/form/FormSelect.svelte +126 -0
- package/dist/components/form/FormSelect.svelte.d.ts +18 -0
- package/dist/components/form/FormTextField.svelte +88 -0
- package/dist/components/form/FormTextField.svelte.d.ts +17 -0
- package/dist/components/form/FormTextarea.svelte +94 -0
- package/dist/components/form/FormTextarea.svelte.d.ts +19 -0
- package/dist/components/form/FormToggle.svelte +123 -0
- package/dist/components/form/FormToggle.svelte.d.ts +17 -0
- package/dist/components/form/index.d.ts +42 -0
- package/dist/components/form/index.js +46 -0
- package/dist/components/form/types.d.ts +224 -0
- package/dist/components/form/types.js +29 -0
- package/dist/components/nodes/GatewayNode.svelte +76 -16
- package/dist/components/nodes/SimpleNode.svelte +41 -5
- package/dist/components/nodes/SimpleNode.svelte.d.ts +2 -1
- package/dist/components/nodes/SquareNode.svelte +41 -5
- package/dist/components/nodes/SquareNode.svelte.d.ts +2 -1
- package/dist/components/nodes/WorkflowNode.svelte +88 -5
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -3
- package/dist/stores/workflowStore.d.ts +15 -0
- package/dist/stores/workflowStore.js +28 -0
- package/dist/types/index.d.ts +176 -1
- package/dist/types/index.js +16 -0
- package/package.json +3 -3
- package/dist/config/demo.d.ts +0 -58
- package/dist/config/demo.js +0 -142
- package/dist/data/samples.d.ts +0 -51
- package/dist/data/samples.js +0 -3245
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
import ConfigPanel from './ConfigPanel.svelte';
|
|
15
15
|
import Navbar from './Navbar.svelte';
|
|
16
16
|
import { api, setEndpointConfig } from '../services/api.js';
|
|
17
|
-
import type { NodeMetadata, Workflow, WorkflowNode, ConfigSchema } from '../types/index.js';
|
|
18
|
-
import { sampleNodes } from '../data/samples.js';
|
|
17
|
+
import type { NodeMetadata, Workflow, WorkflowNode, ConfigSchema, NodeUIExtensions } from '../types/index.js';
|
|
19
18
|
import { createEndpointConfig } from '../config/endpoints.js';
|
|
20
19
|
import type { EndpointConfig } from '../config/endpoints.js';
|
|
21
20
|
import type { AuthProvider } from '../types/auth.js';
|
|
@@ -205,20 +204,20 @@
|
|
|
205
204
|
'fetchNodes'
|
|
206
205
|
);
|
|
207
206
|
if (suppressToast) {
|
|
208
|
-
// Parent handled the error,
|
|
209
|
-
nodes =
|
|
207
|
+
// Parent handled the error, keep nodes empty
|
|
208
|
+
nodes = [];
|
|
210
209
|
return;
|
|
211
210
|
}
|
|
212
211
|
}
|
|
213
212
|
|
|
214
|
-
// Show error
|
|
215
|
-
error = `API Error: ${errorMessage}.
|
|
213
|
+
// Show error and set empty nodes array (no fallback to sample data)
|
|
214
|
+
error = `API Error: ${errorMessage}. No node types available.`;
|
|
216
215
|
if (features.showToasts) {
|
|
217
216
|
apiToasts.error('Load node types', errorMessage);
|
|
218
217
|
}
|
|
219
218
|
|
|
220
|
-
//
|
|
221
|
-
nodes =
|
|
219
|
+
// Set empty nodes array instead of fallback data
|
|
220
|
+
nodes = [];
|
|
222
221
|
}
|
|
223
222
|
}
|
|
224
223
|
|
|
@@ -645,6 +644,7 @@
|
|
|
645
644
|
<ConfigForm
|
|
646
645
|
schema={workflowConfigSchema}
|
|
647
646
|
values={workflowConfigValues}
|
|
647
|
+
showUIExtensions={false}
|
|
648
648
|
onSave={handleWorkflowSave}
|
|
649
649
|
onCancel={() => (isWorkflowSettingsOpen = false)}
|
|
650
650
|
/>
|
|
@@ -663,14 +663,25 @@
|
|
|
663
663
|
>
|
|
664
664
|
<ConfigForm
|
|
665
665
|
node={currentNode}
|
|
666
|
-
onSave={(updatedConfig) => {
|
|
666
|
+
onSave={(updatedConfig, uiExtensions?: NodeUIExtensions) => {
|
|
667
667
|
if (selectedNodeId && currentNode) {
|
|
668
|
+
// Build the updated node data
|
|
669
|
+
const updatedData = {
|
|
670
|
+
...currentNode.data,
|
|
671
|
+
config: updatedConfig
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
// Include UI extensions if provided
|
|
675
|
+
if (uiExtensions) {
|
|
676
|
+
updatedData.extensions = {
|
|
677
|
+
...currentNode.data.extensions,
|
|
678
|
+
ui: uiExtensions
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
|
|
668
682
|
// Handle nodeType switching if nodeType is in the config
|
|
669
|
-
|
|
670
|
-
data:
|
|
671
|
-
...currentNode.data,
|
|
672
|
-
config: updatedConfig
|
|
673
|
-
}
|
|
683
|
+
const nodeUpdates: Record<string, unknown> = {
|
|
684
|
+
data: updatedData
|
|
674
685
|
};
|
|
675
686
|
|
|
676
687
|
// NOTE: We do NOT change the node's type field anymore
|
|
@@ -697,22 +708,12 @@
|
|
|
697
708
|
</div>
|
|
698
709
|
<div class="flowdrop-flex flowdrop-gap--2">
|
|
699
710
|
<button
|
|
700
|
-
class="flowdrop-btn flowdrop-btn--sm flowdrop-btn--
|
|
711
|
+
class="flowdrop-btn flowdrop-btn--sm flowdrop-btn--primary"
|
|
701
712
|
onclick={retryLoad}
|
|
702
713
|
type="button"
|
|
703
714
|
>
|
|
704
715
|
Retry
|
|
705
716
|
</button>
|
|
706
|
-
<button
|
|
707
|
-
class="flowdrop-btn flowdrop-btn--sm flowdrop-btn--primary"
|
|
708
|
-
onclick={() => {
|
|
709
|
-
nodes = sampleNodes;
|
|
710
|
-
error = null;
|
|
711
|
-
}}
|
|
712
|
-
type="button"
|
|
713
|
-
>
|
|
714
|
-
Use Sample Data
|
|
715
|
-
</button>
|
|
716
717
|
<button
|
|
717
718
|
class="flowdrop-btn flowdrop-btn--sm flowdrop-btn--outline"
|
|
718
719
|
onclick={() => {
|