drizzle-cube 0.1.64 → 0.1.66
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/adapters/{compiler-tWqDBXA3.js → compiler-BEgt1OH1.js} +9 -5
- package/dist/adapters/{compiler-CGImvJqY.cjs → compiler-DP0leK4b.cjs} +1 -1
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +1 -1
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/client/charts.js +1 -1
- package/dist/client/chunks/{charts-P7xq59Tl.js → charts-BvRqT6o9.js} +3 -3
- package/dist/client/chunks/{charts-P7xq59Tl.js.map → charts-BvRqT6o9.js.map} +1 -1
- package/dist/client/chunks/{components-DsDLdI8c.js → components-DRsjhKyD.js} +644 -648
- package/dist/client/chunks/{components-DsDLdI8c.js.map → components-DRsjhKyD.js.map} +1 -1
- package/dist/client/chunks/{providers-DONuYrGH.js → providers-D7zRgZrO.js} +37 -37
- package/dist/client/chunks/providers-D7zRgZrO.js.map +1 -0
- package/dist/client/client/CubeClient.d.ts +1 -0
- package/dist/client/components.js +2 -2
- package/dist/client/hooks.js +2 -2
- package/dist/client/index.js +3 -3
- package/dist/client/providers.js +1 -1
- package/dist/client/types.d.ts +1 -0
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +5 -1
- package/package.json +5 -1
- package/dist/client/chunks/providers-DONuYrGH.js.map +0 -1
|
@@ -3,8 +3,8 @@ import * as qt from "react";
|
|
|
3
3
|
import Q, { createContext as Wc, useContext as Sr, Component as Kx, useRef as ue, useState as Z, useEffect as ce, useLayoutEffect as by, forwardRef as un, useMemo as ke, useImperativeHandle as vy, useCallback as J, memo as Te } from "react";
|
|
4
4
|
import { useCubeQuery as Qx, useDebounce as Xx, useFilterValues as Zx, useResponsiveDashboard as Jx } from "../hooks.js";
|
|
5
5
|
import { F as Er, I as Pe, d as e0, a as t0, b as r0, c as n0, e as s0, f as a0, g as i0, h as o0, i as l0, j as c0, k as d0, l as u0, m as f0, n as m0, o as h0, p as xy, q as p0, r as g0, s as y0, t as b0, u as v0, v as x0, w as w0, x as N0, y as _0, z as wy, A as Ny, B as en, C as S0, D as E0, E as je, G as Ld, H as gr, J as Wt, K as Nc, L as ze, M as tt, N as C0, O as it, P as _c, Q as Sc, R as k0, S as _y, T as zt, U as $d, V as T0, W as Bt, X as A0, Y as Sy, Z as tn, _ as R0, $ as Vd, a0 as Ec, a1 as M0, a2 as D0, a3 as Cc, a4 as q0, a5 as I0 } from "./icons-a6fQwcor.js";
|
|
6
|
-
import { u as ct } from "./providers-
|
|
7
|
-
import { i as St, b as zd, d as O0, e as Bd, t as F0, g as P0, h as L0, j as Dr, l as $0, k as V0, m as Ey, n as z0, p as Hd, C as jd, o as Gd, q as Cy, r as kc, s as Ud, u as zn, v as B0, w as H0, x as j0, D as ky, T as G0, a as U0, R as W0, S as Y0, P as K0, A as Q0, L as X0, B as Z0 } from "./charts-
|
|
6
|
+
import { u as ct } from "./providers-D7zRgZrO.js";
|
|
7
|
+
import { i as St, b as zd, d as O0, e as Bd, t as F0, g as P0, h as L0, j as Dr, l as $0, k as V0, m as Ey, n as z0, p as Hd, C as jd, o as Gd, q as Cy, r as kc, s as Ud, u as zn, v as B0, w as H0, x as j0, D as ky, T as G0, a as U0, R as W0, S as Y0, P as K0, A as Q0, L as X0, B as Z0 } from "./charts-BvRqT6o9.js";
|
|
8
8
|
import J0 from "react-grid-layout";
|
|
9
9
|
import { createPortal as ew } from "react-dom";
|
|
10
10
|
var Tc = /* @__PURE__ */ new Map(), qr = /* @__PURE__ */ new WeakMap(), Wd = 0, tw;
|
|
@@ -1001,15 +1001,15 @@ function Rw() {
|
|
|
1001
1001
|
function Ry(e, t) {
|
|
1002
1002
|
var r = [], n = null, s = null, a = 6, i = 6, o = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, d = e === Bn || e === ur ? -1 : 1, l = e === ur || e === Hn ? "x" : "y", f = e === Bn || e === Rc ? Cw : kw;
|
|
1003
1003
|
function m(h) {
|
|
1004
|
-
var g = n ?? (t.ticks ? t.ticks.apply(t, r) : t.domain()), y = s ?? (t.tickFormat ? t.tickFormat.apply(t, r) : Ew), p = Math.max(a, 0) + o, b = t.range(), v = +b[0] + c, _ = +b[b.length - 1] + c, N = (t.bandwidth ? Aw : Tw)(t.copy(), c), A = h.selection ? h.selection() : h, x = A.selectAll(".domain").data([null]), k = A.selectAll(".tick").data(g, t).order(), T = k.exit(), S = k.enter().append("g").attr("class", "tick"), C = k.select("line"),
|
|
1005
|
-
x = x.merge(x.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), k = k.merge(S), C = C.merge(S.append("line").attr("stroke", "currentColor").attr(l + "2", d * a)),
|
|
1004
|
+
var g = n ?? (t.ticks ? t.ticks.apply(t, r) : t.domain()), y = s ?? (t.tickFormat ? t.tickFormat.apply(t, r) : Ew), p = Math.max(a, 0) + o, b = t.range(), v = +b[0] + c, _ = +b[b.length - 1] + c, N = (t.bandwidth ? Aw : Tw)(t.copy(), c), A = h.selection ? h.selection() : h, x = A.selectAll(".domain").data([null]), k = A.selectAll(".tick").data(g, t).order(), T = k.exit(), S = k.enter().append("g").attr("class", "tick"), C = k.select("line"), R = k.select("text");
|
|
1005
|
+
x = x.merge(x.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), k = k.merge(S), C = C.merge(S.append("line").attr("stroke", "currentColor").attr(l + "2", d * a)), R = R.merge(S.append("text").attr("fill", "currentColor").attr(l, d * p).attr("dy", e === Bn ? "0em" : e === Rc ? "0.71em" : "0.32em")), h !== A && (x = x.transition(h), k = k.transition(h), C = C.transition(h), R = R.transition(h), T = T.transition(h).attr("opacity", Qd).attr("transform", function(F) {
|
|
1006
1006
|
return isFinite(F = N(F)) ? f(F + c) : this.getAttribute("transform");
|
|
1007
1007
|
}), S.attr("opacity", Qd).attr("transform", function(F) {
|
|
1008
1008
|
var I = this.parentNode.__axis;
|
|
1009
1009
|
return f((I && isFinite(I = I(F)) ? I : N(F)) + c);
|
|
1010
1010
|
})), T.remove(), x.attr("d", e === ur || e === Hn ? i ? "M" + d * i + "," + v + "H" + c + "V" + _ + "H" + d * i : "M" + c + "," + v + "V" + _ : i ? "M" + v + "," + d * i + "V" + c + "H" + _ + "V" + d * i : "M" + v + "," + c + "H" + _), k.attr("opacity", 1).attr("transform", function(F) {
|
|
1011
1011
|
return f(N(F) + c);
|
|
1012
|
-
}), C.attr(l + "2", d * a),
|
|
1012
|
+
}), C.attr(l + "2", d * a), R.attr(l, d * p).text(y), A.filter(Rw).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", e === Hn ? "start" : e === ur ? "end" : "middle"), A.each(function() {
|
|
1013
1013
|
this.__axis = N;
|
|
1014
1014
|
});
|
|
1015
1015
|
}
|
|
@@ -1796,29 +1796,29 @@ function bN() {
|
|
|
1796
1796
|
(T = s[A[k].identifier]) && (jn(N), T("end", N, A[k]));
|
|
1797
1797
|
}
|
|
1798
1798
|
function _(N, A, x, k, T, S) {
|
|
1799
|
-
var C = a.copy(),
|
|
1799
|
+
var C = a.copy(), R = Ke(S || x, A), F, I, w;
|
|
1800
1800
|
if ((w = r.call(N, new Dc("beforestart", {
|
|
1801
1801
|
sourceEvent: x,
|
|
1802
1802
|
target: m,
|
|
1803
1803
|
identifier: T,
|
|
1804
1804
|
active: i,
|
|
1805
|
-
x:
|
|
1806
|
-
y:
|
|
1805
|
+
x: R[0],
|
|
1806
|
+
y: R[1],
|
|
1807
1807
|
dx: 0,
|
|
1808
1808
|
dy: 0,
|
|
1809
1809
|
dispatch: C
|
|
1810
1810
|
}), k)) != null)
|
|
1811
|
-
return F = w.x -
|
|
1812
|
-
var O =
|
|
1811
|
+
return F = w.x - R[0] || 0, I = w.y - R[1] || 0, function M(D, q, $) {
|
|
1812
|
+
var O = R, B;
|
|
1813
1813
|
switch (D) {
|
|
1814
1814
|
case "start":
|
|
1815
|
-
s[T] =
|
|
1815
|
+
s[T] = M, B = i++;
|
|
1816
1816
|
break;
|
|
1817
1817
|
case "end":
|
|
1818
1818
|
delete s[T], --i;
|
|
1819
1819
|
// falls through
|
|
1820
1820
|
case "drag":
|
|
1821
|
-
|
|
1821
|
+
R = Ke($ || q, A), B = i;
|
|
1822
1822
|
break;
|
|
1823
1823
|
}
|
|
1824
1824
|
C.call(
|
|
@@ -1830,10 +1830,10 @@ function bN() {
|
|
|
1830
1830
|
target: m,
|
|
1831
1831
|
identifier: T,
|
|
1832
1832
|
active: B,
|
|
1833
|
-
x:
|
|
1834
|
-
y:
|
|
1835
|
-
dx:
|
|
1836
|
-
dy:
|
|
1833
|
+
x: R[0] + F,
|
|
1834
|
+
y: R[1] + I,
|
|
1835
|
+
dx: R[0] - O[0],
|
|
1836
|
+
dy: R[1] - O[1],
|
|
1837
1837
|
dispatch: C
|
|
1838
1838
|
}),
|
|
1839
1839
|
k
|
|
@@ -2647,56 +2647,56 @@ function W_(e, t, r) {
|
|
|
2647
2647
|
function tb() {
|
|
2648
2648
|
var e = H_, t = j_, r = W_, n = G_, s = U_, a = [0, 1 / 0], i = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], o = 250, c = CN, d = fn("start", "zoom", "end"), l, f, m, h = 500, g = 150, y = 0, p = 10;
|
|
2649
2649
|
function b(w) {
|
|
2650
|
-
w.property("__zoom", lu).on("wheel.zoom", T, { passive: !1 }).on("mousedown.zoom", S).on("dblclick.zoom", C).filter(s).on("touchstart.zoom",
|
|
2650
|
+
w.property("__zoom", lu).on("wheel.zoom", T, { passive: !1 }).on("mousedown.zoom", S).on("dblclick.zoom", C).filter(s).on("touchstart.zoom", R).on("touchmove.zoom", F).on("touchend.zoom touchcancel.zoom", I).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
2651
2651
|
}
|
|
2652
|
-
b.transform = function(w,
|
|
2652
|
+
b.transform = function(w, M, D, q) {
|
|
2653
2653
|
var $ = w.selection ? w.selection() : w;
|
|
2654
|
-
$.property("__zoom", lu), w !== $ ? A(w,
|
|
2655
|
-
x(this, arguments).event(q).start().zoom(null, typeof
|
|
2654
|
+
$.property("__zoom", lu), w !== $ ? A(w, M, D, q) : $.interrupt().each(function() {
|
|
2655
|
+
x(this, arguments).event(q).start().zoom(null, typeof M == "function" ? M.apply(this, arguments) : M).end();
|
|
2656
2656
|
});
|
|
2657
|
-
}, b.scaleBy = function(w,
|
|
2657
|
+
}, b.scaleBy = function(w, M, D, q) {
|
|
2658
2658
|
b.scaleTo(w, function() {
|
|
2659
|
-
var $ = this.__zoom.k, O = typeof
|
|
2659
|
+
var $ = this.__zoom.k, O = typeof M == "function" ? M.apply(this, arguments) : M;
|
|
2660
2660
|
return $ * O;
|
|
2661
2661
|
}, D, q);
|
|
2662
|
-
}, b.scaleTo = function(w,
|
|
2662
|
+
}, b.scaleTo = function(w, M, D, q) {
|
|
2663
2663
|
b.transform(w, function() {
|
|
2664
|
-
var $ = t.apply(this, arguments), O = this.__zoom, B = D == null ? N($) : typeof D == "function" ? D.apply(this, arguments) : D, j = O.invert(B), Y = typeof
|
|
2664
|
+
var $ = t.apply(this, arguments), O = this.__zoom, B = D == null ? N($) : typeof D == "function" ? D.apply(this, arguments) : D, j = O.invert(B), Y = typeof M == "function" ? M.apply(this, arguments) : M;
|
|
2665
2665
|
return r(_(v(O, Y), B, j), $, i);
|
|
2666
2666
|
}, D, q);
|
|
2667
|
-
}, b.translateBy = function(w,
|
|
2667
|
+
}, b.translateBy = function(w, M, D, q) {
|
|
2668
2668
|
b.transform(w, function() {
|
|
2669
2669
|
return r(this.__zoom.translate(
|
|
2670
|
-
typeof
|
|
2670
|
+
typeof M == "function" ? M.apply(this, arguments) : M,
|
|
2671
2671
|
typeof D == "function" ? D.apply(this, arguments) : D
|
|
2672
2672
|
), t.apply(this, arguments), i);
|
|
2673
2673
|
}, null, q);
|
|
2674
|
-
}, b.translateTo = function(w,
|
|
2674
|
+
}, b.translateTo = function(w, M, D, q, $) {
|
|
2675
2675
|
b.transform(w, function() {
|
|
2676
2676
|
var O = t.apply(this, arguments), B = this.__zoom, j = q == null ? N(O) : typeof q == "function" ? q.apply(this, arguments) : q;
|
|
2677
2677
|
return r(ot.translate(j[0], j[1]).scale(B.k).translate(
|
|
2678
|
-
typeof
|
|
2678
|
+
typeof M == "function" ? -M.apply(this, arguments) : -M,
|
|
2679
2679
|
typeof D == "function" ? -D.apply(this, arguments) : -D
|
|
2680
2680
|
), O, i);
|
|
2681
2681
|
}, q, $);
|
|
2682
2682
|
};
|
|
2683
|
-
function v(w,
|
|
2684
|
-
return
|
|
2683
|
+
function v(w, M) {
|
|
2684
|
+
return M = Math.max(a[0], Math.min(a[1], M)), M === w.k ? w : new pt(M, w.x, w.y);
|
|
2685
2685
|
}
|
|
2686
|
-
function _(w,
|
|
2687
|
-
var q =
|
|
2686
|
+
function _(w, M, D) {
|
|
2687
|
+
var q = M[0] - D[0] * w.k, $ = M[1] - D[1] * w.k;
|
|
2688
2688
|
return q === w.x && $ === w.y ? w : new pt(w.k, q, $);
|
|
2689
2689
|
}
|
|
2690
2690
|
function N(w) {
|
|
2691
2691
|
return [(+w[0][0] + +w[1][0]) / 2, (+w[0][1] + +w[1][1]) / 2];
|
|
2692
2692
|
}
|
|
2693
|
-
function A(w,
|
|
2693
|
+
function A(w, M, D, q) {
|
|
2694
2694
|
w.on("start.zoom", function() {
|
|
2695
2695
|
x(this, arguments).event(q).start();
|
|
2696
2696
|
}).on("interrupt.zoom end.zoom", function() {
|
|
2697
2697
|
x(this, arguments).event(q).end();
|
|
2698
2698
|
}).tween("zoom", function() {
|
|
2699
|
-
var $ = this, O = arguments, B = x($, O).event(q), j = t.apply($, O), Y = D == null ? N(j) : typeof D == "function" ? D.apply($, O) : D, U = Math.max(j[1][0] - j[0][0], j[1][1] - j[0][1]), L = $.__zoom, H = typeof
|
|
2699
|
+
var $ = this, O = arguments, B = x($, O).event(q), j = t.apply($, O), Y = D == null ? N(j) : typeof D == "function" ? D.apply($, O) : D, U = Math.max(j[1][0] - j[0][0], j[1][1] - j[0][1]), L = $.__zoom, H = typeof M == "function" ? M.apply($, O) : M, P = c(L.invert(Y).concat(U / L.k), H.invert(Y).concat(U / H.k));
|
|
2700
2700
|
return function(G) {
|
|
2701
2701
|
if (G === 1) G = H;
|
|
2702
2702
|
else {
|
|
@@ -2707,11 +2707,11 @@ function tb() {
|
|
|
2707
2707
|
};
|
|
2708
2708
|
});
|
|
2709
2709
|
}
|
|
2710
|
-
function x(w,
|
|
2711
|
-
return !D && w.__zooming || new k(w,
|
|
2710
|
+
function x(w, M, D) {
|
|
2711
|
+
return !D && w.__zooming || new k(w, M);
|
|
2712
2712
|
}
|
|
2713
|
-
function k(w,
|
|
2714
|
-
this.that = w, this.args =
|
|
2713
|
+
function k(w, M) {
|
|
2714
|
+
this.that = w, this.args = M, this.active = 0, this.sourceEvent = null, this.extent = t.apply(w, M), this.taps = 0;
|
|
2715
2715
|
}
|
|
2716
2716
|
k.prototype = {
|
|
2717
2717
|
event: function(w) {
|
|
@@ -2720,14 +2720,14 @@ function tb() {
|
|
|
2720
2720
|
start: function() {
|
|
2721
2721
|
return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this;
|
|
2722
2722
|
},
|
|
2723
|
-
zoom: function(w,
|
|
2724
|
-
return this.mouse && w !== "mouse" && (this.mouse[1] =
|
|
2723
|
+
zoom: function(w, M) {
|
|
2724
|
+
return this.mouse && w !== "mouse" && (this.mouse[1] = M.invert(this.mouse[0])), this.touch0 && w !== "touch" && (this.touch0[1] = M.invert(this.touch0[0])), this.touch1 && w !== "touch" && (this.touch1[1] = M.invert(this.touch1[0])), this.that.__zoom = M, this.emit("zoom"), this;
|
|
2725
2725
|
},
|
|
2726
2726
|
end: function() {
|
|
2727
2727
|
return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
|
|
2728
2728
|
},
|
|
2729
2729
|
emit: function(w) {
|
|
2730
|
-
var
|
|
2730
|
+
var M = Re(this.that).datum();
|
|
2731
2731
|
d.call(
|
|
2732
2732
|
w,
|
|
2733
2733
|
this.that,
|
|
@@ -2737,13 +2737,13 @@ function tb() {
|
|
|
2737
2737
|
transform: this.that.__zoom,
|
|
2738
2738
|
dispatch: d
|
|
2739
2739
|
}),
|
|
2740
|
-
|
|
2740
|
+
M
|
|
2741
2741
|
);
|
|
2742
2742
|
}
|
|
2743
2743
|
};
|
|
2744
|
-
function T(w, ...
|
|
2744
|
+
function T(w, ...M) {
|
|
2745
2745
|
if (!e.apply(this, arguments)) return;
|
|
2746
|
-
var D = x(this,
|
|
2746
|
+
var D = x(this, M).event(w), q = this.__zoom, $ = Math.max(a[0], Math.min(a[1], q.k * Math.pow(2, n.apply(this, arguments)))), O = Ke(w);
|
|
2747
2747
|
if (D.wheel)
|
|
2748
2748
|
(D.mouse[0][0] !== O[0] || D.mouse[0][1] !== O[1]) && (D.mouse[1] = q.invert(D.mouse[0] = O)), clearTimeout(D.wheel);
|
|
2749
2749
|
else {
|
|
@@ -2755,9 +2755,9 @@ function tb() {
|
|
|
2755
2755
|
D.wheel = null, D.end();
|
|
2756
2756
|
}
|
|
2757
2757
|
}
|
|
2758
|
-
function S(w, ...
|
|
2758
|
+
function S(w, ...M) {
|
|
2759
2759
|
if (m || !e.apply(this, arguments)) return;
|
|
2760
|
-
var D = w.currentTarget, q = x(this,
|
|
2760
|
+
var D = w.currentTarget, q = x(this, M, !0).event(w), $ = Re(w.view).on("mousemove.zoom", Y, !0).on("mouseup.zoom", U, !0), O = Ke(w, D), B = w.clientX, j = w.clientY;
|
|
2761
2761
|
Hy(w.view), Gn(w), q.mouse = [O, this.__zoom.invert(O)], Qr(this), q.start();
|
|
2762
2762
|
function Y(L) {
|
|
2763
2763
|
if (ir(L), !q.moved) {
|
|
@@ -2770,15 +2770,15 @@ function tb() {
|
|
|
2770
2770
|
$.on("mousemove.zoom mouseup.zoom", null), jy(L.view, q.moved), ir(L), q.event(L).end();
|
|
2771
2771
|
}
|
|
2772
2772
|
}
|
|
2773
|
-
function C(w, ...
|
|
2773
|
+
function C(w, ...M) {
|
|
2774
2774
|
if (e.apply(this, arguments)) {
|
|
2775
|
-
var D = this.__zoom, q = Ke(w.changedTouches ? w.changedTouches[0] : w, this), $ = D.invert(q), O = D.k * (w.shiftKey ? 0.5 : 2), B = r(_(v(D, O), q, $), t.apply(this,
|
|
2775
|
+
var D = this.__zoom, q = Ke(w.changedTouches ? w.changedTouches[0] : w, this), $ = D.invert(q), O = D.k * (w.shiftKey ? 0.5 : 2), B = r(_(v(D, O), q, $), t.apply(this, M), i);
|
|
2776
2776
|
ir(w), o > 0 ? Re(this).transition().duration(o).call(A, B, q, w) : Re(this).call(b.transform, B, q, w);
|
|
2777
2777
|
}
|
|
2778
2778
|
}
|
|
2779
|
-
function
|
|
2779
|
+
function R(w, ...M) {
|
|
2780
2780
|
if (e.apply(this, arguments)) {
|
|
2781
|
-
var D = w.touches, q = D.length, $ = x(this,
|
|
2781
|
+
var D = w.touches, q = D.length, $ = x(this, M, w.changedTouches.length === q).event(w), O, B, j, Y;
|
|
2782
2782
|
for (Gn(w), B = 0; B < q; ++B)
|
|
2783
2783
|
j = D[B], Y = Ke(j, this), Y = [Y, this.__zoom.invert(Y), j.identifier], $.touch0 ? !$.touch1 && $.touch0[2] !== Y[2] && ($.touch1 = Y, $.taps = 0) : ($.touch0 = Y, O = !0, $.taps = 1 + !!l);
|
|
2784
2784
|
l && (l = clearTimeout(l)), O && ($.taps < 2 && (f = Y[0], l = setTimeout(function() {
|
|
@@ -2786,9 +2786,9 @@ function tb() {
|
|
|
2786
2786
|
}, h)), Qr(this), $.start());
|
|
2787
2787
|
}
|
|
2788
2788
|
}
|
|
2789
|
-
function F(w, ...
|
|
2789
|
+
function F(w, ...M) {
|
|
2790
2790
|
if (this.__zooming) {
|
|
2791
|
-
var D = x(this,
|
|
2791
|
+
var D = x(this, M).event(w), q = w.changedTouches, $ = q.length, O, B, j, Y;
|
|
2792
2792
|
for (ir(w), O = 0; O < $; ++O)
|
|
2793
2793
|
B = q[O], j = Ke(B, this), D.touch0 && D.touch0[2] === B.identifier ? D.touch0[0] = j : D.touch1 && D.touch1[2] === B.identifier && (D.touch1[0] = j);
|
|
2794
2794
|
if (B = D.that.__zoom, D.touch1) {
|
|
@@ -2799,9 +2799,9 @@ function tb() {
|
|
|
2799
2799
|
D.zoom("touch", r(_(B, j, Y), D.extent, i));
|
|
2800
2800
|
}
|
|
2801
2801
|
}
|
|
2802
|
-
function I(w, ...
|
|
2802
|
+
function I(w, ...M) {
|
|
2803
2803
|
if (this.__zooming) {
|
|
2804
|
-
var D = x(this,
|
|
2804
|
+
var D = x(this, M).event(w), q = w.changedTouches, $ = q.length, O, B;
|
|
2805
2805
|
for (Gn(w), m && clearTimeout(m), m = setTimeout(function() {
|
|
2806
2806
|
m = null;
|
|
2807
2807
|
}, h), O = 0; O < $; ++O)
|
|
@@ -3026,7 +3026,7 @@ function K_({
|
|
|
3026
3026
|
// Add extra 30px left margin for Y-axis label
|
|
3027
3027
|
bottom: p.showLegend && x ? 100 : 40
|
|
3028
3028
|
// Add extra space for legend
|
|
3029
|
-
}, C = d.width - S.left - S.right,
|
|
3029
|
+
}, C = d.width - S.left - S.right, R = d.height - S.top - S.bottom, F = Re(i.current).attr("width", d.width).attr("height", d.height), I = F.append("g").attr("transform", `translate(${S.left},${S.top})`), w = Gd().domain(Yd(T, (z) => z.x)).range([0, C]).nice(), M = Gd().domain(Yd(T, (z) => z.y)).range([R, 0]).nice(), D = z_().domain([0, Ac(T, (z) => z.size)]).range([p.minBubbleSize, p.maxBubbleSize]);
|
|
3030
3030
|
let q, $ = !1, O = [];
|
|
3031
3031
|
if (x && T.length > 0) {
|
|
3032
3032
|
const z = T.map((W) => {
|
|
@@ -3042,20 +3042,20 @@ function K_({
|
|
|
3042
3042
|
q = Ud().domain(["default"]).range([zn[0]]);
|
|
3043
3043
|
const B = (z, W) => getComputedStyle(document.documentElement).getPropertyValue(z).trim() || W, j = h !== "light", Y = j ? B("--dc-text-muted", "#cbd5e1") : B("--dc-text-secondary", "#374151"), U = j ? B("--dc-border", "#475569") : "#9ca3af";
|
|
3044
3044
|
if (p.showGrid) {
|
|
3045
|
-
const z = I.append("g").attr("class", "grid").attr("transform", `translate(0,${
|
|
3046
|
-
Xd(w).tickSize(-
|
|
3045
|
+
const z = I.append("g").attr("class", "grid").attr("transform", `translate(0,${R})`).call(
|
|
3046
|
+
Xd(w).tickSize(-R).tickFormat(() => "")
|
|
3047
3047
|
);
|
|
3048
3048
|
z.selectAll("line").style("stroke", U).style("stroke-dasharray", "3,3").style("opacity", 0.3), z.select(".domain").style("stroke", "none");
|
|
3049
3049
|
const W = I.append("g").attr("class", "grid").call(
|
|
3050
|
-
Zd(
|
|
3050
|
+
Zd(M).tickSize(-C).tickFormat(() => "")
|
|
3051
3051
|
);
|
|
3052
3052
|
W.selectAll("line").style("stroke", U).style("stroke-dasharray", "3,3").style("opacity", 0.3), W.select(".domain").style("stroke", "none");
|
|
3053
3053
|
}
|
|
3054
|
-
const L = I.append("g").attr("transform", `translate(0,${
|
|
3054
|
+
const L = I.append("g").attr("transform", `translate(0,${R})`).call(Xd(w));
|
|
3055
3055
|
L.selectAll("text").style("fill", Y), L.selectAll("line, path").style("stroke", U), L.append("text").attr("x", C / 2).attr("y", 35).attr("fill", Y).style("text-anchor", "middle").style("font-size", "12px").text(y(v));
|
|
3056
|
-
const H = I.append("g").call(Zd(
|
|
3057
|
-
H.selectAll("text").style("fill", Y), H.selectAll("line, path").style("stroke", U), H.append("text").attr("transform", "rotate(-90)").attr("y", -35).attr("x", -
|
|
3058
|
-
const P = Re("body").append("div").attr("class", "bubble-chart-tooltip").style("position", "absolute").style("padding", "8px").style("background", "rgba(0, 0, 0, 0.8)").style("color", "white").style("border-radius", "4px").style("font-size", "12px").style("pointer-events", "none").style("opacity", 0).style("z-index", 1e3), G = I.selectAll(".bubble").data(T).enter().append("circle").attr("class", "bubble").attr("cx", (z) => w(z.x)).attr("cy", (z) =>
|
|
3056
|
+
const H = I.append("g").call(Zd(M));
|
|
3057
|
+
H.selectAll("text").style("fill", Y), H.selectAll("line, path").style("stroke", U), H.append("text").attr("transform", "rotate(-90)").attr("y", -35).attr("x", -R / 2).attr("fill", Y).style("text-anchor", "middle").style("font-size", "12px").text(y(_));
|
|
3058
|
+
const P = Re("body").append("div").attr("class", "bubble-chart-tooltip").style("position", "absolute").style("padding", "8px").style("background", "rgba(0, 0, 0, 0.8)").style("color", "white").style("border-radius", "4px").style("font-size", "12px").style("pointer-events", "none").style("opacity", 0).style("z-index", 1e3), G = I.selectAll(".bubble").data(T).enter().append("circle").attr("class", "bubble").attr("cx", (z) => w(z.x)).attr("cy", (z) => M(z.y)).attr("r", (z) => D(z.size)).style("fill", (z) => x && z.color !== void 0 ? q($ ? z.color : String(z.color)) : zn[0]).style("opacity", p.bubbleOpacity).style("stroke", "#fff").style("stroke-width", 1).style("cursor", "pointer");
|
|
3059
3059
|
if (p.showTooltip && G.on("mouseover", function(z, W) {
|
|
3060
3060
|
Re(this).transition().duration(200).style("opacity", 1).attr("r", D(W.size) * 1.1);
|
|
3061
3061
|
const V = [
|
|
@@ -3072,14 +3072,14 @@ function K_({
|
|
|
3072
3072
|
Re(this).transition().duration(200).style("opacity", p.bubbleOpacity).attr("r", D(W.size)), P.transition().duration(200).style("opacity", 0), c(null);
|
|
3073
3073
|
}), p.showLegend && x)
|
|
3074
3074
|
if ($) {
|
|
3075
|
-
const V = Math.min(...T.map((ae) => ae.color)), te = Math.max(...T.map((ae) => ae.color)), re = I.append("g").attr("class", "color-legend").attr("transform", `translate(${C / 2 - 200 / 2}, ${
|
|
3075
|
+
const V = Math.min(...T.map((ae) => ae.color)), te = Math.max(...T.map((ae) => ae.color)), re = I.append("g").attr("class", "color-legend").attr("transform", `translate(${C / 2 - 200 / 2}, ${R + 60})`), pe = F.append("defs").append("linearGradient").attr("id", "color-scale-gradient").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%"), se = a?.gradient || kc;
|
|
3076
3076
|
se.forEach((ae, ee) => {
|
|
3077
3077
|
pe.append("stop").attr("offset", `${ee / (se.length - 1) * 100}%`).attr("stop-color", ae);
|
|
3078
3078
|
}), re.append("rect").attr("width", 200).attr("height", 20).style("fill", "url(#color-scale-gradient)").style("stroke", "#ccc").style("stroke-width", 1), re.append("text").attr("x", 0).attr("y", 35).attr("text-anchor", "start").style("font-size", "11px").style("fill", Y).text(V.toFixed(2)), re.append("text").attr("x", 200).attr("y", 35).attr("text-anchor", "end").style("font-size", "11px").style("fill", Y).text(te.toFixed(2)), re.append("text").attr("x", 200 / 2).attr("y", -5).attr("text-anchor", "middle").style("font-size", "12px").style("font-weight", "bold").style("fill", Y).text(y(x));
|
|
3079
3079
|
} else {
|
|
3080
3080
|
const z = O;
|
|
3081
3081
|
if (z.length > 0) {
|
|
3082
|
-
const V = I.append("g").attr("class", "legend").attr("transform", `translate(${C / 2 - z.length * 80 / 2}, ${
|
|
3082
|
+
const V = I.append("g").attr("class", "legend").attr("transform", `translate(${C / 2 - z.length * 80 / 2}, ${R + 60})`).selectAll(".legend-item").data(z).enter().append("g").attr("class", "legend-item").attr("transform", (te, re) => `translate(${re * 80}, 0)`).style("cursor", "pointer");
|
|
3083
3083
|
V.append("circle").attr("cx", 5).attr("cy", 5).attr("r", 5).style("fill", (te) => q(te)).style("opacity", p.bubbleOpacity), V.append("text").attr("x", 15).attr("y", 5).attr("dy", ".35em").style("font-size", "11px").style("fill", Y).text((te) => String(te)), V.on("mouseover", function(te, re) {
|
|
3084
3084
|
G.transition().duration(200).style("opacity", (me) => x && String(me.color) === re ? 1 : 0.2);
|
|
3085
3085
|
}).on("mouseout", function() {
|
|
@@ -3122,32 +3122,32 @@ function Q_({
|
|
|
3122
3122
|
by(() => {
|
|
3123
3123
|
let T = 0;
|
|
3124
3124
|
const S = 10;
|
|
3125
|
-
let C,
|
|
3125
|
+
let C, R;
|
|
3126
3126
|
const F = () => {
|
|
3127
3127
|
if (o.current) {
|
|
3128
|
-
const { width: w, height:
|
|
3129
|
-
if (w > 0 &&
|
|
3130
|
-
return d({ width: w, height:
|
|
3128
|
+
const { width: w, height: M } = o.current.getBoundingClientRect();
|
|
3129
|
+
if (w > 0 && M > 0)
|
|
3130
|
+
return d({ width: w, height: M }), f(!0), !0;
|
|
3131
3131
|
}
|
|
3132
3132
|
return !1;
|
|
3133
3133
|
};
|
|
3134
3134
|
if (!F() && T < S) {
|
|
3135
3135
|
const w = () => {
|
|
3136
|
-
!F() && T < S && (T++,
|
|
3136
|
+
!F() && T < S && (T++, R = setTimeout(() => {
|
|
3137
3137
|
C = requestAnimationFrame(w);
|
|
3138
3138
|
}, 50 * T));
|
|
3139
3139
|
};
|
|
3140
3140
|
C = requestAnimationFrame(w);
|
|
3141
3141
|
}
|
|
3142
3142
|
return () => {
|
|
3143
|
-
C && cancelAnimationFrame(C),
|
|
3143
|
+
C && cancelAnimationFrame(C), R && clearTimeout(R);
|
|
3144
3144
|
};
|
|
3145
3145
|
}, []), ce(() => {
|
|
3146
3146
|
let T = null;
|
|
3147
3147
|
const S = () => {
|
|
3148
3148
|
if (o.current) {
|
|
3149
|
-
const { width: C, height:
|
|
3150
|
-
C > 0 &&
|
|
3149
|
+
const { width: C, height: R } = o.current.getBoundingClientRect();
|
|
3150
|
+
C > 0 && R > 0 && (d({ width: C, height: R }), l || f(!0));
|
|
3151
3151
|
}
|
|
3152
3152
|
};
|
|
3153
3153
|
return o.current && (T = new ResizeObserver(() => S()), T.observe(o.current), S()), window.addEventListener("resize", S), () => {
|
|
@@ -3178,8 +3178,8 @@ function Q_({
|
|
|
3178
3178
|
case "month":
|
|
3179
3179
|
return {
|
|
3180
3180
|
extractX: (S) => {
|
|
3181
|
-
const C = S.getFullYear(),
|
|
3182
|
-
return C * 10 +
|
|
3181
|
+
const C = S.getFullYear(), R = p(S);
|
|
3182
|
+
return C * 10 + R;
|
|
3183
3183
|
},
|
|
3184
3184
|
extractY: (S) => b(S) - 1,
|
|
3185
3185
|
// 0-2 for indexing
|
|
@@ -3198,8 +3198,8 @@ function Q_({
|
|
|
3198
3198
|
case "week":
|
|
3199
3199
|
return {
|
|
3200
3200
|
extractX: (S) => {
|
|
3201
|
-
const C = S.getFullYear(),
|
|
3202
|
-
return C * 100 +
|
|
3201
|
+
const C = S.getFullYear(), R = S.getMonth() + 1;
|
|
3202
|
+
return C * 100 + R;
|
|
3203
3203
|
},
|
|
3204
3204
|
extractY: (S) => v(S) - 1,
|
|
3205
3205
|
// 0-5 for indexing
|
|
@@ -3221,8 +3221,8 @@ function Q_({
|
|
|
3221
3221
|
case "day":
|
|
3222
3222
|
return {
|
|
3223
3223
|
extractX: (S) => {
|
|
3224
|
-
const { year: C, week:
|
|
3225
|
-
return C * 100 +
|
|
3224
|
+
const { year: C, week: R } = N(S);
|
|
3225
|
+
return C * 100 + R;
|
|
3226
3226
|
},
|
|
3227
3227
|
extractY: (S) => S.getDay(),
|
|
3228
3228
|
// 0-6 (Sun-Sat)
|
|
@@ -3241,8 +3241,8 @@ function Q_({
|
|
|
3241
3241
|
case "hour":
|
|
3242
3242
|
return {
|
|
3243
3243
|
extractX: (S) => {
|
|
3244
|
-
const C = S.getFullYear(),
|
|
3245
|
-
return C * 1e4 +
|
|
3244
|
+
const C = S.getFullYear(), R = S.getMonth() + 1, F = S.getDate();
|
|
3245
|
+
return C * 1e4 + R * 100 + F;
|
|
3246
3246
|
},
|
|
3247
3247
|
extractY: (S) => Math.floor(S.getHours() / 3),
|
|
3248
3248
|
// 0-7 for 8 three-hour blocks
|
|
@@ -3264,8 +3264,8 @@ function Q_({
|
|
|
3264
3264
|
}, N = (T) => {
|
|
3265
3265
|
const S = new Date(Date.UTC(T.getFullYear(), T.getMonth(), T.getDate())), C = S.getUTCDay() || 7;
|
|
3266
3266
|
S.setUTCDate(S.getUTCDate() + 4 - C);
|
|
3267
|
-
const
|
|
3268
|
-
return { year:
|
|
3267
|
+
const R = S.getUTCFullYear(), F = new Date(Date.UTC(R, 0, 1)), I = Math.ceil(((S.getTime() - F.getTime()) / 864e5 + 1) / 7);
|
|
3268
|
+
return { year: R, week: I };
|
|
3269
3269
|
};
|
|
3270
3270
|
if (ce(() => {
|
|
3271
3271
|
if (!e || e.length === 0 || !i.current || !l || c.width === 0 || (Re(i.current).selectAll("*").remove(), !t?.dateField || !t?.valueField))
|
|
@@ -3273,7 +3273,7 @@ function Q_({
|
|
|
3273
3273
|
const T = Array.isArray(t.dateField) ? t.dateField[0] : t.dateField, S = Array.isArray(t.valueField) ? t.valueField[0] : t.valueField;
|
|
3274
3274
|
if (!T || !S)
|
|
3275
3275
|
return;
|
|
3276
|
-
const
|
|
3276
|
+
const R = (() => {
|
|
3277
3277
|
if (!n?.timeDimensions || n.timeDimensions.length === 0)
|
|
3278
3278
|
return "day";
|
|
3279
3279
|
const ne = n.timeDimensions.find(
|
|
@@ -3283,7 +3283,7 @@ function Q_({
|
|
|
3283
3283
|
return ne.granularity;
|
|
3284
3284
|
const fe = n.timeDimensions[0];
|
|
3285
3285
|
return fe && fe.granularity ? fe.granularity : "day";
|
|
3286
|
-
})(), F = _(
|
|
3286
|
+
})(), F = _(R);
|
|
3287
3287
|
if (!F)
|
|
3288
3288
|
return;
|
|
3289
3289
|
const I = e.map((ne) => {
|
|
@@ -3302,14 +3302,14 @@ function Q_({
|
|
|
3302
3302
|
y: de,
|
|
3303
3303
|
value: be,
|
|
3304
3304
|
date: K,
|
|
3305
|
-
label: Ey(fe,
|
|
3305
|
+
label: Ey(fe, R)
|
|
3306
3306
|
};
|
|
3307
3307
|
}).filter((ne) => ne !== null);
|
|
3308
3308
|
if (I.length === 0) return;
|
|
3309
|
-
const w = Ac(I, (ne) => ne.y) || 0,
|
|
3309
|
+
const w = Ac(I, (ne) => ne.y) || 0, M = Kd(I, (ne) => ne.y) || 0, q = (() => {
|
|
3310
3310
|
const ne = [...new Set(I.map((fe) => fe.x))].sort();
|
|
3311
3311
|
return ne;
|
|
3312
|
-
})(), $ = q.length * F.cellWidth + (q.length - 1) * 4, O = (w -
|
|
3312
|
+
})(), $ = q.length * F.cellWidth + (q.length - 1) * 4, O = (w - M + 1) * F.cellHeight + (w - M) * 4, B = {
|
|
3313
3313
|
left: 60,
|
|
3314
3314
|
// Space for Y-axis labels
|
|
3315
3315
|
bottom: 10,
|
|
@@ -3324,7 +3324,7 @@ function Q_({
|
|
|
3324
3324
|
U = F.cellWidth * be, L = F.cellHeight * be;
|
|
3325
3325
|
} else {
|
|
3326
3326
|
const fe = { width: 16, height: 16 }, be = 24, K = j / $, oe = Y / O, de = Math.min(K, oe);
|
|
3327
|
-
U = Math.max(fe.width, Math.min(be, F.cellWidth * de)), L = Math.max(fe.height, Math.min(be, F.cellHeight * de)),
|
|
3327
|
+
U = Math.max(fe.width, Math.min(be, F.cellWidth * de)), L = Math.max(fe.height, Math.min(be, F.cellHeight * de)), R === "week" && U < fe.width && (U = fe.width);
|
|
3328
3328
|
}
|
|
3329
3329
|
const H = q.length * U + (q.length - 1) * 4, G = H > j ? H + B.left + B.right : c.width, W = Re(i.current).attr("width", G).attr("height", c.height).append("g").attr("transform", `translate(${B.left},${B.top})`), V = I.map((ne) => ne.value), te = Kd(V) || 0, re = Ac(V) || 1, me = Cy().domain([te, re]).range(a?.gradient || kc), pe = /* @__PURE__ */ new Map();
|
|
3330
3330
|
I.forEach((ne) => {
|
|
@@ -3336,8 +3336,8 @@ function Q_({
|
|
|
3336
3336
|
Ne.set(ne, fe);
|
|
3337
3337
|
});
|
|
3338
3338
|
for (const ne of q)
|
|
3339
|
-
for (let fe =
|
|
3340
|
-
const be = `${ne}-${fe}`, K = pe.get(be), oe = Ne.get(ne) || 0, de = W.append("rect").attr("x", oe * (U + 4)).attr("y", (fe -
|
|
3339
|
+
for (let fe = M; fe <= w; fe++) {
|
|
3340
|
+
const be = `${ne}-${fe}`, K = pe.get(be), oe = Ne.get(ne) || 0, de = W.append("rect").attr("x", oe * (U + 4)).attr("y", (fe - M) * (L + 4)).attr("width", U).attr("height", L).attr("rx", 2).attr("ry", 2).style("fill", K ? me(K.value) : _e).style("stroke", he).style("stroke-width", 1);
|
|
3341
3341
|
y.showTooltip && de.style("cursor", "pointer").on("mouseover", function(X) {
|
|
3342
3342
|
if (Re(this).style("stroke", "#000").style("stroke-width", 2), K) {
|
|
3343
3343
|
const we = [
|
|
@@ -3381,8 +3381,8 @@ function Q_({
|
|
|
3381
3381
|
W.append("text").attr("x", fe * (U + 4) + U / 2).attr("y", -8).attr("text-anchor", "middle").style("font-size", "10px").style("fill", ee).text(F.xFormat(be));
|
|
3382
3382
|
}
|
|
3383
3383
|
}
|
|
3384
|
-
for (let ne =
|
|
3385
|
-
W.append("text").attr("x", -8).attr("y", (ne -
|
|
3384
|
+
for (let ne = M; ne <= w; ne++)
|
|
3385
|
+
W.append("text").attr("x", -8).attr("y", (ne - M) * (L + 4) + L / 2).attr("text-anchor", "end").attr("dy", ".35em").style("font-size", "10px").style("fill", ee).text(F.yFormat(ne));
|
|
3386
3386
|
}
|
|
3387
3387
|
return () => {
|
|
3388
3388
|
Oe.remove();
|
|
@@ -3762,7 +3762,7 @@ function eS({
|
|
|
3762
3762
|
]
|
|
3763
3763
|
}
|
|
3764
3764
|
);
|
|
3765
|
-
const
|
|
3765
|
+
const R = S.reduce((U, L) => U + L, 0) / S.length, F = Math.min(...S), I = Math.max(...S), w = (U) => {
|
|
3766
3766
|
if (r.formatValue)
|
|
3767
3767
|
return r.formatValue(U);
|
|
3768
3768
|
if (U == null)
|
|
@@ -3770,14 +3770,14 @@ function eS({
|
|
|
3770
3770
|
const L = r.decimals ?? 0, H = r.prefix ?? "";
|
|
3771
3771
|
let P;
|
|
3772
3772
|
return Math.abs(U) >= 1e9 ? P = (U / 1e9).toFixed(L) + "B" : Math.abs(U) >= 1e6 ? P = (U / 1e6).toFixed(L) + "M" : Math.abs(U) >= 1e3 ? P = (U / 1e3).toFixed(L) + "K" : P = U.toFixed(L), H + P;
|
|
3773
|
-
},
|
|
3773
|
+
}, M = S.length === 1 ? S[0] : R, D = S.length > 1, $ = (() => {
|
|
3774
3774
|
if (r.valueColorIndex !== void 0 && a?.colors) {
|
|
3775
3775
|
const U = r.valueColorIndex;
|
|
3776
3776
|
if (U >= 0 && U < a.colors.length)
|
|
3777
3777
|
return a.colors[U];
|
|
3778
3778
|
}
|
|
3779
3779
|
return a?.colors?.[0] || "#1f2937";
|
|
3780
|
-
})(), O = B0(r?.target || ""), B = O.length > 0 ? O[0] : null, j = B !== null ? j0(
|
|
3780
|
+
})(), O = B0(r?.target || ""), B = O.length > 0 ? O[0] : null, j = B !== null ? j0(M, B) : null, Y = () => {
|
|
3781
3781
|
if (j === null) return "#6B7280";
|
|
3782
3782
|
if (j >= 0) {
|
|
3783
3783
|
const U = r.positiveColorIndex ?? 1;
|
|
@@ -3831,7 +3831,7 @@ function eS({
|
|
|
3831
3831
|
fontSize: `${i}px`,
|
|
3832
3832
|
color: $
|
|
3833
3833
|
},
|
|
3834
|
-
children: w(
|
|
3834
|
+
children: w(M)
|
|
3835
3835
|
}
|
|
3836
3836
|
),
|
|
3837
3837
|
B !== null && j !== null && /* @__PURE__ */ E("div", { className: "flex flex-col items-start", children: [
|
|
@@ -4083,7 +4083,7 @@ function rS({
|
|
|
4083
4083
|
] })
|
|
4084
4084
|
}
|
|
4085
4085
|
);
|
|
4086
|
-
const C = S[S.length - 1],
|
|
4086
|
+
const C = S[S.length - 1], R = S[S.length - 2], F = C - R, I = R !== 0 ? F / Math.abs(R) * 100 : 0, w = F >= 0, M = (j) => {
|
|
4087
4087
|
if (r.formatValue)
|
|
4088
4088
|
return r.formatValue(j);
|
|
4089
4089
|
if (j == null)
|
|
@@ -4157,7 +4157,7 @@ function rS({
|
|
|
4157
4157
|
color: "var(--dc-text)"
|
|
4158
4158
|
// Keep main value neutral
|
|
4159
4159
|
},
|
|
4160
|
-
children:
|
|
4160
|
+
children: M(C)
|
|
4161
4161
|
}
|
|
4162
4162
|
),
|
|
4163
4163
|
/* @__PURE__ */ E("div", { className: "flex items-center space-x-1", children: [
|
|
@@ -4183,7 +4183,7 @@ function rS({
|
|
|
4183
4183
|
},
|
|
4184
4184
|
children: [
|
|
4185
4185
|
w ? "+" : "",
|
|
4186
|
-
|
|
4186
|
+
M(F)
|
|
4187
4187
|
]
|
|
4188
4188
|
}
|
|
4189
4189
|
),
|
|
@@ -4225,7 +4225,7 @@ function rS({
|
|
|
4225
4225
|
lastValue: C,
|
|
4226
4226
|
positiveColor: $,
|
|
4227
4227
|
negativeColor: O,
|
|
4228
|
-
formatValue:
|
|
4228
|
+
formatValue: M,
|
|
4229
4229
|
width: c,
|
|
4230
4230
|
height: 64
|
|
4231
4231
|
}
|
|
@@ -4245,9 +4245,9 @@ function nS({
|
|
|
4245
4245
|
if (ce(() => {
|
|
4246
4246
|
const C = () => {
|
|
4247
4247
|
if (d.current) {
|
|
4248
|
-
const w = d.current.getBoundingClientRect(),
|
|
4249
|
-
if (
|
|
4250
|
-
const q =
|
|
4248
|
+
const w = d.current.getBoundingClientRect(), M = w.width, D = w.height;
|
|
4249
|
+
if (M > 0 && D > 0) {
|
|
4250
|
+
const q = M / 8, $ = D / 5, O = Math.min(q, $), B = Math.max(18, Math.min(O, 80));
|
|
4251
4251
|
i(B);
|
|
4252
4252
|
}
|
|
4253
4253
|
}
|
|
@@ -4255,11 +4255,11 @@ function nS({
|
|
|
4255
4255
|
const I = l.current.getBoundingClientRect();
|
|
4256
4256
|
c(I.width);
|
|
4257
4257
|
}
|
|
4258
|
-
},
|
|
4259
|
-
clearTimeout(
|
|
4258
|
+
}, R = setTimeout(C, 100), F = new ResizeObserver(() => {
|
|
4259
|
+
clearTimeout(R), setTimeout(C, 50);
|
|
4260
4260
|
});
|
|
4261
4261
|
return d.current && F.observe(d.current), () => {
|
|
4262
|
-
clearTimeout(
|
|
4262
|
+
clearTimeout(R), F.disconnect();
|
|
4263
4263
|
};
|
|
4264
4264
|
}, [e, t]), !e || e.length === 0)
|
|
4265
4265
|
return /* @__PURE__ */ u(
|
|
@@ -4298,9 +4298,9 @@ function nS({
|
|
|
4298
4298
|
const h = m[0], g = e.map((C) => {
|
|
4299
4299
|
if (C[h] !== void 0)
|
|
4300
4300
|
return C[h];
|
|
4301
|
-
const
|
|
4302
|
-
if (
|
|
4303
|
-
return C[
|
|
4301
|
+
const R = Object.keys(C);
|
|
4302
|
+
if (R.length > 0)
|
|
4303
|
+
return C[R[0]];
|
|
4304
4304
|
}).filter((C) => C != null);
|
|
4305
4305
|
if (g.length === 0)
|
|
4306
4306
|
return /* @__PURE__ */ u(
|
|
@@ -4328,13 +4328,13 @@ function nS({
|
|
|
4328
4328
|
return r.formatValue(C);
|
|
4329
4329
|
if (C == null)
|
|
4330
4330
|
return "—";
|
|
4331
|
-
const
|
|
4332
|
-
return Math.abs(C) >= 1e9 ? (C / 1e9).toFixed(
|
|
4333
|
-
}, A = (C,
|
|
4331
|
+
const R = r.decimals ?? 2;
|
|
4332
|
+
return Math.abs(C) >= 1e9 ? (C / 1e9).toFixed(R) + "B" : Math.abs(C) >= 1e6 ? (C / 1e6).toFixed(R) + "M" : Math.abs(C) >= 1e3 ? (C / 1e3).toFixed(R) + "K" : C.toFixed(R);
|
|
4333
|
+
}, A = (C, R) => {
|
|
4334
4334
|
try {
|
|
4335
4335
|
const F = {
|
|
4336
|
-
value: typeof
|
|
4337
|
-
rawValue:
|
|
4336
|
+
value: typeof R == "number" ? N(R) : String(R),
|
|
4337
|
+
rawValue: R,
|
|
4338
4338
|
field: h,
|
|
4339
4339
|
fieldLabel: f(h),
|
|
4340
4340
|
min: b !== null ? N(b) : "",
|
|
@@ -4343,7 +4343,7 @@ function nS({
|
|
|
4343
4343
|
};
|
|
4344
4344
|
return C.replace(/\$\{(\w+)\}/g, (I, w) => w in F ? String(F[w]) : I);
|
|
4345
4345
|
} catch {
|
|
4346
|
-
return String(
|
|
4346
|
+
return String(R);
|
|
4347
4347
|
}
|
|
4348
4348
|
}, x = r.template || "${fieldLabel}: ${value}", k = A(x, p), S = (() => {
|
|
4349
4349
|
if (r.valueColorIndex !== void 0 && s?.colors) {
|
|
@@ -4513,8 +4513,8 @@ function sS({
|
|
|
4513
4513
|
2: "mb-3",
|
|
4514
4514
|
3: "mb-2"
|
|
4515
4515
|
};
|
|
4516
|
-
let
|
|
4517
|
-
return T === "small" ?
|
|
4516
|
+
let R = "";
|
|
4517
|
+
return T === "small" ? R = { 1: "text-lg", 2: "text-base", 3: "text-sm" }[k] || "text-sm" : T === "large" ? R = { 1: "text-5xl", 2: "text-4xl", 3: "text-3xl" }[k] || "text-3xl" : R = { 1: "text-3xl", 2: "text-2xl", 3: "text-xl" }[k] || "text-xl", `${S} ${R} ${C[k]}`;
|
|
4518
4518
|
}, N = `h${p.level}`;
|
|
4519
4519
|
return /* @__PURE__ */ u(
|
|
4520
4520
|
N,
|
|
@@ -4741,19 +4741,19 @@ const gn = un(({
|
|
|
4741
4741
|
if (A)
|
|
4742
4742
|
return null;
|
|
4743
4743
|
try {
|
|
4744
|
-
const
|
|
4744
|
+
const M = JSON.parse(e), D = s?.filter((B) => !B.isUniversalTime), q = aS(D, a), $ = iS(q, M.filters), O = lS(
|
|
4745
4745
|
s,
|
|
4746
4746
|
a,
|
|
4747
|
-
|
|
4747
|
+
M.timeDimensions
|
|
4748
4748
|
);
|
|
4749
4749
|
return {
|
|
4750
|
-
...
|
|
4750
|
+
...M,
|
|
4751
4751
|
filters: $,
|
|
4752
4752
|
timeDimensions: O,
|
|
4753
4753
|
__refresh_counter: h
|
|
4754
4754
|
};
|
|
4755
|
-
} catch (
|
|
4756
|
-
return console.error("AnalyticsPortlet: Invalid query JSON:",
|
|
4755
|
+
} catch (M) {
|
|
4756
|
+
return console.error("AnalyticsPortlet: Invalid query JSON:", M), null;
|
|
4757
4757
|
}
|
|
4758
4758
|
}, [e, h, A, s, a]), k = !x || A || !i && !_, { resultSet: T, isLoading: S, error: C } = Qx(x, {
|
|
4759
4759
|
skip: k,
|
|
@@ -4761,7 +4761,7 @@ const gn = un(({
|
|
|
4761
4761
|
});
|
|
4762
4762
|
vy(m, () => ({
|
|
4763
4763
|
refresh: () => {
|
|
4764
|
-
g((
|
|
4764
|
+
g((M) => M + 1);
|
|
4765
4765
|
}
|
|
4766
4766
|
}), []), ce(() => {
|
|
4767
4767
|
if (y.current && r && x && T && !C) {
|
|
@@ -4783,8 +4783,8 @@ const gn = un(({
|
|
|
4783
4783
|
});
|
|
4784
4784
|
}
|
|
4785
4785
|
}, [r, n, x, T, t, C]);
|
|
4786
|
-
const
|
|
4787
|
-
if (!r &&
|
|
4786
|
+
const R = !A && N.dropZones.some((M) => M.mandatory === !0);
|
|
4787
|
+
if (!r && R)
|
|
4788
4788
|
return /* @__PURE__ */ u("div", { ref: b, className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: c }, children: /* @__PURE__ */ E("div", { className: "text-center", children: [
|
|
4789
4789
|
/* @__PURE__ */ u("div", { className: "text-sm font-semibold mb-1", children: "Configuration Required" }),
|
|
4790
4790
|
/* @__PURE__ */ u("div", { className: "text-xs text-dc-text-secondary", children: "Please configure this chart" })
|
|
@@ -4804,7 +4804,7 @@ const gn = un(({
|
|
|
4804
4804
|
/* @__PURE__ */ u(
|
|
4805
4805
|
"button",
|
|
4806
4806
|
{
|
|
4807
|
-
onClick: () => g((
|
|
4807
|
+
onClick: () => g((M) => M + 1),
|
|
4808
4808
|
className: "px-2 py-1 text-white rounded-sm text-xs",
|
|
4809
4809
|
style: { backgroundColor: "var(--dc-primary)" },
|
|
4810
4810
|
children: "Retry"
|
|
@@ -4859,7 +4859,7 @@ const gn = un(({
|
|
|
4859
4859
|
cubeQuery: e,
|
|
4860
4860
|
children: /* @__PURE__ */ u("div", { className: "w-full h-full flex flex-col flex-1", style: { minHeight: "200px" }, children: (() => {
|
|
4861
4861
|
try {
|
|
4862
|
-
const
|
|
4862
|
+
const M = c;
|
|
4863
4863
|
switch (t) {
|
|
4864
4864
|
case "bar":
|
|
4865
4865
|
return /* @__PURE__ */ u(
|
|
@@ -4869,7 +4869,7 @@ const gn = un(({
|
|
|
4869
4869
|
chartConfig: r,
|
|
4870
4870
|
displayConfig: n,
|
|
4871
4871
|
queryObject: x,
|
|
4872
|
-
height:
|
|
4872
|
+
height: M,
|
|
4873
4873
|
colorPalette: l
|
|
4874
4874
|
}
|
|
4875
4875
|
);
|
|
@@ -4881,7 +4881,7 @@ const gn = un(({
|
|
|
4881
4881
|
chartConfig: r,
|
|
4882
4882
|
displayConfig: n,
|
|
4883
4883
|
queryObject: x,
|
|
4884
|
-
height:
|
|
4884
|
+
height: M,
|
|
4885
4885
|
colorPalette: l
|
|
4886
4886
|
}
|
|
4887
4887
|
);
|
|
@@ -4893,7 +4893,7 @@ const gn = un(({
|
|
|
4893
4893
|
chartConfig: r,
|
|
4894
4894
|
displayConfig: n,
|
|
4895
4895
|
queryObject: x,
|
|
4896
|
-
height:
|
|
4896
|
+
height: M,
|
|
4897
4897
|
colorPalette: l
|
|
4898
4898
|
}
|
|
4899
4899
|
);
|
|
@@ -4905,7 +4905,7 @@ const gn = un(({
|
|
|
4905
4905
|
chartConfig: r,
|
|
4906
4906
|
displayConfig: n,
|
|
4907
4907
|
queryObject: x,
|
|
4908
|
-
height:
|
|
4908
|
+
height: M,
|
|
4909
4909
|
colorPalette: l
|
|
4910
4910
|
}
|
|
4911
4911
|
);
|
|
@@ -4917,7 +4917,7 @@ const gn = un(({
|
|
|
4917
4917
|
chartConfig: r,
|
|
4918
4918
|
displayConfig: n,
|
|
4919
4919
|
queryObject: x,
|
|
4920
|
-
height:
|
|
4920
|
+
height: M,
|
|
4921
4921
|
colorPalette: l
|
|
4922
4922
|
}
|
|
4923
4923
|
);
|
|
@@ -4929,7 +4929,7 @@ const gn = un(({
|
|
|
4929
4929
|
chartConfig: r,
|
|
4930
4930
|
displayConfig: n,
|
|
4931
4931
|
queryObject: x,
|
|
4932
|
-
height:
|
|
4932
|
+
height: M,
|
|
4933
4933
|
colorPalette: l
|
|
4934
4934
|
}
|
|
4935
4935
|
);
|
|
@@ -4941,7 +4941,7 @@ const gn = un(({
|
|
|
4941
4941
|
chartConfig: r,
|
|
4942
4942
|
displayConfig: n,
|
|
4943
4943
|
queryObject: x,
|
|
4944
|
-
height:
|
|
4944
|
+
height: M,
|
|
4945
4945
|
colorPalette: l
|
|
4946
4946
|
}
|
|
4947
4947
|
);
|
|
@@ -4953,7 +4953,7 @@ const gn = un(({
|
|
|
4953
4953
|
chartConfig: r,
|
|
4954
4954
|
displayConfig: n,
|
|
4955
4955
|
queryObject: x,
|
|
4956
|
-
height:
|
|
4956
|
+
height: M,
|
|
4957
4957
|
colorPalette: l
|
|
4958
4958
|
}
|
|
4959
4959
|
);
|
|
@@ -4965,7 +4965,7 @@ const gn = un(({
|
|
|
4965
4965
|
chartConfig: r,
|
|
4966
4966
|
displayConfig: n,
|
|
4967
4967
|
queryObject: x,
|
|
4968
|
-
height:
|
|
4968
|
+
height: M,
|
|
4969
4969
|
colorPalette: l
|
|
4970
4970
|
}
|
|
4971
4971
|
);
|
|
@@ -4977,7 +4977,7 @@ const gn = un(({
|
|
|
4977
4977
|
chartConfig: r,
|
|
4978
4978
|
displayConfig: n,
|
|
4979
4979
|
queryObject: x,
|
|
4980
|
-
height:
|
|
4980
|
+
height: M,
|
|
4981
4981
|
colorPalette: l
|
|
4982
4982
|
}
|
|
4983
4983
|
);
|
|
@@ -4989,7 +4989,7 @@ const gn = un(({
|
|
|
4989
4989
|
chartConfig: r,
|
|
4990
4990
|
displayConfig: n,
|
|
4991
4991
|
queryObject: x,
|
|
4992
|
-
height:
|
|
4992
|
+
height: M,
|
|
4993
4993
|
colorPalette: l
|
|
4994
4994
|
},
|
|
4995
4995
|
`activityGrid-${l?.name || "default"}`
|
|
@@ -5002,7 +5002,7 @@ const gn = un(({
|
|
|
5002
5002
|
chartConfig: r,
|
|
5003
5003
|
displayConfig: n,
|
|
5004
5004
|
queryObject: x,
|
|
5005
|
-
height:
|
|
5005
|
+
height: M,
|
|
5006
5006
|
colorPalette: l
|
|
5007
5007
|
}
|
|
5008
5008
|
);
|
|
@@ -5014,7 +5014,7 @@ const gn = un(({
|
|
|
5014
5014
|
chartConfig: r,
|
|
5015
5015
|
displayConfig: n,
|
|
5016
5016
|
queryObject: x,
|
|
5017
|
-
height:
|
|
5017
|
+
height: M,
|
|
5018
5018
|
colorPalette: l
|
|
5019
5019
|
}
|
|
5020
5020
|
);
|
|
@@ -5026,7 +5026,7 @@ const gn = un(({
|
|
|
5026
5026
|
chartConfig: r,
|
|
5027
5027
|
displayConfig: n,
|
|
5028
5028
|
queryObject: x,
|
|
5029
|
-
height:
|
|
5029
|
+
height: M,
|
|
5030
5030
|
colorPalette: l
|
|
5031
5031
|
}
|
|
5032
5032
|
);
|
|
@@ -5038,7 +5038,7 @@ const gn = un(({
|
|
|
5038
5038
|
chartConfig: r,
|
|
5039
5039
|
displayConfig: n,
|
|
5040
5040
|
queryObject: x,
|
|
5041
|
-
height:
|
|
5041
|
+
height: M,
|
|
5042
5042
|
colorPalette: l
|
|
5043
5043
|
}
|
|
5044
5044
|
);
|
|
@@ -5048,10 +5048,10 @@ const gn = un(({
|
|
|
5048
5048
|
/* @__PURE__ */ u("div", { className: "text-xs", children: t })
|
|
5049
5049
|
] }) });
|
|
5050
5050
|
}
|
|
5051
|
-
} catch (
|
|
5052
|
-
return console.error("Chart rendering error:",
|
|
5051
|
+
} catch (M) {
|
|
5052
|
+
return console.error("Chart rendering error:", M), /* @__PURE__ */ u("div", { className: "flex items-center justify-center w-full text-dc-text-muted p-4", style: { height: c }, children: /* @__PURE__ */ E("div", { className: "text-center", children: [
|
|
5053
5053
|
/* @__PURE__ */ u("div", { className: "text-sm font-semibold mb-1", children: "Unable to render chart" }),
|
|
5054
|
-
/* @__PURE__ */ u("div", { className: "text-xs text-dc-text-secondary", children:
|
|
5054
|
+
/* @__PURE__ */ u("div", { className: "text-xs text-dc-text-secondary", children: M instanceof Error ? M.message : "Unknown error" })
|
|
5055
5055
|
] }) });
|
|
5056
5056
|
}
|
|
5057
5057
|
})() })
|
|
@@ -5509,7 +5509,7 @@ const rd = (e) => ({
|
|
|
5509
5509
|
}), kS = (e, t) => pb(hb(wr(e), wr(t))), Pc = (e, t) => {
|
|
5510
5510
|
const r = Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)), n = Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));
|
|
5511
5511
|
return Math.ceil(r * n);
|
|
5512
|
-
}, TS = (e) => He(e.width) && He(e.height) && He(e.x) && He(e.y), He = (e) => !isNaN(e) && isFinite(e), Me = Symbol.for("internals"), gb = ["Enter", " ", "Escape"], yb = (e, t) => {
|
|
5512
|
+
}, TS = (e) => He(e.width) && He(e.height) && He(e.x) && He(e.y), He = (e) => !isNaN(e) && isFinite(e), Me = /* @__PURE__ */ Symbol.for("internals"), gb = ["Enter", " ", "Escape"], yb = (e, t) => {
|
|
5513
5513
|
process.env.NODE_ENV === "development" && console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`);
|
|
5514
5514
|
}, AS = (e) => "nativeEvent" in e;
|
|
5515
5515
|
function Lc(e) {
|
|
@@ -5653,11 +5653,11 @@ function MS({ source: e, sourcePosition: t = le.Bottom, target: r, targetPositio
|
|
|
5653
5653
|
}
|
|
5654
5654
|
}
|
|
5655
5655
|
if (t !== n) {
|
|
5656
|
-
const I = f === "x" ? "y" : "x", w = i[f] === o[I],
|
|
5657
|
-
(i[f] === 1 && (!w &&
|
|
5656
|
+
const I = f === "x" ? "y" : "x", w = i[f] === o[I], M = c[I] > d[I], D = c[I] < d[I];
|
|
5657
|
+
(i[f] === 1 && (!w && M || w && D) || i[f] !== 1 && (!w && D || w && M)) && (h = f === "x" ? k : T);
|
|
5658
5658
|
}
|
|
5659
|
-
const S = { x: c.x + p.x, y: c.y + p.y }, C = { x: d.x + b.x, y: d.y + b.y },
|
|
5660
|
-
|
|
5659
|
+
const S = { x: c.x + p.x, y: c.y + p.y }, C = { x: d.x + b.x, y: d.y + b.y }, R = Math.max(Math.abs(S.x - h[0].x), Math.abs(C.x - h[0].x)), F = Math.max(Math.abs(S.y - h[0].y), Math.abs(C.y - h[0].y));
|
|
5660
|
+
R >= F ? (g = (S.x + C.x) / 2, y = h[0].y) : (g = h[0].x, y = (S.y + C.y) / 2);
|
|
5661
5661
|
}
|
|
5662
5662
|
return [[
|
|
5663
5663
|
e,
|
|
@@ -5962,7 +5962,7 @@ function Rb({ event: e, handleId: t, nodeId: r, onConnect: n, isTarget: s, getSt
|
|
|
5962
5962
|
const { x: A, y: x } = vt(e), k = l?.elementFromPoint(A, x), T = ld(c, k), S = m?.getBoundingClientRect();
|
|
5963
5963
|
if (!S || !T)
|
|
5964
5964
|
return;
|
|
5965
|
-
let C,
|
|
5965
|
+
let C, R = vt(e, S), F = !1, I = null, w = !1, M = null;
|
|
5966
5966
|
const D = zS({
|
|
5967
5967
|
nodes: b(),
|
|
5968
5968
|
nodeId: r,
|
|
@@ -5971,11 +5971,11 @@ function Rb({ event: e, handleId: t, nodeId: r, onConnect: n, isTarget: s, getSt
|
|
|
5971
5971
|
}), q = () => {
|
|
5972
5972
|
if (!h)
|
|
5973
5973
|
return;
|
|
5974
|
-
const [B, j] = fb(
|
|
5974
|
+
const [B, j] = fb(R, S);
|
|
5975
5975
|
p({ x: B, y: j }), _ = requestAnimationFrame(q);
|
|
5976
5976
|
};
|
|
5977
5977
|
i({
|
|
5978
|
-
connectionPosition:
|
|
5978
|
+
connectionPosition: R,
|
|
5979
5979
|
connectionStatus: null,
|
|
5980
5980
|
// connectionNodeId etc will be removed in the next major in favor of connectionStartHandle
|
|
5981
5981
|
connectionNodeId: r,
|
|
@@ -5990,21 +5990,21 @@ function Rb({ event: e, handleId: t, nodeId: r, onConnect: n, isTarget: s, getSt
|
|
|
5990
5990
|
}), y?.(e, { nodeId: r, handleId: t, handleType: T });
|
|
5991
5991
|
function $(B) {
|
|
5992
5992
|
const { transform: j } = a();
|
|
5993
|
-
|
|
5994
|
-
const { handle: Y, validHandleResult: U } = $S(B, l, zc(
|
|
5995
|
-
if (N = Y, F || (q(), F = !0),
|
|
5993
|
+
R = vt(B, S);
|
|
5994
|
+
const { handle: Y, validHandleResult: U } = $S(B, l, zc(R, j, !1, [1, 1]), g, D, (L) => Ab(L, f, r, t, s ? "target" : "source", o, l));
|
|
5995
|
+
if (N = Y, F || (q(), F = !0), M = U.handleDomNode, I = U.connection, w = U.isValid, i({
|
|
5996
5996
|
connectionPosition: N && w ? Sb({
|
|
5997
5997
|
x: N.x,
|
|
5998
5998
|
y: N.y
|
|
5999
|
-
}, j) :
|
|
5999
|
+
}, j) : R,
|
|
6000
6000
|
connectionStatus: BS(!!N, w),
|
|
6001
6001
|
connectionEndHandle: U.endHandle
|
|
6002
|
-
}), !N && !w && !
|
|
6002
|
+
}), !N && !w && !M)
|
|
6003
6003
|
return Qn(C);
|
|
6004
|
-
I.source !== I.target &&
|
|
6004
|
+
I.source !== I.target && M && (Qn(C), C = M, M.classList.add("connecting", "react-flow__handle-connecting"), M.classList.toggle("valid", w), M.classList.toggle("react-flow__handle-valid", w));
|
|
6005
6005
|
}
|
|
6006
6006
|
function O(B) {
|
|
6007
|
-
(N ||
|
|
6007
|
+
(N || M) && I && w && n?.(I), a().onConnectEnd?.(B), c && d?.(B), Qn(C), v(), cancelAnimationFrame(_), F = !1, w = !1, I = null, M = null, l.removeEventListener("mousemove", $), l.removeEventListener("mouseup", O), l.removeEventListener("touchmove", $), l.removeEventListener("touchend", O);
|
|
6008
6008
|
}
|
|
6009
6009
|
l.addEventListener("mousemove", $), l.addEventListener("mouseup", O), l.addEventListener("touchmove", $), l.addEventListener("touchend", O);
|
|
6010
6010
|
}
|
|
@@ -6022,15 +6022,15 @@ const Eu = () => !0, HS = (e) => ({
|
|
|
6022
6022
|
const g = i || null, y = e === "target", p = Ie(), b = OS(), { connectOnClick: v, noPanClassName: _ } = Ce(HS, qe), { connecting: N, clickConnecting: A } = Ce(jS(b, g, e), qe);
|
|
6023
6023
|
b || p.getState().onError?.("010", Qe.error010());
|
|
6024
6024
|
const x = (S) => {
|
|
6025
|
-
const { defaultEdgeOptions: C, onConnect:
|
|
6025
|
+
const { defaultEdgeOptions: C, onConnect: R, hasDefaultEdges: F } = p.getState(), I = {
|
|
6026
6026
|
...C,
|
|
6027
6027
|
...S
|
|
6028
6028
|
};
|
|
6029
6029
|
if (F) {
|
|
6030
|
-
const { edges: w, setEdges:
|
|
6031
|
-
|
|
6030
|
+
const { edges: w, setEdges: M } = p.getState();
|
|
6031
|
+
M(_b(I, w));
|
|
6032
6032
|
}
|
|
6033
|
-
|
|
6033
|
+
R?.(I), o?.(I);
|
|
6034
6034
|
}, k = (S) => {
|
|
6035
6035
|
if (!b)
|
|
6036
6036
|
return;
|
|
@@ -6046,19 +6046,19 @@ const Eu = () => !0, HS = (e) => ({
|
|
|
6046
6046
|
isValidConnection: r || p.getState().isValidConnection || Eu
|
|
6047
6047
|
}), C ? l?.(S) : f?.(S);
|
|
6048
6048
|
}, T = (S) => {
|
|
6049
|
-
const { onClickConnectStart: C, onClickConnectEnd:
|
|
6049
|
+
const { onClickConnectStart: C, onClickConnectEnd: R, connectionClickStartHandle: F, connectionMode: I, isValidConnection: w } = p.getState();
|
|
6050
6050
|
if (!b || !F && !s)
|
|
6051
6051
|
return;
|
|
6052
6052
|
if (!F) {
|
|
6053
6053
|
C?.(S, { nodeId: b, handleId: g, handleType: e }), p.setState({ connectionClickStartHandle: { nodeId: b, type: e, handleId: g } });
|
|
6054
6054
|
return;
|
|
6055
6055
|
}
|
|
6056
|
-
const
|
|
6056
|
+
const M = mb(S.target), D = r || w || Eu, { connection: q, isValid: $ } = Ab({
|
|
6057
6057
|
nodeId: b,
|
|
6058
6058
|
id: g,
|
|
6059
6059
|
type: e
|
|
6060
|
-
}, I, F.nodeId, F.handleId || null, F.type, D,
|
|
6061
|
-
$ && x(q),
|
|
6060
|
+
}, I, F.nodeId, F.handleId || null, F.type, D, M);
|
|
6061
|
+
$ && x(q), R?.(S), p.setState({ connectionClickStartHandle: null });
|
|
6062
6062
|
};
|
|
6063
6063
|
return Q.createElement("div", { "data-handleid": g, "data-nodeid": b, "data-handlepos": t, "data-id": `${b}-${g}-${e}`, className: Le([
|
|
6064
6064
|
"react-flow__handle",
|
|
@@ -6147,14 +6147,14 @@ function xe(e, t, r) {
|
|
|
6147
6147
|
typeof t < "u" && r({ [e]: t });
|
|
6148
6148
|
}, [t]);
|
|
6149
6149
|
}
|
|
6150
|
-
const QS = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: n, onConnect: s, onConnectStart: a, onConnectEnd: i, onClickConnectStart: o, onClickConnectEnd: c, nodesDraggable: d, nodesConnectable: l, nodesFocusable: f, edgesFocusable: m, edgesUpdatable: h, elevateNodesOnSelect: g, minZoom: y, maxZoom: p, nodeExtent: b, onNodesChange: v, onEdgesChange: _, elementsSelectable: N, connectionMode: A, snapGrid: x, snapToGrid: k, translateExtent: T, connectOnClick: S, defaultEdgeOptions: C, fitView:
|
|
6150
|
+
const QS = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: n, onConnect: s, onConnectStart: a, onConnectEnd: i, onClickConnectStart: o, onClickConnectEnd: c, nodesDraggable: d, nodesConnectable: l, nodesFocusable: f, edgesFocusable: m, edgesUpdatable: h, elevateNodesOnSelect: g, minZoom: y, maxZoom: p, nodeExtent: b, onNodesChange: v, onEdgesChange: _, elementsSelectable: N, connectionMode: A, snapGrid: x, snapToGrid: k, translateExtent: T, connectOnClick: S, defaultEdgeOptions: C, fitView: R, fitViewOptions: F, onNodesDelete: I, onEdgesDelete: w, onNodeDrag: M, onNodeDragStart: D, onNodeDragStop: q, onSelectionDrag: $, onSelectionDragStart: O, onSelectionDragStop: B, noPanClassName: j, nodeOrigin: Y, rfId: U, autoPanOnConnect: L, autoPanOnNodeDrag: H, onError: P, connectionRadius: G, isValidConnection: z, nodeDragThreshold: W }) => {
|
|
6151
6151
|
const { setNodes: V, setEdges: te, setDefaultNodesAndEdges: re, setMinZoom: me, setMaxZoom: pe, setTranslateExtent: se, setNodeExtent: ae, reset: ee } = Ce(KS, qe), ie = Ie();
|
|
6152
6152
|
return ce(() => {
|
|
6153
6153
|
const _e = n?.map((he) => ({ ...he, ...C }));
|
|
6154
6154
|
return re(r, _e), () => {
|
|
6155
6155
|
ee();
|
|
6156
6156
|
};
|
|
6157
|
-
}, []), xe("defaultEdgeOptions", C, ie.setState), xe("connectionMode", A, ie.setState), xe("onConnect", s, ie.setState), xe("onConnectStart", a, ie.setState), xe("onConnectEnd", i, ie.setState), xe("onClickConnectStart", o, ie.setState), xe("onClickConnectEnd", c, ie.setState), xe("nodesDraggable", d, ie.setState), xe("nodesConnectable", l, ie.setState), xe("nodesFocusable", f, ie.setState), xe("edgesFocusable", m, ie.setState), xe("edgesUpdatable", h, ie.setState), xe("elementsSelectable", N, ie.setState), xe("elevateNodesOnSelect", g, ie.setState), xe("snapToGrid", k, ie.setState), xe("snapGrid", x, ie.setState), xe("onNodesChange", v, ie.setState), xe("onEdgesChange", _, ie.setState), xe("connectOnClick", S, ie.setState), xe("fitViewOnInit",
|
|
6157
|
+
}, []), xe("defaultEdgeOptions", C, ie.setState), xe("connectionMode", A, ie.setState), xe("onConnect", s, ie.setState), xe("onConnectStart", a, ie.setState), xe("onConnectEnd", i, ie.setState), xe("onClickConnectStart", o, ie.setState), xe("onClickConnectEnd", c, ie.setState), xe("nodesDraggable", d, ie.setState), xe("nodesConnectable", l, ie.setState), xe("nodesFocusable", f, ie.setState), xe("edgesFocusable", m, ie.setState), xe("edgesUpdatable", h, ie.setState), xe("elementsSelectable", N, ie.setState), xe("elevateNodesOnSelect", g, ie.setState), xe("snapToGrid", k, ie.setState), xe("snapGrid", x, ie.setState), xe("onNodesChange", v, ie.setState), xe("onEdgesChange", _, ie.setState), xe("connectOnClick", S, ie.setState), xe("fitViewOnInit", R, ie.setState), xe("fitViewOnInitOptions", F, ie.setState), xe("onNodesDelete", I, ie.setState), xe("onEdgesDelete", w, ie.setState), xe("onNodeDrag", M, ie.setState), xe("onNodeDragStart", D, ie.setState), xe("onNodeDragStop", q, ie.setState), xe("onSelectionDrag", $, ie.setState), xe("onSelectionDragStart", O, ie.setState), xe("onSelectionDragStop", B, ie.setState), xe("noPanClassName", j, ie.setState), xe("nodeOrigin", Y, ie.setState), xe("rfId", U, ie.setState), xe("autoPanOnConnect", L, ie.setState), xe("autoPanOnNodeDrag", H, ie.setState), xe("onError", P, ie.setState), xe("connectionRadius", G, ie.setState), xe("isValidConnection", z, ie.setState), xe("nodeDragThreshold", W, ie.setState), It(e, V), It(t, te), It(y, me), It(p, pe), It(T, se), It(b, ae), null;
|
|
6158
6158
|
}, Cu = { display: "none" }, XS = {
|
|
6159
6159
|
position: "absolute",
|
|
6160
6160
|
width: 1,
|
|
@@ -6427,12 +6427,12 @@ function dd() {
|
|
|
6427
6427
|
}
|
|
6428
6428
|
};
|
|
6429
6429
|
}, []), f = J(({ nodes: y, edges: p }) => {
|
|
6430
|
-
const { nodeInternals: b, getNodes: v, edges: _, hasDefaultNodes: N, hasDefaultEdges: A, onNodesDelete: x, onEdgesDelete: k, onNodesChange: T, onEdgesChange: S } = t.getState(), C = (y || []).map((
|
|
6431
|
-
const q = D.parentNode || D.parentId, $ = !C.includes(D.id) && q &&
|
|
6432
|
-
return (typeof D.deletable
|
|
6433
|
-
}, []), I = _.filter((
|
|
6430
|
+
const { nodeInternals: b, getNodes: v, edges: _, hasDefaultNodes: N, hasDefaultEdges: A, onNodesDelete: x, onEdgesDelete: k, onNodesChange: T, onEdgesChange: S } = t.getState(), C = (y || []).map((M) => M.id), R = (p || []).map((M) => M.id), F = v().reduce((M, D) => {
|
|
6431
|
+
const q = D.parentNode || D.parentId, $ = !C.includes(D.id) && q && M.find((B) => B.id === q);
|
|
6432
|
+
return (typeof D.deletable != "boolean" || D.deletable) && (C.includes(D.id) || $) && M.push(D), M;
|
|
6433
|
+
}, []), I = _.filter((M) => typeof M.deletable == "boolean" ? M.deletable : !0), w = I.filter((M) => R.includes(M.id));
|
|
6434
6434
|
if (F || w) {
|
|
6435
|
-
const
|
|
6435
|
+
const M = Cb(F, I), D = [...w, ...M], q = D.reduce(($, O) => ($.includes(O.id) || $.push(O.id), $), []);
|
|
6436
6436
|
if ((A || N) && (A && t.setState({
|
|
6437
6437
|
edges: _.filter(($) => !q.includes($.id))
|
|
6438
6438
|
}), N && (F.forEach(($) => {
|
|
@@ -6541,7 +6541,7 @@ const ud = {
|
|
|
6541
6541
|
d3ZoomHandler: e.d3ZoomHandler,
|
|
6542
6542
|
userSelectionActive: e.userSelectionActive
|
|
6543
6543
|
}), f2 = ({ onMove: e, onMoveStart: t, onMoveEnd: r, onPaneContextMenu: n, zoomOnScroll: s = !0, zoomOnPinch: a = !0, panOnScroll: i = !1, panOnScrollSpeed: o = 0.5, panOnScrollMode: c = Ct.Free, zoomOnDoubleClick: d = !0, elementsSelectable: l, panOnDrag: f = !0, defaultViewport: m, translateExtent: h, minZoom: g, maxZoom: y, zoomActivationKeyCode: p, preventScrolling: b = !0, children: v, noWheelClassName: _, noPanClassName: N }) => {
|
|
6544
|
-
const A = ue(), x = Ie(), k = ue(!1), T = ue(!1), S = ue(null), C = ue({ x: 0, y: 0, zoom: 0 }), { d3Zoom:
|
|
6544
|
+
const A = ue(), x = Ie(), k = ue(!1), T = ue(!1), S = ue(null), C = ue({ x: 0, y: 0, zoom: 0 }), { d3Zoom: R, d3Selection: F, d3ZoomHandler: I, userSelectionActive: w } = Ce(u2, qe), M = _r(p), D = ue(0), q = ue(!1), $ = ue();
|
|
6545
6545
|
return c2(S), ce(() => {
|
|
6546
6546
|
if (S.current) {
|
|
6547
6547
|
const O = S.current.getBoundingClientRect(), B = tb().scaleExtent([g, y]).translateExtent(h), j = Re(S.current).call(B), Y = ot.translate(m.x, m.y).scale(Qt(m.zoom, g, y)), U = [
|
|
@@ -6558,19 +6558,19 @@ const ud = {
|
|
|
6558
6558
|
});
|
|
6559
6559
|
}
|
|
6560
6560
|
}, []), ce(() => {
|
|
6561
|
-
F &&
|
|
6561
|
+
F && R && (i && !M && !w ? F.on("wheel.zoom", (O) => {
|
|
6562
6562
|
if (Ft(O, _))
|
|
6563
6563
|
return !1;
|
|
6564
6564
|
O.preventDefault(), O.stopImmediatePropagation();
|
|
6565
6565
|
const B = F.property("__zoom").k || 1;
|
|
6566
6566
|
if (O.ctrlKey && a) {
|
|
6567
6567
|
const z = Ke(O), W = Ru(O), V = B * Math.pow(2, W);
|
|
6568
|
-
|
|
6568
|
+
R.scaleTo(F, V, z, O);
|
|
6569
6569
|
return;
|
|
6570
6570
|
}
|
|
6571
6571
|
const j = O.deltaMode === 1 ? 20 : 1;
|
|
6572
6572
|
let Y = c === Ct.Vertical ? 0 : O.deltaX * j, U = c === Ct.Horizontal ? 0 : O.deltaY * j;
|
|
6573
|
-
!on() && O.shiftKey && c !== Ct.Vertical && (Y = O.deltaY * j, U = 0),
|
|
6573
|
+
!on() && O.shiftKey && c !== Ct.Vertical && (Y = O.deltaY * j, U = 0), R.translateBy(
|
|
6574
6574
|
F,
|
|
6575
6575
|
-(Y / B) * o,
|
|
6576
6576
|
-(U / B) * o,
|
|
@@ -6591,9 +6591,9 @@ const ud = {
|
|
|
6591
6591
|
i,
|
|
6592
6592
|
c,
|
|
6593
6593
|
F,
|
|
6594
|
-
M,
|
|
6595
|
-
I,
|
|
6596
6594
|
R,
|
|
6595
|
+
I,
|
|
6596
|
+
M,
|
|
6597
6597
|
a,
|
|
6598
6598
|
b,
|
|
6599
6599
|
_,
|
|
@@ -6601,23 +6601,23 @@ const ud = {
|
|
|
6601
6601
|
e,
|
|
6602
6602
|
r
|
|
6603
6603
|
]), ce(() => {
|
|
6604
|
-
|
|
6604
|
+
R && R.on("start", (O) => {
|
|
6605
6605
|
if (!O.sourceEvent || O.sourceEvent.internal)
|
|
6606
6606
|
return null;
|
|
6607
6607
|
D.current = O.sourceEvent?.button;
|
|
6608
6608
|
const { onViewportChangeStart: B } = x.getState(), j = Hr(O.transform);
|
|
6609
6609
|
k.current = !0, C.current = j, O.sourceEvent?.type === "mousedown" && x.setState({ paneDragging: !0 }), B?.(j), t?.(O.sourceEvent, j);
|
|
6610
6610
|
});
|
|
6611
|
-
}, [
|
|
6612
|
-
|
|
6611
|
+
}, [R, t]), ce(() => {
|
|
6612
|
+
R && (w && !k.current ? R.on("zoom", null) : w || R.on("zoom", (O) => {
|
|
6613
6613
|
const { onViewportChange: B } = x.getState();
|
|
6614
6614
|
if (x.setState({ transform: [O.transform.x, O.transform.y, O.transform.k] }), T.current = !!(n && Au(f, D.current ?? 0)), (e || B) && !O.sourceEvent?.internal) {
|
|
6615
6615
|
const j = Hr(O.transform);
|
|
6616
6616
|
B?.(j), e?.(O.sourceEvent, j);
|
|
6617
6617
|
}
|
|
6618
6618
|
}));
|
|
6619
|
-
}, [w,
|
|
6620
|
-
|
|
6619
|
+
}, [w, R, e, f, n]), ce(() => {
|
|
6620
|
+
R && R.on("end", (O) => {
|
|
6621
6621
|
if (!O.sourceEvent || O.sourceEvent.internal)
|
|
6622
6622
|
return null;
|
|
6623
6623
|
const { onViewportChangeEnd: B } = x.getState();
|
|
@@ -6628,26 +6628,26 @@ const ud = {
|
|
|
6628
6628
|
}, i ? 150 : 0);
|
|
6629
6629
|
}
|
|
6630
6630
|
});
|
|
6631
|
-
}, [
|
|
6632
|
-
|
|
6633
|
-
const B =
|
|
6631
|
+
}, [R, i, f, r, n]), ce(() => {
|
|
6632
|
+
R && R.filter((O) => {
|
|
6633
|
+
const B = M || s, j = a && O.ctrlKey;
|
|
6634
6634
|
if ((f === !0 || Array.isArray(f) && f.includes(1)) && O.button === 1 && O.type === "mousedown" && (Ft(O, "react-flow__node") || Ft(O, "react-flow__edge")))
|
|
6635
6635
|
return !0;
|
|
6636
|
-
if (!f && !B && !i && !d && !a || w || !d && O.type === "dblclick" || Ft(O, _) && O.type === "wheel" || Ft(O, N) && (O.type !== "wheel" || i && O.type === "wheel" && !
|
|
6636
|
+
if (!f && !B && !i && !d && !a || w || !d && O.type === "dblclick" || Ft(O, _) && O.type === "wheel" || Ft(O, N) && (O.type !== "wheel" || i && O.type === "wheel" && !M) || !a && O.ctrlKey && O.type === "wheel" || !B && !i && !j && O.type === "wheel" || !f && (O.type === "mousedown" || O.type === "touchstart") || Array.isArray(f) && !f.includes(O.button) && O.type === "mousedown")
|
|
6637
6637
|
return !1;
|
|
6638
6638
|
const Y = Array.isArray(f) && f.includes(O.button) || !O.button || O.button <= 1;
|
|
6639
6639
|
return (!O.ctrlKey || O.type === "wheel") && Y;
|
|
6640
6640
|
});
|
|
6641
6641
|
}, [
|
|
6642
6642
|
w,
|
|
6643
|
-
|
|
6643
|
+
R,
|
|
6644
6644
|
s,
|
|
6645
6645
|
a,
|
|
6646
6646
|
i,
|
|
6647
6647
|
d,
|
|
6648
6648
|
f,
|
|
6649
6649
|
l,
|
|
6650
|
-
|
|
6650
|
+
M
|
|
6651
6651
|
]), Q.createElement("div", { className: "react-flow__renderer", ref: S, style: ud }, v);
|
|
6652
6652
|
}, m2 = (e) => ({
|
|
6653
6653
|
userSelectionActive: e.userSelectionActive,
|
|
@@ -6743,8 +6743,8 @@ const Zn = (e, t) => (r) => {
|
|
|
6743
6743
|
}
|
|
6744
6744
|
i?.(I);
|
|
6745
6745
|
}, k = o ? (I) => o(I) : void 0, T = (I) => {
|
|
6746
|
-
const { resetSelectedElements: w, domNode:
|
|
6747
|
-
if (p.current =
|
|
6746
|
+
const { resetSelectedElements: w, domNode: M } = h.getState();
|
|
6747
|
+
if (p.current = M?.getBoundingClientRect(), !v || !e || I.button !== 0 || I.target !== m.current || !p.current)
|
|
6748
6748
|
return;
|
|
6749
6749
|
const { x: D, y: q } = vt(I, p.current);
|
|
6750
6750
|
w(), h.setState({
|
|
@@ -6758,7 +6758,7 @@ const Zn = (e, t) => (r) => {
|
|
|
6758
6758
|
}
|
|
6759
6759
|
}), n?.(I);
|
|
6760
6760
|
}, S = (I) => {
|
|
6761
|
-
const { userSelectionRect: w, nodeInternals:
|
|
6761
|
+
const { userSelectionRect: w, nodeInternals: M, edges: D, transform: q, onNodesChange: $, onEdgesChange: O, nodeOrigin: B, getNodes: j } = h.getState();
|
|
6762
6762
|
if (!e || !p.current || !w)
|
|
6763
6763
|
return;
|
|
6764
6764
|
h.setState({ userSelectionActive: !0, nodesSelectionActive: !1 });
|
|
@@ -6768,7 +6768,7 @@ const Zn = (e, t) => (r) => {
|
|
|
6768
6768
|
y: Y.y < L ? Y.y : L,
|
|
6769
6769
|
width: Math.abs(Y.x - U),
|
|
6770
6770
|
height: Math.abs(Y.y - L)
|
|
6771
|
-
}, P = j(), G = Eb(
|
|
6771
|
+
}, P = j(), G = Eb(M, H, q, t === Nr.Partial, !0, B), z = Cb(G, D).map((V) => V.id), W = G.map((V) => V.id);
|
|
6772
6772
|
if (g.current !== W.length) {
|
|
6773
6773
|
g.current = W.length;
|
|
6774
6774
|
const V = $t(P, W);
|
|
@@ -6787,12 +6787,12 @@ const Zn = (e, t) => (r) => {
|
|
|
6787
6787
|
return;
|
|
6788
6788
|
const { userSelectionRect: w } = h.getState();
|
|
6789
6789
|
!b && w && I.target === m.current && A?.(I), h.setState({ nodesSelectionActive: g.current > 0 }), N(), s?.(I);
|
|
6790
|
-
},
|
|
6790
|
+
}, R = (I) => {
|
|
6791
6791
|
b && (h.setState({ nodesSelectionActive: g.current > 0 }), s?.(I)), N();
|
|
6792
6792
|
}, F = v && (e || b);
|
|
6793
6793
|
return Q.createElement(
|
|
6794
6794
|
"div",
|
|
6795
|
-
{ className: Le(["react-flow__pane", { dragging: _, selection: e }]), onClick: F ? void 0 : Zn(A, m), onContextMenu: Zn(x, m), onWheel: Zn(k, m), onMouseEnter: F ? void 0 : c, onMouseDown: F ? T : void 0, onMouseMove: F ? S : d, onMouseUp: F ? C : void 0, onMouseLeave: F ?
|
|
6795
|
+
{ className: Le(["react-flow__pane", { dragging: _, selection: e }]), onClick: F ? void 0 : Zn(A, m), onContextMenu: Zn(x, m), onWheel: Zn(k, m), onMouseEnter: F ? void 0 : c, onMouseDown: F ? T : void 0, onMouseMove: F ? S : d, onMouseUp: F ? C : void 0, onMouseLeave: F ? R : l, ref: m, style: ud },
|
|
6796
6796
|
f,
|
|
6797
6797
|
Q.createElement(h2, null)
|
|
6798
6798
|
);
|
|
@@ -6940,7 +6940,7 @@ function Yb({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
|
|
|
6940
6940
|
return ce(() => {
|
|
6941
6941
|
if (e?.current) {
|
|
6942
6942
|
const N = Re(e.current), A = ({ x: T, y: S }) => {
|
|
6943
|
-
const { nodeInternals: C, onNodeDrag:
|
|
6943
|
+
const { nodeInternals: C, onNodeDrag: R, onSelectionDrag: F, updateNodePositions: I, nodeExtent: w, snapGrid: M, snapToGrid: D, nodeOrigin: q, onError: $ } = o.getState();
|
|
6944
6944
|
f.current = { x: T, y: S };
|
|
6945
6945
|
let O = !1, B = { x: 0, y: 0, x2: 0, y2: 0 };
|
|
6946
6946
|
if (l.current.length > 1 && w) {
|
|
@@ -6949,7 +6949,7 @@ function Yb({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
|
|
|
6949
6949
|
}
|
|
6950
6950
|
if (l.current = l.current.map((Y) => {
|
|
6951
6951
|
const U = { x: T - Y.distance.x, y: S - Y.distance.y };
|
|
6952
|
-
D && (U.x =
|
|
6952
|
+
D && (U.x = M[0] * Math.round(U.x / M[0]), U.y = M[1] * Math.round(U.y / M[1]));
|
|
6953
6953
|
const L = [
|
|
6954
6954
|
[w[0][0], w[0][1]],
|
|
6955
6955
|
[w[1][0], w[1][1]]
|
|
@@ -6960,7 +6960,7 @@ function Yb({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
|
|
|
6960
6960
|
}), !O)
|
|
6961
6961
|
return;
|
|
6962
6962
|
I(l.current, !0, !0), d(!0);
|
|
6963
|
-
const j = s ?
|
|
6963
|
+
const j = s ? R : es(F);
|
|
6964
6964
|
if (j && y.current) {
|
|
6965
6965
|
const [Y, U] = Jn({
|
|
6966
6966
|
nodeId: s,
|
|
@@ -6974,41 +6974,41 @@ function Yb({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
|
|
|
6974
6974
|
return;
|
|
6975
6975
|
const [T, S] = fb(g.current, h.current);
|
|
6976
6976
|
if (T !== 0 || S !== 0) {
|
|
6977
|
-
const { transform: C, panBy:
|
|
6978
|
-
f.current.x = (f.current.x ?? 0) - T / C[2], f.current.y = (f.current.y ?? 0) - S / C[2],
|
|
6977
|
+
const { transform: C, panBy: R } = o.getState();
|
|
6978
|
+
f.current.x = (f.current.x ?? 0) - T / C[2], f.current.y = (f.current.y ?? 0) - S / C[2], R({ x: T, y: S }) && A(f.current);
|
|
6979
6979
|
}
|
|
6980
6980
|
m.current = requestAnimationFrame(x);
|
|
6981
6981
|
}, k = (T) => {
|
|
6982
|
-
const { nodeInternals: S, multiSelectionActive: C, nodesDraggable:
|
|
6982
|
+
const { nodeInternals: S, multiSelectionActive: C, nodesDraggable: R, unselectNodesAndEdges: F, onNodeDragStart: I, onSelectionDragStart: w } = o.getState();
|
|
6983
6983
|
b.current = !0;
|
|
6984
|
-
const
|
|
6984
|
+
const M = s ? I : es(w);
|
|
6985
6985
|
(!i || !a) && !C && s && (S.get(s)?.selected || F()), s && a && i && Hc({
|
|
6986
6986
|
id: s,
|
|
6987
6987
|
store: o,
|
|
6988
6988
|
nodeRef: e
|
|
6989
6989
|
});
|
|
6990
6990
|
const D = _(T);
|
|
6991
|
-
if (f.current = D, l.current = y2(S,
|
|
6991
|
+
if (f.current = D, l.current = y2(S, R, D, s), M && l.current) {
|
|
6992
6992
|
const [q, $] = Jn({
|
|
6993
6993
|
nodeId: s,
|
|
6994
6994
|
dragItems: l.current,
|
|
6995
6995
|
nodeInternals: S
|
|
6996
6996
|
});
|
|
6997
|
-
|
|
6997
|
+
M(T.sourceEvent, q, $);
|
|
6998
6998
|
}
|
|
6999
6999
|
};
|
|
7000
7000
|
if (t)
|
|
7001
7001
|
N.on(".drag", null);
|
|
7002
7002
|
else {
|
|
7003
7003
|
const T = bN().on("start", (S) => {
|
|
7004
|
-
const { domNode: C, nodeDragThreshold:
|
|
7005
|
-
|
|
7004
|
+
const { domNode: C, nodeDragThreshold: R } = o.getState();
|
|
7005
|
+
R === 0 && k(S), v.current = !1;
|
|
7006
7006
|
const F = _(S);
|
|
7007
7007
|
f.current = F, h.current = C?.getBoundingClientRect() || null, g.current = vt(S.sourceEvent, h.current);
|
|
7008
7008
|
}).on("drag", (S) => {
|
|
7009
|
-
const C = _(S), { autoPanOnNodeDrag:
|
|
7009
|
+
const C = _(S), { autoPanOnNodeDrag: R, nodeDragThreshold: F } = o.getState();
|
|
7010
7010
|
if (S.sourceEvent.type === "touchmove" && S.sourceEvent.touches.length > 1 && (v.current = !0), !v.current) {
|
|
7011
|
-
if (!p.current && b.current &&
|
|
7011
|
+
if (!p.current && b.current && R && (p.current = !0, x()), !b.current) {
|
|
7012
7012
|
const I = C.xSnapped - (f?.current?.x ?? 0), w = C.ySnapped - (f?.current?.y ?? 0);
|
|
7013
7013
|
Math.sqrt(I * I + w * w) > F && k(S);
|
|
7014
7014
|
}
|
|
@@ -7016,14 +7016,14 @@ function Yb({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
|
|
|
7016
7016
|
}
|
|
7017
7017
|
}).on("end", (S) => {
|
|
7018
7018
|
if (!(!b.current || v.current) && (d(!1), p.current = !1, b.current = !1, cancelAnimationFrame(m.current), l.current)) {
|
|
7019
|
-
const { updateNodePositions: C, nodeInternals:
|
|
7019
|
+
const { updateNodePositions: C, nodeInternals: R, onNodeDragStop: F, onSelectionDragStop: I } = o.getState(), w = s ? F : es(I);
|
|
7020
7020
|
if (C(l.current, !1, !1), w) {
|
|
7021
|
-
const [
|
|
7021
|
+
const [M, D] = Jn({
|
|
7022
7022
|
nodeId: s,
|
|
7023
7023
|
dragItems: l.current,
|
|
7024
|
-
nodeInternals:
|
|
7024
|
+
nodeInternals: R
|
|
7025
7025
|
});
|
|
7026
|
-
w(S.sourceEvent,
|
|
7026
|
+
w(S.sourceEvent, M, D);
|
|
7027
7027
|
}
|
|
7028
7028
|
}
|
|
7029
7029
|
}).filter((S) => {
|
|
@@ -7069,7 +7069,7 @@ const jt = {
|
|
|
7069
7069
|
ArrowRight: { x: 1, y: 0 }
|
|
7070
7070
|
};
|
|
7071
7071
|
var cr = (e) => {
|
|
7072
|
-
const t = ({ id: r, type: n, data: s, xPos: a, yPos: i, xPosOrigin: o, yPosOrigin: c, selected: d, onClick: l, onMouseEnter: f, onMouseMove: m, onMouseLeave: h, onContextMenu: g, onDoubleClick: y, style: p, className: b, isDraggable: v, isSelectable: _, isConnectable: N, isFocusable: A, selectNodesOnDrag: x, sourcePosition: k, targetPosition: T, hidden: S, resizeObserver: C, dragHandle:
|
|
7072
|
+
const t = ({ id: r, type: n, data: s, xPos: a, yPos: i, xPosOrigin: o, yPosOrigin: c, selected: d, onClick: l, onMouseEnter: f, onMouseMove: m, onMouseLeave: h, onContextMenu: g, onDoubleClick: y, style: p, className: b, isDraggable: v, isSelectable: _, isConnectable: N, isFocusable: A, selectNodesOnDrag: x, sourcePosition: k, targetPosition: T, hidden: S, resizeObserver: C, dragHandle: R, zIndex: F, isParent: I, noDragClassName: w, noPanClassName: M, initialized: D, disableKeyboardA11y: q, ariaLabel: $, rfId: O, hasHandleBounds: B }) => {
|
|
7073
7073
|
const j = Ie(), Y = ue(null), U = ue(null), L = ue(k), H = ue(T), P = ue(n), G = _ || v || l || f || m || h, z = Kb(), W = lr(r, j.getState, f), V = lr(r, j.getState, m), te = lr(r, j.getState, h), re = lr(r, j.getState, g), me = lr(r, j.getState, y), pe = (ee) => {
|
|
7074
7074
|
const { nodeDragThreshold: ie } = j.getState();
|
|
7075
7075
|
if (_ && (!x || !v || ie > 0) && Hc({
|
|
@@ -7113,7 +7113,7 @@ var cr = (e) => {
|
|
|
7113
7113
|
nodeRef: Y,
|
|
7114
7114
|
disabled: S || !v,
|
|
7115
7115
|
noDragClassName: w,
|
|
7116
|
-
handleSelector:
|
|
7116
|
+
handleSelector: R,
|
|
7117
7117
|
nodeId: r,
|
|
7118
7118
|
isSelectable: _,
|
|
7119
7119
|
selectNodesOnDrag: x
|
|
@@ -7125,7 +7125,7 @@ var cr = (e) => {
|
|
|
7125
7125
|
`react-flow__node-${n}`,
|
|
7126
7126
|
{
|
|
7127
7127
|
// this is overwritable by passing `nopan` as a class name
|
|
7128
|
-
[
|
|
7128
|
+
[M]: v
|
|
7129
7129
|
},
|
|
7130
7130
|
b,
|
|
7131
7131
|
{
|
|
@@ -7144,7 +7144,7 @@ var cr = (e) => {
|
|
|
7144
7144
|
Q.createElement(
|
|
7145
7145
|
IS,
|
|
7146
7146
|
{ value: r },
|
|
7147
|
-
Q.createElement(e, { id: r, data: s, type: n, xPos: a, yPos: i, selected: d, isConnectable: N, sourcePosition: k, targetPosition: T, dragging: ae, dragHandle:
|
|
7147
|
+
Q.createElement(e, { id: r, data: s, type: n, xPos: a, yPos: i, selected: d, isConnectable: N, sourcePosition: k, targetPosition: T, dragging: ae, dragHandle: R, zIndex: F })
|
|
7148
7148
|
)
|
|
7149
7149
|
);
|
|
7150
7150
|
};
|
|
@@ -7192,11 +7192,11 @@ function w2({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y:
|
|
|
7192
7192
|
);
|
|
7193
7193
|
}
|
|
7194
7194
|
var N2 = Te(w2);
|
|
7195
|
-
const _2 = (e) => e.nodesSelectionActive, Qb = ({ children: e, onPaneClick: t, onPaneMouseEnter: r, onPaneMouseMove: n, onPaneMouseLeave: s, onPaneContextMenu: a, onPaneScroll: i, deleteKeyCode: o, onMove: c, onMoveStart: d, onMoveEnd: l, selectionKeyCode: f, selectionOnDrag: m, selectionMode: h, onSelectionStart: g, onSelectionEnd: y, multiSelectionKeyCode: p, panActivationKeyCode: b, zoomActivationKeyCode: v, elementsSelectable: _, zoomOnScroll: N, zoomOnPinch: A, panOnScroll: x, panOnScrollSpeed: k, panOnScrollMode: T, zoomOnDoubleClick: S, panOnDrag: C, defaultViewport:
|
|
7195
|
+
const _2 = (e) => e.nodesSelectionActive, Qb = ({ children: e, onPaneClick: t, onPaneMouseEnter: r, onPaneMouseMove: n, onPaneMouseLeave: s, onPaneContextMenu: a, onPaneScroll: i, deleteKeyCode: o, onMove: c, onMoveStart: d, onMoveEnd: l, selectionKeyCode: f, selectionOnDrag: m, selectionMode: h, onSelectionStart: g, onSelectionEnd: y, multiSelectionKeyCode: p, panActivationKeyCode: b, zoomActivationKeyCode: v, elementsSelectable: _, zoomOnScroll: N, zoomOnPinch: A, panOnScroll: x, panOnScrollSpeed: k, panOnScrollMode: T, zoomOnDoubleClick: S, panOnDrag: C, defaultViewport: R, translateExtent: F, minZoom: I, maxZoom: w, preventScrolling: M, onSelectionContextMenu: D, noWheelClassName: q, noPanClassName: $, disableKeyboardA11y: O }) => {
|
|
7196
7196
|
const B = Ce(_2), j = _r(f), Y = _r(b), U = Y || C, L = Y || x, H = j || m && U !== !0;
|
|
7197
7197
|
return l2({ deleteKeyCode: o, multiSelectionKeyCode: p }), Q.createElement(
|
|
7198
7198
|
f2,
|
|
7199
|
-
{ onMove: c, onMoveStart: d, onMoveEnd: l, onPaneContextMenu: a, elementsSelectable: _, zoomOnScroll: N, zoomOnPinch: A, panOnScroll: L, panOnScrollSpeed: k, panOnScrollMode: T, zoomOnDoubleClick: S, panOnDrag: !j && U, defaultViewport:
|
|
7199
|
+
{ onMove: c, onMoveStart: d, onMoveEnd: l, onPaneContextMenu: a, elementsSelectable: _, zoomOnScroll: N, zoomOnPinch: A, panOnScroll: L, panOnScrollSpeed: k, panOnScrollMode: T, zoomOnDoubleClick: S, panOnDrag: !j && U, defaultViewport: R, translateExtent: F, minZoom: I, maxZoom: w, zoomActivationKeyCode: v, preventScrolling: M, noWheelClassName: q, noPanClassName: $ },
|
|
7200
7200
|
Q.createElement(
|
|
7201
7201
|
Gb,
|
|
7202
7202
|
{ onSelectionStart: g, onSelectionEnd: y, onPaneClick: t, onPaneMouseEnter: r, onPaneMouseMove: n, onPaneMouseLeave: s, onPaneContextMenu: a, onPaneScroll: i, panOnDrag: U, isSelecting: !!H, selectionMode: h },
|
|
@@ -7265,17 +7265,17 @@ Xb.displayName = "NodeRenderer";
|
|
|
7265
7265
|
var A2 = Te(Xb);
|
|
7266
7266
|
const R2 = (e, t, r) => r === le.Left ? e - t : r === le.Right ? e + t : e, M2 = (e, t, r) => r === le.Top ? e - t : r === le.Bottom ? e + t : e, Iu = "react-flow__edgeupdater", Ou = ({ position: e, centerX: t, centerY: r, radius: n = 10, onMouseDown: s, onMouseEnter: a, onMouseOut: i, type: o }) => Q.createElement("circle", { onMouseDown: s, onMouseEnter: a, onMouseOut: i, className: Le([Iu, `${Iu}-${o}`]), cx: R2(t, n, e), cy: M2(r, n, e), r: n, stroke: "transparent", fill: "transparent" }), D2 = () => !0;
|
|
7267
7267
|
var Pt = (e) => {
|
|
7268
|
-
const t = ({ id: r, className: n, type: s, data: a, onClick: i, onEdgeDoubleClick: o, selected: c, animated: d, label: l, labelStyle: f, labelShowBg: m, labelBgStyle: h, labelBgPadding: g, labelBgBorderRadius: y, style: p, source: b, target: v, sourceX: _, sourceY: N, targetX: A, targetY: x, sourcePosition: k, targetPosition: T, elementsSelectable: S, hidden: C, sourceHandleId:
|
|
7268
|
+
const t = ({ id: r, className: n, type: s, data: a, onClick: i, onEdgeDoubleClick: o, selected: c, animated: d, label: l, labelStyle: f, labelShowBg: m, labelBgStyle: h, labelBgPadding: g, labelBgBorderRadius: y, style: p, source: b, target: v, sourceX: _, sourceY: N, targetX: A, targetY: x, sourcePosition: k, targetPosition: T, elementsSelectable: S, hidden: C, sourceHandleId: R, targetHandleId: F, onContextMenu: I, onMouseEnter: w, onMouseMove: M, onMouseLeave: D, reconnectRadius: q, onReconnect: $, onReconnectStart: O, onReconnectEnd: B, markerEnd: j, markerStart: Y, rfId: U, ariaLabel: L, isFocusable: H, isReconnectable: P, pathOptions: G, interactionWidth: z, disableKeyboardA11y: W }) => {
|
|
7269
7269
|
const V = ue(null), [te, re] = Z(!1), [me, pe] = Z(!1), se = Ie(), ae = ke(() => `url('#${Vc(Y, U)}')`, [Y, U]), ee = ke(() => `url('#${Vc(j, U)}')`, [j, U]);
|
|
7270
7270
|
if (C)
|
|
7271
7271
|
return null;
|
|
7272
7272
|
const ie = (ve) => {
|
|
7273
7273
|
const { edges: Se, addSelectedEdges: ge, unselectNodesAndEdges: ye, multiSelectionActive: Fe } = se.getState(), $e = Se.find((Nt) => Nt.id === r);
|
|
7274
7274
|
$e && (S && (se.setState({ nodesSelectionActive: !1 }), $e.selected && Fe ? (ye({ nodes: [], edges: [$e] }), V.current?.blur()) : ge([r])), i && i(ve, $e));
|
|
7275
|
-
}, _e = or(r, se.getState, o), he = or(r, se.getState, I), Oe = or(r, se.getState, w), Ne = or(r, se.getState,
|
|
7275
|
+
}, _e = or(r, se.getState, o), he = or(r, se.getState, I), Oe = or(r, se.getState, w), Ne = or(r, se.getState, M), ne = or(r, se.getState, D), fe = (ve, Se) => {
|
|
7276
7276
|
if (ve.button !== 0)
|
|
7277
7277
|
return;
|
|
7278
|
-
const { edges: ge, isValidConnection: ye } = se.getState(), Fe = Se ? v : b, $e = (Se ? F :
|
|
7278
|
+
const { edges: ge, isValidConnection: ye } = se.getState(), Fe = Se ? v : b, $e = (Se ? F : R) || null, Nt = Se ? "target" : "source", Pn = ye || D2, Ln = Se, sr = ge.find((_t) => _t.id === r);
|
|
7279
7279
|
pe(!0), O?.(ve, sr, Nt);
|
|
7280
7280
|
const $n = (_t) => {
|
|
7281
7281
|
pe(!1), B?.(_t, sr, Nt);
|
|
@@ -7306,7 +7306,7 @@ var Pt = (e) => {
|
|
|
7306
7306
|
n,
|
|
7307
7307
|
{ selected: c, animated: d, inactive: X, updating: te }
|
|
7308
7308
|
]), onClick: ie, onDoubleClick: _e, onContextMenu: he, onMouseEnter: Oe, onMouseMove: Ne, onMouseLeave: ne, onKeyDown: H ? we : void 0, tabIndex: H ? 0 : void 0, role: H ? "button" : "img", "data-testid": `rf__edge-${r}`, "aria-label": L === null ? void 0 : L || `Edge from ${b} to ${v}`, "aria-describedby": H ? `${$b}-${U}` : void 0, ref: V },
|
|
7309
|
-
!me && Q.createElement(e, { id: r, source: b, target: v, selected: c, animated: d, label: l, labelStyle: f, labelShowBg: m, labelBgStyle: h, labelBgPadding: g, labelBgBorderRadius: y, data: a, style: p, sourceX: _, sourceY: N, targetX: A, targetY: x, sourcePosition: k, targetPosition: T, sourceHandleId:
|
|
7309
|
+
!me && Q.createElement(e, { id: r, source: b, target: v, selected: c, animated: d, label: l, labelStyle: f, labelShowBg: m, labelBgStyle: h, labelBgPadding: g, labelBgBorderRadius: y, data: a, style: p, sourceX: _, sourceY: N, targetX: A, targetY: x, sourcePosition: k, targetPosition: T, sourceHandleId: R, targetHandleId: F, markerStart: ae, markerEnd: ee, pathOptions: G, interactionWidth: z }),
|
|
7310
7310
|
P && Q.createElement(
|
|
7311
7311
|
Q.Fragment,
|
|
7312
7312
|
null,
|
|
@@ -7489,12 +7489,12 @@ const G2 = (e) => ({
|
|
|
7489
7489
|
return A ? Q.createElement(
|
|
7490
7490
|
Q.Fragment,
|
|
7491
7491
|
null,
|
|
7492
|
-
C.map(({ level:
|
|
7492
|
+
C.map(({ level: R, edges: F, isMaxLevel: I }) => Q.createElement(
|
|
7493
7493
|
"svg",
|
|
7494
|
-
{ key:
|
|
7494
|
+
{ key: R, style: { zIndex: R }, width: A, height: x, className: "react-flow__edges react-flow__container" },
|
|
7495
7495
|
I && Q.createElement(j2, { defaultColor: e, rfId: n }),
|
|
7496
7496
|
Q.createElement("g", null, F.map((w) => {
|
|
7497
|
-
const [
|
|
7497
|
+
const [M, D, q] = Lu(T.get(w.source)), [$, O, B] = Lu(T.get(w.target));
|
|
7498
7498
|
if (!q || !B)
|
|
7499
7499
|
return null;
|
|
7500
7500
|
let j = w.type || "default";
|
|
@@ -7502,7 +7502,7 @@ const G2 = (e) => ({
|
|
|
7502
7502
|
const Y = s[j] || s.default, U = k === xt.Strict ? O.target : (O.target ?? []).concat(O.source ?? []), L = Pu(D.source, w.sourceHandle), H = Pu(U, w.targetHandle), P = L?.position || le.Bottom, G = H?.position || le.Top, z = !!(w.focusable || v && typeof w.focusable > "u"), W = w.reconnectable || w.updatable, V = typeof m < "u" && (W || _ && typeof W > "u");
|
|
7503
7503
|
if (!L || !H)
|
|
7504
7504
|
return S?.("008", Qe.error008(L, w)), null;
|
|
7505
|
-
const { sourceX: te, sourceY: re, targetX: me, targetY: pe } = I2(
|
|
7505
|
+
const { sourceX: te, sourceY: re, targetX: me, targetY: pe } = I2(M, L, P, $, H, G);
|
|
7506
7506
|
return Q.createElement(Y, { key: w.id, id: w.id, className: Le([w.className, a]), type: j, data: w.data, selected: !!w.selected, animated: !!w.animated, hidden: !!w.hidden, label: w.label, labelStyle: w.labelStyle, labelShowBg: w.labelShowBg, labelBgStyle: w.labelBgStyle, labelBgPadding: w.labelBgPadding, labelBgBorderRadius: w.labelBgBorderRadius, style: w.style, source: w.source, target: w.target, sourceHandleId: w.sourceHandle, targetHandleId: w.targetHandle, markerEnd: w.markerEnd, markerStart: w.markerStart, sourceX: te, sourceY: re, targetX: me, targetY: pe, sourcePosition: P, targetPosition: G, elementsSelectable: N, onContextMenu: i, onMouseEnter: o, onMouseMove: c, onMouseLeave: d, onClick: l, onEdgeDoubleClick: f, onReconnect: m, onReconnectStart: h, onReconnectEnd: g, reconnectRadius: y, rfId: n, ariaLabel: w.ariaLabel, isFocusable: z, isReconnectable: V, pathOptions: "pathOptions" in w ? w.pathOptions : void 0, interactionWidth: w.interactionWidth, disableKeyboardA11y: b });
|
|
7507
7507
|
}))
|
|
7508
7508
|
)),
|
|
@@ -7588,11 +7588,11 @@ function Vu(e, t) {
|
|
|
7588
7588
|
return t(e);
|
|
7589
7589
|
}, [e]);
|
|
7590
7590
|
}
|
|
7591
|
-
const tv = ({ nodeTypes: e, edgeTypes: t, onMove: r, onMoveStart: n, onMoveEnd: s, onInit: a, onNodeClick: i, onEdgeClick: o, onNodeDoubleClick: c, onEdgeDoubleClick: d, onNodeMouseEnter: l, onNodeMouseMove: f, onNodeMouseLeave: m, onNodeContextMenu: h, onSelectionContextMenu: g, onSelectionStart: y, onSelectionEnd: p, connectionLineType: b, connectionLineStyle: v, connectionLineComponent: _, connectionLineContainerStyle: N, selectionKeyCode: A, selectionOnDrag: x, selectionMode: k, multiSelectionKeyCode: T, panActivationKeyCode: S, zoomActivationKeyCode: C, deleteKeyCode:
|
|
7591
|
+
const tv = ({ nodeTypes: e, edgeTypes: t, onMove: r, onMoveStart: n, onMoveEnd: s, onInit: a, onNodeClick: i, onEdgeClick: o, onNodeDoubleClick: c, onEdgeDoubleClick: d, onNodeMouseEnter: l, onNodeMouseMove: f, onNodeMouseLeave: m, onNodeContextMenu: h, onSelectionContextMenu: g, onSelectionStart: y, onSelectionEnd: p, connectionLineType: b, connectionLineStyle: v, connectionLineComponent: _, connectionLineContainerStyle: N, selectionKeyCode: A, selectionOnDrag: x, selectionMode: k, multiSelectionKeyCode: T, panActivationKeyCode: S, zoomActivationKeyCode: C, deleteKeyCode: R, onlyRenderVisibleElements: F, elementsSelectable: I, selectNodesOnDrag: w, defaultViewport: M, translateExtent: D, minZoom: q, maxZoom: $, preventScrolling: O, defaultMarkerColor: B, zoomOnScroll: j, zoomOnPinch: Y, panOnScroll: U, panOnScrollSpeed: L, panOnScrollMode: H, zoomOnDoubleClick: P, panOnDrag: G, onPaneClick: z, onPaneMouseEnter: W, onPaneMouseMove: V, onPaneMouseLeave: te, onPaneScroll: re, onPaneContextMenu: me, onEdgeContextMenu: pe, onEdgeMouseEnter: se, onEdgeMouseMove: ae, onEdgeMouseLeave: ee, onReconnect: ie, onReconnectStart: _e, onReconnectEnd: he, reconnectRadius: Oe, noDragClassName: Ne, noWheelClassName: ne, noPanClassName: fe, elevateEdgesOnSelect: be, disableKeyboardA11y: K, nodeOrigin: oe, nodeExtent: de, rfId: X }) => {
|
|
7592
7592
|
const we = Vu(e, C2), ve = Vu(t, q2);
|
|
7593
7593
|
return K2(a), Q.createElement(
|
|
7594
7594
|
S2,
|
|
7595
|
-
{ onPaneClick: z, onPaneMouseEnter: W, onPaneMouseMove: V, onPaneMouseLeave: te, onPaneContextMenu: me, onPaneScroll: re, deleteKeyCode:
|
|
7595
|
+
{ onPaneClick: z, onPaneMouseEnter: W, onPaneMouseMove: V, onPaneMouseLeave: te, onPaneContextMenu: me, onPaneScroll: re, deleteKeyCode: R, selectionKeyCode: A, selectionOnDrag: x, selectionMode: k, onSelectionStart: y, onSelectionEnd: p, multiSelectionKeyCode: T, panActivationKeyCode: S, zoomActivationKeyCode: C, elementsSelectable: I, onMove: r, onMoveStart: n, onMoveEnd: s, zoomOnScroll: j, zoomOnPinch: Y, zoomOnDoubleClick: P, panOnScroll: U, panOnScrollSpeed: L, panOnScrollMode: H, panOnDrag: G, defaultViewport: M, translateExtent: D, minZoom: q, maxZoom: $, onSelectionContextMenu: g, preventScrolling: O, noDragClassName: Ne, noWheelClassName: ne, noPanClassName: fe, disableKeyboardA11y: K },
|
|
7596
7596
|
Q.createElement(
|
|
7597
7597
|
Y2,
|
|
7598
7598
|
null,
|
|
@@ -7700,7 +7700,7 @@ const jc = [
|
|
|
7700
7700
|
});
|
|
7701
7701
|
else if (b) {
|
|
7702
7702
|
const v = rd(p.nodeElement);
|
|
7703
|
-
|
|
7703
|
+
v.width && v.height && (b.width !== v.width || b.height !== v.height || p.forceUpdate) && (s.set(b.id, {
|
|
7704
7704
|
...b,
|
|
7705
7705
|
[Me]: {
|
|
7706
7706
|
...b[Me],
|
|
@@ -7844,7 +7844,7 @@ const tE = {
|
|
|
7844
7844
|
overflow: "hidden",
|
|
7845
7845
|
position: "relative",
|
|
7846
7846
|
zIndex: 0
|
|
7847
|
-
}, sv = un(({ nodes: e, edges: t, defaultNodes: r, defaultEdges: n, className: s, nodeTypes: a = tE, edgeTypes: i = rE, onNodeClick: o, onEdgeClick: c, onInit: d, onMove: l, onMoveStart: f, onMoveEnd: m, onConnect: h, onConnectStart: g, onConnectEnd: y, onClickConnectStart: p, onClickConnectEnd: b, onNodeMouseEnter: v, onNodeMouseMove: _, onNodeMouseLeave: N, onNodeContextMenu: A, onNodeDoubleClick: x, onNodeDragStart: k, onNodeDrag: T, onNodeDragStop: S, onNodesDelete: C, onEdgesDelete:
|
|
7847
|
+
}, sv = un(({ nodes: e, edges: t, defaultNodes: r, defaultEdges: n, className: s, nodeTypes: a = tE, edgeTypes: i = rE, onNodeClick: o, onEdgeClick: c, onInit: d, onMove: l, onMoveStart: f, onMoveEnd: m, onConnect: h, onConnectStart: g, onConnectEnd: y, onClickConnectStart: p, onClickConnectEnd: b, onNodeMouseEnter: v, onNodeMouseMove: _, onNodeMouseLeave: N, onNodeContextMenu: A, onNodeDoubleClick: x, onNodeDragStart: k, onNodeDrag: T, onNodeDragStop: S, onNodesDelete: C, onEdgesDelete: R, onSelectionChange: F, onSelectionDragStart: I, onSelectionDrag: w, onSelectionDragStop: M, onSelectionContextMenu: D, onSelectionStart: q, onSelectionEnd: $, connectionMode: O = xt.Strict, connectionLineType: B = ht.Bezier, connectionLineStyle: j, connectionLineComponent: Y, connectionLineContainerStyle: U, deleteKeyCode: L = "Backspace", selectionKeyCode: H = "Shift", selectionOnDrag: P = !1, selectionMode: G = Nr.Full, panActivationKeyCode: z = "Space", multiSelectionKeyCode: W = on() ? "Meta" : "Control", zoomActivationKeyCode: V = on() ? "Meta" : "Control", snapToGrid: te = !1, snapGrid: re = sE, onlyRenderVisibleElements: me = !1, selectNodesOnDrag: pe = !0, nodesDraggable: se, nodesConnectable: ae, nodesFocusable: ee, nodeOrigin: ie = nE, edgesFocusable: _e, edgesUpdatable: he, elementsSelectable: Oe, defaultViewport: Ne = aE, minZoom: ne = 0.5, maxZoom: fe = 2, translateExtent: be = jc, preventScrolling: K = !0, nodeExtent: oe, defaultMarkerColor: de = "#b1b1b7", zoomOnScroll: X = !0, zoomOnPinch: we = !0, panOnScroll: ve = !1, panOnScrollSpeed: Se = 0.5, panOnScrollMode: ge = Ct.Free, zoomOnDoubleClick: ye = !0, panOnDrag: Fe = !0, onPaneClick: $e, onPaneMouseEnter: Nt, onPaneMouseMove: Pn, onPaneMouseLeave: Ln, onPaneScroll: sr, onPaneContextMenu: $n, children: Id, onEdgeContextMenu: _t, onEdgeDoubleClick: gx, onEdgeMouseEnter: yx, onEdgeMouseMove: bx, onEdgeMouseLeave: vx, onEdgeUpdate: xx, onEdgeUpdateStart: wx, onEdgeUpdateEnd: Nx, onReconnect: _x, onReconnectStart: Sx, onReconnectEnd: Ex, reconnectRadius: Cx = 10, edgeUpdaterRadius: kx = 10, onNodesChange: Tx, onEdgesChange: Ax, noDragClassName: Rx = "nodrag", noWheelClassName: Mx = "nowheel", noPanClassName: Od = "nopan", fitView: Dx = !1, fitViewOptions: qx, connectOnClick: Ix = !0, attributionPosition: Ox, proOptions: Fx, defaultEdgeOptions: Px, elevateNodesOnSelect: Lx = !0, elevateEdgesOnSelect: $x = !1, disableKeyboardA11y: Fd = !1, autoPanOnConnect: Vx = !0, autoPanOnNodeDrag: zx = !0, connectionRadius: Bx = 20, isValidConnection: Hx, onError: jx, style: Gx, id: Pd, nodeDragThreshold: Ux, ...Wx }, Yx) => {
|
|
7848
7848
|
const Vn = Pd || "1";
|
|
7849
7849
|
return Q.createElement(
|
|
7850
7850
|
"div",
|
|
@@ -7853,7 +7853,7 @@ const tE = {
|
|
|
7853
7853
|
nv,
|
|
7854
7854
|
null,
|
|
7855
7855
|
Q.createElement(J2, { onInit: d, onMove: l, onMoveStart: f, onMoveEnd: m, onNodeClick: o, onEdgeClick: c, onNodeMouseEnter: v, onNodeMouseMove: _, onNodeMouseLeave: N, onNodeContextMenu: A, onNodeDoubleClick: x, nodeTypes: a, edgeTypes: i, connectionLineType: B, connectionLineStyle: j, connectionLineComponent: Y, connectionLineContainerStyle: U, selectionKeyCode: H, selectionOnDrag: P, selectionMode: G, deleteKeyCode: L, multiSelectionKeyCode: W, panActivationKeyCode: z, zoomActivationKeyCode: V, onlyRenderVisibleElements: me, selectNodesOnDrag: pe, defaultViewport: Ne, translateExtent: be, minZoom: ne, maxZoom: fe, preventScrolling: K, zoomOnScroll: X, zoomOnPinch: we, zoomOnDoubleClick: ye, panOnScroll: ve, panOnScrollSpeed: Se, panOnScrollMode: ge, panOnDrag: Fe, onPaneClick: $e, onPaneMouseEnter: Nt, onPaneMouseMove: Pn, onPaneMouseLeave: Ln, onPaneScroll: sr, onPaneContextMenu: $n, onSelectionContextMenu: D, onSelectionStart: q, onSelectionEnd: $, onEdgeContextMenu: _t, onEdgeDoubleClick: gx, onEdgeMouseEnter: yx, onEdgeMouseMove: bx, onEdgeMouseLeave: vx, onReconnect: _x ?? xx, onReconnectStart: Sx ?? wx, onReconnectEnd: Ex ?? Nx, reconnectRadius: Cx ?? kx, defaultMarkerColor: de, noDragClassName: Rx, noWheelClassName: Mx, noPanClassName: Od, elevateEdgesOnSelect: $x, rfId: Vn, disableKeyboardA11y: Fd, nodeOrigin: ie, nodeExtent: oe }),
|
|
7856
|
-
Q.createElement(QS, { nodes: e, edges: t, defaultNodes: r, defaultEdges: n, onConnect: h, onConnectStart: g, onConnectEnd: y, onClickConnectStart: p, onClickConnectEnd: b, nodesDraggable: se, nodesConnectable: ae, nodesFocusable: ee, edgesFocusable: _e, edgesUpdatable: he, elementsSelectable: Oe, elevateNodesOnSelect: Lx, minZoom: ne, maxZoom: fe, nodeExtent: oe, onNodesChange: Tx, onEdgesChange: Ax, snapToGrid: te, snapGrid: re, connectionMode: O, translateExtent: be, connectOnClick: Ix, defaultEdgeOptions: Px, fitView: Dx, fitViewOptions: qx, onNodesDelete: C, onEdgesDelete:
|
|
7856
|
+
Q.createElement(QS, { nodes: e, edges: t, defaultNodes: r, defaultEdges: n, onConnect: h, onConnectStart: g, onConnectEnd: y, onClickConnectStart: p, onClickConnectEnd: b, nodesDraggable: se, nodesConnectable: ae, nodesFocusable: ee, edgesFocusable: _e, edgesUpdatable: he, elementsSelectable: Oe, elevateNodesOnSelect: Lx, minZoom: ne, maxZoom: fe, nodeExtent: oe, onNodesChange: Tx, onEdgesChange: Ax, snapToGrid: te, snapGrid: re, connectionMode: O, translateExtent: be, connectOnClick: Ix, defaultEdgeOptions: Px, fitView: Dx, fitViewOptions: qx, onNodesDelete: C, onEdgesDelete: R, onNodeDragStart: k, onNodeDrag: T, onNodeDragStop: S, onSelectionDrag: w, onSelectionDragStart: I, onSelectionDragStop: M, noPanClassName: Od, nodeOrigin: ie, rfId: Vn, autoPanOnConnect: Vx, autoPanOnNodeDrag: zx, onError: jx, connectionRadius: Bx, isValidConnection: Hx, nodeDragThreshold: Ux }),
|
|
7857
7857
|
Q.createElement(YS, { onSelectionChange: F }),
|
|
7858
7858
|
Id,
|
|
7859
7859
|
Q.createElement(SS, { proOptions: Fx, position: Ox }),
|
|
@@ -7935,7 +7935,7 @@ function ov({
|
|
|
7935
7935
|
zoomStep: v = 10,
|
|
7936
7936
|
offsetScale: _ = 5
|
|
7937
7937
|
}) {
|
|
7938
|
-
const N = Ie(), A = ue(null), { boundingRect: x, viewBB: k, rfId: T } = Ce(bE, qe), S = e?.width ?? gE, C = e?.height ?? yE,
|
|
7938
|
+
const N = Ie(), A = ue(null), { boundingRect: x, viewBB: k, rfId: T } = Ce(bE, qe), S = e?.width ?? gE, C = e?.height ?? yE, R = x.width / S, F = x.height / C, I = Math.max(R, F), w = I * S, M = I * C, D = _ * I, q = x.x - (w - x.width) / 2 - D, $ = x.y - (M - x.height) / 2 - D, O = w + D * 2, B = M + D * 2, j = `${vE}-${T}`, Y = ue(0);
|
|
7939
7939
|
Y.current = I, ce(() => {
|
|
7940
7940
|
if (A.current) {
|
|
7941
7941
|
const H = Re(A.current), P = (W) => {
|
|
@@ -9044,10 +9044,10 @@ var aa, Uf;
|
|
|
9044
9044
|
function mC() {
|
|
9045
9045
|
if (Uf) return aa;
|
|
9046
9046
|
Uf = 1;
|
|
9047
|
-
var e = /* @__PURE__ */ At(), t = /* @__PURE__ */ gd(), r = /* @__PURE__ */ nt(), n = "[object Arguments]", s = "[object Array]", a = "[object Boolean]", i = "[object Date]", o = "[object Error]", c = "[object Function]", d = "[object Map]", l = "[object Number]", f = "[object Object]", m = "[object RegExp]", h = "[object Set]", g = "[object String]", y = "[object WeakMap]", p = "[object ArrayBuffer]", b = "[object DataView]", v = "[object Float32Array]", _ = "[object Float64Array]", N = "[object Int8Array]", A = "[object Int16Array]", x = "[object Int32Array]", k = "[object Uint8Array]", T = "[object Uint8ClampedArray]", S = "[object Uint16Array]", C = "[object Uint32Array]",
|
|
9048
|
-
|
|
9047
|
+
var e = /* @__PURE__ */ At(), t = /* @__PURE__ */ gd(), r = /* @__PURE__ */ nt(), n = "[object Arguments]", s = "[object Array]", a = "[object Boolean]", i = "[object Date]", o = "[object Error]", c = "[object Function]", d = "[object Map]", l = "[object Number]", f = "[object Object]", m = "[object RegExp]", h = "[object Set]", g = "[object String]", y = "[object WeakMap]", p = "[object ArrayBuffer]", b = "[object DataView]", v = "[object Float32Array]", _ = "[object Float64Array]", N = "[object Int8Array]", A = "[object Int16Array]", x = "[object Int32Array]", k = "[object Uint8Array]", T = "[object Uint8ClampedArray]", S = "[object Uint16Array]", C = "[object Uint32Array]", R = {};
|
|
9048
|
+
R[v] = R[_] = R[N] = R[A] = R[x] = R[k] = R[T] = R[S] = R[C] = !0, R[n] = R[s] = R[p] = R[a] = R[b] = R[i] = R[o] = R[c] = R[d] = R[l] = R[f] = R[m] = R[h] = R[g] = R[y] = !1;
|
|
9049
9049
|
function F(I) {
|
|
9050
|
-
return r(I) && t(I.length) && !!
|
|
9050
|
+
return r(I) && t(I.length) && !!R[e(I)];
|
|
9051
9051
|
}
|
|
9052
9052
|
return aa = F, aa;
|
|
9053
9053
|
}
|
|
@@ -9487,7 +9487,7 @@ function AC() {
|
|
|
9487
9487
|
if (qm) return ja;
|
|
9488
9488
|
qm = 1;
|
|
9489
9489
|
var e = /* @__PURE__ */ wd(), t = /* @__PURE__ */ CC(), r = /* @__PURE__ */ kC(), n = /* @__PURE__ */ TC(), s = /* @__PURE__ */ Sv(), a = "[object Boolean]", i = "[object Date]", o = "[object Map]", c = "[object Number]", d = "[object RegExp]", l = "[object Set]", f = "[object String]", m = "[object Symbol]", h = "[object ArrayBuffer]", g = "[object DataView]", y = "[object Float32Array]", p = "[object Float64Array]", b = "[object Int8Array]", v = "[object Int16Array]", _ = "[object Int32Array]", N = "[object Uint8Array]", A = "[object Uint8ClampedArray]", x = "[object Uint16Array]", k = "[object Uint32Array]";
|
|
9490
|
-
function T(S, C,
|
|
9490
|
+
function T(S, C, R) {
|
|
9491
9491
|
var F = S.constructor;
|
|
9492
9492
|
switch (C) {
|
|
9493
9493
|
case h:
|
|
@@ -9496,7 +9496,7 @@ function AC() {
|
|
|
9496
9496
|
case i:
|
|
9497
9497
|
return new F(+S);
|
|
9498
9498
|
case g:
|
|
9499
|
-
return t(S,
|
|
9499
|
+
return t(S, R);
|
|
9500
9500
|
case y:
|
|
9501
9501
|
case p:
|
|
9502
9502
|
case b:
|
|
@@ -9506,7 +9506,7 @@ function AC() {
|
|
|
9506
9506
|
case A:
|
|
9507
9507
|
case x:
|
|
9508
9508
|
case k:
|
|
9509
|
-
return s(S,
|
|
9509
|
+
return s(S, R);
|
|
9510
9510
|
case o:
|
|
9511
9511
|
return new F();
|
|
9512
9512
|
case c:
|
|
@@ -9589,8 +9589,8 @@ var Xa, Vm;
|
|
|
9589
9589
|
function kv() {
|
|
9590
9590
|
if (Vm) return Xa;
|
|
9591
9591
|
Vm = 1;
|
|
9592
|
-
var e = /* @__PURE__ */ Sn(), t = /* @__PURE__ */ pd(), r = /* @__PURE__ */ Cn(), n = /* @__PURE__ */ pC(), s = /* @__PURE__ */ bC(), a = /* @__PURE__ */ pv(), i = /* @__PURE__ */ gv(), o = /* @__PURE__ */ vC(), c = /* @__PURE__ */ xC(), d = /* @__PURE__ */ wv(), l = /* @__PURE__ */ wC(), f = /* @__PURE__ */ tr(), m = /* @__PURE__ */ EC(), h = /* @__PURE__ */ AC(), g = /* @__PURE__ */ Cv(), y = /* @__PURE__ */ De(), p = /* @__PURE__ */ er(), b = /* @__PURE__ */ MC(), v = /* @__PURE__ */ Ue(), _ = /* @__PURE__ */ qC(), N = /* @__PURE__ */ wt(), A = /* @__PURE__ */ Mt(), x = 1, k = 2, T = 4, S = "[object Arguments]", C = "[object Array]",
|
|
9593
|
-
se[S] = se[C] = se[L] = se[H] = se[
|
|
9592
|
+
var e = /* @__PURE__ */ Sn(), t = /* @__PURE__ */ pd(), r = /* @__PURE__ */ Cn(), n = /* @__PURE__ */ pC(), s = /* @__PURE__ */ bC(), a = /* @__PURE__ */ pv(), i = /* @__PURE__ */ gv(), o = /* @__PURE__ */ vC(), c = /* @__PURE__ */ xC(), d = /* @__PURE__ */ wv(), l = /* @__PURE__ */ wC(), f = /* @__PURE__ */ tr(), m = /* @__PURE__ */ EC(), h = /* @__PURE__ */ AC(), g = /* @__PURE__ */ Cv(), y = /* @__PURE__ */ De(), p = /* @__PURE__ */ er(), b = /* @__PURE__ */ MC(), v = /* @__PURE__ */ Ue(), _ = /* @__PURE__ */ qC(), N = /* @__PURE__ */ wt(), A = /* @__PURE__ */ Mt(), x = 1, k = 2, T = 4, S = "[object Arguments]", C = "[object Array]", R = "[object Boolean]", F = "[object Date]", I = "[object Error]", w = "[object Function]", M = "[object GeneratorFunction]", D = "[object Map]", q = "[object Number]", $ = "[object Object]", O = "[object RegExp]", B = "[object Set]", j = "[object String]", Y = "[object Symbol]", U = "[object WeakMap]", L = "[object ArrayBuffer]", H = "[object DataView]", P = "[object Float32Array]", G = "[object Float64Array]", z = "[object Int8Array]", W = "[object Int16Array]", V = "[object Int32Array]", te = "[object Uint8Array]", re = "[object Uint8ClampedArray]", me = "[object Uint16Array]", pe = "[object Uint32Array]", se = {};
|
|
9593
|
+
se[S] = se[C] = se[L] = se[H] = se[R] = se[F] = se[P] = se[G] = se[z] = se[W] = se[V] = se[D] = se[q] = se[$] = se[O] = se[B] = se[j] = se[Y] = se[te] = se[re] = se[me] = se[pe] = !0, se[I] = se[w] = se[U] = !1;
|
|
9594
9594
|
function ae(ee, ie, _e, he, Oe, Ne) {
|
|
9595
9595
|
var ne, fe = ie & x, be = ie & k, K = ie & T;
|
|
9596
9596
|
if (_e && (ne = Oe ? _e(ee, he, Oe, Ne) : _e(ee)), ne !== void 0)
|
|
@@ -9602,7 +9602,7 @@ function kv() {
|
|
|
9602
9602
|
if (ne = m(ee), !fe)
|
|
9603
9603
|
return i(ee, ne);
|
|
9604
9604
|
} else {
|
|
9605
|
-
var de = f(ee), X = de == w || de ==
|
|
9605
|
+
var de = f(ee), X = de == w || de == M;
|
|
9606
9606
|
if (p(ee))
|
|
9607
9607
|
return a(ee, fe);
|
|
9608
9608
|
if (de == $ || de == S || X && !Oe) {
|
|
@@ -9877,14 +9877,14 @@ function BC() {
|
|
|
9877
9877
|
if (oh) return bi;
|
|
9878
9878
|
oh = 1;
|
|
9879
9879
|
var e = /* @__PURE__ */ Jt(), t = /* @__PURE__ */ _v(), r = /* @__PURE__ */ Zt(), n = /* @__PURE__ */ qv(), s = /* @__PURE__ */ zC(), a = /* @__PURE__ */ Ed(), i = 1, o = 2, c = "[object Boolean]", d = "[object Date]", l = "[object Error]", f = "[object Map]", m = "[object Number]", h = "[object RegExp]", g = "[object Set]", y = "[object String]", p = "[object Symbol]", b = "[object ArrayBuffer]", v = "[object DataView]", _ = e ? e.prototype : void 0, N = _ ? _.valueOf : void 0;
|
|
9880
|
-
function A(x, k, T, S, C,
|
|
9880
|
+
function A(x, k, T, S, C, R, F) {
|
|
9881
9881
|
switch (T) {
|
|
9882
9882
|
case v:
|
|
9883
9883
|
if (x.byteLength != k.byteLength || x.byteOffset != k.byteOffset)
|
|
9884
9884
|
return !1;
|
|
9885
9885
|
x = x.buffer, k = k.buffer;
|
|
9886
9886
|
case b:
|
|
9887
|
-
return !(x.byteLength != k.byteLength || !
|
|
9887
|
+
return !(x.byteLength != k.byteLength || !R(new t(x), new t(k)));
|
|
9888
9888
|
case c:
|
|
9889
9889
|
case d:
|
|
9890
9890
|
case m:
|
|
@@ -9900,11 +9900,11 @@ function BC() {
|
|
|
9900
9900
|
var w = S & i;
|
|
9901
9901
|
if (I || (I = a), x.size != k.size && !w)
|
|
9902
9902
|
return !1;
|
|
9903
|
-
var
|
|
9904
|
-
if (
|
|
9905
|
-
return
|
|
9903
|
+
var M = F.get(x);
|
|
9904
|
+
if (M)
|
|
9905
|
+
return M == k;
|
|
9906
9906
|
S |= o, F.set(x, k);
|
|
9907
|
-
var D = n(I(x), I(k), S, C,
|
|
9907
|
+
var D = n(I(x), I(k), S, C, R, F);
|
|
9908
9908
|
return F.delete(x), D;
|
|
9909
9909
|
case p:
|
|
9910
9910
|
if (N)
|
|
@@ -9960,22 +9960,22 @@ function jC() {
|
|
|
9960
9960
|
function g(y, p, b, v, _, N) {
|
|
9961
9961
|
var A = a(y), x = a(p), k = A ? l : s(y), T = x ? l : s(p);
|
|
9962
9962
|
k = k == d ? f : k, T = T == d ? f : T;
|
|
9963
|
-
var S = k == f, C = T == f,
|
|
9964
|
-
if (
|
|
9963
|
+
var S = k == f, C = T == f, R = k == T;
|
|
9964
|
+
if (R && i(y)) {
|
|
9965
9965
|
if (!i(p))
|
|
9966
9966
|
return !1;
|
|
9967
9967
|
A = !0, S = !1;
|
|
9968
9968
|
}
|
|
9969
|
-
if (
|
|
9969
|
+
if (R && !S)
|
|
9970
9970
|
return N || (N = new e()), A || o(y) ? t(y, p, b, v, _, N) : r(y, p, k, b, v, _, N);
|
|
9971
9971
|
if (!(b & c)) {
|
|
9972
9972
|
var F = S && h.call(y, "__wrapped__"), I = C && h.call(p, "__wrapped__");
|
|
9973
9973
|
if (F || I) {
|
|
9974
|
-
var w = F ? y.value() : y,
|
|
9975
|
-
return N || (N = new e()), _(w,
|
|
9974
|
+
var w = F ? y.value() : y, M = I ? p.value() : p;
|
|
9975
|
+
return N || (N = new e()), _(w, M, b, v, N);
|
|
9976
9976
|
}
|
|
9977
9977
|
}
|
|
9978
|
-
return
|
|
9978
|
+
return R ? (N || (N = new e()), n(y, p, b, v, _, N)) : !1;
|
|
9979
9979
|
}
|
|
9980
9980
|
return xi = g, xi;
|
|
9981
9981
|
}
|
|
@@ -11707,12 +11707,12 @@ function nT() {
|
|
|
11707
11707
|
e(p, v, S);
|
|
11708
11708
|
return;
|
|
11709
11709
|
}
|
|
11710
|
-
var C = A ? A(k, T, v + "", p, b, x) : void 0,
|
|
11711
|
-
if (
|
|
11710
|
+
var C = A ? A(k, T, v + "", p, b, x) : void 0, R = C === void 0;
|
|
11711
|
+
if (R) {
|
|
11712
11712
|
var F = i(T), I = !F && c(T), w = !F && !I && m(T);
|
|
11713
|
-
C = T, F || I || w ? i(k) ? C = k : o(k) ? C = n(k) : I ? (
|
|
11713
|
+
C = T, F || I || w ? i(k) ? C = k : o(k) ? C = n(k) : I ? (R = !1, C = t(T, !0)) : w ? (R = !1, C = r(T, !0)) : C = [] : f(T) || a(T) ? (C = k, a(k) ? C = g(k) : (!l(k) || d(k)) && (C = s(T))) : R = !1;
|
|
11714
11714
|
}
|
|
11715
|
-
|
|
11715
|
+
R && (x.set(T, C), N(C, T, _, A, x), x.delete(T)), e(p, v, C);
|
|
11716
11716
|
}
|
|
11717
11717
|
return wl = y, wl;
|
|
11718
11718
|
}
|
|
@@ -12454,11 +12454,11 @@ function RT() {
|
|
|
12454
12454
|
}
|
|
12455
12455
|
function l(_, N, A) {
|
|
12456
12456
|
var x = _.node(A), k = x.parent, T = !0, S = N.edge(A, k), C = 0;
|
|
12457
|
-
return S || (T = !1, S = N.edge(k, A)), C = S.weight, e.forEach(N.nodeEdges(A), function(
|
|
12458
|
-
var F =
|
|
12457
|
+
return S || (T = !1, S = N.edge(k, A)), C = S.weight, e.forEach(N.nodeEdges(A), function(R) {
|
|
12458
|
+
var F = R.v === A, I = F ? R.w : R.v;
|
|
12459
12459
|
if (I !== k) {
|
|
12460
|
-
var w = F === T,
|
|
12461
|
-
if (C += w ?
|
|
12460
|
+
var w = F === T, M = N.edge(R).weight;
|
|
12461
|
+
if (C += w ? M : -M, b(_, A, I)) {
|
|
12462
12462
|
var D = _.edge(A, I).cutvalue;
|
|
12463
12463
|
C += w ? -D : D;
|
|
12464
12464
|
}
|
|
@@ -12482,10 +12482,10 @@ function RT() {
|
|
|
12482
12482
|
function g(_, N, A) {
|
|
12483
12483
|
var x = A.v, k = A.w;
|
|
12484
12484
|
N.hasEdge(x, k) || (x = A.w, k = A.v);
|
|
12485
|
-
var T = _.node(x), S = _.node(k), C = T,
|
|
12486
|
-
T.lim > S.lim && (C = S,
|
|
12485
|
+
var T = _.node(x), S = _.node(k), C = T, R = !1;
|
|
12486
|
+
T.lim > S.lim && (C = S, R = !0);
|
|
12487
12487
|
var F = e.filter(N.edges(), function(I) {
|
|
12488
|
-
return
|
|
12488
|
+
return R === v(_, _.node(I.v), C) && R !== v(_, _.node(I.w), C);
|
|
12489
12489
|
});
|
|
12490
12490
|
return e.minBy(F, function(I) {
|
|
12491
12491
|
return r(N, I);
|
|
@@ -13054,12 +13054,12 @@ function GT() {
|
|
|
13054
13054
|
var _ = {};
|
|
13055
13055
|
function N(A, x) {
|
|
13056
13056
|
var k = 0, T = 0, S = A.length, C = e.last(x);
|
|
13057
|
-
return e.forEach(x, function(
|
|
13058
|
-
var I = a(b,
|
|
13059
|
-
(I ||
|
|
13060
|
-
e.forEach(b.predecessors(
|
|
13057
|
+
return e.forEach(x, function(R, F) {
|
|
13058
|
+
var I = a(b, R), w = I ? b.node(I).order : S;
|
|
13059
|
+
(I || R === C) && (e.forEach(x.slice(T, F + 1), function(M) {
|
|
13060
|
+
e.forEach(b.predecessors(M), function(D) {
|
|
13061
13061
|
var q = b.node(D), $ = q.order;
|
|
13062
|
-
($ < k || w < $) && !(q.dummy && b.node(
|
|
13062
|
+
($ < k || w < $) && !(q.dummy && b.node(M).dummy) && i(_, D, M);
|
|
13063
13063
|
});
|
|
13064
13064
|
}), T = F + 1, k = w);
|
|
13065
13065
|
}), x;
|
|
@@ -13069,19 +13069,19 @@ function GT() {
|
|
|
13069
13069
|
function s(b, v) {
|
|
13070
13070
|
var _ = {};
|
|
13071
13071
|
function N(x, k, T, S, C) {
|
|
13072
|
-
var
|
|
13072
|
+
var R;
|
|
13073
13073
|
e.forEach(e.range(k, T), function(F) {
|
|
13074
|
-
|
|
13074
|
+
R = x[F], b.node(R).dummy && e.forEach(b.predecessors(R), function(I) {
|
|
13075
13075
|
var w = b.node(I);
|
|
13076
|
-
w.dummy && (w.order < S || w.order > C) && i(_, I,
|
|
13076
|
+
w.dummy && (w.order < S || w.order > C) && i(_, I, R);
|
|
13077
13077
|
});
|
|
13078
13078
|
});
|
|
13079
13079
|
}
|
|
13080
13080
|
function A(x, k) {
|
|
13081
13081
|
var T = -1, S, C = 0;
|
|
13082
|
-
return e.forEach(k, function(
|
|
13083
|
-
if (b.node(
|
|
13084
|
-
var I = b.predecessors(
|
|
13082
|
+
return e.forEach(k, function(R, F) {
|
|
13083
|
+
if (b.node(R).dummy === "border") {
|
|
13084
|
+
var I = b.predecessors(R);
|
|
13085
13085
|
I.length && (S = b.node(I[0]).order, N(k, C, F, T, S), C = F, T = S);
|
|
13086
13086
|
}
|
|
13087
13087
|
N(k, C, k.length, S, x.length);
|
|
@@ -13119,14 +13119,14 @@ function GT() {
|
|
|
13119
13119
|
}), e.forEach(v, function(T) {
|
|
13120
13120
|
var S = -1;
|
|
13121
13121
|
e.forEach(T, function(C) {
|
|
13122
|
-
var
|
|
13123
|
-
if (
|
|
13124
|
-
|
|
13122
|
+
var R = N(C);
|
|
13123
|
+
if (R.length) {
|
|
13124
|
+
R = e.sortBy(R, function(D) {
|
|
13125
13125
|
return k[D];
|
|
13126
13126
|
});
|
|
13127
|
-
for (var F = (
|
|
13128
|
-
var
|
|
13129
|
-
x[C] === C && S < k[
|
|
13127
|
+
for (var F = (R.length - 1) / 2, I = Math.floor(F), w = Math.ceil(F); I <= w; ++I) {
|
|
13128
|
+
var M = R[I];
|
|
13129
|
+
x[C] === C && S < k[M] && !o(_, C, M) && (x[M] = C, x[C] = A[C] = A[M], S = k[M]);
|
|
13130
13130
|
}
|
|
13131
13131
|
}
|
|
13132
13132
|
});
|
|
@@ -13135,21 +13135,21 @@ function GT() {
|
|
|
13135
13135
|
function d(b, v, _, N, A) {
|
|
13136
13136
|
var x = {}, k = l(b, v, _, A), T = A ? "borderLeft" : "borderRight";
|
|
13137
13137
|
function S(F, I) {
|
|
13138
|
-
for (var w = k.nodes(),
|
|
13139
|
-
D[
|
|
13138
|
+
for (var w = k.nodes(), M = w.pop(), D = {}; M; )
|
|
13139
|
+
D[M] ? F(M) : (D[M] = !0, w.push(M), w = w.concat(I(M))), M = w.pop();
|
|
13140
13140
|
}
|
|
13141
13141
|
function C(F) {
|
|
13142
13142
|
x[F] = k.inEdges(F).reduce(function(I, w) {
|
|
13143
13143
|
return Math.max(I, x[w.v] + k.edge(w));
|
|
13144
13144
|
}, 0);
|
|
13145
13145
|
}
|
|
13146
|
-
function
|
|
13147
|
-
var I = k.outEdges(F).reduce(function(
|
|
13148
|
-
return Math.min(
|
|
13146
|
+
function R(F) {
|
|
13147
|
+
var I = k.outEdges(F).reduce(function(M, D) {
|
|
13148
|
+
return Math.min(M, x[D.w] - k.edge(D));
|
|
13149
13149
|
}, Number.POSITIVE_INFINITY), w = b.node(F);
|
|
13150
13150
|
I !== Number.POSITIVE_INFINITY && w.borderType !== T && (x[F] = Math.max(x[F], I));
|
|
13151
13151
|
}
|
|
13152
|
-
return S(C, k.predecessors.bind(k)), S(
|
|
13152
|
+
return S(C, k.predecessors.bind(k)), S(R, k.successors.bind(k)), e.forEach(N, function(F) {
|
|
13153
13153
|
x[F] = x[_[F]];
|
|
13154
13154
|
}), x;
|
|
13155
13155
|
}
|
|
@@ -13158,10 +13158,10 @@ function GT() {
|
|
|
13158
13158
|
return e.forEach(v, function(T) {
|
|
13159
13159
|
var S;
|
|
13160
13160
|
e.forEach(T, function(C) {
|
|
13161
|
-
var
|
|
13162
|
-
if (A.setNode(
|
|
13163
|
-
var F = _[S], I = A.edge(F,
|
|
13164
|
-
A.setEdge(F,
|
|
13161
|
+
var R = _[C];
|
|
13162
|
+
if (A.setNode(R), S) {
|
|
13163
|
+
var F = _[S], I = A.edge(F, R);
|
|
13164
|
+
A.setEdge(F, R, Math.max(k(b, C, S), I || 0));
|
|
13165
13165
|
}
|
|
13166
13166
|
S = C;
|
|
13167
13167
|
});
|
|
@@ -13182,8 +13182,8 @@ function GT() {
|
|
|
13182
13182
|
e.forEach(["l", "r"], function(k) {
|
|
13183
13183
|
var T = x + k, S = b[T], C;
|
|
13184
13184
|
if (S !== v) {
|
|
13185
|
-
var
|
|
13186
|
-
C = k === "l" ? N - e.min(
|
|
13185
|
+
var R = e.values(S);
|
|
13186
|
+
C = k === "l" ? N - e.min(R) : A - e.max(R), C && (b[T] = e.mapValues(S, function(F) {
|
|
13187
13187
|
return F + C;
|
|
13188
13188
|
}));
|
|
13189
13189
|
}
|
|
@@ -13208,16 +13208,16 @@ function GT() {
|
|
|
13208
13208
|
T === "r" && (A = e.map(A, function(F) {
|
|
13209
13209
|
return e.values(F).reverse();
|
|
13210
13210
|
}));
|
|
13211
|
-
var S = (k === "u" ? b.predecessors : b.successors).bind(b), C = c(b, A, _, S),
|
|
13211
|
+
var S = (k === "u" ? b.predecessors : b.successors).bind(b), C = c(b, A, _, S), R = d(
|
|
13212
13212
|
b,
|
|
13213
13213
|
A,
|
|
13214
13214
|
C.root,
|
|
13215
13215
|
C.align,
|
|
13216
13216
|
T === "r"
|
|
13217
13217
|
);
|
|
13218
|
-
T === "r" && (
|
|
13218
|
+
T === "r" && (R = e.mapValues(R, function(F) {
|
|
13219
13219
|
return -F;
|
|
13220
|
-
})), N[k + T] =
|
|
13220
|
+
})), N[k + T] = R;
|
|
13221
13221
|
});
|
|
13222
13222
|
});
|
|
13223
13223
|
var x = f(b, N);
|
|
@@ -13307,7 +13307,7 @@ function WT() {
|
|
|
13307
13307
|
}), H(" rank", function() {
|
|
13308
13308
|
n(m.asNonCompoundGraph(L));
|
|
13309
13309
|
}), H(" injectEdgeLabelProxies", function() {
|
|
13310
|
-
|
|
13310
|
+
R(L);
|
|
13311
13311
|
}), H(" removeEmptyRanks", function() {
|
|
13312
13312
|
i(L);
|
|
13313
13313
|
}), H(" nestingGraph.cleanup", function() {
|
|
@@ -13345,7 +13345,7 @@ function WT() {
|
|
|
13345
13345
|
}), H(" translateGraph", function() {
|
|
13346
13346
|
w(L);
|
|
13347
13347
|
}), H(" assignNodeIntersects", function() {
|
|
13348
|
-
|
|
13348
|
+
M(L);
|
|
13349
13349
|
}), H(" reversePoints", function() {
|
|
13350
13350
|
q(L);
|
|
13351
13351
|
}), H(" acyclic.undo", function() {
|
|
@@ -13396,7 +13396,7 @@ function WT() {
|
|
|
13396
13396
|
G.minlen *= 2, G.labelpos.toLowerCase() !== "c" && (H.rankdir === "TB" || H.rankdir === "BT" ? G.width += G.labeloffset : G.height += G.labeloffset);
|
|
13397
13397
|
});
|
|
13398
13398
|
}
|
|
13399
|
-
function
|
|
13399
|
+
function R(L) {
|
|
13400
13400
|
e.forEach(L.edges(), function(H) {
|
|
13401
13401
|
var P = L.edge(H);
|
|
13402
13402
|
if (P.width && P.height) {
|
|
@@ -13439,7 +13439,7 @@ function WT() {
|
|
|
13439
13439
|
}), e.has(pe, "x") && (pe.x -= H), e.has(pe, "y") && (pe.y -= G);
|
|
13440
13440
|
}), W.width = P - H + V, W.height = z - G + te;
|
|
13441
13441
|
}
|
|
13442
|
-
function
|
|
13442
|
+
function M(L) {
|
|
13443
13443
|
e.forEach(L.edges(), function(H) {
|
|
13444
13444
|
var P = L.edge(H), G = L.node(H.v), z = L.node(H.w), W, V;
|
|
13445
13445
|
P.points ? (W = P.points[0], V = P.points[P.points.length - 1]) : (P.points = [], W = z, V = G), P.points.unshift(m.intersectRect(G, W)), P.points.push(m.intersectRect(z, V));
|
|
@@ -13726,7 +13726,7 @@ function sA({
|
|
|
13726
13726
|
m(!1);
|
|
13727
13727
|
}
|
|
13728
13728
|
}, [f, N]);
|
|
13729
|
-
const [x, k, T] = cE(N), [S, C,
|
|
13729
|
+
const [x, k, T] = cE(N), [S, C, R] = dE(A);
|
|
13730
13730
|
ce(() => {
|
|
13731
13731
|
k(N);
|
|
13732
13732
|
}, [N, k]), ce(() => {
|
|
@@ -13752,7 +13752,7 @@ function sA({
|
|
|
13752
13752
|
x: q.clientX,
|
|
13753
13753
|
y: q.clientY
|
|
13754
13754
|
});
|
|
13755
|
-
}, []),
|
|
13755
|
+
}, []), M = J(() => {
|
|
13756
13756
|
h && g(null);
|
|
13757
13757
|
}, [h]), D = J(() => {
|
|
13758
13758
|
m(!0), g(null);
|
|
@@ -13773,7 +13773,7 @@ function sA({
|
|
|
13773
13773
|
nodes: x,
|
|
13774
13774
|
edges: S,
|
|
13775
13775
|
onNodesChange: F,
|
|
13776
|
-
onEdgesChange:
|
|
13776
|
+
onEdgesChange: R,
|
|
13777
13777
|
onConnect: I,
|
|
13778
13778
|
nodeTypes: rA,
|
|
13779
13779
|
edgeTypes: nA,
|
|
@@ -13784,7 +13784,7 @@ function sA({
|
|
|
13784
13784
|
defaultViewport: { x: 0, y: 0, zoom: 0.8 },
|
|
13785
13785
|
proOptions: { hideAttribution: !0 },
|
|
13786
13786
|
onPaneContextMenu: w,
|
|
13787
|
-
onPaneClick:
|
|
13787
|
+
onPaneClick: M,
|
|
13788
13788
|
children: [
|
|
13789
13789
|
/* @__PURE__ */ u(kE, {}),
|
|
13790
13790
|
/* @__PURE__ */ u(
|
|
@@ -13872,7 +13872,7 @@ const iA = {
|
|
|
13872
13872
|
return;
|
|
13873
13873
|
if (g.trim().length > 0) {
|
|
13874
13874
|
v === null && (_(new Set(l)), A(new Set(m)));
|
|
13875
|
-
const
|
|
13875
|
+
const M = /* @__PURE__ */ new Set(), D = /* @__PURE__ */ new Set();
|
|
13876
13876
|
e.cubes.forEach((O) => {
|
|
13877
13877
|
let B = !1;
|
|
13878
13878
|
O.measures.filter(
|
|
@@ -13881,9 +13881,9 @@ const iA = {
|
|
|
13881
13881
|
(P) => P.name.toLowerCase().includes(g.toLowerCase()) || P.title.toLowerCase().includes(g.toLowerCase())
|
|
13882
13882
|
).length > 0 && (B = !0, D.add(`${O.name}-dimensions`)), O.dimensions.filter((P) => P.type === "time").filter(
|
|
13883
13883
|
(P) => P.name.toLowerCase().includes(g.toLowerCase()) || P.title.toLowerCase().includes(g.toLowerCase())
|
|
13884
|
-
).length > 0 && (B = !0, D.add(`${O.name}-timeDimensions`)), B &&
|
|
13884
|
+
).length > 0 && (B = !0, D.add(`${O.name}-timeDimensions`)), B && M.add(O.name);
|
|
13885
13885
|
});
|
|
13886
|
-
const q = /* @__PURE__ */ new Set([...v || [], ...
|
|
13886
|
+
const q = /* @__PURE__ */ new Set([...v || [], ...M]), $ = /* @__PURE__ */ new Set([...N || [], ...D]);
|
|
13887
13887
|
f(q), h($);
|
|
13888
13888
|
} else
|
|
13889
13889
|
v !== null && N !== null && (f(v), h(N), _(null), A(null));
|
|
@@ -13939,20 +13939,20 @@ const iA = {
|
|
|
13939
13939
|
/* @__PURE__ */ u("div", { className: "text-xs", children: "Schema not loaded" })
|
|
13940
13940
|
] }) });
|
|
13941
13941
|
const x = (w) => {
|
|
13942
|
-
const
|
|
13943
|
-
if (
|
|
13942
|
+
const M = new Set(l);
|
|
13943
|
+
if (M.has(w) ? M.delete(w) : M.add(w), f(M), v !== null) {
|
|
13944
13944
|
const D = new Set(v);
|
|
13945
13945
|
D.has(w) ? D.delete(w) : D.add(w), _(D);
|
|
13946
13946
|
}
|
|
13947
13947
|
}, k = (w) => {
|
|
13948
|
-
const
|
|
13949
|
-
if (
|
|
13948
|
+
const M = new Set(m);
|
|
13949
|
+
if (M.has(w) ? M.delete(w) : M.add(w), h(M), N !== null) {
|
|
13950
13950
|
const D = new Set(N);
|
|
13951
13951
|
D.has(w) ? D.delete(w) : D.add(w), A(D);
|
|
13952
13952
|
}
|
|
13953
|
-
}, T = (w,
|
|
13953
|
+
}, T = (w, M) => {
|
|
13954
13954
|
(() => {
|
|
13955
|
-
switch (
|
|
13955
|
+
switch (M) {
|
|
13956
13956
|
case "measures":
|
|
13957
13957
|
return n.measures.includes(w.name);
|
|
13958
13958
|
case "dimensions":
|
|
@@ -13962,20 +13962,20 @@ const iA = {
|
|
|
13962
13962
|
default:
|
|
13963
13963
|
return !1;
|
|
13964
13964
|
}
|
|
13965
|
-
})() ? a(w.name,
|
|
13965
|
+
})() ? a(w.name, M) : s(w.name, M);
|
|
13966
13966
|
}, S = (w) => g ? w.filter(
|
|
13967
|
-
(
|
|
13967
|
+
(M) => M.name.toLowerCase().includes(g.toLowerCase()) || M.title.toLowerCase().includes(g.toLowerCase())
|
|
13968
13968
|
) : w, C = (w) => {
|
|
13969
13969
|
if (!g.trim()) return !0;
|
|
13970
|
-
const
|
|
13970
|
+
const M = w.measures.some(
|
|
13971
13971
|
(q) => q.name.toLowerCase().includes(g.toLowerCase()) || q.title.toLowerCase().includes(g.toLowerCase())
|
|
13972
13972
|
), D = w.dimensions.some(
|
|
13973
13973
|
(q) => q.name.toLowerCase().includes(g.toLowerCase()) || q.title.toLowerCase().includes(g.toLowerCase())
|
|
13974
13974
|
);
|
|
13975
|
-
return
|
|
13976
|
-
},
|
|
13975
|
+
return M || D;
|
|
13976
|
+
}, R = ({ field: w, fieldType: M, icon: D }) => {
|
|
13977
13977
|
const q = (() => {
|
|
13978
|
-
switch (
|
|
13978
|
+
switch (M) {
|
|
13979
13979
|
case "measures":
|
|
13980
13980
|
return n.measures.includes(w.name);
|
|
13981
13981
|
case "dimensions":
|
|
@@ -13987,7 +13987,7 @@ const iA = {
|
|
|
13987
13987
|
}
|
|
13988
13988
|
})(), $ = () => {
|
|
13989
13989
|
if (!q) return "hover:bg-dc-surface-hover text-dc-text-secondary";
|
|
13990
|
-
switch (
|
|
13990
|
+
switch (M) {
|
|
13991
13991
|
case "measures":
|
|
13992
13992
|
return "bg-amber-100 text-amber-800 border border-amber-200";
|
|
13993
13993
|
case "dimensions":
|
|
@@ -13999,7 +13999,7 @@ const iA = {
|
|
|
13999
13999
|
}
|
|
14000
14000
|
}, O = () => {
|
|
14001
14001
|
if (!q) return "text-dc-text-muted";
|
|
14002
|
-
switch (
|
|
14002
|
+
switch (M) {
|
|
14003
14003
|
case "measures":
|
|
14004
14004
|
return "text-amber-600";
|
|
14005
14005
|
case "dimensions":
|
|
@@ -14010,7 +14010,7 @@ const iA = {
|
|
|
14010
14010
|
return "text-blue-600";
|
|
14011
14011
|
}
|
|
14012
14012
|
}, B = () => {
|
|
14013
|
-
switch (
|
|
14013
|
+
switch (M) {
|
|
14014
14014
|
case "measures":
|
|
14015
14015
|
return "text-amber-600";
|
|
14016
14016
|
case "dimensions":
|
|
@@ -14025,7 +14025,7 @@ const iA = {
|
|
|
14025
14025
|
"div",
|
|
14026
14026
|
{
|
|
14027
14027
|
className: `flex items-center px-2 py-1.5 text-xs cursor-pointer rounded-md transition-colors ${$()}`,
|
|
14028
|
-
onClick: () => T(w,
|
|
14028
|
+
onClick: () => T(w, M),
|
|
14029
14029
|
title: w.description || w.title,
|
|
14030
14030
|
children: [
|
|
14031
14031
|
/* @__PURE__ */ u("div", { className: `mr-1.5 ${O()}`, children: Q.cloneElement(D, { className: "w-4 h-4" }) }),
|
|
@@ -14037,7 +14037,7 @@ const iA = {
|
|
|
14037
14037
|
]
|
|
14038
14038
|
}
|
|
14039
14039
|
);
|
|
14040
|
-
}, F = ({ title: w, count:
|
|
14040
|
+
}, F = ({ title: w, count: M, sectionKey: D, icon: q }) => {
|
|
14041
14041
|
const $ = m.has(D), O = () => D.includes("-dimensions") && !D.includes("-timeDimensions") ? "dimensions" : D.includes("-timeDimensions") ? "timeDimensions" : "measures";
|
|
14042
14042
|
return /* @__PURE__ */ E(
|
|
14043
14043
|
"div",
|
|
@@ -14059,7 +14059,7 @@ const iA = {
|
|
|
14059
14059
|
/* @__PURE__ */ u("div", { className: "mr-1.5", children: $ ? /* @__PURE__ */ u(je, { className: "w-3 h-3" }) : /* @__PURE__ */ u(Ld, { className: "w-3 h-3" }) }),
|
|
14060
14060
|
/* @__PURE__ */ u("div", { className: "mr-1.5", children: q }),
|
|
14061
14061
|
/* @__PURE__ */ u("span", { className: "flex-1", children: w }),
|
|
14062
|
-
/* @__PURE__ */ u("span", { className: "text-xs text-dc-text-muted bg-dc-surface-secondary px-1.5 py-0.5 rounded-full", children:
|
|
14062
|
+
/* @__PURE__ */ u("span", { className: "text-xs text-dc-text-muted bg-dc-surface-secondary px-1.5 py-0.5 rounded-full", children: M })
|
|
14063
14063
|
]
|
|
14064
14064
|
}
|
|
14065
14065
|
);
|
|
@@ -14151,21 +14151,21 @@ const iA = {
|
|
|
14151
14151
|
{
|
|
14152
14152
|
className: "h-full",
|
|
14153
14153
|
onCubeClick: (w) => {
|
|
14154
|
-
d || (f((
|
|
14154
|
+
d || (f((M) => /* @__PURE__ */ new Set([...M, w])), b("tree"));
|
|
14155
14155
|
},
|
|
14156
|
-
onFieldClick: (w,
|
|
14156
|
+
onFieldClick: (w, M, D) => {
|
|
14157
14157
|
let q;
|
|
14158
14158
|
D === "measure" ? q = "measures" : q = e?.cubes.find((Y) => Y.name === w)?.dimensions.find(
|
|
14159
|
-
(Y) => Y.name === `${w}.${
|
|
14159
|
+
(Y) => Y.name === `${w}.${M}` || Y.name === M
|
|
14160
14160
|
)?.type === "time" ? "timeDimensions" : "dimensions";
|
|
14161
|
-
const $ = `${w}.${
|
|
14161
|
+
const $ = `${w}.${M}`;
|
|
14162
14162
|
n[q].includes($) ? a($, q) : s($, q);
|
|
14163
14163
|
},
|
|
14164
14164
|
highlightedCubes: [
|
|
14165
14165
|
...n.measures.map((w) => w.split(".")[0]),
|
|
14166
14166
|
...n.dimensions.map((w) => w.split(".")[0]),
|
|
14167
14167
|
...n.timeDimensions.map((w) => w.split(".")[0])
|
|
14168
|
-
].filter((w,
|
|
14168
|
+
].filter((w, M, D) => D.indexOf(w) === M),
|
|
14169
14169
|
highlightedFields: [
|
|
14170
14170
|
...n.measures,
|
|
14171
14171
|
...n.dimensions,
|
|
@@ -14178,19 +14178,19 @@ const iA = {
|
|
|
14178
14178
|
/* Tree View - existing field list */
|
|
14179
14179
|
/* @__PURE__ */ u("div", { className: "h-full p-3 space-y-2 overflow-y-auto", children: (() => {
|
|
14180
14180
|
const w = e.cubes.filter(C);
|
|
14181
|
-
return g.trim() && w.length === 0 ? /* @__PURE__ */ u(I, {}) : w.map((
|
|
14182
|
-
const D = l.has(
|
|
14181
|
+
return g.trim() && w.length === 0 ? /* @__PURE__ */ u(I, {}) : w.map((M) => {
|
|
14182
|
+
const D = l.has(M.name), q = M.dimensions.filter((O) => O.type === "time"), $ = M.dimensions.filter((O) => O.type !== "time");
|
|
14183
14183
|
return /* @__PURE__ */ E("div", { className: "border border-dc-border rounded-lg", children: [
|
|
14184
14184
|
/* @__PURE__ */ E(
|
|
14185
14185
|
"div",
|
|
14186
14186
|
{
|
|
14187
14187
|
className: "flex items-center px-3 py-2 cursor-pointer hover:bg-dc-surface-hover rounded-t-lg",
|
|
14188
|
-
onClick: () => x(
|
|
14188
|
+
onClick: () => x(M.name),
|
|
14189
14189
|
children: [
|
|
14190
14190
|
/* @__PURE__ */ u("div", { className: "mr-2", children: D ? /* @__PURE__ */ u(je, { className: "w-4 h-4 text-dc-text-secondary" }) : /* @__PURE__ */ u(Ld, { className: "w-4 h-4 text-dc-text-secondary" }) }),
|
|
14191
14191
|
/* @__PURE__ */ E("div", { className: "flex-1", children: [
|
|
14192
|
-
/* @__PURE__ */ u("div", { className: "font-medium text-sm text-dc-text", children:
|
|
14193
|
-
/* @__PURE__ */ u("div", { className: "text-xs text-dc-text-muted", children:
|
|
14192
|
+
/* @__PURE__ */ u("div", { className: "font-medium text-sm text-dc-text", children: M.title }),
|
|
14193
|
+
/* @__PURE__ */ u("div", { className: "text-xs text-dc-text-muted", children: M.description })
|
|
14194
14194
|
] })
|
|
14195
14195
|
]
|
|
14196
14196
|
}
|
|
@@ -14202,12 +14202,12 @@ const iA = {
|
|
|
14202
14202
|
{
|
|
14203
14203
|
title: "Dimensions",
|
|
14204
14204
|
count: S($).length,
|
|
14205
|
-
sectionKey: `${
|
|
14205
|
+
sectionKey: `${M.name}-dimensions`,
|
|
14206
14206
|
icon: /* @__PURE__ */ u(gr, { className: "w-4 h-4 text-green-600" })
|
|
14207
14207
|
}
|
|
14208
14208
|
),
|
|
14209
|
-
m.has(`${
|
|
14210
|
-
|
|
14209
|
+
m.has(`${M.name}-dimensions`) && /* @__PURE__ */ u("div", { className: "ml-5 space-y-1 mt-1", children: S($).map((O) => /* @__PURE__ */ u(
|
|
14210
|
+
R,
|
|
14211
14211
|
{
|
|
14212
14212
|
field: O,
|
|
14213
14213
|
fieldType: "dimensions",
|
|
@@ -14222,12 +14222,12 @@ const iA = {
|
|
|
14222
14222
|
{
|
|
14223
14223
|
title: "Time Dimensions",
|
|
14224
14224
|
count: S(q).length,
|
|
14225
|
-
sectionKey: `${
|
|
14225
|
+
sectionKey: `${M.name}-timeDimensions`,
|
|
14226
14226
|
icon: /* @__PURE__ */ u(Wt, { className: "w-4 h-4 text-blue-600" })
|
|
14227
14227
|
}
|
|
14228
14228
|
),
|
|
14229
|
-
m.has(`${
|
|
14230
|
-
|
|
14229
|
+
m.has(`${M.name}-timeDimensions`) && /* @__PURE__ */ u("div", { className: "ml-5 space-y-1 mt-1", children: S(q).map((O) => /* @__PURE__ */ u(
|
|
14230
|
+
R,
|
|
14231
14231
|
{
|
|
14232
14232
|
field: O,
|
|
14233
14233
|
fieldType: "timeDimensions",
|
|
@@ -14236,18 +14236,18 @@ const iA = {
|
|
|
14236
14236
|
O.name
|
|
14237
14237
|
)) })
|
|
14238
14238
|
] }),
|
|
14239
|
-
|
|
14239
|
+
M.measures.length > 0 && S(M.measures).length > 0 && /* @__PURE__ */ E("div", { children: [
|
|
14240
14240
|
/* @__PURE__ */ u(
|
|
14241
14241
|
F,
|
|
14242
14242
|
{
|
|
14243
14243
|
title: "Measures",
|
|
14244
|
-
count: S(
|
|
14245
|
-
sectionKey: `${
|
|
14244
|
+
count: S(M.measures).length,
|
|
14245
|
+
sectionKey: `${M.name}-measures`,
|
|
14246
14246
|
icon: /* @__PURE__ */ u(Nc, { className: "w-4 h-4 text-amber-600" })
|
|
14247
14247
|
}
|
|
14248
14248
|
),
|
|
14249
|
-
m.has(`${
|
|
14250
|
-
|
|
14249
|
+
m.has(`${M.name}-measures`) && /* @__PURE__ */ u("div", { className: "ml-5 space-y-1 mt-1", children: S(M.measures).map((O) => /* @__PURE__ */ u(
|
|
14250
|
+
R,
|
|
14251
14251
|
{
|
|
14252
14252
|
field: O,
|
|
14253
14253
|
fieldType: "measures",
|
|
@@ -14257,7 +14257,7 @@ const iA = {
|
|
|
14257
14257
|
)) })
|
|
14258
14258
|
] })
|
|
14259
14259
|
] })
|
|
14260
|
-
] },
|
|
14260
|
+
] }, M.name);
|
|
14261
14261
|
});
|
|
14262
14262
|
})() })
|
|
14263
14263
|
) })
|
|
@@ -14398,7 +14398,7 @@ const iA = {
|
|
|
14398
14398
|
requiresValues: !0,
|
|
14399
14399
|
supportsMultipleValues: !1,
|
|
14400
14400
|
valueType: "number",
|
|
14401
|
-
fieldTypes: ["number", "count", "sum", "avg", "min", "max"
|
|
14401
|
+
fieldTypes: ["number", "count", "sum", "avg", "min", "max"]
|
|
14402
14402
|
},
|
|
14403
14403
|
notBetween: {
|
|
14404
14404
|
label: "not between",
|
|
@@ -14406,7 +14406,7 @@ const iA = {
|
|
|
14406
14406
|
requiresValues: !0,
|
|
14407
14407
|
supportsMultipleValues: !1,
|
|
14408
14408
|
valueType: "number",
|
|
14409
|
-
fieldTypes: ["number", "count", "sum", "avg", "min", "max"
|
|
14409
|
+
fieldTypes: ["number", "count", "sum", "avg", "min", "max"]
|
|
14410
14410
|
},
|
|
14411
14411
|
// Array operators
|
|
14412
14412
|
in: {
|
|
@@ -14553,9 +14553,9 @@ const iA = {
|
|
|
14553
14553
|
schema: s
|
|
14554
14554
|
}) => {
|
|
14555
14555
|
const a = cx[t], [i, o] = Z(!1), [c, d] = Z(""), [l, f] = Z(!1), m = ue(null), h = ue(""), g = Xx(c, 300), y = ke(() => s ? s.cubes.some(
|
|
14556
|
-
(
|
|
14556
|
+
(D) => D.dimensions.some((q) => q.name === e)
|
|
14557
14557
|
) : !1, [s, e]), p = ke(() => s ? s.cubes.some(
|
|
14558
|
-
(
|
|
14558
|
+
(D) => D.dimensions.some((q) => q.name === e && q.type === "time")
|
|
14559
14559
|
) : !1, [s, e]), b = ke(
|
|
14560
14560
|
() => ["equals", "notEquals", "in", "notIn"].includes(t) && y && !p,
|
|
14561
14561
|
[t, y, p]
|
|
@@ -14566,100 +14566,92 @@ const iA = {
|
|
|
14566
14566
|
searchValues: x
|
|
14567
14567
|
} = Zx(e, b);
|
|
14568
14568
|
ce(() => {
|
|
14569
|
-
const
|
|
14570
|
-
m.current && !m.current.contains(
|
|
14569
|
+
const D = (q) => {
|
|
14570
|
+
m.current && !m.current.contains(q.target) && o(!1);
|
|
14571
14571
|
};
|
|
14572
|
-
return document.addEventListener("mousedown",
|
|
14572
|
+
return document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
|
|
14573
14573
|
}, []), ce(() => {
|
|
14574
14574
|
i && b && x && (x("", !0), f(!0), h.current = "");
|
|
14575
14575
|
}, [i, b, x]), ce(() => {
|
|
14576
14576
|
l && b && x && g !== h.current && (h.current = g, x(g));
|
|
14577
14577
|
}, [g, l, b, x]);
|
|
14578
14578
|
const k = J(() => {
|
|
14579
|
-
const
|
|
14580
|
-
o(
|
|
14581
|
-
}, [i]), T = J((
|
|
14582
|
-
const
|
|
14583
|
-
d(
|
|
14584
|
-
}, []), S = J((
|
|
14585
|
-
a.supportsMultipleValues ? r.includes(
|
|
14586
|
-
}, [a.supportsMultipleValues, r, n]), C = J((
|
|
14587
|
-
n(r.filter((
|
|
14588
|
-
}, [r, n]),
|
|
14589
|
-
const
|
|
14579
|
+
const D = !i;
|
|
14580
|
+
o(D), D || (d(""), h.current = "");
|
|
14581
|
+
}, [i]), T = J((D) => {
|
|
14582
|
+
const q = D.target.value;
|
|
14583
|
+
d(q);
|
|
14584
|
+
}, []), S = J((D) => {
|
|
14585
|
+
a.supportsMultipleValues ? r.includes(D) || n([...r, D]) : (n([D]), o(!1)), d("");
|
|
14586
|
+
}, [a.supportsMultipleValues, r, n]), C = J((D) => {
|
|
14587
|
+
n(r.filter((q) => q !== D));
|
|
14588
|
+
}, [r, n]), R = J((D) => {
|
|
14589
|
+
const q = D.target.value;
|
|
14590
14590
|
if (a.valueType === "number") {
|
|
14591
|
-
const
|
|
14592
|
-
isNaN(
|
|
14591
|
+
const $ = parseFloat(q);
|
|
14592
|
+
isNaN($) ? (q === "" || q === "-") && n([]) : n([$]);
|
|
14593
14593
|
} else
|
|
14594
|
-
n(
|
|
14595
|
-
}, [a.valueType, n]), F = J((
|
|
14596
|
-
const
|
|
14594
|
+
n(q ? [q] : []);
|
|
14595
|
+
}, [a.valueType, n]), F = J((D) => {
|
|
14596
|
+
const q = D.target.value;
|
|
14597
14597
|
if (t === "inDateRange") {
|
|
14598
|
-
const
|
|
14599
|
-
n([
|
|
14598
|
+
const $ = r.length >= 2 ? r : ["", ""];
|
|
14599
|
+
n([q, $[1]]);
|
|
14600
14600
|
} else
|
|
14601
|
-
n(
|
|
14602
|
-
}, [t, r, n]), I = J((
|
|
14603
|
-
const
|
|
14604
|
-
n([
|
|
14601
|
+
n(q ? [q] : []);
|
|
14602
|
+
}, [t, r, n]), I = J((D) => {
|
|
14603
|
+
const q = D.target.value, $ = r.length >= 2 ? r : ["", ""];
|
|
14604
|
+
n([$[0], q]);
|
|
14605
|
+
}, [r, n]), w = J((D) => {
|
|
14606
|
+
const q = parseFloat(D.target.value), $ = r.length >= 2 ? r : ["", ""], O = [isNaN(q) ? D.target.value === "" ? "" : $[0] : q, $[1]];
|
|
14607
|
+
n(O.filter((B) => B !== ""));
|
|
14608
|
+
}, [r, n]), M = J((D) => {
|
|
14609
|
+
const q = parseFloat(D.target.value), $ = r.length >= 2 ? r : ["", ""], O = [$[0], isNaN(q) ? D.target.value === "" ? "" : $[1] : q];
|
|
14610
|
+
n(O.filter((B) => B !== ""));
|
|
14605
14611
|
}, [r, n]);
|
|
14606
|
-
|
|
14607
|
-
|
|
14608
|
-
|
|
14609
|
-
|
|
14610
|
-
|
|
14611
|
-
"
|
|
14612
|
-
|
|
14613
|
-
|
|
14614
|
-
|
|
14615
|
-
|
|
14616
|
-
|
|
14617
|
-
|
|
14618
|
-
|
|
14619
|
-
|
|
14620
|
-
|
|
14621
|
-
"
|
|
14622
|
-
|
|
14623
|
-
|
|
14624
|
-
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
|
|
14633
|
-
|
|
14634
|
-
|
|
14635
|
-
|
|
14636
|
-
|
|
14637
|
-
|
|
14638
|
-
|
|
14639
|
-
|
|
14640
|
-
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
/* @__PURE__ */ u("span", { className: "text-sm text-dc-text-muted", children: "to" }),
|
|
14650
|
-
/* @__PURE__ */ u(
|
|
14651
|
-
"input",
|
|
14652
|
-
{
|
|
14653
|
-
type: "number",
|
|
14654
|
-
value: r[1] !== void 0 && r[1] !== null ? r[1] : "",
|
|
14655
|
-
onChange: R,
|
|
14656
|
-
placeholder: "Max",
|
|
14657
|
-
className: "text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
|
|
14658
|
-
}
|
|
14659
|
-
)
|
|
14660
|
-
] });
|
|
14661
|
-
}
|
|
14662
|
-
return a.valueType === "date" ? /* @__PURE__ */ u(
|
|
14612
|
+
return a.requiresValues ? t === "inDateRange" ? /* @__PURE__ */ E("div", { className: "flex items-center space-x-2", children: [
|
|
14613
|
+
/* @__PURE__ */ u(
|
|
14614
|
+
"input",
|
|
14615
|
+
{
|
|
14616
|
+
type: "date",
|
|
14617
|
+
value: r[0] || "",
|
|
14618
|
+
onChange: F,
|
|
14619
|
+
className: "text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
|
|
14620
|
+
}
|
|
14621
|
+
),
|
|
14622
|
+
/* @__PURE__ */ u("span", { className: "text-sm text-dc-text-muted", children: "to" }),
|
|
14623
|
+
/* @__PURE__ */ u(
|
|
14624
|
+
"input",
|
|
14625
|
+
{
|
|
14626
|
+
type: "date",
|
|
14627
|
+
value: r[1] || "",
|
|
14628
|
+
onChange: I,
|
|
14629
|
+
className: "text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
|
|
14630
|
+
}
|
|
14631
|
+
)
|
|
14632
|
+
] }) : t === "between" || t === "notBetween" ? /* @__PURE__ */ E("div", { className: "flex items-center space-x-2", children: [
|
|
14633
|
+
/* @__PURE__ */ u(
|
|
14634
|
+
"input",
|
|
14635
|
+
{
|
|
14636
|
+
type: "number",
|
|
14637
|
+
value: r[0] !== void 0 && r[0] !== null ? r[0] : "",
|
|
14638
|
+
onChange: w,
|
|
14639
|
+
placeholder: "Min",
|
|
14640
|
+
className: "text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
|
|
14641
|
+
}
|
|
14642
|
+
),
|
|
14643
|
+
/* @__PURE__ */ u("span", { className: "text-sm text-dc-text-muted", children: "to" }),
|
|
14644
|
+
/* @__PURE__ */ u(
|
|
14645
|
+
"input",
|
|
14646
|
+
{
|
|
14647
|
+
type: "number",
|
|
14648
|
+
value: r[1] !== void 0 && r[1] !== null ? r[1] : "",
|
|
14649
|
+
onChange: M,
|
|
14650
|
+
placeholder: "Max",
|
|
14651
|
+
className: "text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
|
|
14652
|
+
}
|
|
14653
|
+
)
|
|
14654
|
+
] }) : a.valueType === "date" ? /* @__PURE__ */ u(
|
|
14663
14655
|
"input",
|
|
14664
14656
|
{
|
|
14665
14657
|
type: "date",
|
|
@@ -14672,35 +14664,35 @@ const iA = {
|
|
|
14672
14664
|
{
|
|
14673
14665
|
type: "number",
|
|
14674
14666
|
value: r[0] !== void 0 && r[0] !== null ? r[0] : "",
|
|
14675
|
-
onChange:
|
|
14667
|
+
onChange: R,
|
|
14676
14668
|
placeholder: "Enter number",
|
|
14677
14669
|
className: "text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
|
|
14678
14670
|
}
|
|
14679
14671
|
) : p && ["equals", "notEquals", "in", "notIn"].includes(t) ? a.supportsMultipleValues ? /* @__PURE__ */ E("div", { className: "space-y-2", children: [
|
|
14680
|
-
r.length > 0 && /* @__PURE__ */ u("div", { className: "flex flex-wrap gap-1", children: r.map((
|
|
14672
|
+
r.length > 0 && /* @__PURE__ */ u("div", { className: "flex flex-wrap gap-1", children: r.map((D, q) => /* @__PURE__ */ E(
|
|
14681
14673
|
"div",
|
|
14682
14674
|
{
|
|
14683
14675
|
className: "inline-flex items-center bg-dc-time-dimension text-dc-time-dimension text-xs px-2 py-1 rounded-sm border border-dc-time-dimension",
|
|
14684
14676
|
children: [
|
|
14685
|
-
/* @__PURE__ */ u("span", { className: "mr-1", children: String(
|
|
14677
|
+
/* @__PURE__ */ u("span", { className: "mr-1", children: String(D) }),
|
|
14686
14678
|
/* @__PURE__ */ u(
|
|
14687
14679
|
"button",
|
|
14688
14680
|
{
|
|
14689
|
-
onClick: () => C(
|
|
14681
|
+
onClick: () => C(D),
|
|
14690
14682
|
className: "text-blue-600 hover:text-blue-800 focus:outline-hidden",
|
|
14691
14683
|
children: /* @__PURE__ */ u(ze, { className: "w-3 h-3" })
|
|
14692
14684
|
}
|
|
14693
14685
|
)
|
|
14694
14686
|
]
|
|
14695
14687
|
},
|
|
14696
|
-
|
|
14688
|
+
q
|
|
14697
14689
|
)) }),
|
|
14698
14690
|
/* @__PURE__ */ u(
|
|
14699
14691
|
"input",
|
|
14700
14692
|
{
|
|
14701
14693
|
type: "date",
|
|
14702
|
-
onChange: (
|
|
14703
|
-
|
|
14694
|
+
onChange: (D) => {
|
|
14695
|
+
D.target.value && !r.includes(D.target.value) && (n([...r, D.target.value]), D.target.value = "");
|
|
14704
14696
|
},
|
|
14705
14697
|
className: "text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text focus:ring-2 focus:ring-blue-500 focus:border-blue-500",
|
|
14706
14698
|
placeholder: "Add date..."
|
|
@@ -14715,23 +14707,23 @@ const iA = {
|
|
|
14715
14707
|
className: "text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
|
|
14716
14708
|
}
|
|
14717
14709
|
) : v ? /* @__PURE__ */ E("div", { className: "relative", ref: m, children: [
|
|
14718
|
-
a.supportsMultipleValues && r.length > 0 && /* @__PURE__ */ u("div", { className: "flex flex-wrap gap-1 mb-2", children: r.map((
|
|
14710
|
+
a.supportsMultipleValues && r.length > 0 && /* @__PURE__ */ u("div", { className: "flex flex-wrap gap-1 mb-2", children: r.map((D, q) => /* @__PURE__ */ E(
|
|
14719
14711
|
"div",
|
|
14720
14712
|
{
|
|
14721
14713
|
className: "inline-flex items-center bg-dc-time-dimension text-dc-time-dimension text-xs px-2 py-1 rounded-sm border border-dc-time-dimension",
|
|
14722
14714
|
children: [
|
|
14723
|
-
/* @__PURE__ */ u("span", { className: "mr-1", children: String(
|
|
14715
|
+
/* @__PURE__ */ u("span", { className: "mr-1", children: String(D) }),
|
|
14724
14716
|
/* @__PURE__ */ u(
|
|
14725
14717
|
"button",
|
|
14726
14718
|
{
|
|
14727
|
-
onClick: () => C(
|
|
14719
|
+
onClick: () => C(D),
|
|
14728
14720
|
className: "text-blue-600 hover:text-blue-800 focus:outline-hidden",
|
|
14729
14721
|
children: /* @__PURE__ */ u(ze, { className: "w-3 h-3" })
|
|
14730
14722
|
}
|
|
14731
14723
|
)
|
|
14732
14724
|
]
|
|
14733
14725
|
},
|
|
14734
|
-
|
|
14726
|
+
q
|
|
14735
14727
|
)) }),
|
|
14736
14728
|
!a.supportsMultipleValues && r.length > 0 && /* @__PURE__ */ u("div", { className: "mb-2", children: /* @__PURE__ */ E("div", { className: "inline-flex items-center bg-dc-time-dimension text-dc-time-dimension text-xs px-2 py-1 rounded-sm border border-dc-time-dimension", children: [
|
|
14737
14729
|
/* @__PURE__ */ u("span", { className: "mr-1", children: String(r[0]) }),
|
|
@@ -14770,19 +14762,19 @@ const iA = {
|
|
|
14770
14762
|
/* @__PURE__ */ u("div", { className: "max-h-48 overflow-y-auto", children: N ? /* @__PURE__ */ u("div", { className: "p-2 text-sm text-dc-text-muted", children: c ? "Searching..." : "Loading values..." }) : A ? /* @__PURE__ */ E("div", { className: "p-2 text-sm text-red-600", children: [
|
|
14771
14763
|
"Error loading values: ",
|
|
14772
14764
|
A
|
|
14773
|
-
] }) : _.length === 0 ? /* @__PURE__ */ u("div", { className: "p-2 text-sm text-dc-text-muted", children: c ? "No matching values" : "No values available" }) : _.map((
|
|
14774
|
-
const
|
|
14765
|
+
] }) : _.length === 0 ? /* @__PURE__ */ u("div", { className: "p-2 text-sm text-dc-text-muted", children: c ? "No matching values" : "No values available" }) : _.map((D, q) => {
|
|
14766
|
+
const $ = r.includes(D);
|
|
14775
14767
|
return /* @__PURE__ */ E(
|
|
14776
14768
|
"button",
|
|
14777
14769
|
{
|
|
14778
|
-
onClick: () => S(
|
|
14779
|
-
className: `w-full text-left px-3 py-2 text-sm hover:bg-dc-surface-hover focus:outline-hidden focus:bg-dc-surface-hover ${
|
|
14770
|
+
onClick: () => S(D),
|
|
14771
|
+
className: `w-full text-left px-3 py-2 text-sm hover:bg-dc-surface-hover focus:outline-hidden focus:bg-dc-surface-hover ${$ ? "bg-blue-50 text-blue-700" : "text-dc-text-secondary"}`,
|
|
14780
14772
|
children: [
|
|
14781
|
-
String(
|
|
14782
|
-
|
|
14773
|
+
String(D),
|
|
14774
|
+
$ && /* @__PURE__ */ u("span", { className: "float-right text-blue-600", children: "✓" })
|
|
14783
14775
|
]
|
|
14784
14776
|
},
|
|
14785
|
-
`${
|
|
14777
|
+
`${D}-${q}`
|
|
14786
14778
|
);
|
|
14787
14779
|
}) })
|
|
14788
14780
|
] })
|
|
@@ -14791,11 +14783,11 @@ const iA = {
|
|
|
14791
14783
|
{
|
|
14792
14784
|
type: "text",
|
|
14793
14785
|
value: r[0] !== void 0 && r[0] !== null ? r[0] : "",
|
|
14794
|
-
onChange:
|
|
14786
|
+
onChange: R,
|
|
14795
14787
|
placeholder: `Enter ${a.valueType} value`,
|
|
14796
14788
|
className: "text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
|
|
14797
14789
|
}
|
|
14798
|
-
);
|
|
14790
|
+
) : /* @__PURE__ */ u("div", { className: "text-sm text-dc-text-muted italic", children: "No value required" });
|
|
14799
14791
|
};
|
|
14800
14792
|
function pr(e) {
|
|
14801
14793
|
return !!(e.measures && e.measures.length > 0 || e.dimensions && e.dimensions.length > 0 || e.timeDimensions && e.timeDimensions.length > 0);
|
|
@@ -15031,7 +15023,7 @@ const Dd = ({
|
|
|
15031
15023
|
l(V), p(""), V && setTimeout(() => v.current?.focus(), 50);
|
|
15032
15024
|
}, C = () => {
|
|
15033
15025
|
l(!1), m(!f);
|
|
15034
|
-
},
|
|
15026
|
+
}, R = s ? Md(s) : [], { queryFields: F } = s ? fA(s, a) : { queryFields: [] }, I = R.find((V) => V.name === e.member), w = I ? I.type : "string", M = cy(w), D = w === "time" && e.operator === "inDateRange";
|
|
15035
15027
|
if (ce(() => {
|
|
15036
15028
|
if (!(!D || !e.dateRange))
|
|
15037
15029
|
if (Array.isArray(e.dateRange))
|
|
@@ -15062,19 +15054,23 @@ const Dd = ({
|
|
|
15062
15054
|
return V.filter(
|
|
15063
15055
|
(re) => re.name.toLowerCase().includes(te) || re.title.toLowerCase().includes(te) || re.shortTitle.toLowerCase().includes(te)
|
|
15064
15056
|
);
|
|
15065
|
-
}, $ = q(F), O = q(
|
|
15057
|
+
}, $ = q(F), O = q(R), B = (V) => V.type === "time" ? /* @__PURE__ */ u(Wt, { className: "w-3 h-3 text-blue-500" }) : ["count", "sum", "avg", "min", "max", "countDistinct", "countDistinctApprox", "runningTotal", "calculated", "number"].includes(V.type) ? Rd(V.type, "w-3 h-3 text-amber-500") : /* @__PURE__ */ u(gr, { className: "w-3 h-3 text-green-500" }), j = (V) => V.type === "time" ? /* @__PURE__ */ u("span", { className: "text-xs bg-dc-time-dimension text-dc-time-dimension px-1.5 py-0.5 rounded-sm", children: "T" }) : ["count", "sum", "avg", "min", "max", "countDistinct", "number"].includes(V.type) ? /* @__PURE__ */ u("span", { className: "text-xs bg-dc-measure text-dc-measure px-1.5 py-0.5 rounded-sm", children: "M" }) : /* @__PURE__ */ u("span", { className: "text-xs bg-dc-dimension text-dc-dimension px-1.5 py-0.5 rounded-sm", children: "D" }), Y = (V) => {
|
|
15066
15058
|
const te = dx(V, s), me = cy(te)[0]?.operator || "equals";
|
|
15067
15059
|
r(t, {
|
|
15068
15060
|
member: V,
|
|
15069
15061
|
operator: me,
|
|
15070
|
-
values: []
|
|
15062
|
+
values: [],
|
|
15063
|
+
dateRange: void 0
|
|
15064
|
+
// Reset dateRange when field changes
|
|
15071
15065
|
}), l(!1);
|
|
15072
15066
|
}, U = (V) => {
|
|
15073
15067
|
r(t, {
|
|
15074
15068
|
...e,
|
|
15075
15069
|
operator: V,
|
|
15076
|
-
values: []
|
|
15070
|
+
values: [],
|
|
15077
15071
|
// Reset values when operator changes
|
|
15072
|
+
dateRange: void 0
|
|
15073
|
+
// Reset dateRange when operator changes
|
|
15078
15074
|
}), m(!1);
|
|
15079
15075
|
}, L = (V) => {
|
|
15080
15076
|
r(t, {
|
|
@@ -15210,12 +15206,12 @@ const Dd = ({
|
|
|
15210
15206
|
onClick: C,
|
|
15211
15207
|
className: "w-full sm:w-32 flex items-center justify-between text-left text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text hover:bg-dc-surface-hover focus:ring-2 focus:ring-blue-500 focus:border-blue-500",
|
|
15212
15208
|
children: [
|
|
15213
|
-
/* @__PURE__ */ u("span", { className: "truncate", children:
|
|
15209
|
+
/* @__PURE__ */ u("span", { className: "truncate", children: M.find((V) => V.operator === e.operator)?.label || e.operator }),
|
|
15214
15210
|
/* @__PURE__ */ u(je, { className: `w-4 h-4 text-dc-text-muted shrink-0 ml-1 transition-transform ${f ? "transform rotate-180" : ""}` })
|
|
15215
15211
|
]
|
|
15216
15212
|
}
|
|
15217
15213
|
),
|
|
15218
|
-
f && /* @__PURE__ */ u("div", { className: "absolute z-20 left-0 right-0 mt-1 bg-dc-surface border border-dc-border rounded-md shadow-lg max-h-60 overflow-y-auto", children:
|
|
15214
|
+
f && /* @__PURE__ */ u("div", { className: "absolute z-20 left-0 right-0 mt-1 bg-dc-surface border border-dc-border rounded-md shadow-lg max-h-60 overflow-y-auto", children: M.map((V) => /* @__PURE__ */ u(
|
|
15219
15215
|
"button",
|
|
15220
15216
|
{
|
|
15221
15217
|
onClick: () => U(V.operator),
|
|
@@ -15333,19 +15329,19 @@ const Dd = ({
|
|
|
15333
15329
|
}
|
|
15334
15330
|
}, v = () => {
|
|
15335
15331
|
if (!a) return;
|
|
15336
|
-
const C = wc(a, i)[0]?.name || "",
|
|
15332
|
+
const C = wc(a, i)[0]?.name || "", R = Xr(C, "equals", []), F = [...m, R];
|
|
15337
15333
|
l ? r(t, Ye(F)) : r(t, et(F)), d(!1);
|
|
15338
15334
|
}, _ = () => {
|
|
15339
15335
|
if (!a) return;
|
|
15340
|
-
const C = wc(a, i)[0]?.name || "",
|
|
15336
|
+
const C = wc(a, i)[0]?.name || "", R = Ye([Xr(C, "equals", [])]), F = [...m, R];
|
|
15341
15337
|
l ? r(t, Ye(F)) : r(t, et(F)), d(!1);
|
|
15342
15338
|
}, N = () => {
|
|
15343
15339
|
if (!a) return;
|
|
15344
|
-
const C = wc(a, i)[0]?.name || "",
|
|
15340
|
+
const C = wc(a, i)[0]?.name || "", R = et([Xr(C, "equals", [])]), F = [...m, R];
|
|
15345
15341
|
l ? r(t, Ye(F)) : r(t, et(F)), d(!1);
|
|
15346
15342
|
}, A = (S, C) => {
|
|
15347
|
-
const
|
|
15348
|
-
|
|
15343
|
+
const R = [...m];
|
|
15344
|
+
R[S] = C, l ? r(t, Ye(R)) : r(t, et(R));
|
|
15349
15345
|
}, x = (S) => {
|
|
15350
15346
|
const C = m.filter((F, I) => I !== S);
|
|
15351
15347
|
if (C.length === 0) {
|
|
@@ -15357,11 +15353,11 @@ const Dd = ({
|
|
|
15357
15353
|
n ? n(t, F) : r(t, F);
|
|
15358
15354
|
return;
|
|
15359
15355
|
}
|
|
15360
|
-
const
|
|
15361
|
-
r(t,
|
|
15356
|
+
const R = e.type === "and" ? Ye(C) : et(C);
|
|
15357
|
+
r(t, R);
|
|
15362
15358
|
}, k = (S, C) => {
|
|
15363
|
-
const
|
|
15364
|
-
|
|
15359
|
+
const R = [...m];
|
|
15360
|
+
R[S] = C, l ? r(t, Ye(R)) : r(t, et(R));
|
|
15365
15361
|
}, T = (S) => {
|
|
15366
15362
|
x(S);
|
|
15367
15363
|
};
|
|
@@ -15630,9 +15626,9 @@ const Dd = ({
|
|
|
15630
15626
|
n(e, w);
|
|
15631
15627
|
}
|
|
15632
15628
|
}, S = (I, w) => {
|
|
15633
|
-
const
|
|
15634
|
-
if (g(
|
|
15635
|
-
const D = !
|
|
15629
|
+
const M = { ...h, [I]: w };
|
|
15630
|
+
if (g(M), f === "custom" && M.startDate) {
|
|
15631
|
+
const D = !M.endDate || M.startDate === M.endDate ? M.startDate : [M.startDate, M.endDate];
|
|
15636
15632
|
n(e, D);
|
|
15637
15633
|
}
|
|
15638
15634
|
}, C = (I) => {
|
|
@@ -15640,7 +15636,7 @@ const Dd = ({
|
|
|
15640
15636
|
const w = yt(f, I);
|
|
15641
15637
|
n(e, w);
|
|
15642
15638
|
}
|
|
15643
|
-
},
|
|
15639
|
+
}, R = (I) => {
|
|
15644
15640
|
N(!1), s(e, I);
|
|
15645
15641
|
}, F = Gt.find((I) => I.value === f)?.label || "Custom";
|
|
15646
15642
|
return /* @__PURE__ */ u("div", { ref: A, className: "bg-dc-surface border border-dc-border rounded-lg p-3", children: /* @__PURE__ */ E("div", { className: "flex flex-col sm:flex-row sm:items-center gap-3 min-w-0", children: [
|
|
@@ -15661,7 +15657,7 @@ const Dd = ({
|
|
|
15661
15657
|
_ && /* @__PURE__ */ u("div", { className: "absolute z-20 left-0 right-0 mt-1 bg-dc-surface border border-dc-border rounded-md shadow-lg max-h-60 overflow-y-auto", children: t.map((I) => /* @__PURE__ */ u(
|
|
15662
15658
|
"button",
|
|
15663
15659
|
{
|
|
15664
|
-
onClick: () =>
|
|
15660
|
+
onClick: () => R(I),
|
|
15665
15661
|
className: `w-full text-left px-3 py-2 text-sm hover:bg-dc-surface-hover focus:outline-hidden focus:bg-dc-surface-hover ${I === e ? "bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300" : "text-dc-text-secondary"}`,
|
|
15666
15662
|
children: I
|
|
15667
15663
|
},
|
|
@@ -15885,7 +15881,7 @@ const Dd = ({
|
|
|
15885
15881
|
} else
|
|
15886
15882
|
d([...O, B]);
|
|
15887
15883
|
}
|
|
15888
|
-
},
|
|
15884
|
+
}, R = (q) => {
|
|
15889
15885
|
switch (q) {
|
|
15890
15886
|
case "asc":
|
|
15891
15887
|
return /* @__PURE__ */ u(Sy, { className: `w-4 h-4 ${q ? "stroke-3" : ""}` });
|
|
@@ -15960,7 +15956,7 @@ const Dd = ({
|
|
|
15960
15956
|
onClick: () => F(q),
|
|
15961
15957
|
className: `focus:outline-hidden shrink-0 p-0.5 transition-colors ${I(q, $).replace("p-1", "p-0.5")}`,
|
|
15962
15958
|
title: uy(Lt(q, e.order)),
|
|
15963
|
-
children:
|
|
15959
|
+
children: R(Lt(q, e.order))
|
|
15964
15960
|
}
|
|
15965
15961
|
)
|
|
15966
15962
|
] }),
|
|
@@ -15973,7 +15969,7 @@ const Dd = ({
|
|
|
15973
15969
|
}
|
|
15974
15970
|
)
|
|
15975
15971
|
] })
|
|
15976
|
-
] }),
|
|
15972
|
+
] }), M = ({ timeDimension: q }) => /* @__PURE__ */ E("div", { className: "bg-dc-time-dimension text-dc-time-dimension text-sm px-3 py-2 rounded-lg border border-dc-time-dimension w-full", children: [
|
|
15977
15973
|
/* @__PURE__ */ E("div", { className: "flex items-center mb-1", children: [
|
|
15978
15974
|
/* @__PURE__ */ u("div", { className: "mr-2", children: /* @__PURE__ */ u(Wt, { className: "w-4 h-4" }) }),
|
|
15979
15975
|
/* @__PURE__ */ E("span", { className: "flex-1 flex flex-col min-w-0", children: [
|
|
@@ -16000,7 +15996,7 @@ const Dd = ({
|
|
|
16000
15996
|
onClick: () => F(q.dimension),
|
|
16001
15997
|
className: `focus:outline-hidden shrink-0 p-0.5 transition-colors ${I(q.dimension, "timeDimensions").replace("p-1", "p-0.5")}`,
|
|
16002
15998
|
title: uy(Lt(q.dimension, e.order)),
|
|
16003
|
-
children:
|
|
15999
|
+
children: R(Lt(q.dimension, e.order))
|
|
16004
16000
|
}
|
|
16005
16001
|
)
|
|
16006
16002
|
] }),
|
|
@@ -16138,7 +16134,7 @@ const Dd = ({
|
|
|
16138
16134
|
")"
|
|
16139
16135
|
] }),
|
|
16140
16136
|
/* @__PURE__ */ u("div", { className: "flex flex-col gap-2", children: (e.timeDimensions || []).map((q) => /* @__PURE__ */ u(
|
|
16141
|
-
|
|
16137
|
+
M,
|
|
16142
16138
|
{
|
|
16143
16139
|
timeDimension: q,
|
|
16144
16140
|
label: q.dimension
|
|
@@ -16714,103 +16710,7 @@ const TA = ({
|
|
|
16714
16710
|
})), t();
|
|
16715
16711
|
}, f = (g) => {
|
|
16716
16712
|
g.key === "Enter" && !g.shiftKey && (g.preventDefault(), i());
|
|
16717
|
-
}
|
|
16718
|
-
/* @__PURE__ */ u("div", { className: "shrink-0 p-3 bg-dc-surface-secondary border border-dc-border rounded-md", children: /* @__PURE__ */ E("div", { className: "text-sm text-dc-text-muted", children: [
|
|
16719
|
-
"Using: ",
|
|
16720
|
-
/* @__PURE__ */ u("span", { className: "font-medium", children: "AI Query Generation" }),
|
|
16721
|
-
/* @__PURE__ */ u("span", { className: "ml-2 px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded-sm", children: "Server-provided AI (Rate Limited)" })
|
|
16722
|
-
] }) }),
|
|
16723
|
-
/* @__PURE__ */ E("div", { className: "flex flex-col md:flex-row gap-6 flex-1 min-h-0", children: [
|
|
16724
|
-
/* @__PURE__ */ E("div", { className: "w-full md:w-1/2 flex flex-col", children: [
|
|
16725
|
-
/* @__PURE__ */ u("label", { htmlFor: "user-prompt", className: "block text-sm font-medium text-dc-text-secondary mb-2", children: "Describe your query in natural language" }),
|
|
16726
|
-
/* @__PURE__ */ u(
|
|
16727
|
-
"textarea",
|
|
16728
|
-
{
|
|
16729
|
-
id: "user-prompt",
|
|
16730
|
-
value: s.userPrompt,
|
|
16731
|
-
onChange: (g) => a((y) => ({ ...y, userPrompt: g.target.value })),
|
|
16732
|
-
onKeyDown: f,
|
|
16733
|
-
placeholder: "e.g., Show me the total revenue by month for the last year (Press Enter to generate, Shift+Enter for new line)",
|
|
16734
|
-
className: "flex-1 w-full px-3 py-2 border border-dc-border rounded-md shadow-xs focus:outline-none focus:ring-blue-500 focus:border-blue-500 resize-none bg-dc-surface text-dc-text",
|
|
16735
|
-
required: !0
|
|
16736
|
-
}
|
|
16737
|
-
)
|
|
16738
|
-
] }),
|
|
16739
|
-
/* @__PURE__ */ E("div", { className: "w-full md:w-1/2 flex flex-col", children: [
|
|
16740
|
-
/* @__PURE__ */ E("div", { className: "flex items-center justify-between mb-2", children: [
|
|
16741
|
-
/* @__PURE__ */ u("div", { className: "flex items-center space-x-2", children: s.response ? /* @__PURE__ */ E(Ee, { children: [
|
|
16742
|
-
/* @__PURE__ */ u(Bt, { className: "w-5 h-5 text-green-500" }),
|
|
16743
|
-
/* @__PURE__ */ u("span", { className: "text-sm font-medium text-green-700", children: "AI Generated Query" })
|
|
16744
|
-
] }) : /* @__PURE__ */ u("span", { className: "text-sm font-medium text-dc-text-muted", children: "Generated Query" }) }),
|
|
16745
|
-
s.response && /* @__PURE__ */ u(
|
|
16746
|
-
"button",
|
|
16747
|
-
{
|
|
16748
|
-
onClick: c,
|
|
16749
|
-
disabled: s.isValidating,
|
|
16750
|
-
className: "text-xs text-blue-600 hover:text-blue-800 disabled:opacity-50",
|
|
16751
|
-
title: "Click to re-validate query",
|
|
16752
|
-
children: s.isValidating ? "Validating..." : "Re-validate"
|
|
16753
|
-
}
|
|
16754
|
-
)
|
|
16755
|
-
] }),
|
|
16756
|
-
s.response ? /* @__PURE__ */ u("div", { className: "flex-1 bg-green-50 border border-green-200 rounded-md p-3", children: /* @__PURE__ */ u("pre", { className: "text-sm text-dc-text whitespace-pre-wrap overflow-auto bg-dc-surface p-3 rounded-sm border h-full", children: s.response }) }) : /* @__PURE__ */ u("div", { className: "flex-1 flex items-center justify-center text-dc-text-muted border-2 border-dashed border-dc-border rounded-md p-8 min-h-64", children: /* @__PURE__ */ u("div", { className: "text-center", children: /* @__PURE__ */ u(Sc, { className: "w-12 h-12 mx-auto text-dc-text-muted" }) }) })
|
|
16757
|
-
] })
|
|
16758
|
-
] }),
|
|
16759
|
-
/* @__PURE__ */ E("div", { className: "shrink-0", children: [
|
|
16760
|
-
s.responseError && /* @__PURE__ */ E("div", { className: "flex items-start space-x-2 p-3 bg-red-50 border border-red-200 rounded-md", children: [
|
|
16761
|
-
/* @__PURE__ */ u(zt, { className: "w-5 h-5 text-red-500 mt-0.5 shrink-0" }),
|
|
16762
|
-
/* @__PURE__ */ u("div", { className: "text-sm text-red-700", children: s.responseError })
|
|
16763
|
-
] }),
|
|
16764
|
-
s.isValidating && /* @__PURE__ */ E("div", { className: "flex items-start space-x-2 p-3 bg-blue-50 border border-blue-200 rounded-md", children: [
|
|
16765
|
-
/* @__PURE__ */ u("div", { className: "animate-spin rounded-full h-5 w-5 border-b-2 border-blue-600 mt-0.5 shrink-0" }),
|
|
16766
|
-
/* @__PURE__ */ u("div", { className: "text-sm text-blue-700", children: "Validating query..." })
|
|
16767
|
-
] }),
|
|
16768
|
-
s.validationResult === "valid" && !s.isValidating && /* @__PURE__ */ E("div", { className: "flex items-start space-x-2 p-3 bg-green-50 border border-green-200 rounded-md", children: [
|
|
16769
|
-
/* @__PURE__ */ u(Bt, { className: "w-5 h-5 text-green-500 mt-0.5 shrink-0" }),
|
|
16770
|
-
/* @__PURE__ */ u("div", { className: "text-sm text-green-700", children: "Query is valid and ready to use!" })
|
|
16771
|
-
] }),
|
|
16772
|
-
s.validationResult === "invalid" && !s.isValidating && /* @__PURE__ */ E("div", { className: "flex items-start space-x-2 p-3 bg-red-50 border border-red-200 rounded-md", children: [
|
|
16773
|
-
/* @__PURE__ */ u(zt, { className: "w-5 h-5 text-red-500 mt-0.5 shrink-0" }),
|
|
16774
|
-
/* @__PURE__ */ E("div", { className: "text-sm text-red-700", children: [
|
|
16775
|
-
/* @__PURE__ */ u("div", { className: "font-medium mb-1", children: "Query validation failed:" }),
|
|
16776
|
-
/* @__PURE__ */ u("div", { className: "text-xs", children: s.validationError })
|
|
16777
|
-
] })
|
|
16778
|
-
] })
|
|
16779
|
-
] }),
|
|
16780
|
-
/* @__PURE__ */ E("div", { className: "shrink-0 flex justify-end space-x-3 pt-3", children: [
|
|
16781
|
-
/* @__PURE__ */ u(
|
|
16782
|
-
"button",
|
|
16783
|
-
{
|
|
16784
|
-
type: "submit",
|
|
16785
|
-
disabled: !s.userPrompt.trim() || s.isSubmitting,
|
|
16786
|
-
onClick: i,
|
|
16787
|
-
className: "px-4 py-2 text-white text-sm rounded-md hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed flex items-center",
|
|
16788
|
-
style: {
|
|
16789
|
-
backgroundColor: "var(--dc-primary)"
|
|
16790
|
-
},
|
|
16791
|
-
children: s.isSubmitting ? /* @__PURE__ */ E(Ee, { children: [
|
|
16792
|
-
/* @__PURE__ */ u("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2" }),
|
|
16793
|
-
"Generating..."
|
|
16794
|
-
] }) : /* @__PURE__ */ E(Ee, { children: [
|
|
16795
|
-
/* @__PURE__ */ u(Sc, { className: "w-4 h-4 mr-2" }),
|
|
16796
|
-
"Generate"
|
|
16797
|
-
] })
|
|
16798
|
-
}
|
|
16799
|
-
),
|
|
16800
|
-
/* @__PURE__ */ E(
|
|
16801
|
-
"button",
|
|
16802
|
-
{
|
|
16803
|
-
onClick: d,
|
|
16804
|
-
disabled: !s.response || !r,
|
|
16805
|
-
className: "px-4 py-2 bg-green-600 text-white text-sm rounded-md hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed flex items-center",
|
|
16806
|
-
children: [
|
|
16807
|
-
/* @__PURE__ */ u(Bt, { className: "w-4 h-4 mr-2" }),
|
|
16808
|
-
"Use Query"
|
|
16809
|
-
]
|
|
16810
|
-
}
|
|
16811
|
-
)
|
|
16812
|
-
] })
|
|
16813
|
-
] });
|
|
16713
|
+
};
|
|
16814
16714
|
return /* @__PURE__ */ u(
|
|
16815
16715
|
ed,
|
|
16816
16716
|
{
|
|
@@ -16818,7 +16718,103 @@ const TA = ({
|
|
|
16818
16718
|
onClose: l,
|
|
16819
16719
|
title: "AI Assistant - Generate Query",
|
|
16820
16720
|
size: "fullscreen-mobile",
|
|
16821
|
-
children:
|
|
16721
|
+
children: /* @__PURE__ */ E("div", { className: "flex flex-col space-y-4", children: [
|
|
16722
|
+
/* @__PURE__ */ u("div", { className: "shrink-0 p-3 bg-dc-surface-secondary border border-dc-border rounded-md", children: /* @__PURE__ */ E("div", { className: "text-sm text-dc-text-muted", children: [
|
|
16723
|
+
"Using: ",
|
|
16724
|
+
/* @__PURE__ */ u("span", { className: "font-medium", children: "AI Query Generation" }),
|
|
16725
|
+
/* @__PURE__ */ u("span", { className: "ml-2 px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded-sm", children: "Server-provided AI (Rate Limited)" })
|
|
16726
|
+
] }) }),
|
|
16727
|
+
/* @__PURE__ */ E("div", { className: "flex flex-col md:flex-row gap-6 flex-1 min-h-0", children: [
|
|
16728
|
+
/* @__PURE__ */ E("div", { className: "w-full md:w-1/2 flex flex-col", children: [
|
|
16729
|
+
/* @__PURE__ */ u("label", { htmlFor: "user-prompt", className: "block text-sm font-medium text-dc-text-secondary mb-2", children: "Describe your query in natural language" }),
|
|
16730
|
+
/* @__PURE__ */ u(
|
|
16731
|
+
"textarea",
|
|
16732
|
+
{
|
|
16733
|
+
id: "user-prompt",
|
|
16734
|
+
value: s.userPrompt,
|
|
16735
|
+
onChange: (g) => a((y) => ({ ...y, userPrompt: g.target.value })),
|
|
16736
|
+
onKeyDown: f,
|
|
16737
|
+
placeholder: "e.g., Show me the total revenue by month for the last year (Press Enter to generate, Shift+Enter for new line)",
|
|
16738
|
+
className: "flex-1 w-full px-3 py-2 border border-dc-border rounded-md shadow-xs focus:outline-none focus:ring-blue-500 focus:border-blue-500 resize-none bg-dc-surface text-dc-text",
|
|
16739
|
+
required: !0
|
|
16740
|
+
}
|
|
16741
|
+
)
|
|
16742
|
+
] }),
|
|
16743
|
+
/* @__PURE__ */ E("div", { className: "w-full md:w-1/2 flex flex-col", children: [
|
|
16744
|
+
/* @__PURE__ */ E("div", { className: "flex items-center justify-between mb-2", children: [
|
|
16745
|
+
/* @__PURE__ */ u("div", { className: "flex items-center space-x-2", children: s.response ? /* @__PURE__ */ E(Ee, { children: [
|
|
16746
|
+
/* @__PURE__ */ u(Bt, { className: "w-5 h-5 text-green-500" }),
|
|
16747
|
+
/* @__PURE__ */ u("span", { className: "text-sm font-medium text-green-700", children: "AI Generated Query" })
|
|
16748
|
+
] }) : /* @__PURE__ */ u("span", { className: "text-sm font-medium text-dc-text-muted", children: "Generated Query" }) }),
|
|
16749
|
+
s.response && /* @__PURE__ */ u(
|
|
16750
|
+
"button",
|
|
16751
|
+
{
|
|
16752
|
+
onClick: c,
|
|
16753
|
+
disabled: s.isValidating,
|
|
16754
|
+
className: "text-xs text-blue-600 hover:text-blue-800 disabled:opacity-50",
|
|
16755
|
+
title: "Click to re-validate query",
|
|
16756
|
+
children: s.isValidating ? "Validating..." : "Re-validate"
|
|
16757
|
+
}
|
|
16758
|
+
)
|
|
16759
|
+
] }),
|
|
16760
|
+
s.response ? /* @__PURE__ */ u("div", { className: "flex-1 bg-green-50 border border-green-200 rounded-md p-3", children: /* @__PURE__ */ u("pre", { className: "text-sm text-dc-text whitespace-pre-wrap overflow-auto bg-dc-surface p-3 rounded-sm border h-full", children: s.response }) }) : /* @__PURE__ */ u("div", { className: "flex-1 flex items-center justify-center text-dc-text-muted border-2 border-dashed border-dc-border rounded-md p-8 min-h-64", children: /* @__PURE__ */ u("div", { className: "text-center", children: /* @__PURE__ */ u(Sc, { className: "w-12 h-12 mx-auto text-dc-text-muted" }) }) })
|
|
16761
|
+
] })
|
|
16762
|
+
] }),
|
|
16763
|
+
/* @__PURE__ */ E("div", { className: "shrink-0", children: [
|
|
16764
|
+
s.responseError && /* @__PURE__ */ E("div", { className: "flex items-start space-x-2 p-3 bg-red-50 border border-red-200 rounded-md", children: [
|
|
16765
|
+
/* @__PURE__ */ u(zt, { className: "w-5 h-5 text-red-500 mt-0.5 shrink-0" }),
|
|
16766
|
+
/* @__PURE__ */ u("div", { className: "text-sm text-red-700", children: s.responseError })
|
|
16767
|
+
] }),
|
|
16768
|
+
s.isValidating && /* @__PURE__ */ E("div", { className: "flex items-start space-x-2 p-3 bg-blue-50 border border-blue-200 rounded-md", children: [
|
|
16769
|
+
/* @__PURE__ */ u("div", { className: "animate-spin rounded-full h-5 w-5 border-b-2 border-blue-600 mt-0.5 shrink-0" }),
|
|
16770
|
+
/* @__PURE__ */ u("div", { className: "text-sm text-blue-700", children: "Validating query..." })
|
|
16771
|
+
] }),
|
|
16772
|
+
s.validationResult === "valid" && !s.isValidating && /* @__PURE__ */ E("div", { className: "flex items-start space-x-2 p-3 bg-green-50 border border-green-200 rounded-md", children: [
|
|
16773
|
+
/* @__PURE__ */ u(Bt, { className: "w-5 h-5 text-green-500 mt-0.5 shrink-0" }),
|
|
16774
|
+
/* @__PURE__ */ u("div", { className: "text-sm text-green-700", children: "Query is valid and ready to use!" })
|
|
16775
|
+
] }),
|
|
16776
|
+
s.validationResult === "invalid" && !s.isValidating && /* @__PURE__ */ E("div", { className: "flex items-start space-x-2 p-3 bg-red-50 border border-red-200 rounded-md", children: [
|
|
16777
|
+
/* @__PURE__ */ u(zt, { className: "w-5 h-5 text-red-500 mt-0.5 shrink-0" }),
|
|
16778
|
+
/* @__PURE__ */ E("div", { className: "text-sm text-red-700", children: [
|
|
16779
|
+
/* @__PURE__ */ u("div", { className: "font-medium mb-1", children: "Query validation failed:" }),
|
|
16780
|
+
/* @__PURE__ */ u("div", { className: "text-xs", children: s.validationError })
|
|
16781
|
+
] })
|
|
16782
|
+
] })
|
|
16783
|
+
] }),
|
|
16784
|
+
/* @__PURE__ */ E("div", { className: "shrink-0 flex justify-end space-x-3 pt-3", children: [
|
|
16785
|
+
/* @__PURE__ */ u(
|
|
16786
|
+
"button",
|
|
16787
|
+
{
|
|
16788
|
+
type: "submit",
|
|
16789
|
+
disabled: !s.userPrompt.trim() || s.isSubmitting,
|
|
16790
|
+
onClick: i,
|
|
16791
|
+
className: "px-4 py-2 text-white text-sm rounded-md hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed flex items-center",
|
|
16792
|
+
style: {
|
|
16793
|
+
backgroundColor: "var(--dc-primary)"
|
|
16794
|
+
},
|
|
16795
|
+
children: s.isSubmitting ? /* @__PURE__ */ E(Ee, { children: [
|
|
16796
|
+
/* @__PURE__ */ u("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2" }),
|
|
16797
|
+
"Generating..."
|
|
16798
|
+
] }) : /* @__PURE__ */ E(Ee, { children: [
|
|
16799
|
+
/* @__PURE__ */ u(Sc, { className: "w-4 h-4 mr-2" }),
|
|
16800
|
+
"Generate"
|
|
16801
|
+
] })
|
|
16802
|
+
}
|
|
16803
|
+
),
|
|
16804
|
+
/* @__PURE__ */ E(
|
|
16805
|
+
"button",
|
|
16806
|
+
{
|
|
16807
|
+
onClick: d,
|
|
16808
|
+
disabled: !s.response || !r,
|
|
16809
|
+
className: "px-4 py-2 bg-green-600 text-white text-sm rounded-md hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed flex items-center",
|
|
16810
|
+
children: [
|
|
16811
|
+
/* @__PURE__ */ u(Bt, { className: "w-4 h-4 mr-2" }),
|
|
16812
|
+
"Use Query"
|
|
16813
|
+
]
|
|
16814
|
+
}
|
|
16815
|
+
)
|
|
16816
|
+
] })
|
|
16817
|
+
] })
|
|
16822
16818
|
}
|
|
16823
16819
|
);
|
|
16824
16820
|
}, my = "drizzle-cube-query-builder-state", hy = "drizzle-cube-api-config", mx = un(({
|
|
@@ -16966,7 +16962,7 @@ const TA = ({
|
|
|
16966
16962
|
}, [g, r]), ce(() => {
|
|
16967
16963
|
l.executionStatus === "success" && pr(l.query) && l.validationStatus === "valid" && B();
|
|
16968
16964
|
}, [m]);
|
|
16969
|
-
const
|
|
16965
|
+
const R = J((P) => {
|
|
16970
16966
|
f((G) => {
|
|
16971
16967
|
const z = P(G.query), W = {
|
|
16972
16968
|
...z,
|
|
@@ -16987,7 +16983,7 @@ const TA = ({
|
|
|
16987
16983
|
};
|
|
16988
16984
|
});
|
|
16989
16985
|
}, []), F = J((P, G) => {
|
|
16990
|
-
|
|
16986
|
+
R((z) => {
|
|
16991
16987
|
const W = { ...z };
|
|
16992
16988
|
switch (G) {
|
|
16993
16989
|
case "measures":
|
|
@@ -17005,8 +17001,8 @@ const TA = ({
|
|
|
17005
17001
|
}
|
|
17006
17002
|
return at(W);
|
|
17007
17003
|
});
|
|
17008
|
-
}, [
|
|
17009
|
-
|
|
17004
|
+
}, [R]), I = J((P, G) => {
|
|
17005
|
+
R((z) => {
|
|
17010
17006
|
const W = { ...z };
|
|
17011
17007
|
switch (G) {
|
|
17012
17008
|
case "measures":
|
|
@@ -17025,8 +17021,8 @@ const TA = ({
|
|
|
17025
17021
|
}
|
|
17026
17022
|
return at(W);
|
|
17027
17023
|
});
|
|
17028
|
-
}, [
|
|
17029
|
-
|
|
17024
|
+
}, [R]), w = J((P, G) => {
|
|
17025
|
+
R((z) => {
|
|
17030
17026
|
const W = {
|
|
17031
17027
|
...z,
|
|
17032
17028
|
timeDimensions: (z.timeDimensions || []).map(
|
|
@@ -17035,16 +17031,16 @@ const TA = ({
|
|
|
17035
17031
|
};
|
|
17036
17032
|
return at(W);
|
|
17037
17033
|
});
|
|
17038
|
-
}, [
|
|
17039
|
-
|
|
17034
|
+
}, [R]), M = J((P) => {
|
|
17035
|
+
R((G) => {
|
|
17040
17036
|
const z = {
|
|
17041
17037
|
...G,
|
|
17042
17038
|
filters: P
|
|
17043
17039
|
};
|
|
17044
17040
|
return at(z);
|
|
17045
17041
|
});
|
|
17046
|
-
}, [
|
|
17047
|
-
|
|
17042
|
+
}, [R]), D = J((P, G) => {
|
|
17043
|
+
R((z) => {
|
|
17048
17044
|
const W = {
|
|
17049
17045
|
...z,
|
|
17050
17046
|
timeDimensions: (z.timeDimensions || []).map(
|
|
@@ -17053,8 +17049,8 @@ const TA = ({
|
|
|
17053
17049
|
};
|
|
17054
17050
|
return at(W);
|
|
17055
17051
|
});
|
|
17056
|
-
}, [
|
|
17057
|
-
|
|
17052
|
+
}, [R]), q = J((P) => {
|
|
17053
|
+
R((G) => {
|
|
17058
17054
|
const z = {
|
|
17059
17055
|
...G,
|
|
17060
17056
|
timeDimensions: (G.timeDimensions || []).map(
|
|
@@ -17063,8 +17059,8 @@ const TA = ({
|
|
|
17063
17059
|
};
|
|
17064
17060
|
return at(z);
|
|
17065
17061
|
});
|
|
17066
|
-
}, [
|
|
17067
|
-
|
|
17062
|
+
}, [R]), $ = J((P, G) => {
|
|
17063
|
+
R((z) => {
|
|
17068
17064
|
const W = { ...z.order || {} };
|
|
17069
17065
|
G === null ? delete W[P] : W[P] = G;
|
|
17070
17066
|
const V = {
|
|
@@ -17073,7 +17069,7 @@ const TA = ({
|
|
|
17073
17069
|
};
|
|
17074
17070
|
return at(V);
|
|
17075
17071
|
});
|
|
17076
|
-
}, [
|
|
17072
|
+
}, [R]), O = J(async () => {
|
|
17077
17073
|
if (!pr(l.query)) return;
|
|
17078
17074
|
const P = Vt(l.query), G = JSON.stringify(P);
|
|
17079
17075
|
f((z) => ({
|
|
@@ -17300,7 +17296,7 @@ const TA = ({
|
|
|
17300
17296
|
onExecute: B,
|
|
17301
17297
|
onRemoveField: I,
|
|
17302
17298
|
onTimeDimensionGranularityChange: w,
|
|
17303
|
-
onFiltersChange:
|
|
17299
|
+
onFiltersChange: M,
|
|
17304
17300
|
onDateRangeChange: D,
|
|
17305
17301
|
onDateRangeRemove: q,
|
|
17306
17302
|
onOrderChange: $,
|
|
@@ -17398,18 +17394,18 @@ function AA({
|
|
|
17398
17394
|
}, []), Q.useEffect(() => {
|
|
17399
17395
|
d ? d.fromAxis !== l ? (x(!1), v(null)) : d.fromAxis === l && d.fromIndex !== void 0 && N(!1) : (v(null), N(!1), x(!1));
|
|
17400
17396
|
}, [d, l]);
|
|
17401
|
-
const
|
|
17402
|
-
d && d.fromAxis === l && d.fromIndex !== void 0 && (w.preventDefault(), w.stopPropagation(), v(
|
|
17397
|
+
const R = (w, M) => {
|
|
17398
|
+
d && d.fromAxis === l && d.fromIndex !== void 0 && (w.preventDefault(), w.stopPropagation(), v(M), x(!0));
|
|
17403
17399
|
}, F = () => {
|
|
17404
17400
|
v(null);
|
|
17405
|
-
}, I = (w,
|
|
17401
|
+
}, I = (w, M) => {
|
|
17406
17402
|
if (w.preventDefault(), w.stopPropagation(), v(null), x(!1), d && d.fromAxis === l && d.fromIndex !== void 0 && c) {
|
|
17407
|
-
c(d.fromIndex,
|
|
17403
|
+
c(d.fromIndex, M, l);
|
|
17408
17404
|
return;
|
|
17409
17405
|
}
|
|
17410
17406
|
try {
|
|
17411
17407
|
const D = JSON.parse(w.dataTransfer.getData("text/plain"));
|
|
17412
|
-
D.fromAxis === l && c && D.fromIndex !== void 0 && c(D.fromIndex,
|
|
17408
|
+
D.fromAxis === l && c && D.fromIndex !== void 0 && c(D.fromIndex, M, l);
|
|
17413
17409
|
} catch {
|
|
17414
17410
|
}
|
|
17415
17411
|
};
|
|
@@ -17444,7 +17440,7 @@ function AA({
|
|
|
17444
17440
|
S || g === 1 ? (N(!0), i(w)) : (w.preventDefault(), w.dataTransfer.dropEffect = "none");
|
|
17445
17441
|
},
|
|
17446
17442
|
onDragLeave: (w) => {
|
|
17447
|
-
const
|
|
17443
|
+
const M = w.currentTarget.getBoundingClientRect(), D = w.clientX < M.left || w.clientX > M.right || w.clientY < M.top || w.clientY > M.bottom, q = w.relatedTarget, $ = q && !w.currentTarget.contains(q);
|
|
17448
17444
|
(D || $ || w.currentTarget === w.target) && (N(!1), x(!1));
|
|
17449
17445
|
},
|
|
17450
17446
|
onDrop: (w) => {
|
|
@@ -17452,8 +17448,8 @@ function AA({
|
|
|
17452
17448
|
return;
|
|
17453
17449
|
S || g === 1 ? r(w, l) : w.preventDefault(), N(!1), x(!1);
|
|
17454
17450
|
},
|
|
17455
|
-
children: t.length === 0 ? /* @__PURE__ */ u("div", { className: "text-xs text-dc-text-muted text-center w-full", children: C ? "Maximum items reached" : y || "Drop fields here" }) : /* @__PURE__ */ u("div", { className: "flex flex-wrap gap-1", children: t.map((w,
|
|
17456
|
-
const { IconComponent: D, baseClasses: q, hoverClasses: $ } = o(w), O = b ===
|
|
17451
|
+
children: t.length === 0 ? /* @__PURE__ */ u("div", { className: "text-xs text-dc-text-muted text-center w-full", children: C ? "Maximum items reached" : y || "Drop fields here" }) : /* @__PURE__ */ u("div", { className: "flex flex-wrap gap-1", children: t.map((w, M) => {
|
|
17452
|
+
const { IconComponent: D, baseClasses: q, hoverClasses: $ } = o(w), O = b === M, B = d && d.field === w && d.fromAxis === l;
|
|
17457
17453
|
return /* @__PURE__ */ E(
|
|
17458
17454
|
"div",
|
|
17459
17455
|
{
|
|
@@ -17465,12 +17461,12 @@ function AA({
|
|
|
17465
17461
|
{
|
|
17466
17462
|
draggable: !0,
|
|
17467
17463
|
onDragStart: (j) => {
|
|
17468
|
-
s(j, w, l,
|
|
17464
|
+
s(j, w, l, M);
|
|
17469
17465
|
},
|
|
17470
17466
|
onDragEnd: a,
|
|
17471
|
-
onDragOver: (j) =>
|
|
17467
|
+
onDragOver: (j) => R(j, M),
|
|
17472
17468
|
onDragLeave: F,
|
|
17473
|
-
onDrop: (j) => I(j,
|
|
17469
|
+
onDrop: (j) => I(j, M),
|
|
17474
17470
|
className: `rounded text-xs cursor-move px-3 py-0.5 sm:px-2 sm:py-1 flex items-center transition-transform h-[28px] sm:h-auto ${q} ${$} ${O ? "bg-opacity-75" : ""} ${B ? "opacity-50 cursor-grabbing" : ""}`,
|
|
17475
17471
|
children: [
|
|
17476
17472
|
/* @__PURE__ */ u(D, { className: "w-3 h-3 mr-1 shrink-0" }),
|
|
@@ -17490,7 +17486,7 @@ function AA({
|
|
|
17490
17486
|
)
|
|
17491
17487
|
]
|
|
17492
17488
|
},
|
|
17493
|
-
`${w}-${
|
|
17489
|
+
`${w}-${M}`
|
|
17494
17490
|
);
|
|
17495
17491
|
}) })
|
|
17496
17492
|
}
|
|
@@ -17524,8 +17520,8 @@ function py({
|
|
|
17524
17520
|
let k = !1;
|
|
17525
17521
|
const T = { ...t };
|
|
17526
17522
|
d.dropZones.forEach((S) => {
|
|
17527
|
-
const C = f(S.key),
|
|
17528
|
-
|
|
17523
|
+
const C = f(S.key), R = C.filter((F) => x.includes(F));
|
|
17524
|
+
R.length !== C.length && (k = !0, R.length === 0 ? delete T[S.key] : S.maxItems === 1 ? T[S.key] = R[0] : T[S.key] = R);
|
|
17529
17525
|
}), k && a(T);
|
|
17530
17526
|
}, [n, t, d.dropZones, a]);
|
|
17531
17527
|
const m = (x) => n ? n.measures.includes(x) ? "measure" : n.timeDimensions.includes(x) ? "timeDimension" : "dimension" : "dimension", h = (x) => {
|
|
@@ -17557,28 +17553,28 @@ function py({
|
|
|
17557
17553
|
c(null);
|
|
17558
17554
|
}, b = (x, k) => {
|
|
17559
17555
|
x.preventDefault();
|
|
17560
|
-
const T = JSON.parse(x.dataTransfer.getData("text/plain")), { field: S, fromAxis: C } = T,
|
|
17556
|
+
const T = JSON.parse(x.dataTransfer.getData("text/plain")), { field: S, fromAxis: C } = T, R = { ...t };
|
|
17561
17557
|
if (C !== "available" && C !== k) {
|
|
17562
|
-
const w =
|
|
17558
|
+
const w = R[C];
|
|
17563
17559
|
if (Array.isArray(w)) {
|
|
17564
|
-
const
|
|
17565
|
-
|
|
17566
|
-
} else w === S && delete
|
|
17560
|
+
const M = w.filter((D) => D !== S);
|
|
17561
|
+
M.length === 0 ? delete R[C] : R[C] = M;
|
|
17562
|
+
} else w === S && delete R[C];
|
|
17567
17563
|
}
|
|
17568
|
-
const F =
|
|
17569
|
-
d.dropZones.find((w) => w.key === k)?.maxItems === 1 ?
|
|
17564
|
+
const F = R[k];
|
|
17565
|
+
d.dropZones.find((w) => w.key === k)?.maxItems === 1 ? R[k] = S : Array.isArray(F) ? F.includes(S) || (R[k] = [...F, S]) : R[k] = [S], c(null), a(R);
|
|
17570
17566
|
}, v = (x, k) => {
|
|
17571
17567
|
const T = { ...t }, S = T[k];
|
|
17572
17568
|
if (Array.isArray(S)) {
|
|
17573
|
-
const C = S.filter((
|
|
17569
|
+
const C = S.filter((R) => R !== x);
|
|
17574
17570
|
C.length === 0 ? delete T[k] : T[k] = C;
|
|
17575
17571
|
} else S === x && delete T[k];
|
|
17576
17572
|
a(T);
|
|
17577
17573
|
}, _ = (x, k, T) => {
|
|
17578
17574
|
const S = { ...t }, C = S[T];
|
|
17579
17575
|
if (Array.isArray(C) && C.length > 1 && x !== k) {
|
|
17580
|
-
const
|
|
17581
|
-
|
|
17576
|
+
const R = [...C], [F] = R.splice(x, 1);
|
|
17577
|
+
R.splice(k, 0, F), S[T] = R, c(null), a(S);
|
|
17582
17578
|
}
|
|
17583
17579
|
}, A = (() => {
|
|
17584
17580
|
if (!n) return { dimensions: [], timeDimensions: [], measures: [] };
|
|
@@ -18091,7 +18087,7 @@ function gy({
|
|
|
18091
18087
|
submitText: a,
|
|
18092
18088
|
colorPalette: i
|
|
18093
18089
|
}) {
|
|
18094
|
-
const { cubeApi: o } = ct(), [c, d] = Z(""), [l, f] = Z(""), [m, h] = Z("bar"), [g, y] = Z([]), [p, b] = Z(!1), [v, _] = Z(null), [N, A] = Z(""), [x, k] = Z(null), [T, S] = Z({ xAxis: [], yAxis: [], series: [] }), [C,
|
|
18090
|
+
const { cubeApi: o } = ct(), [c, d] = Z(""), [l, f] = Z(""), [m, h] = Z("bar"), [g, y] = Z([]), [p, b] = Z(!1), [v, _] = Z(null), [N, A] = Z(""), [x, k] = Z(null), [T, S] = Z({ xAxis: [], yAxis: [], series: [] }), [C, R] = Z({ showLegend: !0, showGrid: !0, showTooltip: !0, stacked: !1 }), [F, I] = Z(!1), [w, M] = Z(null), D = ue(null), $ = Yc(m, yr).skipQuery === !0, O = (ae) => {
|
|
18095
18091
|
}, B = 5, j = 4;
|
|
18096
18092
|
ce(() => {
|
|
18097
18093
|
if (e) {
|
|
@@ -18104,11 +18100,11 @@ function gy({
|
|
|
18104
18100
|
return n.query;
|
|
18105
18101
|
}
|
|
18106
18102
|
})();
|
|
18107
|
-
f(ae), h(n.chartType), S(n.chartConfig || { xAxis: [], yAxis: [], series: [] }),
|
|
18103
|
+
f(ae), h(n.chartType), S(n.chartConfig || { xAxis: [], yAxis: [], series: [] }), R(n.displayConfig || {}), y(n.dashboardFilterMapping || []), A(ae), _({ isValid: !0, message: "Loaded query (assumed valid)" }), k(null), $ || setTimeout(() => {
|
|
18108
18104
|
H(ae, !0, !0);
|
|
18109
18105
|
}, 100);
|
|
18110
18106
|
} else
|
|
18111
|
-
d(""), f(""), h("bar"), S({ xAxis: [], yAxis: [], series: [] }),
|
|
18107
|
+
d(""), f(""), h("bar"), S({ xAxis: [], yAxis: [], series: [] }), R({ showLegend: !0, showGrid: !0, showTooltip: !0, stacked: !1 }), y([]), A(""), _(null), k(null);
|
|
18112
18108
|
b(!1);
|
|
18113
18109
|
}
|
|
18114
18110
|
}, [e, n]);
|
|
@@ -18203,7 +18199,7 @@ function gy({
|
|
|
18203
18199
|
return {};
|
|
18204
18200
|
}
|
|
18205
18201
|
})() : {};
|
|
18206
|
-
|
|
18202
|
+
M(ae), I(!0);
|
|
18207
18203
|
}, z = (ae) => {
|
|
18208
18204
|
if (ae?.preventDefault(), ae?.stopPropagation(), !D.current) return;
|
|
18209
18205
|
const ee = D.current.getCurrentQuery(), ie = D.current.getValidationState(), _e = D.current.getValidationResult(), he = JSON.stringify(ee, null, 2);
|
|
@@ -18212,9 +18208,9 @@ function gy({
|
|
|
18212
18208
|
message: "Query validated in Query Builder"
|
|
18213
18209
|
}), A(he), k(_e)) : (_(null), A(""), k(null)), I(!1);
|
|
18214
18210
|
}, W = () => {
|
|
18215
|
-
I(!1),
|
|
18211
|
+
I(!1), M(null);
|
|
18216
18212
|
}, V = () => {
|
|
18217
|
-
d(""), f(""), h("bar"), S({ xAxis: [], yAxis: [], series: [] }),
|
|
18213
|
+
d(""), f(""), h("bar"), S({ xAxis: [], yAxis: [], series: [] }), R({ showLegend: !0, showGrid: !0, showTooltip: !0, stacked: !1 }), _(null), b(!1), A(""), k(null), I(!1), M(null), t();
|
|
18218
18214
|
}, te = !!n, re = l.trim() !== N.trim() && N !== "", me = v?.isValid && l.trim() === N.trim(), pe = x?.pivotQuery?.query ? {
|
|
18219
18215
|
dimensions: x.pivotQuery.query.dimensions || [],
|
|
18220
18216
|
timeDimensions: x.pivotQuery.query.timeDimensions?.map((ae) => ae.dimension) || [],
|
|
@@ -18351,7 +18347,7 @@ function gy({
|
|
|
18351
18347
|
availableFields: null,
|
|
18352
18348
|
colorPalette: i,
|
|
18353
18349
|
onChartConfigChange: S,
|
|
18354
|
-
onDisplayConfigChange:
|
|
18350
|
+
onDisplayConfigChange: R
|
|
18355
18351
|
}
|
|
18356
18352
|
) }) : !x || !me ? /* @__PURE__ */ u("div", { className: "flex-1 flex items-center justify-center border-2 border-dashed border-dc-border rounded-lg bg-dc-surface-secondary", children: /* @__PURE__ */ E("div", { className: "text-center text-dc-text-muted", children: [
|
|
18357
18353
|
/* @__PURE__ */ u("svg", { className: "h-8 w-8 mx-auto mb-2", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ u("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" }) }),
|
|
@@ -18365,7 +18361,7 @@ function gy({
|
|
|
18365
18361
|
availableFields: pe,
|
|
18366
18362
|
colorPalette: i,
|
|
18367
18363
|
onChartConfigChange: S,
|
|
18368
|
-
onDisplayConfigChange:
|
|
18364
|
+
onDisplayConfigChange: R
|
|
18369
18365
|
}
|
|
18370
18366
|
) })
|
|
18371
18367
|
] })
|
|
@@ -19937,12 +19933,12 @@ const IA = ({
|
|
|
19937
19933
|
if (m)
|
|
19938
19934
|
return o(t);
|
|
19939
19935
|
const T = t.cubes.map((C) => {
|
|
19940
|
-
const
|
|
19941
|
-
const
|
|
19942
|
-
return g.measures.has(
|
|
19936
|
+
const R = C.name, F = C.measures.filter((w) => {
|
|
19937
|
+
const M = w.name.includes(".") ? w.name : `${R}.${w.name}`;
|
|
19938
|
+
return g.measures.has(M);
|
|
19943
19939
|
}), I = C.dimensions.filter((w) => {
|
|
19944
|
-
const
|
|
19945
|
-
return g.dimensions.has(
|
|
19940
|
+
const M = w.name.includes(".") ? w.name : `${R}.${w.name}`;
|
|
19941
|
+
return g.dimensions.has(M) || g.timeDimensions.has(M);
|
|
19946
19942
|
});
|
|
19947
19943
|
return F.length > 0 || I.length > 0 ? {
|
|
19948
19944
|
...C,
|
|
@@ -20486,25 +20482,25 @@ const IA = ({
|
|
|
20486
20482
|
const S = e.filter((C) => C.id !== T);
|
|
20487
20483
|
s(S), d?.id === T && (l(null), m(!1));
|
|
20488
20484
|
}, [e, d, s]), _ = J(async (T) => {
|
|
20489
|
-
const S = e.findIndex((
|
|
20485
|
+
const S = e.findIndex((R) => R.id === T.id);
|
|
20490
20486
|
let C;
|
|
20491
20487
|
if (S >= 0 ? C = e.map(
|
|
20492
|
-
(
|
|
20488
|
+
(R) => R.id === T.id ? T : R
|
|
20493
20489
|
) : C = [...e, T], s(C), a)
|
|
20494
20490
|
try {
|
|
20495
20491
|
await a(C);
|
|
20496
|
-
} catch (
|
|
20497
|
-
throw console.error("Failed to save filters:",
|
|
20492
|
+
} catch (R) {
|
|
20493
|
+
throw console.error("Failed to save filters:", R), R;
|
|
20498
20494
|
}
|
|
20499
20495
|
}, [e, s, a]), N = J(() => {
|
|
20500
20496
|
l(null), m(!1);
|
|
20501
20497
|
}, []), A = J((T, S) => {
|
|
20502
|
-
const C = e.map((
|
|
20503
|
-
if (
|
|
20504
|
-
const F =
|
|
20498
|
+
const C = e.map((R) => {
|
|
20499
|
+
if (R.id === T) {
|
|
20500
|
+
const F = R.filter;
|
|
20505
20501
|
if ("member" in F)
|
|
20506
20502
|
return {
|
|
20507
|
-
...
|
|
20503
|
+
...R,
|
|
20508
20504
|
filter: {
|
|
20509
20505
|
...F,
|
|
20510
20506
|
dateRange: S,
|
|
@@ -20512,12 +20508,12 @@ const IA = ({
|
|
|
20512
20508
|
}
|
|
20513
20509
|
};
|
|
20514
20510
|
}
|
|
20515
|
-
return
|
|
20511
|
+
return R;
|
|
20516
20512
|
});
|
|
20517
20513
|
s(C);
|
|
20518
20514
|
}, [e, s]), x = J((T, S) => {
|
|
20519
20515
|
const C = e.map(
|
|
20520
|
-
(
|
|
20516
|
+
(R) => R.id === T ? S : R
|
|
20521
20517
|
);
|
|
20522
20518
|
s(C);
|
|
20523
20519
|
}, [e, s]), k = J((T) => r ? r.cubes.some(
|
|
@@ -20728,13 +20724,13 @@ function zA({
|
|
|
20728
20724
|
}, []);
|
|
20729
20725
|
const v = J((K) => {
|
|
20730
20726
|
b.current = K, d(K), K && p(yy(K));
|
|
20731
|
-
}, [d]), _ = f === "desktop" ? l : g, N = ue({}), A = ue({}), [x, k] = Z(!1), [T, S] = Z([]), [C,
|
|
20727
|
+
}, [d]), _ = f === "desktop" ? l : g, N = ue({}), A = ue({}), [x, k] = Z(!1), [T, S] = Z([]), [C, R] = Z(!1), [F, I] = Z(null);
|
|
20732
20728
|
ce(() => {
|
|
20733
20729
|
(!C || !h) && F && I(null);
|
|
20734
20730
|
}, [C, h, F]), ce(() => {
|
|
20735
|
-
!h && C &&
|
|
20731
|
+
!h && C && R(!1);
|
|
20736
20732
|
}, [h, C]);
|
|
20737
|
-
const [w,
|
|
20733
|
+
const [w, M] = Z(!1), [D, q] = Z(!1), [$, O] = Z(null), [B, j] = Z(!1), [Y, U] = Z(null), [L, H] = Z({});
|
|
20738
20734
|
ce(() => {
|
|
20739
20735
|
const K = setTimeout(() => {
|
|
20740
20736
|
k(!0);
|
|
@@ -20751,7 +20747,7 @@ function zA({
|
|
|
20751
20747
|
}, [e.portlets]), ce(() => {
|
|
20752
20748
|
const K = () => {
|
|
20753
20749
|
const oe = window.pageYOffset || document.documentElement.scrollTop;
|
|
20754
|
-
|
|
20750
|
+
M(oe > 20);
|
|
20755
20751
|
};
|
|
20756
20752
|
return window.addEventListener("scroll", K, { passive: !0 }), K(), () => {
|
|
20757
20753
|
window.removeEventListener("scroll", K);
|
|
@@ -21247,7 +21243,7 @@ function zA({
|
|
|
21247
21243
|
/* @__PURE__ */ E(
|
|
21248
21244
|
"button",
|
|
21249
21245
|
{
|
|
21250
|
-
onClick: () => h &&
|
|
21246
|
+
onClick: () => h && R(!C),
|
|
21251
21247
|
disabled: !h,
|
|
21252
21248
|
className: `inline-flex items-center px-4 py-2 text-sm font-medium rounded-md transition-colors focus:outline-hidden focus:ring-2 focus:ring-offset-2 ${h ? C ? "bg-dc-surface-secondary border border-dc-border hover:bg-dc-surface-hover" : "bg-dc-surface border border-dc-border hover:bg-dc-surface-hover" : "opacity-50 cursor-not-allowed bg-dc-surface-secondary border border-dc-border"}`,
|
|
21253
21249
|
style: {
|
|
@@ -21656,4 +21652,4 @@ export {
|
|
|
21656
21652
|
ow as u,
|
|
21657
21653
|
rb as w
|
|
21658
21654
|
};
|
|
21659
|
-
//# sourceMappingURL=components-
|
|
21655
|
+
//# sourceMappingURL=components-DRsjhKyD.js.map
|