@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,756 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Checkbox, FormControl, FormControlLabel, InputLabel, MenuItem, Select } from "@mui/material";
3
- import { FontVariantToken } from "@uipath/apollo-core";
4
- import { Column } from "../../layouts/index.js";
5
- import { MarkerType, Panel, Position, useEdgesState } from "../../xyflow/react.js";
6
- import { ApTypography } from "../../../material/index.js";
7
- import { useCallback, useEffect, useMemo, useState } from "react";
8
- import { StoryInfoPanel, useCanvasStory, withCanvasProviders } from "../../storybook-utils/index.js";
9
- import { DefaultCanvasTranslations } from "../../types.js";
10
- import { BaseCanvas } from "../BaseCanvas/index.js";
11
- import { CanvasPositionControls } from "../CanvasPositionControls.js";
12
- const meta = {
13
- title: 'Canvas/Edges',
14
- parameters: {
15
- layout: 'fullscreen'
16
- },
17
- decorators: [
18
- withCanvasProviders()
19
- ]
20
- };
21
- const XyFlowEdgeComparison_stories = meta;
22
- const GRID = {
23
- startX: 400,
24
- startY: 100,
25
- nodeWidth: 350,
26
- nodeHeight: 200,
27
- columnGap: 500
28
- };
29
- function createNodePair(config) {
30
- const { id, label, row, column, yOffset = 0, extraHandles = false } = config;
31
- const baseX = GRID.startX + column * GRID.columnGap;
32
- const baseY = GRID.startY + row * GRID.nodeHeight;
33
- const sourceHandles = extraHandles ? [
34
- {
35
- position: Position.Right,
36
- handles: [
37
- {
38
- id: 'out1',
39
- type: 'source',
40
- handleType: 'output'
41
- },
42
- {
43
- id: 'out2',
44
- type: 'source',
45
- handleType: 'output'
46
- }
47
- ]
48
- },
49
- {
50
- position: Position.Bottom,
51
- handles: [
52
- {
53
- id: 'out3',
54
- type: 'source',
55
- handleType: 'output'
56
- }
57
- ]
58
- }
59
- ] : [
60
- {
61
- position: Position.Right,
62
- handles: [
63
- {
64
- id: 'out',
65
- type: 'source',
66
- handleType: 'output'
67
- }
68
- ]
69
- }
70
- ];
71
- const targetHandles = extraHandles ? [
72
- {
73
- position: Position.Left,
74
- handles: [
75
- {
76
- id: 'in1',
77
- type: 'target',
78
- handleType: 'input'
79
- },
80
- {
81
- id: 'in2',
82
- type: 'target',
83
- handleType: 'input'
84
- }
85
- ]
86
- },
87
- {
88
- position: Position.Bottom,
89
- handles: [
90
- {
91
- id: 'in3',
92
- type: 'target',
93
- handleType: 'input'
94
- }
95
- ]
96
- }
97
- ] : [
98
- {
99
- position: Position.Left,
100
- handles: [
101
- {
102
- id: 'in',
103
- type: 'target',
104
- handleType: 'input'
105
- }
106
- ]
107
- }
108
- ];
109
- return [
110
- {
111
- id: `${id}-1`,
112
- type: 'uipath.blank-node',
113
- position: {
114
- x: baseX,
115
- y: baseY
116
- },
117
- data: {
118
- display: {
119
- label,
120
- icon: 'circle'
121
- },
122
- handleConfigurations: sourceHandles
123
- }
124
- },
125
- {
126
- id: `${id}-2`,
127
- type: 'uipath.blank-node',
128
- position: {
129
- x: baseX + GRID.nodeWidth,
130
- y: baseY + yOffset
131
- },
132
- data: {
133
- display: {
134
- label,
135
- icon: 'square'
136
- },
137
- handleConfigurations: targetHandles
138
- }
139
- }
140
- ];
141
- }
142
- function AllEdgeTypesStory() {
143
- const initialNodes = useMemo(()=>{
144
- const yOffsets = [
145
- 30,
146
- 0,
147
- 50,
148
- 45,
149
- 45
150
- ];
151
- return [
152
- ...createNodePair({
153
- id: 'default',
154
- label: 'Default',
155
- row: 0,
156
- column: 0,
157
- yOffset: yOffsets[0]
158
- }),
159
- ...createNodePair({
160
- id: 'straight',
161
- label: 'Straight',
162
- row: 1,
163
- column: 0,
164
- yOffset: yOffsets[1]
165
- }),
166
- ...createNodePair({
167
- id: 'step',
168
- label: 'Step',
169
- row: 2,
170
- column: 0,
171
- yOffset: yOffsets[2]
172
- }),
173
- ...createNodePair({
174
- id: 'smoothstep',
175
- label: 'Smooth Step',
176
- row: 3,
177
- column: 0,
178
- yOffset: yOffsets[3]
179
- }),
180
- ...createNodePair({
181
- id: 'bezier',
182
- label: 'Bezier',
183
- row: 4,
184
- column: 0,
185
- yOffset: yOffsets[4]
186
- }),
187
- ...createNodePair({
188
- id: 'animated',
189
- label: 'Animated',
190
- row: 0,
191
- column: 1,
192
- yOffset: -yOffsets[0]
193
- }),
194
- ...createNodePair({
195
- id: 'styled',
196
- label: 'Styled',
197
- row: 1,
198
- column: 1,
199
- yOffset: -yOffsets[1]
200
- }),
201
- ...createNodePair({
202
- id: 'labeled',
203
- label: 'Labeled',
204
- row: 2,
205
- column: 1,
206
- yOffset: -yOffsets[2]
207
- }),
208
- ...createNodePair({
209
- id: 'marker',
210
- label: 'Markers',
211
- row: 3,
212
- column: 1,
213
- yOffset: -yOffsets[3]
214
- }),
215
- ...createNodePair({
216
- id: 'complex',
217
- label: 'Complex',
218
- row: 4,
219
- column: 1,
220
- extraHandles: true
221
- })
222
- ];
223
- }, []);
224
- const initialEdges = useMemo(()=>[
225
- {
226
- id: 'e-default',
227
- source: 'default-1',
228
- target: 'default-2',
229
- sourceHandle: 'out',
230
- targetHandle: 'in',
231
- label: 'default (bezier)'
232
- },
233
- {
234
- id: 'e-straight',
235
- source: 'straight-1',
236
- target: 'straight-2',
237
- sourceHandle: 'out',
238
- targetHandle: 'in',
239
- type: 'straight',
240
- label: 'straight'
241
- },
242
- {
243
- id: 'e-step',
244
- source: 'step-1',
245
- target: 'step-2',
246
- sourceHandle: 'out',
247
- targetHandle: 'in',
248
- type: 'step',
249
- label: 'step'
250
- },
251
- {
252
- id: 'e-smoothstep',
253
- source: 'smoothstep-1',
254
- target: 'smoothstep-2',
255
- sourceHandle: 'out',
256
- targetHandle: 'in',
257
- type: 'smoothstep',
258
- label: 'smoothstep'
259
- },
260
- {
261
- id: 'e-bezier',
262
- source: 'bezier-1',
263
- target: 'bezier-2',
264
- sourceHandle: 'out',
265
- targetHandle: 'in',
266
- type: 'bezier',
267
- label: 'bezier'
268
- },
269
- {
270
- id: 'e-animated',
271
- source: 'animated-1',
272
- target: 'animated-2',
273
- sourceHandle: 'out',
274
- targetHandle: 'in',
275
- animated: true,
276
- label: 'animated',
277
- style: {
278
- stroke: '#f6ab6c',
279
- strokeWidth: 2
280
- }
281
- },
282
- {
283
- id: 'e-styled',
284
- source: 'styled-1',
285
- target: 'styled-2',
286
- sourceHandle: 'out',
287
- targetHandle: 'in',
288
- style: {
289
- stroke: '#ff0072',
290
- strokeWidth: 3,
291
- strokeDasharray: '5 5'
292
- },
293
- label: 'styled (dashed)',
294
- labelStyle: {
295
- fill: '#ff0072',
296
- fontWeight: 700
297
- },
298
- labelBgStyle: {
299
- fill: '#ffebe6'
300
- }
301
- },
302
- {
303
- id: 'e-labeled',
304
- source: 'labeled-1',
305
- target: 'labeled-2',
306
- sourceHandle: 'out',
307
- targetHandle: 'in',
308
- type: 'smoothstep',
309
- label: 'Edge Label',
310
- labelStyle: {
311
- fill: '#2563eb',
312
- fontSize: 14,
313
- fontWeight: 600
314
- },
315
- labelBgStyle: {
316
- fill: '#dbeafe',
317
- fillOpacity: 0.8
318
- },
319
- labelShowBg: true,
320
- labelBgPadding: [
321
- 8,
322
- 4
323
- ],
324
- labelBgBorderRadius: 4
325
- },
326
- {
327
- id: 'e-marker',
328
- source: 'marker-1',
329
- target: 'marker-2',
330
- sourceHandle: 'out',
331
- targetHandle: 'in',
332
- type: 'smoothstep',
333
- markerEnd: {
334
- type: MarkerType.ArrowClosed,
335
- color: '#22c55e'
336
- },
337
- markerStart: {
338
- type: MarkerType.Arrow,
339
- color: '#22c55e'
340
- },
341
- style: {
342
- stroke: '#22c55e',
343
- strokeWidth: 2
344
- },
345
- label: 'with arrows'
346
- },
347
- {
348
- id: 'e-complex-1',
349
- source: 'complex-1',
350
- target: 'complex-2',
351
- sourceHandle: 'out1',
352
- targetHandle: 'in1',
353
- type: 'bezier',
354
- style: {
355
- stroke: '#8b5cf6'
356
- },
357
- label: 'path 1'
358
- },
359
- {
360
- id: 'e-complex-2',
361
- source: 'complex-1',
362
- target: 'complex-2',
363
- sourceHandle: 'out2',
364
- targetHandle: 'in2',
365
- type: 'step',
366
- style: {
367
- stroke: '#ec4899'
368
- },
369
- label: 'path 2'
370
- },
371
- {
372
- id: 'e-complex-3',
373
- source: 'complex-1',
374
- target: 'complex-2',
375
- sourceHandle: 'out3',
376
- targetHandle: 'in3',
377
- type: 'smoothstep',
378
- style: {
379
- stroke: '#06b6d4'
380
- },
381
- label: 'path 3'
382
- }
383
- ], []);
384
- const { canvasProps } = useCanvasStory({
385
- initialNodes,
386
- initialEdges
387
- });
388
- return /*#__PURE__*/ jsxs(BaseCanvas, {
389
- ...canvasProps,
390
- mode: "design",
391
- defaultEdgeOptions: {
392
- style: {
393
- strokeWidth: 2
394
- }
395
- },
396
- children: [
397
- /*#__PURE__*/ jsx(StoryInfoPanel, {
398
- title: "React Flow Edge Types",
399
- children: /*#__PURE__*/ jsxs(Column, {
400
- gap: 8,
401
- style: {
402
- marginTop: 8
403
- },
404
- children: [
405
- /*#__PURE__*/ jsx(ApTypography, {
406
- variant: FontVariantToken.fontSizeSBold,
407
- children: "Built-in Types"
408
- }),
409
- /*#__PURE__*/ jsxs("ul", {
410
- style: {
411
- margin: 0,
412
- paddingLeft: 20,
413
- fontSize: 13
414
- },
415
- children: [
416
- /*#__PURE__*/ jsxs("li", {
417
- children: [
418
- /*#__PURE__*/ jsx("code", {
419
- children: "default"
420
- }),
421
- " - Bezier curve"
422
- ]
423
- }),
424
- /*#__PURE__*/ jsxs("li", {
425
- children: [
426
- /*#__PURE__*/ jsx("code", {
427
- children: "straight"
428
- }),
429
- " - Direct line"
430
- ]
431
- }),
432
- /*#__PURE__*/ jsxs("li", {
433
- children: [
434
- /*#__PURE__*/ jsx("code", {
435
- children: "step"
436
- }),
437
- " - Right angles"
438
- ]
439
- }),
440
- /*#__PURE__*/ jsxs("li", {
441
- children: [
442
- /*#__PURE__*/ jsx("code", {
443
- children: "smoothstep"
444
- }),
445
- " - Rounded corners"
446
- ]
447
- }),
448
- /*#__PURE__*/ jsxs("li", {
449
- children: [
450
- /*#__PURE__*/ jsx("code", {
451
- children: "bezier"
452
- }),
453
- " - Curved path"
454
- ]
455
- })
456
- ]
457
- }),
458
- /*#__PURE__*/ jsx(ApTypography, {
459
- variant: FontVariantToken.fontSizeSBold,
460
- children: "Properties"
461
- }),
462
- /*#__PURE__*/ jsxs("ul", {
463
- style: {
464
- margin: 0,
465
- paddingLeft: 20,
466
- fontSize: 13
467
- },
468
- children: [
469
- /*#__PURE__*/ jsxs("li", {
470
- children: [
471
- /*#__PURE__*/ jsx("code", {
472
- children: "animated"
473
- }),
474
- " - Animated flow"
475
- ]
476
- }),
477
- /*#__PURE__*/ jsxs("li", {
478
- children: [
479
- /*#__PURE__*/ jsx("code", {
480
- children: "style"
481
- }),
482
- " - Custom styling"
483
- ]
484
- }),
485
- /*#__PURE__*/ jsxs("li", {
486
- children: [
487
- /*#__PURE__*/ jsx("code", {
488
- children: "label"
489
- }),
490
- " - Edge labels"
491
- ]
492
- }),
493
- /*#__PURE__*/ jsxs("li", {
494
- children: [
495
- /*#__PURE__*/ jsx("code", {
496
- children: "markerStart/End"
497
- }),
498
- " - Arrows"
499
- ]
500
- })
501
- ]
502
- })
503
- ]
504
- })
505
- }),
506
- /*#__PURE__*/ jsx(Panel, {
507
- position: "bottom-right",
508
- children: /*#__PURE__*/ jsx(CanvasPositionControls, {
509
- translations: DefaultCanvasTranslations
510
- })
511
- })
512
- ]
513
- });
514
- }
515
- function InteractiveEdgeSelectionStory() {
516
- const [selectedEdgeType, setSelectedEdgeType] = useState('default');
517
- const [isAnimated, setIsAnimated] = useState(false);
518
- const [strokeWidth, setStrokeWidth] = useState(2);
519
- const [strokeColor, setStrokeColor] = useState('#718096');
520
- const initialNodes = useMemo(()=>[
521
- {
522
- id: 'source',
523
- type: 'uipath.blank-node',
524
- position: {
525
- x: 200,
526
- y: 400
527
- },
528
- data: {
529
- display: {
530
- label: 'Source Node'
531
- },
532
- handleConfigurations: [
533
- {
534
- position: Position.Right,
535
- handles: [
536
- {
537
- id: 'out',
538
- type: 'source',
539
- handleType: 'output'
540
- }
541
- ]
542
- }
543
- ]
544
- }
545
- },
546
- {
547
- id: 'target',
548
- type: 'uipath.blank-node',
549
- position: {
550
- x: 600,
551
- y: 400
552
- },
553
- data: {
554
- display: {
555
- label: 'Target Node'
556
- },
557
- handleConfigurations: [
558
- {
559
- position: Position.Left,
560
- handles: [
561
- {
562
- id: 'in',
563
- type: 'target',
564
- handleType: 'input'
565
- }
566
- ]
567
- }
568
- ]
569
- }
570
- }
571
- ], []);
572
- const currentEdge = useMemo(()=>({
573
- id: 'interactive-edge',
574
- source: 'source',
575
- target: 'target',
576
- sourceHandle: 'out',
577
- targetHandle: 'in',
578
- type: 'default' === selectedEdgeType ? void 0 : selectedEdgeType,
579
- animated: isAnimated,
580
- label: `${selectedEdgeType} edge`,
581
- style: {
582
- stroke: strokeColor,
583
- strokeWidth
584
- },
585
- markerEnd: {
586
- type: MarkerType.ArrowClosed,
587
- color: strokeColor
588
- }
589
- }), [
590
- selectedEdgeType,
591
- isAnimated,
592
- strokeColor,
593
- strokeWidth
594
- ]);
595
- const { canvasProps } = useCanvasStory({
596
- initialNodes,
597
- initialEdges: [
598
- currentEdge
599
- ]
600
- });
601
- const [edges, setEdges, onEdgesChange] = useEdgesState([
602
- currentEdge
603
- ]);
604
- useEffect(()=>setEdges([
605
- currentEdge
606
- ]), [
607
- currentEdge,
608
- setEdges
609
- ]);
610
- const onConnect = useCallback((params)=>setEdges((eds)=>[
611
- ...eds,
612
- {
613
- ...params,
614
- id: `e-${Date.now()}`,
615
- type: 'default' === selectedEdgeType ? void 0 : selectedEdgeType,
616
- animated: isAnimated,
617
- style: {
618
- stroke: strokeColor,
619
- strokeWidth
620
- }
621
- }
622
- ]), [
623
- setEdges,
624
- selectedEdgeType,
625
- isAnimated,
626
- strokeColor,
627
- strokeWidth
628
- ]);
629
- return /*#__PURE__*/ jsxs(BaseCanvas, {
630
- ...canvasProps,
631
- edges: edges,
632
- onEdgesChange: onEdgesChange,
633
- onConnect: onConnect,
634
- mode: "design",
635
- children: [
636
- /*#__PURE__*/ jsx(StoryInfoPanel, {
637
- title: "Edge Configuration",
638
- children: /*#__PURE__*/ jsxs(Column, {
639
- gap: 12,
640
- style: {
641
- marginTop: 12
642
- },
643
- children: [
644
- /*#__PURE__*/ jsxs(FormControl, {
645
- size: "small",
646
- fullWidth: true,
647
- children: [
648
- /*#__PURE__*/ jsx(InputLabel, {
649
- children: "Edge type"
650
- }),
651
- /*#__PURE__*/ jsxs(Select, {
652
- value: selectedEdgeType,
653
- onChange: (e)=>setSelectedEdgeType(e.target.value),
654
- label: "Edge type",
655
- children: [
656
- /*#__PURE__*/ jsx(MenuItem, {
657
- value: "default",
658
- children: "Default (Bezier)"
659
- }),
660
- /*#__PURE__*/ jsx(MenuItem, {
661
- value: "straight",
662
- children: "Straight"
663
- }),
664
- /*#__PURE__*/ jsx(MenuItem, {
665
- value: "step",
666
- children: "Step"
667
- }),
668
- /*#__PURE__*/ jsx(MenuItem, {
669
- value: "smoothstep",
670
- children: "Smooth Step"
671
- }),
672
- /*#__PURE__*/ jsx(MenuItem, {
673
- value: "bezier",
674
- children: "Bezier"
675
- })
676
- ]
677
- })
678
- ]
679
- }),
680
- /*#__PURE__*/ jsx(FormControlLabel, {
681
- control: /*#__PURE__*/ jsx(Checkbox, {
682
- checked: isAnimated,
683
- onChange: (e)=>setIsAnimated(e.target.checked)
684
- }),
685
- label: "Animated"
686
- }),
687
- /*#__PURE__*/ jsxs(Column, {
688
- gap: 4,
689
- children: [
690
- /*#__PURE__*/ jsxs(ApTypography, {
691
- variant: FontVariantToken.fontSizeS,
692
- children: [
693
- "Stroke Width: ",
694
- strokeWidth,
695
- "px"
696
- ]
697
- }),
698
- /*#__PURE__*/ jsx("input", {
699
- type: "range",
700
- min: "1",
701
- max: "10",
702
- value: strokeWidth,
703
- onChange: (e)=>setStrokeWidth(Number(e.target.value)),
704
- style: {
705
- width: '100%'
706
- }
707
- })
708
- ]
709
- }),
710
- /*#__PURE__*/ jsxs(Column, {
711
- gap: 4,
712
- children: [
713
- /*#__PURE__*/ jsx(ApTypography, {
714
- variant: FontVariantToken.fontSizeS,
715
- children: "Stroke Color"
716
- }),
717
- /*#__PURE__*/ jsx("input", {
718
- type: "color",
719
- value: strokeColor,
720
- onChange: (e)=>setStrokeColor(e.target.value),
721
- style: {
722
- width: '100%',
723
- height: 32,
724
- borderRadius: 4,
725
- border: '1px solid var(--uix-canvas-border)',
726
- cursor: 'pointer'
727
- }
728
- })
729
- ]
730
- }),
731
- /*#__PURE__*/ jsx(ApTypography, {
732
- color: "var(--uix-canvas-foreground-de-emp)",
733
- variant: FontVariantToken.fontSizeXs,
734
- children: "Drag the nodes to see how the edge adapts."
735
- })
736
- ]
737
- })
738
- }),
739
- /*#__PURE__*/ jsx(Panel, {
740
- position: "bottom-right",
741
- children: /*#__PURE__*/ jsx(CanvasPositionControls, {
742
- translations: DefaultCanvasTranslations
743
- })
744
- })
745
- ]
746
- });
747
- }
748
- const AllEdgeTypes = {
749
- name: 'All Edge Types',
750
- render: ()=>/*#__PURE__*/ jsx(AllEdgeTypesStory, {})
751
- };
752
- const InteractiveEdgeSelection = {
753
- name: 'Interactive Edge Type',
754
- render: ()=>/*#__PURE__*/ jsx(InteractiveEdgeSelectionStory, {})
755
- };
756
- export { AllEdgeTypes, InteractiveEdgeSelection, XyFlowEdgeComparison_stories as default };