@uipath/apollo-react 4.0.0 → 4.1.1

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.
Files changed (247) hide show
  1. package/dist/canvas/components/AddNodePanel/AddNodePreview.cjs +4 -4
  2. package/dist/canvas/components/AddNodePanel/AddNodePreview.js +4 -4
  3. package/dist/canvas/components/AgentCanvas/AgentFlow.cjs +4 -4
  4. package/dist/canvas/components/AgentCanvas/AgentFlow.js +4 -4
  5. package/dist/canvas/components/AgentCanvas/components/PaneContextMenu.cjs +3 -3
  6. package/dist/canvas/components/AgentCanvas/components/PaneContextMenu.js +3 -3
  7. package/dist/canvas/components/AgentCanvas/components/SuggestionGroupPanel.cjs +6 -6
  8. package/dist/canvas/components/AgentCanvas/components/SuggestionGroupPanel.d.ts.map +1 -1
  9. package/dist/canvas/components/AgentCanvas/components/SuggestionGroupPanel.js +6 -6
  10. package/dist/canvas/components/AgentCanvas/components/TimelinePlayer.cjs +14 -14
  11. package/dist/canvas/components/AgentCanvas/components/TimelinePlayer.js +14 -14
  12. package/dist/canvas/components/AgentCanvas/edges/StaticEdge.cjs +8 -8
  13. package/dist/canvas/components/AgentCanvas/edges/StaticEdge.js +8 -8
  14. package/dist/canvas/components/AgentCanvas/nodes/AgentNode.cjs +12 -12
  15. package/dist/canvas/components/AgentCanvas/nodes/AgentNode.js +12 -12
  16. package/dist/canvas/components/AgentCanvas/nodes/AgentNode.styles.cjs +18 -18
  17. package/dist/canvas/components/AgentCanvas/nodes/AgentNode.styles.js +18 -18
  18. package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.cjs +12 -12
  19. package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.d.ts.map +1 -1
  20. package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.js +12 -12
  21. package/dist/canvas/components/BaseCanvas/BaseCanvas.constants.cjs +2 -2
  22. package/dist/canvas/components/BaseCanvas/BaseCanvas.constants.d.ts +2 -2
  23. package/dist/canvas/components/BaseCanvas/BaseCanvas.constants.js +2 -2
  24. package/dist/canvas/components/BaseCanvas/PanShortcutTeachingUI.cjs +2 -2
  25. package/dist/canvas/components/BaseCanvas/PanShortcutTeachingUI.js +2 -2
  26. package/dist/canvas/components/BaseNode/BaseNode.cjs +2 -2
  27. package/dist/canvas/components/BaseNode/BaseNode.js +2 -2
  28. package/dist/canvas/components/BaseNode/BaseNode.styles.cjs +24 -24
  29. package/dist/canvas/components/BaseNode/BaseNode.styles.d.ts.map +1 -1
  30. package/dist/canvas/components/BaseNode/BaseNode.styles.js +24 -24
  31. package/dist/canvas/components/BlankCanvasNode/BlankCanvasNode.cjs +1 -1
  32. package/dist/canvas/components/BlankCanvasNode/BlankCanvasNode.js +1 -1
  33. package/dist/canvas/components/BlankCanvasNode/BlankCanvasNode.styles.cjs +6 -6
  34. package/dist/canvas/components/BlankCanvasNode/BlankCanvasNode.styles.js +6 -6
  35. package/dist/canvas/components/ButtonHandle/ButtonHandle.cjs +1 -1
  36. package/dist/canvas/components/ButtonHandle/ButtonHandle.js +1 -1
  37. package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.cjs +11 -11
  38. package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.js +11 -11
  39. package/dist/canvas/components/ButtonHandle/SmartHandle.cjs +1 -1
  40. package/dist/canvas/components/ButtonHandle/SmartHandle.d.ts.map +1 -1
  41. package/dist/canvas/components/ButtonHandle/SmartHandle.js +1 -1
  42. package/dist/canvas/components/CodedAgent/CodedAgentFlow.cjs +6 -6
  43. package/dist/canvas/components/CodedAgent/CodedAgentFlow.d.ts.map +1 -1
  44. package/dist/canvas/components/CodedAgent/CodedAgentFlow.js +6 -6
  45. package/dist/canvas/components/Edges/EdgeUtils.cjs +14 -14
  46. package/dist/canvas/components/Edges/EdgeUtils.js +14 -14
  47. package/dist/canvas/components/Edges/SequenceEdge.cjs +11 -11
  48. package/dist/canvas/components/Edges/SequenceEdge.js +11 -11
  49. package/dist/canvas/components/FloatingCanvasPanel/FloatingCanvasPanel.cjs +4 -4
  50. package/dist/canvas/components/FloatingCanvasPanel/FloatingCanvasPanel.d.ts.map +1 -1
  51. package/dist/canvas/components/FloatingCanvasPanel/FloatingCanvasPanel.js +4 -4
  52. package/dist/canvas/components/FloatingCanvasPanel/PanelChrome.cjs +5 -5
  53. package/dist/canvas/components/FloatingCanvasPanel/PanelChrome.js +5 -5
  54. package/dist/canvas/components/GroupNode/GroupNode.styles.cjs +19 -19
  55. package/dist/canvas/components/GroupNode/GroupNode.styles.js +19 -19
  56. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.cjs +2 -2
  57. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.js +2 -2
  58. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvasWithControls.cjs +3 -3
  59. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvasWithControls.js +3 -3
  60. package/dist/canvas/components/MiniCanvasNavigator/MiniCanvasNavigator.cjs +2 -2
  61. package/dist/canvas/components/MiniCanvasNavigator/MiniCanvasNavigator.js +2 -2
  62. package/dist/canvas/components/NodeInspector.cjs +4 -4
  63. package/dist/canvas/components/NodeInspector.js +4 -4
  64. package/dist/canvas/components/NodePropertiesPanel/NodePropertiesPanel.styles.cjs +30 -30
  65. package/dist/canvas/components/NodePropertiesPanel/NodePropertiesPanel.styles.js +30 -30
  66. package/dist/canvas/components/StageNode/StageConnectionEdge.cjs +1 -1
  67. package/dist/canvas/components/StageNode/StageConnectionEdge.js +1 -1
  68. package/dist/canvas/components/StageNode/StageEdge.cjs +7 -7
  69. package/dist/canvas/components/StageNode/StageEdge.js +7 -7
  70. package/dist/canvas/components/StageNode/StageNode.styles.cjs +34 -34
  71. package/dist/canvas/components/StageNode/StageNode.styles.js +34 -34
  72. package/dist/canvas/components/StageNode/TaskContent.cjs +1 -1
  73. package/dist/canvas/components/StageNode/TaskContent.js +1 -1
  74. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.styles.cjs +20 -20
  75. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.styles.d.ts.map +1 -1
  76. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.styles.js +20 -20
  77. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.types.cjs +1 -1
  78. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.types.d.ts +1 -1
  79. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.types.js +1 -1
  80. package/dist/canvas/components/TaskIcon/TaskIcon.styles.cjs +1 -1
  81. package/dist/canvas/components/TaskIcon/TaskIcon.styles.js +1 -1
  82. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.styles.cjs +2 -2
  83. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.styles.js +2 -2
  84. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.styles.cjs +9 -9
  85. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.styles.js +9 -9
  86. package/dist/canvas/components/Toolbar/shared/ToolbarButton.styles.cjs +3 -3
  87. package/dist/canvas/components/Toolbar/shared/ToolbarButton.styles.js +3 -3
  88. package/dist/canvas/components/Toolbox/ListView.cjs +3 -3
  89. package/dist/canvas/components/Toolbox/ListView.js +3 -3
  90. package/dist/canvas/components/Toolbox/ListView.styles.cjs +7 -7
  91. package/dist/canvas/components/Toolbox/ListView.styles.js +7 -7
  92. package/dist/canvas/components/Toolbox/SearchBox.styles.cjs +8 -8
  93. package/dist/canvas/components/Toolbox/SearchBox.styles.js +8 -8
  94. package/dist/canvas/components/Toolbox/Toolbox.styles.cjs +2 -2
  95. package/dist/canvas/components/Toolbox/Toolbox.styles.js +2 -2
  96. package/dist/canvas/components/TriggerNode/TriggerNode.styles.cjs +15 -15
  97. package/dist/canvas/components/TriggerNode/TriggerNode.styles.js +15 -15
  98. package/dist/canvas/styles/execution-status.cjs +10 -10
  99. package/dist/canvas/styles/execution-status.js +10 -10
  100. package/dist/canvas/styles/tailwind.canvas.css +1 -1
  101. package/dist/canvas/styles/variables.css +67 -32
  102. package/dist/canvas/utils/adornment-resolver.cjs +2 -2
  103. package/dist/canvas/utils/adornment-resolver.js +2 -2
  104. package/dist/canvas/utils/coded-agents/mermaid-parser.cjs +1 -1
  105. package/dist/canvas/utils/coded-agents/mermaid-parser.js +1 -1
  106. package/dist/canvas/utils/createPreviewNode.cjs +1 -1
  107. package/dist/canvas/utils/createPreviewNode.js +1 -1
  108. package/dist/canvas/utils/export-canvas.cjs +1 -1
  109. package/dist/canvas/utils/export-canvas.d.ts.map +1 -1
  110. package/dist/canvas/utils/export-canvas.js +1 -1
  111. package/package.json +2 -2
  112. package/dist/canvas/components/AddNodePanel/AddNodePanel.stories.cjs +0 -429
  113. package/dist/canvas/components/AddNodePanel/AddNodePanel.stories.d.ts +0 -11
  114. package/dist/canvas/components/AddNodePanel/AddNodePanel.stories.d.ts.map +0 -1
  115. package/dist/canvas/components/AddNodePanel/AddNodePanel.stories.js +0 -380
  116. package/dist/canvas/components/AgentCanvas/AgentFlow.stories.cjs +0 -2209
  117. package/dist/canvas/components/AgentCanvas/AgentFlow.stories.d.ts +0 -11
  118. package/dist/canvas/components/AgentCanvas/AgentFlow.stories.d.ts.map +0 -1
  119. package/dist/canvas/components/AgentCanvas/AgentFlow.stories.js +0 -2160
  120. package/dist/canvas/components/AgentCanvas/components/TimelinePlayer.stories.cjs +0 -246
  121. package/dist/canvas/components/AgentCanvas/components/TimelinePlayer.stories.d.ts +0 -10
  122. package/dist/canvas/components/AgentCanvas/components/TimelinePlayer.stories.d.ts.map +0 -1
  123. package/dist/canvas/components/AgentCanvas/components/TimelinePlayer.stories.js +0 -200
  124. package/dist/canvas/components/BaseCanvas/BaseCanvas.stories.cjs +0 -981
  125. package/dist/canvas/components/BaseCanvas/BaseCanvas.stories.d.ts +0 -12
  126. package/dist/canvas/components/BaseCanvas/BaseCanvas.stories.d.ts.map +0 -1
  127. package/dist/canvas/components/BaseCanvas/BaseCanvas.stories.js +0 -929
  128. package/dist/canvas/components/BaseNode/BaseNode.stories.cjs +0 -1150
  129. package/dist/canvas/components/BaseNode/BaseNode.stories.d.ts +0 -11
  130. package/dist/canvas/components/BaseNode/BaseNode.stories.d.ts.map +0 -1
  131. package/dist/canvas/components/BaseNode/BaseNode.stories.js +0 -1101
  132. package/dist/canvas/components/ButtonHandle/ButtonHandle.stories.cjs +0 -969
  133. package/dist/canvas/components/ButtonHandle/ButtonHandle.stories.d.ts +0 -9
  134. package/dist/canvas/components/ButtonHandle/ButtonHandle.stories.d.ts.map +0 -1
  135. package/dist/canvas/components/ButtonHandle/ButtonHandle.stories.js +0 -926
  136. package/dist/canvas/components/ButtonHandle/SmartHandle.stories.cjs +0 -608
  137. package/dist/canvas/components/ButtonHandle/SmartHandle.stories.d.ts +0 -8
  138. package/dist/canvas/components/ButtonHandle/SmartHandle.stories.d.ts.map +0 -1
  139. package/dist/canvas/components/ButtonHandle/SmartHandle.stories.js +0 -568
  140. package/dist/canvas/components/CanvasPerformance.stories.cjs +0 -349
  141. package/dist/canvas/components/CanvasPerformance.stories.d.ts +0 -6
  142. package/dist/canvas/components/CanvasPerformance.stories.d.ts.map +0 -1
  143. package/dist/canvas/components/CanvasPerformance.stories.js +0 -312
  144. package/dist/canvas/components/CodedAgent/CodedAgentFlow.stories.cjs +0 -119
  145. package/dist/canvas/components/CodedAgent/CodedAgentFlow.stories.d.ts +0 -10
  146. package/dist/canvas/components/CodedAgent/CodedAgentFlow.stories.d.ts.map +0 -1
  147. package/dist/canvas/components/CodedAgent/CodedAgentFlow.stories.js +0 -73
  148. package/dist/canvas/components/CollapseConfig/CollapseConfig.stories.cjs +0 -518
  149. package/dist/canvas/components/CollapseConfig/CollapseConfig.stories.d.ts +0 -6
  150. package/dist/canvas/components/CollapseConfig/CollapseConfig.stories.d.ts.map +0 -1
  151. package/dist/canvas/components/CollapseConfig/CollapseConfig.stories.js +0 -481
  152. package/dist/canvas/components/Edges/SequenceEdge.stories.cjs +0 -1073
  153. package/dist/canvas/components/Edges/SequenceEdge.stories.d.ts +0 -10
  154. package/dist/canvas/components/Edges/SequenceEdge.stories.d.ts.map +0 -1
  155. package/dist/canvas/components/Edges/SequenceEdge.stories.js +0 -1024
  156. package/dist/canvas/components/Edges/XyFlowEdgeComparison.stories.cjs +0 -796
  157. package/dist/canvas/components/Edges/XyFlowEdgeComparison.stories.d.ts +0 -7
  158. package/dist/canvas/components/Edges/XyFlowEdgeComparison.stories.d.ts.map +0 -1
  159. package/dist/canvas/components/Edges/XyFlowEdgeComparison.stories.js +0 -756
  160. package/dist/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.stories.cjs +0 -245
  161. package/dist/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.stories.d.ts +0 -30
  162. package/dist/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.stories.d.ts.map +0 -1
  163. package/dist/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.stories.js +0 -208
  164. package/dist/canvas/components/Flow.stories.cjs +0 -778
  165. package/dist/canvas/components/Flow.stories.d.ts +0 -11
  166. package/dist/canvas/components/Flow.stories.d.ts.map +0 -1
  167. package/dist/canvas/components/Flow.stories.js +0 -725
  168. package/dist/canvas/components/GroupNode/GroupNode.stories.cjs +0 -837
  169. package/dist/canvas/components/GroupNode/GroupNode.stories.d.ts +0 -12
  170. package/dist/canvas/components/GroupNode/GroupNode.stories.d.ts.map +0 -1
  171. package/dist/canvas/components/GroupNode/GroupNode.stories.js +0 -782
  172. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.stories.cjs +0 -88
  173. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.stories.d.ts +0 -7
  174. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.stories.d.ts.map +0 -1
  175. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.stories.js +0 -51
  176. package/dist/canvas/components/NodeInspector.stories.cjs +0 -229
  177. package/dist/canvas/components/NodeInspector.stories.d.ts +0 -20
  178. package/dist/canvas/components/NodeInspector.stories.d.ts.map +0 -1
  179. package/dist/canvas/components/NodeInspector.stories.js +0 -192
  180. package/dist/canvas/components/NodePropertiesPanel/NodePropertiesPanel.stories.cjs +0 -122
  181. package/dist/canvas/components/NodePropertiesPanel/NodePropertiesPanel.stories.d.ts +0 -7
  182. package/dist/canvas/components/NodePropertiesPanel/NodePropertiesPanel.stories.d.ts.map +0 -1
  183. package/dist/canvas/components/NodePropertiesPanel/NodePropertiesPanel.stories.js +0 -85
  184. package/dist/canvas/components/StageNode/StageNode.stories.cjs +0 -2690
  185. package/dist/canvas/components/StageNode/StageNode.stories.d.ts +0 -17
  186. package/dist/canvas/components/StageNode/StageNode.stories.d.ts.map +0 -1
  187. package/dist/canvas/components/StageNode/StageNode.stories.js +0 -2623
  188. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.stories.cjs +0 -552
  189. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.stories.d.ts +0 -8
  190. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.stories.d.ts.map +0 -1
  191. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.stories.js +0 -509
  192. package/dist/canvas/components/TaskIcon/TaskIcon.stories.cjs +0 -109
  193. package/dist/canvas/components/TaskIcon/TaskIcon.stories.d.ts +0 -10
  194. package/dist/canvas/components/TaskIcon/TaskIcon.stories.d.ts.map +0 -1
  195. package/dist/canvas/components/TaskIcon/TaskIcon.stories.js +0 -72
  196. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.stories.cjs +0 -283
  197. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.stories.d.ts +0 -7
  198. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.stories.d.ts.map +0 -1
  199. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.stories.js +0 -243
  200. package/dist/canvas/components/TriggerNode/TriggerNode.stories.cjs +0 -270
  201. package/dist/canvas/components/TriggerNode/TriggerNode.stories.d.ts +0 -16
  202. package/dist/canvas/components/TriggerNode/TriggerNode.stories.d.ts.map +0 -1
  203. package/dist/canvas/components/TriggerNode/TriggerNode.stories.js +0 -233
  204. package/dist/canvas/controls/Breadcrumb/Breadcrumb.stories.cjs +0 -76
  205. package/dist/canvas/controls/Breadcrumb/Breadcrumb.stories.d.ts +0 -7
  206. package/dist/canvas/controls/Breadcrumb/Breadcrumb.stories.d.ts.map +0 -1
  207. package/dist/canvas/controls/Breadcrumb/Breadcrumb.stories.js +0 -39
  208. package/dist/canvas/icons/Icons.stories.cjs +0 -207
  209. package/dist/canvas/icons/Icons.stories.d.ts +0 -6
  210. package/dist/canvas/icons/Icons.stories.d.ts.map +0 -1
  211. package/dist/canvas/icons/Icons.stories.js +0 -167
  212. package/dist/canvas/layouts/Column.stories.cjs +0 -716
  213. package/dist/canvas/layouts/Column.stories.d.ts +0 -14
  214. package/dist/canvas/layouts/Column.stories.d.ts.map +0 -1
  215. package/dist/canvas/layouts/Column.stories.js +0 -658
  216. package/dist/canvas/layouts/Grid.stories.cjs +0 -1033
  217. package/dist/canvas/layouts/Grid.stories.d.ts +0 -19
  218. package/dist/canvas/layouts/Grid.stories.d.ts.map +0 -1
  219. package/dist/canvas/layouts/Grid.stories.js +0 -960
  220. package/dist/canvas/layouts/Row.stories.cjs +0 -687
  221. package/dist/canvas/layouts/Row.stories.d.ts +0 -14
  222. package/dist/canvas/layouts/Row.stories.d.ts.map +0 -1
  223. package/dist/canvas/layouts/Row.stories.js +0 -629
  224. package/dist/canvas/storybook-utils/components/StoryInfoPanel.cjs +0 -100
  225. package/dist/canvas/storybook-utils/components/StoryInfoPanel.js +0 -66
  226. package/dist/canvas/storybook-utils/components/index.cjs +0 -58
  227. package/dist/canvas/storybook-utils/components/index.js +0 -1
  228. package/dist/canvas/storybook-utils/decorators.cjs +0 -101
  229. package/dist/canvas/storybook-utils/decorators.js +0 -64
  230. package/dist/canvas/storybook-utils/hooks/index.cjs +0 -58
  231. package/dist/canvas/storybook-utils/hooks/index.js +0 -1
  232. package/dist/canvas/storybook-utils/hooks/useCanvasStory.cjs +0 -118
  233. package/dist/canvas/storybook-utils/hooks/useCanvasStory.js +0 -81
  234. package/dist/canvas/storybook-utils/index.cjs +0 -86
  235. package/dist/canvas/storybook-utils/index.js +0 -5
  236. package/dist/canvas/storybook-utils/manifests/category-definitions.cjs +0 -220
  237. package/dist/canvas/storybook-utils/manifests/category-definitions.js +0 -186
  238. package/dist/canvas/storybook-utils/manifests/index.cjs +0 -82
  239. package/dist/canvas/storybook-utils/manifests/index.js +0 -10
  240. package/dist/canvas/storybook-utils/manifests/node-definitions.cjs +0 -1133
  241. package/dist/canvas/storybook-utils/manifests/node-definitions.js +0 -1099
  242. package/dist/canvas/storybook-utils/mocks/index.cjs +0 -65
  243. package/dist/canvas/storybook-utils/mocks/index.js +0 -2
  244. package/dist/canvas/storybook-utils/mocks/nodes.cjs +0 -237
  245. package/dist/canvas/storybook-utils/mocks/nodes.js +0 -191
  246. package/dist/canvas/storybook-utils/mocks/resources.cjs +0 -296
  247. package/dist/canvas/storybook-utils/mocks/resources.js +0 -238
@@ -1,2690 +0,0 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.d = (exports1, definition)=>{
5
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
- enumerable: true,
7
- get: definition[key]
8
- });
9
- };
10
- })();
11
- (()=>{
12
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
- })();
14
- (()=>{
15
- __webpack_require__.r = (exports1)=>{
16
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
- value: 'Module'
18
- });
19
- Object.defineProperty(exports1, '__esModule', {
20
- value: true
21
- });
22
- };
23
- })();
24
- var __webpack_exports__ = {};
25
- __webpack_require__.r(__webpack_exports__);
26
- __webpack_require__.d(__webpack_exports__, {
27
- DraggableTaskReordering: ()=>DraggableTaskReordering,
28
- WithRulesTags: ()=>WithRulesTags,
29
- LoanProcessingWorkflow: ()=>LoanProcessingWorkflow,
30
- default: ()=>StageNode_stories,
31
- AddTaskLoading: ()=>AddTaskLoading,
32
- AdhocTasks: ()=>AdhocTasks,
33
- InteractiveTaskManagement: ()=>InteractiveTaskManagement,
34
- EditableStageTitle: ()=>EditableStageTitle,
35
- WithTaskIcons: ()=>WithTaskIcons,
36
- Default: ()=>Default,
37
- ExecutionStatus: ()=>ExecutionStatus,
38
- AddAndReplaceTasks: ()=>AddAndReplaceTasks
39
- });
40
- const jsx_runtime_namespaceObject = require("react/jsx-runtime");
41
- const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
42
- const index_cjs_namespaceObject = require("../../../material/components/index.cjs");
43
- const external_react_namespaceObject = require("react");
44
- const external_types_cjs_namespaceObject = require("../../types.cjs");
45
- const GroupModificationUtils_cjs_namespaceObject = require("../../utils/GroupModificationUtils.cjs");
46
- const external_BaseCanvas_index_cjs_namespaceObject = require("../BaseCanvas/index.cjs");
47
- const external_CanvasPositionControls_cjs_namespaceObject = require("../CanvasPositionControls.cjs");
48
- const external_TaskIcon_index_cjs_namespaceObject = require("../TaskIcon/index.cjs");
49
- const external_StageConnectionEdge_cjs_namespaceObject = require("./StageConnectionEdge.cjs");
50
- const external_StageEdge_cjs_namespaceObject = require("./StageEdge.cjs");
51
- const external_StageNode_cjs_namespaceObject = require("./StageNode.cjs");
52
- const external_StageNode_stories_utils_cjs_namespaceObject = require("./StageNode.stories.utils.cjs");
53
- const external_StageNode_types_cjs_namespaceObject = require("./StageNode.types.cjs");
54
- const DefaultCanvasDecorator = ({ initialNodes, initialEdges = [] })=>{
55
- const [nodes, _setNodes, onNodesChange] = (0, react_cjs_namespaceObject.useNodesState)(initialNodes);
56
- const [edges, setEdges, onEdgesChange] = (0, react_cjs_namespaceObject.useEdgesState)(initialEdges);
57
- const onConnect = (0, external_react_namespaceObject.useCallback)((connection)=>{
58
- setEdges((eds)=>(0, react_cjs_namespaceObject.addEdge)(connection, eds));
59
- }, [
60
- setEdges
61
- ]);
62
- const nodeTypes = (0, external_react_namespaceObject.useMemo)(()=>({
63
- stage: external_StageNode_stories_utils_cjs_namespaceObject.StageNodeWrapper
64
- }), []);
65
- const edgeTypes = (0, external_react_namespaceObject.useMemo)(()=>({
66
- stage: external_StageEdge_cjs_namespaceObject.StageEdge
67
- }), []);
68
- const defaultEdgeOptions = (0, external_react_namespaceObject.useMemo)(()=>({
69
- type: 'stage'
70
- }), []);
71
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
72
- style: {
73
- width: '100vw',
74
- height: '100vh'
75
- },
76
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.ReactFlowProvider, {
77
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseCanvas_index_cjs_namespaceObject.BaseCanvas, {
78
- nodes: nodes,
79
- edges: edges,
80
- onNodesChange: onNodesChange,
81
- onEdgesChange: onEdgesChange,
82
- onConnect: onConnect,
83
- nodeTypes: nodeTypes,
84
- edgeTypes: edgeTypes,
85
- mode: "design",
86
- connectionMode: react_cjs_namespaceObject.ConnectionMode.Strict,
87
- defaultEdgeOptions: defaultEdgeOptions,
88
- connectionLineComponent: external_StageConnectionEdge_cjs_namespaceObject.StageConnectionEdge,
89
- elevateEdgesOnSelect: true,
90
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.Panel, {
91
- position: "bottom-right",
92
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasPositionControls_cjs_namespaceObject.CanvasPositionControls, {
93
- translations: external_types_cjs_namespaceObject.DefaultCanvasTranslations
94
- })
95
- })
96
- })
97
- })
98
- });
99
- };
100
- const meta = {
101
- title: 'Canvas/StageNode',
102
- component: external_StageNode_cjs_namespaceObject.StageNode,
103
- parameters: {
104
- layout: 'fullscreen'
105
- },
106
- decorators: [
107
- (Story, context)=>{
108
- if (context.parameters?.useCustomRender) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Story, {});
109
- const initialNodes = context.parameters?.nodes || [
110
- {
111
- id: '1',
112
- type: 'stage',
113
- position: {
114
- x: 250,
115
- y: 100
116
- },
117
- data: {
118
- stageDetails: context.args.stageDetails,
119
- execution: context.args.execution,
120
- addTaskLabel: context.args.addTaskLabel,
121
- menuItems: context.args.menuItems,
122
- onTaskAdd: context.args.onTaskAdd,
123
- onTaskClick: context.args.onTaskClick
124
- }
125
- }
126
- ];
127
- const initialEdges = context.parameters?.edges || [];
128
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DefaultCanvasDecorator, {
129
- initialNodes: initialNodes,
130
- initialEdges: initialEdges
131
- });
132
- }
133
- ],
134
- args: {
135
- stageDetails: {
136
- label: 'Default Stage',
137
- tasks: []
138
- }
139
- },
140
- argTypes: {
141
- addTaskLabel: {
142
- control: 'text',
143
- description: 'Label for the add process button',
144
- defaultValue: 'Add process'
145
- }
146
- }
147
- };
148
- const StageNode_stories = meta;
149
- const ProcessIcon = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", {
150
- viewBox: "0 0 24 24",
151
- fill: "none",
152
- stroke: "currentColor",
153
- strokeWidth: "1.5",
154
- children: [
155
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
156
- x: "3",
157
- y: "3",
158
- width: "7",
159
- height: "7",
160
- rx: "1"
161
- }),
162
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
163
- x: "14",
164
- y: "3",
165
- width: "7",
166
- height: "7",
167
- rx: "1"
168
- }),
169
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
170
- x: "3",
171
- y: "14",
172
- width: "7",
173
- height: "7",
174
- rx: "1"
175
- }),
176
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
177
- x: "14",
178
- y: "14",
179
- width: "7",
180
- height: "7",
181
- rx: "1"
182
- })
183
- ]
184
- });
185
- const VerificationIcon = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", {
186
- viewBox: "0 0 24 24",
187
- fill: "none",
188
- stroke: "currentColor",
189
- strokeWidth: "1.5",
190
- children: [
191
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
192
- d: "M9 11L12 14L20 6"
193
- }),
194
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
195
- d: "M20 12V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4H13"
196
- })
197
- ]
198
- });
199
- const DocumentIcon = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", {
200
- viewBox: "0 0 24 24",
201
- fill: "none",
202
- stroke: "currentColor",
203
- strokeWidth: "1.5",
204
- children: [
205
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
206
- d: "M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V8L14 2Z"
207
- }),
208
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
209
- d: "M14 2V8H20"
210
- }),
211
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
212
- d: "M8 12H16"
213
- }),
214
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
215
- d: "M8 16H16"
216
- })
217
- ]
218
- });
219
- const sampleTasks = [
220
- [
221
- {
222
- id: 'liability_check',
223
- label: 'Liability Check',
224
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
225
- }
226
- ],
227
- [
228
- {
229
- id: 'credit_review',
230
- label: 'Credit Review',
231
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
232
- }
233
- ],
234
- [
235
- {
236
- id: 'address_verification',
237
- label: 'Address Verification and a really long label that might wrap',
238
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
239
- },
240
- {
241
- id: 'property_verification',
242
- label: 'Property Verification',
243
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
244
- }
245
- ],
246
- [
247
- {
248
- id: 'processing_review',
249
- label: 'Processing Review',
250
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
251
- }
252
- ]
253
- ];
254
- const Default = {
255
- name: 'Default',
256
- parameters: {
257
- nodes: [
258
- {
259
- id: '0',
260
- type: 'stage',
261
- position: {
262
- x: 48,
263
- y: 96
264
- },
265
- width: 304,
266
- data: {
267
- stageDetails: {
268
- label: 'Application',
269
- tasks: []
270
- },
271
- execution: {
272
- stageStatus: {
273
- duration: 'SLA: None'
274
- }
275
- },
276
- onTaskAdd: ()=>{
277
- window.alert('Add task functionality - this would open a dialog to add a new task');
278
- }
279
- }
280
- },
281
- {
282
- id: '1',
283
- type: 'stage',
284
- position: {
285
- x: 400,
286
- y: 96
287
- },
288
- width: 304,
289
- data: {
290
- stageDetails: {
291
- label: 'Processing with a really really really long label that might wrap',
292
- tasks: sampleTasks,
293
- sla: '1h',
294
- slaBreached: false,
295
- escalation: '1h',
296
- escalationsTriggered: false
297
- },
298
- execution: {
299
- stageStatus: {
300
- duration: 'SLA: None'
301
- }
302
- },
303
- onAddTaskFromToolbox: (taskItem)=>{
304
- window.alert(`Add task (${taskItem.data.type}) - this would open a panel to configure the new task`);
305
- },
306
- taskOptions: sampleTasks.flat().map((task)=>({
307
- id: task.id,
308
- name: task.label,
309
- icon: {
310
- Component: ()=>task.icon
311
- },
312
- data: {
313
- type: task.id
314
- }
315
- }))
316
- }
317
- },
318
- {
319
- id: '2',
320
- type: 'stage',
321
- position: {
322
- x: 752,
323
- y: 96
324
- },
325
- width: 304,
326
- data: {
327
- onReplaceTaskFromToolbox: ()=>{},
328
- stageDetails: {
329
- label: 'Validation - Failed',
330
- isReadOnly: true,
331
- tasks: [
332
- [
333
- {
334
- id: '1',
335
- label: 'Data Validation',
336
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
337
- }
338
- ],
339
- [
340
- {
341
- id: '2',
342
- label: 'Compliance Check',
343
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
344
- }
345
- ]
346
- ]
347
- },
348
- execution: {
349
- stageStatus: {
350
- label: 'error message',
351
- status: 'Failed'
352
- },
353
- taskStatus: {
354
- 2: {
355
- status: 'Failed',
356
- message: 'Compliance requirements not met'
357
- }
358
- }
359
- }
360
- }
361
- },
362
- {
363
- id: '3',
364
- type: 'stage',
365
- position: {
366
- x: 1104,
367
- y: 96
368
- },
369
- width: 304,
370
- data: {
371
- stageDetails: {
372
- label: 'Review - Warning',
373
- isReadOnly: true,
374
- tasks: [
375
- [
376
- {
377
- id: '1',
378
- label: 'Risk Assessment',
379
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
380
- }
381
- ],
382
- [
383
- {
384
- id: '2',
385
- label: 'Policy Review',
386
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
387
- }
388
- ]
389
- ]
390
- },
391
- execution: {
392
- stageStatus: {
393
- label: 'Needs attention',
394
- status: 'Warning'
395
- },
396
- taskStatus: {
397
- 2: {
398
- status: 'Warning',
399
- message: 'Policy review requires manual intervention'
400
- }
401
- }
402
- }
403
- }
404
- }
405
- ]
406
- }
407
- };
408
- const WithTaskIcons = {
409
- name: 'With Task Icons',
410
- parameters: {
411
- nodes: [
412
- {
413
- id: '1',
414
- type: 'stage',
415
- position: {
416
- x: 48,
417
- y: 96
418
- },
419
- width: 304,
420
- data: {
421
- stageDetails: {
422
- label: 'Task Icons Demo',
423
- tasks: [
424
- [
425
- {
426
- id: 'human-task',
427
- label: 'Human in the Loop',
428
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskIcon_index_cjs_namespaceObject.TaskIcon, {
429
- type: external_TaskIcon_index_cjs_namespaceObject.TaskItemTypeValues.User,
430
- size: "sm"
431
- })
432
- }
433
- ],
434
- [
435
- {
436
- id: 'agent-task',
437
- label: 'Agent Task',
438
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskIcon_index_cjs_namespaceObject.TaskIcon, {
439
- type: external_TaskIcon_index_cjs_namespaceObject.TaskItemTypeValues.Agent,
440
- size: "sm"
441
- })
442
- },
443
- {
444
- id: 'external-agent-task',
445
- label: 'External Agent',
446
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskIcon_index_cjs_namespaceObject.TaskIcon, {
447
- type: external_TaskIcon_index_cjs_namespaceObject.TaskItemTypeValues.ExternalAgent,
448
- size: "sm"
449
- })
450
- }
451
- ],
452
- [
453
- {
454
- id: 'rpa-task',
455
- label: 'RPA Automation',
456
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskIcon_index_cjs_namespaceObject.TaskIcon, {
457
- type: external_TaskIcon_index_cjs_namespaceObject.TaskItemTypeValues.Automation,
458
- size: "sm"
459
- })
460
- },
461
- {
462
- id: 'api-task',
463
- label: 'API Automation',
464
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskIcon_index_cjs_namespaceObject.TaskIcon, {
465
- type: external_TaskIcon_index_cjs_namespaceObject.TaskItemTypeValues.ApiAutomation,
466
- size: "sm"
467
- })
468
- }
469
- ],
470
- [
471
- {
472
- id: 'process-task',
473
- label: 'Agentic Process',
474
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskIcon_index_cjs_namespaceObject.TaskIcon, {
475
- type: external_TaskIcon_index_cjs_namespaceObject.TaskItemTypeValues.AgenticProcess,
476
- size: "sm"
477
- })
478
- },
479
- {
480
- id: 'connector-task',
481
- label: 'Connector',
482
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskIcon_index_cjs_namespaceObject.TaskIcon, {
483
- type: external_TaskIcon_index_cjs_namespaceObject.TaskItemTypeValues.Connector,
484
- size: "sm"
485
- })
486
- }
487
- ],
488
- [
489
- {
490
- id: 'timer-task',
491
- label: 'Timer',
492
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskIcon_index_cjs_namespaceObject.TaskIcon, {
493
- type: external_TaskIcon_index_cjs_namespaceObject.TaskItemTypeValues.Timer,
494
- size: "sm"
495
- })
496
- }
497
- ]
498
- ]
499
- }
500
- }
501
- }
502
- ]
503
- }
504
- };
505
- const ExecutionStatus = {
506
- name: 'Execution Status',
507
- parameters: {
508
- nodes: [
509
- {
510
- id: '0',
511
- type: 'stage',
512
- position: {
513
- x: 48,
514
- y: 96
515
- },
516
- width: 304,
517
- data: {
518
- stageDetails: {
519
- sla: '1h',
520
- slaBreached: false,
521
- escalation: '1h',
522
- escalationsTriggered: false,
523
- label: 'Application',
524
- isReadOnly: true,
525
- tasks: [
526
- [
527
- {
528
- id: '1',
529
- label: 'KYC and AML Checks',
530
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
531
- }
532
- ],
533
- [
534
- {
535
- id: '2',
536
- label: 'Document Verification is going to be very very really long',
537
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
538
- }
539
- ]
540
- ]
541
- },
542
- execution: {
543
- stageStatus: {
544
- status: 'Completed',
545
- duration: 'SLA: 4h'
546
- },
547
- taskStatus: {
548
- 1: {
549
- status: 'Completed',
550
- label: 'KYC and AML Checks',
551
- duration: '2h 15m'
552
- },
553
- 2: {
554
- status: 'Completed',
555
- label: 'Document Verification',
556
- duration: '1h 45m'
557
- }
558
- }
559
- }
560
- }
561
- },
562
- {
563
- id: '1',
564
- type: 'stage',
565
- position: {
566
- x: 400,
567
- y: 96
568
- },
569
- width: 304,
570
- data: {
571
- stageDetails: {
572
- sla: '1h',
573
- slaBreached: true,
574
- escalation: '1h',
575
- escalationsTriggered: true,
576
- label: 'Processing',
577
- isReadOnly: true,
578
- tasks: [
579
- [
580
- {
581
- id: '1',
582
- label: 'Liability Check',
583
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
584
- }
585
- ],
586
- [
587
- {
588
- id: '2',
589
- label: 'Credit Review',
590
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
591
- }
592
- ],
593
- [
594
- {
595
- id: '3',
596
- label: 'Address Verification',
597
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
598
- },
599
- {
600
- id: '4',
601
- label: 'Property Verification',
602
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
603
- }
604
- ],
605
- [
606
- {
607
- id: '5',
608
- label: 'Processing Review',
609
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
610
- }
611
- ]
612
- ],
613
- selectedTasks: [
614
- '2'
615
- ]
616
- },
617
- execution: {
618
- stageStatus: {
619
- status: 'Completed',
620
- duration: 'SLA: 6h 15m'
621
- },
622
- taskStatus: {
623
- 1: {
624
- status: 'Completed',
625
- label: 'Liability Check',
626
- duration: '1h 30m',
627
- retryDuration: '25m',
628
- badge: 'Reworked',
629
- badgeStatus: 'error',
630
- retryCount: 2
631
- },
632
- 2: {
633
- status: 'Completed',
634
- label: 'Credit Review',
635
- duration: '1h 30m',
636
- retryDuration: '32m',
637
- badge: 'Reworked',
638
- retryCount: 1
639
- },
640
- 3: {
641
- status: 'Completed',
642
- label: 'Address Verification',
643
- duration: '30m'
644
- },
645
- 4: {
646
- status: 'Completed',
647
- label: 'Property Verification',
648
- duration: '1h 30m',
649
- retryDuration: '1h 5m',
650
- badge: 'Reworked',
651
- retryCount: 3
652
- },
653
- 5: {
654
- status: 'Completed',
655
- label: 'Processing Review',
656
- duration: '1h 15m'
657
- }
658
- }
659
- }
660
- }
661
- },
662
- {
663
- id: '2',
664
- type: 'stage',
665
- position: {
666
- x: 752,
667
- y: 96
668
- },
669
- width: 304,
670
- data: {
671
- stageDetails: {
672
- label: 'Underwriting',
673
- isReadOnly: true,
674
- tasks: [
675
- [
676
- {
677
- id: '1',
678
- label: 'Report Ordering',
679
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
680
- }
681
- ],
682
- [
683
- {
684
- id: '2',
685
- label: 'Underwriting Verification',
686
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
687
- }
688
- ]
689
- ]
690
- },
691
- onTaskClick: (id)=>window.alert(`Task clicked: ${id}`),
692
- execution: {
693
- stageStatus: {
694
- status: 'InProgress',
695
- label: 'In progress',
696
- duration: 'SLA: 2h 15m'
697
- },
698
- taskStatus: {
699
- 1: {
700
- status: 'Completed',
701
- label: 'Report Ordering',
702
- duration: '2h 15m'
703
- },
704
- 2: {
705
- status: 'InProgress',
706
- label: 'Underwriting Verification'
707
- }
708
- }
709
- }
710
- }
711
- },
712
- {
713
- id: '3',
714
- type: 'stage',
715
- position: {
716
- x: 1104,
717
- y: 96
718
- },
719
- width: 304,
720
- data: {
721
- stageDetails: {
722
- label: 'Closing',
723
- isReadOnly: true,
724
- tasks: [
725
- [
726
- {
727
- id: '1',
728
- label: 'Loan Packet Creation',
729
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
730
- }
731
- ],
732
- [
733
- {
734
- id: '2',
735
- label: 'Customer Signing',
736
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
737
- }
738
- ],
739
- [
740
- {
741
- id: '3',
742
- label: 'Generate Audit Report',
743
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
744
- }
745
- ]
746
- ]
747
- },
748
- execution: {
749
- stageStatus: {
750
- status: 'NotExecuted',
751
- label: 'Not started'
752
- },
753
- taskStatus: {}
754
- }
755
- }
756
- },
757
- {
758
- id: '4',
759
- type: 'stage',
760
- position: {
761
- x: 1104,
762
- y: 400
763
- },
764
- width: 304,
765
- data: {
766
- stageDetails: {
767
- label: 'Rejected',
768
- isException: true,
769
- isReadOnly: true,
770
- tasks: [
771
- [
772
- {
773
- id: '1',
774
- label: 'Customer Notification',
775
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
776
- }
777
- ],
778
- [
779
- {
780
- id: '2',
781
- label: 'Generate Audit Report',
782
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
783
- }
784
- ]
785
- ]
786
- },
787
- execution: {
788
- stageStatus: {
789
- status: 'NotExecuted',
790
- label: 'Not started'
791
- },
792
- taskStatus: {}
793
- }
794
- }
795
- }
796
- ],
797
- edges: [
798
- {
799
- id: 'e1',
800
- type: 'stage',
801
- source: '0',
802
- sourceHandle: '0____source____right',
803
- target: '1',
804
- targetHandle: '1____target____left'
805
- },
806
- {
807
- id: 'e2',
808
- type: 'stage',
809
- source: '1',
810
- sourceHandle: '1____source____right',
811
- target: '2',
812
- targetHandle: '2____target____left'
813
- },
814
- {
815
- id: 'e3',
816
- type: 'stage',
817
- source: '2',
818
- sourceHandle: '2____source____right',
819
- target: '3',
820
- targetHandle: '3____target____left'
821
- }
822
- ]
823
- }
824
- };
825
- const InteractiveTaskManagement = {
826
- name: 'Interactive Task Management',
827
- parameters: {
828
- nodes: [
829
- {
830
- id: 'design-stage',
831
- type: 'stage',
832
- position: {
833
- x: 48,
834
- y: 96
835
- },
836
- width: 352,
837
- data: {
838
- stageDetails: {
839
- label: 'Design Mode - Editable',
840
- tasks: [
841
- [
842
- {
843
- id: '1',
844
- label: 'Initial Task',
845
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
846
- }
847
- ],
848
- [
849
- {
850
- id: '2',
851
- label: 'Credit Review with a very long label that will be truncated and show tooltip',
852
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
853
- }
854
- ],
855
- [
856
- {
857
- id: '3',
858
- label: 'Address Verification',
859
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
860
- },
861
- {
862
- id: '4',
863
- label: 'Property Verification with Long Name',
864
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
865
- },
866
- {
867
- id: '5',
868
- label: 'Background Check',
869
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
870
- }
871
- ],
872
- [
873
- {
874
- id: '6',
875
- label: "Final Review Task with Extended Description",
876
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
877
- }
878
- ]
879
- ]
880
- },
881
- onTaskClick: (taskId)=>{
882
- window.alert(`Task clicked: ${taskId}`);
883
- },
884
- onTaskRemove: (groupIndex, taskIndex)=>{
885
- window.alert(`Task removal requested!\nGroup: ${groupIndex}\nTask: ${taskIndex}\n\nIn a real app, this would remove the task from the data.`);
886
- },
887
- onTaskAdd: ()=>{
888
- window.alert('Add task functionality - this would open a dialog to add a new task');
889
- }
890
- }
891
- },
892
- {
893
- id: 'execution-stage',
894
- type: 'stage',
895
- position: {
896
- x: 448,
897
- y: 96
898
- },
899
- width: 352,
900
- data: {
901
- stageDetails: {
902
- label: 'Execution Mode - Read Only',
903
- isReadOnly: true,
904
- tasks: [
905
- [
906
- {
907
- id: '1',
908
- label: 'Task with execution status and very long name that will be truncated',
909
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
910
- }
911
- ],
912
- [
913
- {
914
- id: '2',
915
- label: 'Credit Review Processing',
916
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
917
- }
918
- ],
919
- [
920
- {
921
- id: '3',
922
- label: 'Parallel Address Verification Task',
923
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
924
- },
925
- {
926
- id: '4',
927
- label: 'Parallel Property Verification with Extended Name',
928
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
929
- }
930
- ],
931
- [
932
- {
933
- id: '5',
934
- label: 'Final Review and Approval Process',
935
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
936
- }
937
- ]
938
- ]
939
- },
940
- execution: {
941
- stageStatus: {
942
- status: 'InProgress',
943
- label: 'In progress',
944
- duration: '2h 15m'
945
- },
946
- taskStatus: {
947
- 1: {
948
- status: 'Completed',
949
- duration: '30m',
950
- badge: 'Completed',
951
- badgeStatus: 'info'
952
- },
953
- 2: {
954
- status: 'InProgress',
955
- duration: '1h 15m',
956
- retryDuration: '15m',
957
- badge: 'Retry',
958
- badgeStatus: 'warning',
959
- retryCount: 2
960
- },
961
- 3: {
962
- status: 'Completed',
963
- duration: '45m'
964
- },
965
- 4: {
966
- status: 'Failed',
967
- duration: '20m',
968
- retryDuration: '10m',
969
- badge: 'Error',
970
- badgeStatus: 'error',
971
- retryCount: 1
972
- },
973
- 5: {
974
- status: 'NotExecuted'
975
- }
976
- }
977
- },
978
- onTaskClick: (taskId)=>{
979
- window.alert(`Task clicked: ${taskId} (execution mode - read only)`);
980
- }
981
- }
982
- }
983
- ]
984
- }
985
- };
986
- const LoanProcessingWorkflow = {
987
- name: 'Loan Processing Workflow',
988
- parameters: {
989
- nodes: [
990
- {
991
- id: 'application',
992
- type: 'stage',
993
- position: {
994
- x: 48,
995
- y: 96
996
- },
997
- width: 304,
998
- data: {
999
- stageDetails: {
1000
- label: 'Application',
1001
- tasks: [
1002
- [
1003
- {
1004
- id: '1',
1005
- label: 'KYC and AML Checks',
1006
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1007
- }
1008
- ],
1009
- [
1010
- {
1011
- id: '2',
1012
- label: 'Document Verification',
1013
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1014
- }
1015
- ]
1016
- ],
1017
- selectedTasks: [
1018
- '1'
1019
- ]
1020
- }
1021
- }
1022
- },
1023
- {
1024
- id: 'processing',
1025
- type: 'stage',
1026
- position: {
1027
- x: 448,
1028
- y: 96
1029
- },
1030
- width: 304,
1031
- data: {
1032
- stageDetails: {
1033
- label: 'Processing',
1034
- tasks: [
1035
- [
1036
- {
1037
- id: '1',
1038
- label: 'Liability Check',
1039
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1040
- }
1041
- ],
1042
- [
1043
- {
1044
- id: '2',
1045
- label: 'Credit Review',
1046
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1047
- }
1048
- ],
1049
- [
1050
- {
1051
- id: '3',
1052
- label: 'Address Verification',
1053
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1054
- },
1055
- {
1056
- id: '4',
1057
- label: 'Property Verification',
1058
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1059
- }
1060
- ],
1061
- [
1062
- {
1063
- id: '5',
1064
- label: 'Processing Review',
1065
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
1066
- }
1067
- ]
1068
- ],
1069
- selectedTasks: [
1070
- '4'
1071
- ]
1072
- }
1073
- }
1074
- },
1075
- {
1076
- id: 'underwriting',
1077
- type: 'stage',
1078
- position: {
1079
- x: 848,
1080
- y: 96
1081
- },
1082
- width: 304,
1083
- data: {
1084
- stageDetails: {
1085
- label: 'Underwriting',
1086
- tasks: [
1087
- [
1088
- {
1089
- id: '1',
1090
- label: 'Report Ordering',
1091
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1092
- }
1093
- ],
1094
- [
1095
- {
1096
- id: '2',
1097
- label: 'Underwriting Verification',
1098
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1099
- }
1100
- ]
1101
- ]
1102
- }
1103
- }
1104
- },
1105
- {
1106
- id: 'closing',
1107
- type: 'stage',
1108
- position: {
1109
- x: 1248,
1110
- y: 96
1111
- },
1112
- width: 304,
1113
- data: {
1114
- stageDetails: {
1115
- label: 'Closing',
1116
- tasks: [
1117
- [
1118
- {
1119
- id: '1',
1120
- label: 'Loan Packet Creation',
1121
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1122
- }
1123
- ],
1124
- [
1125
- {
1126
- id: '2',
1127
- label: 'Customer Signing',
1128
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1129
- }
1130
- ],
1131
- [
1132
- {
1133
- id: '3',
1134
- label: 'Generate Audit Report',
1135
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1136
- }
1137
- ]
1138
- ]
1139
- }
1140
- }
1141
- },
1142
- {
1143
- id: 'funding',
1144
- type: 'stage',
1145
- position: {
1146
- x: 1648,
1147
- y: 96
1148
- },
1149
- width: 304,
1150
- data: {
1151
- stageDetails: {
1152
- label: 'Funding',
1153
- tasks: [
1154
- [
1155
- {
1156
- id: '1',
1157
- label: 'Disperse Loan',
1158
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
1159
- }
1160
- ],
1161
- [
1162
- {
1163
- id: '2',
1164
- label: 'Generate Audit Report',
1165
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1166
- }
1167
- ]
1168
- ]
1169
- }
1170
- }
1171
- },
1172
- {
1173
- id: 'rejected',
1174
- type: 'stage',
1175
- position: {
1176
- x: 1248,
1177
- y: 400
1178
- },
1179
- width: 304,
1180
- data: {
1181
- stageDetails: {
1182
- label: 'Rejected',
1183
- isException: true,
1184
- tasks: [
1185
- [
1186
- {
1187
- id: '1',
1188
- label: 'Customer Notification',
1189
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
1190
- }
1191
- ],
1192
- [
1193
- {
1194
- id: '2',
1195
- label: 'Generate Audit Report',
1196
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1197
- }
1198
- ]
1199
- ]
1200
- }
1201
- }
1202
- },
1203
- {
1204
- id: 'withdrawn',
1205
- type: 'stage',
1206
- position: {
1207
- x: 448,
1208
- y: 608
1209
- },
1210
- width: 304,
1211
- data: {
1212
- stageDetails: {
1213
- label: 'Withdrawn',
1214
- isException: true,
1215
- tasks: [
1216
- [
1217
- {
1218
- id: '1',
1219
- label: 'Customer Notification',
1220
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
1221
- }
1222
- ],
1223
- [
1224
- {
1225
- id: '2',
1226
- label: 'Generate Audit Report',
1227
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1228
- }
1229
- ]
1230
- ]
1231
- }
1232
- }
1233
- }
1234
- ],
1235
- edges: [
1236
- {
1237
- id: 'e1',
1238
- type: 'stage',
1239
- source: 'application',
1240
- sourceHandle: 'application____source____right',
1241
- target: 'processing',
1242
- targetHandle: 'processing____target____left'
1243
- },
1244
- {
1245
- id: 'e2',
1246
- type: 'stage',
1247
- source: 'processing',
1248
- sourceHandle: 'processing____source____right',
1249
- target: 'underwriting',
1250
- targetHandle: 'underwriting____target____left'
1251
- },
1252
- {
1253
- id: 'e3',
1254
- type: 'stage',
1255
- source: 'underwriting',
1256
- sourceHandle: 'underwriting____source____right',
1257
- target: 'closing',
1258
- targetHandle: 'closing____target____left'
1259
- },
1260
- {
1261
- id: 'e4',
1262
- type: 'stage',
1263
- source: 'closing',
1264
- sourceHandle: 'closing____source____right',
1265
- target: 'funding',
1266
- targetHandle: 'funding____target____left'
1267
- }
1268
- ]
1269
- }
1270
- };
1271
- const initialTasks = [
1272
- [
1273
- {
1274
- id: 'task-1',
1275
- label: 'KYC Verification',
1276
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1277
- }
1278
- ],
1279
- [
1280
- {
1281
- id: 'task-2',
1282
- label: 'Document Review',
1283
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1284
- },
1285
- {
1286
- id: 'task-6',
1287
- label: 'Credit Check',
1288
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1289
- }
1290
- ],
1291
- [
1292
- {
1293
- id: 'task-7',
1294
- label: 'Ad hoc - Manual Review',
1295
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {}),
1296
- isAdhoc: true
1297
- }
1298
- ],
1299
- [
1300
- {
1301
- id: 'task-3',
1302
- label: 'Address Check',
1303
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1304
- },
1305
- {
1306
- id: 'task-4',
1307
- label: 'Property Check',
1308
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1309
- }
1310
- ],
1311
- [
1312
- {
1313
- id: 'task-8',
1314
- label: 'Ad hoc - Exception Handling',
1315
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {}),
1316
- isAdhoc: true
1317
- }
1318
- ],
1319
- [
1320
- {
1321
- id: 'task-5',
1322
- label: 'Final Approval',
1323
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
1324
- }
1325
- ]
1326
- ];
1327
- const DraggableTaskReorderingStory = ()=>{
1328
- const nodeTypes = (0, external_react_namespaceObject.useMemo)(()=>({
1329
- stage: external_StageNode_stories_utils_cjs_namespaceObject.StageNodeWrapper
1330
- }), []);
1331
- const edgeTypes = (0, external_react_namespaceObject.useMemo)(()=>({
1332
- stage: external_StageEdge_cjs_namespaceObject.StageEdge
1333
- }), []);
1334
- const [nodes, setNodes, onNodesChange] = (0, react_cjs_namespaceObject.useNodesState)([
1335
- {
1336
- id: 'reorder-stage',
1337
- type: 'stage',
1338
- position: {
1339
- x: 320,
1340
- y: 96
1341
- },
1342
- data: {
1343
- stageDetails: {
1344
- label: 'Drag to Reorder Tasks',
1345
- tasks: initialTasks
1346
- },
1347
- onTaskClick: (taskId)=>console.log('Task clicked:', taskId)
1348
- }
1349
- }
1350
- ]);
1351
- const [edges, setEdges, onEdgesChange] = (0, react_cjs_namespaceObject.useEdgesState)([]);
1352
- const handleTaskReorder = (0, external_react_namespaceObject.useCallback)((reorderedTasks)=>{
1353
- setNodes((nds)=>nds.map((node)=>'reorder-stage' === node.id ? {
1354
- ...node,
1355
- data: {
1356
- ...node.data,
1357
- stageDetails: {
1358
- ...node.data.stageDetails,
1359
- tasks: reorderedTasks
1360
- }
1361
- }
1362
- } : node));
1363
- }, [
1364
- setNodes
1365
- ]);
1366
- const groupModificationHandlers = (0, external_react_namespaceObject.useMemo)(()=>(0, GroupModificationUtils_cjs_namespaceObject.createGroupModificationHandlers)(), []);
1367
- const handleTaskGroupModification = (0, external_react_namespaceObject.useCallback)((groupModificationType, groupIndex, taskIndex)=>{
1368
- const handler = (0, GroupModificationUtils_cjs_namespaceObject.getHandlerForModificationType)(groupModificationHandlers, groupModificationType);
1369
- setNodes((nds)=>nds.map((node)=>'reorder-stage' === node.id ? {
1370
- ...node,
1371
- data: {
1372
- ...node.data,
1373
- stageDetails: {
1374
- ...node.data.stageDetails,
1375
- tasks: handler(node.data.stageDetails.tasks, groupIndex, taskIndex)
1376
- }
1377
- }
1378
- } : node));
1379
- }, [
1380
- groupModificationHandlers,
1381
- setNodes
1382
- ]);
1383
- const nodesWithHandler = (0, external_react_namespaceObject.useMemo)(()=>nodes.map((node)=>({
1384
- ...node,
1385
- data: {
1386
- ...node.data,
1387
- onTaskReorder: handleTaskReorder,
1388
- onTaskGroupModification: handleTaskGroupModification
1389
- }
1390
- })), [
1391
- nodes,
1392
- handleTaskReorder,
1393
- handleTaskGroupModification
1394
- ]);
1395
- const onConnect = (0, external_react_namespaceObject.useCallback)((connection)=>setEdges((eds)=>(0, react_cjs_namespaceObject.addEdge)(connection, eds)), [
1396
- setEdges
1397
- ]);
1398
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
1399
- style: {
1400
- width: '100vw',
1401
- height: '100vh'
1402
- },
1403
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.ReactFlowProvider, {
1404
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseCanvas_index_cjs_namespaceObject.BaseCanvas, {
1405
- nodes: nodesWithHandler,
1406
- edges: edges,
1407
- onNodesChange: onNodesChange,
1408
- onEdgesChange: onEdgesChange,
1409
- onConnect: onConnect,
1410
- nodeTypes: nodeTypes,
1411
- edgeTypes: edgeTypes,
1412
- mode: "design",
1413
- connectionMode: react_cjs_namespaceObject.ConnectionMode.Strict,
1414
- defaultEdgeOptions: {
1415
- type: 'stage'
1416
- },
1417
- connectionLineComponent: external_StageConnectionEdge_cjs_namespaceObject.StageConnectionEdge,
1418
- elevateEdgesOnSelect: true,
1419
- defaultViewport: {
1420
- x: 0,
1421
- y: 0,
1422
- zoom: 1.5
1423
- },
1424
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.Panel, {
1425
- position: "bottom-right",
1426
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasPositionControls_cjs_namespaceObject.CanvasPositionControls, {
1427
- translations: external_types_cjs_namespaceObject.DefaultCanvasTranslations
1428
- })
1429
- })
1430
- })
1431
- })
1432
- });
1433
- };
1434
- const DraggableTaskReordering = {
1435
- name: 'Draggable Task Reordering',
1436
- parameters: {
1437
- useCustomRender: true
1438
- },
1439
- render: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DraggableTaskReorderingStory, {})
1440
- };
1441
- const initialTasksForAddReplace = [
1442
- [
1443
- {
1444
- id: 'task-1',
1445
- label: 'Initial Verification',
1446
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1447
- }
1448
- ],
1449
- [
1450
- {
1451
- id: 'task-adhoc-1',
1452
- label: 'Ad hoc - Manual Check',
1453
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {}),
1454
- isAdhoc: true
1455
- }
1456
- ],
1457
- [
1458
- {
1459
- id: 'task-2',
1460
- label: 'Document Review',
1461
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1462
- }
1463
- ],
1464
- [
1465
- {
1466
- id: 'task-3',
1467
- label: 'Process Validation',
1468
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
1469
- }
1470
- ]
1471
- ];
1472
- const availableTaskOptions = [
1473
- {
1474
- id: 'verification-task',
1475
- name: 'Verification task',
1476
- icon: {
1477
- Component: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1478
- },
1479
- data: {
1480
- type: 'verification'
1481
- }
1482
- },
1483
- {
1484
- id: 'document-task',
1485
- name: 'Document task',
1486
- icon: {
1487
- Component: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1488
- },
1489
- data: {
1490
- type: 'document'
1491
- }
1492
- },
1493
- {
1494
- id: 'process-task',
1495
- name: 'Process task',
1496
- icon: {
1497
- Component: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
1498
- },
1499
- data: {
1500
- type: 'process'
1501
- }
1502
- },
1503
- {
1504
- id: 'credit-check',
1505
- name: 'Credit check',
1506
- icon: {
1507
- Component: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1508
- },
1509
- data: {
1510
- type: 'credit'
1511
- }
1512
- },
1513
- {
1514
- id: 'address-verification',
1515
- name: 'Address verification',
1516
- icon: {
1517
- Component: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1518
- },
1519
- data: {
1520
- type: 'address'
1521
- }
1522
- }
1523
- ];
1524
- const AddAndReplaceTasksStory = ()=>{
1525
- const nodeTypes = (0, external_react_namespaceObject.useMemo)(()=>({
1526
- stage: external_StageNode_stories_utils_cjs_namespaceObject.StageNodeWrapper
1527
- }), []);
1528
- const edgeTypes = (0, external_react_namespaceObject.useMemo)(()=>({
1529
- stage: external_StageEdge_cjs_namespaceObject.StageEdge
1530
- }), []);
1531
- const [pendingReplaceTask, setPendingReplaceTask] = (0, external_react_namespaceObject.useState)(false);
1532
- const [selectedTaskId, setSelectedTaskId] = (0, external_react_namespaceObject.useState)();
1533
- const [menuAnchorEl, setMenuAnchorEl] = (0, external_react_namespaceObject.useState)(null);
1534
- const [nodesState, setNodes, onNodesChange] = (0, react_cjs_namespaceObject.useNodesState)([
1535
- {
1536
- id: 'add-replace-stage',
1537
- type: 'stage',
1538
- position: {
1539
- x: 320,
1540
- y: 96
1541
- },
1542
- data: {
1543
- stageDetails: {
1544
- label: 'Add, Replace, and Group Tasks',
1545
- isReadOnly: false,
1546
- tasks: initialTasksForAddReplace
1547
- },
1548
- taskOptions: availableTaskOptions
1549
- }
1550
- },
1551
- {
1552
- id: 'readonly-stage',
1553
- type: 'stage',
1554
- position: {
1555
- x: 720,
1556
- y: 96
1557
- },
1558
- data: {
1559
- stageDetails: {
1560
- label: 'ReadOnly Stage',
1561
- isReadOnly: true,
1562
- tasks: initialTasksForAddReplace
1563
- },
1564
- taskOptions: availableTaskOptions
1565
- }
1566
- }
1567
- ]);
1568
- const [edges, setEdges, onEdgesChange] = (0, react_cjs_namespaceObject.useEdgesState)([]);
1569
- const handleAddTask = (0, external_react_namespaceObject.useCallback)((taskItem)=>{
1570
- const newTask = {
1571
- id: `${taskItem.id}-${Date.now()}`,
1572
- label: taskItem.name,
1573
- icon: taskItem.icon?.Component ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(taskItem.icon.Component, {}) : void 0
1574
- };
1575
- setNodes((prevNodes)=>prevNodes.map((node)=>'add-replace-stage' === node.id ? {
1576
- ...node,
1577
- data: {
1578
- ...node.data,
1579
- stageDetails: {
1580
- ...node.data.stageDetails,
1581
- tasks: [
1582
- ...node.data.stageDetails.tasks,
1583
- [
1584
- newTask
1585
- ]
1586
- ]
1587
- }
1588
- }
1589
- } : node));
1590
- }, [
1591
- setNodes
1592
- ]);
1593
- const handleReplaceTask = (0, external_react_namespaceObject.useCallback)((taskItem, groupIndex, taskIndex)=>{
1594
- if (groupIndex < 0 || taskIndex < 0) return;
1595
- const listItem = taskItem;
1596
- const replacedTask = {
1597
- id: `${listItem.id}-replaced-${Date.now()}`,
1598
- label: listItem.name,
1599
- icon: listItem.icon?.Component ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(listItem.icon.Component, {}) : void 0
1600
- };
1601
- setNodes((prevNodes)=>prevNodes.map((node)=>{
1602
- if ('add-replace-stage' !== node.id) return node;
1603
- const prevTasks = node.data.stageDetails.tasks;
1604
- if (groupIndex >= prevTasks.length) return node;
1605
- const currentGroup = prevTasks[groupIndex];
1606
- if (!currentGroup || taskIndex >= currentGroup.length) return node;
1607
- const updatedTasks = prevTasks.map((group, gIdx)=>{
1608
- if (gIdx === groupIndex) return group.map((task, tIdx)=>tIdx === taskIndex ? replacedTask : task);
1609
- return group;
1610
- });
1611
- return {
1612
- ...node,
1613
- data: {
1614
- ...node.data,
1615
- stageDetails: {
1616
- ...node.data.stageDetails,
1617
- tasks: updatedTasks
1618
- }
1619
- }
1620
- };
1621
- }));
1622
- setPendingReplaceTask(false);
1623
- setSelectedTaskId(void 0);
1624
- }, [
1625
- setNodes
1626
- ]);
1627
- const groupModificationHandlers = (0, external_react_namespaceObject.useMemo)(()=>(0, GroupModificationUtils_cjs_namespaceObject.createGroupModificationHandlers)(), []);
1628
- const handleTaskGroupModification = (0, external_react_namespaceObject.useCallback)((groupModificationType, groupIndex, taskIndex)=>{
1629
- const handler = (0, GroupModificationUtils_cjs_namespaceObject.getHandlerForModificationType)(groupModificationHandlers, groupModificationType);
1630
- setNodes((prevNodes)=>prevNodes.map((node)=>{
1631
- if ('add-replace-stage' !== node.id) return node;
1632
- const prevTasks = node.data.stageDetails.tasks;
1633
- const updatedTasks = handler(prevTasks, groupIndex, taskIndex);
1634
- return {
1635
- ...node,
1636
- data: {
1637
- ...node.data,
1638
- stageDetails: {
1639
- ...node.data.stageDetails,
1640
- tasks: updatedTasks
1641
- }
1642
- }
1643
- };
1644
- }));
1645
- }, [
1646
- groupModificationHandlers,
1647
- setNodes
1648
- ]);
1649
- const handleTaskReorder = (0, external_react_namespaceObject.useCallback)((reorderedTasks)=>{
1650
- setNodes((prevNodes)=>prevNodes.map((node)=>'add-replace-stage' === node.id ? {
1651
- ...node,
1652
- data: {
1653
- ...node.data,
1654
- stageDetails: {
1655
- ...node.data.stageDetails,
1656
- tasks: reorderedTasks
1657
- }
1658
- }
1659
- } : node));
1660
- }, [
1661
- setNodes
1662
- ]);
1663
- const handleTaskClick = (0, external_react_namespaceObject.useCallback)((taskId)=>{
1664
- setSelectedTaskId(taskId);
1665
- }, []);
1666
- const handlePaneClick = (0, external_react_namespaceObject.useCallback)(()=>{
1667
- setSelectedTaskId(void 0);
1668
- setPendingReplaceTask(false);
1669
- }, []);
1670
- const handleNodesChange = (0, external_react_namespaceObject.useCallback)((...args)=>{
1671
- onNodesChange(...args);
1672
- const deselected = args[0].some((c)=>'select' === c.type && 'add-replace-stage' === c.id && !c.selected);
1673
- if (deselected) {
1674
- setPendingReplaceTask(false);
1675
- setSelectedTaskId(void 0);
1676
- }
1677
- }, [
1678
- onNodesChange
1679
- ]);
1680
- const currentTasks = nodesState.find((n)=>'add-replace-stage' === n.id)?.data.stageDetails.tasks || [];
1681
- const taskMenuItems = (0, external_react_namespaceObject.useMemo)(()=>currentTasks.flatMap((group)=>group.map((task)=>({
1682
- title: task.label,
1683
- variant: 'item',
1684
- startIcon: task.icon,
1685
- onClick: ()=>{
1686
- setSelectedTaskId(task.id);
1687
- setPendingReplaceTask(true);
1688
- setMenuAnchorEl(null);
1689
- }
1690
- }))), [
1691
- currentTasks
1692
- ]);
1693
- const nodesWithMetadata = (0, external_react_namespaceObject.useMemo)(()=>nodesState.map((node)=>'add-replace-stage' === node.id ? {
1694
- ...node,
1695
- data: {
1696
- ...node.data,
1697
- ...selectedTaskId && {
1698
- pendingReplaceTask
1699
- },
1700
- stageDetails: {
1701
- ...node.data.stageDetails,
1702
- selectedTaskId
1703
- },
1704
- onAddTaskFromToolbox: handleAddTask,
1705
- onReplaceTaskFromToolbox: handleReplaceTask,
1706
- onTaskGroupModification: handleTaskGroupModification,
1707
- onTaskReorder: handleTaskReorder,
1708
- onTaskClick: handleTaskClick
1709
- }
1710
- } : node), [
1711
- nodesState,
1712
- pendingReplaceTask,
1713
- selectedTaskId,
1714
- handleAddTask,
1715
- handleReplaceTask,
1716
- handleTaskGroupModification,
1717
- handleTaskReorder,
1718
- handleTaskClick
1719
- ]);
1720
- const onConnect = (0, external_react_namespaceObject.useCallback)((connection)=>setEdges((eds)=>(0, react_cjs_namespaceObject.addEdge)(connection, eds)), [
1721
- setEdges
1722
- ]);
1723
- const replaceButtonLabel = (0, external_react_namespaceObject.useMemo)(()=>{
1724
- if (pendingReplaceTask && selectedTaskId) {
1725
- const taskBeingReplaced = currentTasks.flat().find((t)=>t.id === selectedTaskId);
1726
- if (taskBeingReplaced) return `Replacing Task: ${taskBeingReplaced.label}`;
1727
- }
1728
- return 'Replace Task';
1729
- }, [
1730
- pendingReplaceTask,
1731
- selectedTaskId,
1732
- currentTasks
1733
- ]);
1734
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
1735
- style: {
1736
- width: '100vw',
1737
- height: '100vh'
1738
- },
1739
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.ReactFlowProvider, {
1740
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_BaseCanvas_index_cjs_namespaceObject.BaseCanvas, {
1741
- nodes: nodesWithMetadata,
1742
- edges: edges,
1743
- onNodesChange: handleNodesChange,
1744
- onEdgesChange: onEdgesChange,
1745
- onConnect: onConnect,
1746
- onPaneClick: handlePaneClick,
1747
- nodeTypes: nodeTypes,
1748
- edgeTypes: edgeTypes,
1749
- mode: "design",
1750
- connectionMode: react_cjs_namespaceObject.ConnectionMode.Strict,
1751
- defaultEdgeOptions: {
1752
- type: 'stage'
1753
- },
1754
- connectionLineComponent: external_StageConnectionEdge_cjs_namespaceObject.StageConnectionEdge,
1755
- elevateEdgesOnSelect: true,
1756
- defaultViewport: {
1757
- x: 0,
1758
- y: 0,
1759
- zoom: 1.5
1760
- },
1761
- children: [
1762
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_cjs_namespaceObject.Panel, {
1763
- position: "top-right",
1764
- children: [
1765
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApButton, {
1766
- variant: "primary",
1767
- label: replaceButtonLabel,
1768
- onClick: (e)=>{
1769
- setMenuAnchorEl(e.currentTarget);
1770
- }
1771
- }),
1772
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApMenu, {
1773
- isOpen: Boolean(menuAnchorEl),
1774
- anchorEl: menuAnchorEl,
1775
- menuItems: taskMenuItems,
1776
- onClose: ()=>setMenuAnchorEl(null),
1777
- width: 300
1778
- })
1779
- ]
1780
- }),
1781
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.Panel, {
1782
- position: "bottom-right",
1783
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasPositionControls_cjs_namespaceObject.CanvasPositionControls, {
1784
- translations: external_types_cjs_namespaceObject.DefaultCanvasTranslations
1785
- })
1786
- })
1787
- ]
1788
- })
1789
- })
1790
- });
1791
- };
1792
- const AddAndReplaceTasks = {
1793
- name: 'Add, Replace, and Group Tasks',
1794
- parameters: {
1795
- useCustomRender: true
1796
- },
1797
- render: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AddAndReplaceTasksStory, {})
1798
- };
1799
- const InlineTitleEditStory = ()=>{
1800
- const nodeTypes = (0, external_react_namespaceObject.useMemo)(()=>({
1801
- stage: external_StageNode_stories_utils_cjs_namespaceObject.StageNodeWrapper
1802
- }), []);
1803
- const edgeTypes = (0, external_react_namespaceObject.useMemo)(()=>({
1804
- stage: external_StageEdge_cjs_namespaceObject.StageEdge
1805
- }), []);
1806
- const setNodesRef = (0, external_react_namespaceObject.useRef)(null);
1807
- const createTitleChangeHandler = (0, external_react_namespaceObject.useCallback)((nodeId)=>(newTitle)=>{
1808
- setNodesRef.current((nds)=>nds.map((node)=>node.id === nodeId ? {
1809
- ...node,
1810
- data: {
1811
- ...node.data,
1812
- stageDetails: {
1813
- ...node.data.stageDetails,
1814
- label: newTitle
1815
- }
1816
- }
1817
- } : node));
1818
- }, []);
1819
- const initialNodes = (0, external_react_namespaceObject.useMemo)(()=>[
1820
- {
1821
- id: 'editable-stage',
1822
- type: 'stage',
1823
- position: {
1824
- x: 48,
1825
- y: 96
1826
- },
1827
- width: 304,
1828
- data: {
1829
- stageDetails: {
1830
- label: 'Click to Edit Title',
1831
- tasks: [
1832
- [
1833
- {
1834
- id: '1',
1835
- label: 'KYC Verification',
1836
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
1837
- }
1838
- ],
1839
- [
1840
- {
1841
- id: '2',
1842
- label: 'Document Review',
1843
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
1844
- }
1845
- ]
1846
- ]
1847
- },
1848
- onTaskAdd: ()=>{
1849
- window.alert('Add task functionality - this would open a dialog to add a new task');
1850
- },
1851
- onStageTitleChange: createTitleChangeHandler('editable-stage')
1852
- }
1853
- },
1854
- {
1855
- id: 'long-title-stage',
1856
- type: 'stage',
1857
- position: {
1858
- x: 400,
1859
- y: 96
1860
- },
1861
- width: 304,
1862
- data: {
1863
- stageDetails: {
1864
- label: 'A Very Long Stage Title That Should Truncate With Ellipsis',
1865
- tasks: [
1866
- [
1867
- {
1868
- id: '1',
1869
- label: 'Processing Task',
1870
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
1871
- }
1872
- ]
1873
- ]
1874
- },
1875
- onTaskAdd: ()=>{
1876
- window.alert('Add task functionality - this would open a dialog to add a new task');
1877
- },
1878
- onStageTitleChange: createTitleChangeHandler('long-title-stage')
1879
- }
1880
- }
1881
- ], [
1882
- createTitleChangeHandler
1883
- ]);
1884
- const [nodes, setNodes, onNodesChange] = (0, react_cjs_namespaceObject.useNodesState)(initialNodes);
1885
- setNodesRef.current = setNodes;
1886
- const [edges, setEdges, onEdgesChange] = (0, react_cjs_namespaceObject.useEdgesState)([]);
1887
- const onConnect = (0, external_react_namespaceObject.useCallback)((connection)=>setEdges((eds)=>(0, react_cjs_namespaceObject.addEdge)(connection, eds)), [
1888
- setEdges
1889
- ]);
1890
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
1891
- style: {
1892
- width: '100vw',
1893
- height: '100vh'
1894
- },
1895
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.ReactFlowProvider, {
1896
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseCanvas_index_cjs_namespaceObject.BaseCanvas, {
1897
- nodes: nodes,
1898
- edges: edges,
1899
- onNodesChange: onNodesChange,
1900
- onEdgesChange: onEdgesChange,
1901
- onConnect: onConnect,
1902
- nodeTypes: nodeTypes,
1903
- edgeTypes: edgeTypes,
1904
- mode: "design",
1905
- connectionMode: react_cjs_namespaceObject.ConnectionMode.Strict,
1906
- defaultEdgeOptions: {
1907
- type: 'stage'
1908
- },
1909
- connectionLineComponent: external_StageConnectionEdge_cjs_namespaceObject.StageConnectionEdge,
1910
- elevateEdgesOnSelect: true,
1911
- defaultViewport: {
1912
- x: 0,
1913
- y: 0,
1914
- zoom: 1.5
1915
- },
1916
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.Panel, {
1917
- position: "bottom-right",
1918
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasPositionControls_cjs_namespaceObject.CanvasPositionControls, {
1919
- translations: external_types_cjs_namespaceObject.DefaultCanvasTranslations
1920
- })
1921
- })
1922
- })
1923
- })
1924
- });
1925
- };
1926
- const EditableStageTitle = {
1927
- name: 'Editable Stage Title',
1928
- parameters: {
1929
- useCustomRender: true
1930
- },
1931
- render: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(InlineTitleEditStory, {})
1932
- };
1933
- const fetchChildren = (id)=>new Promise((resolve)=>{
1934
- setTimeout(()=>{
1935
- resolve([
1936
- {
1937
- id: `${id}-sub-1`,
1938
- name: `${id} - Subtask A`,
1939
- data: {
1940
- type: `${id}-a`
1941
- }
1942
- },
1943
- {
1944
- id: `${id}-sub-2`,
1945
- name: `${id} - Subtask B`,
1946
- data: {
1947
- type: `${id}-b`
1948
- }
1949
- },
1950
- {
1951
- id: `${id}-sub-3`,
1952
- name: `${id} - Subtask C`,
1953
- data: {
1954
- type: `${id}-c`
1955
- }
1956
- }
1957
- ]);
1958
- }, 2000);
1959
- });
1960
- const loadedTaskOptionsWithChildren = [
1961
- {
1962
- id: 'email',
1963
- name: 'Email',
1964
- data: {
1965
- type: 'email'
1966
- },
1967
- children: (id)=>fetchChildren(id)
1968
- },
1969
- {
1970
- id: 'approval',
1971
- name: 'Approval',
1972
- data: {
1973
- type: 'approval'
1974
- },
1975
- children: (id)=>fetchChildren(id)
1976
- },
1977
- {
1978
- id: "script",
1979
- name: 'Script',
1980
- data: {
1981
- type: "script"
1982
- },
1983
- children: (id)=>fetchChildren(id)
1984
- }
1985
- ];
1986
- const AddTaskLoadingStory = ()=>{
1987
- const nodeTypes = (0, external_react_namespaceObject.useMemo)(()=>({
1988
- stage: external_StageNode_stories_utils_cjs_namespaceObject.StageNodeWrapper
1989
- }), []);
1990
- const edgeTypes = (0, external_react_namespaceObject.useMemo)(()=>({
1991
- stage: external_StageEdge_cjs_namespaceObject.StageEdge
1992
- }), []);
1993
- const setNodesRef = (0, external_react_namespaceObject.useRef)(null);
1994
- const timeoutRef = (0, external_react_namespaceObject.useRef)(void 0);
1995
- const handleAddTaskFromToolbox = (0, external_react_namespaceObject.useCallback)((nodeId, _taskItem)=>{
1996
- clearTimeout(timeoutRef.current);
1997
- setNodesRef.current((nds)=>nds.map((n)=>n.id === nodeId ? {
1998
- ...n,
1999
- data: {
2000
- ...n.data,
2001
- addTaskLoading: true
2002
- }
2003
- } : n));
2004
- timeoutRef.current = setTimeout(()=>{
2005
- setNodesRef.current((nds)=>nds.map((n)=>n.id === nodeId ? {
2006
- ...n,
2007
- data: {
2008
- ...n.data,
2009
- addTaskLoading: false
2010
- }
2011
- } : n));
2012
- }, 2000);
2013
- }, []);
2014
- const initialNodes = (0, external_react_namespaceObject.useMemo)(()=>[
2015
- {
2016
- id: 'loading-stage-empty',
2017
- type: 'stage',
2018
- position: {
2019
- x: 48,
2020
- y: 96
2021
- },
2022
- width: 304,
2023
- data: {
2024
- stageDetails: {
2025
- label: 'Loading (+ disabled for 3s)',
2026
- tasks: []
2027
- },
2028
- addTaskLoading: true,
2029
- taskOptions: [],
2030
- onAddTaskFromToolbox: (taskItem)=>{
2031
- handleAddTaskFromToolbox('loading-stage-empty', taskItem);
2032
- }
2033
- }
2034
- },
2035
- {
2036
- id: 'loading-stage-children',
2037
- type: 'stage',
2038
- position: {
2039
- x: 400,
2040
- y: 96
2041
- },
2042
- width: 304,
2043
- data: {
2044
- stageDetails: {
2045
- label: 'Async children (click +)',
2046
- tasks: [
2047
- [
2048
- {
2049
- id: 'task-1',
2050
- label: 'Existing Task',
2051
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
2052
- }
2053
- ]
2054
- ]
2055
- },
2056
- addTaskLoading: false,
2057
- taskOptions: loadedTaskOptionsWithChildren,
2058
- onAddTaskFromToolbox: (taskItem)=>{
2059
- handleAddTaskFromToolbox('loading-stage-children', taskItem);
2060
- }
2061
- }
2062
- }
2063
- ], [
2064
- handleAddTaskFromToolbox
2065
- ]);
2066
- const [nodes, setNodes, onNodesChange] = (0, react_cjs_namespaceObject.useNodesState)(initialNodes);
2067
- setNodesRef.current = setNodes;
2068
- const [edges, setEdges, onEdgesChange] = (0, react_cjs_namespaceObject.useEdgesState)([]);
2069
- (0, external_react_namespaceObject.useEffect)(()=>{
2070
- const timeout = setTimeout(()=>{
2071
- setNodes((nds)=>nds.map((node)=>'loading-stage-empty' === node.id ? {
2072
- ...node,
2073
- data: {
2074
- ...node.data,
2075
- addTaskLoading: false,
2076
- taskOptions: loadedTaskOptionsWithChildren
2077
- }
2078
- } : node));
2079
- }, 3000);
2080
- return ()=>clearTimeout(timeout);
2081
- }, [
2082
- setNodes
2083
- ]);
2084
- (0, external_react_namespaceObject.useEffect)(()=>()=>clearTimeout(timeoutRef.current), []);
2085
- const onConnect = (0, external_react_namespaceObject.useCallback)((connection)=>setEdges((eds)=>(0, react_cjs_namespaceObject.addEdge)(connection, eds)), [
2086
- setEdges
2087
- ]);
2088
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
2089
- style: {
2090
- width: '100vw',
2091
- height: '100vh'
2092
- },
2093
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.ReactFlowProvider, {
2094
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseCanvas_index_cjs_namespaceObject.BaseCanvas, {
2095
- nodes: nodes,
2096
- edges: edges,
2097
- onNodesChange: onNodesChange,
2098
- onEdgesChange: onEdgesChange,
2099
- onConnect: onConnect,
2100
- nodeTypes: nodeTypes,
2101
- edgeTypes: edgeTypes,
2102
- mode: "design",
2103
- connectionMode: react_cjs_namespaceObject.ConnectionMode.Strict,
2104
- defaultEdgeOptions: {
2105
- type: 'stage'
2106
- },
2107
- connectionLineComponent: external_StageConnectionEdge_cjs_namespaceObject.StageConnectionEdge,
2108
- elevateEdgesOnSelect: true,
2109
- defaultViewport: {
2110
- x: 0,
2111
- y: 0,
2112
- zoom: 1.5
2113
- },
2114
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.Panel, {
2115
- position: "bottom-right",
2116
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasPositionControls_cjs_namespaceObject.CanvasPositionControls, {
2117
- translations: external_types_cjs_namespaceObject.DefaultCanvasTranslations
2118
- })
2119
- })
2120
- })
2121
- })
2122
- });
2123
- };
2124
- const AddTaskLoading = {
2125
- name: 'Add Task Loading State',
2126
- parameters: {
2127
- useCustomRender: true
2128
- },
2129
- render: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AddTaskLoadingStory, {})
2130
- };
2131
- const AdhocTasks = {
2132
- name: 'Ad hoc Tasks',
2133
- parameters: {
2134
- nodes: [
2135
- {
2136
- id: '0',
2137
- type: 'stage',
2138
- position: {
2139
- x: 48,
2140
- y: 96
2141
- },
2142
- width: 304,
2143
- data: {
2144
- stageDetails: {
2145
- label: 'With onTaskPlay',
2146
- tasks: [
2147
- [
2148
- {
2149
- id: '1',
2150
- label: 'Ad hoc - KYC Check',
2151
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {}),
2152
- isAdhoc: true
2153
- }
2154
- ],
2155
- [
2156
- {
2157
- id: '2',
2158
- label: 'Ad hoc - Document Review',
2159
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {}),
2160
- isAdhoc: true
2161
- }
2162
- ]
2163
- ]
2164
- },
2165
- onTaskPlay: (taskId)=>new Promise((resolve)=>setTimeout(()=>{
2166
- resolve();
2167
- console.log(`Play task: ${taskId}`);
2168
- }, 5000)),
2169
- onTaskClick: (taskId)=>{
2170
- window.alert(`Task clicked: ${taskId}`);
2171
- }
2172
- }
2173
- },
2174
- {
2175
- id: '1',
2176
- type: 'stage',
2177
- position: {
2178
- x: 400,
2179
- y: 96
2180
- },
2181
- width: 304,
2182
- data: {
2183
- stageDetails: {
2184
- label: 'Without onTaskPlay and Menu',
2185
- tasks: [
2186
- [
2187
- {
2188
- id: '1',
2189
- label: 'Ad hoc - Risk Assessment',
2190
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {}),
2191
- isAdhoc: true
2192
- }
2193
- ],
2194
- [
2195
- {
2196
- id: '2',
2197
- label: 'Ad hoc - Compliance Review',
2198
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {}),
2199
- isAdhoc: true
2200
- }
2201
- ],
2202
- [
2203
- {
2204
- id: '3',
2205
- label: 'Regular Task',
2206
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {}),
2207
- hasEntryCondition: true
2208
- }
2209
- ]
2210
- ]
2211
- },
2212
- onTaskClick: (taskId)=>{
2213
- window.alert(`Task clicked: ${taskId}`);
2214
- },
2215
- onTaskGroupModification: (type, groupIndex, taskIndex)=>{
2216
- console.log(`Task group modification: ${type}, group: ${groupIndex}, task: ${taskIndex}`);
2217
- },
2218
- onReplaceTaskFromToolbox: (task, groupIndex, taskIndex)=>{
2219
- console.log(`Replace task at group: ${groupIndex}, task: ${taskIndex}`, task);
2220
- }
2221
- }
2222
- },
2223
- {
2224
- id: '2',
2225
- type: 'stage',
2226
- position: {
2227
- x: 752,
2228
- y: 96
2229
- },
2230
- width: 304,
2231
- data: {
2232
- stageDetails: {
2233
- label: 'Mixed with Parallel',
2234
- isReadOnly: true,
2235
- tasks: [
2236
- [
2237
- {
2238
- id: '1',
2239
- label: 'Ad hoc - Verify Address',
2240
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {}),
2241
- isAdhoc: true
2242
- },
2243
- {
2244
- id: '2',
2245
- label: 'Ad hoc - Verify Identity',
2246
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {}),
2247
- isAdhoc: true
2248
- }
2249
- ],
2250
- [
2251
- {
2252
- id: '3',
2253
- label: 'Ad hoc - Bkgd Check',
2254
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {}),
2255
- isAdhoc: true
2256
- }
2257
- ],
2258
- [
2259
- {
2260
- id: '4',
2261
- label: 'Ad hoc - Review Docs',
2262
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {}),
2263
- isAdhoc: true
2264
- }
2265
- ],
2266
- [
2267
- {
2268
- id: '5',
2269
- label: 'Regular Processing',
2270
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
2271
- }
2272
- ]
2273
- ]
2274
- },
2275
- execution: {
2276
- stageStatus: {
2277
- status: 'InProgress',
2278
- label: 'In progress',
2279
- duration: 'SLA: 3h 45m'
2280
- },
2281
- taskStatus: {
2282
- 1: {
2283
- status: 'Completed',
2284
- label: 'Verify Address',
2285
- duration: '1h 20m',
2286
- retryDuration: '35m',
2287
- badge: 'Reworked',
2288
- badgeStatus: 'warning',
2289
- retryCount: 2
2290
- },
2291
- 2: {
2292
- status: 'Failed',
2293
- label: 'Verify Identity',
2294
- duration: '45m',
2295
- message: 'Identity verification failed - document expired',
2296
- badge: 'Action needed',
2297
- badgeStatus: 'error'
2298
- },
2299
- 3: {
2300
- status: 'InProgress',
2301
- label: 'Background Check'
2302
- },
2303
- 4: {
2304
- status: 'InProgress',
2305
- label: 'Review Docs',
2306
- duration: '30m',
2307
- retryDuration: '10m',
2308
- badge: 'Reworked',
2309
- badgeStatus: 'info',
2310
- retryCount: 1
2311
- },
2312
- 5: {
2313
- status: 'InProgress',
2314
- label: 'Regular Processing'
2315
- }
2316
- }
2317
- },
2318
- onTaskPlay: (taskId)=>new Promise((resolve)=>setTimeout(()=>{
2319
- resolve();
2320
- console.log(`Play task: ${taskId}`);
2321
- }, 5000))
2322
- }
2323
- }
2324
- ]
2325
- }
2326
- };
2327
- const WithRulesTags = {
2328
- name: 'With Rules & Tags',
2329
- parameters: {
2330
- nodes: [
2331
- {
2332
- id: '1',
2333
- type: 'stage',
2334
- position: {
2335
- x: 48,
2336
- y: 96
2337
- },
2338
- width: 304,
2339
- data: {
2340
- stageDetails: {
2341
- label: 'Application',
2342
- tasks: [
2343
- [
2344
- {
2345
- id: 't1',
2346
- label: 'Verify applicant identity',
2347
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
2348
- }
2349
- ],
2350
- [
2351
- {
2352
- id: 't2',
2353
- label: 'Pull credit report',
2354
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
2355
- }
2356
- ]
2357
- ],
2358
- headerChips: [
2359
- {
2360
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.Entry,
2361
- count: 1,
2362
- tooltip: 'Entry rules',
2363
- onClick: ()=>window.alert('Open entry rules panel')
2364
- },
2365
- {
2366
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.Exit,
2367
- count: 3,
2368
- tooltip: 'Exit rules',
2369
- onClick: ()=>window.alert('Open exit rules panel')
2370
- }
2371
- ]
2372
- },
2373
- onTaskClick: (taskId)=>window.alert(`Task clicked: ${taskId}`),
2374
- onTaskAdd: ()=>window.alert('Add task')
2375
- }
2376
- },
2377
- {
2378
- id: '2',
2379
- type: 'stage',
2380
- position: {
2381
- x: 400,
2382
- y: 96
2383
- },
2384
- width: 304,
2385
- data: {
2386
- stageDetails: {
2387
- label: 'Pending with customer',
2388
- tasks: [
2389
- [
2390
- {
2391
- id: 't3',
2392
- label: 'Request documents',
2393
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
2394
- }
2395
- ],
2396
- [
2397
- {
2398
- id: 't4',
2399
- label: 'Send reminder or request',
2400
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
2401
- }
2402
- ]
2403
- ],
2404
- headerChips: [
2405
- {
2406
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.Entry,
2407
- count: 2,
2408
- tooltip: 'Entry rules',
2409
- onClick: ()=>window.alert('Open entry rules panel')
2410
- },
2411
- {
2412
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.Exit,
2413
- count: 1,
2414
- tooltip: 'Exit rules',
2415
- onClick: ()=>window.alert('Open exit rules panel')
2416
- },
2417
- {
2418
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.ReturnToOrigin,
2419
- tooltip: 'Return to origin conditions',
2420
- onClick: ()=>window.alert('Open return to origin panel')
2421
- }
2422
- ]
2423
- },
2424
- onTaskClick: (taskId)=>window.alert(`Task clicked: ${taskId}`),
2425
- onTaskAdd: ()=>window.alert('Add task')
2426
- }
2427
- },
2428
- {
2429
- id: '3',
2430
- type: 'stage',
2431
- position: {
2432
- x: 752,
2433
- y: 96
2434
- },
2435
- width: 304,
2436
- data: {
2437
- stageDetails: {
2438
- label: 'Withdrawn',
2439
- tasks: [
2440
- [
2441
- {
2442
- id: 't5',
2443
- label: 'Process withdrawal',
2444
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
2445
- }
2446
- ]
2447
- ],
2448
- headerChips: [
2449
- {
2450
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.Entry,
2451
- count: 2,
2452
- tooltip: 'Entry rules',
2453
- onClick: ()=>window.alert('Open entry rules panel')
2454
- },
2455
- {
2456
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.Exit,
2457
- count: 1,
2458
- tooltip: 'Exit rules',
2459
- onClick: ()=>window.alert('Open exit rules panel')
2460
- },
2461
- {
2462
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.CaseExit,
2463
- tooltip: 'Case exit',
2464
- onClick: ()=>window.alert('Open case exit panel')
2465
- }
2466
- ]
2467
- },
2468
- onTaskClick: (taskId)=>window.alert(`Task clicked: ${taskId}`),
2469
- onTaskAdd: ()=>window.alert('Add task')
2470
- }
2471
- },
2472
- {
2473
- id: '4',
2474
- type: 'stage',
2475
- position: {
2476
- x: 1104,
2477
- y: 96
2478
- },
2479
- width: 304,
2480
- data: {
2481
- stageDetails: {
2482
- label: 'Closing',
2483
- tasks: [
2484
- [
2485
- {
2486
- id: 't6',
2487
- label: 'Prepare closing docs',
2488
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
2489
- }
2490
- ],
2491
- [
2492
- {
2493
- id: 't7',
2494
- label: 'eSign envelope',
2495
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
2496
- }
2497
- ]
2498
- ],
2499
- headerChips: [
2500
- {
2501
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.Entry,
2502
- count: 1,
2503
- tooltip: 'Entry rules',
2504
- onClick: ()=>window.alert('Open entry rules panel')
2505
- },
2506
- {
2507
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.Exit,
2508
- count: 3,
2509
- tooltip: 'Exit rules',
2510
- onClick: ()=>window.alert('Open exit rules panel')
2511
- },
2512
- {
2513
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.CaseCompletion,
2514
- tooltip: 'Case completion',
2515
- onClick: ()=>window.alert('Open case completion panel')
2516
- }
2517
- ]
2518
- },
2519
- onTaskClick: (taskId)=>window.alert(`Task clicked: ${taskId}`),
2520
- onTaskAdd: ()=>window.alert('Add task')
2521
- }
2522
- },
2523
- {
2524
- id: '5',
2525
- type: 'stage',
2526
- position: {
2527
- x: 48,
2528
- y: 400
2529
- },
2530
- width: 304,
2531
- data: {
2532
- stageDetails: {
2533
- label: 'No chips (comparison)',
2534
- tasks: [
2535
- [
2536
- {
2537
- id: 't8',
2538
- label: 'Verify applicant identity',
2539
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
2540
- }
2541
- ],
2542
- [
2543
- {
2544
- id: 't9',
2545
- label: 'Pull credit report',
2546
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
2547
- }
2548
- ]
2549
- ]
2550
- },
2551
- onTaskClick: (taskId)=>window.alert(`Task clicked: ${taskId}`),
2552
- onTaskAdd: ()=>window.alert('Add task')
2553
- }
2554
- },
2555
- {
2556
- id: '6',
2557
- type: 'stage',
2558
- position: {
2559
- x: 400,
2560
- y: 400
2561
- },
2562
- width: 304,
2563
- data: {
2564
- stageDetails: {
2565
- label: 'ReadOnly + completed + chips',
2566
- isReadOnly: true,
2567
- tasks: [
2568
- [
2569
- {
2570
- id: 't10',
2571
- label: 'Verify applicant identity',
2572
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
2573
- }
2574
- ],
2575
- [
2576
- {
2577
- id: 't11',
2578
- label: 'Pull credit report',
2579
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
2580
- }
2581
- ]
2582
- ],
2583
- headerChips: [
2584
- {
2585
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.Entry,
2586
- count: 1,
2587
- tooltip: 'Entry rules',
2588
- onClick: ()=>window.alert('Open entry rules panel')
2589
- },
2590
- {
2591
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.Exit,
2592
- count: 3,
2593
- tooltip: 'Exit rules',
2594
- onClick: ()=>window.alert('Open exit rules panel')
2595
- }
2596
- ]
2597
- },
2598
- execution: {
2599
- stageStatus: {
2600
- status: 'Completed',
2601
- label: 'Completed',
2602
- duration: 'SLA: 4h'
2603
- }
2604
- }
2605
- }
2606
- },
2607
- {
2608
- id: '7',
2609
- type: 'stage',
2610
- position: {
2611
- x: 752,
2612
- y: 400
2613
- },
2614
- width: 304,
2615
- data: {
2616
- stageDetails: {
2617
- label: 'ReadOnly + in progress + chips',
2618
- isReadOnly: true,
2619
- tasks: [
2620
- [
2621
- {
2622
- id: 't12',
2623
- label: 'Verify applicant identity',
2624
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
2625
- }
2626
- ],
2627
- [
2628
- {
2629
- id: 't13',
2630
- label: 'Pull credit report',
2631
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
2632
- }
2633
- ]
2634
- ],
2635
- headerChips: [
2636
- {
2637
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.Entry,
2638
- count: 2,
2639
- tooltip: 'Entry rules',
2640
- onClick: ()=>window.alert('Open entry rules panel')
2641
- },
2642
- {
2643
- type: external_StageNode_types_cjs_namespaceObject.StageHeaderChipType.Exit,
2644
- count: 1,
2645
- tooltip: 'Exit rules',
2646
- onClick: ()=>window.alert('Open exit rules panel')
2647
- }
2648
- ]
2649
- },
2650
- execution: {
2651
- stageStatus: {
2652
- status: 'InProgress',
2653
- label: 'In progress',
2654
- duration: 'SLA: 2h'
2655
- }
2656
- }
2657
- }
2658
- }
2659
- ]
2660
- }
2661
- };
2662
- exports.AddAndReplaceTasks = __webpack_exports__.AddAndReplaceTasks;
2663
- exports.AddTaskLoading = __webpack_exports__.AddTaskLoading;
2664
- exports.AdhocTasks = __webpack_exports__.AdhocTasks;
2665
- exports.Default = __webpack_exports__.Default;
2666
- exports.DraggableTaskReordering = __webpack_exports__.DraggableTaskReordering;
2667
- exports.EditableStageTitle = __webpack_exports__.EditableStageTitle;
2668
- exports.ExecutionStatus = __webpack_exports__.ExecutionStatus;
2669
- exports.InteractiveTaskManagement = __webpack_exports__.InteractiveTaskManagement;
2670
- exports.LoanProcessingWorkflow = __webpack_exports__.LoanProcessingWorkflow;
2671
- exports.WithRulesTags = __webpack_exports__.WithRulesTags;
2672
- exports.WithTaskIcons = __webpack_exports__.WithTaskIcons;
2673
- exports["default"] = __webpack_exports__["default"];
2674
- for(var __rspack_i in __webpack_exports__)if (-1 === [
2675
- "AddAndReplaceTasks",
2676
- "AddTaskLoading",
2677
- "AdhocTasks",
2678
- "Default",
2679
- "DraggableTaskReordering",
2680
- "EditableStageTitle",
2681
- "ExecutionStatus",
2682
- "InteractiveTaskManagement",
2683
- "LoanProcessingWorkflow",
2684
- "WithRulesTags",
2685
- "WithTaskIcons",
2686
- "default"
2687
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
2688
- Object.defineProperty(exports, '__esModule', {
2689
- value: true
2690
- });