@uipath/apollo-react 3.36.0 → 3.36.1-pr238.264661b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas/components/BaseNode/BaseNode.cjs +7 -0
- package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.js +7 -0
- package/dist/canvas/components/BaseNode/BaseNode.stories.cjs +4 -4
- package/dist/canvas/components/BaseNode/BaseNode.stories.js +4 -4
- package/dist/canvas/utils/collapse.cjs +9 -2
- package/dist/canvas/utils/collapse.d.ts +7 -0
- package/dist/canvas/utils/collapse.d.ts.map +1 -1
- package/dist/canvas/utils/collapse.js +5 -1
- package/dist/canvas/utils/manifest-resolver.cjs +2 -2
- package/dist/canvas/utils/manifest-resolver.js +2 -2
- package/package.json +1 -1
|
@@ -160,6 +160,13 @@ const BaseNodeComponent = (props)=>{
|
|
|
160
160
|
}, [
|
|
161
161
|
handleConfigurations
|
|
162
162
|
]);
|
|
163
|
+
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
164
|
+
updateNodeInternals(id);
|
|
165
|
+
}, [
|
|
166
|
+
handleConfigurations,
|
|
167
|
+
id,
|
|
168
|
+
updateNodeInternals
|
|
169
|
+
]);
|
|
163
170
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
164
171
|
if (!originalHeightRef.current && height) {
|
|
165
172
|
originalHeightRef.current = height;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,0CAA0C,CAAC;AAiChG,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,0CAA0C,CAAC;AAiChG,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,CAAC;AAwgB1B,eAAO,MAAM,QAAQ,8CAlgBa,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,6CAkgBhB,CAAC"}
|
|
@@ -132,6 +132,13 @@ const BaseNodeComponent = (props)=>{
|
|
|
132
132
|
}, [
|
|
133
133
|
handleConfigurations
|
|
134
134
|
]);
|
|
135
|
+
useEffect(()=>{
|
|
136
|
+
updateNodeInternals(id);
|
|
137
|
+
}, [
|
|
138
|
+
handleConfigurations,
|
|
139
|
+
id,
|
|
140
|
+
updateNodeInternals
|
|
141
|
+
]);
|
|
135
142
|
useEffect(()=>{
|
|
136
143
|
if (!originalHeightRef.current && height) {
|
|
137
144
|
originalHeightRef.current = height;
|
|
@@ -186,7 +186,7 @@ const sampleManifest = {
|
|
|
186
186
|
type: 'target',
|
|
187
187
|
handleType: 'input',
|
|
188
188
|
label: '{item.label}',
|
|
189
|
-
repeat: 'dynamicInputs'
|
|
189
|
+
repeat: 'inputs.dynamicInputs'
|
|
190
190
|
}
|
|
191
191
|
]
|
|
192
192
|
},
|
|
@@ -198,14 +198,14 @@ const sampleManifest = {
|
|
|
198
198
|
type: 'source',
|
|
199
199
|
handleType: 'output',
|
|
200
200
|
label: '{item.name}',
|
|
201
|
-
repeat: 'dynamicOutputs'
|
|
201
|
+
repeat: 'inputs.dynamicOutputs'
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
id: 'default',
|
|
205
205
|
type: 'source',
|
|
206
206
|
handleType: 'output',
|
|
207
207
|
label: 'Default Output',
|
|
208
|
-
visible: 'hasDefault'
|
|
208
|
+
visible: 'inputs.hasDefault'
|
|
209
209
|
}
|
|
210
210
|
]
|
|
211
211
|
},
|
|
@@ -217,7 +217,7 @@ const sampleManifest = {
|
|
|
217
217
|
type: 'source',
|
|
218
218
|
handleType: 'artifact',
|
|
219
219
|
label: 'Artifact {index}: {item.type}',
|
|
220
|
-
repeat: 'artifacts'
|
|
220
|
+
repeat: 'inputs.artifacts'
|
|
221
221
|
}
|
|
222
222
|
]
|
|
223
223
|
}
|
|
@@ -155,7 +155,7 @@ const sampleManifest = {
|
|
|
155
155
|
type: 'target',
|
|
156
156
|
handleType: 'input',
|
|
157
157
|
label: '{item.label}',
|
|
158
|
-
repeat: 'dynamicInputs'
|
|
158
|
+
repeat: 'inputs.dynamicInputs'
|
|
159
159
|
}
|
|
160
160
|
]
|
|
161
161
|
},
|
|
@@ -167,14 +167,14 @@ const sampleManifest = {
|
|
|
167
167
|
type: 'source',
|
|
168
168
|
handleType: 'output',
|
|
169
169
|
label: '{item.name}',
|
|
170
|
-
repeat: 'dynamicOutputs'
|
|
170
|
+
repeat: 'inputs.dynamicOutputs'
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
id: 'default',
|
|
174
174
|
type: 'source',
|
|
175
175
|
handleType: 'output',
|
|
176
176
|
label: 'Default Output',
|
|
177
|
-
visible: 'hasDefault'
|
|
177
|
+
visible: 'inputs.hasDefault'
|
|
178
178
|
}
|
|
179
179
|
]
|
|
180
180
|
},
|
|
@@ -186,7 +186,7 @@ const sampleManifest = {
|
|
|
186
186
|
type: 'source',
|
|
187
187
|
handleType: 'artifact',
|
|
188
188
|
label: 'Artifact {index}: {item.type}',
|
|
189
|
-
repeat: 'artifacts'
|
|
189
|
+
repeat: 'inputs.artifacts'
|
|
190
190
|
}
|
|
191
191
|
]
|
|
192
192
|
}
|
|
@@ -27,7 +27,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
COLLAPSED_NODE_SIZE: ()=>COLLAPSED_NODE_SIZE,
|
|
28
28
|
getCollapsedShape: ()=>getCollapsedShape,
|
|
29
29
|
getCollapsedSize: ()=>getCollapsedSize,
|
|
30
|
-
getExpandedShape: ()=>getExpandedShape
|
|
30
|
+
getExpandedShape: ()=>getExpandedShape,
|
|
31
|
+
getExpandedSize: ()=>getExpandedSize
|
|
31
32
|
});
|
|
32
33
|
const COLLAPSED_NODE_SIZE = 96;
|
|
33
34
|
const getCollapsedShape = (originalShape)=>{
|
|
@@ -39,15 +40,21 @@ const getExpandedShape = (collapsedShape)=>{
|
|
|
39
40
|
return 'square' === shape ? 'rectangle' : shape;
|
|
40
41
|
};
|
|
41
42
|
const getCollapsedSize = (width, height, measured)=>height ?? measured?.height ?? width ?? measured?.width ?? COLLAPSED_NODE_SIZE;
|
|
43
|
+
const getExpandedSize = (width, height, measured)=>({
|
|
44
|
+
width: width ?? measured?.width ?? COLLAPSED_NODE_SIZE,
|
|
45
|
+
height: height ?? measured?.height ?? COLLAPSED_NODE_SIZE
|
|
46
|
+
});
|
|
42
47
|
exports.COLLAPSED_NODE_SIZE = __webpack_exports__.COLLAPSED_NODE_SIZE;
|
|
43
48
|
exports.getCollapsedShape = __webpack_exports__.getCollapsedShape;
|
|
44
49
|
exports.getCollapsedSize = __webpack_exports__.getCollapsedSize;
|
|
45
50
|
exports.getExpandedShape = __webpack_exports__.getExpandedShape;
|
|
51
|
+
exports.getExpandedSize = __webpack_exports__.getExpandedSize;
|
|
46
52
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
47
53
|
"COLLAPSED_NODE_SIZE",
|
|
48
54
|
"getCollapsedShape",
|
|
49
55
|
"getCollapsedSize",
|
|
50
|
-
"getExpandedShape"
|
|
56
|
+
"getExpandedShape",
|
|
57
|
+
"getExpandedSize"
|
|
51
58
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
52
59
|
Object.defineProperty(exports, '__esModule', {
|
|
53
60
|
value: true
|
|
@@ -6,4 +6,11 @@ export declare const getCollapsedSize: (width: number | undefined, height: numbe
|
|
|
6
6
|
width?: number;
|
|
7
7
|
height?: number;
|
|
8
8
|
}) => number;
|
|
9
|
+
export declare const getExpandedSize: (width: number | undefined, height: number | undefined, measured?: {
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
}) => {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
};
|
|
9
16
|
//# sourceMappingURL=collapse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/collapse.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAK3D,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAMtC,eAAO,MAAM,iBAAiB,GAAI,eAAe,SAAS,GAAG,SAAS,KAAG,SAGxE,CAAC;AAOF,eAAO,MAAM,gBAAgB,GAAI,gBAAgB,SAAS,GAAG,SAAS,KAAG,SAGxE,CAAC;AAMF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,GAAG,SAAS,EACzB,QAAQ,MAAM,GAAG,SAAS,EAC1B,WAAW;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC7C,MAEF,CAAC"}
|
|
1
|
+
{"version":3,"file":"collapse.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/collapse.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAK3D,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAMtC,eAAO,MAAM,iBAAiB,GAAI,eAAe,SAAS,GAAG,SAAS,KAAG,SAGxE,CAAC;AAOF,eAAO,MAAM,gBAAgB,GAAI,gBAAgB,SAAS,GAAG,SAAS,KAAG,SAGxE,CAAC;AAMF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,GAAG,SAAS,EACzB,QAAQ,MAAM,GAAG,SAAS,EAC1B,WAAW;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC7C,MAEF,CAAC;AAOF,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,GAAG,SAAS,EACzB,QAAQ,MAAM,GAAG,SAAS,EAC1B,WAAW;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC7C;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAKjC,CAAC"}
|
|
@@ -8,4 +8,8 @@ const getExpandedShape = (collapsedShape)=>{
|
|
|
8
8
|
return 'square' === shape ? 'rectangle' : shape;
|
|
9
9
|
};
|
|
10
10
|
const getCollapsedSize = (width, height, measured)=>height ?? measured?.height ?? width ?? measured?.width ?? COLLAPSED_NODE_SIZE;
|
|
11
|
-
|
|
11
|
+
const getExpandedSize = (width, height, measured)=>({
|
|
12
|
+
width: width ?? measured?.width ?? COLLAPSED_NODE_SIZE,
|
|
13
|
+
height: height ?? measured?.height ?? COLLAPSED_NODE_SIZE
|
|
14
|
+
});
|
|
15
|
+
export { COLLAPSED_NODE_SIZE, getCollapsedShape, getCollapsedSize, getExpandedShape, getExpandedSize };
|
|
@@ -50,7 +50,7 @@ function resolveVisibility(visible, context) {
|
|
|
50
50
|
if (void 0 === visible) return true;
|
|
51
51
|
if ('boolean' == typeof visible) return visible;
|
|
52
52
|
if ('string' == typeof visible) {
|
|
53
|
-
const value = getPropertyByPath(context
|
|
53
|
+
const value = getPropertyByPath(context, visible);
|
|
54
54
|
return Boolean(value);
|
|
55
55
|
}
|
|
56
56
|
return true;
|
|
@@ -69,7 +69,7 @@ function resolveHandles(handleGroups, context) {
|
|
|
69
69
|
const handleBaseVisible = resolveVisibility(handle.visible, context);
|
|
70
70
|
const handleVisible = isCollapsed && isArtifactHandle ? false : handleBaseVisible;
|
|
71
71
|
if (handle.repeat) {
|
|
72
|
-
const array = getPropertyByPath(context
|
|
72
|
+
const array = getPropertyByPath(context, handle.repeat);
|
|
73
73
|
if (!Array.isArray(array)) {
|
|
74
74
|
console.warn(`Repeat expression "${handle.repeat}" did not resolve to an array. Skipping handle.`);
|
|
75
75
|
return [];
|
|
@@ -19,7 +19,7 @@ function resolveVisibility(visible, context) {
|
|
|
19
19
|
if (void 0 === visible) return true;
|
|
20
20
|
if ('boolean' == typeof visible) return visible;
|
|
21
21
|
if ('string' == typeof visible) {
|
|
22
|
-
const value = getPropertyByPath(context
|
|
22
|
+
const value = getPropertyByPath(context, visible);
|
|
23
23
|
return Boolean(value);
|
|
24
24
|
}
|
|
25
25
|
return true;
|
|
@@ -38,7 +38,7 @@ function resolveHandles(handleGroups, context) {
|
|
|
38
38
|
const handleBaseVisible = resolveVisibility(handle.visible, context);
|
|
39
39
|
const handleVisible = isCollapsed && isArtifactHandle ? false : handleBaseVisible;
|
|
40
40
|
if (handle.repeat) {
|
|
41
|
-
const array = getPropertyByPath(context
|
|
41
|
+
const array = getPropertyByPath(context, handle.repeat);
|
|
42
42
|
if (!Array.isArray(array)) {
|
|
43
43
|
console.warn(`Repeat expression "${handle.repeat}" did not resolve to an array. Skipping handle.`);
|
|
44
44
|
return [];
|