@altimateai/ui-components 0.0.7 → 0.0.8-beta.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/NativeSelect.js +33 -3
- package/dist/index.css +1 -1
- package/dist/lineage/index.d.ts +12 -1
- package/dist/lineage/index.js +540 -532
- package/dist/redux-toolkit.modern.js +1 -1
- package/dist/shadcn/index.d.ts +10 -1
- package/dist/shadcn/index.js +1 -1
- package/package.json +1 -1
package/dist/lineage/index.js
CHANGED
|
@@ -89,9 +89,9 @@ function o5() {
|
|
|
89
89
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
90
90
|
}
|
|
91
91
|
function s5() {
|
|
92
|
-
var e = e5, t = t5, n = n5, o = o5, s = {}, r = uo("start", "drag", "end"), i = 0, l, c, h, f,
|
|
92
|
+
var e = e5, t = t5, n = n5, o = o5, s = {}, r = uo("start", "drag", "end"), i = 0, l, c, h, f, d = 0;
|
|
93
93
|
function m(E) {
|
|
94
|
-
E.on("mousedown.drag", C).filter(o).on("touchstart.drag", b).on("touchmove.drag",
|
|
94
|
+
E.on("mousedown.drag", C).filter(o).on("touchstart.drag", b).on("touchmove.drag", u, Qr).on("touchend.drag touchcancel.drag", w).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
95
95
|
}
|
|
96
96
|
function C(E, S) {
|
|
97
97
|
if (!(f || !e.call(this, E, S))) {
|
|
@@ -102,7 +102,7 @@ function s5() {
|
|
|
102
102
|
function x(E) {
|
|
103
103
|
if (b1(E), !h) {
|
|
104
104
|
var S = E.clientX - l, j = E.clientY - c;
|
|
105
|
-
h = S * S + j * j >
|
|
105
|
+
h = S * S + j * j > d;
|
|
106
106
|
}
|
|
107
107
|
s.mouse("drag", E);
|
|
108
108
|
}
|
|
@@ -116,7 +116,7 @@ function s5() {
|
|
|
116
116
|
(I = y(this, _, E, S, j[N].identifier, j[N])) && (Kt(E), I("start", E, j[N]));
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function u(E) {
|
|
120
120
|
var S = E.changedTouches, j = S.length, _, H;
|
|
121
121
|
for (_ = 0; _ < j; ++_)
|
|
122
122
|
(H = s[S[_].identifier]) && (b1(E), H("drag", E, S[_]));
|
|
@@ -184,7 +184,7 @@ function s5() {
|
|
|
184
184
|
var E = r.on.apply(r, arguments);
|
|
185
185
|
return E === r ? m : E;
|
|
186
186
|
}, m.clickDistance = function(E) {
|
|
187
|
-
return arguments.length ? (
|
|
187
|
+
return arguments.length ? (d = (E = +E) * E, m) : Math.sqrt(d);
|
|
188
188
|
}, m;
|
|
189
189
|
}
|
|
190
190
|
var r5 = 1e-12;
|
|
@@ -199,19 +199,19 @@ function a5(e) {
|
|
|
199
199
|
}
|
|
200
200
|
const l5 = function e(t, n, o) {
|
|
201
201
|
function s(r, i) {
|
|
202
|
-
var l = r[0], c = r[1], h = r[2], f = i[0],
|
|
202
|
+
var l = r[0], c = r[1], h = r[2], f = i[0], d = i[1], m = i[2], C = f - l, x = d - c, v = C * C + x * x, b, u;
|
|
203
203
|
if (v < r5)
|
|
204
|
-
|
|
204
|
+
u = Math.log(m / h) / t, b = function(_) {
|
|
205
205
|
return [
|
|
206
206
|
l + _ * C,
|
|
207
207
|
c + _ * x,
|
|
208
|
-
h * Math.exp(t * _ *
|
|
208
|
+
h * Math.exp(t * _ * u)
|
|
209
209
|
];
|
|
210
210
|
};
|
|
211
211
|
else {
|
|
212
212
|
var w = Math.sqrt(v), y = (m * m - h * h + o * v) / (2 * h * n * w), E = (m * m - h * h - o * v) / (2 * m * n * w), S = Math.log(Math.sqrt(y * y + 1) - y), j = Math.log(Math.sqrt(E * E + 1) - E);
|
|
213
|
-
|
|
214
|
-
var H = _ *
|
|
213
|
+
u = (j - S) / t, b = function(_) {
|
|
214
|
+
var H = _ * u, N = Cn(S), I = h / (n * w) * (N * a5(t * H + S) - i5(S));
|
|
215
215
|
return [
|
|
216
216
|
l + I * C,
|
|
217
217
|
c + I * x,
|
|
@@ -219,7 +219,7 @@ const l5 = function e(t, n, o) {
|
|
|
219
219
|
];
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
|
-
return b.duration =
|
|
222
|
+
return b.duration = u * 1e3 * t / Math.SQRT2, b;
|
|
223
223
|
}
|
|
224
224
|
return s.rho = function(r) {
|
|
225
225
|
var i = Math.max(1e-3, +r), l = i * i, c = l * l;
|
|
@@ -270,34 +270,34 @@ function C5(e, t, n) {
|
|
|
270
270
|
);
|
|
271
271
|
}
|
|
272
272
|
function m5() {
|
|
273
|
-
var e = d5, t = u5, n = C5, o = h5, s = f5, r = [0, 1 / 0], i = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], l = 250, c = l5, h = uo("start", "zoom", "end"), f,
|
|
274
|
-
function
|
|
273
|
+
var e = d5, t = u5, n = C5, o = h5, s = f5, r = [0, 1 / 0], i = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], l = 250, c = l5, h = uo("start", "zoom", "end"), f, d, m, C = 500, x = 150, v = 0, b = 10;
|
|
274
|
+
function u(p) {
|
|
275
275
|
p.property("__zoom", mn).on("wheel.zoom", H, { passive: !1 }).on("mousedown.zoom", N).on("dblclick.zoom", I).filter(s).on("touchstart.zoom", D).on("touchmove.zoom", P).on("touchend.zoom touchcancel.zoom", O).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
u.transform = function(p, k, L, A) {
|
|
278
278
|
var F = p.selection ? p.selection() : p;
|
|
279
279
|
F.property("__zoom", mn), p !== F ? S(p, k, L, A) : F.interrupt().each(function() {
|
|
280
280
|
j(this, arguments).event(A).start().zoom(null, typeof k == "function" ? k.apply(this, arguments) : k).end();
|
|
281
281
|
});
|
|
282
|
-
},
|
|
283
|
-
|
|
282
|
+
}, u.scaleBy = function(p, k, L, A) {
|
|
283
|
+
u.scaleTo(p, function() {
|
|
284
284
|
var F = this.__zoom.k, M = typeof k == "function" ? k.apply(this, arguments) : k;
|
|
285
285
|
return F * M;
|
|
286
286
|
}, L, A);
|
|
287
|
-
},
|
|
288
|
-
|
|
287
|
+
}, u.scaleTo = function(p, k, L, A) {
|
|
288
|
+
u.transform(p, function() {
|
|
289
289
|
var F = t.apply(this, arguments), M = this.__zoom, V = L == null ? E(F) : typeof L == "function" ? L.apply(this, arguments) : L, B = M.invert(V), R = typeof k == "function" ? k.apply(this, arguments) : k;
|
|
290
290
|
return n(y(w(M, R), V, B), F, i);
|
|
291
291
|
}, L, A);
|
|
292
|
-
},
|
|
293
|
-
|
|
292
|
+
}, u.translateBy = function(p, k, L, A) {
|
|
293
|
+
u.transform(p, function() {
|
|
294
294
|
return n(this.__zoom.translate(
|
|
295
295
|
typeof k == "function" ? k.apply(this, arguments) : k,
|
|
296
296
|
typeof L == "function" ? L.apply(this, arguments) : L
|
|
297
297
|
), t.apply(this, arguments), i);
|
|
298
298
|
}, null, A);
|
|
299
|
-
},
|
|
300
|
-
|
|
299
|
+
}, u.translateTo = function(p, k, L, A, F) {
|
|
300
|
+
u.transform(p, function() {
|
|
301
301
|
var M = t.apply(this, arguments), V = this.__zoom, B = A == null ? E(M) : typeof A == "function" ? A.apply(this, arguments) : A;
|
|
302
302
|
return n(Ge.translate(B[0], B[1]).scale(V.k).translate(
|
|
303
303
|
typeof k == "function" ? -k.apply(this, arguments) : -k,
|
|
@@ -358,7 +358,7 @@ function m5() {
|
|
|
358
358
|
this.that,
|
|
359
359
|
new c5(p, {
|
|
360
360
|
sourceEvent: this.sourceEvent,
|
|
361
|
-
target:
|
|
361
|
+
target: u,
|
|
362
362
|
type: p,
|
|
363
363
|
transform: this.that.__zoom,
|
|
364
364
|
dispatch: h
|
|
@@ -399,7 +399,7 @@ function m5() {
|
|
|
399
399
|
function I(p, ...k) {
|
|
400
400
|
if (e.apply(this, arguments)) {
|
|
401
401
|
var L = this.__zoom, A = Fe(p.changedTouches ? p.changedTouches[0] : p, this), F = L.invert(A), M = L.k * (p.shiftKey ? 0.5 : 2), V = n(y(w(L, M), A, F), t.apply(this, k), i);
|
|
402
|
-
F1(p), l > 0 ? Te(this).transition().duration(l).call(S, V, A, p) : Te(this).call(
|
|
402
|
+
F1(p), l > 0 ? Te(this).transition().duration(l).call(S, V, A, p) : Te(this).call(u.transform, V, A, p);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
function D(p, ...k) {
|
|
@@ -407,7 +407,7 @@ function m5() {
|
|
|
407
407
|
var L = p.touches, A = L.length, F = j(this, k, p.changedTouches.length === A).event(p), M, V, B, R;
|
|
408
408
|
for (Yt(p), V = 0; V < A; ++V)
|
|
409
409
|
B = L[V], R = Fe(B, this), R = [R, this.__zoom.invert(R), B.identifier], F.touch0 ? !F.touch1 && F.touch0[2] !== R[2] && (F.touch1 = R, F.taps = 0) : (F.touch0 = R, M = !0, F.taps = 1 + !!f);
|
|
410
|
-
f && (f = clearTimeout(f)), M && (F.taps < 2 && (
|
|
410
|
+
f && (f = clearTimeout(f)), M && (F.taps < 2 && (d = R[0], f = setTimeout(function() {
|
|
411
411
|
f = null;
|
|
412
412
|
}, C)), $t(this), F.start());
|
|
413
413
|
}
|
|
@@ -433,38 +433,38 @@ function m5() {
|
|
|
433
433
|
}, C), M = 0; M < F; ++M)
|
|
434
434
|
V = A[M], L.touch0 && L.touch0[2] === V.identifier ? delete L.touch0 : L.touch1 && L.touch1[2] === V.identifier && delete L.touch1;
|
|
435
435
|
if (L.touch1 && !L.touch0 && (L.touch0 = L.touch1, delete L.touch1), L.touch0) L.touch0[1] = this.__zoom.invert(L.touch0[0]);
|
|
436
|
-
else if (L.end(), L.taps === 2 && (V = Fe(V, this), Math.hypot(
|
|
436
|
+
else if (L.end(), L.taps === 2 && (V = Fe(V, this), Math.hypot(d[0] - V[0], d[1] - V[1]) < b)) {
|
|
437
437
|
var B = Te(this).on("dblclick.zoom");
|
|
438
438
|
B && B.apply(this, arguments);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
return
|
|
443
|
-
return arguments.length ? (o = typeof p == "function" ? p : at(+p),
|
|
444
|
-
},
|
|
445
|
-
return arguments.length ? (e = typeof p == "function" ? p : at(!!p),
|
|
446
|
-
},
|
|
447
|
-
return arguments.length ? (s = typeof p == "function" ? p : at(!!p),
|
|
448
|
-
},
|
|
449
|
-
return arguments.length ? (t = typeof p == "function" ? p : at([[+p[0][0], +p[0][1]], [+p[1][0], +p[1][1]]]),
|
|
450
|
-
},
|
|
451
|
-
return arguments.length ? (r[0] = +p[0], r[1] = +p[1],
|
|
452
|
-
},
|
|
453
|
-
return arguments.length ? (i[0][0] = +p[0][0], i[1][0] = +p[1][0], i[0][1] = +p[0][1], i[1][1] = +p[1][1],
|
|
454
|
-
},
|
|
455
|
-
return arguments.length ? (n = p,
|
|
456
|
-
},
|
|
457
|
-
return arguments.length ? (l = +p,
|
|
458
|
-
},
|
|
459
|
-
return arguments.length ? (c = p,
|
|
460
|
-
},
|
|
442
|
+
return u.wheelDelta = function(p) {
|
|
443
|
+
return arguments.length ? (o = typeof p == "function" ? p : at(+p), u) : o;
|
|
444
|
+
}, u.filter = function(p) {
|
|
445
|
+
return arguments.length ? (e = typeof p == "function" ? p : at(!!p), u) : e;
|
|
446
|
+
}, u.touchable = function(p) {
|
|
447
|
+
return arguments.length ? (s = typeof p == "function" ? p : at(!!p), u) : s;
|
|
448
|
+
}, u.extent = function(p) {
|
|
449
|
+
return arguments.length ? (t = typeof p == "function" ? p : at([[+p[0][0], +p[0][1]], [+p[1][0], +p[1][1]]]), u) : t;
|
|
450
|
+
}, u.scaleExtent = function(p) {
|
|
451
|
+
return arguments.length ? (r[0] = +p[0], r[1] = +p[1], u) : [r[0], r[1]];
|
|
452
|
+
}, u.translateExtent = function(p) {
|
|
453
|
+
return arguments.length ? (i[0][0] = +p[0][0], i[1][0] = +p[1][0], i[0][1] = +p[0][1], i[1][1] = +p[1][1], u) : [[i[0][0], i[0][1]], [i[1][0], i[1][1]]];
|
|
454
|
+
}, u.constrain = function(p) {
|
|
455
|
+
return arguments.length ? (n = p, u) : n;
|
|
456
|
+
}, u.duration = function(p) {
|
|
457
|
+
return arguments.length ? (l = +p, u) : l;
|
|
458
|
+
}, u.interpolate = function(p) {
|
|
459
|
+
return arguments.length ? (c = p, u) : c;
|
|
460
|
+
}, u.on = function() {
|
|
461
461
|
var p = h.on.apply(h, arguments);
|
|
462
|
-
return p === h ?
|
|
463
|
-
},
|
|
464
|
-
return arguments.length ? (v = (p = +p) * p,
|
|
465
|
-
},
|
|
466
|
-
return arguments.length ? (b = +p,
|
|
467
|
-
},
|
|
462
|
+
return p === h ? u : p;
|
|
463
|
+
}, u.clickDistance = function(p) {
|
|
464
|
+
return arguments.length ? (v = (p = +p) * p, u) : Math.sqrt(v);
|
|
465
|
+
}, u.tapDistance = function(p) {
|
|
466
|
+
return arguments.length ? (b = +p, u) : b;
|
|
467
|
+
}, u;
|
|
468
468
|
}
|
|
469
469
|
const g5 = {
|
|
470
470
|
selectedTable: "",
|
|
@@ -492,6 +492,7 @@ const g5 = {
|
|
|
492
492
|
errors: {},
|
|
493
493
|
lightdashEnabled: !1,
|
|
494
494
|
showCodeModal: !1,
|
|
495
|
+
renderTags: void 0,
|
|
495
496
|
config: { exportFinalLineage: !1 }
|
|
496
497
|
}, Et = Ir({
|
|
497
498
|
name: "lineageState",
|
|
@@ -606,6 +607,9 @@ const g5 = {
|
|
|
606
607
|
setShowCodeModal: (e, t) => {
|
|
607
608
|
e.showCodeModal = t.payload;
|
|
608
609
|
},
|
|
610
|
+
setRenderTags: (e, t) => {
|
|
611
|
+
e.renderTags = t.payload;
|
|
612
|
+
},
|
|
609
613
|
setConfig: (e, t) => {
|
|
610
614
|
e.config = t.payload;
|
|
611
615
|
}
|
|
@@ -641,6 +645,7 @@ const g5 = {
|
|
|
641
645
|
setErrors: So,
|
|
642
646
|
setLightdashEnabled: S5,
|
|
643
647
|
setShowCodeModal: L5,
|
|
648
|
+
setRenderTags: Pa,
|
|
644
649
|
setConfig: N5
|
|
645
650
|
} = Et.actions;
|
|
646
651
|
function ye(e) {
|
|
@@ -669,31 +674,31 @@ function M5() {
|
|
|
669
674
|
if (gn) return Jt;
|
|
670
675
|
gn = 1;
|
|
671
676
|
var e = T;
|
|
672
|
-
function t(
|
|
673
|
-
return
|
|
677
|
+
function t(d, m) {
|
|
678
|
+
return d === m && (d !== 0 || 1 / d === 1 / m) || d !== d && m !== m;
|
|
674
679
|
}
|
|
675
680
|
var n = typeof Object.is == "function" ? Object.is : t, o = e.useState, s = e.useEffect, r = e.useLayoutEffect, i = e.useDebugValue;
|
|
676
|
-
function l(
|
|
681
|
+
function l(d, m) {
|
|
677
682
|
var C = m(), x = o({ inst: { value: C, getSnapshot: m } }), v = x[0].inst, b = x[1];
|
|
678
683
|
return r(function() {
|
|
679
684
|
v.value = C, v.getSnapshot = m, c(v) && b({ inst: v });
|
|
680
|
-
}, [
|
|
681
|
-
return c(v) && b({ inst: v }),
|
|
685
|
+
}, [d, C, m]), s(function() {
|
|
686
|
+
return c(v) && b({ inst: v }), d(function() {
|
|
682
687
|
c(v) && b({ inst: v });
|
|
683
688
|
});
|
|
684
|
-
}, [
|
|
689
|
+
}, [d]), i(C), C;
|
|
685
690
|
}
|
|
686
|
-
function c(
|
|
687
|
-
var m =
|
|
688
|
-
|
|
691
|
+
function c(d) {
|
|
692
|
+
var m = d.getSnapshot;
|
|
693
|
+
d = d.value;
|
|
689
694
|
try {
|
|
690
695
|
var C = m();
|
|
691
|
-
return !n(
|
|
696
|
+
return !n(d, C);
|
|
692
697
|
} catch {
|
|
693
698
|
return !0;
|
|
694
699
|
}
|
|
695
700
|
}
|
|
696
|
-
function h(
|
|
701
|
+
function h(d, m) {
|
|
697
702
|
return m();
|
|
698
703
|
}
|
|
699
704
|
var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? h : l;
|
|
@@ -734,13 +739,13 @@ function j5() {
|
|
|
734
739
|
function s(y, E) {
|
|
735
740
|
return y === E && (y !== 0 || 1 / y === 1 / E) || y !== y && E !== E;
|
|
736
741
|
}
|
|
737
|
-
var r = typeof Object.is == "function" ? Object.is : s, i = e.useState, l = e.useEffect, c = e.useLayoutEffect, h = e.useDebugValue, f = !1,
|
|
742
|
+
var r = typeof Object.is == "function" ? Object.is : s, i = e.useState, l = e.useEffect, c = e.useLayoutEffect, h = e.useDebugValue, f = !1, d = !1;
|
|
738
743
|
function m(y, E, S) {
|
|
739
744
|
f || e.startTransition !== void 0 && (f = !0, n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
740
745
|
var j = E();
|
|
741
|
-
if (!
|
|
746
|
+
if (!d) {
|
|
742
747
|
var _ = E();
|
|
743
|
-
r(j, _) || (n("The result of getSnapshot should be cached to avoid an infinite loop"),
|
|
748
|
+
r(j, _) || (n("The result of getSnapshot should be cached to avoid an infinite loop"), d = !0);
|
|
744
749
|
}
|
|
745
750
|
var H = i({
|
|
746
751
|
inst: {
|
|
@@ -776,7 +781,7 @@ function j5() {
|
|
|
776
781
|
function x(y, E, S) {
|
|
777
782
|
return E();
|
|
778
783
|
}
|
|
779
|
-
var v = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", b = !v,
|
|
784
|
+
var v = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", b = !v, u = b ? x : m, w = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : u;
|
|
780
785
|
Qt.useSyncExternalStore = w, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
781
786
|
}()), Qt;
|
|
782
787
|
}
|
|
@@ -802,14 +807,14 @@ function k5() {
|
|
|
802
807
|
return h === f && (h !== 0 || 1 / h === 1 / f) || h !== h && f !== f;
|
|
803
808
|
}
|
|
804
809
|
var o = typeof Object.is == "function" ? Object.is : n, s = t.useSyncExternalStore, r = e.useRef, i = e.useEffect, l = e.useMemo, c = e.useDebugValue;
|
|
805
|
-
return qt.useSyncExternalStoreWithSelector = function(h, f,
|
|
810
|
+
return qt.useSyncExternalStoreWithSelector = function(h, f, d, m, C) {
|
|
806
811
|
var x = r(null);
|
|
807
812
|
if (x.current === null) {
|
|
808
813
|
var v = { hasValue: !1, value: null };
|
|
809
814
|
x.current = v;
|
|
810
815
|
} else v = x.current;
|
|
811
816
|
x = l(function() {
|
|
812
|
-
function
|
|
817
|
+
function u(j) {
|
|
813
818
|
if (!w) {
|
|
814
819
|
if (w = !0, y = j, j = m(j), C !== void 0 && v.hasValue) {
|
|
815
820
|
var _ = v.value;
|
|
@@ -821,13 +826,13 @@ function k5() {
|
|
|
821
826
|
var H = m(j);
|
|
822
827
|
return C !== void 0 && C(_, H) ? _ : (y = j, E = H);
|
|
823
828
|
}
|
|
824
|
-
var w = !1, y, E, S =
|
|
829
|
+
var w = !1, y, E, S = d === void 0 ? null : d;
|
|
825
830
|
return [function() {
|
|
826
|
-
return
|
|
831
|
+
return u(f());
|
|
827
832
|
}, S === null ? void 0 : function() {
|
|
828
|
-
return
|
|
833
|
+
return u(S());
|
|
829
834
|
}];
|
|
830
|
-
}, [f,
|
|
835
|
+
}, [f, d, m, C]);
|
|
831
836
|
var b = s(h, x[0], x[1]);
|
|
832
837
|
return i(function() {
|
|
833
838
|
v.hasValue = !0, v.value = b;
|
|
@@ -849,17 +854,17 @@ function H5() {
|
|
|
849
854
|
return En || (En = 1, process.env.NODE_ENV !== "production" && function() {
|
|
850
855
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
851
856
|
var e = T, t = Lo();
|
|
852
|
-
function n(f,
|
|
853
|
-
return f ===
|
|
857
|
+
function n(f, d) {
|
|
858
|
+
return f === d && (f !== 0 || 1 / f === 1 / d) || f !== f && d !== d;
|
|
854
859
|
}
|
|
855
860
|
var o = typeof Object.is == "function" ? Object.is : n, s = t.useSyncExternalStore, r = e.useRef, i = e.useEffect, l = e.useMemo, c = e.useDebugValue;
|
|
856
|
-
function h(f,
|
|
861
|
+
function h(f, d, m, C, x) {
|
|
857
862
|
var v = r(null), b;
|
|
858
863
|
v.current === null ? (b = {
|
|
859
864
|
hasValue: !1,
|
|
860
865
|
value: null
|
|
861
866
|
}, v.current = b) : b = v.current;
|
|
862
|
-
var
|
|
867
|
+
var u = l(function() {
|
|
863
868
|
var S = !1, j, _, H = function(P) {
|
|
864
869
|
if (!S) {
|
|
865
870
|
S = !0, j = P;
|
|
@@ -877,12 +882,12 @@ function H5() {
|
|
|
877
882
|
var A = C(P);
|
|
878
883
|
return x !== void 0 && x(L, A) ? L : (j = P, _ = A, A);
|
|
879
884
|
}, N = m === void 0 ? null : m, I = function() {
|
|
880
|
-
return H(
|
|
885
|
+
return H(d());
|
|
881
886
|
}, D = N === null ? void 0 : function() {
|
|
882
887
|
return H(N());
|
|
883
888
|
};
|
|
884
889
|
return [I, D];
|
|
885
|
-
}, [
|
|
890
|
+
}, [d, m, C, x]), w = u[0], y = u[1], E = s(f, w, y);
|
|
886
891
|
return i(function() {
|
|
887
892
|
b.hasValue = !0, b.value = E;
|
|
888
893
|
}, [E]), c(E), E;
|
|
@@ -894,11 +899,11 @@ process.env.NODE_ENV === "production" ? u2.exports = k5() : u2.exports = H5();
|
|
|
894
899
|
var A5 = u2.exports;
|
|
895
900
|
const V5 = /* @__PURE__ */ ho(A5), T5 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, vn = (e) => {
|
|
896
901
|
let t;
|
|
897
|
-
const n = /* @__PURE__ */ new Set(), o = (f,
|
|
902
|
+
const n = /* @__PURE__ */ new Set(), o = (f, d) => {
|
|
898
903
|
const m = typeof f == "function" ? f(t) : f;
|
|
899
904
|
if (!Object.is(m, t)) {
|
|
900
905
|
const C = t;
|
|
901
|
-
t =
|
|
906
|
+
t = d ?? (typeof m != "object" || m === null) ? m : Object.assign({}, t, m), n.forEach((x) => x(t, C));
|
|
902
907
|
}
|
|
903
908
|
}, s = () => t, c = { setState: o, getState: s, getInitialState: () => h, subscribe: (f) => (n.add(f), () => n.delete(f)), destroy: () => {
|
|
904
909
|
(T5 ? "production" : void 0) !== "production" && console.warn(
|
|
@@ -991,10 +996,10 @@ function R5({ proOptions: e, position: t = "bottom-right" }) {
|
|
|
991
996
|
);
|
|
992
997
|
}
|
|
993
998
|
const z5 = ({ x: e, y: t, label: n, labelStyle: o = {}, labelShowBg: s = !0, labelBgStyle: r = {}, labelBgPadding: i = [2, 4], labelBgBorderRadius: l = 2, children: c, className: h, ...f }) => {
|
|
994
|
-
const
|
|
999
|
+
const d = X(null), [m, C] = se({ x: 0, y: 0, width: 0, height: 0 }), x = ye(["react-flow__edge-textwrapper", h]);
|
|
995
1000
|
return Y(() => {
|
|
996
|
-
if (
|
|
997
|
-
const v =
|
|
1001
|
+
if (d.current) {
|
|
1002
|
+
const v = d.current.getBBox();
|
|
998
1003
|
C({
|
|
999
1004
|
x: v.x,
|
|
1000
1005
|
y: v.y,
|
|
@@ -1006,7 +1011,7 @@ const z5 = ({ x: e, y: t, label: n, labelStyle: o = {}, labelShowBg: s = !0, lab
|
|
|
1006
1011
|
"g",
|
|
1007
1012
|
{ transform: `translate(${e - m.width / 2} ${t - m.height / 2})`, className: x, visibility: m.width ? "visible" : "hidden", ...f },
|
|
1008
1013
|
s && T.createElement("rect", { width: m.width + 2 * i[0], x: -i[0], y: -i[1], height: m.height + 2 * i[1], className: "react-flow__edge-textbg", style: r, rx: l, ry: l }),
|
|
1009
|
-
T.createElement("text", { className: "react-flow__edge-text", y: m.height / 2, dy: "0.3em", ref:
|
|
1014
|
+
T.createElement("text", { className: "react-flow__edge-text", y: m.height / 2, dy: "0.3em", ref: d, style: o }, n),
|
|
1010
1015
|
c
|
|
1011
1016
|
);
|
|
1012
1017
|
};
|
|
@@ -1063,10 +1068,10 @@ const To = (e) => "clientX" in e, qe = (e, t) => {
|
|
|
1063
1068
|
}, vt = () => {
|
|
1064
1069
|
var e;
|
|
1065
1070
|
return typeof navigator < "u" && ((e = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : e.indexOf("Mac")) >= 0;
|
|
1066
|
-
}, V1 = ({ id: e, path: t, labelX: n, labelY: o, label: s, labelStyle: r, labelShowBg: i, labelBgStyle: l, labelBgPadding: c, labelBgBorderRadius: h, style: f, markerEnd:
|
|
1071
|
+
}, V1 = ({ id: e, path: t, labelX: n, labelY: o, label: s, labelStyle: r, labelShowBg: i, labelBgStyle: l, labelBgPadding: c, labelBgBorderRadius: h, style: f, markerEnd: d, markerStart: m, interactionWidth: C = 20 }) => T.createElement(
|
|
1067
1072
|
T.Fragment,
|
|
1068
1073
|
null,
|
|
1069
|
-
T.createElement("path", { id: e, style: f, d: t, fill: "none", className: "react-flow__edge-path", markerEnd:
|
|
1074
|
+
T.createElement("path", { id: e, style: f, d: t, fill: "none", className: "react-flow__edge-path", markerEnd: d, markerStart: m }),
|
|
1070
1075
|
C && T.createElement("path", { d: t, fill: "none", strokeOpacity: 0, strokeWidth: C, className: "react-flow__edge-interaction" }),
|
|
1071
1076
|
s && Me(n) && Me(o) ? T.createElement(W5, { x: n, y: o, label: s, labelStyle: r, labelShowBg: i, labelBgStyle: l, labelBgPadding: c, labelBgBorderRadius: h }) : null
|
|
1072
1077
|
);
|
|
@@ -1082,8 +1087,8 @@ function Do({ sourceX: e, sourceY: t, targetX: n, targetY: o }) {
|
|
|
1082
1087
|
return [r, l, s, i];
|
|
1083
1088
|
}
|
|
1084
1089
|
function Io({ sourceX: e, sourceY: t, targetX: n, targetY: o, sourceControlX: s, sourceControlY: r, targetControlX: i, targetControlY: l }) {
|
|
1085
|
-
const c = e * 0.125 + s * 0.375 + i * 0.375 + n * 0.125, h = t * 0.125 + r * 0.375 + l * 0.375 + o * 0.125, f = Math.abs(c - e),
|
|
1086
|
-
return [c, h, f,
|
|
1090
|
+
const c = e * 0.125 + s * 0.375 + i * 0.375 + n * 0.125, h = t * 0.125 + r * 0.375 + l * 0.375 + o * 0.125, f = Math.abs(c - e), d = Math.abs(h - t);
|
|
1091
|
+
return [c, h, f, d];
|
|
1087
1092
|
}
|
|
1088
1093
|
var d1;
|
|
1089
1094
|
(function(e) {
|
|
@@ -1125,7 +1130,7 @@ function Zo({ sourceX: e, sourceY: t, sourcePosition: n = $.Bottom, targetX: o,
|
|
|
1125
1130
|
y1: s,
|
|
1126
1131
|
x2: e,
|
|
1127
1132
|
y2: t
|
|
1128
|
-
}), [f,
|
|
1133
|
+
}), [f, d, m, C] = Io({
|
|
1129
1134
|
sourceX: e,
|
|
1130
1135
|
sourceY: t,
|
|
1131
1136
|
targetX: o,
|
|
@@ -1138,13 +1143,13 @@ function Zo({ sourceX: e, sourceY: t, sourcePosition: n = $.Bottom, targetX: o,
|
|
|
1138
1143
|
return [
|
|
1139
1144
|
`M${e},${t} C${i},${l} ${c},${h} ${o},${s}`,
|
|
1140
1145
|
f,
|
|
1141
|
-
|
|
1146
|
+
d,
|
|
1142
1147
|
m,
|
|
1143
1148
|
C
|
|
1144
1149
|
];
|
|
1145
1150
|
}
|
|
1146
|
-
const H2 = le(({ sourceX: e, sourceY: t, targetX: n, targetY: o, sourcePosition: s = $.Bottom, targetPosition: r = $.Top, label: i, labelStyle: l, labelShowBg: c, labelBgStyle: h, labelBgPadding: f, labelBgBorderRadius:
|
|
1147
|
-
const [b,
|
|
1151
|
+
const H2 = le(({ sourceX: e, sourceY: t, targetX: n, targetY: o, sourcePosition: s = $.Bottom, targetPosition: r = $.Top, label: i, labelStyle: l, labelShowBg: c, labelBgStyle: h, labelBgPadding: f, labelBgBorderRadius: d, style: m, markerEnd: C, markerStart: x, interactionWidth: v }) => {
|
|
1152
|
+
const [b, u, w] = Zo({
|
|
1148
1153
|
sourceX: e,
|
|
1149
1154
|
sourceY: t,
|
|
1150
1155
|
sourcePosition: s,
|
|
@@ -1152,7 +1157,7 @@ const H2 = le(({ sourceX: e, sourceY: t, targetX: n, targetY: o, sourcePosition:
|
|
|
1152
1157
|
targetY: o,
|
|
1153
1158
|
targetPosition: r
|
|
1154
1159
|
});
|
|
1155
|
-
return T.createElement(V1, { path: b, labelX:
|
|
1160
|
+
return T.createElement(V1, { path: b, labelX: u, labelY: w, label: i, labelStyle: l, labelShowBg: c, labelBgStyle: h, labelBgPadding: f, labelBgBorderRadius: d, style: m, markerEnd: C, markerStart: x, interactionWidth: v });
|
|
1156
1161
|
});
|
|
1157
1162
|
H2.displayName = "SimpleBezierEdge";
|
|
1158
1163
|
const Ln = {
|
|
@@ -1166,15 +1171,15 @@ function G5({ source: e, sourcePosition: t = $.Bottom, target: n, targetPosition
|
|
|
1166
1171
|
source: c,
|
|
1167
1172
|
sourcePosition: t,
|
|
1168
1173
|
target: h
|
|
1169
|
-
}),
|
|
1174
|
+
}), d = f.x !== 0 ? "x" : "y", m = f[d];
|
|
1170
1175
|
let C = [], x, v;
|
|
1171
|
-
const b = { x: 0, y: 0 },
|
|
1176
|
+
const b = { x: 0, y: 0 }, u = { x: 0, y: 0 }, [w, y, E, S] = Do({
|
|
1172
1177
|
sourceX: e.x,
|
|
1173
1178
|
sourceY: e.y,
|
|
1174
1179
|
targetX: n.x,
|
|
1175
1180
|
targetY: n.y
|
|
1176
1181
|
});
|
|
1177
|
-
if (i[
|
|
1182
|
+
if (i[d] * l[d] === -1) {
|
|
1178
1183
|
x = s.x ?? w, v = s.y ?? y;
|
|
1179
1184
|
const _ = [
|
|
1180
1185
|
{ x, y: c.y },
|
|
@@ -1183,28 +1188,28 @@ function G5({ source: e, sourcePosition: t = $.Bottom, target: n, targetPosition
|
|
|
1183
1188
|
{ x: c.x, y: v },
|
|
1184
1189
|
{ x: h.x, y: v }
|
|
1185
1190
|
];
|
|
1186
|
-
i[
|
|
1191
|
+
i[d] === m ? C = d === "x" ? _ : H : C = d === "x" ? H : _;
|
|
1187
1192
|
} else {
|
|
1188
1193
|
const _ = [{ x: c.x, y: h.y }], H = [{ x: h.x, y: c.y }];
|
|
1189
|
-
if (
|
|
1190
|
-
const O = Math.abs(e[
|
|
1194
|
+
if (d === "x" ? C = i.x === m ? H : _ : C = i.y === m ? _ : H, t === o) {
|
|
1195
|
+
const O = Math.abs(e[d] - n[d]);
|
|
1191
1196
|
if (O <= r) {
|
|
1192
1197
|
const p = Math.min(r - 1, r - O);
|
|
1193
|
-
i[
|
|
1198
|
+
i[d] === m ? b[d] = (c[d] > e[d] ? -1 : 1) * p : u[d] = (h[d] > n[d] ? -1 : 1) * p;
|
|
1194
1199
|
}
|
|
1195
1200
|
}
|
|
1196
1201
|
if (t !== o) {
|
|
1197
|
-
const O =
|
|
1198
|
-
(i[
|
|
1202
|
+
const O = d === "x" ? "y" : "x", p = i[d] === l[O], k = c[O] > h[O], L = c[O] < h[O];
|
|
1203
|
+
(i[d] === 1 && (!p && k || p && L) || i[d] !== 1 && (!p && L || p && k)) && (C = d === "x" ? _ : H);
|
|
1199
1204
|
}
|
|
1200
|
-
const N = { x: c.x + b.x, y: c.y + b.y }, I = { x: h.x +
|
|
1205
|
+
const N = { x: c.x + b.x, y: c.y + b.y }, I = { x: h.x + u.x, y: h.y + u.y }, D = Math.max(Math.abs(N.x - C[0].x), Math.abs(I.x - C[0].x)), P = Math.max(Math.abs(N.y - C[0].y), Math.abs(I.y - C[0].y));
|
|
1201
1206
|
D >= P ? (x = (N.x + I.x) / 2, v = C[0].y) : (x = C[0].x, v = (N.y + I.y) / 2);
|
|
1202
1207
|
}
|
|
1203
1208
|
return [[
|
|
1204
1209
|
e,
|
|
1205
1210
|
{ x: c.x + b.x, y: c.y + b.y },
|
|
1206
1211
|
...C,
|
|
1207
|
-
{ x: h.x +
|
|
1212
|
+
{ x: h.x + u.x, y: h.y + u.y },
|
|
1208
1213
|
n
|
|
1209
1214
|
], x, v, E, S];
|
|
1210
1215
|
}
|
|
@@ -1220,7 +1225,7 @@ function q5(e, t, n, o) {
|
|
|
1220
1225
|
return `L ${r},${i + s * c}Q ${r},${i} ${r + s * l},${i}`;
|
|
1221
1226
|
}
|
|
1222
1227
|
function C2({ sourceX: e, sourceY: t, sourcePosition: n = $.Bottom, targetX: o, targetY: s, targetPosition: r = $.Top, borderRadius: i = 5, centerX: l, centerY: c, offset: h = 20 }) {
|
|
1223
|
-
const [f,
|
|
1228
|
+
const [f, d, m, C, x] = G5({
|
|
1224
1229
|
source: { x: e, y: t },
|
|
1225
1230
|
sourcePosition: n,
|
|
1226
1231
|
target: { x: o, y: s },
|
|
@@ -1228,23 +1233,23 @@ function C2({ sourceX: e, sourceY: t, sourcePosition: n = $.Bottom, targetX: o,
|
|
|
1228
1233
|
center: { x: l, y: c },
|
|
1229
1234
|
offset: h
|
|
1230
1235
|
});
|
|
1231
|
-
return [f.reduce((b,
|
|
1236
|
+
return [f.reduce((b, u, w) => {
|
|
1232
1237
|
let y = "";
|
|
1233
|
-
return w > 0 && w < f.length - 1 ? y = q5(f[w - 1],
|
|
1234
|
-
}, ""),
|
|
1238
|
+
return w > 0 && w < f.length - 1 ? y = q5(f[w - 1], u, f[w + 1], i) : y = `${w === 0 ? "M" : "L"}${u.x} ${u.y}`, b += y, b;
|
|
1239
|
+
}, ""), d, m, C, x];
|
|
1235
1240
|
}
|
|
1236
|
-
const Tt = le(({ sourceX: e, sourceY: t, targetX: n, targetY: o, label: s, labelStyle: r, labelShowBg: i, labelBgStyle: l, labelBgPadding: c, labelBgBorderRadius: h, style: f, sourcePosition:
|
|
1237
|
-
const [
|
|
1241
|
+
const Tt = le(({ sourceX: e, sourceY: t, targetX: n, targetY: o, label: s, labelStyle: r, labelShowBg: i, labelBgStyle: l, labelBgPadding: c, labelBgBorderRadius: h, style: f, sourcePosition: d = $.Bottom, targetPosition: m = $.Top, markerEnd: C, markerStart: x, pathOptions: v, interactionWidth: b }) => {
|
|
1242
|
+
const [u, w, y] = C2({
|
|
1238
1243
|
sourceX: e,
|
|
1239
1244
|
sourceY: t,
|
|
1240
|
-
sourcePosition:
|
|
1245
|
+
sourcePosition: d,
|
|
1241
1246
|
targetX: n,
|
|
1242
1247
|
targetY: o,
|
|
1243
1248
|
targetPosition: m,
|
|
1244
1249
|
borderRadius: v == null ? void 0 : v.borderRadius,
|
|
1245
1250
|
offset: v == null ? void 0 : v.offset
|
|
1246
1251
|
});
|
|
1247
|
-
return T.createElement(V1, { path:
|
|
1252
|
+
return T.createElement(V1, { path: u, labelX: w, labelY: y, label: s, labelStyle: r, labelShowBg: i, labelBgStyle: l, labelBgPadding: c, labelBgBorderRadius: h, style: f, markerEnd: C, markerStart: x, interactionWidth: b });
|
|
1248
1253
|
});
|
|
1249
1254
|
Tt.displayName = "SmoothStepEdge";
|
|
1250
1255
|
const A2 = le((e) => {
|
|
@@ -1264,9 +1269,9 @@ function J5({ sourceX: e, sourceY: t, targetX: n, targetY: o }) {
|
|
|
1264
1269
|
});
|
|
1265
1270
|
return [`M ${e},${t}L ${n},${o}`, s, r, i, l];
|
|
1266
1271
|
}
|
|
1267
|
-
const V2 = le(({ sourceX: e, sourceY: t, targetX: n, targetY: o, label: s, labelStyle: r, labelShowBg: i, labelBgStyle: l, labelBgPadding: c, labelBgBorderRadius: h, style: f, markerEnd:
|
|
1272
|
+
const V2 = le(({ sourceX: e, sourceY: t, targetX: n, targetY: o, label: s, labelStyle: r, labelShowBg: i, labelBgStyle: l, labelBgPadding: c, labelBgBorderRadius: h, style: f, markerEnd: d, markerStart: m, interactionWidth: C }) => {
|
|
1268
1273
|
const [x, v, b] = J5({ sourceX: e, sourceY: t, targetX: n, targetY: o });
|
|
1269
|
-
return T.createElement(V1, { path: x, labelX: v, labelY: b, label: s, labelStyle: r, labelShowBg: i, labelBgStyle: l, labelBgPadding: c, labelBgBorderRadius: h, style: f, markerEnd:
|
|
1274
|
+
return T.createElement(V1, { path: x, labelX: v, labelY: b, label: s, labelStyle: r, labelShowBg: i, labelBgStyle: l, labelBgPadding: c, labelBgBorderRadius: h, style: f, markerEnd: d, markerStart: m, interactionWidth: C });
|
|
1270
1275
|
});
|
|
1271
1276
|
V2.displayName = "StraightEdge";
|
|
1272
1277
|
function ct(e, t) {
|
|
@@ -1299,7 +1304,7 @@ function Bo({ sourceX: e, sourceY: t, sourcePosition: n = $.Bottom, targetX: o,
|
|
|
1299
1304
|
x2: e,
|
|
1300
1305
|
y2: t,
|
|
1301
1306
|
c: i
|
|
1302
|
-
}), [
|
|
1307
|
+
}), [d, m, C, x] = Io({
|
|
1303
1308
|
sourceX: e,
|
|
1304
1309
|
sourceY: t,
|
|
1305
1310
|
targetX: o,
|
|
@@ -1311,14 +1316,14 @@ function Bo({ sourceX: e, sourceY: t, sourcePosition: n = $.Bottom, targetX: o,
|
|
|
1311
1316
|
});
|
|
1312
1317
|
return [
|
|
1313
1318
|
`M${e},${t} C${l},${c} ${h},${f} ${o},${s}`,
|
|
1314
|
-
|
|
1319
|
+
d,
|
|
1315
1320
|
m,
|
|
1316
1321
|
C,
|
|
1317
1322
|
x
|
|
1318
1323
|
];
|
|
1319
1324
|
}
|
|
1320
|
-
const bt = le(({ sourceX: e, sourceY: t, targetX: n, targetY: o, sourcePosition: s = $.Bottom, targetPosition: r = $.Top, label: i, labelStyle: l, labelShowBg: c, labelBgStyle: h, labelBgPadding: f, labelBgBorderRadius:
|
|
1321
|
-
const [
|
|
1325
|
+
const bt = le(({ sourceX: e, sourceY: t, targetX: n, targetY: o, sourcePosition: s = $.Bottom, targetPosition: r = $.Top, label: i, labelStyle: l, labelShowBg: c, labelBgStyle: h, labelBgPadding: f, labelBgBorderRadius: d, style: m, markerEnd: C, markerStart: x, pathOptions: v, interactionWidth: b }) => {
|
|
1326
|
+
const [u, w, y] = Bo({
|
|
1322
1327
|
sourceX: e,
|
|
1323
1328
|
sourceY: t,
|
|
1324
1329
|
sourcePosition: s,
|
|
@@ -1327,7 +1332,7 @@ const bt = le(({ sourceX: e, sourceY: t, targetX: n, targetY: o, sourcePosition:
|
|
|
1327
1332
|
targetPosition: r,
|
|
1328
1333
|
curvature: v == null ? void 0 : v.curvature
|
|
1329
1334
|
});
|
|
1330
|
-
return T.createElement(V1, { path:
|
|
1335
|
+
return T.createElement(V1, { path: u, labelX: w, labelY: y, label: i, labelStyle: l, labelShowBg: c, labelBgStyle: h, labelBgPadding: f, labelBgBorderRadius: d, style: m, markerEnd: C, markerStart: x, interactionWidth: b });
|
|
1331
1336
|
});
|
|
1332
1337
|
bt.displayName = "BezierEdge";
|
|
1333
1338
|
const T2 = Ht(null), Q5 = T2.Provider;
|
|
@@ -1394,22 +1399,22 @@ const e8 = () => je(T2), t8 = (e) => "id" in e && "source" in e && "target" in e
|
|
|
1394
1399
|
height: t.height / s
|
|
1395
1400
|
}, h = [];
|
|
1396
1401
|
return e.forEach((f) => {
|
|
1397
|
-
const { width:
|
|
1402
|
+
const { width: d, height: m, selectable: C = !0, hidden: x = !1 } = f;
|
|
1398
1403
|
if (i && !C || x)
|
|
1399
1404
|
return !1;
|
|
1400
1405
|
const { positionAbsolute: v } = _1(f, l), b = {
|
|
1401
1406
|
x: v.x,
|
|
1402
1407
|
y: v.y,
|
|
1403
|
-
width:
|
|
1408
|
+
width: d || 0,
|
|
1404
1409
|
height: m || 0
|
|
1405
|
-
},
|
|
1406
|
-
(w || y ||
|
|
1410
|
+
}, u = h2(c, b), w = typeof d > "u" || typeof m > "u" || d === null || m === null, y = r && u > 0, E = (d || 0) * (m || 0);
|
|
1411
|
+
(w || y || u >= E || f.dragging) && h.push(f);
|
|
1407
1412
|
}), h;
|
|
1408
1413
|
}, Oo = (e, t) => {
|
|
1409
1414
|
const n = e.map((o) => o.id);
|
|
1410
1415
|
return t.filter((o) => n.includes(o.source) || n.includes(o.target));
|
|
1411
1416
|
}, Ro = (e, t, n, o, s, r = 0.1) => {
|
|
1412
|
-
const i = t / (e.width * (1 + r)), l = n / (e.height * (1 + r)), c = Math.min(i, l), h = M1(c, o, s), f = e.x + e.width / 2,
|
|
1417
|
+
const i = t / (e.width * (1 + r)), l = n / (e.height * (1 + r)), c = Math.min(i, l), h = M1(c, o, s), f = e.x + e.width / 2, d = e.y + e.height / 2, m = t / 2 - f * h, C = n / 2 - d * h;
|
|
1413
1418
|
return { x: m, y: C, zoom: h };
|
|
1414
1419
|
}, r1 = (e, t = 0) => e.transition().duration(t);
|
|
1415
1420
|
function jn(e, t, n, o) {
|
|
@@ -1429,8 +1434,8 @@ function i8(e, t, n, o, s, r) {
|
|
|
1429
1434
|
if (h) {
|
|
1430
1435
|
const x = h.getAttribute("data-nodeid");
|
|
1431
1436
|
if (x) {
|
|
1432
|
-
const v = I2(void 0, h), b = h.getAttribute("data-handleid"),
|
|
1433
|
-
if (
|
|
1437
|
+
const v = I2(void 0, h), b = h.getAttribute("data-handleid"), u = r({ nodeId: x, id: b, type: v });
|
|
1438
|
+
if (u) {
|
|
1434
1439
|
const w = s.find((y) => y.nodeId === x && y.type === v && y.id === b);
|
|
1435
1440
|
return {
|
|
1436
1441
|
handle: {
|
|
@@ -1440,20 +1445,20 @@ function i8(e, t, n, o, s, r) {
|
|
|
1440
1445
|
x: (w == null ? void 0 : w.x) || n.x,
|
|
1441
1446
|
y: (w == null ? void 0 : w.y) || n.y
|
|
1442
1447
|
},
|
|
1443
|
-
validHandleResult:
|
|
1448
|
+
validHandleResult: u
|
|
1444
1449
|
};
|
|
1445
1450
|
}
|
|
1446
1451
|
}
|
|
1447
1452
|
}
|
|
1448
|
-
let f = [],
|
|
1453
|
+
let f = [], d = 1 / 0;
|
|
1449
1454
|
if (s.forEach((x) => {
|
|
1450
1455
|
const v = Math.sqrt((x.x - n.x) ** 2 + (x.y - n.y) ** 2);
|
|
1451
1456
|
if (v <= o) {
|
|
1452
1457
|
const b = r(x);
|
|
1453
|
-
v <=
|
|
1458
|
+
v <= d && (v < d ? f = [{ handle: x, validHandleResult: b }] : v === d && f.push({
|
|
1454
1459
|
handle: x,
|
|
1455
1460
|
validHandleResult: b
|
|
1456
|
-
}),
|
|
1461
|
+
}), d = v);
|
|
1457
1462
|
}
|
|
1458
1463
|
}), !f.length)
|
|
1459
1464
|
return { handle: null, validHandleResult: zo() };
|
|
@@ -1474,14 +1479,14 @@ function Wo(e, t, n, o, s, r, i) {
|
|
|
1474
1479
|
handleDomNode: c
|
|
1475
1480
|
};
|
|
1476
1481
|
if (c) {
|
|
1477
|
-
const f = I2(void 0, c),
|
|
1478
|
-
source: l ?
|
|
1482
|
+
const f = I2(void 0, c), d = c.getAttribute("data-nodeid"), m = c.getAttribute("data-handleid"), C = c.classList.contains("connectable"), x = c.classList.contains("connectableend"), v = {
|
|
1483
|
+
source: l ? d : n,
|
|
1479
1484
|
sourceHandle: l ? m : o,
|
|
1480
|
-
target: l ? n :
|
|
1485
|
+
target: l ? n : d,
|
|
1481
1486
|
targetHandle: l ? o : m
|
|
1482
1487
|
};
|
|
1483
|
-
h.connection = v, C && x && (t === d1.Strict ? l && f === "source" || !l && f === "target" :
|
|
1484
|
-
nodeId:
|
|
1488
|
+
h.connection = v, C && x && (t === d1.Strict ? l && f === "source" || !l && f === "target" : d !== n || m !== o) && (h.endHandle = {
|
|
1489
|
+
nodeId: d,
|
|
1485
1490
|
handleId: m,
|
|
1486
1491
|
type: f
|
|
1487
1492
|
}, h.isValid = r(v));
|
|
@@ -1509,14 +1514,14 @@ function c8(e, t) {
|
|
|
1509
1514
|
return t ? n = "valid" : e && !t && (n = "invalid"), n;
|
|
1510
1515
|
}
|
|
1511
1516
|
function $o({ event: e, handleId: t, nodeId: n, onConnect: o, isTarget: s, getState: r, setState: i, isValidConnection: l, edgeUpdaterType: c, onReconnectEnd: h }) {
|
|
1512
|
-
const f = Ho(e.target), { connectionMode:
|
|
1517
|
+
const f = Ho(e.target), { connectionMode: d, domNode: m, autoPanOnConnect: C, connectionRadius: x, onConnectStart: v, panBy: b, getNodes: u, cancelConnection: w } = r();
|
|
1513
1518
|
let y = 0, E;
|
|
1514
1519
|
const { x: S, y: j } = qe(e), _ = f == null ? void 0 : f.elementFromPoint(S, j), H = I2(c, _), N = m == null ? void 0 : m.getBoundingClientRect();
|
|
1515
1520
|
if (!N || !H)
|
|
1516
1521
|
return;
|
|
1517
1522
|
let I, D = qe(e, N), P = !1, O = null, p = !1, k = null;
|
|
1518
1523
|
const L = l8({
|
|
1519
|
-
nodes:
|
|
1524
|
+
nodes: u(),
|
|
1520
1525
|
nodeId: n,
|
|
1521
1526
|
handleId: t,
|
|
1522
1527
|
handleType: H
|
|
@@ -1543,7 +1548,7 @@ function $o({ event: e, handleId: t, nodeId: n, onConnect: o, isTarget: s, getSt
|
|
|
1543
1548
|
function F(V) {
|
|
1544
1549
|
const { transform: B } = r();
|
|
1545
1550
|
D = qe(V, N);
|
|
1546
|
-
const { handle: R, validHandleResult: W } = i8(V, f, g2(D, B, !1, [1, 1]), x, L, (z) => Wo(z,
|
|
1551
|
+
const { handle: R, validHandleResult: W } = i8(V, f, g2(D, B, !1, [1, 1]), x, L, (z) => Wo(z, d, n, t, s ? "target" : "source", l, f));
|
|
1547
1552
|
if (E = R, P || (A(), P = !0), k = W.handleDomNode, O = W.connection, p = W.isValid, i({
|
|
1548
1553
|
connectionPosition: E && p ? Fo({
|
|
1549
1554
|
x: E.x,
|
|
@@ -1571,10 +1576,10 @@ const kn = () => !0, d8 = (e) => ({
|
|
|
1571
1576
|
connecting: (s == null ? void 0 : s.nodeId) === e && (s == null ? void 0 : s.handleId) === t && (s == null ? void 0 : s.type) === n || (r == null ? void 0 : r.nodeId) === e && (r == null ? void 0 : r.handleId) === t && (r == null ? void 0 : r.type) === n,
|
|
1572
1577
|
clickConnecting: (i == null ? void 0 : i.nodeId) === e && (i == null ? void 0 : i.handleId) === t && (i == null ? void 0 : i.type) === n
|
|
1573
1578
|
};
|
|
1574
|
-
}, Uo = L2(({ type: e = "source", position: t = $.Top, isValidConnection: n, isConnectable: o = !0, isConnectableStart: s = !0, isConnectableEnd: r = !0, id: i, onConnect: l, children: c, className: h, onMouseDown: f, onTouchStart:
|
|
1579
|
+
}, Uo = L2(({ type: e = "source", position: t = $.Top, isValidConnection: n, isConnectable: o = !0, isConnectableStart: s = !0, isConnectableEnd: r = !0, id: i, onConnect: l, children: c, className: h, onMouseDown: f, onTouchStart: d, ...m }, C) => {
|
|
1575
1580
|
var N, I;
|
|
1576
|
-
const x = i || null, v = e === "target", b = fe(),
|
|
1577
|
-
|
|
1581
|
+
const x = i || null, v = e === "target", b = fe(), u = e8(), { connectOnClick: w, noPanClassName: y } = ie(d8, Ce), { connecting: E, clickConnecting: S } = ie(u8(u, x, e), Ce);
|
|
1582
|
+
u || (I = (N = b.getState()).onError) == null || I.call(N, "010", Ie.error010());
|
|
1578
1583
|
const j = (D) => {
|
|
1579
1584
|
const { defaultEdgeOptions: P, onConnect: O, hasDefaultEdges: p } = b.getState(), k = {
|
|
1580
1585
|
...P,
|
|
@@ -1586,35 +1591,35 @@ const kn = () => !0, d8 = (e) => ({
|
|
|
1586
1591
|
}
|
|
1587
1592
|
O == null || O(k), l == null || l(k);
|
|
1588
1593
|
}, _ = (D) => {
|
|
1589
|
-
if (!
|
|
1594
|
+
if (!u)
|
|
1590
1595
|
return;
|
|
1591
1596
|
const P = To(D);
|
|
1592
1597
|
s && (P && D.button === 0 || !P) && $o({
|
|
1593
1598
|
event: D,
|
|
1594
1599
|
handleId: x,
|
|
1595
|
-
nodeId:
|
|
1600
|
+
nodeId: u,
|
|
1596
1601
|
onConnect: j,
|
|
1597
1602
|
isTarget: v,
|
|
1598
1603
|
getState: b.getState,
|
|
1599
1604
|
setState: b.setState,
|
|
1600
1605
|
isValidConnection: n || b.getState().isValidConnection || kn
|
|
1601
|
-
}), P ? f == null || f(D) :
|
|
1606
|
+
}), P ? f == null || f(D) : d == null || d(D);
|
|
1602
1607
|
}, H = (D) => {
|
|
1603
1608
|
const { onClickConnectStart: P, onClickConnectEnd: O, connectionClickStartHandle: p, connectionMode: k, isValidConnection: L } = b.getState();
|
|
1604
|
-
if (!
|
|
1609
|
+
if (!u || !p && !s)
|
|
1605
1610
|
return;
|
|
1606
1611
|
if (!p) {
|
|
1607
|
-
P == null || P(D, { nodeId:
|
|
1612
|
+
P == null || P(D, { nodeId: u, handleId: x, handleType: e }), b.setState({ connectionClickStartHandle: { nodeId: u, type: e, handleId: x } });
|
|
1608
1613
|
return;
|
|
1609
1614
|
}
|
|
1610
1615
|
const A = Ho(D.target), F = n || L || kn, { connection: M, isValid: V } = Wo({
|
|
1611
|
-
nodeId:
|
|
1616
|
+
nodeId: u,
|
|
1612
1617
|
id: x,
|
|
1613
1618
|
type: e
|
|
1614
1619
|
}, k, p.nodeId, p.handleId || null, p.type, F, A);
|
|
1615
1620
|
V && j(M), O == null || O(D), b.setState({ connectionClickStartHandle: null });
|
|
1616
1621
|
};
|
|
1617
|
-
return T.createElement("div", { "data-handleid": x, "data-nodeid":
|
|
1622
|
+
return T.createElement("div", { "data-handleid": x, "data-nodeid": u, "data-handlepos": t, "data-id": `${u}-${x}-${e}`, className: ye([
|
|
1618
1623
|
"react-flow__handle",
|
|
1619
1624
|
`react-flow__handle-${t}`,
|
|
1620
1625
|
"nodrag",
|
|
@@ -1701,14 +1706,14 @@ function G(e, t, n) {
|
|
|
1701
1706
|
typeof t < "u" && n({ [e]: t });
|
|
1702
1707
|
}, [t]);
|
|
1703
1708
|
}
|
|
1704
|
-
const p8 = ({ nodes: e, edges: t, defaultNodes: n, defaultEdges: o, onConnect: s, onConnectStart: r, onConnectEnd: i, onClickConnectStart: l, onClickConnectEnd: c, nodesDraggable: h, nodesConnectable: f, nodesFocusable:
|
|
1709
|
+
const p8 = ({ nodes: e, edges: t, defaultNodes: n, defaultEdges: o, onConnect: s, onConnectStart: r, onConnectEnd: i, onClickConnectStart: l, onClickConnectEnd: c, nodesDraggable: h, nodesConnectable: f, nodesFocusable: d, edgesFocusable: m, edgesUpdatable: C, elevateNodesOnSelect: x, minZoom: v, maxZoom: b, nodeExtent: u, onNodesChange: w, onEdgesChange: y, elementsSelectable: E, connectionMode: S, snapGrid: j, snapToGrid: _, translateExtent: H, connectOnClick: N, defaultEdgeOptions: I, fitView: D, fitViewOptions: P, onNodesDelete: O, onEdgesDelete: p, onNodeDrag: k, onNodeDragStart: L, onNodeDragStop: A, onSelectionDrag: F, onSelectionDragStart: M, onSelectionDragStop: V, noPanClassName: B, nodeOrigin: R, rfId: W, autoPanOnConnect: z, autoPanOnNodeDrag: U, onError: q, connectionRadius: J, isValidConnection: ee, nodeDragThreshold: te }) => {
|
|
1705
1710
|
const { setNodes: ne, setEdges: we, setDefaultNodesAndEdges: _e, setMinZoom: He, setMaxZoom: Se, setTranslateExtent: ce, setNodeExtent: Ze, reset: re } = ie(g8, Ce), K = fe();
|
|
1706
1711
|
return Y(() => {
|
|
1707
1712
|
const be = o == null ? void 0 : o.map((Je) => ({ ...Je, ...I }));
|
|
1708
1713
|
return _e(n, be), () => {
|
|
1709
1714
|
re();
|
|
1710
1715
|
};
|
|
1711
|
-
}, []), G("defaultEdgeOptions", I, K.setState), G("connectionMode", S, K.setState), G("onConnect", s, K.setState), G("onConnectStart", r, K.setState), G("onConnectEnd", i, K.setState), G("onClickConnectStart", l, K.setState), G("onClickConnectEnd", c, K.setState), G("nodesDraggable", h, K.setState), G("nodesConnectable", f, K.setState), G("nodesFocusable",
|
|
1716
|
+
}, []), G("defaultEdgeOptions", I, K.setState), G("connectionMode", S, K.setState), G("onConnect", s, K.setState), G("onConnectStart", r, K.setState), G("onConnectEnd", i, K.setState), G("onClickConnectStart", l, K.setState), G("onClickConnectEnd", c, K.setState), G("nodesDraggable", h, K.setState), G("nodesConnectable", f, K.setState), G("nodesFocusable", d, K.setState), G("edgesFocusable", m, K.setState), G("edgesUpdatable", C, K.setState), G("elementsSelectable", E, K.setState), G("elevateNodesOnSelect", x, K.setState), G("snapToGrid", _, K.setState), G("snapGrid", j, K.setState), G("onNodesChange", w, K.setState), G("onEdgesChange", y, K.setState), G("connectOnClick", N, K.setState), G("fitViewOnInit", D, K.setState), G("fitViewOnInitOptions", P, K.setState), G("onNodesDelete", O, K.setState), G("onEdgesDelete", p, K.setState), G("onNodeDrag", k, K.setState), G("onNodeDragStart", L, K.setState), G("onNodeDragStop", A, K.setState), G("onSelectionDrag", F, K.setState), G("onSelectionDragStart", M, K.setState), G("onSelectionDragStop", V, K.setState), G("noPanClassName", B, K.setState), G("nodeOrigin", R, K.setState), G("rfId", W, K.setState), G("autoPanOnConnect", z, K.setState), G("autoPanOnNodeDrag", U, K.setState), G("onError", q, K.setState), G("connectionRadius", J, K.setState), G("isValidConnection", ee, K.setState), G("nodeDragThreshold", te, K.setState), x1(e, ne), x1(t, we), x1(v, He), x1(b, Se), x1(H, ce), x1(u, Ze), null;
|
|
1712
1717
|
}, Hn = { display: "none" }, x8 = {
|
|
1713
1718
|
position: "absolute",
|
|
1714
1719
|
width: 1,
|
|
@@ -1743,7 +1748,7 @@ function w8({ rfId: e, disableKeyboardA11y: t }) {
|
|
|
1743
1748
|
var X1 = (e = null, t = { actInsideInputWithModifier: !0 }) => {
|
|
1744
1749
|
const [n, o] = se(!1), s = X(!1), r = X(/* @__PURE__ */ new Set([])), [i, l] = xe(() => {
|
|
1745
1750
|
if (e !== null) {
|
|
1746
|
-
const h = (Array.isArray(e) ? e : [e]).filter((
|
|
1751
|
+
const h = (Array.isArray(e) ? e : [e]).filter((d) => typeof d == "string").map((d) => d.split("+")), f = h.reduce((d, m) => d.concat(...m), []);
|
|
1747
1752
|
return [h, f];
|
|
1748
1753
|
}
|
|
1749
1754
|
return [[], []];
|
|
@@ -1756,7 +1761,7 @@ var X1 = (e = null, t = { actInsideInputWithModifier: !0 }) => {
|
|
|
1756
1761
|
return !1;
|
|
1757
1762
|
const v = Vn(C.code, l);
|
|
1758
1763
|
r.current.add(C[v]), An(i, r.current, !1) && (C.preventDefault(), o(!0));
|
|
1759
|
-
},
|
|
1764
|
+
}, d = (C) => {
|
|
1760
1765
|
if ((!s.current || s.current && !t.actInsideInputWithModifier) && f2(C))
|
|
1761
1766
|
return !1;
|
|
1762
1767
|
const v = Vn(C.code, l);
|
|
@@ -1764,8 +1769,8 @@ var X1 = (e = null, t = { actInsideInputWithModifier: !0 }) => {
|
|
|
1764
1769
|
}, m = () => {
|
|
1765
1770
|
r.current.clear(), o(!1);
|
|
1766
1771
|
};
|
|
1767
|
-
return h == null || h.addEventListener("keydown", f), h == null || h.addEventListener("keyup",
|
|
1768
|
-
h == null || h.removeEventListener("keydown", f), h == null || h.removeEventListener("keyup",
|
|
1772
|
+
return h == null || h.addEventListener("keydown", f), h == null || h.addEventListener("keyup", d), window.addEventListener("blur", m), () => {
|
|
1773
|
+
h == null || h.removeEventListener("keydown", f), h == null || h.removeEventListener("keyup", d), window.removeEventListener("blur", m);
|
|
1769
1774
|
};
|
|
1770
1775
|
}
|
|
1771
1776
|
}, [e, o]), n;
|
|
@@ -1816,8 +1821,8 @@ function n2(e, t, n, o) {
|
|
|
1816
1821
|
x: l.position.x,
|
|
1817
1822
|
y: l.position.y
|
|
1818
1823
|
}
|
|
1819
|
-
},
|
|
1820
|
-
|
|
1824
|
+
}, d = l.parentNode || l.parentId;
|
|
1825
|
+
d && (r[d] = !0);
|
|
1821
1826
|
const m = (h == null ? void 0 : h.type) && (h == null ? void 0 : h.type) !== l.type;
|
|
1822
1827
|
Object.defineProperty(f, ae, {
|
|
1823
1828
|
enumerable: !1,
|
|
@@ -1829,15 +1834,15 @@ function n2(e, t, n, o) {
|
|
|
1829
1834
|
}), ns(s, n, r), s;
|
|
1830
1835
|
}
|
|
1831
1836
|
function os(e, t = {}) {
|
|
1832
|
-
const { getNodes: n, width: o, height: s, minZoom: r, maxZoom: i, d3Zoom: l, d3Selection: c, fitViewOnInitDone: h, fitViewOnInit: f, nodeOrigin:
|
|
1837
|
+
const { getNodes: n, width: o, height: s, minZoom: r, maxZoom: i, d3Zoom: l, d3Selection: c, fitViewOnInitDone: h, fitViewOnInit: f, nodeOrigin: d } = e(), m = t.initial && !h && f;
|
|
1833
1838
|
if (l && c && (m || !t.initial)) {
|
|
1834
1839
|
const x = n().filter((b) => {
|
|
1835
1840
|
var w;
|
|
1836
|
-
const
|
|
1837
|
-
return (w = t.nodes) != null && w.length ?
|
|
1841
|
+
const u = t.includeHiddenNodes ? b.width && b.height : !b.hidden;
|
|
1842
|
+
return (w = t.nodes) != null && w.length ? u && t.nodes.some((y) => y.id === b.id) : u;
|
|
1838
1843
|
}), v = x.every((b) => b.width && b.height);
|
|
1839
1844
|
if (x.length > 0 && v) {
|
|
1840
|
-
const b = D2(x,
|
|
1845
|
+
const b = D2(x, d), { x: u, y: w, zoom: y } = Ro(b, o, s, t.minZoom ?? r, t.maxZoom ?? i, t.padding ?? 0.1), E = Ge.translate(u, w).scale(y);
|
|
1841
1846
|
return typeof t.duration == "number" && t.duration > 0 ? l.transform(r1(c, t.duration), E) : l.transform(c, E), !0;
|
|
1842
1847
|
}
|
|
1843
1848
|
}
|
|
@@ -1898,11 +1903,11 @@ const y1 = () => {
|
|
|
1898
1903
|
},
|
|
1899
1904
|
fitView: (s) => os(e.getState, s),
|
|
1900
1905
|
setCenter: (s, r, i) => {
|
|
1901
|
-
const { width: l, height: c, maxZoom: h } = e.getState(), f = typeof (i == null ? void 0 : i.zoom) < "u" ? i.zoom : h,
|
|
1906
|
+
const { width: l, height: c, maxZoom: h } = e.getState(), f = typeof (i == null ? void 0 : i.zoom) < "u" ? i.zoom : h, d = l / 2 - s * f, m = c / 2 - r * f, C = Ge.translate(d, m).scale(f);
|
|
1902
1907
|
t.transform(r1(n, i == null ? void 0 : i.duration), C);
|
|
1903
1908
|
},
|
|
1904
1909
|
fitBounds: (s, r) => {
|
|
1905
|
-
const { width: i, height: l, minZoom: c, maxZoom: h } = e.getState(), { x: f, y:
|
|
1910
|
+
const { width: i, height: l, minZoom: c, maxZoom: h } = e.getState(), { x: f, y: d, zoom: m } = Ro(s, i, l, c, h, (r == null ? void 0 : r.padding) ?? 0.1), C = Ge.translate(f, d).scale(m);
|
|
1906
1911
|
t.transform(r1(n, r == null ? void 0 : r.duration), C);
|
|
1907
1912
|
},
|
|
1908
1913
|
// @deprecated Use `screenToFlowPosition`.
|
|
@@ -1914,11 +1919,11 @@ const y1 = () => {
|
|
|
1914
1919
|
const { transform: r, snapToGrid: i, snapGrid: l, domNode: c } = e.getState();
|
|
1915
1920
|
if (!c)
|
|
1916
1921
|
return s;
|
|
1917
|
-
const { x: h, y: f } = c.getBoundingClientRect(),
|
|
1922
|
+
const { x: h, y: f } = c.getBoundingClientRect(), d = {
|
|
1918
1923
|
x: s.x - h,
|
|
1919
1924
|
y: s.y - f
|
|
1920
1925
|
};
|
|
1921
|
-
return g2(
|
|
1926
|
+
return g2(d, r, i, l);
|
|
1922
1927
|
},
|
|
1923
1928
|
flowToScreenPosition: (s) => {
|
|
1924
1929
|
const { transform: r, domNode: i } = e.getState();
|
|
@@ -1939,42 +1944,42 @@ function ke() {
|
|
|
1939
1944
|
return v.map((b) => ({ ...b }));
|
|
1940
1945
|
}, []), r = oe((v) => {
|
|
1941
1946
|
const { edges: b = [] } = t.getState();
|
|
1942
|
-
return b.find((
|
|
1947
|
+
return b.find((u) => u.id === v);
|
|
1943
1948
|
}, []), i = oe((v) => {
|
|
1944
|
-
const { getNodes: b, setNodes:
|
|
1949
|
+
const { getNodes: b, setNodes: u, hasDefaultNodes: w, onNodesChange: y } = t.getState(), E = b(), S = typeof v == "function" ? v(E) : v;
|
|
1945
1950
|
if (w)
|
|
1946
|
-
|
|
1951
|
+
u(S);
|
|
1947
1952
|
else if (y) {
|
|
1948
1953
|
const j = S.length === 0 ? E.map((_) => ({ type: "remove", id: _.id })) : S.map((_) => ({ item: _, type: "reset" }));
|
|
1949
1954
|
y(j);
|
|
1950
1955
|
}
|
|
1951
1956
|
}, []), l = oe((v) => {
|
|
1952
|
-
const { edges: b = [], setEdges:
|
|
1957
|
+
const { edges: b = [], setEdges: u, hasDefaultEdges: w, onEdgesChange: y } = t.getState(), E = typeof v == "function" ? v(b) : v;
|
|
1953
1958
|
if (w)
|
|
1954
|
-
|
|
1959
|
+
u(E);
|
|
1955
1960
|
else if (y) {
|
|
1956
1961
|
const S = E.length === 0 ? b.map((j) => ({ type: "remove", id: j.id })) : E.map((j) => ({ item: j, type: "reset" }));
|
|
1957
1962
|
y(S);
|
|
1958
1963
|
}
|
|
1959
1964
|
}, []), c = oe((v) => {
|
|
1960
|
-
const b = Array.isArray(v) ? v : [v], { getNodes:
|
|
1965
|
+
const b = Array.isArray(v) ? v : [v], { getNodes: u, setNodes: w, hasDefaultNodes: y, onNodesChange: E } = t.getState();
|
|
1961
1966
|
if (y) {
|
|
1962
|
-
const j = [...
|
|
1967
|
+
const j = [...u(), ...b];
|
|
1963
1968
|
w(j);
|
|
1964
1969
|
} else if (E) {
|
|
1965
1970
|
const S = b.map((j) => ({ item: j, type: "add" }));
|
|
1966
1971
|
E(S);
|
|
1967
1972
|
}
|
|
1968
1973
|
}, []), h = oe((v) => {
|
|
1969
|
-
const b = Array.isArray(v) ? v : [v], { edges:
|
|
1974
|
+
const b = Array.isArray(v) ? v : [v], { edges: u = [], setEdges: w, hasDefaultEdges: y, onEdgesChange: E } = t.getState();
|
|
1970
1975
|
if (y)
|
|
1971
|
-
w([...
|
|
1976
|
+
w([...u, ...b]);
|
|
1972
1977
|
else if (E) {
|
|
1973
1978
|
const S = b.map((j) => ({ item: j, type: "add" }));
|
|
1974
1979
|
E(S);
|
|
1975
1980
|
}
|
|
1976
1981
|
}, []), f = oe(() => {
|
|
1977
|
-
const { getNodes: v, edges: b = [], transform:
|
|
1982
|
+
const { getNodes: v, edges: b = [], transform: u } = t.getState(), [w, y, E] = u;
|
|
1978
1983
|
return {
|
|
1979
1984
|
nodes: v().map((S) => ({ ...S })),
|
|
1980
1985
|
edges: b.map((S) => ({ ...S })),
|
|
@@ -1984,8 +1989,8 @@ function ke() {
|
|
|
1984
1989
|
zoom: E
|
|
1985
1990
|
}
|
|
1986
1991
|
};
|
|
1987
|
-
}, []),
|
|
1988
|
-
const { nodeInternals:
|
|
1992
|
+
}, []), d = oe(({ nodes: v, edges: b }) => {
|
|
1993
|
+
const { nodeInternals: u, getNodes: w, edges: y, hasDefaultNodes: E, hasDefaultEdges: S, onNodesDelete: j, onEdgesDelete: _, onNodesChange: H, onEdgesChange: N } = t.getState(), I = (v || []).map((k) => k.id), D = (b || []).map((k) => k.id), P = w().reduce((k, L) => {
|
|
1989
1994
|
const A = L.parentNode || L.parentId, F = !I.includes(L.id) && A && k.find((V) => V.id === A);
|
|
1990
1995
|
return (typeof L.deletable == "boolean" ? L.deletable : !0) && (I.includes(L.id) || F) && k.push(L), k;
|
|
1991
1996
|
}, []), O = y.filter((k) => typeof k.deletable == "boolean" ? k.deletable : !0), p = O.filter((k) => D.includes(k.id));
|
|
@@ -1994,9 +1999,9 @@ function ke() {
|
|
|
1994
1999
|
if ((S || E) && (S && t.setState({
|
|
1995
2000
|
edges: y.filter((F) => !A.includes(F.id))
|
|
1996
2001
|
}), E && (P.forEach((F) => {
|
|
1997
|
-
|
|
2002
|
+
u.delete(F.id);
|
|
1998
2003
|
}), t.setState({
|
|
1999
|
-
nodeInternals: new Map(
|
|
2004
|
+
nodeInternals: new Map(u)
|
|
2000
2005
|
}))), A.length > 0 && (_ == null || _(L), N && N(A.map((F) => ({
|
|
2001
2006
|
id: F,
|
|
2002
2007
|
type: "remove"
|
|
@@ -2006,22 +2011,22 @@ function ke() {
|
|
|
2006
2011
|
}
|
|
2007
2012
|
}
|
|
2008
2013
|
}, []), m = oe((v) => {
|
|
2009
|
-
const b = K5(v),
|
|
2010
|
-
return !b && !
|
|
2011
|
-
}, []), C = oe((v, b = !0,
|
|
2014
|
+
const b = K5(v), u = b ? null : t.getState().nodeInternals.get(v.id);
|
|
2015
|
+
return !b && !u ? [null, null, b] : [b ? v : _n(u), u, b];
|
|
2016
|
+
}, []), C = oe((v, b = !0, u) => {
|
|
2012
2017
|
const [w, y, E] = m(v);
|
|
2013
|
-
return w ? (
|
|
2018
|
+
return w ? (u || t.getState().getNodes()).filter((S) => {
|
|
2014
2019
|
if (!E && (S.id === y.id || !S.positionAbsolute))
|
|
2015
2020
|
return !1;
|
|
2016
2021
|
const j = _n(S), _ = h2(j, w);
|
|
2017
2022
|
return b && _ > 0 || _ >= w.width * w.height;
|
|
2018
2023
|
}) : [];
|
|
2019
|
-
}, []), x = oe((v, b,
|
|
2024
|
+
}, []), x = oe((v, b, u = !0) => {
|
|
2020
2025
|
const [w] = m(v);
|
|
2021
2026
|
if (!w)
|
|
2022
2027
|
return !1;
|
|
2023
2028
|
const y = h2(w, b);
|
|
2024
|
-
return
|
|
2029
|
+
return u && y > 0 || y >= w.width * w.height;
|
|
2025
2030
|
}, []);
|
|
2026
2031
|
return xe(() => ({
|
|
2027
2032
|
...e,
|
|
@@ -2034,7 +2039,7 @@ function ke() {
|
|
|
2034
2039
|
addNodes: c,
|
|
2035
2040
|
addEdges: h,
|
|
2036
2041
|
toObject: f,
|
|
2037
|
-
deleteElements:
|
|
2042
|
+
deleteElements: d,
|
|
2038
2043
|
getIntersectingNodes: C,
|
|
2039
2044
|
isNodeIntersecting: x
|
|
2040
2045
|
}), [
|
|
@@ -2048,7 +2053,7 @@ function ke() {
|
|
|
2048
2053
|
c,
|
|
2049
2054
|
h,
|
|
2050
2055
|
f,
|
|
2051
|
-
|
|
2056
|
+
d,
|
|
2052
2057
|
C,
|
|
2053
2058
|
x
|
|
2054
2059
|
]);
|
|
@@ -2099,7 +2104,7 @@ const B2 = {
|
|
|
2099
2104
|
d3Selection: e.d3Selection,
|
|
2100
2105
|
d3ZoomHandler: e.d3ZoomHandler,
|
|
2101
2106
|
userSelectionActive: e.userSelectionActive
|
|
2102
|
-
}), V8 = ({ onMove: e, onMoveStart: t, onMoveEnd: n, onPaneContextMenu: o, zoomOnScroll: s = !0, zoomOnPinch: r = !0, panOnScroll: i = !1, panOnScrollSpeed: l = 0.5, panOnScrollMode: c = a1.Free, zoomOnDoubleClick: h = !0, elementsSelectable: f, panOnDrag:
|
|
2107
|
+
}), V8 = ({ onMove: e, onMoveStart: t, onMoveEnd: n, onPaneContextMenu: o, zoomOnScroll: s = !0, zoomOnPinch: r = !0, panOnScroll: i = !1, panOnScrollSpeed: l = 0.5, panOnScrollMode: c = a1.Free, zoomOnDoubleClick: h = !0, elementsSelectable: f, panOnDrag: d = !0, defaultViewport: m, translateExtent: C, minZoom: x, maxZoom: v, zoomActivationKeyCode: b, preventScrolling: u = !0, children: w, noWheelClassName: y, noPanClassName: E }) => {
|
|
2103
2108
|
const S = X(), j = fe(), _ = X(!1), H = X(!1), N = X(null), I = X({ x: 0, y: 0, zoom: 0 }), { d3Zoom: D, d3Selection: P, d3ZoomHandler: O, userSelectionActive: p } = ie(A8, Ce), k = X1(b), L = X(0), A = X(!1), F = X();
|
|
2104
2109
|
return k8(N), Y(() => {
|
|
2105
2110
|
if (N.current) {
|
|
@@ -2141,7 +2146,7 @@ const B2 = {
|
|
|
2141
2146
|
n == null || n(M, z), J == null || J(z), A.current = !1;
|
|
2142
2147
|
}, 150));
|
|
2143
2148
|
}, { passive: !1 }) : typeof O < "u" && P.on("wheel.zoom", function(M, V) {
|
|
2144
|
-
if (!
|
|
2149
|
+
if (!u && M.type === "wheel" && !M.ctrlKey || E1(M, y))
|
|
2145
2150
|
return null;
|
|
2146
2151
|
M.preventDefault(), O.call(this, M, V);
|
|
2147
2152
|
}, { passive: !1 }));
|
|
@@ -2154,7 +2159,7 @@ const B2 = {
|
|
|
2154
2159
|
O,
|
|
2155
2160
|
k,
|
|
2156
2161
|
r,
|
|
2157
|
-
|
|
2162
|
+
u,
|
|
2158
2163
|
y,
|
|
2159
2164
|
t,
|
|
2160
2165
|
e,
|
|
@@ -2172,31 +2177,31 @@ const B2 = {
|
|
|
2172
2177
|
D && (p && !_.current ? D.on("zoom", null) : p || D.on("zoom", (M) => {
|
|
2173
2178
|
var B;
|
|
2174
2179
|
const { onViewportChange: V } = j.getState();
|
|
2175
|
-
if (j.setState({ transform: [M.transform.x, M.transform.y, M.transform.k] }), H.current = !!(o && Tn(
|
|
2180
|
+
if (j.setState({ transform: [M.transform.x, M.transform.y, M.transform.k] }), H.current = !!(o && Tn(d, L.current ?? 0)), (e || V) && !((B = M.sourceEvent) != null && B.internal)) {
|
|
2176
2181
|
const R = ht(M.transform);
|
|
2177
2182
|
V == null || V(R), e == null || e(M.sourceEvent, R);
|
|
2178
2183
|
}
|
|
2179
2184
|
}));
|
|
2180
|
-
}, [p, D, e,
|
|
2185
|
+
}, [p, D, e, d, o]), Y(() => {
|
|
2181
2186
|
D && D.on("end", (M) => {
|
|
2182
2187
|
if (!M.sourceEvent || M.sourceEvent.internal)
|
|
2183
2188
|
return null;
|
|
2184
2189
|
const { onViewportChangeEnd: V } = j.getState();
|
|
2185
|
-
if (_.current = !1, j.setState({ paneDragging: !1 }), o && Tn(
|
|
2190
|
+
if (_.current = !1, j.setState({ paneDragging: !1 }), o && Tn(d, L.current ?? 0) && !H.current && o(M.sourceEvent), H.current = !1, (n || V) && H8(I.current, M.transform)) {
|
|
2186
2191
|
const B = ht(M.transform);
|
|
2187
2192
|
I.current = B, clearTimeout(S.current), S.current = setTimeout(() => {
|
|
2188
2193
|
V == null || V(B), n == null || n(M.sourceEvent, B);
|
|
2189
2194
|
}, i ? 150 : 0);
|
|
2190
2195
|
}
|
|
2191
2196
|
});
|
|
2192
|
-
}, [D, i,
|
|
2197
|
+
}, [D, i, d, n, o]), Y(() => {
|
|
2193
2198
|
D && D.filter((M) => {
|
|
2194
2199
|
const V = k || s, B = r && M.ctrlKey;
|
|
2195
|
-
if ((
|
|
2200
|
+
if ((d === !0 || Array.isArray(d) && d.includes(1)) && M.button === 1 && M.type === "mousedown" && (E1(M, "react-flow__node") || E1(M, "react-flow__edge")))
|
|
2196
2201
|
return !0;
|
|
2197
|
-
if (!
|
|
2202
|
+
if (!d && !V && !i && !h && !r || p || !h && M.type === "dblclick" || E1(M, y) && M.type === "wheel" || E1(M, E) && (M.type !== "wheel" || i && M.type === "wheel" && !k) || !r && M.ctrlKey && M.type === "wheel" || !V && !i && !B && M.type === "wheel" || !d && (M.type === "mousedown" || M.type === "touchstart") || Array.isArray(d) && !d.includes(M.button) && M.type === "mousedown")
|
|
2198
2203
|
return !1;
|
|
2199
|
-
const R = Array.isArray(
|
|
2204
|
+
const R = Array.isArray(d) && d.includes(M.button) || !M.button || M.button <= 1;
|
|
2200
2205
|
return (!M.ctrlKey || M.type === "wheel") && R;
|
|
2201
2206
|
});
|
|
2202
2207
|
}, [
|
|
@@ -2206,7 +2211,7 @@ const B2 = {
|
|
|
2206
2211
|
r,
|
|
2207
2212
|
i,
|
|
2208
2213
|
h,
|
|
2209
|
-
|
|
2214
|
+
d,
|
|
2210
2215
|
f,
|
|
2211
2216
|
k
|
|
2212
2217
|
]), T.createElement("div", { className: "react-flow__renderer", ref: N, style: B2 }, w);
|
|
@@ -2289,8 +2294,8 @@ const o2 = (e, t) => (n) => {
|
|
|
2289
2294
|
userSelectionActive: e.userSelectionActive,
|
|
2290
2295
|
elementsSelectable: e.elementsSelectable,
|
|
2291
2296
|
dragging: e.paneDragging
|
|
2292
|
-
}), ss = le(({ isSelecting: e, selectionMode: t = Y1.Full, panOnDrag: n, onSelectionStart: o, onSelectionEnd: s, onPaneClick: r, onPaneContextMenu: i, onPaneScroll: l, onPaneMouseEnter: c, onPaneMouseMove: h, onPaneMouseLeave: f, children:
|
|
2293
|
-
const m = X(null), C = fe(), x = X(0), v = X(0), b = X(), { userSelectionActive:
|
|
2297
|
+
}), ss = le(({ isSelecting: e, selectionMode: t = Y1.Full, panOnDrag: n, onSelectionStart: o, onSelectionEnd: s, onPaneClick: r, onPaneContextMenu: i, onPaneScroll: l, onPaneMouseEnter: c, onPaneMouseMove: h, onPaneMouseLeave: f, children: d }) => {
|
|
2298
|
+
const m = X(null), C = fe(), x = X(0), v = X(0), b = X(), { userSelectionActive: u, elementsSelectable: w, dragging: y } = ie(B8, Ce), E = () => {
|
|
2294
2299
|
C.setState({ userSelectionActive: !1, userSelectionRect: null }), x.current = 0, v.current = 0;
|
|
2295
2300
|
}, S = (O) => {
|
|
2296
2301
|
r == null || r(O), C.getState().resetSelectedElements(), C.setState({ nodesSelectionActive: !1 });
|
|
@@ -2344,14 +2349,14 @@ const o2 = (e, t) => (n) => {
|
|
|
2344
2349
|
if (O.button !== 0)
|
|
2345
2350
|
return;
|
|
2346
2351
|
const { userSelectionRect: p } = C.getState();
|
|
2347
|
-
!
|
|
2352
|
+
!u && p && O.target === m.current && (S == null || S(O)), C.setState({ nodesSelectionActive: x.current > 0 }), E(), s == null || s(O);
|
|
2348
2353
|
}, D = (O) => {
|
|
2349
|
-
|
|
2350
|
-
}, P = w && (e ||
|
|
2354
|
+
u && (C.setState({ nodesSelectionActive: x.current > 0 }), s == null || s(O)), E();
|
|
2355
|
+
}, P = w && (e || u);
|
|
2351
2356
|
return T.createElement(
|
|
2352
2357
|
"div",
|
|
2353
2358
|
{ className: ye(["react-flow__pane", { dragging: y, selection: e }]), onClick: P ? void 0 : o2(S, m), onContextMenu: o2(j, m), onWheel: o2(_, m), onMouseEnter: P ? void 0 : c, onMouseDown: P ? H : void 0, onMouseMove: P ? N : h, onMouseUp: P ? I : void 0, onMouseLeave: P ? D : f, ref: m, style: B2 },
|
|
2354
|
-
|
|
2359
|
+
d,
|
|
2355
2360
|
T.createElement(D8, null)
|
|
2356
2361
|
);
|
|
2357
2362
|
});
|
|
@@ -2407,18 +2412,18 @@ function is(e, t, n, o, s = [0, 0], r) {
|
|
|
2407
2412
|
const c = e.parentNode || e.parentId;
|
|
2408
2413
|
if (e.extent === "parent" && !e.expandParent)
|
|
2409
2414
|
if (c && e.width && e.height) {
|
|
2410
|
-
const
|
|
2411
|
-
l =
|
|
2415
|
+
const d = n.get(c), { x: m, y: C } = _1(d, s).positionAbsolute;
|
|
2416
|
+
l = d && Me(m) && Me(C) && Me(d.width) && Me(d.height) ? [
|
|
2412
2417
|
[m + e.width * s[0], C + e.height * s[1]],
|
|
2413
2418
|
[
|
|
2414
|
-
m +
|
|
2415
|
-
C +
|
|
2419
|
+
m + d.width - e.width + e.width * s[0],
|
|
2420
|
+
C + d.height - e.height + e.height * s[1]
|
|
2416
2421
|
]
|
|
2417
2422
|
] : l;
|
|
2418
2423
|
} else
|
|
2419
2424
|
r == null || r("005", Ie.error005()), l = i;
|
|
2420
2425
|
else if (e.extent && c && e.extent !== "parent") {
|
|
2421
|
-
const
|
|
2426
|
+
const d = n.get(c), { x: m, y: C } = _1(d, s).positionAbsolute;
|
|
2422
2427
|
l = [
|
|
2423
2428
|
[e.extent[0][0] + m, e.extent[0][1] + C],
|
|
2424
2429
|
[e.extent[1][0] + m, e.extent[1][1] + C]
|
|
@@ -2426,8 +2431,8 @@ function is(e, t, n, o, s = [0, 0], r) {
|
|
|
2426
2431
|
}
|
|
2427
2432
|
let h = { x: 0, y: 0 };
|
|
2428
2433
|
if (c) {
|
|
2429
|
-
const
|
|
2430
|
-
h = _1(
|
|
2434
|
+
const d = n.get(c);
|
|
2435
|
+
h = _1(d, s).positionAbsolute;
|
|
2431
2436
|
}
|
|
2432
2437
|
const f = l && l !== "parent" ? j2(t, l) : t;
|
|
2433
2438
|
return {
|
|
@@ -2500,12 +2505,12 @@ function r2(e) {
|
|
|
2500
2505
|
return (t, n, o) => e == null ? void 0 : e(t, o);
|
|
2501
2506
|
}
|
|
2502
2507
|
function as({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector: o, nodeId: s, isSelectable: r, selectNodesOnDrag: i }) {
|
|
2503
|
-
const l = fe(), [c, h] = se(!1), f = X([]),
|
|
2508
|
+
const l = fe(), [c, h] = se(!1), f = X([]), d = X({ x: null, y: null }), m = X(0), C = X(null), x = X({ x: 0, y: 0 }), v = X(null), b = X(!1), u = X(!1), w = X(!1), y = O8();
|
|
2504
2509
|
return Y(() => {
|
|
2505
2510
|
if (e != null && e.current) {
|
|
2506
2511
|
const E = Te(e.current), S = ({ x: H, y: N }) => {
|
|
2507
2512
|
const { nodeInternals: I, onNodeDrag: D, onSelectionDrag: P, updateNodePositions: O, nodeExtent: p, snapGrid: k, snapToGrid: L, nodeOrigin: A, onError: F } = l.getState();
|
|
2508
|
-
|
|
2513
|
+
d.current = { x: H, y: N };
|
|
2509
2514
|
let M = !1, V = { x: 0, y: 0, x2: 0, y2: 0 };
|
|
2510
2515
|
if (f.current.length > 1 && p) {
|
|
2511
2516
|
const R = D2(f.current, A);
|
|
@@ -2539,13 +2544,13 @@ function as({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
|
|
|
2539
2544
|
const [H, N] = ko(x.current, C.current);
|
|
2540
2545
|
if (H !== 0 || N !== 0) {
|
|
2541
2546
|
const { transform: I, panBy: D } = l.getState();
|
|
2542
|
-
|
|
2547
|
+
d.current.x = (d.current.x ?? 0) - H / I[2], d.current.y = (d.current.y ?? 0) - N / I[2], D({ x: H, y: N }) && S(d.current);
|
|
2543
2548
|
}
|
|
2544
2549
|
m.current = requestAnimationFrame(j);
|
|
2545
2550
|
}, _ = (H) => {
|
|
2546
2551
|
var A;
|
|
2547
2552
|
const { nodeInternals: N, multiSelectionActive: I, nodesDraggable: D, unselectNodesAndEdges: P, onNodeDragStart: O, onSelectionDragStart: p } = l.getState();
|
|
2548
|
-
|
|
2553
|
+
u.current = !0;
|
|
2549
2554
|
const k = s ? O : r2(p);
|
|
2550
2555
|
(!i || !r) && !I && s && ((A = N.get(s)) != null && A.selected || P()), s && r && i && x2({
|
|
2551
2556
|
id: s,
|
|
@@ -2553,7 +2558,7 @@ function as({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
|
|
|
2553
2558
|
nodeRef: e
|
|
2554
2559
|
});
|
|
2555
2560
|
const L = y(H);
|
|
2556
|
-
if (
|
|
2561
|
+
if (d.current = L, f.current = F8(N, D, L, s), k && f.current) {
|
|
2557
2562
|
const [F, M] = s2({
|
|
2558
2563
|
nodeId: s,
|
|
2559
2564
|
dragItems: f.current,
|
|
@@ -2569,19 +2574,19 @@ function as({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
|
|
|
2569
2574
|
const { domNode: I, nodeDragThreshold: D } = l.getState();
|
|
2570
2575
|
D === 0 && _(N), w.current = !1;
|
|
2571
2576
|
const P = y(N);
|
|
2572
|
-
|
|
2577
|
+
d.current = P, C.current = (I == null ? void 0 : I.getBoundingClientRect()) || null, x.current = qe(N.sourceEvent, C.current);
|
|
2573
2578
|
}).on("drag", (N) => {
|
|
2574
2579
|
var O, p;
|
|
2575
2580
|
const I = y(N), { autoPanOnNodeDrag: D, nodeDragThreshold: P } = l.getState();
|
|
2576
2581
|
if (N.sourceEvent.type === "touchmove" && N.sourceEvent.touches.length > 1 && (w.current = !0), !w.current) {
|
|
2577
|
-
if (!b.current &&
|
|
2578
|
-
const k = I.xSnapped - (((O =
|
|
2582
|
+
if (!b.current && u.current && D && (b.current = !0, j()), !u.current) {
|
|
2583
|
+
const k = I.xSnapped - (((O = d == null ? void 0 : d.current) == null ? void 0 : O.x) ?? 0), L = I.ySnapped - (((p = d == null ? void 0 : d.current) == null ? void 0 : p.y) ?? 0);
|
|
2579
2584
|
Math.sqrt(k * k + L * L) > P && _(N);
|
|
2580
2585
|
}
|
|
2581
|
-
(
|
|
2586
|
+
(d.current.x !== I.xSnapped || d.current.y !== I.ySnapped) && f.current && u.current && (v.current = N.sourceEvent, x.current = qe(N.sourceEvent, C.current), S(I));
|
|
2582
2587
|
}
|
|
2583
2588
|
}).on("end", (N) => {
|
|
2584
|
-
if (!(!
|
|
2589
|
+
if (!(!u.current || w.current) && (h(!1), b.current = !1, u.current = !1, cancelAnimationFrame(m.current), f.current)) {
|
|
2585
2590
|
const { updateNodePositions: I, nodeInternals: D, onNodeDragStop: P, onSelectionDragStop: O } = l.getState(), p = s ? P : r2(O);
|
|
2586
2591
|
if (I(f.current, !1, !1), p) {
|
|
2587
2592
|
const [k, L] = s2({
|
|
@@ -2616,7 +2621,7 @@ function as({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
|
|
|
2616
2621
|
function ls() {
|
|
2617
2622
|
const e = fe();
|
|
2618
2623
|
return oe((n) => {
|
|
2619
|
-
const { nodeInternals: o, nodeExtent: s, updateNodePositions: r, getNodes: i, snapToGrid: l, snapGrid: c, onError: h, nodesDraggable: f } = e.getState(),
|
|
2624
|
+
const { nodeInternals: o, nodeExtent: s, updateNodePositions: r, getNodes: i, snapToGrid: l, snapGrid: c, onError: h, nodesDraggable: f } = e.getState(), d = i().filter((w) => w.selected && (w.draggable || f && typeof w.draggable > "u")), m = l ? c[0] : 5, C = l ? c[1] : 5, x = n.isShiftPressed ? 4 : 1, v = n.x * m * x, b = n.y * C * x, u = d.map((w) => {
|
|
2620
2625
|
if (w.positionAbsolute) {
|
|
2621
2626
|
const y = { x: w.positionAbsolute.x + v, y: w.positionAbsolute.y + b };
|
|
2622
2627
|
l && (y.x = c[0] * Math.round(y.x / c[0]), y.y = c[1] * Math.round(y.y / c[1]));
|
|
@@ -2625,7 +2630,7 @@ function ls() {
|
|
|
2625
2630
|
}
|
|
2626
2631
|
return w;
|
|
2627
2632
|
});
|
|
2628
|
-
r(
|
|
2633
|
+
r(u, !0, !1);
|
|
2629
2634
|
}, []);
|
|
2630
2635
|
}
|
|
2631
2636
|
const S1 = {
|
|
@@ -2635,8 +2640,8 @@ const S1 = {
|
|
|
2635
2640
|
ArrowRight: { x: 1, y: 0 }
|
|
2636
2641
|
};
|
|
2637
2642
|
var R1 = (e) => {
|
|
2638
|
-
const t = ({ id: n, type: o, data: s, xPos: r, yPos: i, xPosOrigin: l, yPosOrigin: c, selected: h, onClick: f, onMouseEnter:
|
|
2639
|
-
const B = fe(), R = X(null), W = X(null), z = X(_), U = X(H), q = X(o), J = y || w || f ||
|
|
2643
|
+
const t = ({ id: n, type: o, data: s, xPos: r, yPos: i, xPosOrigin: l, yPosOrigin: c, selected: h, onClick: f, onMouseEnter: d, onMouseMove: m, onMouseLeave: C, onContextMenu: x, onDoubleClick: v, style: b, className: u, isDraggable: w, isSelectable: y, isConnectable: E, isFocusable: S, selectNodesOnDrag: j, sourcePosition: _, targetPosition: H, hidden: N, resizeObserver: I, dragHandle: D, zIndex: P, isParent: O, noDragClassName: p, noPanClassName: k, initialized: L, disableKeyboardA11y: A, ariaLabel: F, rfId: M, hasHandleBounds: V }) => {
|
|
2644
|
+
const B = fe(), R = X(null), W = X(null), z = X(_), U = X(H), q = X(o), J = y || w || f || d || m || C, ee = ls(), te = O1(n, B.getState, d), ne = O1(n, B.getState, m), we = O1(n, B.getState, C), _e = O1(n, B.getState, x), He = O1(n, B.getState, v), Se = (re) => {
|
|
2640
2645
|
const { nodeDragThreshold: K } = B.getState();
|
|
2641
2646
|
if (y && (!j || !w || K > 0) && x2({
|
|
2642
2647
|
id: n,
|
|
@@ -2693,7 +2698,7 @@ var R1 = (e) => {
|
|
|
2693
2698
|
// this is overwritable by passing `nopan` as a class name
|
|
2694
2699
|
[k]: w
|
|
2695
2700
|
},
|
|
2696
|
-
|
|
2701
|
+
u,
|
|
2697
2702
|
{
|
|
2698
2703
|
selected: h,
|
|
2699
2704
|
selectable: y,
|
|
@@ -2725,14 +2730,14 @@ const R8 = (e) => {
|
|
|
2725
2730
|
};
|
|
2726
2731
|
};
|
|
2727
2732
|
function z8({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y: n }) {
|
|
2728
|
-
const o = fe(), { width: s, height: r, x: i, y: l, transformString: c, userSelectionActive: h } = ie(R8, Ce), f = ls(),
|
|
2733
|
+
const o = fe(), { width: s, height: r, x: i, y: l, transformString: c, userSelectionActive: h } = ie(R8, Ce), f = ls(), d = X(null);
|
|
2729
2734
|
if (Y(() => {
|
|
2730
2735
|
var x;
|
|
2731
|
-
n || (x =
|
|
2736
|
+
n || (x = d.current) == null || x.focus({
|
|
2732
2737
|
preventScroll: !0
|
|
2733
2738
|
});
|
|
2734
2739
|
}, [n]), as({
|
|
2735
|
-
nodeRef:
|
|
2740
|
+
nodeRef: d
|
|
2736
2741
|
}), h || !s || !r)
|
|
2737
2742
|
return null;
|
|
2738
2743
|
const m = e ? (x) => {
|
|
@@ -2750,7 +2755,7 @@ function z8({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y:
|
|
|
2750
2755
|
{ className: ye(["react-flow__nodesselection", "react-flow__container", t]), style: {
|
|
2751
2756
|
transform: c
|
|
2752
2757
|
} },
|
|
2753
|
-
T.createElement("div", { ref:
|
|
2758
|
+
T.createElement("div", { ref: d, className: "react-flow__nodesselection-rect", onContextMenu: m, tabIndex: n ? void 0 : -1, onKeyDown: n ? void 0 : C, style: {
|
|
2754
2759
|
width: s,
|
|
2755
2760
|
height: r,
|
|
2756
2761
|
top: l,
|
|
@@ -2759,8 +2764,8 @@ function z8({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y:
|
|
|
2759
2764
|
);
|
|
2760
2765
|
}
|
|
2761
2766
|
var W8 = le(z8);
|
|
2762
|
-
const $8 = (e) => e.nodesSelectionActive, cs = ({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove: o, onPaneMouseLeave: s, onPaneContextMenu: r, onPaneScroll: i, deleteKeyCode: l, onMove: c, onMoveStart: h, onMoveEnd: f, selectionKeyCode:
|
|
2763
|
-
const V = ie($8), B = X1(
|
|
2767
|
+
const $8 = (e) => e.nodesSelectionActive, cs = ({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove: o, onPaneMouseLeave: s, onPaneContextMenu: r, onPaneScroll: i, deleteKeyCode: l, onMove: c, onMoveStart: h, onMoveEnd: f, selectionKeyCode: d, selectionOnDrag: m, selectionMode: C, onSelectionStart: x, onSelectionEnd: v, multiSelectionKeyCode: b, panActivationKeyCode: u, zoomActivationKeyCode: w, elementsSelectable: y, zoomOnScroll: E, zoomOnPinch: S, panOnScroll: j, panOnScrollSpeed: _, panOnScrollMode: H, zoomOnDoubleClick: N, panOnDrag: I, defaultViewport: D, translateExtent: P, minZoom: O, maxZoom: p, preventScrolling: k, onSelectionContextMenu: L, noWheelClassName: A, noPanClassName: F, disableKeyboardA11y: M }) => {
|
|
2768
|
+
const V = ie($8), B = X1(d), R = X1(u), W = R || I, z = R || j, U = B || m && W !== !0;
|
|
2764
2769
|
return j8({ deleteKeyCode: l, multiSelectionKeyCode: b }), T.createElement(
|
|
2765
2770
|
V8,
|
|
2766
2771
|
{ onMove: c, onMoveStart: h, onMoveEnd: f, onPaneContextMenu: r, elementsSelectable: y, zoomOnScroll: E, zoomOnPinch: S, panOnScroll: z, panOnScrollSpeed: _, panOnScrollMode: H, zoomOnDoubleClick: N, panOnDrag: !B && W, defaultViewport: D, translateExtent: P, minZoom: O, maxZoom: p, zoomActivationKeyCode: w, preventScrolling: k, noWheelClassName: A, noPanClassName: F },
|
|
@@ -2803,8 +2808,8 @@ const X8 = ({ x: e, y: t, width: n, height: o, origin: s }) => !n || !o ? { x: e
|
|
|
2803
2808
|
const { nodesDraggable: t, nodesConnectable: n, nodesFocusable: o, elementsSelectable: s, updateNodeDimensions: r, onError: i } = ie(G8, Ce), l = K8(e.onlyRenderVisibleElements), c = X(), h = xe(() => {
|
|
2804
2809
|
if (typeof ResizeObserver > "u")
|
|
2805
2810
|
return null;
|
|
2806
|
-
const f = new ResizeObserver((
|
|
2807
|
-
const m =
|
|
2811
|
+
const f = new ResizeObserver((d) => {
|
|
2812
|
+
const m = d.map((C) => ({
|
|
2808
2813
|
id: C.target.getAttribute("data-id"),
|
|
2809
2814
|
nodeElement: C.target,
|
|
2810
2815
|
forceUpdate: !0
|
|
@@ -2818,23 +2823,23 @@ const X8 = ({ x: e, y: t, width: n, height: o, origin: s }) => !n || !o ? { x: e
|
|
|
2818
2823
|
(f = c == null ? void 0 : c.current) == null || f.disconnect();
|
|
2819
2824
|
}, []), T.createElement("div", { className: "react-flow__nodes", style: B2 }, l.map((f) => {
|
|
2820
2825
|
var S, j, _;
|
|
2821
|
-
let
|
|
2822
|
-
e.nodeTypes[
|
|
2823
|
-
const m = e.nodeTypes[
|
|
2826
|
+
let d = f.type || "default";
|
|
2827
|
+
e.nodeTypes[d] || (i == null || i("003", Ie.error003(d)), d = "default");
|
|
2828
|
+
const m = e.nodeTypes[d] || e.nodeTypes.default, C = !!(f.draggable || t && typeof f.draggable > "u"), x = !!(f.selectable || s && typeof f.selectable > "u"), v = !!(f.connectable || n && typeof f.connectable > "u"), b = !!(f.focusable || o && typeof f.focusable > "u"), u = e.nodeExtent ? j2(f.positionAbsolute, e.nodeExtent) : f.positionAbsolute, w = (u == null ? void 0 : u.x) ?? 0, y = (u == null ? void 0 : u.y) ?? 0, E = X8({
|
|
2824
2829
|
x: w,
|
|
2825
2830
|
y,
|
|
2826
2831
|
width: f.width ?? 0,
|
|
2827
2832
|
height: f.height ?? 0,
|
|
2828
2833
|
origin: e.nodeOrigin
|
|
2829
2834
|
});
|
|
2830
|
-
return T.createElement(m, { key: f.id, id: f.id, className: f.className, style: f.style, type:
|
|
2835
|
+
return T.createElement(m, { key: f.id, id: f.id, className: f.className, style: f.style, type: d, data: f.data, sourcePosition: f.sourcePosition || $.Bottom, targetPosition: f.targetPosition || $.Top, hidden: f.hidden, xPos: w, yPos: y, xPosOrigin: E.x, yPosOrigin: E.y, selectNodesOnDrag: e.selectNodesOnDrag, onClick: e.onNodeClick, onMouseEnter: e.onNodeMouseEnter, onMouseMove: e.onNodeMouseMove, onMouseLeave: e.onNodeMouseLeave, onContextMenu: e.onNodeContextMenu, onDoubleClick: e.onNodeDoubleClick, selected: !!f.selected, isDraggable: C, isSelectable: x, isConnectable: v, isFocusable: b, resizeObserver: h, dragHandle: f.dragHandle, zIndex: ((S = f[ae]) == null ? void 0 : S.z) ?? 0, isParent: !!((j = f[ae]) != null && j.isParent), noDragClassName: e.noDragClassName, noPanClassName: e.noPanClassName, initialized: !!f.width && !!f.height, rfId: e.rfId, disableKeyboardA11y: e.disableKeyboardA11y, ariaLabel: f.ariaLabel, hasHandleBounds: !!((_ = f[ae]) != null && _.handleBounds) });
|
|
2831
2836
|
}));
|
|
2832
2837
|
};
|
|
2833
2838
|
ds.displayName = "NodeRenderer";
|
|
2834
2839
|
var q8 = le(ds);
|
|
2835
2840
|
const J8 = (e, t, n) => n === $.Left ? e - t : n === $.Right ? e + t : e, Q8 = (e, t, n) => n === $.Top ? e - t : n === $.Bottom ? e + t : e, Fn = "react-flow__edgeupdater", Pn = ({ position: e, centerX: t, centerY: n, radius: o = 10, onMouseDown: s, onMouseEnter: r, onMouseOut: i, type: l }) => T.createElement("circle", { onMouseDown: s, onMouseEnter: r, onMouseOut: i, className: ye([Fn, `${Fn}-${l}`]), cx: J8(t, o, e), cy: Q8(n, o, e), r: o, stroke: "transparent", fill: "transparent" }), e6 = () => !0;
|
|
2836
2841
|
var v1 = (e) => {
|
|
2837
|
-
const t = ({ id: n, className: o, type: s, data: r, onClick: i, onEdgeDoubleClick: l, selected: c, animated: h, label: f, labelStyle:
|
|
2842
|
+
const t = ({ id: n, className: o, type: s, data: r, onClick: i, onEdgeDoubleClick: l, selected: c, animated: h, label: f, labelStyle: d, labelShowBg: m, labelBgStyle: C, labelBgPadding: x, labelBgBorderRadius: v, style: b, source: u, target: w, sourceX: y, sourceY: E, targetX: S, targetY: j, sourcePosition: _, targetPosition: H, elementsSelectable: N, hidden: I, sourceHandleId: D, targetHandleId: P, onContextMenu: O, onMouseEnter: p, onMouseMove: k, onMouseLeave: L, reconnectRadius: A, onReconnect: F, onReconnectStart: M, onReconnectEnd: V, markerEnd: B, markerStart: R, rfId: W, ariaLabel: z, isFocusable: U, isReconnectable: q, pathOptions: J, interactionWidth: ee, disableKeyboardA11y: te }) => {
|
|
2838
2843
|
const ne = X(null), [we, _e] = se(!1), [He, Se] = se(!1), ce = fe(), Ze = xe(() => `url('#${m2(R, W)}')`, [R, W]), re = xe(() => `url('#${m2(B, W)}')`, [B, W]);
|
|
2839
2844
|
if (I)
|
|
2840
2845
|
return null;
|
|
@@ -2845,7 +2850,7 @@ var v1 = (e) => {
|
|
|
2845
2850
|
}, be = P1(n, ce.getState, l), Je = P1(n, ce.getState, O), D1 = P1(n, ce.getState, p), f1 = P1(n, ce.getState, k), C1 = P1(n, ce.getState, L), Re = (me, Ae) => {
|
|
2846
2851
|
if (me.button !== 0)
|
|
2847
2852
|
return;
|
|
2848
|
-
const { edges: t1, isValidConnection: n1 } = ce.getState(), o1 = Ae ? w :
|
|
2853
|
+
const { edges: t1, isValidConnection: n1 } = ce.getState(), o1 = Ae ? w : u, ze = (Ae ? P : D) || null, Be = Ae ? "target" : "source", Z1 = n1 || e6, Ot = Ae, B1 = t1.find((s1) => s1.id === n);
|
|
2849
2854
|
Se(!0), M == null || M(me, B1, Be);
|
|
2850
2855
|
const Rt = (s1) => {
|
|
2851
2856
|
Se(!1), V == null || V(s1, B1, Be);
|
|
@@ -2876,8 +2881,8 @@ var v1 = (e) => {
|
|
|
2876
2881
|
`react-flow__edge-${s}`,
|
|
2877
2882
|
o,
|
|
2878
2883
|
{ selected: c, animated: h, inactive: p1, updating: we }
|
|
2879
|
-
]), onClick: K, onDoubleClick: be, onContextMenu: Je, onMouseEnter: D1, onMouseMove: f1, onMouseLeave: C1, onKeyDown: U ? I1 : void 0, tabIndex: U ? 0 : void 0, role: U ? "button" : "img", "data-testid": `rf__edge-${n}`, "aria-label": z === null ? void 0 : z || `Edge from ${
|
|
2880
|
-
!He && T.createElement(e, { id: n, source:
|
|
2884
|
+
]), onClick: K, onDoubleClick: be, onContextMenu: Je, onMouseEnter: D1, onMouseMove: f1, onMouseLeave: C1, onKeyDown: U ? I1 : void 0, tabIndex: U ? 0 : void 0, role: U ? "button" : "img", "data-testid": `rf__edge-${n}`, "aria-label": z === null ? void 0 : z || `Edge from ${u} to ${w}`, "aria-describedby": U ? `${es}-${W}` : void 0, ref: ne },
|
|
2885
|
+
!He && T.createElement(e, { id: n, source: u, target: w, selected: c, animated: h, label: f, labelStyle: d, labelShowBg: m, labelBgStyle: C, labelBgPadding: x, labelBgBorderRadius: v, data: r, style: b, sourceX: y, sourceY: E, targetX: S, targetY: j, sourcePosition: _, targetPosition: H, sourceHandleId: D, targetHandleId: P, markerStart: Ze, markerEnd: re, pathOptions: J, interactionWidth: ee }),
|
|
2881
2886
|
q && T.createElement(
|
|
2882
2887
|
T.Fragment,
|
|
2883
2888
|
null,
|
|
@@ -2951,8 +2956,8 @@ function o6({ sourcePos: e, targetPos: t, sourceWidth: n, sourceHeight: o, targe
|
|
|
2951
2956
|
y: (0 - c[1]) / c[2],
|
|
2952
2957
|
width: i / c[2],
|
|
2953
2958
|
height: l / c[2]
|
|
2954
|
-
}),
|
|
2955
|
-
return Math.ceil(
|
|
2959
|
+
}), d = Math.max(0, Math.min(f.x2, h.x2) - Math.max(f.x, h.x)), m = Math.max(0, Math.min(f.y2, h.y2) - Math.max(f.y, h.y));
|
|
2960
|
+
return Math.ceil(d * m) > 0;
|
|
2956
2961
|
}
|
|
2957
2962
|
function zn(e) {
|
|
2958
2963
|
var o, s, r, i, l;
|
|
@@ -2972,11 +2977,11 @@ const s6 = [{ level: 0, isMaxLevel: !0, edges: [] }];
|
|
|
2972
2977
|
function r6(e, t, n = !1) {
|
|
2973
2978
|
let o = -1;
|
|
2974
2979
|
const s = e.reduce((i, l) => {
|
|
2975
|
-
var f,
|
|
2980
|
+
var f, d;
|
|
2976
2981
|
const c = Me(l.zIndex);
|
|
2977
2982
|
let h = c ? l.zIndex : 0;
|
|
2978
2983
|
if (n) {
|
|
2979
|
-
const m = t.get(l.target), C = t.get(l.source), x = l.selected || (m == null ? void 0 : m.selected) || (C == null ? void 0 : C.selected), v = Math.max(((f = C == null ? void 0 : C[ae]) == null ? void 0 : f.z) || 0, ((
|
|
2984
|
+
const m = t.get(l.target), C = t.get(l.source), x = l.selected || (m == null ? void 0 : m.selected) || (C == null ? void 0 : C.selected), v = Math.max(((f = C == null ? void 0 : C[ae]) == null ? void 0 : f.z) || 0, ((d = m == null ? void 0 : m[ae]) == null ? void 0 : d.z) || 0, 1e3);
|
|
2980
2985
|
h = (c ? l.zIndex : 0) + (x ? v : 0);
|
|
2981
2986
|
}
|
|
2982
2987
|
return i[h] ? i[h].push(l) : i[h] = [l], o = h > o ? h : o, i;
|
|
@@ -3060,7 +3065,7 @@ const f6 = (e) => ({
|
|
|
3060
3065
|
connectionMode: e.connectionMode,
|
|
3061
3066
|
nodeInternals: e.nodeInternals,
|
|
3062
3067
|
onError: e.onError
|
|
3063
|
-
}), hs = ({ defaultMarkerColor: e, onlyRenderVisibleElements: t, elevateEdgesOnSelect: n, rfId: o, edgeTypes: s, noPanClassName: r, onEdgeContextMenu: i, onEdgeMouseEnter: l, onEdgeMouseMove: c, onEdgeMouseLeave: h, onEdgeClick: f, onEdgeDoubleClick:
|
|
3068
|
+
}), hs = ({ defaultMarkerColor: e, onlyRenderVisibleElements: t, elevateEdgesOnSelect: n, rfId: o, edgeTypes: s, noPanClassName: r, onEdgeContextMenu: i, onEdgeMouseEnter: l, onEdgeMouseMove: c, onEdgeMouseLeave: h, onEdgeClick: f, onEdgeDoubleClick: d, onReconnect: m, onReconnectStart: C, onReconnectEnd: x, reconnectRadius: v, children: b, disableKeyboardA11y: u }) => {
|
|
3064
3069
|
const { edgesFocusable: w, edgesUpdatable: y, elementsSelectable: E, width: S, height: j, connectionMode: _, nodeInternals: H, onError: N } = ie(f6, Ce), I = i6(t, H, n);
|
|
3065
3070
|
return S ? T.createElement(
|
|
3066
3071
|
T.Fragment,
|
|
@@ -3079,7 +3084,7 @@ const f6 = (e) => ({
|
|
|
3079
3084
|
if (!z || !U)
|
|
3080
3085
|
return N == null || N("008", Ie.error008(z, p)), null;
|
|
3081
3086
|
const { sourceX: we, sourceY: _e, targetX: He, targetY: Se } = n6(k, z, q, F, U, J);
|
|
3082
|
-
return T.createElement(R, { key: p.id, id: p.id, className: ye([p.className, r]), type: B, data: p.data, selected: !!p.selected, animated: !!p.animated, hidden: !!p.hidden, label: p.label, labelStyle: p.labelStyle, labelShowBg: p.labelShowBg, labelBgStyle: p.labelBgStyle, labelBgPadding: p.labelBgPadding, labelBgBorderRadius: p.labelBgBorderRadius, style: p.style, source: p.source, target: p.target, sourceHandleId: p.sourceHandle, targetHandleId: p.targetHandle, markerEnd: p.markerEnd, markerStart: p.markerStart, sourceX: we, sourceY: _e, targetX: He, targetY: Se, sourcePosition: q, targetPosition: J, elementsSelectable: E, onContextMenu: i, onMouseEnter: l, onMouseMove: c, onMouseLeave: h, onClick: f, onEdgeDoubleClick:
|
|
3087
|
+
return T.createElement(R, { key: p.id, id: p.id, className: ye([p.className, r]), type: B, data: p.data, selected: !!p.selected, animated: !!p.animated, hidden: !!p.hidden, label: p.label, labelStyle: p.labelStyle, labelShowBg: p.labelShowBg, labelBgStyle: p.labelBgStyle, labelBgPadding: p.labelBgPadding, labelBgBorderRadius: p.labelBgBorderRadius, style: p.style, source: p.source, target: p.target, sourceHandleId: p.sourceHandle, targetHandleId: p.targetHandle, markerEnd: p.markerEnd, markerStart: p.markerStart, sourceX: we, sourceY: _e, targetX: He, targetY: Se, sourcePosition: q, targetPosition: J, elementsSelectable: E, onContextMenu: i, onMouseEnter: l, onMouseMove: c, onMouseLeave: h, onClick: f, onEdgeDoubleClick: d, onReconnect: m, onReconnectStart: C, onReconnectEnd: x, reconnectRadius: v, rfId: o, ariaLabel: p.ariaLabel, isFocusable: ee, isReconnectable: ne, pathOptions: "pathOptions" in p ? p.pathOptions : void 0, interactionWidth: p.interactionWidth, disableKeyboardA11y: u });
|
|
3083
3088
|
}))
|
|
3084
3089
|
)),
|
|
3085
3090
|
b
|
|
@@ -3111,19 +3116,19 @@ const x6 = {
|
|
|
3111
3116
|
toX: (N.connectionPosition.x - N.transform[0]) / N.transform[2],
|
|
3112
3117
|
toY: (N.connectionPosition.y - N.transform[1]) / N.transform[2],
|
|
3113
3118
|
connectionMode: N.connectionMode
|
|
3114
|
-
}), [e]), Ce),
|
|
3115
|
-
let m =
|
|
3116
|
-
if (f === d1.Loose && (m = m || (
|
|
3119
|
+
}), [e]), Ce), d = (j = i == null ? void 0 : i[ae]) == null ? void 0 : j.handleBounds;
|
|
3120
|
+
let m = d == null ? void 0 : d[t];
|
|
3121
|
+
if (f === d1.Loose && (m = m || (d == null ? void 0 : d[t === "source" ? "target" : "source"])), !i || !m)
|
|
3117
3122
|
return null;
|
|
3118
|
-
const C = l ? m.find((N) => N.id === l) : m[0], x = C ? C.x + C.width / 2 : (i.width ?? 0) / 2, v = C ? C.y + C.height / 2 : i.height ?? 0, b = (((_ = i.positionAbsolute) == null ? void 0 : _.x) ?? 0) + x,
|
|
3123
|
+
const C = l ? m.find((N) => N.id === l) : m[0], x = C ? C.x + C.width / 2 : (i.width ?? 0) / 2, v = C ? C.y + C.height / 2 : i.height ?? 0, b = (((_ = i.positionAbsolute) == null ? void 0 : _.x) ?? 0) + x, u = (((H = i.positionAbsolute) == null ? void 0 : H.y) ?? 0) + v, w = C == null ? void 0 : C.position, y = w ? x6[w] : null;
|
|
3119
3124
|
if (!w || !y)
|
|
3120
3125
|
return null;
|
|
3121
3126
|
if (s)
|
|
3122
|
-
return T.createElement(s, { connectionLineType: o, connectionLineStyle: n, fromNode: i, fromHandle: C, fromX: b, fromY:
|
|
3127
|
+
return T.createElement(s, { connectionLineType: o, connectionLineStyle: n, fromNode: i, fromHandle: C, fromX: b, fromY: u, toX: c, toY: h, fromPosition: w, toPosition: y, connectionStatus: r });
|
|
3123
3128
|
let E = "";
|
|
3124
3129
|
const S = {
|
|
3125
3130
|
sourceX: b,
|
|
3126
|
-
sourceY:
|
|
3131
|
+
sourceY: u,
|
|
3127
3132
|
sourcePosition: w,
|
|
3128
3133
|
targetX: c,
|
|
3129
3134
|
targetY: h,
|
|
@@ -3132,7 +3137,7 @@ const x6 = {
|
|
|
3132
3137
|
return o === Xe.Bezier ? [E] = Bo(S) : o === Xe.Step ? [E] = C2({
|
|
3133
3138
|
...S,
|
|
3134
3139
|
borderRadius: 0
|
|
3135
|
-
}) : o === Xe.SmoothStep ? [E] = C2(S) : o === Xe.SimpleBezier ? [E] = Zo(S) : E = `M${b},${
|
|
3140
|
+
}) : o === Xe.SmoothStep ? [E] = C2(S) : o === Xe.SimpleBezier ? [E] = Zo(S) : E = `M${b},${u} ${c},${h}`, T.createElement("path", { d: E, fill: "none", className: "react-flow__connection-path", style: n });
|
|
3136
3141
|
};
|
|
3137
3142
|
fs.displayName = "ConnectionLine";
|
|
3138
3143
|
const y6 = (e) => ({
|
|
@@ -3166,7 +3171,7 @@ function $n(e, t) {
|
|
|
3166
3171
|
return t(e);
|
|
3167
3172
|
}, [e]);
|
|
3168
3173
|
}
|
|
3169
|
-
const Cs = ({ nodeTypes: e, edgeTypes: t, onMove: n, onMoveStart: o, onMoveEnd: s, onInit: r, onNodeClick: i, onEdgeClick: l, onNodeDoubleClick: c, onEdgeDoubleClick: h, onNodeMouseEnter: f, onNodeMouseMove:
|
|
3174
|
+
const Cs = ({ nodeTypes: e, edgeTypes: t, onMove: n, onMoveStart: o, onMoveEnd: s, onInit: r, onNodeClick: i, onEdgeClick: l, onNodeDoubleClick: c, onEdgeDoubleClick: h, onNodeMouseEnter: f, onNodeMouseMove: d, onNodeMouseLeave: m, onNodeContextMenu: C, onSelectionContextMenu: x, onSelectionStart: v, onSelectionEnd: b, connectionLineType: u, connectionLineStyle: w, connectionLineComponent: y, connectionLineContainerStyle: E, selectionKeyCode: S, selectionOnDrag: j, selectionMode: _, multiSelectionKeyCode: H, panActivationKeyCode: N, zoomActivationKeyCode: I, deleteKeyCode: D, onlyRenderVisibleElements: P, elementsSelectable: O, selectNodesOnDrag: p, defaultViewport: k, translateExtent: L, minZoom: A, maxZoom: F, preventScrolling: M, defaultMarkerColor: V, zoomOnScroll: B, zoomOnPinch: R, panOnScroll: W, panOnScrollSpeed: z, panOnScrollMode: U, zoomOnDoubleClick: q, panOnDrag: J, onPaneClick: ee, onPaneMouseEnter: te, onPaneMouseMove: ne, onPaneMouseLeave: we, onPaneScroll: _e, onPaneContextMenu: He, onEdgeContextMenu: Se, onEdgeMouseEnter: ce, onEdgeMouseMove: Ze, onEdgeMouseLeave: re, onReconnect: K, onReconnectStart: be, onReconnectEnd: Je, reconnectRadius: D1, noDragClassName: f1, noWheelClassName: C1, noPanClassName: Re, elevateEdgesOnSelect: m1, disableKeyboardA11y: Qe, nodeOrigin: e1, nodeExtent: g1, rfId: p1 }) => {
|
|
3170
3175
|
const I1 = $n(e, Y8), me = $n(t, t6);
|
|
3171
3176
|
return p6(r), T.createElement(
|
|
3172
3177
|
U8,
|
|
@@ -3177,10 +3182,10 @@ const Cs = ({ nodeTypes: e, edgeTypes: t, onMove: n, onMoveStart: o, onMoveEnd:
|
|
|
3177
3182
|
T.createElement(
|
|
3178
3183
|
C6,
|
|
3179
3184
|
{ edgeTypes: me, onEdgeClick: l, onEdgeDoubleClick: h, onlyRenderVisibleElements: P, onEdgeContextMenu: Se, onEdgeMouseEnter: ce, onEdgeMouseMove: Ze, onEdgeMouseLeave: re, onReconnect: K, onReconnectStart: be, onReconnectEnd: Je, reconnectRadius: D1, defaultMarkerColor: V, noPanClassName: Re, elevateEdgesOnSelect: !!m1, disableKeyboardA11y: Qe, rfId: p1 },
|
|
3180
|
-
T.createElement(E6, { style: w, type:
|
|
3185
|
+
T.createElement(E6, { style: w, type: u, component: y, containerStyle: E })
|
|
3181
3186
|
),
|
|
3182
3187
|
T.createElement("div", { className: "react-flow__edgelabel-renderer" }),
|
|
3183
|
-
T.createElement(q8, { nodeTypes: I1, onNodeClick: i, onNodeDoubleClick: c, onNodeMouseEnter: f, onNodeMouseMove:
|
|
3188
|
+
T.createElement(q8, { nodeTypes: I1, onNodeClick: i, onNodeDoubleClick: c, onNodeMouseEnter: f, onNodeMouseMove: d, onNodeMouseLeave: m, onNodeContextMenu: C, selectNodesOnDrag: p, onlyRenderVisibleElements: P, noPanClassName: Re, noDragClassName: f1, disableKeyboardA11y: Qe, nodeOrigin: e1, nodeExtent: g1, rfId: p1 })
|
|
3184
3189
|
)
|
|
3185
3190
|
);
|
|
3186
3191
|
};
|
|
@@ -3264,24 +3269,24 @@ const y2 = [
|
|
|
3264
3269
|
const { onNodesChange: o, nodeInternals: s, fitViewOnInit: r, fitViewOnInitDone: i, fitViewOnInitOptions: l, domNode: c, nodeOrigin: h } = t(), f = c == null ? void 0 : c.querySelector(".react-flow__viewport");
|
|
3265
3270
|
if (!f)
|
|
3266
3271
|
return;
|
|
3267
|
-
const
|
|
3268
|
-
const
|
|
3269
|
-
if (
|
|
3270
|
-
s.set(
|
|
3271
|
-
...
|
|
3272
|
+
const d = window.getComputedStyle(f), { m22: m } = new window.DOMMatrixReadOnly(d.transform), C = n.reduce((v, b) => {
|
|
3273
|
+
const u = s.get(b.id);
|
|
3274
|
+
if (u != null && u.hidden)
|
|
3275
|
+
s.set(u.id, {
|
|
3276
|
+
...u,
|
|
3272
3277
|
[ae]: {
|
|
3273
|
-
...
|
|
3278
|
+
...u[ae],
|
|
3274
3279
|
// we need to reset the handle bounds when the node is hidden
|
|
3275
3280
|
// in order to force a new observation when the node is shown again
|
|
3276
3281
|
handleBounds: void 0
|
|
3277
3282
|
}
|
|
3278
3283
|
});
|
|
3279
|
-
else if (
|
|
3284
|
+
else if (u) {
|
|
3280
3285
|
const w = M2(b.nodeElement);
|
|
3281
|
-
!!(w.width && w.height && (
|
|
3282
|
-
...
|
|
3286
|
+
!!(w.width && w.height && (u.width !== w.width || u.height !== w.height || b.forceUpdate)) && (s.set(u.id, {
|
|
3287
|
+
...u,
|
|
3283
3288
|
[ae]: {
|
|
3284
|
-
...
|
|
3289
|
+
...u[ae],
|
|
3285
3290
|
handleBounds: {
|
|
3286
3291
|
source: Bn(".source", b.nodeElement, m, h),
|
|
3287
3292
|
target: Bn(".target", b.nodeElement, m, h)
|
|
@@ -3289,7 +3294,7 @@ const y2 = [
|
|
|
3289
3294
|
},
|
|
3290
3295
|
...w
|
|
3291
3296
|
}), v.push({
|
|
3292
|
-
id:
|
|
3297
|
+
id: u.id,
|
|
3293
3298
|
type: "dimensions",
|
|
3294
3299
|
dimensions: w
|
|
3295
3300
|
}));
|
|
@@ -3387,8 +3392,8 @@ const y2 = [
|
|
|
3387
3392
|
const h = Ge.translate(o[0] + n.x, o[1] + n.y).scale(o[2]), f = [
|
|
3388
3393
|
[0, 0],
|
|
3389
3394
|
[s, r]
|
|
3390
|
-
],
|
|
3391
|
-
return i.transform(l,
|
|
3395
|
+
], d = i == null ? void 0 : i.constrain()(h, f, c);
|
|
3396
|
+
return i.transform(l, d), o[0] !== d.x || o[1] !== d.y || o[2] !== d.k;
|
|
3392
3397
|
},
|
|
3393
3398
|
cancelConnection: () => e({
|
|
3394
3399
|
connectionNodeId: Ue.connectionNodeId,
|
|
@@ -3423,7 +3428,7 @@ const b6 = {
|
|
|
3423
3428
|
overflow: "hidden",
|
|
3424
3429
|
position: "relative",
|
|
3425
3430
|
zIndex: 0
|
|
3426
|
-
}, Dt = L2(({ nodes: e, edges: t, defaultNodes: n, defaultEdges: o, className: s, nodeTypes: r = b6, edgeTypes: i = _6, onNodeClick: l, onEdgeClick: c, onInit: h, onMove: f, onMoveStart:
|
|
3431
|
+
}, Dt = L2(({ nodes: e, edges: t, defaultNodes: n, defaultEdges: o, className: s, nodeTypes: r = b6, edgeTypes: i = _6, onNodeClick: l, onEdgeClick: c, onInit: h, onMove: f, onMoveStart: d, onMoveEnd: m, onConnect: C, onConnectStart: x, onConnectEnd: v, onClickConnectStart: b, onClickConnectEnd: u, onNodeMouseEnter: w, onNodeMouseMove: y, onNodeMouseLeave: E, onNodeContextMenu: S, onNodeDoubleClick: j, onNodeDragStart: _, onNodeDrag: H, onNodeDragStop: N, onNodesDelete: I, onEdgesDelete: D, onSelectionChange: P, onSelectionDragStart: O, onSelectionDrag: p, onSelectionDragStop: k, onSelectionContextMenu: L, onSelectionStart: A, onSelectionEnd: F, connectionMode: M = d1.Strict, connectionLineType: V = Xe.Bezier, connectionLineStyle: B, connectionLineComponent: R, connectionLineContainerStyle: W, deleteKeyCode: z = "Backspace", selectionKeyCode: U = "Shift", selectionOnDrag: q = !1, selectionMode: J = Y1.Full, panActivationKeyCode: ee = "Space", multiSelectionKeyCode: te = vt() ? "Meta" : "Control", zoomActivationKeyCode: ne = vt() ? "Meta" : "Control", snapToGrid: we = !1, snapGrid: _e = L6, onlyRenderVisibleElements: He = !1, selectNodesOnDrag: Se = !0, nodesDraggable: ce, nodesConnectable: Ze, nodesFocusable: re, nodeOrigin: K = S6, edgesFocusable: be, edgesUpdatable: Je, elementsSelectable: D1, defaultViewport: f1 = N6, minZoom: C1 = 0.5, maxZoom: Re = 2, translateExtent: m1 = y2, preventScrolling: Qe = !0, nodeExtent: e1, defaultMarkerColor: g1 = "#b1b1b7", zoomOnScroll: p1 = !0, zoomOnPinch: I1 = !0, panOnScroll: me = !1, panOnScrollSpeed: Ae = 0.5, panOnScrollMode: t1 = a1.Free, zoomOnDoubleClick: n1 = !0, panOnDrag: o1 = !0, onPaneClick: ze, onPaneMouseEnter: Be, onPaneMouseMove: Z1, onPaneMouseLeave: Ot, onPaneScroll: B1, onPaneContextMenu: Rt, children: dn, onEdgeContextMenu: s1, onEdgeDoubleClick: Ks, onEdgeMouseEnter: Ys, onEdgeMouseMove: Xs, onEdgeMouseLeave: Gs, onEdgeUpdate: qs, onEdgeUpdateStart: Js, onEdgeUpdateEnd: Qs, onReconnect: er, onReconnectStart: tr, onReconnectEnd: nr, reconnectRadius: or = 10, edgeUpdaterRadius: sr = 10, onNodesChange: rr, onEdgesChange: ir, noDragClassName: ar = "nodrag", noWheelClassName: lr = "nowheel", noPanClassName: un = "nopan", fitView: cr = !1, fitViewOptions: dr, connectOnClick: ur = !0, attributionPosition: hr, proOptions: fr, defaultEdgeOptions: Cr, elevateNodesOnSelect: mr = !0, elevateEdgesOnSelect: gr = !1, disableKeyboardA11y: hn = !1, autoPanOnConnect: pr = !0, autoPanOnNodeDrag: xr = !0, connectionRadius: yr = 20, isValidConnection: Er, onError: vr, style: wr, id: fn, nodeDragThreshold: br, ..._r }, Sr) => {
|
|
3427
3432
|
const zt = fn || "1";
|
|
3428
3433
|
return T.createElement(
|
|
3429
3434
|
"div",
|
|
@@ -3431,8 +3436,8 @@ const b6 = {
|
|
|
3431
3436
|
T.createElement(
|
|
3432
3437
|
ms,
|
|
3433
3438
|
null,
|
|
3434
|
-
T.createElement(v6, { onInit: h, onMove: f, onMoveStart:
|
|
3435
|
-
T.createElement(p8, { nodes: e, edges: t, defaultNodes: n, defaultEdges: o, onConnect: C, onConnectStart: x, onConnectEnd: v, onClickConnectStart: b, onClickConnectEnd:
|
|
3439
|
+
T.createElement(v6, { onInit: h, onMove: f, onMoveStart: d, onMoveEnd: m, onNodeClick: l, onEdgeClick: c, onNodeMouseEnter: w, onNodeMouseMove: y, onNodeMouseLeave: E, onNodeContextMenu: S, onNodeDoubleClick: j, nodeTypes: r, edgeTypes: i, connectionLineType: V, connectionLineStyle: B, connectionLineComponent: R, connectionLineContainerStyle: W, selectionKeyCode: U, selectionOnDrag: q, selectionMode: J, deleteKeyCode: z, multiSelectionKeyCode: te, panActivationKeyCode: ee, zoomActivationKeyCode: ne, onlyRenderVisibleElements: He, selectNodesOnDrag: Se, defaultViewport: f1, translateExtent: m1, minZoom: C1, maxZoom: Re, preventScrolling: Qe, zoomOnScroll: p1, zoomOnPinch: I1, zoomOnDoubleClick: n1, panOnScroll: me, panOnScrollSpeed: Ae, panOnScrollMode: t1, panOnDrag: o1, onPaneClick: ze, onPaneMouseEnter: Be, onPaneMouseMove: Z1, onPaneMouseLeave: Ot, onPaneScroll: B1, onPaneContextMenu: Rt, onSelectionContextMenu: L, onSelectionStart: A, onSelectionEnd: F, onEdgeContextMenu: s1, onEdgeDoubleClick: Ks, onEdgeMouseEnter: Ys, onEdgeMouseMove: Xs, onEdgeMouseLeave: Gs, onReconnect: er ?? qs, onReconnectStart: tr ?? Js, onReconnectEnd: nr ?? Qs, reconnectRadius: or ?? sr, defaultMarkerColor: g1, noDragClassName: ar, noWheelClassName: lr, noPanClassName: un, elevateEdgesOnSelect: gr, rfId: zt, disableKeyboardA11y: hn, nodeOrigin: K, nodeExtent: e1 }),
|
|
3440
|
+
T.createElement(p8, { nodes: e, edges: t, defaultNodes: n, defaultEdges: o, onConnect: C, onConnectStart: x, onConnectEnd: v, onClickConnectStart: b, onClickConnectEnd: u, nodesDraggable: ce, nodesConnectable: Ze, nodesFocusable: re, edgesFocusable: be, edgesUpdatable: Je, elementsSelectable: D1, elevateNodesOnSelect: mr, minZoom: C1, maxZoom: Re, nodeExtent: e1, onNodesChange: rr, onEdgesChange: ir, snapToGrid: we, snapGrid: _e, connectionMode: M, translateExtent: m1, connectOnClick: ur, defaultEdgeOptions: Cr, fitView: cr, fitViewOptions: dr, onNodesDelete: I, onEdgesDelete: D, onNodeDragStart: _, onNodeDrag: H, onNodeDragStop: N, onSelectionDrag: p, onSelectionDragStart: O, onSelectionDragStop: k, noPanClassName: un, nodeOrigin: K, rfId: zt, autoPanOnConnect: pr, autoPanOnNodeDrag: xr, onError: vr, connectionRadius: yr, isValidConnection: Er, nodeDragThreshold: br }),
|
|
3436
3441
|
T.createElement(m8, { onSelectionChange: P }),
|
|
3437
3442
|
dn,
|
|
3438
3443
|
T.createElement(R5, { proOptions: fr, position: hr }),
|
|
@@ -3482,8 +3487,8 @@ const T6 = (e) => ({
|
|
|
3482
3487
|
isInteractive: e.nodesDraggable || e.nodesConnectable || e.elementsSelectable,
|
|
3483
3488
|
minZoomReached: e.transform[2] <= e.minZoom,
|
|
3484
3489
|
maxZoomReached: e.transform[2] >= e.maxZoom
|
|
3485
|
-
}), gs = ({ style: e, showZoom: t = !0, showFitView: n = !0, showInteractive: o = !0, fitViewOptions: s, onZoomIn: r, onZoomOut: i, onFitView: l, onInteractiveChange: c, className: h, children: f, position:
|
|
3486
|
-
const m = fe(), [C, x] = se(!1), { isInteractive: v, minZoomReached: b, maxZoomReached:
|
|
3490
|
+
}), gs = ({ style: e, showZoom: t = !0, showFitView: n = !0, showInteractive: o = !0, fitViewOptions: s, onZoomIn: r, onZoomOut: i, onFitView: l, onInteractiveChange: c, className: h, children: f, position: d = "bottom-left" }) => {
|
|
3491
|
+
const m = fe(), [C, x] = se(!1), { isInteractive: v, minZoomReached: b, maxZoomReached: u } = ie(T6, Ce), { zoomIn: w, zoomOut: y, fitView: E } = ke();
|
|
3487
3492
|
if (Y(() => {
|
|
3488
3493
|
x(!0);
|
|
3489
3494
|
}, []), !C)
|
|
@@ -3503,13 +3508,13 @@ const T6 = (e) => ({
|
|
|
3503
3508
|
};
|
|
3504
3509
|
return T.createElement(
|
|
3505
3510
|
jo,
|
|
3506
|
-
{ className: ye(["react-flow__controls", h]), position:
|
|
3511
|
+
{ className: ye(["react-flow__controls", h]), position: d, style: e, "data-testid": "rf__controls" },
|
|
3507
3512
|
t && T.createElement(
|
|
3508
3513
|
T.Fragment,
|
|
3509
3514
|
null,
|
|
3510
3515
|
T.createElement(
|
|
3511
3516
|
z1,
|
|
3512
|
-
{ onClick: S, className: "react-flow__controls-zoomin", title: "zoom in", "aria-label": "zoom in", disabled:
|
|
3517
|
+
{ onClick: S, className: "react-flow__controls-zoomin", title: "zoom in", "aria-label": "zoom in", disabled: u },
|
|
3513
3518
|
T.createElement(j6, null)
|
|
3514
3519
|
),
|
|
3515
3520
|
T.createElement(
|
|
@@ -3560,7 +3565,7 @@ function ps({
|
|
|
3560
3565
|
style: l,
|
|
3561
3566
|
className: c
|
|
3562
3567
|
}) {
|
|
3563
|
-
const h = X(null), { transform: f, patternId:
|
|
3568
|
+
const h = X(null), { transform: f, patternId: d } = ie(F6, Ce), m = i || Z6[t], C = o || B6[t], x = t === De.Dots, v = t === De.Cross, b = Array.isArray(n) ? n : [n, n], u = [b[0] * f[2] || 1, b[1] * f[2] || 1], w = C * f[2], y = v ? [w, w] : u, E = x ? [w / r, w / r] : [y[0] / r, y[1] / r];
|
|
3564
3569
|
return T.createElement(
|
|
3565
3570
|
"svg",
|
|
3566
3571
|
{ className: ye(["react-flow__background", c]), style: {
|
|
@@ -3571,8 +3576,8 @@ function ps({
|
|
|
3571
3576
|
top: 0,
|
|
3572
3577
|
left: 0
|
|
3573
3578
|
}, ref: h, "data-testid": "rf__background" },
|
|
3574
|
-
T.createElement("pattern", { id:
|
|
3575
|
-
T.createElement("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${
|
|
3579
|
+
T.createElement("pattern", { id: d + e, x: f[0] % u[0], y: f[1] % u[1], width: u[0], height: u[1], patternUnits: "userSpaceOnUse", patternTransform: `translate(-${E[0]},-${E[1]})` }, x ? T.createElement(I6, { color: m, radius: w / r }) : T.createElement(D6, { dimensions: y, color: m, lineWidth: s })),
|
|
3580
|
+
T.createElement("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${d + e})` })
|
|
3576
3581
|
);
|
|
3577
3582
|
}
|
|
3578
3583
|
ps.displayName = "Background";
|
|
@@ -4061,13 +4066,13 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4061
4066
|
unknown: "UNK"
|
|
4062
4067
|
}, Ts = (e, t) => e ? x4(t) : y4(t), Ds = (e, t) => e ? t + 1 : t - 1, Pt = (e, t, n, o, s, r, i = vs, l = !1, c) => {
|
|
4063
4068
|
const h = Ds(s, r), f = (m, C) => {
|
|
4064
|
-
var
|
|
4065
|
-
const x = ((w = (
|
|
4069
|
+
var u, w;
|
|
4070
|
+
const x = ((w = (u = e.find((y) => y.id === m)) == null ? void 0 : u.data) == null ? void 0 : w.level) || 0, v = Y2(r, x, o, m, s, l, C);
|
|
4066
4071
|
t.find((y) => y.id === v.id) || t.push(v);
|
|
4067
4072
|
};
|
|
4068
|
-
let
|
|
4073
|
+
let d = 0;
|
|
4069
4074
|
for (const m of n) {
|
|
4070
|
-
if (
|
|
4075
|
+
if (d >= i) {
|
|
4071
4076
|
const x = Nt(o, s);
|
|
4072
4077
|
e.push({
|
|
4073
4078
|
id: x,
|
|
@@ -4079,62 +4084,62 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4079
4084
|
}), f(x);
|
|
4080
4085
|
break;
|
|
4081
4086
|
}
|
|
4082
|
-
e.find((x) => x.id === m.table) || (
|
|
4087
|
+
e.find((x) => x.id === m.table) || (d++, c ? c[m.table].type in H1 ? e.push(j1(m, h, o)) : e.push(Ls(m.table, h, o, c[m.table])) : e.push(j1(m, h, o))), f(m.table, m.source);
|
|
4083
4088
|
}
|
|
4084
4089
|
}, Oe = (e, t, n = !1) => {
|
|
4085
4090
|
let o = 1 / 0;
|
|
4086
4091
|
const s = {};
|
|
4087
|
-
for (const
|
|
4088
|
-
if (Ee(
|
|
4089
|
-
|
|
4092
|
+
for (const u of e)
|
|
4093
|
+
if (Ee(u) && u.parentNode)
|
|
4094
|
+
u.parentNode in s || (s[u.parentNode] = 0), u.position = {
|
|
4090
4095
|
x: R6,
|
|
4091
|
-
y: z6 + xt(s[
|
|
4092
|
-
}, s[
|
|
4096
|
+
y: z6 + xt(s[u.parentNode])
|
|
4097
|
+
}, s[u.parentNode]++;
|
|
4093
4098
|
else {
|
|
4094
|
-
const { level: w } =
|
|
4099
|
+
const { level: w } = u.data;
|
|
4095
4100
|
o = Math.min(o, w);
|
|
4096
4101
|
}
|
|
4097
4102
|
const r = {}, i = {}, l = {}, c = {}, h = {}, f = {};
|
|
4098
|
-
for (const
|
|
4099
|
-
Ee(
|
|
4100
|
-
const
|
|
4101
|
-
const { level: w } =
|
|
4102
|
-
if (i[w] = i[w] || [], !i[w].includes(
|
|
4103
|
-
l[
|
|
4103
|
+
for (const u of t)
|
|
4104
|
+
Ee(u) || ft(e.find((w) => w.id === u.source)) || ft(e.find((w) => w.id === u.target)) || (h[u.source] = h[u.source] || [], h[u.source].push(u.target), f[u.target] = f[u.target] || [], f[u.target].push(u.source));
|
|
4105
|
+
const d = (u) => {
|
|
4106
|
+
const { level: w } = u.data;
|
|
4107
|
+
if (i[w] = i[w] || [], !i[w].includes(u.id)) {
|
|
4108
|
+
l[u.id] = i[w].length, r[u.id] = 0;
|
|
4104
4109
|
for (const y of i[w])
|
|
4105
|
-
r[
|
|
4106
|
-
i[w].push(
|
|
4110
|
+
r[u.id] += s[y] || 0;
|
|
4111
|
+
i[w].push(u.id);
|
|
4107
4112
|
}
|
|
4108
|
-
}, m = (
|
|
4109
|
-
if (!c[
|
|
4110
|
-
c[
|
|
4111
|
-
for (const y of w[
|
|
4113
|
+
}, m = (u, w) => {
|
|
4114
|
+
if (!c[u]) {
|
|
4115
|
+
c[u] = !0, d(e.find((y) => y.id === u));
|
|
4116
|
+
for (const y of w[u] || []) m(y, w);
|
|
4112
4117
|
}
|
|
4113
4118
|
};
|
|
4114
|
-
for (const
|
|
4115
|
-
Ee(
|
|
4116
|
-
for (const
|
|
4117
|
-
Ee(
|
|
4118
|
-
const C = (
|
|
4119
|
-
const w = l[
|
|
4119
|
+
for (const u of e)
|
|
4120
|
+
Ee(u) || ft(u) || c[u.id] || (m(u.id, h), c[u.id] = !1, m(u.id, f));
|
|
4121
|
+
for (const u of e)
|
|
4122
|
+
Ee(u) || ft(u) && d(u);
|
|
4123
|
+
const C = (u) => {
|
|
4124
|
+
const w = l[u.id] || 0, y = r[u.id] || 0;
|
|
4120
4125
|
return i2 + w * (L1 + U6) + xt(y, w);
|
|
4121
|
-
}, x = (
|
|
4122
|
-
const w = l[
|
|
4126
|
+
}, x = (u) => (u - o) * (ot + W6) + O6, v = (u) => (u - o) * (L1 + $6) + i2, b = (u) => {
|
|
4127
|
+
const w = l[u.id] || 0, y = r[u.id] || 0;
|
|
4123
4128
|
return i2 + w * (L1 + K6) + xt(y, w);
|
|
4124
4129
|
};
|
|
4125
|
-
for (const
|
|
4126
|
-
if (Ee(
|
|
4127
|
-
const { level: w } =
|
|
4128
|
-
|
|
4130
|
+
for (const u of e) {
|
|
4131
|
+
if (Ee(u)) continue;
|
|
4132
|
+
const { level: w } = u.data;
|
|
4133
|
+
u.position = n ? { x: b(u), y: v(w) } : { x: x(w), y: C(u) };
|
|
4129
4134
|
}
|
|
4130
4135
|
}, Is = (e, t) => (e.forEach((n) => Lt(n, !0)), t.forEach((n) => k1(n, !1)), [e, t]), Q1 = (e, t, n) => {
|
|
4131
4136
|
q1(t, !0), J1(t, !1);
|
|
4132
4137
|
const o = {}, s = {}, r = (c, h) => {
|
|
4133
|
-
const f = [n],
|
|
4138
|
+
const f = [n], d = {};
|
|
4134
4139
|
for (; f.length > 0; ) {
|
|
4135
4140
|
const m = f.shift();
|
|
4136
|
-
|
|
4137
|
-
C[c] === m && (s[C.id] = !0,
|
|
4141
|
+
d[m] = !0, o[m] = !0, t.forEach((C) => {
|
|
4142
|
+
C[c] === m && (s[C.id] = !0, d[C[h]] || f.push(C[h]));
|
|
4138
4143
|
});
|
|
4139
4144
|
}
|
|
4140
4145
|
};
|
|
@@ -4148,7 +4153,7 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4148
4153
|
e.setNodes(s), e.setEdges(r);
|
|
4149
4154
|
}, I4 = async (e, t, n, o, s, r, i, l, c, h) => {
|
|
4150
4155
|
var S, j;
|
|
4151
|
-
const f = [],
|
|
4156
|
+
const f = [], d = [], { column_lineage: m, confidence: C, errors: x } = await w4({
|
|
4152
4157
|
targets: s,
|
|
4153
4158
|
upstreamExpansion: r,
|
|
4154
4159
|
currAnd1HopTables: i,
|
|
@@ -4158,13 +4163,13 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4158
4163
|
h((_) => ({ ..._, ...x })), he.addLinks(m.length);
|
|
4159
4164
|
const v = m.filter(
|
|
4160
4165
|
(_) => r ? Kn(s, _.source) : Kn(s, _.target)
|
|
4161
|
-
), b = v.map((_) => r ? _.target : _.source),
|
|
4162
|
-
|
|
4163
|
-
const I =
|
|
4164
|
-
I ? N === "Transformation" && (I.viewsType = N) :
|
|
4166
|
+
), b = v.map((_) => r ? _.target : _.source), u = {}, w = ([_, H], N) => {
|
|
4167
|
+
u[_] = u[_] || [];
|
|
4168
|
+
const I = u[_].find((D) => D.column === H);
|
|
4169
|
+
I ? N === "Transformation" && (I.viewsType = N) : u[_].push({ column: H, viewsType: N });
|
|
4165
4170
|
}, y = (_, H, N, I, D) => {
|
|
4166
4171
|
const P = Zt(N, I);
|
|
4167
|
-
|
|
4172
|
+
d.find((O) => O.id === P) || d.push(
|
|
4168
4173
|
St(N, I, t[_], t[H], D, c)
|
|
4169
4174
|
);
|
|
4170
4175
|
}, E = [];
|
|
@@ -4182,9 +4187,9 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4182
4187
|
} else
|
|
4183
4188
|
E.push(_);
|
|
4184
4189
|
}
|
|
4185
|
-
for (const _ in
|
|
4190
|
+
for (const _ in u) {
|
|
4186
4191
|
if (!o[_]) continue;
|
|
4187
|
-
const H = [...
|
|
4192
|
+
const H = [...u[_]];
|
|
4188
4193
|
H.sort((N, I) => N.column.localeCompare(I.column));
|
|
4189
4194
|
for (const N of H) {
|
|
4190
4195
|
const I = {};
|
|
@@ -4201,50 +4206,50 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4201
4206
|
);
|
|
4202
4207
|
}
|
|
4203
4208
|
}
|
|
4204
|
-
return { nodes: f, edges:
|
|
4209
|
+
return { nodes: f, edges: d, collectColumns: u, newCurr: b, confidence: C, seeMoreLineage: E };
|
|
4205
4210
|
}, Z4 = async (e, t, n, o) => {
|
|
4206
4211
|
var C, x, v, b;
|
|
4207
4212
|
let s = e.filter($e), r = t.filter($e);
|
|
4208
4213
|
[s, r] = Is(s, r);
|
|
4209
4214
|
const i = {};
|
|
4210
|
-
s.forEach((
|
|
4215
|
+
s.forEach((u) => i[u.id] = u.data.level);
|
|
4211
4216
|
const l = {};
|
|
4212
|
-
e.filter((
|
|
4217
|
+
e.filter((u) => u.type === "table").forEach((u) => l[u.id] = !0);
|
|
4213
4218
|
const c = {}, h = [];
|
|
4214
|
-
for (const
|
|
4215
|
-
if (
|
|
4216
|
-
const w = l[
|
|
4217
|
-
w && y ? h.push({ src:
|
|
4218
|
-
h.push({ src:
|
|
4219
|
-
}) : y && ((x = e.find((S) => S.id ===
|
|
4220
|
-
h.push({ src: S.table, dst:
|
|
4219
|
+
for (const u of t) {
|
|
4220
|
+
if (u.id.startsWith(We)) continue;
|
|
4221
|
+
const w = l[u.source], y = l[u.target];
|
|
4222
|
+
w && y ? h.push({ src: u.source, dst: u.target }) : w ? (C = e.find((S) => S.id === u.target).data.tables) == null || C.forEach((S) => {
|
|
4223
|
+
h.push({ src: u.source, dst: S.table }), c[S.table] = u.target;
|
|
4224
|
+
}) : y && ((x = e.find((S) => S.id === u.source).data.tables) == null || x.forEach((S) => {
|
|
4225
|
+
h.push({ src: S.table, dst: u.target }), c[S.table] = u.source;
|
|
4221
4226
|
}));
|
|
4222
4227
|
}
|
|
4223
|
-
const { collect_columns: f, highlight_edges:
|
|
4228
|
+
const { collect_columns: f, highlight_edges: d } = await o({
|
|
4224
4229
|
column_fqn: n,
|
|
4225
4230
|
edges: h
|
|
4226
4231
|
});
|
|
4227
|
-
for (const
|
|
4228
|
-
if (!l[
|
|
4229
|
-
const w = [...f[
|
|
4232
|
+
for (const u in f) {
|
|
4233
|
+
if (!l[u]) continue;
|
|
4234
|
+
const w = [...f[u]];
|
|
4230
4235
|
w.sort((y, E) => y.column.localeCompare(E.column));
|
|
4231
4236
|
for (const y of w) {
|
|
4232
|
-
const E = (b = (v = e.find((S) => S.id ===
|
|
4233
|
-
s.push(_t(
|
|
4237
|
+
const E = (b = (v = e.find((S) => S.id === u)) == null ? void 0 : v.data) == null ? void 0 : b.nodeType;
|
|
4238
|
+
s.push(_t(u, y.column, y.viewsType, {}, E));
|
|
4234
4239
|
}
|
|
4235
4240
|
}
|
|
4236
|
-
r.forEach((
|
|
4237
|
-
const m = (
|
|
4241
|
+
r.forEach((u) => u.style = It);
|
|
4242
|
+
const m = (u, w, y, E, S) => {
|
|
4238
4243
|
const j = Zt(y, E);
|
|
4239
4244
|
r.find((_) => _.id === j) || r.push(
|
|
4240
|
-
St(y, E, i[
|
|
4245
|
+
St(y, E, i[u], i[w], S, {
|
|
4241
4246
|
direct: S === "direct",
|
|
4242
4247
|
indirect: S === "indirect"
|
|
4243
4248
|
})
|
|
4244
4249
|
);
|
|
4245
4250
|
};
|
|
4246
|
-
for (const
|
|
4247
|
-
const [w] =
|
|
4251
|
+
for (const u of d) {
|
|
4252
|
+
const [w] = u[0].split("/"), [y] = u[1].split("/"), E = l[w], S = l[y], j = We + u[0], _ = We + u[1], H = u[2] || "direct";
|
|
4248
4253
|
if (E && S)
|
|
4249
4254
|
m(w, y, j, _, H);
|
|
4250
4255
|
else if (E) {
|
|
@@ -4274,15 +4279,15 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4274
4279
|
}), t.edges.forEach((i) => {
|
|
4275
4280
|
r.find((l) => l.id === i.id) || r.push(i);
|
|
4276
4281
|
}), n.name) {
|
|
4277
|
-
const i = {}, l = G1(n.table, n.name), c = { [l]: "direct" }, h = [l], f = {},
|
|
4282
|
+
const i = {}, l = G1(n.table, n.name), c = { [l]: "direct" }, h = [l], f = {}, d = o ? "source" : "target", m = o ? "target" : "source";
|
|
4278
4283
|
for (; h.length > 0; ) {
|
|
4279
4284
|
const C = h.shift();
|
|
4280
4285
|
if (!f[C]) {
|
|
4281
4286
|
f[C] = !0;
|
|
4282
4287
|
for (const x of r)
|
|
4283
|
-
x[
|
|
4288
|
+
x[d] === C && (h.push(x[m]), c[x[m]] !== "direct" && (c[x[m]] = c[x[d]] === "direct" ? x.data.type : "indirect"));
|
|
4284
4289
|
for (const x of r)
|
|
4285
|
-
x[
|
|
4290
|
+
x[d] === C && (i[x.id] = c[x[m]]);
|
|
4286
4291
|
}
|
|
4287
4292
|
}
|
|
4288
4293
|
for (const C of r)
|
|
@@ -4301,26 +4306,26 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4301
4306
|
if (l[c]) continue;
|
|
4302
4307
|
l[c] = !0;
|
|
4303
4308
|
const { tables: f } = await Ts(o, c);
|
|
4304
|
-
Pt(s, r, f, c, o, h), f.forEach((
|
|
4305
|
-
const m = s.find((C) => C.id ===
|
|
4306
|
-
(m == null ? void 0 : m.data.materialization) === "ephemeral" && i.push({ table:
|
|
4309
|
+
Pt(s, r, f, c, o, h), f.forEach((d) => {
|
|
4310
|
+
const m = s.find((C) => C.id === d.table);
|
|
4311
|
+
(m == null ? void 0 : m.data.materialization) === "ephemeral" && i.push({ table: d.table, level: m.data.level });
|
|
4307
4312
|
});
|
|
4308
4313
|
}
|
|
4309
4314
|
return [s, r];
|
|
4310
4315
|
}, Mt = async (e, t, n, o, s, r = vs) => {
|
|
4311
4316
|
const i = [...e], l = [...t];
|
|
4312
4317
|
if (o >= s) return [i, l];
|
|
4313
|
-
const c = X6(o, s), h = i.find((
|
|
4318
|
+
const c = X6(o, s), h = i.find((d) => d.id === n).data.level, f = async (d) => {
|
|
4314
4319
|
const m = [{ table: n, level: h }], C = {};
|
|
4315
4320
|
for (; m.length > 0; ) {
|
|
4316
4321
|
const x = m.shift();
|
|
4317
4322
|
if (C[x.table]) continue;
|
|
4318
4323
|
C[x.table] = !0;
|
|
4319
|
-
const { tables: v } = await Ts(
|
|
4320
|
-
Pt(i, l, v, x.table,
|
|
4321
|
-
const b = Ds(
|
|
4322
|
-
c(b) ? m.push(...v.map((
|
|
4323
|
-
...v.filter((
|
|
4324
|
+
const { tables: v } = await Ts(d, x.table);
|
|
4325
|
+
Pt(i, l, v, x.table, d, x.level, r);
|
|
4326
|
+
const b = Ds(d, x.level);
|
|
4327
|
+
c(b) ? m.push(...v.map((u) => ({ table: u.table, level: b }))) : m.push(
|
|
4328
|
+
...v.filter((u) => u.materialization === "ephemeral").map((u) => ({ table: u.table, level: b }))
|
|
4324
4329
|
);
|
|
4325
4330
|
}
|
|
4326
4331
|
};
|
|
@@ -4341,25 +4346,25 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4341
4346
|
const b = l[v].data;
|
|
4342
4347
|
if (b[i] !== 0) {
|
|
4343
4348
|
if (c[v].length < b[i]) return v;
|
|
4344
|
-
for (const
|
|
4349
|
+
for (const u of c[v]) C.push(u);
|
|
4345
4350
|
}
|
|
4346
4351
|
}
|
|
4347
4352
|
})();
|
|
4348
4353
|
if (!f) return -1;
|
|
4349
|
-
const { level:
|
|
4350
|
-
return o ? m -
|
|
4354
|
+
const { level: d } = l[n].data, { level: m } = l[f].data;
|
|
4355
|
+
return o ? m - d : d - m;
|
|
4351
4356
|
}, et = (e, t, n) => [
|
|
4352
4357
|
oo(e, t, n, !1),
|
|
4353
4358
|
oo(e, t, n, !0)
|
|
4354
|
-
], Bs = async (e, t, n, o, s, r, i, l, c, h, f,
|
|
4359
|
+
], Bs = async (e, t, n, o, s, r, i, l, c, h, f, d) => {
|
|
4355
4360
|
var S, j, _, H, N, I;
|
|
4356
4361
|
let m = !1;
|
|
4357
|
-
const { levelMap: C, tableNodes: x, seeMoreIdTableReverseMap: v } = Y6(e, t), b = (D) => e.find((P) => P.id === D),
|
|
4362
|
+
const { levelMap: C, tableNodes: x, seeMoreIdTableReverseMap: v } = Y6(e, t), b = (D) => e.find((P) => P.id === D), u = {}, w = {};
|
|
4358
4363
|
let y = o.map((D) => [D.table, D.name]), E = [];
|
|
4359
|
-
for (
|
|
4364
|
+
for (d(() => ({})); !(he.isCancelled || (y = y.filter((z) => !u[z.join("/")]), y.length === 0 && E.length === 0)); ) {
|
|
4360
4365
|
const D = {};
|
|
4361
4366
|
y.forEach((z) => {
|
|
4362
|
-
|
|
4367
|
+
u[z.join("/")] = !0, D[z[0]] = !0;
|
|
4363
4368
|
});
|
|
4364
4369
|
const [P, O] = n ? ["source", "target"] : ["target", "source"], p = [], k = [], L = [];
|
|
4365
4370
|
let A = !1;
|
|
@@ -4393,7 +4398,7 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4393
4398
|
Array.from(new Set(F)),
|
|
4394
4399
|
h,
|
|
4395
4400
|
f,
|
|
4396
|
-
|
|
4401
|
+
d
|
|
4397
4402
|
);
|
|
4398
4403
|
((N = M.confidence) == null ? void 0 : N.confidence) === "low" && s(((I = M.confidence) == null ? void 0 : I.operator_list) || []), y = M.newCurr, !m && y.length > 0 && (m = !0), y = y.filter(
|
|
4399
4404
|
(z) => t.filter((U) => (n ? U.source : U.target) === z[0]).length > 0
|
|
@@ -4412,11 +4417,11 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4412
4417
|
const { table: h } = n;
|
|
4413
4418
|
if (e.find((C) => C.id === h)) return !1;
|
|
4414
4419
|
e.push(j1(n, i, o));
|
|
4415
|
-
const
|
|
4416
|
-
if (t.push(Y2(
|
|
4420
|
+
const d = (m = e.find((C) => C.id === o)) == null ? void 0 : m.data.level;
|
|
4421
|
+
if (t.push(Y2(d, i, o, h, r, !1, n.source)), l == null || l.forEach((C) => {
|
|
4417
4422
|
const x = G1(C.source[0], C.source[1]), v = G1(C.target[0], C.target[1]), b = {};
|
|
4418
|
-
if (r && l.filter((
|
|
4419
|
-
b[
|
|
4423
|
+
if (r && l.filter((u) => u.target.join("/") === C.target.join("/")).forEach((u) => {
|
|
4424
|
+
b[u.source.join("/")] = u.viewsCode || [];
|
|
4420
4425
|
}), r) {
|
|
4421
4426
|
if (C.target[0] !== h) return;
|
|
4422
4427
|
e.push(
|
|
@@ -4468,8 +4473,8 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4468
4473
|
o,
|
|
4469
4474
|
s
|
|
4470
4475
|
);
|
|
4471
|
-
h.forEach((
|
|
4472
|
-
l.nodes.push(
|
|
4476
|
+
h.forEach((d) => {
|
|
4477
|
+
l.nodes.push(d), o.findIndex((m) => m.id === d.id) === -1 && o.push(d);
|
|
4473
4478
|
}), l.edges = Array.from(/* @__PURE__ */ new Set([...l.edges, ...f]));
|
|
4474
4479
|
}
|
|
4475
4480
|
return l;
|
|
@@ -4597,14 +4602,14 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4597
4602
|
materialization: c,
|
|
4598
4603
|
isExternalProject: h,
|
|
4599
4604
|
schema: f
|
|
4600
|
-
} = e,
|
|
4605
|
+
} = e, d = ke(), {
|
|
4601
4606
|
state: {
|
|
4602
4607
|
selectedTable: m,
|
|
4603
4608
|
collectColumns: C,
|
|
4604
4609
|
selectedColumn: x,
|
|
4605
4610
|
leftExpansion: v,
|
|
4606
4611
|
rightExpansion: b,
|
|
4607
|
-
selectCheck:
|
|
4612
|
+
selectCheck: u,
|
|
4608
4613
|
nonSelectCheck: w,
|
|
4609
4614
|
errors: y
|
|
4610
4615
|
},
|
|
@@ -4614,16 +4619,16 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4614
4619
|
he.showCllInProgressMsg();
|
|
4615
4620
|
return;
|
|
4616
4621
|
}
|
|
4617
|
-
let [A, F] = await Zs(
|
|
4618
|
-
if ([A, F] = Q1(A, F, m), Oe(A, F),
|
|
4622
|
+
let [A, F] = await Zs(d.getNodes(), d.getEdges(), n, L);
|
|
4623
|
+
if ([A, F] = Q1(A, F, m), Oe(A, F), d.setNodes(A), d.setEdges(F), S(K1(et(A, F, m))), S(
|
|
4619
4624
|
N1(
|
|
4620
4625
|
await A1(A, F, m, v, b)
|
|
4621
4626
|
)
|
|
4622
4627
|
), E(), !!(x != null && x.name))
|
|
4623
4628
|
try {
|
|
4624
4629
|
he.start();
|
|
4625
|
-
const M =
|
|
4626
|
-
q1(M, !1), J1(M, !0),
|
|
4630
|
+
const M = d.getEdges();
|
|
4631
|
+
q1(M, !1), J1(M, !0), d.setEdges(M), await Bs(
|
|
4627
4632
|
A,
|
|
4628
4633
|
F,
|
|
4629
4634
|
L,
|
|
@@ -4637,12 +4642,12 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4637
4642
|
(V) => {
|
|
4638
4643
|
S(Eo(V));
|
|
4639
4644
|
},
|
|
4640
|
-
() => [
|
|
4645
|
+
() => [d.getNodes(), d.getEdges()],
|
|
4641
4646
|
(V, B) => {
|
|
4642
|
-
|
|
4647
|
+
d.setNodes(V), d.setEdges(B);
|
|
4643
4648
|
},
|
|
4644
4649
|
x,
|
|
4645
|
-
{ direct:
|
|
4650
|
+
{ direct: u, indirect: w },
|
|
4646
4651
|
(V) => S(So(V(y)))
|
|
4647
4652
|
), E();
|
|
4648
4653
|
} catch (M) {
|
|
@@ -4657,7 +4662,7 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4657
4662
|
exposure: R2,
|
|
4658
4663
|
snowflake_stage: xs
|
|
4659
4664
|
}[i] || O2));
|
|
4660
|
-
}, O =
|
|
4665
|
+
}, O = d.getEdges(), p = n.replace(/[^a-zA-Z0-9]/g, "-");
|
|
4661
4666
|
return /* @__PURE__ */ a.jsxs(
|
|
4662
4667
|
"div",
|
|
4663
4668
|
{
|
|
@@ -4671,12 +4676,12 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4671
4676
|
{
|
|
4672
4677
|
className: Z.table_node,
|
|
4673
4678
|
onClick: async () => {
|
|
4674
|
-
const L =
|
|
4679
|
+
const L = d.getNodes(), A = d.getEdges();
|
|
4675
4680
|
S(K1(et(L, A, n))), S(
|
|
4676
4681
|
N1(
|
|
4677
4682
|
await A1(L, A, n, v, b)
|
|
4678
4683
|
)
|
|
4679
|
-
), _2(
|
|
4684
|
+
), _2(d, n), S(l1(n)), o && S4(o);
|
|
4680
4685
|
},
|
|
4681
4686
|
children: [
|
|
4682
4687
|
/* @__PURE__ */ a.jsx(
|
|
@@ -4749,7 +4754,7 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4749
4754
|
"div",
|
|
4750
4755
|
{
|
|
4751
4756
|
className: Q("nodrag", Z.table_handle, {
|
|
4752
|
-
invisible: r === 0 || r === O.filter((L) => L.target === n).length ||
|
|
4757
|
+
invisible: r === 0 || r === O.filter((L) => L.target === n).length || d.getNode(Nt(n, !1))
|
|
4753
4758
|
}),
|
|
4754
4759
|
onClick: (L) => {
|
|
4755
4760
|
L.stopPropagation(), D();
|
|
@@ -4802,7 +4807,7 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4802
4807
|
"div",
|
|
4803
4808
|
{
|
|
4804
4809
|
className: Q("nodrag", Z.table_handle, {
|
|
4805
|
-
invisible: s === 0 || s === O.filter((L) => L.source === n).length ||
|
|
4810
|
+
invisible: s === 0 || s === O.filter((L) => L.source === n).length || d.getNode(Nt(n, !0))
|
|
4806
4811
|
}),
|
|
4807
4812
|
onClick: (L) => {
|
|
4808
4813
|
L.stopPropagation(), I();
|
|
@@ -4853,7 +4858,7 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4853
4858
|
nodeSavingsPerformance: c,
|
|
4854
4859
|
nodesCost: h
|
|
4855
4860
|
}
|
|
4856
|
-
} = ue(), f = ge(),
|
|
4861
|
+
} = ue(), f = ge(), d = n || "unknown";
|
|
4857
4862
|
return /* @__PURE__ */ a.jsxs("div", { className: "position-relative", children: [
|
|
4858
4863
|
/* @__PURE__ */ a.jsxs("div", { className: Z.node_stats, children: [
|
|
4859
4864
|
/* @__PURE__ */ a.jsx(
|
|
@@ -4891,7 +4896,7 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4891
4896
|
/* @__PURE__ */ a.jsx("div", { children: h[t].value }),
|
|
4892
4897
|
/* @__PURE__ */ a.jsx("div", { children: h[t].percent })
|
|
4893
4898
|
] }) }),
|
|
4894
|
-
/* @__PURE__ */ a.jsx("div", { className: Q(Z.node_icon, en[
|
|
4899
|
+
/* @__PURE__ */ a.jsx("div", { className: Q(Z.node_icon, en[d]), children: /* @__PURE__ */ a.jsx(D4, { nodeType: d }) }),
|
|
4895
4900
|
/* @__PURE__ */ a.jsx("div", {}),
|
|
4896
4901
|
/* @__PURE__ */ a.jsx("div", { className: "lines-2", children: o }),
|
|
4897
4902
|
/* @__PURE__ */ a.jsx("div", { className: "spacer" }),
|
|
@@ -4901,10 +4906,10 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4901
4906
|
{
|
|
4902
4907
|
className: Q(
|
|
4903
4908
|
Z.details_btn,
|
|
4904
|
-
!s ||
|
|
4909
|
+
!s || d === "unknown" ? Z.disable : Z.enable
|
|
4905
4910
|
),
|
|
4906
4911
|
onClick: (x) => {
|
|
4907
|
-
x.stopPropagation(),
|
|
4912
|
+
x.stopPropagation(), d !== "unknown" && (i || f(l1(t)));
|
|
4908
4913
|
},
|
|
4909
4914
|
children: /* @__PURE__ */ a.jsx(ks, {})
|
|
4910
4915
|
}
|
|
@@ -4937,7 +4942,7 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4937
4942
|
}, on = ({ data: e }) => {
|
|
4938
4943
|
const { column: t, table: n, viewsType: o, viewsCode: s, nodeType: r, datatype: i } = e, {
|
|
4939
4944
|
state: { selectedColumn: l, showCodeModal: c }
|
|
4940
|
-
} = ue(), h = ge(), f = (l == null ? void 0 : l.table) === n && (l == null ? void 0 : l.name) === t,
|
|
4945
|
+
} = ue(), h = ge(), f = (l == null ? void 0 : l.table) === n && (l == null ? void 0 : l.name) === t, d = o && $2[o], m = d ? { borderColor: d } : {}, C = ke(), x = () => {
|
|
4941
4946
|
const b = C.getNode(G1(n, t));
|
|
4942
4947
|
b && (h(l1("")), h(i1({ name: t, table: n })), R4(b, C));
|
|
4943
4948
|
}, v = xe(() => Object.values(s || {}).flat().filter(([, b]) => !!b).map(([b]) => b).length > 0, [s]);
|
|
@@ -4956,7 +4961,7 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4956
4961
|
{
|
|
4957
4962
|
className: Z.column_code_icon,
|
|
4958
4963
|
onClick: (b) => {
|
|
4959
|
-
var
|
|
4964
|
+
var u, w;
|
|
4960
4965
|
b.stopPropagation(), c ? h(
|
|
4961
4966
|
c1({
|
|
4962
4967
|
type: "views_code",
|
|
@@ -4976,7 +4981,7 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
4976
4981
|
nodeType: r,
|
|
4977
4982
|
column: t,
|
|
4978
4983
|
datatype: i,
|
|
4979
|
-
label: (w = (
|
|
4984
|
+
label: (w = (u = C.getNode(n)) == null ? void 0 : u.data) == null ? void 0 : w.label
|
|
4980
4985
|
});
|
|
4981
4986
|
},
|
|
4982
4987
|
children: /* @__PURE__ */ a.jsx(ro, {})
|
|
@@ -5016,7 +5021,7 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
5016
5021
|
nodeSavingsPerformance: c,
|
|
5017
5022
|
nodesCost: h
|
|
5018
5023
|
}
|
|
5019
|
-
} = ue(), f = s === "dark",
|
|
5024
|
+
} = ue(), f = s === "dark", d = ge();
|
|
5020
5025
|
return /* @__PURE__ */ a.jsxs("div", { style: { width: ot, display: "flex", justifyContent: "center" }, children: [
|
|
5021
5026
|
/* @__PURE__ */ a.jsx(st, {}),
|
|
5022
5027
|
/* @__PURE__ */ a.jsx("div", { className: "d-flex flex-column", children: /* @__PURE__ */ a.jsxs(
|
|
@@ -5027,7 +5032,7 @@ const V4 = ({ datatype: e, color: t, size: n = "1rem" }) => {
|
|
|
5027
5032
|
[Z.selected]: l === o
|
|
5028
5033
|
}),
|
|
5029
5034
|
onClick: () => {
|
|
5030
|
-
i ? document.dispatchEvent(new CustomEvent("selectedNode", { detail: o })) :
|
|
5035
|
+
i ? document.dispatchEvent(new CustomEvent("selectedNode", { detail: o })) : d(
|
|
5031
5036
|
c1({
|
|
5032
5037
|
type: "op_node",
|
|
5033
5038
|
args: { op_code: n, op_type: t }
|
|
@@ -5143,9 +5148,9 @@ function Os() {
|
|
|
5143
5148
|
const {
|
|
5144
5149
|
state: { moreTables: e, selectCheck: t, nonSelectCheck: n },
|
|
5145
5150
|
rerender: o
|
|
5146
|
-
} = ue(), s = ge(), { tables: r, level: i } = e, l = ke(), c = async (
|
|
5151
|
+
} = ue(), s = ge(), { tables: r, level: i } = e, l = ke(), c = async (d) => {
|
|
5147
5152
|
const m = [...l.getNodes()], C = [...l.getEdges()];
|
|
5148
|
-
P4(m, C,
|
|
5153
|
+
P4(m, C, d, e, {
|
|
5149
5154
|
direct: t,
|
|
5150
5155
|
indirect: n
|
|
5151
5156
|
}) && s(Pe("")), Oe(m, C), l.setNodes(m), l.setEdges(C), o();
|
|
@@ -5157,15 +5162,15 @@ function Os() {
|
|
|
5157
5162
|
{
|
|
5158
5163
|
bsSize: "sm",
|
|
5159
5164
|
placeholder: "Search by table name",
|
|
5160
|
-
onChange: (
|
|
5161
|
-
const m =
|
|
5165
|
+
onChange: (d) => {
|
|
5166
|
+
const m = d.target.value.toLowerCase();
|
|
5162
5167
|
f(r.filter((C) => C.table.toLowerCase().includes(m)));
|
|
5163
5168
|
}
|
|
5164
5169
|
}
|
|
5165
5170
|
),
|
|
5166
5171
|
/* @__PURE__ */ a.jsx("div", { className: "mb-3" }),
|
|
5167
|
-
/* @__PURE__ */ a.jsx("div", { className: "h-100 overflow-y", children: /* @__PURE__ */ a.jsx("div", { className: "d-flex flex-column gap-sm", children: h.map((
|
|
5168
|
-
const m = l.getNode(
|
|
5172
|
+
/* @__PURE__ */ a.jsx("div", { className: "h-100 overflow-y", children: /* @__PURE__ */ a.jsx("div", { className: "d-flex flex-column gap-sm", children: h.map((d) => {
|
|
5173
|
+
const m = l.getNode(d.table), C = m && m.data.level !== i;
|
|
5169
5174
|
return /* @__PURE__ */ a.jsx(
|
|
5170
5175
|
"div",
|
|
5171
5176
|
{
|
|
@@ -5174,20 +5179,20 @@ function Os() {
|
|
|
5174
5179
|
// [styles.disabled]: isNodeOnOtherLevel,
|
|
5175
5180
|
}),
|
|
5176
5181
|
onClick: (x) => {
|
|
5177
|
-
x.stopPropagation(), !C && c(
|
|
5182
|
+
x.stopPropagation(), !C && c(d);
|
|
5178
5183
|
},
|
|
5179
5184
|
children: /* @__PURE__ */ a.jsx(
|
|
5180
5185
|
U4,
|
|
5181
5186
|
{
|
|
5182
|
-
nodeType:
|
|
5183
|
-
label:
|
|
5184
|
-
table:
|
|
5185
|
-
tests:
|
|
5186
|
-
materialization:
|
|
5187
|
+
nodeType: d.nodeType,
|
|
5188
|
+
label: d.label,
|
|
5189
|
+
table: d.table,
|
|
5190
|
+
tests: d.tests,
|
|
5191
|
+
materialization: d.materialization
|
|
5187
5192
|
}
|
|
5188
5193
|
)
|
|
5189
5194
|
},
|
|
5190
|
-
|
|
5195
|
+
d.table
|
|
5191
5196
|
);
|
|
5192
5197
|
}) }) })
|
|
5193
5198
|
] });
|
|
@@ -5202,8 +5207,8 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5202
5207
|
/* @__PURE__ */ a.jsx("div", { className: Q(Z.column_card), children: /* @__PURE__ */ a.jsx("div", { className: "font-normal fs-xxs", children: e }) })
|
|
5203
5208
|
] }) }) }), zs = ({ column: e, handleClick: t, selected: n, isSelectable: o }) => {
|
|
5204
5209
|
const {
|
|
5205
|
-
state: { theme: s, config: r },
|
|
5206
|
-
dispatch:
|
|
5210
|
+
state: { theme: s, config: r, renderTags: i },
|
|
5211
|
+
dispatch: l
|
|
5207
5212
|
} = je(h1);
|
|
5208
5213
|
return /* @__PURE__ */ a.jsxs(
|
|
5209
5214
|
"div",
|
|
@@ -5224,8 +5229,8 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5224
5229
|
fo,
|
|
5225
5230
|
{
|
|
5226
5231
|
className: "al-w-8 al-h-8",
|
|
5227
|
-
onClick: async (
|
|
5228
|
-
|
|
5232
|
+
onClick: async (c) => {
|
|
5233
|
+
c.stopPropagation(), l(
|
|
5229
5234
|
c1({
|
|
5230
5235
|
type: "export_final_lineage",
|
|
5231
5236
|
args: { table: e.table, column: e.name }
|
|
@@ -5239,6 +5244,7 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5239
5244
|
e.datatype && /* @__PURE__ */ a.jsx(J4, { label: e.datatype })
|
|
5240
5245
|
] }),
|
|
5241
5246
|
e.description && /* @__PURE__ */ a.jsx("div", { className: "d-flex flex-column", children: /* @__PURE__ */ a.jsx("div", { className: "font-normal fs-xxs text-grey", children: e.description }) }),
|
|
5247
|
+
i && i({ column: e, table_rk: e.table }),
|
|
5242
5248
|
e.code && /* @__PURE__ */ a.jsx(At, { code: e.code, language: "sql", editorTheme: "tomorrow", theme: s })
|
|
5243
5249
|
]
|
|
5244
5250
|
}
|
|
@@ -5264,8 +5270,8 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5264
5270
|
{
|
|
5265
5271
|
size: "sm",
|
|
5266
5272
|
onClick: () => {
|
|
5267
|
-
s && Ft(s.table, !0).then((
|
|
5268
|
-
|
|
5273
|
+
s && Ft(s.table, !0).then((d) => {
|
|
5274
|
+
d && (i(d), n(d.columns));
|
|
5269
5275
|
});
|
|
5270
5276
|
},
|
|
5271
5277
|
children: "Sync with DB"
|
|
@@ -5278,8 +5284,8 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5278
5284
|
bsSize: "sm",
|
|
5279
5285
|
type: "text",
|
|
5280
5286
|
placeholder: "Search by column name",
|
|
5281
|
-
onChange: (
|
|
5282
|
-
const m =
|
|
5287
|
+
onChange: (d) => {
|
|
5288
|
+
const m = d.target.value.toLowerCase();
|
|
5283
5289
|
n(e.filter((C) => C.name.toLowerCase().includes(m)));
|
|
5284
5290
|
}
|
|
5285
5291
|
}
|
|
@@ -5292,17 +5298,17 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5292
5298
|
" columns"
|
|
5293
5299
|
] })
|
|
5294
5300
|
] }),
|
|
5295
|
-
/* @__PURE__ */ a.jsx("div", { className: "d-flex flex-column gap-sm", children: t.map((
|
|
5301
|
+
/* @__PURE__ */ a.jsx("div", { className: "d-flex flex-column gap-sm", children: t.map((d) => /* @__PURE__ */ a.jsx(
|
|
5296
5302
|
zs,
|
|
5297
5303
|
{
|
|
5298
|
-
column:
|
|
5304
|
+
column: d,
|
|
5299
5305
|
handleClick: () => {
|
|
5300
|
-
h || o(
|
|
5306
|
+
h || o(d);
|
|
5301
5307
|
},
|
|
5302
|
-
selected:
|
|
5308
|
+
selected: d.name === (r == null ? void 0 : r.name) && d.table === (r == null ? void 0 : r.table),
|
|
5303
5309
|
isSelectable: !h && c === "dynamic"
|
|
5304
5310
|
},
|
|
5305
|
-
|
|
5311
|
+
d.name
|
|
5306
5312
|
)) })
|
|
5307
5313
|
] }) });
|
|
5308
5314
|
}, ea = ({ tests: e }) => {
|
|
@@ -5402,7 +5408,7 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5402
5408
|
theme: h,
|
|
5403
5409
|
lightdashEnabled: f
|
|
5404
5410
|
}
|
|
5405
|
-
} = ue(),
|
|
5411
|
+
} = ue(), d = ge(), m = ke(), [C, x] = se([]), [v, b] = se(null), [u, w] = se(0), [y, E] = se(!0);
|
|
5406
5412
|
Y(() => {
|
|
5407
5413
|
n && (E(!0), Ft(n, !1).then((N) => {
|
|
5408
5414
|
b(N), x(N.columns), E(!1);
|
|
@@ -5422,7 +5428,7 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5422
5428
|
}
|
|
5423
5429
|
if ((o == null ? void 0 : o.table) === N.table && (o == null ? void 0 : o.name) === N.name) {
|
|
5424
5430
|
const [V, B] = F4(m.getNodes(), m.getEdges());
|
|
5425
|
-
q1(B, !0), J1(B, !0), m.setNodes(V), m.setEdges(B),
|
|
5431
|
+
q1(B, !0), J1(B, !0), m.setNodes(V), m.setEdges(B), d(i1({ table: "", name: "" })), d(U1({})), d(Pe(""));
|
|
5426
5432
|
return;
|
|
5427
5433
|
}
|
|
5428
5434
|
const I = (M = m.getNode(N.table)) == null ? void 0 : M.data;
|
|
@@ -5433,7 +5439,7 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5433
5439
|
const O = async (V) => {
|
|
5434
5440
|
[D, P] = await Zs(D, P, N.table, V), Oe(D, P);
|
|
5435
5441
|
}, { upstreamCount: p, downstreamCount: k } = I;
|
|
5436
|
-
p > 0 && P.filter((V) => V.source === N.table).length < p && await O(!0), k > 0 && P.filter((V) => V.target === N.table).length < k && await O(!1),
|
|
5442
|
+
p > 0 && P.filter((V) => V.source === N.table).length < p && await O(!0), k > 0 && P.filter((V) => V.target === N.table).length < k && await O(!1), d(i1({ ...N })), d(Pe("")), d(U1({})), d(p5({ confidence: "high" }));
|
|
5437
5443
|
const [L, A] = Is(
|
|
5438
5444
|
D.filter($e),
|
|
5439
5445
|
P.filter($e)
|
|
@@ -5445,13 +5451,13 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5445
5451
|
V,
|
|
5446
5452
|
[N],
|
|
5447
5453
|
(B) => {
|
|
5448
|
-
|
|
5454
|
+
d(vo({ operatorList: B }));
|
|
5449
5455
|
},
|
|
5450
5456
|
(B) => {
|
|
5451
|
-
|
|
5457
|
+
d(yo(B));
|
|
5452
5458
|
},
|
|
5453
5459
|
(B) => {
|
|
5454
|
-
|
|
5460
|
+
d(Eo(B));
|
|
5455
5461
|
},
|
|
5456
5462
|
() => [m.getNodes(), m.getEdges()],
|
|
5457
5463
|
(B, R) => {
|
|
@@ -5459,14 +5465,14 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5459
5465
|
},
|
|
5460
5466
|
N,
|
|
5461
5467
|
{ direct: s, indirect: r },
|
|
5462
|
-
(B) =>
|
|
5468
|
+
(B) => d(So(B(c)))
|
|
5463
5469
|
);
|
|
5464
5470
|
try {
|
|
5465
|
-
he.start(), (await Promise.all([F(!0), F(!1)])).every((B) => !B) && (
|
|
5471
|
+
he.start(), (await Promise.all([F(!0), F(!1)])).every((B) => !B) && (d(i1({ table: "", name: "" })), _2(m, N.table), he.isCancelled || q2(
|
|
5466
5472
|
`No lineage found for model ${N.table} and column ${N.name}`
|
|
5467
5473
|
));
|
|
5468
5474
|
} catch (V) {
|
|
5469
|
-
console.error("Error while performing cll for ", N.table, N.name, ", error:", V),
|
|
5475
|
+
console.error("Error while performing cll for ", N.table, N.name, ", error:", V), d(i1({ table: "", name: "" })), _2(m, N.table);
|
|
5470
5476
|
} finally {
|
|
5471
5477
|
he.end();
|
|
5472
5478
|
}
|
|
@@ -5480,17 +5486,17 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5480
5486
|
"div",
|
|
5481
5487
|
{
|
|
5482
5488
|
className: Q(Z.tab, "d-flex align-items-center gap-sm", {
|
|
5483
|
-
[Z.selected]:
|
|
5489
|
+
[Z.selected]: u === I
|
|
5484
5490
|
}),
|
|
5485
5491
|
onClick: () => w(I),
|
|
5486
5492
|
children: [
|
|
5487
|
-
/* @__PURE__ */ a.jsx("div", { className: h === "light" &&
|
|
5493
|
+
/* @__PURE__ */ a.jsx("div", { className: h === "light" && u !== I ? "text-primary" : "text-white", children: N === "Lightdash" ? /* @__PURE__ */ a.jsx(Mr, {}) : null }),
|
|
5488
5494
|
N
|
|
5489
5495
|
]
|
|
5490
5496
|
},
|
|
5491
5497
|
N
|
|
5492
5498
|
)) }),
|
|
5493
|
-
_[
|
|
5499
|
+
_[u] === "Column" && /* @__PURE__ */ a.jsx(
|
|
5494
5500
|
Q4,
|
|
5495
5501
|
{
|
|
5496
5502
|
selectedTable: j,
|
|
@@ -5504,8 +5510,8 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5504
5510
|
lineageType: e
|
|
5505
5511
|
}
|
|
5506
5512
|
),
|
|
5507
|
-
_[
|
|
5508
|
-
_[
|
|
5513
|
+
_[u] === "Tests" && /* @__PURE__ */ a.jsx(ea, { tests: j.tests }),
|
|
5514
|
+
_[u] === "Lightdash" && /* @__PURE__ */ a.jsx(ra, { node: j })
|
|
5509
5515
|
] });
|
|
5510
5516
|
}, ia = () => {
|
|
5511
5517
|
var C, x, v, b;
|
|
@@ -5513,15 +5519,15 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5513
5519
|
state: { theme: e }
|
|
5514
5520
|
} = je(h1), {
|
|
5515
5521
|
state: { sqlLineage: t, selectedTable: n, allowSyncColumnsWithDB: o }
|
|
5516
|
-
} = ue(), s = (v = (x = (C = t == null ? void 0 : t.details) == null ? void 0 : C[n]) == null ? void 0 : x.columns) == null ? void 0 : v.map((
|
|
5517
|
-
...
|
|
5518
|
-
description:
|
|
5522
|
+
} = ue(), s = (v = (x = (C = t == null ? void 0 : t.details) == null ? void 0 : C[n]) == null ? void 0 : x.columns) == null ? void 0 : v.map((u) => ({
|
|
5523
|
+
...u,
|
|
5524
|
+
description: u.expression
|
|
5519
5525
|
})), [r, i] = se(s), [l, c] = se(s), h = (b = t == null ? void 0 : t.details) == null ? void 0 : b[n];
|
|
5520
5526
|
if (!h)
|
|
5521
5527
|
return null;
|
|
5522
|
-
const { sql: f, type:
|
|
5528
|
+
const { sql: f, type: d, nodeId: m } = h;
|
|
5523
5529
|
return /* @__PURE__ */ a.jsxs("div", { className: "p-2 h-100 d-flex flex-column gap-md overflow-y", children: [
|
|
5524
|
-
/* @__PURE__ */ a.jsx(an, { nodeType:
|
|
5530
|
+
/* @__PURE__ */ a.jsx(an, { nodeType: d || "cte", table: n }),
|
|
5525
5531
|
f && /* @__PURE__ */ a.jsx("div", { className: Q(Z.card, "mb-0 purpose-section"), children: /* @__PURE__ */ a.jsxs("div", { className: "d-flex flex-column gap-sm", children: [
|
|
5526
5532
|
/* @__PURE__ */ a.jsx("div", { className: "fs-5 fw-semibold", children: "SQL" }),
|
|
5527
5533
|
/* @__PURE__ */ a.jsx(
|
|
@@ -5539,13 +5545,13 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5539
5545
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center gap-xs", children: [
|
|
5540
5546
|
/* @__PURE__ */ a.jsx("div", { className: "fs-5 fw-semibold", children: "Column" }),
|
|
5541
5547
|
/* @__PURE__ */ a.jsx("div", { className: "spacer" }),
|
|
5542
|
-
o && m && ["table", "final"].includes(
|
|
5548
|
+
o && m && ["table", "final"].includes(d || "") && /* @__PURE__ */ a.jsx(
|
|
5543
5549
|
ve,
|
|
5544
5550
|
{
|
|
5545
5551
|
size: "sm",
|
|
5546
5552
|
onClick: () => {
|
|
5547
|
-
Ft(m, !0).then((
|
|
5548
|
-
i(
|
|
5553
|
+
Ft(m, !0).then((u) => {
|
|
5554
|
+
i(u.columns), c(u.columns);
|
|
5549
5555
|
});
|
|
5550
5556
|
},
|
|
5551
5557
|
children: "Sync with DB"
|
|
@@ -5558,8 +5564,8 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5558
5564
|
bsSize: "sm",
|
|
5559
5565
|
placeholder: "Search by column name",
|
|
5560
5566
|
type: "text",
|
|
5561
|
-
onChange: (
|
|
5562
|
-
const w =
|
|
5567
|
+
onChange: (u) => {
|
|
5568
|
+
const w = u.target.value.toLowerCase();
|
|
5563
5569
|
c(r == null ? void 0 : r.filter((y) => y.name.toLowerCase().includes(w)));
|
|
5564
5570
|
}
|
|
5565
5571
|
}
|
|
@@ -5568,22 +5574,22 @@ const K4 = "_component_13r39_1", Y4 = "_spin_13r39_1", X4 = {
|
|
|
5568
5574
|
l == null ? void 0 : l.length,
|
|
5569
5575
|
" columns"
|
|
5570
5576
|
] }) }),
|
|
5571
|
-
/* @__PURE__ */ a.jsx("div", { className: "d-flex flex-column gap-sm overflow-y", children: l == null ? void 0 : l.map((
|
|
5577
|
+
/* @__PURE__ */ a.jsx("div", { className: "d-flex flex-column gap-sm overflow-y", children: l == null ? void 0 : l.map((u) => /* @__PURE__ */ a.jsx(
|
|
5572
5578
|
zs,
|
|
5573
5579
|
{
|
|
5574
5580
|
column: {
|
|
5575
|
-
name:
|
|
5581
|
+
name: u.name,
|
|
5576
5582
|
table: n,
|
|
5577
5583
|
can_lineage_expand: !1,
|
|
5578
5584
|
description: "",
|
|
5579
|
-
code:
|
|
5585
|
+
code: u.expression
|
|
5580
5586
|
},
|
|
5581
5587
|
handleClick: () => {
|
|
5582
5588
|
},
|
|
5583
5589
|
selected: !1,
|
|
5584
5590
|
isSelectable: !1
|
|
5585
5591
|
},
|
|
5586
|
-
|
|
5592
|
+
u.name
|
|
5587
5593
|
)) })
|
|
5588
5594
|
] }) })
|
|
5589
5595
|
] });
|
|
@@ -5824,9 +5830,9 @@ function Us({
|
|
|
5824
5830
|
return Y(() => {
|
|
5825
5831
|
const i = (l) => {
|
|
5826
5832
|
if (!o.current) return;
|
|
5827
|
-
const { x: c, y: h, width: f, height:
|
|
5833
|
+
const { x: c, y: h, width: f, height: d } = o.current.getBoundingClientRect();
|
|
5828
5834
|
r(
|
|
5829
|
-
Xn(c - 10, c + f + 10)(l.x) && Xn(h - 10, h +
|
|
5835
|
+
Xn(c - 10, c + f + 10)(l.x) && Xn(h - 10, h + d + 10)(l.y) ? e : ""
|
|
5830
5836
|
);
|
|
5831
5837
|
};
|
|
5832
5838
|
return document.body.addEventListener("click", i), () => {
|
|
@@ -5860,7 +5866,7 @@ const da = () => {
|
|
|
5860
5866
|
const e = ke(), {
|
|
5861
5867
|
state: { selectedTable: t, leftExpansion: n, rightExpansion: o, minRange: s, nodeCount: r, defaultExpansion: i },
|
|
5862
5868
|
rerender: l
|
|
5863
|
-
} = ue(), [c, h] = se([0, 0]), f = ge(), { openedPopover:
|
|
5869
|
+
} = ue(), [c, h] = se([0, 0]), f = ge(), { openedPopover: d } = je(ln), m = "auto-expansion-popover", C = d === m;
|
|
5864
5870
|
Y(() => {
|
|
5865
5871
|
f(Xt(qn(s[0], c[0], i))), f(Gt(qn(s[1], c[1], i)));
|
|
5866
5872
|
}, [i, f, c, s]), Y(() => {
|
|
@@ -5881,7 +5887,7 @@ const da = () => {
|
|
|
5881
5887
|
if (!C || !t) return;
|
|
5882
5888
|
const b = (_ = e.getNode(t)) == null ? void 0 : _.data;
|
|
5883
5889
|
if (!b) return;
|
|
5884
|
-
const { level:
|
|
5890
|
+
const { level: u } = b, w = e.getNodes(), y = e.getEdges(), [E] = await Mt(
|
|
5885
5891
|
w,
|
|
5886
5892
|
y,
|
|
5887
5893
|
t,
|
|
@@ -5892,7 +5898,7 @@ const da = () => {
|
|
|
5892
5898
|
let S = 1 / 0, j = -1 / 0;
|
|
5893
5899
|
for (const H of E)
|
|
5894
5900
|
S = Math.min(S, H.data.level), j = Math.max(j, H.data.level);
|
|
5895
|
-
h([
|
|
5901
|
+
h([u - S, j - u]);
|
|
5896
5902
|
})();
|
|
5897
5903
|
}, [e, t, C]);
|
|
5898
5904
|
const x = oe(() => {
|
|
@@ -5926,8 +5932,8 @@ const da = () => {
|
|
|
5926
5932
|
"div",
|
|
5927
5933
|
{
|
|
5928
5934
|
className: Z.icon,
|
|
5929
|
-
onClick: (
|
|
5930
|
-
|
|
5935
|
+
onClick: (u) => {
|
|
5936
|
+
u.stopPropagation(), t && f(Xt(c[0]));
|
|
5931
5937
|
},
|
|
5932
5938
|
children: /* @__PURE__ */ a.jsx(Ki, {})
|
|
5933
5939
|
}
|
|
@@ -5937,8 +5943,8 @@ const da = () => {
|
|
|
5937
5943
|
"div",
|
|
5938
5944
|
{
|
|
5939
5945
|
className: Z.icon,
|
|
5940
|
-
onClick: (
|
|
5941
|
-
|
|
5946
|
+
onClick: (u) => {
|
|
5947
|
+
u.stopPropagation(), t && x();
|
|
5942
5948
|
},
|
|
5943
5949
|
children: /* @__PURE__ */ a.jsx(Yi, {})
|
|
5944
5950
|
}
|
|
@@ -5961,8 +5967,8 @@ const da = () => {
|
|
|
5961
5967
|
"div",
|
|
5962
5968
|
{
|
|
5963
5969
|
className: Z.icon,
|
|
5964
|
-
onClick: (
|
|
5965
|
-
|
|
5970
|
+
onClick: (u) => {
|
|
5971
|
+
u.stopPropagation(), t && v();
|
|
5966
5972
|
},
|
|
5967
5973
|
children: /* @__PURE__ */ a.jsx(Xi, {})
|
|
5968
5974
|
}
|
|
@@ -5972,8 +5978,8 @@ const da = () => {
|
|
|
5972
5978
|
"div",
|
|
5973
5979
|
{
|
|
5974
5980
|
className: Z.icon,
|
|
5975
|
-
onClick: (
|
|
5976
|
-
|
|
5981
|
+
onClick: (u) => {
|
|
5982
|
+
u.stopPropagation(), t && f(Gt(c[1]));
|
|
5977
5983
|
},
|
|
5978
5984
|
children: /* @__PURE__ */ a.jsx(ks, {})
|
|
5979
5985
|
}
|
|
@@ -5993,9 +5999,9 @@ const da = () => {
|
|
|
5993
5999
|
variant: r === 0 ? "secondary" : "default",
|
|
5994
6000
|
size: "sm",
|
|
5995
6001
|
disabled: r === 0,
|
|
5996
|
-
onClick: async (
|
|
6002
|
+
onClick: async (u) => {
|
|
5997
6003
|
var S;
|
|
5998
|
-
if (
|
|
6004
|
+
if (u.stopPropagation(), !t) return;
|
|
5999
6005
|
const w = (S = e.getNode(t)) == null ? void 0 : S.data;
|
|
6000
6006
|
if (!w) return;
|
|
6001
6007
|
const [y, E] = await Mt(
|
|
@@ -6251,12 +6257,12 @@ const cn = () => {
|
|
|
6251
6257
|
[x.source.slice(7), x.target.slice(7), (v = x.data) == null ? void 0 : v.type]
|
|
6252
6258
|
);
|
|
6253
6259
|
}
|
|
6254
|
-
),
|
|
6260
|
+
), d = {};
|
|
6255
6261
|
await Promise.all(
|
|
6256
6262
|
e.getNodes().map(async (x) => {
|
|
6257
6263
|
if (Ee(x)) return;
|
|
6258
6264
|
const v = await Ft(x.id, !1);
|
|
6259
|
-
|
|
6265
|
+
d[x.id] = {
|
|
6260
6266
|
type: x.data.nodeType,
|
|
6261
6267
|
nodeId: x.id,
|
|
6262
6268
|
name: x.data.label,
|
|
@@ -6269,7 +6275,7 @@ const cn = () => {
|
|
|
6269
6275
|
collectColumns: o,
|
|
6270
6276
|
tableEdges: h,
|
|
6271
6277
|
columnEdges: f,
|
|
6272
|
-
details:
|
|
6278
|
+
details: d
|
|
6273
6279
|
} });
|
|
6274
6280
|
C != null && C.url && q2(`Lineage is exported at [link](${C.url})`), l(), r("");
|
|
6275
6281
|
};
|
|
@@ -6356,7 +6362,7 @@ const cn = () => {
|
|
|
6356
6362
|
rightExpansion: c,
|
|
6357
6363
|
selectedColumn: h,
|
|
6358
6364
|
defaultExpansion: f,
|
|
6359
|
-
errors:
|
|
6365
|
+
errors: d
|
|
6360
6366
|
},
|
|
6361
6367
|
rerender: m
|
|
6362
6368
|
} = ue(), C = ge(), x = X(f), v = oe(() => {
|
|
@@ -6404,13 +6410,13 @@ const cn = () => {
|
|
|
6404
6410
|
document.removeEventListener("cll_cancelled", v), document.removeEventListener("renderStartNode", y);
|
|
6405
6411
|
};
|
|
6406
6412
|
}, [v, b]);
|
|
6407
|
-
const
|
|
6413
|
+
const u = oe(async () => {
|
|
6408
6414
|
const y = await _4();
|
|
6409
6415
|
C(wo(y.showSelectEdges)), C(bo(y.showNonSelectEdges)), C(_o(y.defaultExpansion)), x.current = y.defaultExpansion;
|
|
6410
6416
|
}, [C]);
|
|
6411
6417
|
Y(() => {
|
|
6412
|
-
|
|
6413
|
-
}, [
|
|
6418
|
+
u();
|
|
6419
|
+
}, [u]), Y(() => {
|
|
6414
6420
|
const y = e.current;
|
|
6415
6421
|
if (!y) return;
|
|
6416
6422
|
(async () => {
|
|
@@ -6430,7 +6436,7 @@ const cn = () => {
|
|
|
6430
6436
|
}
|
|
6431
6437
|
y.setEdges(j);
|
|
6432
6438
|
})();
|
|
6433
|
-
}, [s, r, e, h, C,
|
|
6439
|
+
}, [s, r, e, h, C, d]);
|
|
6434
6440
|
const w = (y) => {
|
|
6435
6441
|
e.current = y, Vs();
|
|
6436
6442
|
};
|
|
@@ -6503,25 +6509,25 @@ const cn = () => {
|
|
|
6503
6509
|
return Y(() => {
|
|
6504
6510
|
l(U1(n)), setTimeout(async () => {
|
|
6505
6511
|
var v, b;
|
|
6506
|
-
const c = (
|
|
6507
|
-
table:
|
|
6508
|
-
label: r[
|
|
6512
|
+
const c = (u) => ({
|
|
6513
|
+
table: u,
|
|
6514
|
+
label: r[u].name,
|
|
6509
6515
|
upstreamCount: 0,
|
|
6510
6516
|
downstreamCount: 0,
|
|
6511
|
-
nodeType: r[
|
|
6517
|
+
nodeType: r[u].type || "cte",
|
|
6512
6518
|
isExternalProject: !1,
|
|
6513
6519
|
tests: []
|
|
6514
6520
|
}), { sources: h } = Ns(s);
|
|
6515
|
-
let f = [],
|
|
6516
|
-
const m = [...h], C = {}, x = (
|
|
6521
|
+
let f = [], d = [];
|
|
6522
|
+
const m = [...h], C = {}, x = (u, w) => {
|
|
6517
6523
|
var S, j;
|
|
6518
|
-
const y =
|
|
6524
|
+
const y = u ? s.filter(([_]) => _ === w).map(([, _]) => _) : s.filter(([, _]) => _ === w).map(([_]) => _), E = ((j = (S = f.find((_) => _.id === w)) == null ? void 0 : S.data) == null ? void 0 : j.level) || 0;
|
|
6519
6525
|
return Pt(
|
|
6520
6526
|
f,
|
|
6521
|
-
|
|
6527
|
+
d,
|
|
6522
6528
|
y.map(c),
|
|
6523
6529
|
w,
|
|
6524
|
-
|
|
6530
|
+
u,
|
|
6525
6531
|
E,
|
|
6526
6532
|
1e4,
|
|
6527
6533
|
!1,
|
|
@@ -6529,22 +6535,22 @@ const cn = () => {
|
|
|
6529
6535
|
), y;
|
|
6530
6536
|
};
|
|
6531
6537
|
for (; m.length > 0; ) {
|
|
6532
|
-
const
|
|
6533
|
-
C[
|
|
6538
|
+
const u = m.pop();
|
|
6539
|
+
C[u] || (C[u] = !0, m.push(...x(!0, u), ...x(!1, u)));
|
|
6534
6540
|
}
|
|
6535
6541
|
if (t) {
|
|
6536
|
-
const
|
|
6542
|
+
const u = `${t.table}/${t.name}`, { nodes: w, edges: y } = await Z4(
|
|
6537
6543
|
f,
|
|
6538
|
-
u,
|
|
6539
6544
|
d,
|
|
6545
|
+
u,
|
|
6540
6546
|
async () => ({
|
|
6541
6547
|
collect_columns: n,
|
|
6542
6548
|
highlight_edges: o
|
|
6543
6549
|
})
|
|
6544
6550
|
);
|
|
6545
|
-
f = w,
|
|
6551
|
+
f = w, d = y;
|
|
6546
6552
|
}
|
|
6547
|
-
Oe(f,
|
|
6553
|
+
Oe(f, d, !1), (v = e.current) == null || v.setNodes(f), (b = e.current) == null || b.setEdges(d);
|
|
6548
6554
|
}, 500);
|
|
6549
6555
|
}, [n, o, r, e, l, t, s]), Y(() => {
|
|
6550
6556
|
const c = setTimeout(() => {
|
|
@@ -6604,38 +6610,38 @@ const cn = () => {
|
|
|
6604
6610
|
}, [n, r, t]), Y(() => {
|
|
6605
6611
|
setTimeout(async () => {
|
|
6606
6612
|
var C, x, v, b;
|
|
6607
|
-
const i = (
|
|
6608
|
-
table:
|
|
6609
|
-
label: n[
|
|
6613
|
+
const i = (u) => ({
|
|
6614
|
+
table: u,
|
|
6615
|
+
label: n[u].name || u,
|
|
6610
6616
|
upstreamCount: 0,
|
|
6611
6617
|
downstreamCount: 0,
|
|
6612
|
-
nodeType: n[
|
|
6618
|
+
nodeType: n[u].type || "cte",
|
|
6613
6619
|
isExternalProject: !1,
|
|
6614
6620
|
tests: []
|
|
6615
6621
|
});
|
|
6616
6622
|
if (o) {
|
|
6617
|
-
const
|
|
6623
|
+
const u = Object.keys(o).map((y) => n[y].type in H1 ? j1(i(y), 0, "") : Ls(y, 0, "", n[y])), w = t.map(
|
|
6618
6624
|
([y, E]) => Y2(o[y][1], o[E][1], y, E, !0, !0)
|
|
6619
6625
|
);
|
|
6620
|
-
for (const y of
|
|
6626
|
+
for (const y of u) {
|
|
6621
6627
|
if (!o[y.id]) continue;
|
|
6622
6628
|
const [E, S] = o[y.id];
|
|
6623
6629
|
y.position = { x: E, y: S };
|
|
6624
6630
|
}
|
|
6625
|
-
(C = e.current) == null || C.setNodes(
|
|
6631
|
+
(C = e.current) == null || C.setNodes(u), (x = e.current) == null || x.setEdges(w);
|
|
6626
6632
|
return;
|
|
6627
6633
|
}
|
|
6628
6634
|
const { sinks: l } = Ns(t);
|
|
6629
|
-
let c = l.map((
|
|
6630
|
-
const f = [...l],
|
|
6635
|
+
let c = l.map((u) => j1(i(u), 0, "")), h = [];
|
|
6636
|
+
const f = [...l], d = {}, m = (u, w) => {
|
|
6631
6637
|
var S, j;
|
|
6632
|
-
const y =
|
|
6638
|
+
const y = u ? t.filter(([_]) => _ === w).map(([, _]) => _) : t.filter(([, _]) => _ === w).map(([_]) => _), E = ((j = (S = c.find((_) => _.id === w)) == null ? void 0 : S.data) == null ? void 0 : j.level) || 0;
|
|
6633
6639
|
return Pt(
|
|
6634
6640
|
c,
|
|
6635
6641
|
h,
|
|
6636
6642
|
y.map(i),
|
|
6637
6643
|
w,
|
|
6638
|
-
|
|
6644
|
+
u,
|
|
6639
6645
|
E,
|
|
6640
6646
|
1e4,
|
|
6641
6647
|
!0,
|
|
@@ -6643,8 +6649,8 @@ const cn = () => {
|
|
|
6643
6649
|
), y;
|
|
6644
6650
|
};
|
|
6645
6651
|
for (; f.length > 0; ) {
|
|
6646
|
-
const
|
|
6647
|
-
u
|
|
6652
|
+
const u = f.pop();
|
|
6653
|
+
d[u] || (d[u] = !0, f.push(...m(!1, u)));
|
|
6648
6654
|
}
|
|
6649
6655
|
Oe(c, h, !0), (v = e.current) == null || v.setNodes(c), (b = e.current) == null || b.setEdges(h);
|
|
6650
6656
|
}, 500);
|
|
@@ -6655,19 +6661,19 @@ const cn = () => {
|
|
|
6655
6661
|
}, 1e3);
|
|
6656
6662
|
return () => clearInterval(i);
|
|
6657
6663
|
}, [e]), Y(() => {
|
|
6658
|
-
const i = (
|
|
6659
|
-
r(v5(
|
|
6660
|
-
}, l = (
|
|
6661
|
-
r(w5(
|
|
6664
|
+
const i = (d) => {
|
|
6665
|
+
r(v5(d.detail));
|
|
6666
|
+
}, l = (d) => {
|
|
6667
|
+
r(w5(d.detail));
|
|
6662
6668
|
}, c = () => {
|
|
6663
6669
|
setTimeout(() => {
|
|
6664
|
-
var
|
|
6665
|
-
(
|
|
6670
|
+
var d;
|
|
6671
|
+
(d = e.current) == null || d.fitView({ duration: 500 });
|
|
6666
6672
|
}, 500);
|
|
6667
|
-
}, h = (
|
|
6668
|
-
r(b5(
|
|
6669
|
-
}, f = (
|
|
6670
|
-
r(_5(
|
|
6673
|
+
}, h = (d) => {
|
|
6674
|
+
r(b5(d.detail));
|
|
6675
|
+
}, f = (d) => {
|
|
6676
|
+
r(_5(d.detail));
|
|
6671
6677
|
};
|
|
6672
6678
|
return document.addEventListener("onHighlightedNodes", i), document.addEventListener("onSelectedNodes", l), document.addEventListener("onNodesSavingsPerformance", h), document.addEventListener("onNodesCost", f), document.addEventListener("fitView", c), () => {
|
|
6673
6679
|
document.removeEventListener("highlightedNodes", i), document.removeEventListener("onSelectedNodes", l), document.removeEventListener("onNodesSavingsPerformance", h), document.removeEventListener("onNodesCost", f), document.removeEventListener("fitView", c);
|
|
@@ -6712,54 +6718,56 @@ const cn = () => {
|
|
|
6712
6718
|
dynamicLineage: o,
|
|
6713
6719
|
staticLineage: s,
|
|
6714
6720
|
allowSyncColumnsWithDB: r,
|
|
6715
|
-
externalSidePanel: i = !1
|
|
6716
|
-
|
|
6717
|
-
|
|
6721
|
+
externalSidePanel: i = !1,
|
|
6722
|
+
renderTags: l
|
|
6723
|
+
}, c) => {
|
|
6724
|
+
const [h, f] = Tr(Et.reducer, {
|
|
6718
6725
|
...Et.getInitialState(),
|
|
6719
6726
|
theme: e,
|
|
6720
6727
|
lineageType: t,
|
|
6721
6728
|
sqlLineage: n,
|
|
6722
6729
|
allowSyncColumnsWithDB: r,
|
|
6723
|
-
externalSidePanel: i
|
|
6724
|
-
|
|
6730
|
+
externalSidePanel: i,
|
|
6731
|
+
renderTags: l
|
|
6732
|
+
}), d = X(), [m, C] = se(0), x = oe(() => C((b) => (b + 1) % 100), []);
|
|
6725
6733
|
Y(() => {
|
|
6726
|
-
var
|
|
6727
|
-
(
|
|
6728
|
-
}, [
|
|
6729
|
-
rerender:
|
|
6734
|
+
var b;
|
|
6735
|
+
(b = d.current) == null || b.fitView({});
|
|
6736
|
+
}, [m]), Dr(c, () => ({
|
|
6737
|
+
rerender: x
|
|
6730
6738
|
})), Y(() => {
|
|
6731
|
-
|
|
6739
|
+
f(y5(e));
|
|
6732
6740
|
}, [e]);
|
|
6733
|
-
const
|
|
6741
|
+
const v = xe(
|
|
6734
6742
|
() => ({
|
|
6735
|
-
state:
|
|
6736
|
-
dispatch:
|
|
6737
|
-
rerender:
|
|
6743
|
+
state: h,
|
|
6744
|
+
dispatch: f,
|
|
6745
|
+
rerender: x
|
|
6738
6746
|
}),
|
|
6739
|
-
[
|
|
6747
|
+
[h, f, x]
|
|
6740
6748
|
);
|
|
6741
|
-
return /* @__PURE__ */ a.jsx(h1.Provider, { value:
|
|
6749
|
+
return /* @__PURE__ */ a.jsx(h1.Provider, { value: v, children: /* @__PURE__ */ a.jsxs("div", { className: "lineage-component", children: [
|
|
6742
6750
|
t === "sql" && n && /* @__PURE__ */ a.jsx(
|
|
6743
6751
|
Na,
|
|
6744
6752
|
{
|
|
6745
|
-
flow:
|
|
6753
|
+
flow: d,
|
|
6746
6754
|
details: n.details,
|
|
6747
6755
|
tableEdges: n.tableEdges,
|
|
6748
6756
|
nodePositions: n.nodePositions
|
|
6749
6757
|
}
|
|
6750
6758
|
),
|
|
6751
|
-
t === "dynamic" && o && /* @__PURE__ */ a.jsx(va, { flow:
|
|
6752
|
-
t === "static" && s && /* @__PURE__ */ a.jsx(_a, { flow:
|
|
6759
|
+
t === "dynamic" && o && /* @__PURE__ */ a.jsx(va, { flow: d, theme: e }),
|
|
6760
|
+
t === "static" && s && /* @__PURE__ */ a.jsx(_a, { flow: d, ...s }),
|
|
6753
6761
|
/* @__PURE__ */ a.jsx("div", { id: "lineage-sidebar" })
|
|
6754
6762
|
] }) });
|
|
6755
|
-
},
|
|
6763
|
+
}, Oa = L2(Ma), ue = () => je(h1), ge = () => {
|
|
6756
6764
|
const { dispatch: e } = je(h1);
|
|
6757
6765
|
return e;
|
|
6758
6766
|
};
|
|
6759
6767
|
export {
|
|
6760
6768
|
he as CLL,
|
|
6761
6769
|
A4 as CllEvents,
|
|
6762
|
-
|
|
6770
|
+
Oa as Lineage,
|
|
6763
6771
|
Q2 as NodeIcon,
|
|
6764
6772
|
Bt as ViewsTypeBadge
|
|
6765
6773
|
};
|