@uipath/apollo-react 7.15.3 → 7.16.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.
- package/dist/canvas/components/Edges/CanvasEdge.cjs +4 -2
- package/dist/canvas/components/Edges/CanvasEdge.d.ts.map +1 -1
- package/dist/canvas/components/Edges/CanvasEdge.js +4 -2
- package/dist/canvas/components/Edges/shared/hooks/useEdgeGeometry.cjs +8 -3
- package/dist/canvas/components/Edges/shared/hooks/useEdgeGeometry.d.ts +2 -0
- package/dist/canvas/components/Edges/shared/hooks/useEdgeGeometry.d.ts.map +1 -1
- package/dist/canvas/components/Edges/shared/hooks/useEdgeGeometry.js +9 -4
- package/dist/canvas/components/Edges/shared/hooks/useWaypointEditor.cjs +63 -37
- package/dist/canvas/components/Edges/shared/hooks/useWaypointEditor.d.ts +2 -0
- package/dist/canvas/components/Edges/shared/hooks/useWaypointEditor.d.ts.map +1 -1
- package/dist/canvas/components/Edges/shared/hooks/useWaypointEditor.js +64 -38
- package/dist/canvas/components/Edges/shared/waypoints.cjs +149 -5
- package/dist/canvas/components/Edges/shared/waypoints.d.ts +5 -0
- package/dist/canvas/components/Edges/shared/waypoints.d.ts.map +1 -1
- package/dist/canvas/components/Edges/shared/waypoints.js +133 -1
- package/dist/canvas/components/JsonTree/index.cjs +4 -0
- package/dist/canvas/components/JsonTree/index.d.ts +2 -2
- package/dist/canvas/components/JsonTree/index.d.ts.map +1 -1
- package/dist/canvas/components/JsonTree/index.js +2 -2
- package/dist/canvas/components/NodeIOView/NodeIOView.cjs +2 -1
- package/dist/canvas/components/NodeIOView/NodeIOView.d.ts +1 -1
- package/dist/canvas/components/NodeIOView/NodeIOView.d.ts.map +1 -1
- package/dist/canvas/components/NodeIOView/NodeIOView.js +2 -1
- package/dist/canvas/components/NodeIOView/NodeIOView.types.d.ts +2 -1
- package/dist/canvas/components/NodeIOView/NodeIOView.types.d.ts.map +1 -1
- package/dist/canvas/components/NodeVariablesPanel/NodeVariablesPanel.cjs +503 -327
- package/dist/canvas/components/NodeVariablesPanel/NodeVariablesPanel.d.ts +2 -2
- package/dist/canvas/components/NodeVariablesPanel/NodeVariablesPanel.d.ts.map +1 -1
- package/dist/canvas/components/NodeVariablesPanel/NodeVariablesPanel.js +503 -327
- package/dist/canvas/components/NodeVariablesPanel/NodeVariablesPanel.strings.cjs +168 -0
- package/dist/canvas/components/NodeVariablesPanel/NodeVariablesPanel.strings.d.ts +3 -0
- package/dist/canvas/components/NodeVariablesPanel/NodeVariablesPanel.strings.d.ts.map +1 -0
- package/dist/canvas/components/NodeVariablesPanel/NodeVariablesPanel.strings.js +134 -0
- package/dist/canvas/components/NodeVariablesPanel/NodeVariablesPanel.types.d.ts +58 -16
- package/dist/canvas/components/NodeVariablesPanel/NodeVariablesPanel.types.d.ts.map +1 -1
- package/dist/canvas/components/NodeVariablesPanel/index.d.ts +1 -1
- package/dist/canvas/components/NodeVariablesPanel/index.d.ts.map +1 -1
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/chat/styles/tailwind.chat.css +1 -1
- package/dist/decision-table/styles/tailwind.decision-table.css +1 -1
- package/package.json +5 -5
|
@@ -25,14 +25,18 @@ var __webpack_exports__ = {};
|
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
27
|
moveWaypoint: ()=>moveWaypoint,
|
|
28
|
-
|
|
28
|
+
moveWaypointConstrained: ()=>moveWaypointConstrained,
|
|
29
29
|
materializePathWaypoints: ()=>materializePathWaypoints,
|
|
30
|
-
|
|
31
|
-
rebalanceWaypoints: ()=>rebalanceWaypoints,
|
|
30
|
+
normalizeWaypoints: ()=>normalizeWaypoints,
|
|
32
31
|
insertWaypoint: ()=>insertWaypoint,
|
|
33
|
-
|
|
32
|
+
rebalanceWaypoints: ()=>rebalanceWaypoints,
|
|
33
|
+
removeWaypoint: ()=>removeWaypoint,
|
|
34
|
+
waypointsEqual: ()=>waypointsEqual,
|
|
34
35
|
moveSegmentByDelta: ()=>moveSegmentByDelta,
|
|
35
|
-
|
|
36
|
+
waypointsPositionallyEqual: ()=>waypointsPositionallyEqual,
|
|
37
|
+
moveCornerWaypoint: ()=>moveCornerWaypoint,
|
|
38
|
+
generateWaypointId: ()=>generateWaypointId,
|
|
39
|
+
isCornerWaypoint: ()=>isCornerWaypoint
|
|
36
40
|
});
|
|
37
41
|
const NodeUtils_cjs_namespaceObject = require("../../../utils/NodeUtils.cjs");
|
|
38
42
|
const external_constants_cjs_namespaceObject = require("./constants.cjs");
|
|
@@ -125,6 +129,138 @@ function moveWaypoint(waypoints, index, newPosition) {
|
|
|
125
129
|
...snapped
|
|
126
130
|
} : wp);
|
|
127
131
|
}
|
|
132
|
+
function runAxis(a, b) {
|
|
133
|
+
const tol = external_constants_cjs_namespaceObject.EDGE_CONSTANTS.COLLINEAR_TOLERANCE;
|
|
134
|
+
const sameX = Math.abs(a.x - b.x) <= tol;
|
|
135
|
+
const sameY = Math.abs(a.y - b.y) <= tol;
|
|
136
|
+
if (sameX === sameY) return null;
|
|
137
|
+
return sameY ? 'horizontal' : 'vertical';
|
|
138
|
+
}
|
|
139
|
+
function vertexIndexOf(path, index) {
|
|
140
|
+
return path.findIndex((v)=>v.waypointIndex === index);
|
|
141
|
+
}
|
|
142
|
+
function isCornerWaypoint(path, index) {
|
|
143
|
+
const i = vertexIndexOf(path, index);
|
|
144
|
+
if (i <= 0) return false;
|
|
145
|
+
const incoming = runAxis(path[i - 1], path[i]);
|
|
146
|
+
const outgoing = runAxis(path[i], path[i + 1]);
|
|
147
|
+
return null !== incoming && null !== outgoing && incoming !== outgoing;
|
|
148
|
+
}
|
|
149
|
+
function moveCornerWaypoint(waypoints, index, desired, path) {
|
|
150
|
+
const i = vertexIndexOf(path, index);
|
|
151
|
+
if (i <= 0 || !waypoints[index]) return waypoints;
|
|
152
|
+
const corner = path[i];
|
|
153
|
+
const next = moveWaypoint(waypoints, index, desired);
|
|
154
|
+
const target = next[index];
|
|
155
|
+
for (const neighbor of [
|
|
156
|
+
path[i - 1],
|
|
157
|
+
path[i + 1]
|
|
158
|
+
]){
|
|
159
|
+
const axis = runAxis(neighbor, corner);
|
|
160
|
+
if (!axis || neighbor.waypointIndex < 0) continue;
|
|
161
|
+
const coord = 'horizontal' === axis ? 'y' : 'x';
|
|
162
|
+
next[neighbor.waypointIndex] = {
|
|
163
|
+
...next[neighbor.waypointIndex],
|
|
164
|
+
[coord]: target[coord]
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
const sourceStub = i - 1 === 0 ? waypoints_anchorStub(path[0], corner, target) : [];
|
|
168
|
+
const targetStub = i + 1 === path.length - 1 ? waypoints_anchorStub(path[i + 1], corner, target) : [];
|
|
169
|
+
return [
|
|
170
|
+
...sourceStub,
|
|
171
|
+
...next,
|
|
172
|
+
...targetStub.reverse()
|
|
173
|
+
];
|
|
174
|
+
}
|
|
175
|
+
function waypoints_anchorStub(anchor, corner, target) {
|
|
176
|
+
const axis = runAxis(anchor, corner);
|
|
177
|
+
if (!axis) return [];
|
|
178
|
+
const [along, across] = 'horizontal' === axis ? [
|
|
179
|
+
'x',
|
|
180
|
+
'y'
|
|
181
|
+
] : [
|
|
182
|
+
'y',
|
|
183
|
+
'x'
|
|
184
|
+
];
|
|
185
|
+
if (Math.abs(target[across] - anchor[across]) <= external_constants_cjs_namespaceObject.EDGE_CONSTANTS.COLLINEAR_TOLERANCE) return [];
|
|
186
|
+
const direction = Math.sign(corner[along] - anchor[along]) || 1;
|
|
187
|
+
const stubCoord = (0, NodeUtils_cjs_namespaceObject.snapToGrid)(anchor[along] + direction * external_constants_cjs_namespaceObject.EDGE_CONSTANTS.STUB_OFFSET);
|
|
188
|
+
return makeStubPair(anchor, axis, stubCoord, target[across]);
|
|
189
|
+
}
|
|
190
|
+
function normalizeWaypoints(waypoints, buildPath) {
|
|
191
|
+
let current = waypoints;
|
|
192
|
+
let path = buildPath(current);
|
|
193
|
+
const reference = pathShape(path);
|
|
194
|
+
const keepsRoute = (candidate)=>pointsEqual(pathShape(buildPath(candidate)), reference);
|
|
195
|
+
const skipped = new Set();
|
|
196
|
+
for(let guard = 0; guard <= 3 * waypoints.length; guard++){
|
|
197
|
+
const index = current.findIndex((wp, i)=>!skipped.has(wp.id) && !isCornerWaypoint(path, i));
|
|
198
|
+
if (index < 0) break;
|
|
199
|
+
const fix = runEndCandidates(current, index, path).find(keepsRoute);
|
|
200
|
+
if (fix) {
|
|
201
|
+
current = fix;
|
|
202
|
+
path = buildPath(current);
|
|
203
|
+
} else skipped.add(current[index].id);
|
|
204
|
+
}
|
|
205
|
+
return current;
|
|
206
|
+
}
|
|
207
|
+
function runEndCandidates(waypoints, index, path) {
|
|
208
|
+
const candidates = [
|
|
209
|
+
removeWaypoint(waypoints, index)
|
|
210
|
+
];
|
|
211
|
+
const i = vertexIndexOf(path, index);
|
|
212
|
+
if (i < 0) return candidates;
|
|
213
|
+
const self = path[i];
|
|
214
|
+
const distance = (p)=>Math.abs(p.x - self.x) + Math.abs(p.y - self.y);
|
|
215
|
+
const ends = [
|
|
216
|
+
i - 1,
|
|
217
|
+
i + 1
|
|
218
|
+
].filter((j)=>j > 0 && j < path.length - 1).map((j)=>path[j]).sort((a, b)=>distance(a) - distance(b));
|
|
219
|
+
for (const end of ends)candidates.push(waypoints.map((wp, j)=>j === index ? {
|
|
220
|
+
...wp,
|
|
221
|
+
x: end.x,
|
|
222
|
+
y: end.y
|
|
223
|
+
} : wp));
|
|
224
|
+
return candidates;
|
|
225
|
+
}
|
|
226
|
+
function moveWaypointConstrained(waypoints, index, desired, buildPath) {
|
|
227
|
+
const initial = waypoints[index];
|
|
228
|
+
if (!initial) return waypoints;
|
|
229
|
+
const start = (0, external_geometry_cjs_namespaceObject.snapPointToGrid)(initial);
|
|
230
|
+
const target = (0, external_geometry_cjs_namespaceObject.snapPointToGrid)(desired);
|
|
231
|
+
const movesX = target.x !== start.x;
|
|
232
|
+
const movesY = target.y !== start.y;
|
|
233
|
+
if (!movesX && !movesY) return moveWaypoint(waypoints, index, start);
|
|
234
|
+
const shapeAt = (p)=>pathShape(buildPath(moveWaypoint(waypoints, index, p)));
|
|
235
|
+
const fullShape = shapeAt(target);
|
|
236
|
+
const keepX = movesX && !pointsEqual(fullShape, shapeAt({
|
|
237
|
+
x: start.x,
|
|
238
|
+
y: target.y
|
|
239
|
+
}));
|
|
240
|
+
const keepY = movesY && !pointsEqual(fullShape, shapeAt({
|
|
241
|
+
x: target.x,
|
|
242
|
+
y: start.y
|
|
243
|
+
}));
|
|
244
|
+
return moveWaypoint(waypoints, index, {
|
|
245
|
+
x: keepX ? target.x : start.x,
|
|
246
|
+
y: keepY ? target.y : start.y
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
function pathShape(points) {
|
|
250
|
+
if (points.length <= 2) return points;
|
|
251
|
+
const start = points[0];
|
|
252
|
+
const end = points[points.length - 1];
|
|
253
|
+
return [
|
|
254
|
+
start,
|
|
255
|
+
...(0, external_geometry_cjs_namespaceObject.consolidateWaypoints)(points.slice(1, -1), start, end),
|
|
256
|
+
end
|
|
257
|
+
];
|
|
258
|
+
}
|
|
259
|
+
function pointsEqual(a, b) {
|
|
260
|
+
if (a.length !== b.length) return false;
|
|
261
|
+
const tol = external_constants_cjs_namespaceObject.EDGE_CONSTANTS.COLLINEAR_TOLERANCE;
|
|
262
|
+
return a.every((p, i)=>Math.abs(p.x - b[i].x) <= tol && Math.abs(p.y - b[i].y) <= tol);
|
|
263
|
+
}
|
|
128
264
|
function moveSegmentByDelta(initialWaypoints, initialSegment, delta, initialPathPoints) {
|
|
129
265
|
const moveAxis = 'horizontal' === initialSegment.orientation ? 'y' : 'x';
|
|
130
266
|
const moveValue = 'y' === moveAxis ? delta.y : delta.x;
|
|
@@ -193,9 +329,13 @@ function makeStubPair(anchor, orientation, stubCoord, movedCoordinate) {
|
|
|
193
329
|
}
|
|
194
330
|
exports.generateWaypointId = __webpack_exports__.generateWaypointId;
|
|
195
331
|
exports.insertWaypoint = __webpack_exports__.insertWaypoint;
|
|
332
|
+
exports.isCornerWaypoint = __webpack_exports__.isCornerWaypoint;
|
|
196
333
|
exports.materializePathWaypoints = __webpack_exports__.materializePathWaypoints;
|
|
334
|
+
exports.moveCornerWaypoint = __webpack_exports__.moveCornerWaypoint;
|
|
197
335
|
exports.moveSegmentByDelta = __webpack_exports__.moveSegmentByDelta;
|
|
198
336
|
exports.moveWaypoint = __webpack_exports__.moveWaypoint;
|
|
337
|
+
exports.moveWaypointConstrained = __webpack_exports__.moveWaypointConstrained;
|
|
338
|
+
exports.normalizeWaypoints = __webpack_exports__.normalizeWaypoints;
|
|
199
339
|
exports.rebalanceWaypoints = __webpack_exports__.rebalanceWaypoints;
|
|
200
340
|
exports.removeWaypoint = __webpack_exports__.removeWaypoint;
|
|
201
341
|
exports.waypointsEqual = __webpack_exports__.waypointsEqual;
|
|
@@ -203,9 +343,13 @@ exports.waypointsPositionallyEqual = __webpack_exports__.waypointsPositionallyEq
|
|
|
203
343
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
204
344
|
"generateWaypointId",
|
|
205
345
|
"insertWaypoint",
|
|
346
|
+
"isCornerWaypoint",
|
|
206
347
|
"materializePathWaypoints",
|
|
348
|
+
"moveCornerWaypoint",
|
|
207
349
|
"moveSegmentByDelta",
|
|
208
350
|
"moveWaypoint",
|
|
351
|
+
"moveWaypointConstrained",
|
|
352
|
+
"normalizeWaypoints",
|
|
209
353
|
"rebalanceWaypoints",
|
|
210
354
|
"removeWaypoint",
|
|
211
355
|
"waypointsEqual",
|
|
@@ -13,5 +13,10 @@ export type RebalanceEndpoint = {
|
|
|
13
13
|
};
|
|
14
14
|
export declare function rebalanceWaypoints(waypoints: Waypoint[], source: RebalanceEndpoint, target: RebalanceEndpoint): Waypoint[];
|
|
15
15
|
export declare function moveWaypoint(waypoints: Waypoint[], index: number, newPosition: Point): Waypoint[];
|
|
16
|
+
export type PathBuilder = (waypoints: Waypoint[]) => PathVertex[];
|
|
17
|
+
export declare function isCornerWaypoint(path: PathVertex[], index: number): boolean;
|
|
18
|
+
export declare function moveCornerWaypoint(waypoints: Waypoint[], index: number, desired: Point, path: PathVertex[]): Waypoint[];
|
|
19
|
+
export declare function normalizeWaypoints(waypoints: Waypoint[], buildPath: PathBuilder): Waypoint[];
|
|
20
|
+
export declare function moveWaypointConstrained(waypoints: Waypoint[], index: number, desired: Point, buildPath: PathBuilder): Waypoint[];
|
|
16
21
|
export declare function moveSegmentByDelta(initialWaypoints: Waypoint[], initialSegment: Segment, delta: Point, initialPathPoints: Point[]): Waypoint[];
|
|
17
22
|
//# sourceMappingURL=waypoints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waypoints.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Edges/shared/waypoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAIzE,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"waypoints.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Edges/shared/waypoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAIzE,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAsB,QAAQ,EAAE,MAAM,SAAS,CAAC;AAUxF,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAK/F;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAOD,wBAAgB,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CASpE;AAOD,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE,Q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,KAAK,EACd,SAAS,EAAE,WAAW,GACrB,QAAQ,EAAE,CAoBZ;AAwBD,wBAAgB,kBAAkB,CAChC,gBAAgB,EAAE,QAAQ,EAAE,EAC5B,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,iBAAiB,EAAE,KAAK,EAAE,GACzB,QAAQ,EAAE,CAiEZ"}
|
|
@@ -89,6 +89,138 @@ function moveWaypoint(waypoints, index, newPosition) {
|
|
|
89
89
|
...snapped
|
|
90
90
|
} : wp);
|
|
91
91
|
}
|
|
92
|
+
function runAxis(a, b) {
|
|
93
|
+
const tol = EDGE_CONSTANTS.COLLINEAR_TOLERANCE;
|
|
94
|
+
const sameX = Math.abs(a.x - b.x) <= tol;
|
|
95
|
+
const sameY = Math.abs(a.y - b.y) <= tol;
|
|
96
|
+
if (sameX === sameY) return null;
|
|
97
|
+
return sameY ? 'horizontal' : 'vertical';
|
|
98
|
+
}
|
|
99
|
+
function vertexIndexOf(path, index) {
|
|
100
|
+
return path.findIndex((v)=>v.waypointIndex === index);
|
|
101
|
+
}
|
|
102
|
+
function isCornerWaypoint(path, index) {
|
|
103
|
+
const i = vertexIndexOf(path, index);
|
|
104
|
+
if (i <= 0) return false;
|
|
105
|
+
const incoming = runAxis(path[i - 1], path[i]);
|
|
106
|
+
const outgoing = runAxis(path[i], path[i + 1]);
|
|
107
|
+
return null !== incoming && null !== outgoing && incoming !== outgoing;
|
|
108
|
+
}
|
|
109
|
+
function moveCornerWaypoint(waypoints, index, desired, path) {
|
|
110
|
+
const i = vertexIndexOf(path, index);
|
|
111
|
+
if (i <= 0 || !waypoints[index]) return waypoints;
|
|
112
|
+
const corner = path[i];
|
|
113
|
+
const next = moveWaypoint(waypoints, index, desired);
|
|
114
|
+
const target = next[index];
|
|
115
|
+
for (const neighbor of [
|
|
116
|
+
path[i - 1],
|
|
117
|
+
path[i + 1]
|
|
118
|
+
]){
|
|
119
|
+
const axis = runAxis(neighbor, corner);
|
|
120
|
+
if (!axis || neighbor.waypointIndex < 0) continue;
|
|
121
|
+
const coord = 'horizontal' === axis ? 'y' : 'x';
|
|
122
|
+
next[neighbor.waypointIndex] = {
|
|
123
|
+
...next[neighbor.waypointIndex],
|
|
124
|
+
[coord]: target[coord]
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const sourceStub = i - 1 === 0 ? waypoints_anchorStub(path[0], corner, target) : [];
|
|
128
|
+
const targetStub = i + 1 === path.length - 1 ? waypoints_anchorStub(path[i + 1], corner, target) : [];
|
|
129
|
+
return [
|
|
130
|
+
...sourceStub,
|
|
131
|
+
...next,
|
|
132
|
+
...targetStub.reverse()
|
|
133
|
+
];
|
|
134
|
+
}
|
|
135
|
+
function waypoints_anchorStub(anchor, corner, target) {
|
|
136
|
+
const axis = runAxis(anchor, corner);
|
|
137
|
+
if (!axis) return [];
|
|
138
|
+
const [along, across] = 'horizontal' === axis ? [
|
|
139
|
+
'x',
|
|
140
|
+
'y'
|
|
141
|
+
] : [
|
|
142
|
+
'y',
|
|
143
|
+
'x'
|
|
144
|
+
];
|
|
145
|
+
if (Math.abs(target[across] - anchor[across]) <= EDGE_CONSTANTS.COLLINEAR_TOLERANCE) return [];
|
|
146
|
+
const direction = Math.sign(corner[along] - anchor[along]) || 1;
|
|
147
|
+
const stubCoord = snapToGrid(anchor[along] + direction * EDGE_CONSTANTS.STUB_OFFSET);
|
|
148
|
+
return makeStubPair(anchor, axis, stubCoord, target[across]);
|
|
149
|
+
}
|
|
150
|
+
function normalizeWaypoints(waypoints, buildPath) {
|
|
151
|
+
let current = waypoints;
|
|
152
|
+
let path = buildPath(current);
|
|
153
|
+
const reference = pathShape(path);
|
|
154
|
+
const keepsRoute = (candidate)=>pointsEqual(pathShape(buildPath(candidate)), reference);
|
|
155
|
+
const skipped = new Set();
|
|
156
|
+
for(let guard = 0; guard <= 3 * waypoints.length; guard++){
|
|
157
|
+
const index = current.findIndex((wp, i)=>!skipped.has(wp.id) && !isCornerWaypoint(path, i));
|
|
158
|
+
if (index < 0) break;
|
|
159
|
+
const fix = runEndCandidates(current, index, path).find(keepsRoute);
|
|
160
|
+
if (fix) {
|
|
161
|
+
current = fix;
|
|
162
|
+
path = buildPath(current);
|
|
163
|
+
} else skipped.add(current[index].id);
|
|
164
|
+
}
|
|
165
|
+
return current;
|
|
166
|
+
}
|
|
167
|
+
function runEndCandidates(waypoints, index, path) {
|
|
168
|
+
const candidates = [
|
|
169
|
+
removeWaypoint(waypoints, index)
|
|
170
|
+
];
|
|
171
|
+
const i = vertexIndexOf(path, index);
|
|
172
|
+
if (i < 0) return candidates;
|
|
173
|
+
const self = path[i];
|
|
174
|
+
const distance = (p)=>Math.abs(p.x - self.x) + Math.abs(p.y - self.y);
|
|
175
|
+
const ends = [
|
|
176
|
+
i - 1,
|
|
177
|
+
i + 1
|
|
178
|
+
].filter((j)=>j > 0 && j < path.length - 1).map((j)=>path[j]).sort((a, b)=>distance(a) - distance(b));
|
|
179
|
+
for (const end of ends)candidates.push(waypoints.map((wp, j)=>j === index ? {
|
|
180
|
+
...wp,
|
|
181
|
+
x: end.x,
|
|
182
|
+
y: end.y
|
|
183
|
+
} : wp));
|
|
184
|
+
return candidates;
|
|
185
|
+
}
|
|
186
|
+
function moveWaypointConstrained(waypoints, index, desired, buildPath) {
|
|
187
|
+
const initial = waypoints[index];
|
|
188
|
+
if (!initial) return waypoints;
|
|
189
|
+
const start = snapPointToGrid(initial);
|
|
190
|
+
const target = snapPointToGrid(desired);
|
|
191
|
+
const movesX = target.x !== start.x;
|
|
192
|
+
const movesY = target.y !== start.y;
|
|
193
|
+
if (!movesX && !movesY) return moveWaypoint(waypoints, index, start);
|
|
194
|
+
const shapeAt = (p)=>pathShape(buildPath(moveWaypoint(waypoints, index, p)));
|
|
195
|
+
const fullShape = shapeAt(target);
|
|
196
|
+
const keepX = movesX && !pointsEqual(fullShape, shapeAt({
|
|
197
|
+
x: start.x,
|
|
198
|
+
y: target.y
|
|
199
|
+
}));
|
|
200
|
+
const keepY = movesY && !pointsEqual(fullShape, shapeAt({
|
|
201
|
+
x: target.x,
|
|
202
|
+
y: start.y
|
|
203
|
+
}));
|
|
204
|
+
return moveWaypoint(waypoints, index, {
|
|
205
|
+
x: keepX ? target.x : start.x,
|
|
206
|
+
y: keepY ? target.y : start.y
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
function pathShape(points) {
|
|
210
|
+
if (points.length <= 2) return points;
|
|
211
|
+
const start = points[0];
|
|
212
|
+
const end = points[points.length - 1];
|
|
213
|
+
return [
|
|
214
|
+
start,
|
|
215
|
+
...consolidateWaypoints(points.slice(1, -1), start, end),
|
|
216
|
+
end
|
|
217
|
+
];
|
|
218
|
+
}
|
|
219
|
+
function pointsEqual(a, b) {
|
|
220
|
+
if (a.length !== b.length) return false;
|
|
221
|
+
const tol = EDGE_CONSTANTS.COLLINEAR_TOLERANCE;
|
|
222
|
+
return a.every((p, i)=>Math.abs(p.x - b[i].x) <= tol && Math.abs(p.y - b[i].y) <= tol);
|
|
223
|
+
}
|
|
92
224
|
function moveSegmentByDelta(initialWaypoints, initialSegment, delta, initialPathPoints) {
|
|
93
225
|
const moveAxis = 'horizontal' === initialSegment.orientation ? 'y' : 'x';
|
|
94
226
|
const moveValue = 'y' === moveAxis ? delta.y : delta.x;
|
|
@@ -155,4 +287,4 @@ function makeStubPair(anchor, orientation, stubCoord, movedCoordinate) {
|
|
|
155
287
|
}
|
|
156
288
|
];
|
|
157
289
|
}
|
|
158
|
-
export { generateWaypointId, insertWaypoint, materializePathWaypoints, moveSegmentByDelta, moveWaypoint, rebalanceWaypoints, removeWaypoint, waypointsEqual, waypointsPositionallyEqual };
|
|
290
|
+
export { generateWaypointId, insertWaypoint, isCornerWaypoint, materializePathWaypoints, moveCornerWaypoint, moveSegmentByDelta, moveWaypoint, moveWaypointConstrained, normalizeWaypoints, rebalanceWaypoints, removeWaypoint, waypointsEqual, waypointsPositionallyEqual };
|
|
@@ -59,6 +59,7 @@ var __webpack_exports__ = {};
|
|
|
59
59
|
flattenJsonTree: ()=>_uipath_apollo_wind__rspack_import_0.flattenJsonTree,
|
|
60
60
|
formatLeafValue: ()=>_uipath_apollo_wind__rspack_import_0.formatLeafValue,
|
|
61
61
|
getValueAtPath: ()=>_uipath_apollo_wind__rspack_import_0.getValueAtPath,
|
|
62
|
+
hasVisibleRows: ()=>_uipath_apollo_wind__rspack_import_0.hasVisibleRows,
|
|
62
63
|
inferValueType: ()=>_uipath_apollo_wind__rspack_import_0.inferValueType,
|
|
63
64
|
isArrayItemTemplateRoot: ()=>_uipath_apollo_wind__rspack_import_0.isArrayItemTemplateRoot,
|
|
64
65
|
isJsonObject: ()=>_uipath_apollo_wind__rspack_import_0.isJsonObject,
|
|
@@ -71,6 +72,7 @@ var __webpack_exports__ = {};
|
|
|
71
72
|
var _JsonTree__rspack_import_1 = __webpack_require__("./JsonTree?811b");
|
|
72
73
|
var __rspack_reexport = {};
|
|
73
74
|
for(const __rspack_import_key in _JsonTree__rspack_import_1)if ([
|
|
75
|
+
"hasVisibleRows",
|
|
74
76
|
"appendPathSegment",
|
|
75
77
|
"formatLeafValue",
|
|
76
78
|
"inferValueType",
|
|
@@ -98,6 +100,7 @@ exports.copyTextToClipboard = __webpack_exports__.copyTextToClipboard;
|
|
|
98
100
|
exports.flattenJsonTree = __webpack_exports__.flattenJsonTree;
|
|
99
101
|
exports.formatLeafValue = __webpack_exports__.formatLeafValue;
|
|
100
102
|
exports.getValueAtPath = __webpack_exports__.getValueAtPath;
|
|
103
|
+
exports.hasVisibleRows = __webpack_exports__.hasVisibleRows;
|
|
101
104
|
exports.inferValueType = __webpack_exports__.inferValueType;
|
|
102
105
|
exports.isArrayItemTemplateRoot = __webpack_exports__.isArrayItemTemplateRoot;
|
|
103
106
|
exports.isJsonObject = __webpack_exports__.isJsonObject;
|
|
@@ -114,6 +117,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
114
117
|
"flattenJsonTree",
|
|
115
118
|
"formatLeafValue",
|
|
116
119
|
"getValueAtPath",
|
|
120
|
+
"hasVisibleRows",
|
|
117
121
|
"inferValueType",
|
|
118
122
|
"isArrayItemTemplateRoot",
|
|
119
123
|
"isJsonObject",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { BuildJsonTreeOptions, ContainerPath, CopyEvent, DeriveTypeIcon, FlatJsonTreeRow, FlattenOptions, JsonCodeEditorRenderProps, JsonContainer, JsonContainerEditorProps, JsonLeafValueEditorProps, JsonMultilineLeafEditorProps, JsonObject, JsonSchema, JsonSchemaTypeName, JsonTreeChange, JsonTreeFilterOption, JsonTreeNode, JsonTreeNodeType, JsonTreeRowWrapper, JsonTreeRowWrapperProps, JsonTreeToolbarProps, JsonTreeViewStrings, JsonTreeViewProps, JsonTreeViewProviderProps, JsonTypeBadgeProps, JsonValue, NodeAction, NodeActionContext, NodeActionsResolver, NodeBadgeReference, NodeDecoration, NodeDecorationBadge, NodeDecorationChip, NodeDecorationTone, NodeDisplayTexts, PathForCopy, PathSegment, RenderCodeEditor, RenderValueCell, RenderValueContext, ResolvedJsonTreeViewStrings, } from '@uipath/apollo-wind';
|
|
2
|
-
export { appendPathSegment, buildJsonTree, collectContainerPaths, copyTextToClipboard, DEFAULT_JSON_TREE_VIEW_STRINGS, flattenJsonTree, formatLeafValue, getValueAtPath, inferValueType, isArrayItemTemplateRoot, isJsonObject, isPathCollapsed, removeValueAtPath, schemaDisplayType, setValueAtPath, } from '@uipath/apollo-wind';
|
|
1
|
+
export type { BuildJsonTreeOptions, CanCopyPath, ContainerPath, CopyEvent, DeriveTypeIcon, DeriveTypeLabel, FlatJsonTreeRow, FlattenOptions, JsonCodeEditorRenderProps, JsonContainer, JsonContainerEditorProps, JsonLeafValueEditorProps, JsonMultilineLeafEditorProps, JsonObject, JsonSchema, JsonSchemaTypeName, JsonTreeChange, JsonTreeFilterOption, JsonTreeNode, JsonTreeNodeType, JsonTreeRowWrapper, JsonTreeRowWrapperProps, JsonTreeToolbarProps, JsonTreeViewStrings, JsonTreeViewProps, JsonTreeViewProviderProps, JsonTypeBadgeProps, JsonValue, NodeAction, NodeActionContext, NodeActionsResolver, NodeBadgeReference, NodeDecoration, NodeDecorationBadge, NodeDecorationChip, NodeDecorationTone, NodeDisplayTexts, PathForCopy, PathSegment, RenderCodeEditor, RenderValueCell, RenderValueContext, ResolvedJsonTreeViewStrings, } from '@uipath/apollo-wind';
|
|
2
|
+
export { appendPathSegment, buildJsonTree, collectContainerPaths, copyTextToClipboard, DEFAULT_JSON_TREE_VIEW_STRINGS, flattenJsonTree, formatLeafValue, getValueAtPath, hasVisibleRows, inferValueType, isArrayItemTemplateRoot, isJsonObject, isPathCollapsed, removeValueAtPath, schemaDisplayType, setValueAtPath, } from '@uipath/apollo-wind';
|
|
3
3
|
export * from './JsonTree';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/JsonTree/index.ts"],"names":[],"mappings":"AAEA,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,SAAS,EACT,cAAc,EACd,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,EAC5B,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,8BAA8B,EAC9B,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/JsonTree/index.ts"],"names":[],"mappings":"AAEA,YAAY,EACV,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,SAAS,EACT,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,EAC5B,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,8BAA8B,EAC9B,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DEFAULT_JSON_TREE_VIEW_STRINGS, appendPathSegment, buildJsonTree, collectContainerPaths, copyTextToClipboard, flattenJsonTree, formatLeafValue, getValueAtPath, inferValueType, isArrayItemTemplateRoot, isJsonObject, isPathCollapsed, removeValueAtPath, schemaDisplayType, setValueAtPath } from "@uipath/apollo-wind";
|
|
1
|
+
import { DEFAULT_JSON_TREE_VIEW_STRINGS, appendPathSegment, buildJsonTree, collectContainerPaths, copyTextToClipboard, flattenJsonTree, formatLeafValue, getValueAtPath, hasVisibleRows, inferValueType, isArrayItemTemplateRoot, isJsonObject, isPathCollapsed, removeValueAtPath, schemaDisplayType, setValueAtPath } from "@uipath/apollo-wind";
|
|
2
2
|
export * from "./JsonTree.js";
|
|
3
|
-
export { DEFAULT_JSON_TREE_VIEW_STRINGS, appendPathSegment, buildJsonTree, collectContainerPaths, copyTextToClipboard, flattenJsonTree, formatLeafValue, getValueAtPath, inferValueType, isArrayItemTemplateRoot, isJsonObject, isPathCollapsed, removeValueAtPath, schemaDisplayType, setValueAtPath };
|
|
3
|
+
export { DEFAULT_JSON_TREE_VIEW_STRINGS, appendPathSegment, buildJsonTree, collectContainerPaths, copyTextToClipboard, flattenJsonTree, formatLeafValue, getValueAtPath, hasVisibleRows, inferValueType, isArrayItemTemplateRoot, isJsonObject, isPathCollapsed, removeValueAtPath, schemaDisplayType, setValueAtPath };
|
|
@@ -33,7 +33,7 @@ const external_react_namespaceObject = require("react");
|
|
|
33
33
|
const index_cjs_namespaceObject = require("../../../i18n/index.cjs");
|
|
34
34
|
const external_JsonTree_index_cjs_namespaceObject = require("../JsonTree/index.cjs");
|
|
35
35
|
const external_PanelTitleBar_cjs_namespaceObject = require("./PanelTitleBar.cjs");
|
|
36
|
-
function NodeIOView({ schema, value, onValueChange, basePath, readOnly = false, title, titleIcon, titleBadge, titleTrailing, toolbarTrailing, searchPlaceholder, emptyMessage, jsonView, extraTabs, defaultTab, onTabChange, beforeContent, rowWrapper, filters, activeFilterId: controlledFilterId, onFilterChange, decorateNode, deriveTypeIcon, renderValue, nodeActions, maxInlineActions, renderCodeEditor, pathForCopy, onCopy, virtualized = false, defaultCollapsedDepth = 2, inset = false, className }) {
|
|
36
|
+
function NodeIOView({ schema, value, onValueChange, basePath, readOnly = false, title, titleIcon, titleBadge, titleTrailing, toolbarTrailing, searchPlaceholder, emptyMessage, jsonView, extraTabs, defaultTab, onTabChange, beforeContent, rowWrapper, filters, activeFilterId: controlledFilterId, onFilterChange, decorateNode, deriveTypeIcon, deriveTypeLabel, renderValue, nodeActions, maxInlineActions, renderCodeEditor, pathForCopy, onCopy, virtualized = false, defaultCollapsedDepth = 2, inset = false, className }) {
|
|
37
37
|
const { _ } = (0, index_cjs_namespaceObject.useSafeLingui)();
|
|
38
38
|
const nodes = (0, external_react_namespaceObject.useMemo)(()=>(0, external_JsonTree_index_cjs_namespaceObject.buildJsonTree)({
|
|
39
39
|
schema,
|
|
@@ -217,6 +217,7 @@ function NodeIOView({ schema, value, onValueChange, basePath, readOnly = false,
|
|
|
217
217
|
rowWrapper: rowWrapper,
|
|
218
218
|
decorateNode: decorateNode,
|
|
219
219
|
deriveTypeIcon: deriveTypeIcon,
|
|
220
|
+
deriveTypeLabel: deriveTypeLabel,
|
|
220
221
|
renderValue: renderValue,
|
|
221
222
|
nodeActions: nodeActions,
|
|
222
223
|
maxInlineActions: maxInlineActions,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { NodeIOViewProps } from './NodeIOView.types';
|
|
2
|
-
export declare function NodeIOView({ schema, value, onValueChange, basePath, readOnly, title, titleIcon, titleBadge, titleTrailing, toolbarTrailing, searchPlaceholder, emptyMessage, jsonView, extraTabs, defaultTab, onTabChange, beforeContent, rowWrapper, filters, activeFilterId: controlledFilterId, onFilterChange, decorateNode, deriveTypeIcon, renderValue, nodeActions, maxInlineActions, renderCodeEditor, pathForCopy, onCopy, virtualized, defaultCollapsedDepth, inset, className, }: NodeIOViewProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function NodeIOView({ schema, value, onValueChange, basePath, readOnly, title, titleIcon, titleBadge, titleTrailing, toolbarTrailing, searchPlaceholder, emptyMessage, jsonView, extraTabs, defaultTab, onTabChange, beforeContent, rowWrapper, filters, activeFilterId: controlledFilterId, onFilterChange, decorateNode, deriveTypeIcon, deriveTypeLabel, renderValue, nodeActions, maxInlineActions, renderCodeEditor, pathForCopy, onCopy, virtualized, defaultCollapsedDepth, inset, className, }: NodeIOViewProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=NodeIOView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeIOView.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodeIOView/NodeIOView.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAqC1D,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,KAAK,EACL,aAAa,EACb,QAAQ,EACR,QAAgB,EAChB,KAAK,EACL,SAAS,EACT,UAAU,EACV,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,OAAO,EACP,cAAc,EAAE,kBAAkB,EAClC,cAAc,EACd,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,MAAM,EACN,WAAmB,EACnB,qBAAyB,EACzB,KAAa,EACb,SAAS,GACV,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"NodeIOView.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodeIOView/NodeIOView.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAqC1D,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,KAAK,EACL,aAAa,EACb,QAAQ,EACR,QAAgB,EAChB,KAAK,EACL,SAAS,EACT,UAAU,EACV,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,OAAO,EACP,cAAc,EAAE,kBAAkB,EAClC,cAAc,EACd,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,MAAM,EACN,WAAmB,EACnB,qBAAyB,EACzB,KAAa,EACb,SAAS,GACV,EAAE,eAAe,2CAmOjB"}
|
|
@@ -5,7 +5,7 @@ import { useMemo, useState } from "react";
|
|
|
5
5
|
import { useSafeLingui } from "../../../i18n/index.js";
|
|
6
6
|
import { JsonTreeToolbar, JsonTreeView, buildJsonTree, collectContainerPaths, isPathCollapsed, removeValueAtPath, setValueAtPath } from "../JsonTree/index.js";
|
|
7
7
|
import { PanelTitleBar } from "./PanelTitleBar.js";
|
|
8
|
-
function NodeIOView({ schema, value, onValueChange, basePath, readOnly = false, title, titleIcon, titleBadge, titleTrailing, toolbarTrailing, searchPlaceholder, emptyMessage, jsonView, extraTabs, defaultTab, onTabChange, beforeContent, rowWrapper, filters, activeFilterId: controlledFilterId, onFilterChange, decorateNode, deriveTypeIcon, renderValue, nodeActions, maxInlineActions, renderCodeEditor, pathForCopy, onCopy, virtualized = false, defaultCollapsedDepth = 2, inset = false, className }) {
|
|
8
|
+
function NodeIOView({ schema, value, onValueChange, basePath, readOnly = false, title, titleIcon, titleBadge, titleTrailing, toolbarTrailing, searchPlaceholder, emptyMessage, jsonView, extraTabs, defaultTab, onTabChange, beforeContent, rowWrapper, filters, activeFilterId: controlledFilterId, onFilterChange, decorateNode, deriveTypeIcon, deriveTypeLabel, renderValue, nodeActions, maxInlineActions, renderCodeEditor, pathForCopy, onCopy, virtualized = false, defaultCollapsedDepth = 2, inset = false, className }) {
|
|
9
9
|
const { _ } = useSafeLingui();
|
|
10
10
|
const nodes = useMemo(()=>buildJsonTree({
|
|
11
11
|
schema,
|
|
@@ -189,6 +189,7 @@ function NodeIOView({ schema, value, onValueChange, basePath, readOnly = false,
|
|
|
189
189
|
rowWrapper: rowWrapper,
|
|
190
190
|
decorateNode: decorateNode,
|
|
191
191
|
deriveTypeIcon: deriveTypeIcon,
|
|
192
|
+
deriveTypeLabel: deriveTypeLabel,
|
|
192
193
|
renderValue: renderValue,
|
|
193
194
|
nodeActions: nodeActions,
|
|
194
195
|
maxInlineActions: maxInlineActions,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { CopyEvent, DeriveTypeIcon, JsonContainer, JsonSchema, JsonTreeChange, JsonTreeFilterOption, JsonTreeNode, JsonTreeRowWrapper, NodeActionsResolver, NodeDecoration, PathForCopy, RenderCodeEditor, RenderValueCell } from '../JsonTree';
|
|
2
|
+
import type { CopyEvent, DeriveTypeIcon, DeriveTypeLabel, JsonContainer, JsonSchema, JsonTreeChange, JsonTreeFilterOption, JsonTreeNode, JsonTreeRowWrapper, NodeActionsResolver, NodeDecoration, PathForCopy, RenderCodeEditor, RenderValueCell } from '../JsonTree';
|
|
3
3
|
export interface NodeIOViewTab {
|
|
4
4
|
id: string;
|
|
5
5
|
label: string;
|
|
@@ -29,6 +29,7 @@ export interface NodeIOViewProps {
|
|
|
29
29
|
onFilterChange?: (id: string | null) => void;
|
|
30
30
|
decorateNode?: (node: JsonTreeNode) => NodeDecoration | undefined;
|
|
31
31
|
deriveTypeIcon?: DeriveTypeIcon;
|
|
32
|
+
deriveTypeLabel?: DeriveTypeLabel;
|
|
32
33
|
renderValue?: RenderValueCell;
|
|
33
34
|
nodeActions?: NodeActionsResolver;
|
|
34
35
|
maxInlineActions?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeIOView.types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodeIOView/NodeIOView.types.ts"],"names":[],"mappings":"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AAE,MAAM,GAAG,IAAI,CAAC;IAE/B,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAE7C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,cAAc,GAAG,SAAS,CAAC;IAElE,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC,WAAW,CAAC,EAAE,eAAe,CAAC;IAM9B,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAElC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAMpC,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAEpC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAO/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"NodeIOView.types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodeIOView/NodeIOView.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,eAAe,EACf,aAAa,EACb,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,eAAe,EAChB,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,aAAa;IAE5B,EAAE,EAAE,MAAM,CAAC;IAEX,KAAK,EAAE,MAAM,CAAC;IAEd,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAE9B,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB,KAAK,CAAC,EAAE,aAAa,C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