@uipath/apollo-react 3.62.0-pr418.fccf75c → 3.62.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.
- package/dist/canvas/components/StageNode/StageNode.cjs +2 -0
- package/dist/canvas/components/StageNode/StageNode.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.js +2 -0
- package/dist/canvas/components/StageNode/StageNode.stories.cjs +27 -3
- package/dist/canvas/components/StageNode/StageNode.stories.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.stories.js +28 -4
- package/dist/canvas/icons/CaseManagementProject.cjs +18 -9
- package/dist/canvas/icons/CaseManagementProject.d.ts.map +1 -1
- package/dist/canvas/icons/CaseManagementProject.js +18 -9
- package/package.json +1 -1
|
@@ -483,11 +483,13 @@ const StageNodeComponent = (props)=>{
|
|
|
483
483
|
(onTaskAdd || onAddTaskFromToolbox) && !isReadOnly && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTooltip, {
|
|
484
484
|
content: addTaskLabel,
|
|
485
485
|
placement: "top",
|
|
486
|
+
hide: addTaskLoading,
|
|
486
487
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
487
488
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApIconButton, {
|
|
488
489
|
onClick: handleTaskAddClick,
|
|
489
490
|
size: "small",
|
|
490
491
|
label: addTaskLabel,
|
|
492
|
+
disabled: addTaskLoading,
|
|
491
493
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApIcon, {
|
|
492
494
|
name: "add",
|
|
493
495
|
size: "20px"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA2pBxD,eAAO,MAAM,SAAS,8CAjpBa,cAAc,6CAipBA,CAAC"}
|
|
@@ -455,11 +455,13 @@ const StageNodeComponent = (props)=>{
|
|
|
455
455
|
(onTaskAdd || onAddTaskFromToolbox) && !isReadOnly && /*#__PURE__*/ jsx(ApTooltip, {
|
|
456
456
|
content: addTaskLabel,
|
|
457
457
|
placement: "top",
|
|
458
|
+
hide: addTaskLoading,
|
|
458
459
|
children: /*#__PURE__*/ jsx("span", {
|
|
459
460
|
children: /*#__PURE__*/ jsx(ApIconButton, {
|
|
460
461
|
onClick: handleTaskAddClick,
|
|
461
462
|
size: "small",
|
|
462
463
|
label: addTaskLabel,
|
|
464
|
+
disabled: addTaskLoading,
|
|
463
465
|
children: /*#__PURE__*/ jsx(ApIcon, {
|
|
464
466
|
name: "add",
|
|
465
467
|
size: "20px"
|
|
@@ -1968,7 +1968,7 @@ const AddTaskLoadingStory = ()=>{
|
|
|
1968
1968
|
width: 304,
|
|
1969
1969
|
data: {
|
|
1970
1970
|
stageDetails: {
|
|
1971
|
-
label: '
|
|
1971
|
+
label: 'Loading (+ disabled for 3s)',
|
|
1972
1972
|
tasks: []
|
|
1973
1973
|
},
|
|
1974
1974
|
addTaskLoading: true,
|
|
@@ -2018,16 +2018,40 @@ const AddTaskLoadingStory = ()=>{
|
|
|
2018
2018
|
}, [
|
|
2019
2019
|
setNodes
|
|
2020
2020
|
]);
|
|
2021
|
+
const timeoutRef = (0, external_react_namespaceObject.useRef)(void 0);
|
|
2022
|
+
(0, external_react_namespaceObject.useEffect)(()=>()=>clearTimeout(timeoutRef.current), []);
|
|
2023
|
+
const handleAddTaskFromToolbox = (0, external_react_namespaceObject.useCallback)((nodeId, _taskItem)=>{
|
|
2024
|
+
clearTimeout(timeoutRef.current);
|
|
2025
|
+
setNodes((nds)=>nds.map((n)=>n.id === nodeId ? {
|
|
2026
|
+
...n,
|
|
2027
|
+
data: {
|
|
2028
|
+
...n.data,
|
|
2029
|
+
addTaskLoading: true
|
|
2030
|
+
}
|
|
2031
|
+
} : n));
|
|
2032
|
+
timeoutRef.current = setTimeout(()=>{
|
|
2033
|
+
setNodes((nds)=>nds.map((n)=>n.id === nodeId ? {
|
|
2034
|
+
...n,
|
|
2035
|
+
data: {
|
|
2036
|
+
...n.data,
|
|
2037
|
+
addTaskLoading: false
|
|
2038
|
+
}
|
|
2039
|
+
} : n));
|
|
2040
|
+
}, 2000);
|
|
2041
|
+
}, [
|
|
2042
|
+
setNodes
|
|
2043
|
+
]);
|
|
2021
2044
|
const nodesWithHandler = (0, external_react_namespaceObject.useMemo)(()=>nodesState.map((node)=>({
|
|
2022
2045
|
...node,
|
|
2023
2046
|
data: {
|
|
2024
2047
|
...node.data,
|
|
2025
2048
|
onAddTaskFromToolbox: (taskItem)=>{
|
|
2026
|
-
|
|
2049
|
+
handleAddTaskFromToolbox(node.id, taskItem);
|
|
2027
2050
|
}
|
|
2028
2051
|
}
|
|
2029
2052
|
})), [
|
|
2030
|
-
nodesState
|
|
2053
|
+
nodesState,
|
|
2054
|
+
handleAddTaskFromToolbox
|
|
2031
2055
|
]);
|
|
2032
2056
|
const onConnect = (0, external_react_namespaceObject.useCallback)((connection)=>setEdges((eds)=>(0, react_cjs_namespaceObject.addEdge)(connection, eds)), [
|
|
2033
2057
|
setEdges
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAyBvD,OAAO,EAAE,SAAS,EAAE,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AE,KAOhC,CAAC;AA2HF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AA0KF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAiHxB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ConnectionMode, Panel, ReactFlowProvider, addEdge, useEdgesState, useNodesState } from "../../xyflow/react.js";
|
|
3
3
|
import { ApButton, ApMenu } from "../../../material/components/index.js";
|
|
4
|
-
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
4
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { DefaultCanvasTranslations } from "../../types.js";
|
|
6
6
|
import { createGroupModificationHandlers, getHandlerForModificationType } from "../../utils/GroupModificationUtils.js";
|
|
7
7
|
import { BaseCanvas } from "../BaseCanvas/index.js";
|
|
@@ -1930,7 +1930,7 @@ const AddTaskLoadingStory = ()=>{
|
|
|
1930
1930
|
width: 304,
|
|
1931
1931
|
data: {
|
|
1932
1932
|
stageDetails: {
|
|
1933
|
-
label: '
|
|
1933
|
+
label: 'Loading (+ disabled for 3s)',
|
|
1934
1934
|
tasks: []
|
|
1935
1935
|
},
|
|
1936
1936
|
addTaskLoading: true,
|
|
@@ -1980,16 +1980,40 @@ const AddTaskLoadingStory = ()=>{
|
|
|
1980
1980
|
}, [
|
|
1981
1981
|
setNodes
|
|
1982
1982
|
]);
|
|
1983
|
+
const timeoutRef = useRef(void 0);
|
|
1984
|
+
useEffect(()=>()=>clearTimeout(timeoutRef.current), []);
|
|
1985
|
+
const handleAddTaskFromToolbox = useCallback((nodeId, _taskItem)=>{
|
|
1986
|
+
clearTimeout(timeoutRef.current);
|
|
1987
|
+
setNodes((nds)=>nds.map((n)=>n.id === nodeId ? {
|
|
1988
|
+
...n,
|
|
1989
|
+
data: {
|
|
1990
|
+
...n.data,
|
|
1991
|
+
addTaskLoading: true
|
|
1992
|
+
}
|
|
1993
|
+
} : n));
|
|
1994
|
+
timeoutRef.current = setTimeout(()=>{
|
|
1995
|
+
setNodes((nds)=>nds.map((n)=>n.id === nodeId ? {
|
|
1996
|
+
...n,
|
|
1997
|
+
data: {
|
|
1998
|
+
...n.data,
|
|
1999
|
+
addTaskLoading: false
|
|
2000
|
+
}
|
|
2001
|
+
} : n));
|
|
2002
|
+
}, 2000);
|
|
2003
|
+
}, [
|
|
2004
|
+
setNodes
|
|
2005
|
+
]);
|
|
1983
2006
|
const nodesWithHandler = useMemo(()=>nodesState.map((node)=>({
|
|
1984
2007
|
...node,
|
|
1985
2008
|
data: {
|
|
1986
2009
|
...node.data,
|
|
1987
2010
|
onAddTaskFromToolbox: (taskItem)=>{
|
|
1988
|
-
|
|
2011
|
+
handleAddTaskFromToolbox(node.id, taskItem);
|
|
1989
2012
|
}
|
|
1990
2013
|
}
|
|
1991
2014
|
})), [
|
|
1992
|
-
nodesState
|
|
2015
|
+
nodesState,
|
|
2016
|
+
handleAddTaskFromToolbox
|
|
1993
2017
|
]);
|
|
1994
2018
|
const onConnect = useCallback((connection)=>setEdges((eds)=>addEdge(connection, eds)), [
|
|
1995
2019
|
setEdges
|
|
@@ -33,22 +33,31 @@ const CaseManagementProject = ({ w = 22, h = 22 })=>/*#__PURE__*/ (0, jsx_runtim
|
|
|
33
33
|
width: w,
|
|
34
34
|
height: h,
|
|
35
35
|
fill: "none",
|
|
36
|
-
viewBox: "0 0
|
|
36
|
+
viewBox: "0 0 16 16",
|
|
37
37
|
children: [
|
|
38
38
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
39
|
+
fill: "currentColor",
|
|
40
|
+
fillRule: "evenodd",
|
|
41
|
+
clipRule: "evenodd",
|
|
42
|
+
d: "M1.09 3.818 3.075 1.53c.242-.279.593-.44.962-.44h7.928c.37 0 .72.161.962.44l1.983 2.288v9.818c0 .703-.57 1.273-1.273 1.273H2.364c-.703 0-1.273-.57-1.273-1.273zm2.946-1.636h7.928c.053 0 .103.023.138.063l.89 1.028H3.008l.891-1.028a.18.18 0 0 1 .138-.063m9.782 2.182H2.182v9.272c0 .1.081.182.182.182h11.272c.1 0 .182-.081.182-.182z"
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
45
|
+
fill: "currentColor",
|
|
46
|
+
d: "M4.833 12.45a.83.83 0 0 1-.588-.23.73.73 0 0 1-.245-.554V7.353q0-.324.245-.554a.83.83 0 0 1 .588-.23H6.5v-.785q0-.323.245-.554A.83.83 0 0 1 7.333 5H9q.344 0 .589.23a.73.73 0 0 1 .244.554v.784H11.5q.344 0 .588.23a.73.73 0 0 1 .245.555v4.313q0 .323-.245.554a.83.83 0 0 1-.588.23zm0-.784H11.5V7.353H4.833zm2.5-5.098H9v-.784H7.333z"
|
|
44
47
|
}),
|
|
45
48
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
46
49
|
fill: "currentColor",
|
|
47
|
-
d: "
|
|
50
|
+
d: "M4.417 8.529h7.5v.784h-7.5z"
|
|
48
51
|
}),
|
|
49
52
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
stroke: "currentColor",
|
|
54
|
+
strokeWidth: ".15",
|
|
55
|
+
d: "M4.833 12.45a.83.83 0 0 1-.588-.23.73.73 0 0 1-.245-.554V7.353q0-.324.245-.554a.83.83 0 0 1 .588-.23H6.5v-.785q0-.323.245-.554A.83.83 0 0 1 7.333 5H9q.344 0 .589.23a.73.73 0 0 1 .244.554v.784H11.5q.344 0 .588.23a.73.73 0 0 1 .245.555v4.313q0 .323-.245.554a.83.83 0 0 1-.588.23zm0-.784H11.5V7.353H4.833zm2.5-5.098H9v-.784H7.333z"
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
58
|
+
stroke: "currentColor",
|
|
59
|
+
strokeWidth: ".15",
|
|
60
|
+
d: "M4.417 8.529h7.5v.784h-7.5z"
|
|
52
61
|
})
|
|
53
62
|
]
|
|
54
63
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseManagementProject.d.ts","sourceRoot":"","sources":["../../../src/canvas/icons/CaseManagementProject.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,GAAI,WAGnC;IACD,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB,
|
|
1
|
+
{"version":3,"file":"CaseManagementProject.d.ts","sourceRoot":"","sources":["../../../src/canvas/icons/CaseManagementProject.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,GAAI,WAGnC;IACD,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB,4CA2BA,CAAC"}
|
|
@@ -5,22 +5,31 @@ const CaseManagementProject = ({ w = 22, h = 22 })=>/*#__PURE__*/ jsxs("svg", {
|
|
|
5
5
|
width: w,
|
|
6
6
|
height: h,
|
|
7
7
|
fill: "none",
|
|
8
|
-
viewBox: "0 0
|
|
8
|
+
viewBox: "0 0 16 16",
|
|
9
9
|
children: [
|
|
10
10
|
/*#__PURE__*/ jsx("path", {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
fillRule: "evenodd",
|
|
13
|
+
clipRule: "evenodd",
|
|
14
|
+
d: "M1.09 3.818 3.075 1.53c.242-.279.593-.44.962-.44h7.928c.37 0 .72.161.962.44l1.983 2.288v9.818c0 .703-.57 1.273-1.273 1.273H2.364c-.703 0-1.273-.57-1.273-1.273zm2.946-1.636h7.928c.053 0 .103.023.138.063l.89 1.028H3.008l.891-1.028a.18.18 0 0 1 .138-.063m9.782 2.182H2.182v9.272c0 .1.081.182.182.182h11.272c.1 0 .182-.081.182-.182z"
|
|
15
|
+
}),
|
|
16
|
+
/*#__PURE__*/ jsx("path", {
|
|
17
|
+
fill: "currentColor",
|
|
18
|
+
d: "M4.833 12.45a.83.83 0 0 1-.588-.23.73.73 0 0 1-.245-.554V7.353q0-.324.245-.554a.83.83 0 0 1 .588-.23H6.5v-.785q0-.323.245-.554A.83.83 0 0 1 7.333 5H9q.344 0 .589.23a.73.73 0 0 1 .244.554v.784H11.5q.344 0 .588.23a.73.73 0 0 1 .245.555v4.313q0 .323-.245.554a.83.83 0 0 1-.588.23zm0-.784H11.5V7.353H4.833zm2.5-5.098H9v-.784H7.333z"
|
|
16
19
|
}),
|
|
17
20
|
/*#__PURE__*/ jsx("path", {
|
|
18
21
|
fill: "currentColor",
|
|
19
|
-
d: "
|
|
22
|
+
d: "M4.417 8.529h7.5v.784h-7.5z"
|
|
20
23
|
}),
|
|
21
24
|
/*#__PURE__*/ jsx("path", {
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
stroke: "currentColor",
|
|
26
|
+
strokeWidth: ".15",
|
|
27
|
+
d: "M4.833 12.45a.83.83 0 0 1-.588-.23.73.73 0 0 1-.245-.554V7.353q0-.324.245-.554a.83.83 0 0 1 .588-.23H6.5v-.785q0-.323.245-.554A.83.83 0 0 1 7.333 5H9q.344 0 .589.23a.73.73 0 0 1 .244.554v.784H11.5q.344 0 .588.23a.73.73 0 0 1 .245.555v4.313q0 .323-.245.554a.83.83 0 0 1-.588.23zm0-.784H11.5V7.353H4.833zm2.5-5.098H9v-.784H7.333z"
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ jsx("path", {
|
|
30
|
+
stroke: "currentColor",
|
|
31
|
+
strokeWidth: ".15",
|
|
32
|
+
d: "M4.417 8.529h7.5v.784h-7.5z"
|
|
24
33
|
})
|
|
25
34
|
]
|
|
26
35
|
});
|