@uipath/apollo-react 3.34.1 → 3.34.2-pr221.63f27d3
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/canvas/components/BaseNode/BaseNode.cjs +6 -3
- package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.js +6 -3
- package/dist/canvas/components/BaseNode/BaseNode.stories.cjs +271 -118
- package/dist/canvas/components/BaseNode/BaseNode.stories.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.stories.js +272 -119
- package/dist/canvas/components/CanvasPositionControls.cjs +9 -7
- package/dist/canvas/components/CanvasPositionControls.d.ts +5 -1
- package/dist/canvas/components/CanvasPositionControls.d.ts.map +1 -1
- package/dist/canvas/components/CanvasPositionControls.js +8 -6
- package/dist/canvas/components/StageNode/StageNode.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.stories.d.ts.map +1 -1
- package/dist/canvas/schema/node-instance/index.d.ts.map +1 -1
- package/dist/canvas/storybook-utils/mocks/nodes.cjs +12 -3
- package/dist/canvas/storybook-utils/mocks/nodes.d.ts.map +1 -1
- package/dist/canvas/storybook-utils/mocks/nodes.js +12 -3
- package/dist/canvas/utils/manifest-resolver.cjs +3 -0
- package/dist/canvas/utils/manifest-resolver.d.ts +1 -1
- package/dist/canvas/utils/manifest-resolver.d.ts.map +1 -1
- package/dist/canvas/utils/manifest-resolver.js +3 -0
- package/dist/material/components/ap-chat/locales/de.cjs +1 -1
- package/dist/material/components/ap-chat/locales/de.js +1 -1
- package/dist/material/components/ap-chat/locales/de.json +13 -1
- package/dist/material/components/ap-chat/locales/es-MX.cjs +1 -1
- package/dist/material/components/ap-chat/locales/es-MX.js +1 -1
- package/dist/material/components/ap-chat/locales/es-MX.json +13 -1
- package/dist/material/components/ap-chat/locales/es.cjs +1 -1
- package/dist/material/components/ap-chat/locales/es.js +1 -1
- package/dist/material/components/ap-chat/locales/es.json +13 -1
- package/dist/material/components/ap-chat/locales/fr.cjs +1 -1
- package/dist/material/components/ap-chat/locales/fr.js +1 -1
- package/dist/material/components/ap-chat/locales/fr.json +13 -1
- package/dist/material/components/ap-chat/locales/ja.cjs +1 -1
- package/dist/material/components/ap-chat/locales/ja.js +1 -1
- package/dist/material/components/ap-chat/locales/ja.json +13 -1
- package/dist/material/components/ap-chat/locales/ko.cjs +1 -1
- package/dist/material/components/ap-chat/locales/ko.js +1 -1
- package/dist/material/components/ap-chat/locales/ko.json +13 -1
- package/dist/material/components/ap-chat/locales/pt-BR.cjs +1 -1
- package/dist/material/components/ap-chat/locales/pt-BR.js +1 -1
- package/dist/material/components/ap-chat/locales/pt-BR.json +13 -1
- package/dist/material/components/ap-chat/locales/pt.cjs +1 -1
- package/dist/material/components/ap-chat/locales/pt.js +1 -1
- package/dist/material/components/ap-chat/locales/pt.json +13 -1
- package/dist/material/components/ap-chat/locales/ro.json +13 -1
- package/dist/material/components/ap-chat/locales/tr.cjs +1 -1
- package/dist/material/components/ap-chat/locales/tr.js +1 -1
- package/dist/material/components/ap-chat/locales/tr.json +13 -1
- package/dist/material/components/ap-chat/locales/zh-CN.cjs +1 -1
- package/dist/material/components/ap-chat/locales/zh-CN.js +1 -1
- package/dist/material/components/ap-chat/locales/zh-CN.json +13 -1
- package/dist/material/components/ap-chat/locales/zh-TW.cjs +1 -1
- package/dist/material/components/ap-chat/locales/zh-TW.js +1 -1
- package/dist/material/components/ap-chat/locales/zh-TW.json +13 -1
- package/dist/material/components/ap-tool-call/locales/ro.json +1 -1
- package/package.json +1 -1
|
@@ -93,7 +93,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
93
93
|
nodeId: id
|
|
94
94
|
}), [
|
|
95
95
|
manifest,
|
|
96
|
-
data
|
|
96
|
+
data,
|
|
97
97
|
id
|
|
98
98
|
]);
|
|
99
99
|
const Icon = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
@@ -106,6 +106,8 @@ const BaseNodeComponent = (props)=>{
|
|
|
106
106
|
]);
|
|
107
107
|
const handleConfigurations = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
108
108
|
if (handleConfigurationsProp && Array.isArray(handleConfigurationsProp)) return handleConfigurationsProp;
|
|
109
|
+
const dataHandleConfigs = data?.handleConfigurations;
|
|
110
|
+
if (dataHandleConfigs && Array.isArray(dataHandleConfigs)) return dataHandleConfigs;
|
|
109
111
|
if (!manifest) return [];
|
|
110
112
|
const resolved = (0, manifest_resolver_cjs_namespaceObject.resolveHandles)(manifest.handleConfiguration, {
|
|
111
113
|
...data,
|
|
@@ -127,7 +129,8 @@ const BaseNodeComponent = (props)=>{
|
|
|
127
129
|
}, [
|
|
128
130
|
handleConfigurationsProp,
|
|
129
131
|
manifest,
|
|
130
|
-
data
|
|
132
|
+
data,
|
|
133
|
+
id
|
|
131
134
|
]);
|
|
132
135
|
const toolbarConfig = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
133
136
|
if (void 0 !== toolbarConfigProp) return null === toolbarConfigProp ? void 0 : toolbarConfigProp;
|
|
@@ -306,7 +309,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
306
309
|
showNotches,
|
|
307
310
|
handleAction,
|
|
308
311
|
multipleNodesSelected,
|
|
309
|
-
connectedHandleIds
|
|
312
|
+
connectedHandleIds
|
|
310
313
|
]);
|
|
311
314
|
const handleElements = useSmartHandles ? smartHandleElements : buttonHandleElements;
|
|
312
315
|
if (!manifest) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,0CAA0C,CAAC;AAiChG,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,CAAC;AAmgB1B,eAAO,MAAM,QAAQ,8CA7fa,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,6CA6fhB,CAAC"}
|
|
@@ -65,7 +65,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
65
65
|
nodeId: id
|
|
66
66
|
}), [
|
|
67
67
|
manifest,
|
|
68
|
-
data
|
|
68
|
+
data,
|
|
69
69
|
id
|
|
70
70
|
]);
|
|
71
71
|
const Icon = useMemo(()=>{
|
|
@@ -78,6 +78,8 @@ const BaseNodeComponent = (props)=>{
|
|
|
78
78
|
]);
|
|
79
79
|
const handleConfigurations = useMemo(()=>{
|
|
80
80
|
if (handleConfigurationsProp && Array.isArray(handleConfigurationsProp)) return handleConfigurationsProp;
|
|
81
|
+
const dataHandleConfigs = data?.handleConfigurations;
|
|
82
|
+
if (dataHandleConfigs && Array.isArray(dataHandleConfigs)) return dataHandleConfigs;
|
|
81
83
|
if (!manifest) return [];
|
|
82
84
|
const resolved = resolveHandles(manifest.handleConfiguration, {
|
|
83
85
|
...data,
|
|
@@ -99,7 +101,8 @@ const BaseNodeComponent = (props)=>{
|
|
|
99
101
|
}, [
|
|
100
102
|
handleConfigurationsProp,
|
|
101
103
|
manifest,
|
|
102
|
-
data
|
|
104
|
+
data,
|
|
105
|
+
id
|
|
103
106
|
]);
|
|
104
107
|
const toolbarConfig = useMemo(()=>{
|
|
105
108
|
if (void 0 !== toolbarConfigProp) return null === toolbarConfigProp ? void 0 : toolbarConfigProp;
|
|
@@ -278,7 +281,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
278
281
|
showNotches,
|
|
279
282
|
handleAction,
|
|
280
283
|
multipleNodesSelected,
|
|
281
|
-
connectedHandleIds
|
|
284
|
+
connectedHandleIds
|
|
282
285
|
]);
|
|
283
286
|
const handleElements = useSmartHandles ? smartHandleElements : buttonHandleElements;
|
|
284
287
|
if (!manifest) return /*#__PURE__*/ jsx("div", {
|
|
@@ -30,11 +30,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
30
30
|
DynamicHandles: ()=>DynamicHandles
|
|
31
31
|
});
|
|
32
32
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
|
-
const material_namespaceObject = require("@mui/material");
|
|
34
|
-
const apollo_core_namespaceObject = require("@uipath/apollo-core");
|
|
35
33
|
const index_cjs_namespaceObject = require("../../layouts/index.cjs");
|
|
36
34
|
const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
|
|
37
|
-
const
|
|
35
|
+
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
38
36
|
const external_react_namespaceObject = require("react");
|
|
39
37
|
const external_core_index_cjs_namespaceObject = require("../../core/index.cjs");
|
|
40
38
|
const external_storybook_utils_index_cjs_namespaceObject = require("../../storybook-utils/index.cjs");
|
|
@@ -61,6 +59,15 @@ const sampleManifest = {
|
|
|
61
59
|
colorDark: '#495057',
|
|
62
60
|
icon: 'layers',
|
|
63
61
|
tags: []
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'control',
|
|
65
|
+
name: 'Control Flow',
|
|
66
|
+
sortOrder: 3,
|
|
67
|
+
color: '#6c757d',
|
|
68
|
+
colorDark: '#495057',
|
|
69
|
+
icon: 'git-branch',
|
|
70
|
+
tags: []
|
|
64
71
|
}
|
|
65
72
|
],
|
|
66
73
|
nodes: [
|
|
@@ -215,6 +222,50 @@ const sampleManifest = {
|
|
|
215
222
|
]
|
|
216
223
|
}
|
|
217
224
|
]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
nodeType: 'uipath.decision',
|
|
228
|
+
version: '1.0.0',
|
|
229
|
+
category: 'control',
|
|
230
|
+
tags: [
|
|
231
|
+
'control',
|
|
232
|
+
'decision'
|
|
233
|
+
],
|
|
234
|
+
sortOrder: 6,
|
|
235
|
+
display: {
|
|
236
|
+
label: 'Decision',
|
|
237
|
+
icon: 'git-branch',
|
|
238
|
+
shape: 'square'
|
|
239
|
+
},
|
|
240
|
+
handleConfiguration: [
|
|
241
|
+
{
|
|
242
|
+
position: 'left',
|
|
243
|
+
handles: [
|
|
244
|
+
{
|
|
245
|
+
id: 'input',
|
|
246
|
+
type: 'target',
|
|
247
|
+
handleType: 'input'
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
position: 'right',
|
|
253
|
+
handles: [
|
|
254
|
+
{
|
|
255
|
+
id: 'true',
|
|
256
|
+
type: 'source',
|
|
257
|
+
handleType: 'output',
|
|
258
|
+
label: '{inputs.trueLabel}'
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
id: 'false',
|
|
262
|
+
type: 'source',
|
|
263
|
+
handleType: 'output',
|
|
264
|
+
label: '{inputs.falseLabel}'
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
]
|
|
218
269
|
}
|
|
219
270
|
]
|
|
220
271
|
};
|
|
@@ -447,7 +498,7 @@ function CustomizedSizesStory() {
|
|
|
447
498
|
});
|
|
448
499
|
}
|
|
449
500
|
function DynamicHandlesStory() {
|
|
450
|
-
const [
|
|
501
|
+
const [switchData, setSwitchData] = (0, external_react_namespaceObject.useState)({
|
|
451
502
|
dynamicInputs: [
|
|
452
503
|
{
|
|
453
504
|
label: 'Primary Input'
|
|
@@ -469,26 +520,55 @@ function DynamicHandlesStory() {
|
|
|
469
520
|
],
|
|
470
521
|
hasDefault: false
|
|
471
522
|
});
|
|
523
|
+
const [decisionData, setDecisionData] = (0, external_react_namespaceObject.useState)({
|
|
524
|
+
trueLabel: 'Approved',
|
|
525
|
+
falseLabel: 'Rejected'
|
|
526
|
+
});
|
|
472
527
|
const initialNodes = (0, external_react_namespaceObject.useMemo)(()=>[
|
|
473
528
|
{
|
|
474
529
|
...(0, external_storybook_utils_index_cjs_namespaceObject.createNode)({
|
|
475
530
|
id: 'dynamic-handles-node',
|
|
476
531
|
type: 'uipath.control-switch',
|
|
477
532
|
position: {
|
|
478
|
-
x:
|
|
479
|
-
y:
|
|
533
|
+
x: 700,
|
|
534
|
+
y: 200
|
|
480
535
|
},
|
|
481
536
|
data: {
|
|
482
537
|
nodeType: 'uipath.control-switch',
|
|
483
538
|
version: '1.0.0',
|
|
484
539
|
inputs: {
|
|
485
|
-
dynamicInputs:
|
|
486
|
-
dynamicOutputs:
|
|
487
|
-
hasDefault:
|
|
540
|
+
dynamicInputs: switchData.dynamicInputs,
|
|
541
|
+
dynamicOutputs: switchData.dynamicOutputs,
|
|
542
|
+
hasDefault: switchData.hasDefault
|
|
488
543
|
},
|
|
489
544
|
display: {
|
|
490
545
|
label: 'Dynamic Handles',
|
|
491
|
-
subLabel: `${
|
|
546
|
+
subLabel: `${switchData.dynamicInputs.length} inputs, ${switchData.dynamicOutputs.length} outputs`,
|
|
547
|
+
shape: 'square'
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}),
|
|
551
|
+
height: 96,
|
|
552
|
+
width: 96
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
...(0, external_storybook_utils_index_cjs_namespaceObject.createNode)({
|
|
556
|
+
id: 'decision-node',
|
|
557
|
+
type: 'uipath.decision',
|
|
558
|
+
position: {
|
|
559
|
+
x: 700,
|
|
560
|
+
y: 600
|
|
561
|
+
},
|
|
562
|
+
data: {
|
|
563
|
+
nodeType: 'uipath.decision',
|
|
564
|
+
version: '1.0.0',
|
|
565
|
+
inputs: {
|
|
566
|
+
trueLabel: decisionData.trueLabel,
|
|
567
|
+
falseLabel: decisionData.falseLabel
|
|
568
|
+
},
|
|
569
|
+
display: {
|
|
570
|
+
label: 'Decision',
|
|
571
|
+
subLabel: 'Templated labels',
|
|
492
572
|
shape: 'square'
|
|
493
573
|
}
|
|
494
574
|
}
|
|
@@ -497,77 +577,98 @@ function DynamicHandlesStory() {
|
|
|
497
577
|
width: 96
|
|
498
578
|
}
|
|
499
579
|
], [
|
|
500
|
-
|
|
580
|
+
switchData,
|
|
581
|
+
decisionData
|
|
501
582
|
]);
|
|
502
583
|
const { canvasProps, setNodes } = (0, external_storybook_utils_index_cjs_namespaceObject.useCanvasStory)({
|
|
503
584
|
initialNodes
|
|
504
585
|
});
|
|
505
586
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
506
|
-
setNodes((nodes)=>nodes.map((node)=>
|
|
587
|
+
setNodes((nodes)=>nodes.map((node)=>{
|
|
588
|
+
if ('dynamic-handles-node' === node.id) return {
|
|
507
589
|
...node,
|
|
508
590
|
data: {
|
|
509
591
|
...node.data,
|
|
510
592
|
inputs: {
|
|
511
|
-
dynamicInputs:
|
|
512
|
-
dynamicOutputs:
|
|
513
|
-
hasDefault:
|
|
593
|
+
dynamicInputs: switchData.dynamicInputs,
|
|
594
|
+
dynamicOutputs: switchData.dynamicOutputs,
|
|
595
|
+
hasDefault: switchData.hasDefault
|
|
514
596
|
},
|
|
515
597
|
display: {
|
|
516
598
|
...node.data.display || {},
|
|
517
|
-
subLabel: `${
|
|
599
|
+
subLabel: `${switchData.dynamicInputs.length} inputs, ${switchData.dynamicOutputs.length} outputs`
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
if ('decision-node' === node.id) return {
|
|
604
|
+
...node,
|
|
605
|
+
data: {
|
|
606
|
+
...node.data,
|
|
607
|
+
inputs: {
|
|
608
|
+
trueLabel: decisionData.trueLabel,
|
|
609
|
+
falseLabel: decisionData.falseLabel
|
|
518
610
|
}
|
|
519
611
|
}
|
|
520
|
-
}
|
|
612
|
+
};
|
|
613
|
+
return node;
|
|
614
|
+
}));
|
|
521
615
|
}, [
|
|
522
|
-
|
|
616
|
+
switchData,
|
|
617
|
+
decisionData,
|
|
523
618
|
setNodes
|
|
524
619
|
]);
|
|
525
|
-
const
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
620
|
+
const handleInputCount = (0, external_react_namespaceObject.useCallback)((value)=>{
|
|
621
|
+
const count = value[0] ?? 0;
|
|
622
|
+
setSwitchData((prev)=>{
|
|
623
|
+
const current = prev.dynamicInputs;
|
|
624
|
+
if (count > current.length) {
|
|
625
|
+
const added = Array.from({
|
|
626
|
+
length: count - current.length
|
|
627
|
+
}, (_, i)=>({
|
|
628
|
+
label: `Input ${current.length + i + 1}`
|
|
629
|
+
}));
|
|
630
|
+
return {
|
|
631
|
+
...prev,
|
|
632
|
+
dynamicInputs: [
|
|
633
|
+
...current,
|
|
634
|
+
...added
|
|
635
|
+
]
|
|
636
|
+
};
|
|
637
|
+
}
|
|
536
638
|
return {
|
|
537
639
|
...prev,
|
|
538
|
-
|
|
640
|
+
dynamicInputs: current.slice(0, count)
|
|
539
641
|
};
|
|
540
642
|
});
|
|
541
643
|
}, []);
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
644
|
+
const handleOutputCount = (0, external_react_namespaceObject.useCallback)((value)=>{
|
|
645
|
+
const count = value[0] ?? 0;
|
|
646
|
+
setSwitchData((prev)=>{
|
|
647
|
+
const current = prev.dynamicOutputs;
|
|
648
|
+
if (count > current.length) {
|
|
649
|
+
const added = Array.from({
|
|
650
|
+
length: count - current.length
|
|
651
|
+
}, (_, i)=>({
|
|
652
|
+
name: `Output ${current.length + i + 1}`
|
|
653
|
+
}));
|
|
654
|
+
return {
|
|
655
|
+
...prev,
|
|
656
|
+
dynamicOutputs: [
|
|
657
|
+
...current,
|
|
658
|
+
...added
|
|
659
|
+
]
|
|
660
|
+
};
|
|
661
|
+
}
|
|
548
662
|
return {
|
|
549
663
|
...prev,
|
|
550
|
-
|
|
664
|
+
dynamicOutputs: current.slice(0, count)
|
|
551
665
|
};
|
|
552
666
|
});
|
|
553
667
|
}, []);
|
|
554
|
-
const handleTypes = [
|
|
555
|
-
{
|
|
556
|
-
key: 'dynamicInputs',
|
|
557
|
-
label: 'Inputs',
|
|
558
|
-
icon: 'arrow_back'
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
key: 'dynamicOutputs',
|
|
562
|
-
label: 'Outputs',
|
|
563
|
-
icon: 'arrow_forward'
|
|
564
|
-
}
|
|
565
|
-
];
|
|
566
668
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_BaseCanvas_index_cjs_namespaceObject.BaseCanvas, {
|
|
567
669
|
...canvasProps,
|
|
568
670
|
mode: "design",
|
|
569
671
|
children: [
|
|
570
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_NodeInspector_cjs_namespaceObject.NodeInspector, {}),
|
|
571
672
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.Panel, {
|
|
572
673
|
position: "bottom-right",
|
|
573
674
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasPositionControls_cjs_namespaceObject.CanvasPositionControls, {
|
|
@@ -576,78 +677,124 @@ function DynamicHandlesStory() {
|
|
|
576
677
|
}),
|
|
577
678
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_storybook_utils_index_cjs_namespaceObject.StoryInfoPanel, {
|
|
578
679
|
title: "Dynamic Handles",
|
|
579
|
-
description: "
|
|
680
|
+
description: "Demonstrates repeat expressions (dynamic handle count) and templated handle labels.",
|
|
580
681
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
581
|
-
gap:
|
|
682
|
+
gap: 20,
|
|
582
683
|
children: [
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
684
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
685
|
+
gap: 12,
|
|
686
|
+
children: [
|
|
687
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Label, {
|
|
688
|
+
className: "font-semibold",
|
|
689
|
+
children: "Switch Node — Repeat Handles"
|
|
690
|
+
}),
|
|
691
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
692
|
+
gap: 6,
|
|
693
|
+
align: "flex-start",
|
|
694
|
+
children: [
|
|
695
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.Label, {
|
|
696
|
+
children: [
|
|
697
|
+
"Inputs (",
|
|
698
|
+
switchData.dynamicInputs.length,
|
|
699
|
+
")"
|
|
700
|
+
]
|
|
701
|
+
}),
|
|
702
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Slider, {
|
|
703
|
+
value: [
|
|
704
|
+
switchData.dynamicInputs.length
|
|
705
|
+
],
|
|
706
|
+
onValueChange: handleInputCount,
|
|
707
|
+
min: 0,
|
|
708
|
+
max: 10,
|
|
709
|
+
step: 1
|
|
710
|
+
})
|
|
711
|
+
]
|
|
712
|
+
}),
|
|
713
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
714
|
+
gap: 6,
|
|
715
|
+
align: "flex-start",
|
|
716
|
+
children: [
|
|
717
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.Label, {
|
|
718
|
+
children: [
|
|
719
|
+
"Outputs (",
|
|
720
|
+
switchData.dynamicOutputs.length,
|
|
721
|
+
")"
|
|
722
|
+
]
|
|
723
|
+
}),
|
|
724
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Slider, {
|
|
725
|
+
value: [
|
|
726
|
+
switchData.dynamicOutputs.length
|
|
727
|
+
],
|
|
728
|
+
onValueChange: handleOutputCount,
|
|
729
|
+
min: 0,
|
|
730
|
+
max: 10,
|
|
731
|
+
step: 1
|
|
732
|
+
})
|
|
733
|
+
]
|
|
734
|
+
}),
|
|
735
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
736
|
+
className: "flex items-center gap-2",
|
|
737
|
+
children: [
|
|
738
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Switch, {
|
|
739
|
+
checked: switchData.hasDefault,
|
|
740
|
+
onCheckedChange: (checked)=>setSwitchData((prev)=>({
|
|
741
|
+
...prev,
|
|
742
|
+
hasDefault: checked
|
|
743
|
+
}))
|
|
744
|
+
}),
|
|
745
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Label, {
|
|
746
|
+
children: "Has Default Output"
|
|
747
|
+
})
|
|
748
|
+
]
|
|
749
|
+
})
|
|
750
|
+
]
|
|
751
|
+
}),
|
|
752
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
753
|
+
gap: 12,
|
|
754
|
+
children: [
|
|
755
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Label, {
|
|
756
|
+
className: "font-semibold",
|
|
757
|
+
children: "Decision Node — Templated Labels"
|
|
758
|
+
}),
|
|
759
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
760
|
+
gap: 6,
|
|
761
|
+
align: "flex-start",
|
|
762
|
+
children: [
|
|
763
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Label, {
|
|
764
|
+
children: "True Label"
|
|
765
|
+
}),
|
|
766
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Input, {
|
|
767
|
+
value: decisionData.trueLabel,
|
|
768
|
+
onChange: (e)=>setDecisionData((prev)=>({
|
|
769
|
+
...prev,
|
|
770
|
+
trueLabel: e.target.value
|
|
771
|
+
}))
|
|
772
|
+
})
|
|
773
|
+
]
|
|
642
774
|
}),
|
|
643
|
-
|
|
644
|
-
|
|
775
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
776
|
+
gap: 6,
|
|
777
|
+
align: "flex-start",
|
|
778
|
+
children: [
|
|
779
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Label, {
|
|
780
|
+
children: "False Label"
|
|
781
|
+
}),
|
|
782
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Input, {
|
|
783
|
+
value: decisionData.falseLabel,
|
|
784
|
+
onChange: (e)=>setDecisionData((prev)=>({
|
|
785
|
+
...prev,
|
|
786
|
+
falseLabel: e.target.value
|
|
787
|
+
}))
|
|
788
|
+
})
|
|
789
|
+
]
|
|
790
|
+
})
|
|
791
|
+
]
|
|
645
792
|
}),
|
|
646
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
647
|
-
size: "
|
|
793
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
|
|
794
|
+
size: "sm",
|
|
648
795
|
variant: "secondary",
|
|
649
|
-
|
|
650
|
-
|
|
796
|
+
onClick: ()=>{
|
|
797
|
+
setSwitchData({
|
|
651
798
|
dynamicInputs: [
|
|
652
799
|
{
|
|
653
800
|
label: 'Primary Input'
|
|
@@ -659,7 +806,13 @@ function DynamicHandlesStory() {
|
|
|
659
806
|
}
|
|
660
807
|
],
|
|
661
808
|
hasDefault: false
|
|
662
|
-
})
|
|
809
|
+
});
|
|
810
|
+
setDecisionData({
|
|
811
|
+
trueLabel: 'Approved',
|
|
812
|
+
falseLabel: 'Rejected'
|
|
813
|
+
});
|
|
814
|
+
},
|
|
815
|
+
children: "Reset All"
|
|
663
816
|
})
|
|
664
817
|
]
|
|
665
818
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.stories.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAkBvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAuLrD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,YAAY,CAqB5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAmZnC,eAAO,MAAM,OAAO,EAAE,KAGrB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAG7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAG5B,CAAC"}
|