@uipath/apollo-react 3.64.0-pr431.cb6b0b8 → 3.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/canvas/components/NodePropertiesPanel/hooks/index.cjs +1 -4
  2. package/dist/canvas/components/NodePropertiesPanel/hooks/index.d.ts +1 -1
  3. package/dist/canvas/components/NodePropertiesPanel/hooks/index.d.ts.map +1 -1
  4. package/dist/canvas/components/NodePropertiesPanel/hooks/index.js +2 -2
  5. package/dist/canvas/components/NodePropertiesPanel/hooks/useNodeSelection.cjs +6 -27
  6. package/dist/canvas/components/NodePropertiesPanel/hooks/useNodeSelection.d.ts +0 -3
  7. package/dist/canvas/components/NodePropertiesPanel/hooks/useNodeSelection.d.ts.map +1 -1
  8. package/dist/canvas/components/NodePropertiesPanel/hooks/useNodeSelection.js +5 -23
  9. package/dist/canvas/components/StageNode/DraggableTask.cjs +5 -14
  10. package/dist/canvas/components/StageNode/DraggableTask.d.ts +1 -1
  11. package/dist/canvas/components/StageNode/DraggableTask.d.ts.map +1 -1
  12. package/dist/canvas/components/StageNode/DraggableTask.js +5 -14
  13. package/dist/canvas/components/StageNode/DraggableTask.types.d.ts +3 -3
  14. package/dist/canvas/components/StageNode/DraggableTask.types.d.ts.map +1 -1
  15. package/dist/canvas/components/StageNode/StageEdge.cjs +11 -34
  16. package/dist/canvas/components/StageNode/StageEdge.d.ts +1 -2
  17. package/dist/canvas/components/StageNode/StageEdge.d.ts.map +1 -1
  18. package/dist/canvas/components/StageNode/StageEdge.js +12 -35
  19. package/dist/canvas/components/StageNode/StageNode.cjs +51 -54
  20. package/dist/canvas/components/StageNode/StageNode.d.ts +1 -1
  21. package/dist/canvas/components/StageNode/StageNode.d.ts.map +1 -1
  22. package/dist/canvas/components/StageNode/StageNode.js +56 -59
  23. package/dist/canvas/components/StageNode/StageNode.stories.cjs +157 -116
  24. package/dist/canvas/components/StageNode/StageNode.stories.d.ts.map +1 -1
  25. package/dist/canvas/components/StageNode/StageNode.stories.js +153 -112
  26. package/dist/canvas/components/StageNode/StageNode.types.d.ts +2 -9
  27. package/dist/canvas/components/StageNode/StageNode.types.d.ts.map +1 -1
  28. package/dist/canvas/components/StageNode/StageNodeTaskUtilities.cjs +3 -2
  29. package/dist/canvas/components/StageNode/StageNodeTaskUtilities.d.ts +1 -1
  30. package/dist/canvas/components/StageNode/StageNodeTaskUtilities.d.ts.map +1 -1
  31. package/dist/canvas/components/StageNode/StageNodeTaskUtilities.js +3 -2
  32. package/dist/canvas/components/StageNode/TaskMenu.cjs +17 -13
  33. package/dist/canvas/components/StageNode/TaskMenu.d.ts +2 -1
  34. package/dist/canvas/components/StageNode/TaskMenu.d.ts.map +1 -1
  35. package/dist/canvas/components/StageNode/TaskMenu.js +18 -14
  36. package/package.json +1 -1
  37. package/dist/canvas/components/CanvasPerformance.stories.cjs +0 -361
  38. package/dist/canvas/components/CanvasPerformance.stories.d.ts +0 -6
  39. package/dist/canvas/components/CanvasPerformance.stories.d.ts.map +0 -1
  40. package/dist/canvas/components/CanvasPerformance.stories.js +0 -324
  41. package/dist/canvas/components/StageNode/StageNode.stories.utils.cjs +0 -42
  42. package/dist/canvas/components/StageNode/StageNode.stories.utils.d.ts +0 -3
  43. package/dist/canvas/components/StageNode/StageNode.stories.utils.d.ts.map +0 -1
  44. package/dist/canvas/components/StageNode/StageNode.stories.utils.js +0 -8
  45. package/dist/canvas/components/StageNode/StageTaskDragOverlay.cjs +0 -68
  46. package/dist/canvas/components/StageNode/StageTaskDragOverlay.d.ts +0 -3
  47. package/dist/canvas/components/StageNode/StageTaskDragOverlay.d.ts.map +0 -1
  48. package/dist/canvas/components/StageNode/StageTaskDragOverlay.js +0 -34
@@ -1,361 +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
- StageWorkflow: ()=>StageWorkflow,
28
- default: ()=>CanvasPerformance_stories
29
- });
30
- const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
- const react_cjs_namespaceObject = require("../xyflow/react.cjs");
32
- const external_react_namespaceObject = require("react");
33
- const external_types_cjs_namespaceObject = require("../types.cjs");
34
- const index_cjs_namespaceObject = require("./BaseCanvas/index.cjs");
35
- const external_CanvasPositionControls_cjs_namespaceObject = require("./CanvasPositionControls.cjs");
36
- const StageConnectionEdge_cjs_namespaceObject = require("./StageNode/StageConnectionEdge.cjs");
37
- const StageEdge_cjs_namespaceObject = require("./StageNode/StageEdge.cjs");
38
- const StageNode_stories_utils_cjs_namespaceObject = require("./StageNode/StageNode.stories.utils.cjs");
39
- const meta = {
40
- title: 'Canvas/Performance',
41
- parameters: {
42
- layout: 'fullscreen'
43
- }
44
- };
45
- const CanvasPerformance_stories = meta;
46
- const PERFORMANCE_STAGE_NODE_WIDTH = 304;
47
- const PERFORMANCE_STAGE_SPACING_X = 400;
48
- const PERFORMANCE_STAGE_SPACING_Y = 384;
49
- const DEFAULT_STAGE_COUNT = 48;
50
- const MIN_STAGE_COUNT = 1;
51
- const MAX_STAGE_COUNT = 200;
52
- const VerificationIcon = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", {
53
- viewBox: "0 0 24 24",
54
- fill: "none",
55
- stroke: "currentColor",
56
- strokeWidth: "1.5",
57
- children: [
58
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
59
- d: "M9 11L12 14L20 6"
60
- }),
61
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
62
- d: "M20 12V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4H13"
63
- })
64
- ]
65
- });
66
- const DocumentIcon = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", {
67
- viewBox: "0 0 24 24",
68
- fill: "none",
69
- stroke: "currentColor",
70
- strokeWidth: "1.5",
71
- children: [
72
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
73
- 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"
74
- }),
75
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
76
- d: "M14 2V8H20"
77
- }),
78
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
79
- d: "M8 12H16"
80
- }),
81
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
82
- d: "M8 16H16"
83
- })
84
- ]
85
- });
86
- const ProcessIcon = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", {
87
- viewBox: "0 0 24 24",
88
- fill: "none",
89
- stroke: "currentColor",
90
- strokeWidth: "1.5",
91
- children: [
92
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
93
- x: "3",
94
- y: "3",
95
- width: "7",
96
- height: "7",
97
- rx: "1"
98
- }),
99
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
100
- x: "14",
101
- y: "3",
102
- width: "7",
103
- height: "7",
104
- rx: "1"
105
- }),
106
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
107
- x: "3",
108
- y: "14",
109
- width: "7",
110
- height: "7",
111
- rx: "1"
112
- }),
113
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
114
- x: "14",
115
- y: "14",
116
- width: "7",
117
- height: "7",
118
- rx: "1"
119
- })
120
- ]
121
- });
122
- function createPerformanceStageTasks(index) {
123
- return [
124
- [
125
- {
126
- id: `stage-${index}-task-intake`,
127
- label: 'Intake Review',
128
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
129
- }
130
- ],
131
- [
132
- {
133
- id: `stage-${index}-task-documents`,
134
- label: 'Document Processing',
135
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {})
136
- }
137
- ],
138
- [
139
- {
140
- id: `stage-${index}-task-risk`,
141
- label: 'Risk Assessment',
142
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
143
- },
144
- {
145
- id: `stage-${index}-task-policy`,
146
- label: 'Policy Validation',
147
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {})
148
- }
149
- ],
150
- [
151
- {
152
- id: `stage-${index}-task-review`,
153
- label: 'Final Review',
154
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
155
- }
156
- ]
157
- ];
158
- }
159
- function createPerformanceStageNodes(stageCount) {
160
- const columns = Math.ceil(Math.sqrt(stageCount));
161
- return Array.from({
162
- length: stageCount
163
- }, (_, index)=>{
164
- const row = Math.floor(index / columns);
165
- const col = index % columns;
166
- const stageId = `performance-stage-${index}`;
167
- return {
168
- id: stageId,
169
- type: 'stage',
170
- position: {
171
- x: col * PERFORMANCE_STAGE_SPACING_X,
172
- y: row * PERFORMANCE_STAGE_SPACING_Y
173
- },
174
- width: PERFORMANCE_STAGE_NODE_WIDTH,
175
- data: {
176
- stageDetails: {
177
- label: `Performance Stage ${index + 1}`,
178
- tasks: createPerformanceStageTasks(index)
179
- },
180
- execution: {
181
- stageStatus: {
182
- duration: `SLA: ${30 + index % 5 * 15}m`
183
- }
184
- }
185
- }
186
- };
187
- });
188
- }
189
- function createPerformanceStageEdges(stageCount) {
190
- const columns = Math.ceil(Math.sqrt(stageCount));
191
- const edges = [];
192
- for(let index = 0; index < stageCount; index++){
193
- const col = index % columns;
194
- const sourceId = `performance-stage-${index}`;
195
- const rightIndex = index + 1;
196
- if (col < columns - 1 && rightIndex < stageCount) {
197
- const targetId = `performance-stage-${rightIndex}`;
198
- edges.push({
199
- id: `performance-edge-right-${index}`,
200
- type: 'stage',
201
- source: sourceId,
202
- sourceHandle: `${sourceId}____source____right`,
203
- target: targetId,
204
- targetHandle: `${targetId}____target____left`
205
- });
206
- }
207
- const downIndex = index + columns;
208
- if (downIndex < stageCount) {
209
- const targetId = `performance-stage-${downIndex}`;
210
- edges.push({
211
- id: `performance-edge-down-${index}`,
212
- type: 'stage',
213
- source: sourceId,
214
- sourceHandle: `${sourceId}____source____bottom`,
215
- target: targetId,
216
- targetHandle: `${targetId}____target____top`
217
- });
218
- }
219
- }
220
- return edges;
221
- }
222
- const CanvasPerformanceStory = ()=>{
223
- const nodeTypes = (0, external_react_namespaceObject.useMemo)(()=>({
224
- stage: StageNode_stories_utils_cjs_namespaceObject.StageNodeWrapper
225
- }), []);
226
- const edgeTypes = (0, external_react_namespaceObject.useMemo)(()=>({
227
- stage: StageEdge_cjs_namespaceObject.StageEdge
228
- }), []);
229
- const defaultEdgeOptions = (0, external_react_namespaceObject.useMemo)(()=>({
230
- type: 'stage'
231
- }), []);
232
- const [stageCount, setStageCount] = (0, external_react_namespaceObject.useState)(DEFAULT_STAGE_COUNT);
233
- const [nodes, setNodes, onNodesChange] = (0, react_cjs_namespaceObject.useNodesState)(createPerformanceStageNodes(DEFAULT_STAGE_COUNT));
234
- const [edges, setEdges, onEdgesChange] = (0, react_cjs_namespaceObject.useEdgesState)(createPerformanceStageEdges(DEFAULT_STAGE_COUNT));
235
- const onConnect = (0, external_react_namespaceObject.useCallback)((connection)=>setEdges((eds)=>(0, react_cjs_namespaceObject.addEdge)(connection, eds)), [
236
- setEdges
237
- ]);
238
- const handleStageCountChange = (0, external_react_namespaceObject.useCallback)((e)=>{
239
- const nextCount = Number.parseInt(e.target.value, 10);
240
- setStageCount(nextCount);
241
- setNodes(createPerformanceStageNodes(nextCount));
242
- setEdges(createPerformanceStageEdges(nextCount));
243
- }, [
244
- setEdges,
245
- setNodes
246
- ]);
247
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
248
- style: {
249
- width: '100vw',
250
- height: '100vh'
251
- },
252
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.ReactFlowProvider, {
253
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.BaseCanvas, {
254
- nodes: nodes,
255
- edges: edges,
256
- onNodesChange: onNodesChange,
257
- onEdgesChange: onEdgesChange,
258
- onConnect: onConnect,
259
- nodeTypes: nodeTypes,
260
- edgeTypes: edgeTypes,
261
- mode: "design",
262
- connectionMode: react_cjs_namespaceObject.ConnectionMode.Strict,
263
- defaultEdgeOptions: defaultEdgeOptions,
264
- connectionLineComponent: StageConnectionEdge_cjs_namespaceObject.StageConnectionEdge,
265
- elevateEdgesOnSelect: true,
266
- children: [
267
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.Panel, {
268
- position: "top-left",
269
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
270
- className: "nodrag nopan nowheel",
271
- style: {
272
- width: 240,
273
- background: 'var(--uix-canvas-background)',
274
- border: '1px solid var(--uix-canvas-border-de-emp)',
275
- borderRadius: 16,
276
- padding: 16,
277
- boxShadow: '0 8px 32px rgba(15, 23, 42, 0.08)'
278
- },
279
- children: [
280
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
281
- style: {
282
- fontWeight: 600,
283
- fontSize: 14
284
- },
285
- children: "Performance Test"
286
- }),
287
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
288
- style: {
289
- marginTop: 6,
290
- color: 'var(--uix-canvas-foreground-de-emp)',
291
- fontSize: 12,
292
- lineHeight: 1.4
293
- },
294
- children: "Adjust the number of stage nodes to profile drag and pan performance."
295
- }),
296
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
297
- style: {
298
- display: 'flex',
299
- justifyContent: 'space-between',
300
- alignItems: 'center',
301
- marginTop: 12,
302
- marginBottom: 8,
303
- fontSize: 12
304
- },
305
- children: [
306
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
307
- children: "Stage Count"
308
- }),
309
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("strong", {
310
- style: {
311
- fontSize: 14
312
- },
313
- children: stageCount
314
- })
315
- ]
316
- }),
317
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("input", {
318
- type: "range",
319
- min: MIN_STAGE_COUNT,
320
- max: MAX_STAGE_COUNT,
321
- value: stageCount,
322
- onChange: handleStageCountChange,
323
- style: {
324
- width: '100%',
325
- cursor: 'pointer'
326
- }
327
- })
328
- ]
329
- })
330
- }),
331
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.Panel, {
332
- position: "bottom-right",
333
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasPositionControls_cjs_namespaceObject.CanvasPositionControls, {
334
- translations: external_types_cjs_namespaceObject.DefaultCanvasTranslations
335
- })
336
- })
337
- ]
338
- })
339
- })
340
- });
341
- };
342
- const StageWorkflow = {
343
- name: 'Stage Workflow',
344
- parameters: {
345
- docs: {
346
- description: {
347
- story: 'Standalone performance story with adjustable stage count. Use this to profile stage workflow drag and pan behavior under load.'
348
- }
349
- }
350
- },
351
- render: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(CanvasPerformanceStory, {})
352
- };
353
- exports.StageWorkflow = __webpack_exports__.StageWorkflow;
354
- exports["default"] = __webpack_exports__["default"];
355
- for(var __rspack_i in __webpack_exports__)if (-1 === [
356
- "StageWorkflow",
357
- "default"
358
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
359
- Object.defineProperty(exports, '__esModule', {
360
- value: true
361
- });
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- declare const meta: Meta;
3
- export default meta;
4
- type Story = StoryObj<typeof meta>;
5
- export declare const StageWorkflow: Story;
6
- //# sourceMappingURL=CanvasPerformance.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CanvasPerformance.stories.d.ts","sourceRoot":"","sources":["../../../src/canvas/components/CanvasPerformance.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAmBvD,QAAA,MAAM,IAAI,EAAE,IAKX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAgPnC,eAAO,MAAM,aAAa,EAAE,KAW3B,CAAC"}