@devtable/dashboard 14.56.1 → 14.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/filter/search-button/index.d.ts +1 -1
- package/dist/dashboard.es.js +337 -327
- package/dist/dashboard.umd.js +43 -43
- package/dist/index.d.ts +1 -0
- package/dist/stats.html +1 -1
- package/dist/version.json +2 -2
- package/package.json +1 -1
package/dist/dashboard.es.js
CHANGED
|
@@ -9,7 +9,7 @@ import C, { unset as Mh, get as de, isObject as ql, set as Ga, omit as dn, isFun
|
|
|
9
9
|
import { observable as Hl, runInAction as rr, toJS as xt, reaction as qe, makeAutoObservable as cr, computed as Nh, comparer as Bh, autorun as jh } from "mobx";
|
|
10
10
|
import wo from "eventemitter2";
|
|
11
11
|
import { jsx as r, Fragment as q, jsxs as u } from "react/jsx-runtime";
|
|
12
|
-
import E, { useId as Qh, useState as
|
|
12
|
+
import E, { useId as Qh, useState as Q, useEffect as N, useCallback as ne, useMemo as z, forwardRef as ee, useRef as wt, createContext as Wl, createElement as dr, useContext as ft, memo as Gh } from "react";
|
|
13
13
|
import Sn, { random as Fr } from "chroma-js";
|
|
14
14
|
import Ke from "echarts-for-react/lib/core";
|
|
15
15
|
import "echarts-gl";
|
|
@@ -2522,7 +2522,7 @@ class hi {
|
|
|
2522
2522
|
}), this.instanceRegistry.clear(), this.factoryRegistry.clear();
|
|
2523
2523
|
}
|
|
2524
2524
|
}
|
|
2525
|
-
const Ks = "14.
|
|
2525
|
+
const Ks = "14.57.0", Mg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2526
2526
|
__proto__: null,
|
|
2527
2527
|
version: Ks
|
|
2528
2528
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -2644,8 +2644,8 @@ class ve extends $g {
|
|
|
2644
2644
|
const Y = (e, t) => {
|
|
2645
2645
|
const [n, {
|
|
2646
2646
|
setFalse: a
|
|
2647
|
-
}] = we(!0), [i, o] =
|
|
2648
|
-
|
|
2647
|
+
}] = we(!0), [i, o] = Q();
|
|
2648
|
+
N(() => (e.getItem(t).then((s) => {
|
|
2649
2649
|
o(s), a();
|
|
2650
2650
|
}), e.watchItem(t, (s) => {
|
|
2651
2651
|
o(s);
|
|
@@ -3327,7 +3327,7 @@ const ye = (e) => (t, n) => {
|
|
|
3327
3327
|
} = y(), [a, {
|
|
3328
3328
|
setTrue: i,
|
|
3329
3329
|
setFalse: o
|
|
3330
|
-
}] = we(), [l, s] =
|
|
3330
|
+
}] = we(), [l, s] = Q(e), c = () => {
|
|
3331
3331
|
o();
|
|
3332
3332
|
const {
|
|
3333
3333
|
type: g,
|
|
@@ -3671,7 +3671,7 @@ const ff = gf(), bf = ({
|
|
|
3671
3671
|
}, d = (_) => (w) => {
|
|
3672
3672
|
const T = [...e];
|
|
3673
3673
|
T[_] = w, t(T);
|
|
3674
|
-
}, [h, p] =
|
|
3674
|
+
}, [h, p] = Q(""), g = () => {
|
|
3675
3675
|
h && (l(h), p(""));
|
|
3676
3676
|
};
|
|
3677
3677
|
return /* @__PURE__ */ u(D, { ref: a, children: [
|
|
@@ -3716,7 +3716,7 @@ const ff = gf(), bf = ({
|
|
|
3716
3716
|
handleSubmit: l,
|
|
3717
3717
|
reset: s
|
|
3718
3718
|
} = i;
|
|
3719
|
-
|
|
3719
|
+
N(() => {
|
|
3720
3720
|
s(e);
|
|
3721
3721
|
}, [e]);
|
|
3722
3722
|
const c = ne(() => s(e), [s, e]);
|
|
@@ -3947,7 +3947,7 @@ const nr = "data-value", Mf = nr, Cc = "dynamicColor", kc = Rs.create({
|
|
|
3947
3947
|
}
|
|
3948
3948
|
t(s);
|
|
3949
3949
|
};
|
|
3950
|
-
return
|
|
3950
|
+
return N(() => {
|
|
3951
3951
|
var c;
|
|
3952
3952
|
const s = (c = a.current) == null ? void 0 : c.getModel();
|
|
3953
3953
|
s && (s.getValue() || s.setValue(e));
|
|
@@ -3984,14 +3984,14 @@ const nr = "data-value", Mf = nr, Cc = "dynamicColor", kc = Rs.create({
|
|
|
3984
3984
|
}, o) => {
|
|
3985
3985
|
const {
|
|
3986
3986
|
t: l
|
|
3987
|
-
} = y(), [s, c] =
|
|
3987
|
+
} = y(), [s, c] = Q(e), d = () => {
|
|
3988
3988
|
t(s);
|
|
3989
3989
|
}, h = () => {
|
|
3990
3990
|
c(e);
|
|
3991
3991
|
}, p = () => {
|
|
3992
3992
|
c(a);
|
|
3993
3993
|
};
|
|
3994
|
-
|
|
3994
|
+
N(() => {
|
|
3995
3995
|
c(e);
|
|
3996
3996
|
}, [e]);
|
|
3997
3997
|
const g = ne((w, T) => {
|
|
@@ -4000,10 +4000,10 @@ const nr = "data-value", Mf = nr, Cc = "dynamicColor", kc = Rs.create({
|
|
|
4000
4000
|
const M = gm(T), $ = w.getModel();
|
|
4001
4001
|
if (M.initializeIn(w), M.addRestrictionsTo($, i), !!$ && !$._hasHighlight) {
|
|
4002
4002
|
M.toggleDevMode(), $.toggleHighlightOfEditableAreas();
|
|
4003
|
-
const
|
|
4003
|
+
const F = $.getCurrentEditableRanges(), H = $.getValueInEditableRanges();
|
|
4004
4004
|
console.debug({
|
|
4005
4005
|
model: $,
|
|
4006
|
-
currentRanges:
|
|
4006
|
+
currentRanges: F,
|
|
4007
4007
|
currentValue: H
|
|
4008
4008
|
});
|
|
4009
4009
|
}
|
|
@@ -4176,7 +4176,7 @@ const nr = "data-value", Mf = nr, Cc = "dynamicColor", kc = Rs.create({
|
|
|
4176
4176
|
content: e,
|
|
4177
4177
|
editable: !1
|
|
4178
4178
|
});
|
|
4179
|
-
|
|
4179
|
+
N(() => {
|
|
4180
4180
|
c == null || c.commands.setContent(e);
|
|
4181
4181
|
}, [e, c]);
|
|
4182
4182
|
const d = z(() => new DOMParser().parseFromString(e, "text/html"), [e]), h = z(() => If(d, a, i), [d, a, i]), p = z(() => of(d, i), [d, i]), g = z(() => C.defaultsDeep({}, {
|
|
@@ -4327,7 +4327,7 @@ const ra = ee(({
|
|
|
4327
4327
|
placeholder: "This is placeholder"
|
|
4328
4328
|
}), Ms, vs, zc, kc];
|
|
4329
4329
|
return c && $.push(pc), $;
|
|
4330
|
-
}, [c]), [h, p] =
|
|
4330
|
+
}, [c]), [h, p] = Q(e), g = () => {
|
|
4331
4331
|
t(h), i == null || i();
|
|
4332
4332
|
}, _ = Ls({
|
|
4333
4333
|
extensions: d,
|
|
@@ -4335,8 +4335,8 @@ const ra = ee(({
|
|
|
4335
4335
|
onUpdate: ({
|
|
4336
4336
|
editor: $
|
|
4337
4337
|
}) => {
|
|
4338
|
-
const
|
|
4339
|
-
p(
|
|
4338
|
+
const F = $.getHTML();
|
|
4339
|
+
p(F);
|
|
4340
4340
|
},
|
|
4341
4341
|
onCreate: ({
|
|
4342
4342
|
editor: $
|
|
@@ -4344,7 +4344,7 @@ const ra = ee(({
|
|
|
4344
4344
|
$.view.dom.setAttribute("spellcheck", "false"), $.view.dom.setAttribute("autocomplete", "off"), $.view.dom.setAttribute("autocapitalize", "off");
|
|
4345
4345
|
}
|
|
4346
4346
|
});
|
|
4347
|
-
|
|
4347
|
+
N(() => {
|
|
4348
4348
|
p(e), _ == null || _.commands.setContent(e);
|
|
4349
4349
|
}, [e]);
|
|
4350
4350
|
const w = e !== h, T = z(() => C.defaultsDeep({}, {
|
|
@@ -4463,8 +4463,8 @@ const Vc = ({
|
|
|
4463
4463
|
}) => {
|
|
4464
4464
|
const {
|
|
4465
4465
|
t: a
|
|
4466
|
-
} = y(), [i, o] =
|
|
4467
|
-
|
|
4466
|
+
} = y(), [i, o] = Q(e);
|
|
4467
|
+
N(() => {
|
|
4468
4468
|
n && o(e);
|
|
4469
4469
|
}, [e, n]);
|
|
4470
4470
|
const l = ne((s) => {
|
|
@@ -4509,11 +4509,11 @@ const Vc = ({
|
|
|
4509
4509
|
set: s,
|
|
4510
4510
|
setFalse: c,
|
|
4511
4511
|
toggle: d
|
|
4512
|
-
}] = we(), [h, p] =
|
|
4512
|
+
}] = we(), [h, p] = Q(!1), g = z(() => {
|
|
4513
4513
|
const M = [];
|
|
4514
4514
|
return Hf.forEach(($) => {
|
|
4515
|
-
const
|
|
4516
|
-
|
|
4515
|
+
const F = o.colors[$];
|
|
4516
|
+
F && F.forEach((H) => {
|
|
4517
4517
|
M.push(H);
|
|
4518
4518
|
});
|
|
4519
4519
|
}), M;
|
|
@@ -4920,7 +4920,7 @@ function ab({
|
|
|
4920
4920
|
min: de(U, w.columnKey),
|
|
4921
4921
|
max: de(oe, w.columnKey)
|
|
4922
4922
|
};
|
|
4923
|
-
}, [g, w]), $ = wt(null),
|
|
4923
|
+
}, [g, w]), $ = wt(null), F = z(() => ({
|
|
4924
4924
|
finished: () => {
|
|
4925
4925
|
var oe;
|
|
4926
4926
|
const U = (oe = $.current) == null ? void 0 : oe.getEchartsInstance();
|
|
@@ -4962,7 +4962,7 @@ function ab({
|
|
|
4962
4962
|
data: g.map((U) => [U[b.columnKey], U[_.columnKey], U[w.columnKey]])
|
|
4963
4963
|
}]
|
|
4964
4964
|
};
|
|
4965
|
-
return n ? /* @__PURE__ */ r(rt, { width: i, height: o, children: /* @__PURE__ */ r(Ke, { echarts: Ne, ref: $, option: H, style: gr(i, o), notMerge: !0, onEvents:
|
|
4965
|
+
return n ? /* @__PURE__ */ r(rt, { width: i, height: o, children: /* @__PURE__ */ r(Ke, { echarts: Ne, ref: $, option: H, style: gr(i, o), notMerge: !0, onEvents: F, theme: "merico-light" }) }) : null;
|
|
4966
4966
|
}
|
|
4967
4967
|
const X = I(ee(({
|
|
4968
4968
|
label: e,
|
|
@@ -5020,7 +5020,7 @@ function ib({
|
|
|
5020
5020
|
} = fe({
|
|
5021
5021
|
defaultValues: a
|
|
5022
5022
|
});
|
|
5023
|
-
return
|
|
5023
|
+
return N(() => {
|
|
5024
5024
|
l(a);
|
|
5025
5025
|
}, [t]), t ? /* @__PURE__ */ r(D, { gap: "xs", children: /* @__PURE__ */ u("form", { onSubmit: o(n), children: [
|
|
5026
5026
|
/* @__PURE__ */ r(k, { size: "sm", children: "X Axis" }),
|
|
@@ -5194,8 +5194,8 @@ const Xt = ee(({
|
|
|
5194
5194
|
} = y(), [o, {
|
|
5195
5195
|
setTrue: l,
|
|
5196
5196
|
setFalse: s
|
|
5197
|
-
}] = we(), [c, d] =
|
|
5198
|
-
|
|
5197
|
+
}] = we(), [c, d] = Q(e);
|
|
5198
|
+
N(() => {
|
|
5199
5199
|
d(e);
|
|
5200
5200
|
}, [e]);
|
|
5201
5201
|
const h = (T) => {
|
|
@@ -5490,8 +5490,8 @@ function Vn(e, t) {
|
|
|
5490
5490
|
}, [e, t]);
|
|
5491
5491
|
}
|
|
5492
5492
|
const yt = (e, t) => {
|
|
5493
|
-
const [n, a] =
|
|
5494
|
-
return
|
|
5493
|
+
const [n, a] = Q([]);
|
|
5494
|
+
return N(() => e.watchTriggerSnapshotList((i) => a(i.filter((o) => o.schemaRef === t))), []), n;
|
|
5495
5495
|
}, Ra = Wl(null);
|
|
5496
5496
|
function aa(e) {
|
|
5497
5497
|
const t = E.useContext(Ra), n = Wt(() => e.configure(t || new hi()), [e.configure]), a = Wh(n);
|
|
@@ -5738,7 +5738,9 @@ const Mb = {
|
|
|
5738
5738
|
"builtin:op:clear_filter_values": 2,
|
|
5739
5739
|
"builtin:op:set_filter_values": 3,
|
|
5740
5740
|
"builtin:op:open_view": 4,
|
|
5741
|
-
"builtin:op:open-link": 5
|
|
5741
|
+
"builtin:op:open-link": 5,
|
|
5742
|
+
"builtin:op:switch_tab": 6,
|
|
5743
|
+
"builtin:op:scroll_to_panel": 7
|
|
5742
5744
|
};
|
|
5743
5745
|
class Ti {
|
|
5744
5746
|
constructor(t, n, a) {
|
|
@@ -5764,10 +5766,10 @@ function Vb(e, t) {
|
|
|
5764
5766
|
const {
|
|
5765
5767
|
value: n,
|
|
5766
5768
|
set: a
|
|
5767
|
-
} = Y(e.operation.operationData, "config"), [i, o] =
|
|
5769
|
+
} = Y(e.operation.operationData, "config"), [i, o] = Q(me({}, n, t)), l = async () => {
|
|
5768
5770
|
await a(i);
|
|
5769
5771
|
};
|
|
5770
|
-
return
|
|
5772
|
+
return N(() => {
|
|
5771
5773
|
o(me({}, n, t));
|
|
5772
5774
|
}, [n]), {
|
|
5773
5775
|
config: i,
|
|
@@ -5903,8 +5905,8 @@ const Bb = {
|
|
|
5903
5905
|
value: e = "",
|
|
5904
5906
|
onChange: t
|
|
5905
5907
|
}) => {
|
|
5906
|
-
const [n, a] =
|
|
5907
|
-
return
|
|
5908
|
+
const [n, a] = Q(e);
|
|
5909
|
+
return N(() => {
|
|
5908
5910
|
a(e);
|
|
5909
5911
|
}, [e]), /* @__PURE__ */ r(L, { size: "xs", label: "", value: n, onChange: (o) => a(o.currentTarget.value), sx: {
|
|
5910
5912
|
flexGrow: 1
|
|
@@ -6299,7 +6301,7 @@ class Nc {
|
|
|
6299
6301
|
}
|
|
6300
6302
|
}
|
|
6301
6303
|
function sy(e, t) {
|
|
6302
|
-
const [n, a] =
|
|
6304
|
+
const [n, a] = Q([]);
|
|
6303
6305
|
return Qn(async () => {
|
|
6304
6306
|
const i = await e.getInteractionList();
|
|
6305
6307
|
a(i);
|
|
@@ -6331,7 +6333,7 @@ const cy = I(({
|
|
|
6331
6333
|
}), dy = (e) => {
|
|
6332
6334
|
const {
|
|
6333
6335
|
t
|
|
6334
|
-
} = y(), [n, a] =
|
|
6336
|
+
} = y(), [n, a] = Q(0), {
|
|
6335
6337
|
interactionManager: i,
|
|
6336
6338
|
instance: o,
|
|
6337
6339
|
sampleData: l,
|
|
@@ -6368,7 +6370,7 @@ const cy = I(({
|
|
|
6368
6370
|
} = Me(), n = e.viz, {
|
|
6369
6371
|
vizManager: a
|
|
6370
6372
|
} = ft(ln), i = e.json, o = Wt(() => a.getOrCreateInstance(i), [a, i]), l = Wt(() => new Nc(o, a.resolveComponent(n.type), Di), [o, n.type]);
|
|
6371
|
-
return
|
|
6373
|
+
return N(() => o.instanceData.watchItem(
|
|
6372
6374
|
null,
|
|
6373
6375
|
// avoid too many updates
|
|
6374
6376
|
Ph((s) => {
|
|
@@ -6639,10 +6641,10 @@ function Cy(e, t, n) {
|
|
|
6639
6641
|
stroke: i,
|
|
6640
6642
|
lineWidth: o
|
|
6641
6643
|
};
|
|
6642
|
-
return M.forEach((
|
|
6644
|
+
return M.forEach((F) => {
|
|
6643
6645
|
T.children.push({
|
|
6644
6646
|
type: "line",
|
|
6645
|
-
shape:
|
|
6647
|
+
shape: F,
|
|
6646
6648
|
style: $
|
|
6647
6649
|
});
|
|
6648
6650
|
}), T.children.push({
|
|
@@ -6995,8 +6997,8 @@ function Fy({
|
|
|
6995
6997
|
const $ = C.get(p, M.name, {
|
|
6996
6998
|
error: "rowData is not found"
|
|
6997
6999
|
});
|
|
6998
|
-
h.forEach((
|
|
6999
|
-
d.runInteraction(
|
|
7000
|
+
h.forEach((F) => {
|
|
7001
|
+
d.runInteraction(F.id, {
|
|
7000
7002
|
...M,
|
|
7001
7003
|
rowData: $
|
|
7002
7004
|
});
|
|
@@ -7152,7 +7154,7 @@ function jy(e) {
|
|
|
7152
7154
|
value: o
|
|
7153
7155
|
} = e, {
|
|
7154
7156
|
classes: l
|
|
7155
|
-
} = Wc(), [s, c] =
|
|
7157
|
+
} = Wc(), [s, c] = Q(qo(o)), [d, {
|
|
7156
7158
|
setTrue: h,
|
|
7157
7159
|
setFalse: p
|
|
7158
7160
|
}] = we(!1), g = i % 2 === 1, b = g && o != null, _ = !g && o != null, w = `map ${o} to color ${i}`, T = () => {
|
|
@@ -7161,7 +7163,7 @@ function jy(e) {
|
|
|
7161
7163
|
p(), n == null || n(Number(s));
|
|
7162
7164
|
}, $ = () => {
|
|
7163
7165
|
p(), n == null || n(null);
|
|
7164
|
-
},
|
|
7166
|
+
}, F = he(o ?? null, {
|
|
7165
7167
|
output: "number",
|
|
7166
7168
|
mantissa: 10,
|
|
7167
7169
|
trimMantissa: !0,
|
|
@@ -7171,7 +7173,7 @@ function jy(e) {
|
|
|
7171
7173
|
return /* @__PURE__ */ u("div", { "data-testid": `palette-item-${i}`, className: l.paletteItem, children: [
|
|
7172
7174
|
/* @__PURE__ */ r(k, { title: w, style: {
|
|
7173
7175
|
opacity: b ? 1 : 0
|
|
7174
|
-
}, c: "dimmed", size: "sm", className: "palette-value--up palette-value", children:
|
|
7176
|
+
}, c: "dimmed", size: "sm", className: "palette-value--up palette-value", children: F }),
|
|
7175
7177
|
/* @__PURE__ */ u(Xe, { width: 240, trapFocus: !0, opened: d, onClose: p, zIndex: 340, withinPortal: !0, children: [
|
|
7176
7178
|
/* @__PURE__ */ r(Xe.Target, { children: /* @__PURE__ */ r("div", { "data-testid": "palette-item-target", className: "palette-item", onClick: h, style: {
|
|
7177
7179
|
"--shadow-color": Sn(a).alpha(0.5).hex(),
|
|
@@ -7197,7 +7199,7 @@ function jy(e) {
|
|
|
7197
7199
|
] }),
|
|
7198
7200
|
/* @__PURE__ */ r(k, { title: w, style: {
|
|
7199
7201
|
opacity: _ ? 1 : 0
|
|
7200
|
-
}, c: "dimmed", size: "sm", className: "palette-value--bottom palette-value", children:
|
|
7202
|
+
}, c: "dimmed", size: "sm", className: "palette-value--bottom palette-value", children: F })
|
|
7201
7203
|
] });
|
|
7202
7204
|
}
|
|
7203
7205
|
const Qy = I(({
|
|
@@ -7209,7 +7211,7 @@ const Qy = I(({
|
|
|
7209
7211
|
return /* @__PURE__ */ r("div", { className: t.palette, children: n.map(([a, i], o) => /* @__PURE__ */ r(jy, { index: o, color: a, value: e.getStepFromValue(i), onChange: (l) => e.changeStep(l, i) }, a)) });
|
|
7210
7212
|
}), Gy = I(function(t) {
|
|
7211
7213
|
const n = Wt(() => new By(), []);
|
|
7212
|
-
return
|
|
7214
|
+
return N(() => {
|
|
7213
7215
|
n.fromProps(t);
|
|
7214
7216
|
}), n.interpolation == null ? null : /* @__PURE__ */ r(Qy, { model: n });
|
|
7215
7217
|
}), Hy = (e) => {
|
|
@@ -7220,13 +7222,13 @@ const Qy = I(({
|
|
|
7220
7222
|
value: a,
|
|
7221
7223
|
onChange: i,
|
|
7222
7224
|
colorManager: o
|
|
7223
|
-
} = e, l = o.getColorInterpolations(), [s, c] =
|
|
7225
|
+
} = e, l = o.getColorInterpolations(), [s, c] = Q(a), d = o.decodeInterpolation(s.interpolation) || l[0], [h, {
|
|
7224
7226
|
setTrue: p,
|
|
7225
7227
|
setFalse: g
|
|
7226
7228
|
}] = we(), b = z(() => {
|
|
7227
7229
|
const $ = C.groupBy(l, "category");
|
|
7228
|
-
return Object.entries($).map(([
|
|
7229
|
-
group: t(`style.color.interpolation.palette.category.${
|
|
7230
|
+
return Object.entries($).map(([F, H]) => ({
|
|
7231
|
+
group: t(`style.color.interpolation.palette.category.${F}`),
|
|
7230
7232
|
items: H.map((U) => ({
|
|
7231
7233
|
label: t(U.displayName),
|
|
7232
7234
|
value: o.encodeColor(U)
|
|
@@ -7234,8 +7236,8 @@ const Qy = I(({
|
|
|
7234
7236
|
}));
|
|
7235
7237
|
}, [n.language]);
|
|
7236
7238
|
function _($) {
|
|
7237
|
-
$ && c((
|
|
7238
|
-
...
|
|
7239
|
+
$ && c((F) => ({
|
|
7240
|
+
...F,
|
|
7239
7241
|
interpolation: $
|
|
7240
7242
|
}));
|
|
7241
7243
|
}
|
|
@@ -7243,8 +7245,8 @@ const Qy = I(({
|
|
|
7243
7245
|
g(), i == null || i(xt(s));
|
|
7244
7246
|
};
|
|
7245
7247
|
function T($) {
|
|
7246
|
-
c((
|
|
7247
|
-
...
|
|
7248
|
+
c((F) => ({
|
|
7249
|
+
...F,
|
|
7248
7250
|
steps: $
|
|
7249
7251
|
}));
|
|
7250
7252
|
}
|
|
@@ -7401,10 +7403,10 @@ const Qy = I(({
|
|
|
7401
7403
|
} = d, b = t(n), _ = h.map((U, oe) => ({
|
|
7402
7404
|
...U,
|
|
7403
7405
|
...b[oe]
|
|
7404
|
-
})), w = ((H = C.last(_)) == null ? void 0 : H.id) ?? null, [T, M] =
|
|
7406
|
+
})), w = ((H = C.last(_)) == null ? void 0 : H.id) ?? null, [T, M] = Q(w), $ = (U) => {
|
|
7405
7407
|
U !== "add" && M(U);
|
|
7406
7408
|
};
|
|
7407
|
-
return
|
|
7409
|
+
return N(() => {
|
|
7408
7410
|
M((U) => w === U ? U : w);
|
|
7409
7411
|
}, [w]), /* @__PURE__ */ u(S, { value: T, onChange: $, styles: Zy, children: [
|
|
7410
7412
|
/* @__PURE__ */ r(Xy, { fieldArray: d, add: () => {
|
|
@@ -7833,7 +7835,7 @@ function d_({
|
|
|
7833
7835
|
} = fe({
|
|
7834
7836
|
defaultValues: o
|
|
7835
7837
|
});
|
|
7836
|
-
return
|
|
7838
|
+
return N(() => {
|
|
7837
7839
|
h(o);
|
|
7838
7840
|
}, [o]), c(["x_axis", "y_axis", "reference_lines", "color", "dataZoom"]), /* @__PURE__ */ r(D, { gap: "xs", children: /* @__PURE__ */ u("form", { onSubmit: s(a), children: [
|
|
7839
7841
|
/* @__PURE__ */ r(Ie, { canSubmit: d.isDirty }),
|
|
@@ -8284,7 +8286,7 @@ function L_({
|
|
|
8284
8286
|
value: t,
|
|
8285
8287
|
set: n
|
|
8286
8288
|
} = Y(e.instanceData, "config"), a = z(() => Ue({}, t, Vi), [t]), i = a;
|
|
8287
|
-
|
|
8289
|
+
N(() => {
|
|
8288
8290
|
!Oe(a, i) && (console.log("config malformed, resetting to defaults", a, i), n(i));
|
|
8289
8291
|
}, [a, i]);
|
|
8290
8292
|
const {
|
|
@@ -8296,7 +8298,7 @@ function L_({
|
|
|
8296
8298
|
} = fe({
|
|
8297
8299
|
defaultValues: i
|
|
8298
8300
|
});
|
|
8299
|
-
return
|
|
8301
|
+
return N(() => {
|
|
8300
8302
|
d(i);
|
|
8301
8303
|
}, [i]), s(["content", "variant", "color", "size", "compact", "horizontal_align", "vertical_align"]), /* @__PURE__ */ u("form", { onSubmit: l(n), children: [
|
|
8302
8304
|
/* @__PURE__ */ r(Ie, { canSubmit: c.isDirty }),
|
|
@@ -8528,7 +8530,7 @@ const E_ = {
|
|
|
8528
8530
|
} = e, o = i(`visualMap.pieces.${t}`), {
|
|
8529
8531
|
lower: l,
|
|
8530
8532
|
upper: s
|
|
8531
|
-
} = o, c = [No[l.symbol], Bo(l.value, n("chart.visual_map.min_value")), ",", Bo(s.value, n("chart.visual_map.max_value")), No[s.symbol]].join(""), [d, h] =
|
|
8533
|
+
} = o, c = [No[l.symbol], Bo(l.value, n("chart.visual_map.min_value")), ",", Bo(s.value, n("chart.visual_map.max_value")), No[s.symbol]].join(""), [d, h] = Q(!1);
|
|
8532
8534
|
return /* @__PURE__ */ r(v, { wrap: "nowrap", children: /* @__PURE__ */ u(Xe, { width: 400, position: "bottom", withArrow: !0, shadow: "md", opened: d, onChange: h, withinPortal: !0, zIndex: 340, children: [
|
|
8533
8535
|
/* @__PURE__ */ r(Xe.Target, { children: /* @__PURE__ */ r(V, { variant: "subtle", size: "compact-sm", px: 0, onClick: () => h((p) => !p), fw: "normal", ff: "monospace", children: c }) }),
|
|
8534
8536
|
/* @__PURE__ */ r(Xe.Dropdown, { children: /* @__PURE__ */ u(v, { wrap: "nowrap", gap: 8, children: [
|
|
@@ -9054,18 +9056,18 @@ function dv(e) {
|
|
|
9054
9056
|
}
|
|
9055
9057
|
function uv(e, t, n) {
|
|
9056
9058
|
const a = n.reduce((M, $) => {
|
|
9057
|
-
const
|
|
9058
|
-
return M[$.name] = zt($,
|
|
9059
|
+
const F = Yt($, t);
|
|
9060
|
+
return M[$.name] = zt($, F), M;
|
|
9059
9061
|
}, {}), i = na(e.visualMap, a), {
|
|
9060
9062
|
min: o,
|
|
9061
9063
|
max: l
|
|
9062
9064
|
} = i, s = rv(e), c = G(e.calendar.data_key), d = G(e.heat_block.data_key), h = t[c.queryID].map((M) => {
|
|
9063
|
-
const $ = C.get(M, c.columnKey),
|
|
9064
|
-
value: [$,
|
|
9065
|
+
const $ = C.get(M, c.columnKey), F = C.get(M, d.columnKey), H = cv(M[c.columnKey]), U = {
|
|
9066
|
+
value: [$, F, H]
|
|
9065
9067
|
}, {
|
|
9066
9068
|
followVisualMap: oe,
|
|
9067
9069
|
color: te
|
|
9068
|
-
} = yi(
|
|
9070
|
+
} = yi(F, o, l, e.visualMap);
|
|
9069
9071
|
return oe || (U.visualMap = !1, U.itemStyle = {
|
|
9070
9072
|
color: te
|
|
9071
9073
|
}), U;
|
|
@@ -9276,7 +9278,7 @@ function xv({
|
|
|
9276
9278
|
value: n,
|
|
9277
9279
|
set: a
|
|
9278
9280
|
} = Y(e.instanceData, "config"), i = z(() => n ? me({}, n) : $i, [n]), o = z(() => C.cloneDeep(i), [i]);
|
|
9279
|
-
|
|
9281
|
+
N(() => {
|
|
9280
9282
|
!Oe(i, o) && (console.log("config malformed, resetting to defaults", i, o), a(o));
|
|
9281
9283
|
}, [i, o]);
|
|
9282
9284
|
const l = fe({
|
|
@@ -9288,7 +9290,7 @@ function xv({
|
|
|
9288
9290
|
formState: h,
|
|
9289
9291
|
reset: p
|
|
9290
9292
|
} = l;
|
|
9291
|
-
return
|
|
9293
|
+
return N(() => {
|
|
9292
9294
|
p(o);
|
|
9293
9295
|
}, [o]), /* @__PURE__ */ r(D, { gap: "xs", children: /* @__PURE__ */ u("form", { onSubmit: c(a), children: [
|
|
9294
9296
|
/* @__PURE__ */ r(Ie, { canSubmit: h.isDirty }),
|
|
@@ -10158,7 +10160,7 @@ const Zc = {
|
|
|
10158
10160
|
variables: l,
|
|
10159
10161
|
data: s
|
|
10160
10162
|
} = t, c = z(() => pn(e, l, i.payloadForViz, s), [e, l, s]), d = ((p = a.current) == null ? void 0 : p.textContent) === "";
|
|
10161
|
-
|
|
10163
|
+
N(() => {
|
|
10162
10164
|
if (!n || !a.current)
|
|
10163
10165
|
return;
|
|
10164
10166
|
const g = d ? 0 : a.current.offsetHeight;
|
|
@@ -10468,7 +10470,7 @@ function fx({
|
|
|
10468
10470
|
hide_in_legend: _,
|
|
10469
10471
|
areaStyle: w,
|
|
10470
10472
|
...T
|
|
10471
|
-
}, M, $,
|
|
10473
|
+
}, M, $, F, H) {
|
|
10472
10474
|
const U = t.type !== "category", oe = {
|
|
10473
10475
|
label: {
|
|
10474
10476
|
show: !!i,
|
|
@@ -10480,7 +10482,7 @@ function fx({
|
|
|
10480
10482
|
yAxisIndex: a,
|
|
10481
10483
|
stack: h,
|
|
10482
10484
|
color: p,
|
|
10483
|
-
symbolSize: gx(b, $, e,
|
|
10485
|
+
symbolSize: gx(b, $, e, F),
|
|
10484
10486
|
hide_in_legend: _,
|
|
10485
10487
|
labelLayout: {
|
|
10486
10488
|
hideOverlap: !0
|
|
@@ -10797,7 +10799,7 @@ function Dx({
|
|
|
10797
10799
|
}), [d]), w = (T) => {
|
|
10798
10800
|
p.current = T, Go(T);
|
|
10799
10801
|
};
|
|
10800
|
-
return
|
|
10802
|
+
return N(() => {
|
|
10801
10803
|
p.current && Go(p.current);
|
|
10802
10804
|
}, [h]), !n || !a ? null : /* @__PURE__ */ r(Ke, { echarts: Ne, option: h, style: {
|
|
10803
10805
|
width: n,
|
|
@@ -10818,7 +10820,7 @@ const Ix = I(({
|
|
|
10818
10820
|
} = e, o = z(() => me({}, a, Zc), [a]), l = e.data, {
|
|
10819
10821
|
width: s,
|
|
10820
10822
|
height: c
|
|
10821
|
-
} = e.viewport, [d, h] =
|
|
10823
|
+
} = e.viewport, [d, h] = Q(0), [p, g] = Q(0), b = Math.max(0, Dt(c) - d - p), _ = Tt(s), w = Ec(o.stats, e, t);
|
|
10822
10824
|
return /* @__PURE__ */ u(rt, { width: s, height: c, children: [
|
|
10823
10825
|
/* @__PURE__ */ r(Dn, { onHeightChange: h, value: o.stats.top, context: e }),
|
|
10824
10826
|
/* @__PURE__ */ r(Dx, { onChartRenderFinished: w, variables: i, width: _, height: b, data: l, conf: o, interactionManager: n }),
|
|
@@ -11202,7 +11204,7 @@ const Ax = ({
|
|
|
11202
11204
|
} = y(), [a, {
|
|
11203
11205
|
setTrue: i,
|
|
11204
11206
|
setFalse: o
|
|
11205
|
-
}] = we(), [l, s] =
|
|
11207
|
+
}] = we(), [l, s] = Q(e), c = () => {
|
|
11206
11208
|
o();
|
|
11207
11209
|
const {
|
|
11208
11210
|
type: g,
|
|
@@ -11294,7 +11296,7 @@ function Fx({
|
|
|
11294
11296
|
t: l,
|
|
11295
11297
|
i18n: s
|
|
11296
11298
|
} = y();
|
|
11297
|
-
|
|
11299
|
+
N(() => {
|
|
11298
11300
|
typeof t == "string" && n({
|
|
11299
11301
|
type: t,
|
|
11300
11302
|
config: {},
|
|
@@ -12044,7 +12046,7 @@ function ew({
|
|
|
12044
12046
|
} = fe({
|
|
12045
12047
|
defaultValues: o
|
|
12046
12048
|
});
|
|
12047
|
-
return
|
|
12049
|
+
return N(() => {
|
|
12048
12050
|
d(o);
|
|
12049
12051
|
}, [o]), c(["dataZoom"]), /* @__PURE__ */ r(D, { gap: "xs", children: /* @__PURE__ */ u("form", { onSubmit: s(t), children: [
|
|
12050
12052
|
/* @__PURE__ */ r(Ie, { canSubmit: h.isDirty }),
|
|
@@ -12426,8 +12428,8 @@ const mw = ({
|
|
|
12426
12428
|
}), o = t("series"), l = n.map((h, p) => ({
|
|
12427
12429
|
...h,
|
|
12428
12430
|
...o[p]
|
|
12429
|
-
})), s = C.get(l, "0.id"), [c, d] =
|
|
12430
|
-
return
|
|
12431
|
+
})), s = C.get(l, "0.id"), [c, d] = Q(s ?? null);
|
|
12432
|
+
return N(() => {
|
|
12431
12433
|
s && d((h) => h !== null ? h : s);
|
|
12432
12434
|
}, [s]), /* @__PURE__ */ u(S, { value: c, onChange: (h) => d(h), styles: {
|
|
12433
12435
|
panel: {
|
|
@@ -12457,7 +12459,7 @@ function fw({
|
|
|
12457
12459
|
} = fe({
|
|
12458
12460
|
defaultValues: a
|
|
12459
12461
|
});
|
|
12460
|
-
return
|
|
12462
|
+
return N(() => {
|
|
12461
12463
|
c(a);
|
|
12462
12464
|
}, [a]), /* @__PURE__ */ r(D, { gap: "xs", children: /* @__PURE__ */ u("form", { onSubmit: o(n), children: [
|
|
12463
12465
|
/* @__PURE__ */ r(Ie, { canSubmit: s.isDirty }),
|
|
@@ -12889,14 +12891,14 @@ function Aw(e, t, n, a) {
|
|
|
12889
12891
|
function ed(e, t, n, a, i, o) {
|
|
12890
12892
|
if (!e.x_axis.data_key || !e.y_axis.data_key || !e.heat_block.data_key)
|
|
12891
12893
|
return {};
|
|
12892
|
-
const l = a.reduce((
|
|
12894
|
+
const l = a.reduce((F, H) => {
|
|
12893
12895
|
const U = Yt(H, t);
|
|
12894
|
-
return
|
|
12896
|
+
return F[H.name] = zt(H, U), F;
|
|
12895
12897
|
}, {}), s = na(e.visualMap, l), {
|
|
12896
12898
|
min: c,
|
|
12897
12899
|
max: d
|
|
12898
|
-
} = s, h = Tw(e), p = Dw(e), g = G(e.x_axis.data_key), b = G(e.y_axis.data_key), _ = C.uniq(t[g.queryID].map((
|
|
12899
|
-
const H = C.clone(
|
|
12900
|
+
} = s, h = Tw(e), p = Dw(e), g = G(e.x_axis.data_key), b = G(e.y_axis.data_key), _ = C.uniq(t[g.queryID].map((F) => F[g.columnKey])), w = C.uniq(t[g.queryID].map((F) => F[b.columnKey])), T = n.map((F) => {
|
|
12901
|
+
const H = C.clone(F), {
|
|
12900
12902
|
followVisualMap: U,
|
|
12901
12903
|
color: oe
|
|
12902
12904
|
} = yi(H.value[2], c, d, e.visualMap);
|
|
@@ -13077,11 +13079,11 @@ function Bw({
|
|
|
13077
13079
|
totalPages: d,
|
|
13078
13080
|
groupedFullData: h
|
|
13079
13081
|
} = Ew(l, o);
|
|
13080
|
-
|
|
13082
|
+
N(() => {
|
|
13081
13083
|
const _ = Ha(h).flat();
|
|
13082
13084
|
nt(t, ed(o, l, _, i, s, c));
|
|
13083
13085
|
}, [h]);
|
|
13084
|
-
const [p, g] =
|
|
13086
|
+
const [p, g] = Q(1), b = Ow(h, o, p);
|
|
13085
13087
|
return !s || !c ? null : /* @__PURE__ */ u(rt, { width: s, height: c, children: [
|
|
13086
13088
|
o.pagination.page_size > 0 && /* @__PURE__ */ r(zw, { page: p, setPage: g, totalPages: d, width: s }),
|
|
13087
13089
|
/* @__PURE__ */ r(Nw, { instance: t, variables: i, width: Tt(s), height: Dt(c), data: l, seriesData: b, conf: o, interactionManager: n })
|
|
@@ -13306,7 +13308,7 @@ function Yw({
|
|
|
13306
13308
|
value: n,
|
|
13307
13309
|
set: a
|
|
13308
13310
|
} = Y(e.instanceData, "config"), i = z(() => n ? me({}, n) : Ni, [n]), o = z(() => C.cloneDeep(i), [i]);
|
|
13309
|
-
|
|
13311
|
+
N(() => {
|
|
13310
13312
|
!Oe(i, o) && (console.log("config malformed, resetting to defaults", i, o), a(o));
|
|
13311
13313
|
}, [i, o]);
|
|
13312
13314
|
const l = fe({
|
|
@@ -13318,7 +13320,7 @@ function Yw({
|
|
|
13318
13320
|
formState: h,
|
|
13319
13321
|
reset: p
|
|
13320
13322
|
} = l;
|
|
13321
|
-
return
|
|
13323
|
+
return N(() => {
|
|
13322
13324
|
p(o);
|
|
13323
13325
|
}, [o]), /* @__PURE__ */ r("form", { onSubmit: c(a), style: {
|
|
13324
13326
|
flexGrow: 1
|
|
@@ -13825,13 +13827,13 @@ function v0({
|
|
|
13825
13827
|
value_data_key: t,
|
|
13826
13828
|
valueTypedXAxis: _
|
|
13827
13829
|
}), $;
|
|
13828
|
-
const
|
|
13830
|
+
const F = _0({
|
|
13829
13831
|
group_by_key: o,
|
|
13830
13832
|
data: w,
|
|
13831
13833
|
name_data_key: e.data_key,
|
|
13832
13834
|
value_data_key: t
|
|
13833
13835
|
});
|
|
13834
|
-
return Object.entries(
|
|
13836
|
+
return Object.entries(F).map(([H, U]) => {
|
|
13835
13837
|
const oe = Fe($);
|
|
13836
13838
|
return oe.name = H, oe.color = void 0, oe.data = U, oe;
|
|
13837
13839
|
});
|
|
@@ -14034,7 +14036,7 @@ function M0({
|
|
|
14034
14036
|
} = e, o = z(() => me({}, a, Bi), [a]), l = e.data, {
|
|
14035
14037
|
width: s,
|
|
14036
14038
|
height: c
|
|
14037
|
-
} = e.viewport, [d, h] =
|
|
14039
|
+
} = e.viewport, [d, h] = Q(0), [p, g] = Q(0), b = Math.max(0, Dt(c) - d - p), _ = Tt(s), w = Ec(o.stats, e, t);
|
|
14038
14040
|
return /* @__PURE__ */ u(rt, { width: s, height: c, children: [
|
|
14039
14041
|
/* @__PURE__ */ r(Dn, { onHeightChange: h, value: o.stats.top, context: e }),
|
|
14040
14042
|
/* @__PURE__ */ r(I0, { onChartRenderFinished: w, variables: i, width: _, height: b, data: l, conf: o, interactionManager: n }),
|
|
@@ -14403,7 +14405,7 @@ function N0({
|
|
|
14403
14405
|
} = fe({
|
|
14404
14406
|
defaultValues: o
|
|
14405
14407
|
});
|
|
14406
|
-
return
|
|
14408
|
+
return N(() => {
|
|
14407
14409
|
h(o);
|
|
14408
14410
|
}, [o]), /* @__PURE__ */ r(D, { gap: "xs", children: /* @__PURE__ */ u("form", { onSubmit: s(a), children: [
|
|
14409
14411
|
/* @__PURE__ */ r(Ie, { canSubmit: d.isDirty }),
|
|
@@ -15291,8 +15293,8 @@ function w1({
|
|
|
15291
15293
|
} = a, {
|
|
15292
15294
|
estimated_value: d,
|
|
15293
15295
|
actual_value: h
|
|
15294
|
-
} = c.data_keys, [p, g] =
|
|
15295
|
-
if (
|
|
15296
|
+
} = c.data_keys, [p, g] = Q(h);
|
|
15297
|
+
if (N(() => {
|
|
15296
15298
|
g((w) => w || h);
|
|
15297
15299
|
}, [h]), !s.data_key || !d || !h || !o || !l)
|
|
15298
15300
|
return null;
|
|
@@ -15424,7 +15426,7 @@ function T1({
|
|
|
15424
15426
|
} = fe({
|
|
15425
15427
|
defaultValues: a
|
|
15426
15428
|
});
|
|
15427
|
-
return
|
|
15429
|
+
return N(() => {
|
|
15428
15430
|
c(a);
|
|
15429
15431
|
}, [a]), /* @__PURE__ */ r(D, { gap: "xs", children: /* @__PURE__ */ u("form", { onSubmit: o(n), children: [
|
|
15430
15432
|
/* @__PURE__ */ r(Ie, { canSubmit: s.isDirty }),
|
|
@@ -15776,7 +15778,7 @@ function N1({
|
|
|
15776
15778
|
value: n,
|
|
15777
15779
|
set: a
|
|
15778
15780
|
} = Y(e.instanceData, "config"), i = z(() => n ? me({}, n) : Qi, [n]), o = z(() => C.cloneDeep(i), [i]);
|
|
15779
|
-
|
|
15781
|
+
N(() => {
|
|
15780
15782
|
!Oe(i, o) && (console.log("config malformed, resetting to defaults", i, o), a(o));
|
|
15781
15783
|
}, [i, o]);
|
|
15782
15784
|
const l = fe({
|
|
@@ -15788,7 +15790,7 @@ function N1({
|
|
|
15788
15790
|
formState: h,
|
|
15789
15791
|
reset: p
|
|
15790
15792
|
} = l;
|
|
15791
|
-
return
|
|
15793
|
+
return N(() => {
|
|
15792
15794
|
p(o);
|
|
15793
15795
|
}, [o]), /* @__PURE__ */ r("form", { onSubmit: c(a), style: {
|
|
15794
15796
|
flexGrow: 1
|
|
@@ -16116,15 +16118,15 @@ function J1(e, t, n) {
|
|
|
16116
16118
|
min: s,
|
|
16117
16119
|
max: c
|
|
16118
16120
|
} = l, d = G(e.x_axis.data_key), h = G(e.y_axis.data_key), p = G(e.heat_block.data_key), g = C.uniq(t[d.queryID].map((w) => w[d.columnKey])), b = t[d.queryID].map((w) => {
|
|
16119
|
-
const T = C.get(w, d.columnKey), M = C.get(w, h.columnKey), $ = C.get(w, p.columnKey),
|
|
16121
|
+
const T = C.get(w, d.columnKey), M = C.get(w, h.columnKey), $ = C.get(w, p.columnKey), F = {
|
|
16120
16122
|
value: [T, M, $]
|
|
16121
16123
|
}, {
|
|
16122
16124
|
followVisualMap: H,
|
|
16123
16125
|
color: U
|
|
16124
16126
|
} = yi($, s, c, e.visualMap);
|
|
16125
|
-
return H || (
|
|
16127
|
+
return H || (F.visualMap = !1, F.itemStyle = {
|
|
16126
16128
|
color: U
|
|
16127
|
-
}),
|
|
16129
|
+
}), F;
|
|
16128
16130
|
});
|
|
16129
16131
|
return {
|
|
16130
16132
|
xAxis: X1(e, g, i.x_axis),
|
|
@@ -16426,7 +16428,7 @@ function vS({
|
|
|
16426
16428
|
} = Y(e.instanceData, "config"), n = z(() => me({}, t, Gi()), [t]), a = e.data, {
|
|
16427
16429
|
width: i,
|
|
16428
16430
|
height: o
|
|
16429
|
-
} = e.viewport, [l, s] =
|
|
16431
|
+
} = e.viewport, [l, s] = Q(0), [c, d] = Q(0), h = Math.max(0, Dt(o) - l - c), p = Tt(i);
|
|
16430
16432
|
return /* @__PURE__ */ u(rt, { width: i, height: o, children: [
|
|
16431
16433
|
/* @__PURE__ */ r(Dn, { onHeightChange: s, value: n.stats.top, context: e }),
|
|
16432
16434
|
/* @__PURE__ */ r(_S, { width: p, height: h, data: a, conf: n })
|
|
@@ -16674,7 +16676,7 @@ function MS({
|
|
|
16674
16676
|
formState: c,
|
|
16675
16677
|
reset: d
|
|
16676
16678
|
} = l;
|
|
16677
|
-
|
|
16679
|
+
N(() => {
|
|
16678
16680
|
l.reset(o);
|
|
16679
16681
|
}, [o]);
|
|
16680
16682
|
const h = z(() => [{
|
|
@@ -16957,7 +16959,7 @@ function qS({
|
|
|
16957
16959
|
} = fe({
|
|
16958
16960
|
defaultValues: i
|
|
16959
16961
|
});
|
|
16960
|
-
return
|
|
16962
|
+
return N(() => {
|
|
16961
16963
|
d(i);
|
|
16962
16964
|
}, [i]), /* @__PURE__ */ r("form", { onSubmit: l(n), children: /* @__PURE__ */ u(D, { gap: "xs", children: [
|
|
16963
16965
|
/* @__PURE__ */ r(Ie, { canSubmit: c.isDirty }),
|
|
@@ -17589,7 +17591,7 @@ const mC = (e, t) => `
|
|
|
17589
17591
|
const {
|
|
17590
17592
|
t: e,
|
|
17591
17593
|
i18n: t
|
|
17592
|
-
} = y(), [n, a] =
|
|
17594
|
+
} = y(), [n, a] = Q(!1), i = z(() => mC(e("viz.pareto_chart.line_80_20.param_section_note_1"), e("viz.pareto_chart.line_80_20.param_section_note_2")), [t.language]);
|
|
17593
17595
|
return /* @__PURE__ */ u(q, { children: [
|
|
17594
17596
|
/* @__PURE__ */ r(V, { variant: "subtle", size: "compact-sm", onClick: () => a((o) => !o), children: e(n ? "common.actions.close" : "viz.pareto_chart.line_80_20.click_to_see_params") }),
|
|
17595
17597
|
/* @__PURE__ */ r(hr, { in: n, children: /* @__PURE__ */ r(Et, { language: "typescript", withCopyButton: !1, code: i }) })
|
|
@@ -17788,7 +17790,7 @@ function xC({
|
|
|
17788
17790
|
} = fe({
|
|
17789
17791
|
defaultValues: o
|
|
17790
17792
|
});
|
|
17791
|
-
return
|
|
17793
|
+
return N(() => {
|
|
17792
17794
|
h(o);
|
|
17793
17795
|
}, [o]), c(["x_axis", "data_key", "bar", "line", "dataZoom"]), /* @__PURE__ */ u("form", { onSubmit: s(a), children: [
|
|
17794
17796
|
/* @__PURE__ */ r(Ie, { canSubmit: d.isDirty }),
|
|
@@ -18332,7 +18334,7 @@ const UC = ee(({
|
|
|
18332
18334
|
value: t,
|
|
18333
18335
|
onChange: n
|
|
18334
18336
|
}, a) => {
|
|
18335
|
-
const [i, o] =
|
|
18337
|
+
const [i, o] = Q(HC(t)), l = ne((s) => {
|
|
18336
18338
|
n(WC(s));
|
|
18337
18339
|
}, [n]);
|
|
18338
18340
|
return /* @__PURE__ */ u(D, { gap: 4, mt: 2, mb: "1rem", children: [
|
|
@@ -18522,7 +18524,7 @@ function tk({
|
|
|
18522
18524
|
} = fe({
|
|
18523
18525
|
defaultValues: i
|
|
18524
18526
|
});
|
|
18525
|
-
|
|
18527
|
+
N(() => {
|
|
18526
18528
|
d(i);
|
|
18527
18529
|
}, [i]);
|
|
18528
18530
|
const [h] = s(["label_field", "value_field", "color_field", "color"]), {
|
|
@@ -19031,8 +19033,8 @@ function kk({
|
|
|
19031
19033
|
const {
|
|
19032
19034
|
queryID: _,
|
|
19033
19035
|
columnKey: w
|
|
19034
|
-
} = G(e.series_name_key), T = C.keyBy(t[_], w), M = e.additional_series.reduce(($,
|
|
19035
|
-
const H = G(
|
|
19036
|
+
} = G(e.series_name_key), T = C.keyBy(t[_], w), M = e.additional_series.reduce(($, F) => {
|
|
19037
|
+
const H = G(F.name_key), U = C.keyBy(t[H.queryID], H.columnKey);
|
|
19036
19038
|
return {
|
|
19037
19039
|
...$,
|
|
19038
19040
|
...U
|
|
@@ -19215,7 +19217,7 @@ function Vk({
|
|
|
19215
19217
|
defaultValues: i,
|
|
19216
19218
|
mode: "all"
|
|
19217
19219
|
});
|
|
19218
|
-
return
|
|
19220
|
+
return N(() => {
|
|
19219
19221
|
c(i);
|
|
19220
19222
|
}, [i]), s(["series_name_key", "background", "label"]), /* @__PURE__ */ r("form", { onSubmit: l(a), children: /* @__PURE__ */ u(D, { gap: "xs", children: [
|
|
19221
19223
|
/* @__PURE__ */ r(Ie, { canSubmit: d.isDirty && d.isValid }),
|
|
@@ -19987,7 +19989,7 @@ function c2({
|
|
|
19987
19989
|
] });
|
|
19988
19990
|
}
|
|
19989
19991
|
const Sa = (e) => {
|
|
19990
|
-
const [t, n] =
|
|
19992
|
+
const [t, n] = Q(e);
|
|
19991
19993
|
return {
|
|
19992
19994
|
value: t,
|
|
19993
19995
|
set: n
|
|
@@ -20109,7 +20111,7 @@ function f2({
|
|
|
20109
20111
|
} = fe({
|
|
20110
20112
|
defaultValues: a
|
|
20111
20113
|
});
|
|
20112
|
-
return
|
|
20114
|
+
return N(() => {
|
|
20113
20115
|
c(a);
|
|
20114
20116
|
}, [a]), l(["x_axis", "regression"]), t ? /* @__PURE__ */ u("form", { onSubmit: o(n), children: [
|
|
20115
20117
|
/* @__PURE__ */ r(Ie, { canSubmit: s.isDirty }),
|
|
@@ -20220,7 +20222,7 @@ const y2 = {
|
|
|
20220
20222
|
} = fe({
|
|
20221
20223
|
defaultValues: o
|
|
20222
20224
|
});
|
|
20223
|
-
c("content"),
|
|
20225
|
+
c("content"), N(() => {
|
|
20224
20226
|
d(o);
|
|
20225
20227
|
}, [o]);
|
|
20226
20228
|
const h = wt(null), p = () => {
|
|
@@ -20937,17 +20939,17 @@ function J2(e, t) {
|
|
|
20937
20939
|
const g = X2(p, e), b = Ct(e.scatter.label_overflow.tooltip), _ = p.map(
|
|
20938
20940
|
// @ts-expect-error type of value
|
|
20939
20941
|
({
|
|
20940
|
-
value:
|
|
20942
|
+
value: F
|
|
20941
20943
|
}) => `
|
|
20942
20944
|
<th style="text-align: right; padding-right: 1em">
|
|
20943
|
-
<div style="${b}">${Sr(
|
|
20945
|
+
<div style="${b}">${Sr(F, n.name_data_key)}</div>
|
|
20944
20946
|
</th>
|
|
20945
20947
|
`
|
|
20946
20948
|
);
|
|
20947
20949
|
_.unshift("<th></th>");
|
|
20948
20950
|
const w = Ct(e.x_axis.axisLabel.overflow.in_tooltip), T = [`<tr>
|
|
20949
20951
|
<th style="text-align: right; padding: 0 1em;">${e.x_axis.name}</th>
|
|
20950
|
-
${p.map((
|
|
20952
|
+
${p.map((F) => `
|
|
20951
20953
|
<td style="text-align: left; padding: 0 2px 0 1em;">
|
|
20952
20954
|
<div style="${w}">
|
|
20953
20955
|
${g}
|
|
@@ -20957,21 +20959,21 @@ function J2(e, t) {
|
|
|
20957
20959
|
</tr>`, `<tr>
|
|
20958
20960
|
<th style="text-align: right; padding: 0 1em;">${e.y_axes[0].name}</th>
|
|
20959
20961
|
${p.map(({
|
|
20960
|
-
value:
|
|
20962
|
+
value: F
|
|
20961
20963
|
}) => `
|
|
20962
20964
|
<td style="text-align: left; padding: 0 2px 0 1em;">
|
|
20963
|
-
${h(Sr(
|
|
20965
|
+
${h(Sr(F, n.y_data_key))}
|
|
20964
20966
|
<strong>${s ?? ""}</strong>
|
|
20965
20967
|
</td>`).join("")}
|
|
20966
|
-
</tr>`], M = e.tooltip.metrics.map((
|
|
20968
|
+
</tr>`], M = e.tooltip.metrics.map((F) => `
|
|
20967
20969
|
<tr>
|
|
20968
|
-
<th style="text-align: right; padding: 0 1em;">${
|
|
20970
|
+
<th style="text-align: right; padding: 0 1em;">${F.name}</th>
|
|
20969
20971
|
${p.map(({
|
|
20970
20972
|
value: H
|
|
20971
20973
|
}) => `
|
|
20972
20974
|
<td style="text-align: left; padding: 0 2px 0 1em;">
|
|
20973
|
-
${Z2(Sr(H,
|
|
20974
|
-
<strong>${c[
|
|
20975
|
+
${Z2(Sr(H, F.data_key))}
|
|
20976
|
+
<strong>${c[F.name] ?? ""}</strong>
|
|
20975
20977
|
</td>`).join("")}
|
|
20976
20978
|
</tr>`);
|
|
20977
20979
|
return T.push(...M), `
|
|
@@ -21139,7 +21141,7 @@ function iz({
|
|
|
21139
21141
|
} = e, o = z(() => me({}, a, bd), [a]), l = e.data, {
|
|
21140
21142
|
width: s,
|
|
21141
21143
|
height: c
|
|
21142
|
-
} = e.viewport, [d, h] =
|
|
21144
|
+
} = e.viewport, [d, h] = Q(0), [p, g] = Q(0), b = Math.max(0, Dt(c) - d - p), _ = Tt(s);
|
|
21143
21145
|
return !s || !c ? null : /* @__PURE__ */ u(rt, { width: s, height: c, children: [
|
|
21144
21146
|
/* @__PURE__ */ r(Dn, { onHeightChange: h, value: o.stats.top, context: e }),
|
|
21145
21147
|
/* @__PURE__ */ r(az, { instance: t, variables: i, width: _, height: b, data: l, conf: o, interactionManager: n }),
|
|
@@ -21368,7 +21370,7 @@ const uz = ({
|
|
|
21368
21370
|
} = y(), [a, {
|
|
21369
21371
|
setTrue: i,
|
|
21370
21372
|
setFalse: o
|
|
21371
|
-
}] = we(), [l, s] =
|
|
21373
|
+
}] = we(), [l, s] = Q(e), c = () => {
|
|
21372
21374
|
o();
|
|
21373
21375
|
const {
|
|
21374
21376
|
type: g,
|
|
@@ -21739,7 +21741,7 @@ function kz({
|
|
|
21739
21741
|
} = fe({
|
|
21740
21742
|
defaultValues: o
|
|
21741
21743
|
});
|
|
21742
|
-
return
|
|
21744
|
+
return N(() => {
|
|
21743
21745
|
d(o);
|
|
21744
21746
|
}, [o]), c(["dataZoom"]), /* @__PURE__ */ r(D, { gap: "xs", children: /* @__PURE__ */ u("form", { onSubmit: s(t), children: [
|
|
21745
21747
|
/* @__PURE__ */ r(Ie, { canSubmit: h.isDirty }),
|
|
@@ -21992,7 +21994,7 @@ const Nz = I(({
|
|
|
21992
21994
|
const _ = l.viz.conf.config;
|
|
21993
21995
|
return _.content ? pn(_.content, d, o.payloadForViz, c) : "";
|
|
21994
21996
|
}, [c, l, d, o.payloadForViz]);
|
|
21995
|
-
|
|
21997
|
+
N(() => {
|
|
21996
21998
|
nt(t, {
|
|
21997
21999
|
content: g
|
|
21998
22000
|
});
|
|
@@ -22004,7 +22006,7 @@ const Nz = I(({
|
|
|
22004
22006
|
});
|
|
22005
22007
|
});
|
|
22006
22008
|
}, [l.variableValueMap, i, a]);
|
|
22007
|
-
return
|
|
22009
|
+
return N(() => {
|
|
22008
22010
|
if (!n.current)
|
|
22009
22011
|
return;
|
|
22010
22012
|
const _ = n.current.querySelector(".ProseMirror");
|
|
@@ -22013,8 +22015,8 @@ const Nz = I(({
|
|
|
22013
22015
|
const {
|
|
22014
22016
|
offsetWidth: w,
|
|
22015
22017
|
offsetHeight: T
|
|
22016
|
-
} = _, M = h / w, $ = p / T,
|
|
22017
|
-
_.style.transform = `scale(${
|
|
22018
|
+
} = _, M = h / w, $ = p / T, F = Math.min(M, $);
|
|
22019
|
+
_.style.transform = `scale(${F})`;
|
|
22018
22020
|
}, [n.current, h, p, g]), /* @__PURE__ */ r(Be, { className: "viz-stats", sx: {
|
|
22019
22021
|
width: h,
|
|
22020
22022
|
height: p
|
|
@@ -22424,10 +22426,10 @@ function s3({
|
|
|
22424
22426
|
} = fe({
|
|
22425
22427
|
defaultValues: o
|
|
22426
22428
|
});
|
|
22427
|
-
|
|
22429
|
+
N(() => {
|
|
22428
22430
|
h(o);
|
|
22429
22431
|
}, [o]), c(["label_key", "value_key", "group_key", "levels"]);
|
|
22430
|
-
const [p, g] =
|
|
22432
|
+
const [p, g] = Q("Data");
|
|
22431
22433
|
return /* @__PURE__ */ r("form", { onSubmit: s(a), children: /* @__PURE__ */ u(D, { gap: "xs", children: [
|
|
22432
22434
|
/* @__PURE__ */ r(Ie, { canSubmit: d.isDirty }),
|
|
22433
22435
|
/* @__PURE__ */ u(S, { value: p, onChange: g, orientation: "vertical", styles: {
|
|
@@ -23278,17 +23280,17 @@ function nl({
|
|
|
23278
23280
|
minSize: typeof Ee.width == "number" ? Ee.width : void 0
|
|
23279
23281
|
});
|
|
23280
23282
|
});
|
|
23281
|
-
}, [g, b]), [w, T] =
|
|
23283
|
+
}, [g, b]), [w, T] = Q([]), [M, $] = E.useState({
|
|
23282
23284
|
pageIndex: 0,
|
|
23283
23285
|
pageSize: a.pagination.page_size
|
|
23284
|
-
}),
|
|
23286
|
+
}), F = z(() => {
|
|
23285
23287
|
const {
|
|
23286
23288
|
pageIndex: ct,
|
|
23287
23289
|
pageSize: at
|
|
23288
23290
|
} = M;
|
|
23289
23291
|
return at === 0 ? e : e.slice(ct * at, (ct + 1) * at);
|
|
23290
23292
|
}, [e, M]), H = Math.ceil(e.length / M.pageSize), U = di({
|
|
23291
|
-
data:
|
|
23293
|
+
data: F,
|
|
23292
23294
|
state: {
|
|
23293
23295
|
sorting: w
|
|
23294
23296
|
},
|
|
@@ -23502,7 +23504,7 @@ const n5 = ee((e, t) => {
|
|
|
23502
23504
|
t: n
|
|
23503
23505
|
} = y(), {
|
|
23504
23506
|
colorManager: a
|
|
23505
|
-
} = ft(ln), [i, o] =
|
|
23507
|
+
} = ft(ln), [i, o] = Q(Dd(e.value)), [l, s] = Q(e5(a, e.value)), c = zr(l), [d, h] = Q(t5(a, e.value)), p = zr(d), g = (w) => {
|
|
23506
23508
|
var T, M, $;
|
|
23507
23509
|
o(w || "none"), w === "static" ? (T = e.onChange) == null || T.call(e, c.current) : w === "none" || !w ? (M = e.onChange) == null || M.call(e, "none") : ($ = e.onChange) == null || $.call(e, p.current);
|
|
23508
23510
|
}, b = (w) => {
|
|
@@ -23539,14 +23541,14 @@ const n5 = ee((e, t) => {
|
|
|
23539
23541
|
} = y(), [i, {
|
|
23540
23542
|
setTrue: o,
|
|
23541
23543
|
setFalse: l
|
|
23542
|
-
}] = we(), [s, c] =
|
|
23544
|
+
}] = we(), [s, c] = Q(e), d = () => {
|
|
23543
23545
|
l(), t(s);
|
|
23544
23546
|
}, h = () => {
|
|
23545
23547
|
l(), c(e);
|
|
23546
23548
|
}, p = () => {
|
|
23547
23549
|
c(xd);
|
|
23548
23550
|
};
|
|
23549
|
-
return
|
|
23551
|
+
return N(() => {
|
|
23550
23552
|
c(e);
|
|
23551
23553
|
}, [e]), /* @__PURE__ */ u(q, { children: [
|
|
23552
23554
|
/* @__PURE__ */ r(V, { color: "grape", variant: "filled", leftSection: /* @__PURE__ */ r(an, { size: 16 }), mt: 24, onClick: o, sx: {
|
|
@@ -23733,7 +23735,7 @@ function d5({
|
|
|
23733
23735
|
value: n,
|
|
23734
23736
|
set: a
|
|
23735
23737
|
} = Y(e.instanceData, "config"), i = z(() => Ue({}, n, wd), [n]), o = z(() => c5(i), [i]);
|
|
23736
|
-
|
|
23738
|
+
N(() => {
|
|
23737
23739
|
!Oe(i, o) && (console.log("config malformed, resetting to defaults", i, o), a(o));
|
|
23738
23740
|
}, [i, o]);
|
|
23739
23741
|
const {
|
|
@@ -23745,7 +23747,7 @@ function d5({
|
|
|
23745
23747
|
} = fe({
|
|
23746
23748
|
defaultValues: o
|
|
23747
23749
|
});
|
|
23748
|
-
return
|
|
23750
|
+
return N(() => {
|
|
23749
23751
|
h(o);
|
|
23750
23752
|
}, [o]), c(["query_id"]), /* @__PURE__ */ u("form", { onSubmit: s(a), children: [
|
|
23751
23753
|
/* @__PURE__ */ r(Ie, { canSubmit: d.isDirty }),
|
|
@@ -23872,14 +23874,14 @@ const p5 = E.forwardRef(h5), m5 = ({
|
|
|
23872
23874
|
} = y(), [i, {
|
|
23873
23875
|
setTrue: o,
|
|
23874
23876
|
setFalse: l
|
|
23875
|
-
}] = we(), [s, c] =
|
|
23877
|
+
}] = we(), [s, c] = Q(e), d = () => {
|
|
23876
23878
|
l(), t(s);
|
|
23877
23879
|
}, h = () => {
|
|
23878
23880
|
l(), c(e);
|
|
23879
23881
|
}, p = () => {
|
|
23880
23882
|
c(Id);
|
|
23881
23883
|
};
|
|
23882
|
-
return
|
|
23884
|
+
return N(() => {
|
|
23883
23885
|
c(e);
|
|
23884
23886
|
}, [e]), /* @__PURE__ */ u(q, { children: [
|
|
23885
23887
|
/* @__PURE__ */ r(V, { color: "grape", variant: "filled", leftSection: /* @__PURE__ */ r(an, { size: 16 }), mt: 24, onClick: o, sx: {
|
|
@@ -23919,7 +23921,7 @@ function f5({
|
|
|
23919
23921
|
font_weight: _
|
|
23920
23922
|
};
|
|
23921
23923
|
}, [i]);
|
|
23922
|
-
|
|
23924
|
+
N(() => {
|
|
23923
23925
|
!Oe(i, o) && (console.log("config malformed, resetting to defaults", i, o), a(o));
|
|
23924
23926
|
}, [i, o]);
|
|
23925
23927
|
const {
|
|
@@ -24258,7 +24260,7 @@ function G5({
|
|
|
24258
24260
|
formState: l,
|
|
24259
24261
|
reset: s
|
|
24260
24262
|
} = i;
|
|
24261
|
-
return
|
|
24263
|
+
return N(() => {
|
|
24262
24264
|
s(a);
|
|
24263
24265
|
}, [a]), /* @__PURE__ */ u("form", { onSubmit: o(n), children: [
|
|
24264
24266
|
/* @__PURE__ */ r(Ie, { canSubmit: l.isDirty }),
|
|
@@ -24438,7 +24440,7 @@ function nT({
|
|
|
24438
24440
|
} = fe({
|
|
24439
24441
|
defaultValues: a
|
|
24440
24442
|
});
|
|
24441
|
-
return
|
|
24443
|
+
return N(() => {
|
|
24442
24444
|
c(a);
|
|
24443
24445
|
}, [a]), l(["expertSystemURL", "goal", "path", "question"]), /* @__PURE__ */ r("form", { onSubmit: o(n), children: /* @__PURE__ */ u(D, { children: [
|
|
24444
24446
|
/* @__PURE__ */ u(v, { grow: !0, children: [
|
|
@@ -24675,8 +24677,8 @@ const fT = ({
|
|
|
24675
24677
|
} = y(), [n, {
|
|
24676
24678
|
setTrue: a,
|
|
24677
24679
|
setFalse: i
|
|
24678
|
-
}] = we(!1), [o, l] =
|
|
24679
|
-
|
|
24680
|
+
}] = we(!1), [o, l] = Q("");
|
|
24681
|
+
N(() => {
|
|
24680
24682
|
l("");
|
|
24681
24683
|
}, [n]);
|
|
24682
24684
|
const s = () => {
|
|
@@ -24751,7 +24753,7 @@ function yT({
|
|
|
24751
24753
|
formState: s,
|
|
24752
24754
|
reset: c
|
|
24753
24755
|
} = o;
|
|
24754
|
-
return
|
|
24756
|
+
return N(() => {
|
|
24755
24757
|
o.reset(i);
|
|
24756
24758
|
}, [i]), /* @__PURE__ */ u("form", { onSubmit: l((h) => {
|
|
24757
24759
|
const p = h;
|
|
@@ -24886,7 +24888,7 @@ function Ad({
|
|
|
24886
24888
|
lang: e,
|
|
24887
24889
|
children: t
|
|
24888
24890
|
}) {
|
|
24889
|
-
return
|
|
24891
|
+
return N(() => {
|
|
24890
24892
|
Rr.changeLanguage(e);
|
|
24891
24893
|
}, [e]), /* @__PURE__ */ r(Dh, { i18n: Rr, children: t });
|
|
24892
24894
|
}
|
|
@@ -25866,7 +25868,7 @@ const Fd = m.model("DBQueryMeta", {
|
|
|
25866
25868
|
e.value = t;
|
|
25867
25869
|
}
|
|
25868
25870
|
}));
|
|
25869
|
-
var
|
|
25871
|
+
var j = /* @__PURE__ */ ((e) => (e.Select = "select", e.MultiSelect = "multi-select", e.TreeSelect = "tree-select", e.TreeSingleSelect = "tree-single-select", e.TextInput = "text-input", e.Checkbox = "checkbox", e.DateRange = "date-range", e.MericoDateRange = "merico-date-range", e))(j || {});
|
|
25870
25872
|
const Qd = m.optional(m.enumeration(["intersect", "reset"]), "intersect"), Gd = m.model("FilterCheckboxConfigMeta", {
|
|
25871
25873
|
_name: m.literal("checkbox"),
|
|
25872
25874
|
description: m.optional(m.string, ""),
|
|
@@ -26518,20 +26520,20 @@ const jT = m.model("FilterDateRangeConfigMeta", {
|
|
|
26518
26520
|
`, eu = () => {
|
|
26519
26521
|
const {
|
|
26520
26522
|
t: e
|
|
26521
|
-
} = y(), [t, n] =
|
|
26523
|
+
} = y(), [t, n] = Q(!1);
|
|
26522
26524
|
return /* @__PURE__ */ u(q, { children: [
|
|
26523
26525
|
/* @__PURE__ */ r(V, { variant: "subtle", size: "compact-sm", onClick: () => n((a) => !a), children: e(t ? "common.actions.close" : "filter.widget.common.see_data_structure") }),
|
|
26524
26526
|
/* @__PURE__ */ r(hr, { in: t, children: /* @__PURE__ */ r(Et, { language: "typescript", withCopyButton: !1, code: WT }) })
|
|
26525
26527
|
] });
|
|
26526
26528
|
}, UT = {
|
|
26527
|
-
[
|
|
26528
|
-
[
|
|
26529
|
-
[
|
|
26530
|
-
[
|
|
26531
|
-
[
|
|
26532
|
-
[
|
|
26533
|
-
[
|
|
26534
|
-
[
|
|
26529
|
+
[j.Checkbox]: "true",
|
|
26530
|
+
[j.DateRange]: "[new Date('2023-01-01 00:00:00'), new Date('2024-01-01 00:00:00')]",
|
|
26531
|
+
[j.MericoDateRange]: "[new Date('2023-01-01 00:00:00'), new Date('2024-01-01 00:00:00')]",
|
|
26532
|
+
[j.MultiSelect]: "[]",
|
|
26533
|
+
[j.Select]: '""',
|
|
26534
|
+
[j.TreeSelect]: "[]",
|
|
26535
|
+
[j.TreeSingleSelect]: '""',
|
|
26536
|
+
[j.TextInput]: '""'
|
|
26535
26537
|
}, KT = (e) => ["function getDefaultValue(filter, utils, context) {", ` return ${UT[e]};`, "}"].join(`
|
|
26536
26538
|
`), vn = I(({
|
|
26537
26539
|
filter: e
|
|
@@ -26966,9 +26968,9 @@ const jT = m.model("FilterDateRangeConfigMeta", {
|
|
|
26966
26968
|
radius: t,
|
|
26967
26969
|
width: n.width,
|
|
26968
26970
|
name: "FilterTreeSelectWidget"
|
|
26969
|
-
}), [b, _] =
|
|
26971
|
+
}), [b, _] = Q(!1), w = (H) => {
|
|
26970
26972
|
_(H);
|
|
26971
|
-
}, T = b && (i == null ? void 0 : i.length) > 0, M = tD(l, i, o, d), [$,
|
|
26973
|
+
}, T = b && (i == null ? void 0 : i.length) > 0, M = tD(l, i, o, d), [$, F] = Q("");
|
|
26972
26974
|
return /* @__PURE__ */ u(D, { gap: 3, children: [
|
|
26973
26975
|
/* @__PURE__ */ u(v, { justify: "space-between", children: [
|
|
26974
26976
|
/* @__PURE__ */ u(k, { className: p.label, size: "sm", children: [
|
|
@@ -27012,7 +27014,7 @@ const jT = m.model("FilterDateRangeConfigMeta", {
|
|
|
27012
27014
|
count: i.length
|
|
27013
27015
|
}),
|
|
27014
27016
|
searchValue: $,
|
|
27015
|
-
onSearch:
|
|
27017
|
+
onSearch: F,
|
|
27016
27018
|
dropdownRender: (H) => /* @__PURE__ */ u(q, { children: [
|
|
27017
27019
|
M.allValueSet.size > 0 && !$ && /* @__PURE__ */ r(v, { px: "xs", pt: 8, pb: 8, onClick: M.toggleSelectAll, styles: nD, children: /* @__PURE__ */ r(J, { size: "xs", checked: M.allSelected, onChange: C.noop, label: h("common.actions.select_all") }) }),
|
|
27018
27020
|
/* @__PURE__ */ r(A, {}),
|
|
@@ -27920,7 +27922,7 @@ const fD = m.model("FilterMericoDateRangeConfigMeta", {
|
|
|
27920
27922
|
visibleInViewsIDs: m.array(m.string),
|
|
27921
27923
|
auto_submit: m.optional(m.boolean, !1),
|
|
27922
27924
|
default_value_func: m.optional(m.string, ""),
|
|
27923
|
-
type: m.enumeration("DashboardFilterType", [
|
|
27925
|
+
type: m.enumeration("DashboardFilterType", [j.Select, j.MultiSelect, j.TreeSelect, j.TreeSingleSelect, j.TextInput, j.Checkbox, j.DateRange, j.MericoDateRange]),
|
|
27924
27926
|
config: m.union(Xd, Yd, iu, ou, Zd, Gd, Kd, du)
|
|
27925
27927
|
}).views((e) => ({
|
|
27926
27928
|
get contentModel() {
|
|
@@ -27937,7 +27939,7 @@ const fD = m.model("FilterMericoDateRangeConfigMeta", {
|
|
|
27937
27939
|
return Array.isArray(t) ? [...t] : t;
|
|
27938
27940
|
},
|
|
27939
27941
|
get usingDefaultValue() {
|
|
27940
|
-
return e.type !==
|
|
27942
|
+
return e.type !== j.TreeSelect && e.type !== j.TreeSingleSelect;
|
|
27941
27943
|
},
|
|
27942
27944
|
get usingDefaultValueFunc() {
|
|
27943
27945
|
return !!e.default_value_func;
|
|
@@ -27946,7 +27948,7 @@ const fD = m.model("FilterMericoDateRangeConfigMeta", {
|
|
|
27946
27948
|
return this.filters.formattedDefaultValues[e.key];
|
|
27947
27949
|
},
|
|
27948
27950
|
get auto_submit_supported() {
|
|
27949
|
-
return [
|
|
27951
|
+
return [j.Select, j.Checkbox, j.DateRange].includes(e.type);
|
|
27950
27952
|
}
|
|
27951
27953
|
})).views((e) => ({
|
|
27952
27954
|
get json() {
|
|
@@ -27999,28 +28001,28 @@ const fD = m.model("FilterMericoDateRangeConfigMeta", {
|
|
|
27999
28001
|
},
|
|
28000
28002
|
setType(t) {
|
|
28001
28003
|
switch (t) {
|
|
28002
|
-
case
|
|
28004
|
+
case j.Select:
|
|
28003
28005
|
e.config = HT();
|
|
28004
28006
|
break;
|
|
28005
|
-
case
|
|
28007
|
+
case j.MultiSelect:
|
|
28006
28008
|
e.config = GT();
|
|
28007
28009
|
break;
|
|
28008
|
-
case
|
|
28010
|
+
case j.TreeSelect:
|
|
28009
28011
|
e.config = uD();
|
|
28010
28012
|
break;
|
|
28011
|
-
case
|
|
28013
|
+
case j.TreeSingleSelect:
|
|
28012
28014
|
e.config = hD();
|
|
28013
28015
|
break;
|
|
28014
|
-
case
|
|
28016
|
+
case j.TextInput:
|
|
28015
28017
|
e.config = Jd();
|
|
28016
28018
|
break;
|
|
28017
|
-
case
|
|
28019
|
+
case j.Checkbox:
|
|
28018
28020
|
e.config = NT();
|
|
28019
28021
|
break;
|
|
28020
|
-
case
|
|
28022
|
+
case j.DateRange:
|
|
28021
28023
|
e.config = QT();
|
|
28022
28024
|
break;
|
|
28023
|
-
case
|
|
28025
|
+
case j.MericoDateRange:
|
|
28024
28026
|
e.config = bD();
|
|
28025
28027
|
break;
|
|
28026
28028
|
default:
|
|
@@ -28852,7 +28854,10 @@ const Tu = m.model("FiltersRenderModel", {
|
|
|
28852
28854
|
return Object.entries(e.values).forEach(([n, a]) => {
|
|
28853
28855
|
t[n] = a;
|
|
28854
28856
|
const i = this.findByKey(n);
|
|
28855
|
-
i && i.config._name ===
|
|
28857
|
+
i && i.config._name === j.DateRange && (t[n] = i.config.dateStringsValue), i && i.config._name === j.MericoDateRange && (t[n] = {
|
|
28858
|
+
...a,
|
|
28859
|
+
value: i.config.dateStringsValue
|
|
28860
|
+
});
|
|
28856
28861
|
}), t;
|
|
28857
28862
|
},
|
|
28858
28863
|
get contentModel() {
|
|
@@ -29245,7 +29250,7 @@ function pl(e, t, n) {
|
|
|
29245
29250
|
function ml(e, t, n, a, i = "PRC", o = "YYYY-MM-DD") {
|
|
29246
29251
|
const l = t ? C.get(a, t) : void 0, s = e ? C.get(a, e) : void 0;
|
|
29247
29252
|
let c = t ? C.get(n, t, "") : "";
|
|
29248
|
-
l ===
|
|
29253
|
+
l === j.MericoDateRange && t && (c = C.get(n, `${t}.step`, ""));
|
|
29249
29254
|
const d = {
|
|
29250
29255
|
start: "",
|
|
29251
29256
|
end: "",
|
|
@@ -29255,7 +29260,7 @@ function ml(e, t, n, a, i = "PRC", o = "YYYY-MM-DD") {
|
|
|
29255
29260
|
stepKeyFormat: o
|
|
29256
29261
|
};
|
|
29257
29262
|
if (e)
|
|
29258
|
-
if (s ===
|
|
29263
|
+
if (s === j.MericoDateRange) {
|
|
29259
29264
|
const h = C.get(n, `${e}.value`), p = pl(h, i, o);
|
|
29260
29265
|
p && (d.start = p.start, d.end = p.end);
|
|
29261
29266
|
} else {
|
|
@@ -29435,12 +29440,12 @@ const ED = ET.views((e) => ({
|
|
|
29435
29440
|
console.log("MMS var", i);
|
|
29436
29441
|
const o = a.filters.reduce((h, p) => {
|
|
29437
29442
|
const g = C.get(t, p.variable), b = C.get(n, p.variable), _ = p.dimension;
|
|
29438
|
-
if (b ===
|
|
29443
|
+
if (b === j.DateRange) {
|
|
29439
29444
|
const T = g.every((M) => Number.isFinite(Number(M))) ? g.map((M) => Number(M)) : g;
|
|
29440
29445
|
h[_] = {
|
|
29441
29446
|
between: T
|
|
29442
29447
|
};
|
|
29443
|
-
} else if (b ===
|
|
29448
|
+
} else if (b === j.MericoDateRange) {
|
|
29444
29449
|
const T = g.value.every((M) => Number.isFinite(Number(M))) ? g.value.map((M) => Number(M)) : g;
|
|
29445
29450
|
h[_] = {
|
|
29446
29451
|
between: T
|
|
@@ -30483,9 +30488,9 @@ const jD = (e) => new BD(e), QD = ({
|
|
|
30483
30488
|
} = ZD({
|
|
30484
30489
|
radius: t,
|
|
30485
30490
|
name: "MultiSelectWidget"
|
|
30486
|
-
}), [g, b] =
|
|
30491
|
+
}), [g, b] = Q(!1), _ = (te) => {
|
|
30487
30492
|
b(te);
|
|
30488
|
-
}, w = g && (i == null ? void 0 : i.length) > 0, [T, M] =
|
|
30493
|
+
}, w = g && (i == null ? void 0 : i.length) > 0, [T, M] = Q(""), $ = z(() => {
|
|
30489
30494
|
if (!T)
|
|
30490
30495
|
return l;
|
|
30491
30496
|
const te = T.toLowerCase(), Le = (Ge) => {
|
|
@@ -30493,12 +30498,12 @@ const jD = (e) => new BD(e), QD = ({
|
|
|
30493
30498
|
return ((Jt = Ge.description) == null ? void 0 : Jt.toLowerCase().includes(te)) || Ge.label.toLowerCase().includes(te);
|
|
30494
30499
|
};
|
|
30495
30500
|
return l.filter(Le);
|
|
30496
|
-
}, [T, l]),
|
|
30501
|
+
}, [T, l]), F = z(() => new Set(l.map((te) => te.value)), [l]), H = z(() => new Set(i), [i]), U = z(() => H.size !== F.size ? !1 : Array.from(F).every((te) => H.has(te)), [H, F]), oe = () => {
|
|
30497
30502
|
if (U) {
|
|
30498
30503
|
o([]);
|
|
30499
30504
|
return;
|
|
30500
30505
|
}
|
|
30501
|
-
const te = Array.from(
|
|
30506
|
+
const te = Array.from(F);
|
|
30502
30507
|
o(te);
|
|
30503
30508
|
};
|
|
30504
30509
|
return /* @__PURE__ */ u(D, { gap: 3, children: [
|
|
@@ -30514,7 +30519,7 @@ const jD = (e) => new BD(e), QD = ({
|
|
|
30514
30519
|
/* @__PURE__ */ r(og, { disabled: e, allowClear: !0, className: p(h.root, "check-select"), dropdownClassName: p(h.dropdown, ""), onDropdownVisibleChange: _, transitionName: "rc-select-dropdown-slide-up", choiceTransitionName: "rc-select-selection__choice-zoom", style: n, clearIcon: () => /* @__PURE__ */ r(pt, { size: "sm" }), value: i, onChange: o, onSelect: console.log, mode: "multiple", maxTagCount: 0, notFoundContent: /* @__PURE__ */ r(no, { errorMessage: s }), maxTagTextLength: 10, maxTagPlaceholder: (te) => d("filter.widget.common.x_selected", {
|
|
30515
30520
|
count: te.length
|
|
30516
30521
|
}), searchValue: T, onSearch: M, filterOption: !1, dropdownRender: (te) => /* @__PURE__ */ u(q, { children: [
|
|
30517
|
-
|
|
30522
|
+
F.size > 0 && !T && /* @__PURE__ */ r(v, { px: "xs", py: "xs", onClick: oe, styles: JD, children: /* @__PURE__ */ r(J, { size: "xs", checked: U, onChange: C.noop, label: d("common.actions.select_all") }) }),
|
|
30518
30523
|
/* @__PURE__ */ r(A, {}),
|
|
30519
30524
|
te
|
|
30520
30525
|
] }), children: $.map((te) => /* @__PURE__ */ u(lg, { title: te.label, children: [
|
|
@@ -30694,7 +30699,7 @@ function d6(e, t) {
|
|
|
30694
30699
|
};
|
|
30695
30700
|
}
|
|
30696
30701
|
const u6 = (e, t, n) => {
|
|
30697
|
-
const a = e.step, [i, o] =
|
|
30702
|
+
const a = e.step, [i, o] = Q(null), [l, s] = Q(e.value), c = (b, _) => {
|
|
30698
30703
|
if (!b || !_)
|
|
30699
30704
|
return;
|
|
30700
30705
|
const [w, T] = l, M = b.toDate(), $ = _.toDate();
|
|
@@ -30705,9 +30710,9 @@ const u6 = (e, t, n) => {
|
|
|
30705
30710
|
const H = M.getTime() < w.getTime() ? [M, T] : [w, $];
|
|
30706
30711
|
s(H), t(H);
|
|
30707
30712
|
};
|
|
30708
|
-
|
|
30713
|
+
N(() => {
|
|
30709
30714
|
s(e.value);
|
|
30710
|
-
}, [e]),
|
|
30715
|
+
}, [e]), N(() => {
|
|
30711
30716
|
s([null, null]);
|
|
30712
30717
|
}, [n]);
|
|
30713
30718
|
const d = z(() => n ? null : l[0] ? P(l[0]) : null, [l, n]), h = z(() => n ? null : l[0] ? P(l[0]).add(365, "days") : null, [l, n]), p = ne((b) => {
|
|
@@ -30737,8 +30742,8 @@ const u6 = (e, t, n) => {
|
|
|
30737
30742
|
};
|
|
30738
30743
|
const {
|
|
30739
30744
|
start: $,
|
|
30740
|
-
end:
|
|
30741
|
-
} = M, H = s6(_, $, l), U = c6(_,
|
|
30745
|
+
end: F
|
|
30746
|
+
} = M, H = s6(_, $, l), U = c6(_, F), oe = l6(b, T, l, a), te = oe && H, Le = oe && U, Ge = _.isBefore(d) || _.isAfter(h);
|
|
30742
30747
|
return {
|
|
30743
30748
|
onMouseEnter: () => o(b),
|
|
30744
30749
|
onMouseLeave: () => o(null),
|
|
@@ -30746,7 +30751,7 @@ const u6 = (e, t, n) => {
|
|
|
30746
30751
|
firstInRange: te,
|
|
30747
30752
|
lastInRange: Le,
|
|
30748
30753
|
selected: H || U,
|
|
30749
|
-
onClick: () => c($,
|
|
30754
|
+
onClick: () => c($, F),
|
|
30750
30755
|
disabled: Ge
|
|
30751
30756
|
};
|
|
30752
30757
|
}, [i, t, a, n, d, h, l]);
|
|
@@ -30758,7 +30763,7 @@ const u6 = (e, t, n) => {
|
|
|
30758
30763
|
onChange: t,
|
|
30759
30764
|
handleRangeChange: n
|
|
30760
30765
|
}) => {
|
|
30761
|
-
const [a, i] =
|
|
30766
|
+
const [a, i] = Q(!0), o = e.value, [l, s] = o, c = z(() => l || /* @__PURE__ */ new Date(), [l]), {
|
|
30762
30767
|
getDayProps: d
|
|
30763
30768
|
} = u6(e, n, a);
|
|
30764
30769
|
return /* @__PURE__ */ r(Kh, { defaultDate: c, numberOfColumns: 2, withCellSpacing: !1, getDayProps: d, onMouseEnter: () => {
|
|
@@ -30976,21 +30981,21 @@ const u6 = (e, t, n) => {
|
|
|
30976
30981
|
formFieldProps: i
|
|
30977
30982
|
}) => {
|
|
30978
30983
|
switch (e) {
|
|
30979
|
-
case
|
|
30984
|
+
case j.Select:
|
|
30980
30985
|
return /* @__PURE__ */ r(r6, { ...a, ...i, config: t });
|
|
30981
|
-
case
|
|
30986
|
+
case j.MultiSelect:
|
|
30982
30987
|
return /* @__PURE__ */ r(t6, { ...a, ...i, config: t });
|
|
30983
|
-
case
|
|
30988
|
+
case j.TreeSelect:
|
|
30984
30989
|
return /* @__PURE__ */ r(aD, { ...a, ...i, config: t });
|
|
30985
|
-
case
|
|
30990
|
+
case j.TreeSingleSelect:
|
|
30986
30991
|
return /* @__PURE__ */ r(sD, { ...a, ...i, config: t });
|
|
30987
|
-
case
|
|
30992
|
+
case j.TextInput:
|
|
30988
30993
|
return /* @__PURE__ */ r(a6, { ...a, ...i, config: t });
|
|
30989
|
-
case
|
|
30994
|
+
case j.DateRange:
|
|
30990
30995
|
return /* @__PURE__ */ r(Ou, { ...a, ...i, config: t });
|
|
30991
|
-
case
|
|
30996
|
+
case j.MericoDateRange:
|
|
30992
30997
|
return /* @__PURE__ */ r(D6, { ...a, ...i, config: t });
|
|
30993
|
-
case
|
|
30998
|
+
case j.Checkbox:
|
|
30994
30999
|
return /* @__PURE__ */ r(GD, { ...a, ...i, config: t });
|
|
30995
31000
|
default:
|
|
30996
31001
|
return null;
|
|
@@ -31000,39 +31005,41 @@ const u6 = (e, t, n) => {
|
|
|
31000
31005
|
...t
|
|
31001
31006
|
}, n) => /* @__PURE__ */ r("div", { className: "filter-root", ref: n, children: /* @__PURE__ */ r(ze, { children: /* @__PURE__ */ r(I6, { filter: e, formFieldProps: t }) }) }))), V6 = ({
|
|
31002
31007
|
disabled: e,
|
|
31003
|
-
onSubmit: t
|
|
31008
|
+
onSubmit: t,
|
|
31009
|
+
stale: n
|
|
31004
31010
|
}) => {
|
|
31005
31011
|
const {
|
|
31006
|
-
t:
|
|
31012
|
+
t: a
|
|
31007
31013
|
} = y(), {
|
|
31008
|
-
renderSearchButton:
|
|
31014
|
+
renderSearchButton: i
|
|
31009
31015
|
} = Pg();
|
|
31010
|
-
return
|
|
31016
|
+
return i ? i({
|
|
31011
31017
|
disabled: e,
|
|
31012
|
-
onSubmit: t
|
|
31018
|
+
onSubmit: t,
|
|
31019
|
+
stale: n
|
|
31013
31020
|
}) : /* @__PURE__ */ u(V.Group, { children: [
|
|
31014
|
-
/* @__PURE__ */ r(V, { color: "blue", size: "sm", onClick: () => t(), disabled: e, children:
|
|
31021
|
+
/* @__PURE__ */ r(V, { color: "blue", size: "sm", onClick: () => t(), disabled: e, "data-stale": n || void 0, children: a("common.actions.search") }),
|
|
31015
31022
|
/* @__PURE__ */ u(W, { trigger: "hover", disabled: e, position: "bottom-end", children: [
|
|
31016
|
-
/* @__PURE__ */ r(W.Target, { children: /* @__PURE__ */ r(V, { disabled: e, color: "blue", px: "xs", style: {
|
|
31023
|
+
/* @__PURE__ */ r(W.Target, { children: /* @__PURE__ */ r(V, { disabled: e, color: "blue", px: "xs", "data-stale": n || void 0, style: {
|
|
31017
31024
|
borderLeft: `1px solid ${e ? "white" : "var(--mantine-color-gray-4)"}`
|
|
31018
31025
|
}, children: /* @__PURE__ */ r(ls, { size: 16 }) }) }),
|
|
31019
31026
|
/* @__PURE__ */ r(W.Dropdown, { children: /* @__PURE__ */ r(W.Item, { leftSection: /* @__PURE__ */ r(ni, { size: 14 }), disabled: e, onClick: () => t({
|
|
31020
31027
|
force: !0
|
|
31021
|
-
}), children:
|
|
31028
|
+
}), children: a("common.actions.reload") }) })
|
|
31022
31029
|
] })
|
|
31023
31030
|
] });
|
|
31024
31031
|
};
|
|
31025
31032
|
function L6(e) {
|
|
31026
31033
|
const t = ie();
|
|
31027
|
-
|
|
31034
|
+
N(() => {
|
|
31028
31035
|
var n, a;
|
|
31029
31036
|
(a = (n = t.filters).updatePreviewValues) == null || a.call(n, e);
|
|
31030
31037
|
}, [e]);
|
|
31031
31038
|
}
|
|
31032
31039
|
const co = "N/A";
|
|
31033
31040
|
function L$() {
|
|
31034
|
-
const e = ea(), [t, n] =
|
|
31035
|
-
return
|
|
31041
|
+
const e = ea(), [t, n] = Q([]);
|
|
31042
|
+
return N(() => {
|
|
31036
31043
|
const a = Nh(() => e.content.views.visibleViews.map((c) => {
|
|
31037
31044
|
var d;
|
|
31038
31045
|
return c.type === K.Tabs ? (d = c.tabView) == null ? void 0 : d.view_id : c.id;
|
|
@@ -31046,30 +31053,30 @@ function L$() {
|
|
|
31046
31053
|
}
|
|
31047
31054
|
function $6(e) {
|
|
31048
31055
|
switch (e.type) {
|
|
31049
|
-
case
|
|
31050
|
-
case
|
|
31051
|
-
case
|
|
31052
|
-
case
|
|
31056
|
+
case j.Select:
|
|
31057
|
+
case j.MultiSelect:
|
|
31058
|
+
case j.TreeSelect:
|
|
31059
|
+
case j.TreeSingleSelect:
|
|
31053
31060
|
return {
|
|
31054
31061
|
label: e.label,
|
|
31055
31062
|
value: R6(e.config, e.value)
|
|
31056
31063
|
};
|
|
31057
|
-
case
|
|
31064
|
+
case j.TextInput:
|
|
31058
31065
|
return {
|
|
31059
31066
|
label: e.label,
|
|
31060
31067
|
value: e.value
|
|
31061
31068
|
};
|
|
31062
|
-
case
|
|
31069
|
+
case j.DateRange:
|
|
31063
31070
|
return {
|
|
31064
31071
|
label: e.label,
|
|
31065
31072
|
value: P6(e.config, e.value)
|
|
31066
31073
|
};
|
|
31067
|
-
case
|
|
31074
|
+
case j.MericoDateRange:
|
|
31068
31075
|
return {
|
|
31069
31076
|
label: e.label,
|
|
31070
31077
|
value: A6(e.config, e.value)
|
|
31071
31078
|
};
|
|
31072
|
-
case
|
|
31079
|
+
case j.Checkbox:
|
|
31073
31080
|
return {
|
|
31074
31081
|
label: e.label,
|
|
31075
31082
|
value: E6(e.value)
|
|
@@ -31112,36 +31119,39 @@ const O6 = ({
|
|
|
31112
31119
|
}] = rn(!0), i = Se(), {
|
|
31113
31120
|
control: o,
|
|
31114
31121
|
handleSubmit: l,
|
|
31115
|
-
reset: s
|
|
31122
|
+
reset: s,
|
|
31123
|
+
formState: {
|
|
31124
|
+
isDirty: c
|
|
31125
|
+
}
|
|
31116
31126
|
} = fe({
|
|
31117
31127
|
defaultValues: i.filters.values,
|
|
31118
31128
|
// make sure the preview value is updated when filters are changed
|
|
31119
31129
|
reValidateMode: "onBlur"
|
|
31120
|
-
}),
|
|
31130
|
+
}), d = Kp({
|
|
31121
31131
|
control: o
|
|
31122
31132
|
});
|
|
31123
|
-
|
|
31133
|
+
N(() => {
|
|
31124
31134
|
s(i.filters.values);
|
|
31125
|
-
}, [i.filters.values, s]), L6(
|
|
31126
|
-
const
|
|
31127
|
-
|
|
31128
|
-
},
|
|
31129
|
-
const
|
|
31130
|
-
l(i.filters.setValues)(),
|
|
31135
|
+
}, [i.filters.values, s]), L6(d);
|
|
31136
|
+
const h = i.filters.visibleInView(t.id), p = z(() => h.every((T) => T.should_auto_submit), [h]), g = z(() => h.filter((T) => C.get(T, "config.required", !1)), [h]), b = z(() => g.length === 0 ? !1 : g.some((T) => !T.requiredAndPass(d[T.key])), [d, g]), _ = (T, M) => ($, F) => {
|
|
31137
|
+
M($), (T.should_auto_submit || F) && i.filters.setValueByKey(T.key, $);
|
|
31138
|
+
}, w = ne((T) => {
|
|
31139
|
+
const M = C.get(T, "force", !1);
|
|
31140
|
+
l(i.filters.setValues)(), M && i.queries.forceReloadVisibleQueries();
|
|
31131
31141
|
}, [l, i.filters.setValues]);
|
|
31132
|
-
return
|
|
31142
|
+
return h.length === 0 ? null : /* @__PURE__ */ u("form", { children: [
|
|
31133
31143
|
/* @__PURE__ */ r(O6, { opened: n, toggle: a }),
|
|
31134
|
-
/* @__PURE__ */ r(hr, { in: n, children: /* @__PURE__ */ u(v, { className: "dashboard-filters", justify: "space-between", wrap: "nowrap", sx:
|
|
31144
|
+
/* @__PURE__ */ r(hr, { in: n, children: /* @__PURE__ */ u(v, { className: "dashboard-filters", justify: "space-between", wrap: "nowrap", sx: p ? {} : {
|
|
31135
31145
|
border: "1px solid #e9ecef",
|
|
31136
31146
|
borderRadius: "4px",
|
|
31137
31147
|
padding: "16px"
|
|
31138
31148
|
}, children: [
|
|
31139
|
-
/* @__PURE__ */ r(v, { align: "flex-start", children:
|
|
31140
|
-
field:
|
|
31141
|
-
}) => /* @__PURE__ */ r(M6, { filter:
|
|
31142
|
-
!
|
|
31149
|
+
/* @__PURE__ */ r(v, { align: "flex-start", children: h.map((T) => /* @__PURE__ */ r(f, { name: T.key, control: o, render: ({
|
|
31150
|
+
field: M
|
|
31151
|
+
}) => /* @__PURE__ */ r(M6, { filter: T, value: M.value, onChange: _(T, M.onChange) }) }, T.id)) }),
|
|
31152
|
+
!p && /* @__PURE__ */ r(v, { sx: {
|
|
31143
31153
|
alignSelf: "flex-end"
|
|
31144
|
-
}, children: /* @__PURE__ */ r(V6, { disabled:
|
|
31154
|
+
}, children: /* @__PURE__ */ r(V6, { disabled: b, onSubmit: w, stale: c }) })
|
|
31145
31155
|
] }) })
|
|
31146
31156
|
] });
|
|
31147
31157
|
}), Bu = {
|
|
@@ -31387,7 +31397,7 @@ function Hu(e, t = !0) {
|
|
|
31387
31397
|
}, [e.viz.type, e.viz.conf, t]);
|
|
31388
31398
|
}
|
|
31389
31399
|
function Wu(e) {
|
|
31390
|
-
const [t, n] =
|
|
31400
|
+
const [t, n] = Q(!1), a = ia().getRequired(ke.instanceScope.migrator);
|
|
31391
31401
|
return Qn(async () => {
|
|
31392
31402
|
const i = a.status === Cr.notStarted;
|
|
31393
31403
|
n(a.status === Cr.done), a.status === Cr.notStarted && a.runMigration().then((o) => {
|
|
@@ -31401,7 +31411,7 @@ function Uu(e, t) {
|
|
|
31401
31411
|
const n = ia().getRequired(ke.instanceScope.vizInstance);
|
|
31402
31412
|
return Qn(async () => {
|
|
31403
31413
|
Oe(await n.instanceData.getItem(null), t.viz.conf) || await n.instanceData.setItem(null, t.viz.conf);
|
|
31404
|
-
}, [n, t.viz.conf]),
|
|
31414
|
+
}, [n, t.viz.conf]), N(() => n.instanceData.watchItem(null, (a) => {
|
|
31405
31415
|
e(a);
|
|
31406
31416
|
}), [e, t.viz.type]), n;
|
|
31407
31417
|
}
|
|
@@ -31490,7 +31500,7 @@ function J6(e) {
|
|
|
31490
31500
|
const {
|
|
31491
31501
|
setEchartsOptions: t
|
|
31492
31502
|
} = Me();
|
|
31493
|
-
|
|
31503
|
+
N(() => {
|
|
31494
31504
|
const n = (i) => {
|
|
31495
31505
|
t(i);
|
|
31496
31506
|
}, a = e.messageChannels.getChannel("viz");
|
|
@@ -31546,7 +31556,7 @@ function a4(e) {
|
|
|
31546
31556
|
const t = wt(null), n = ne((a) => {
|
|
31547
31557
|
t.current = a;
|
|
31548
31558
|
}, []);
|
|
31549
|
-
return
|
|
31559
|
+
return N(() => {
|
|
31550
31560
|
t.current = null;
|
|
31551
31561
|
}, [e]), {
|
|
31552
31562
|
getEchartsOptions: () => t.current,
|
|
@@ -32089,7 +32099,7 @@ const $4 = I(({
|
|
|
32089
32099
|
view: t
|
|
32090
32100
|
}) => {
|
|
32091
32101
|
const a = ie().layouts, [i, o] = cp();
|
|
32092
|
-
return
|
|
32102
|
+
return N(() => {
|
|
32093
32103
|
a.setCurrentLayoutWrapperWidth(o.width);
|
|
32094
32104
|
}, [o.width]), /* @__PURE__ */ r(R, { sx: {
|
|
32095
32105
|
height: "100%"
|
|
@@ -32370,7 +32380,7 @@ const K4 = m.compose("FiltersModel", Tu, m.model({
|
|
|
32370
32380
|
}));
|
|
32371
32381
|
},
|
|
32372
32382
|
get selects() {
|
|
32373
|
-
return e.current.filter((t) => t.type ===
|
|
32383
|
+
return e.current.filter((t) => t.type === j.Select).map((t) => ({
|
|
32374
32384
|
label: t.label ?? t.id,
|
|
32375
32385
|
value: t.id
|
|
32376
32386
|
}));
|
|
@@ -34242,7 +34252,7 @@ function $n(e) {
|
|
|
34242
34252
|
console.groupCollapsed("Running operation ", e.type), console.log(e), console.groupEnd();
|
|
34243
34253
|
}
|
|
34244
34254
|
function ih(e, t) {
|
|
34245
|
-
|
|
34255
|
+
N(() => {
|
|
34246
34256
|
const a = (i) => {
|
|
34247
34257
|
$n(i);
|
|
34248
34258
|
const {
|
|
@@ -34259,7 +34269,7 @@ function ih(e, t) {
|
|
|
34259
34269
|
};
|
|
34260
34270
|
}, [e, t]);
|
|
34261
34271
|
const n = cg();
|
|
34262
|
-
|
|
34272
|
+
N(() => {
|
|
34263
34273
|
const a = (i) => {
|
|
34264
34274
|
$n(i);
|
|
34265
34275
|
const {
|
|
@@ -34279,7 +34289,7 @@ function ih(e, t) {
|
|
|
34279
34289
|
return window.addEventListener("scroll_to_panel", a), () => {
|
|
34280
34290
|
window.removeEventListener("scroll_to_panel", a);
|
|
34281
34291
|
};
|
|
34282
|
-
}, [n]),
|
|
34292
|
+
}, [n]), N(() => {
|
|
34283
34293
|
const a = (i) => {
|
|
34284
34294
|
$n(i);
|
|
34285
34295
|
const {
|
|
@@ -34300,7 +34310,7 @@ function ih(e, t) {
|
|
|
34300
34310
|
return window.addEventListener("switch_tab", a), () => {
|
|
34301
34311
|
window.removeEventListener("switch_tab", a);
|
|
34302
34312
|
};
|
|
34303
|
-
}, [e, t]),
|
|
34313
|
+
}, [e, t]), N(() => {
|
|
34304
34314
|
const a = (i) => {
|
|
34305
34315
|
$n(i);
|
|
34306
34316
|
const {
|
|
@@ -34320,7 +34330,7 @@ function ih(e, t) {
|
|
|
34320
34330
|
return window.addEventListener("set-filter-values", a), () => {
|
|
34321
34331
|
window.removeEventListener("set-filter-values", a);
|
|
34322
34332
|
};
|
|
34323
|
-
}, [e]),
|
|
34333
|
+
}, [e]), N(() => {
|
|
34324
34334
|
function a(o) {
|
|
34325
34335
|
return Array.isArray(o) ? [] : typeof o == "object" ? {} : typeof o == "boolean" ? !1 : typeof o == "string" ? "" : typeof o == "number" ? 0 : o;
|
|
34326
34336
|
}
|
|
@@ -34337,7 +34347,7 @@ function ih(e, t) {
|
|
|
34337
34347
|
return window.addEventListener("clear-filter-values", i), () => {
|
|
34338
34348
|
window.removeEventListener("clear-filter-values", i);
|
|
34339
34349
|
};
|
|
34340
|
-
}, [e]),
|
|
34350
|
+
}, [e]), N(() => {
|
|
34341
34351
|
const a = (i) => {
|
|
34342
34352
|
$n(i);
|
|
34343
34353
|
const {
|
|
@@ -34504,7 +34514,7 @@ const MI = I(({
|
|
|
34504
34514
|
}) => {
|
|
34505
34515
|
const Le = te.filter((Ge) => Number.isFinite(Ge.breakpoint));
|
|
34506
34516
|
a.updateLayoutSetsInfo(Le), e();
|
|
34507
|
-
}, $ = c(),
|
|
34517
|
+
}, $ = c(), F = z(() => {
|
|
34508
34518
|
const te = {
|
|
34509
34519
|
list: $.list.filter((Le) => !!Le.name && Number.isFinite(Le.breakpoint))
|
|
34510
34520
|
};
|
|
@@ -34559,8 +34569,8 @@ const MI = I(({
|
|
|
34559
34569
|
] }),
|
|
34560
34570
|
/* @__PURE__ */ r(k, { mt: 6, ta: "right", size: "xs", c: "red", children: H ?? " " }),
|
|
34561
34571
|
/* @__PURE__ */ u(v, { mt: 6, justify: "space-between", children: [
|
|
34562
|
-
/* @__PURE__ */ r(V, { color: "orange", size: "xs", onClick: () => d(), leftSection: /* @__PURE__ */ r(kt, { size: 18 }), disabled: !
|
|
34563
|
-
/* @__PURE__ */ r(V, { color: "green", size: "xs", type: "submit", leftSection: /* @__PURE__ */ r(be, { size: 18 }), disabled: !
|
|
34572
|
+
/* @__PURE__ */ r(V, { color: "orange", size: "xs", onClick: () => d(), leftSection: /* @__PURE__ */ r(kt, { size: 18 }), disabled: !F, children: t("common.actions.revert") }),
|
|
34573
|
+
/* @__PURE__ */ r(V, { color: "green", size: "xs", type: "submit", leftSection: /* @__PURE__ */ r(be, { size: 18 }), disabled: !F, children: t("common.actions.save_changes") })
|
|
34564
34574
|
] })
|
|
34565
34575
|
] }) });
|
|
34566
34576
|
}), RI = I(() => {
|
|
@@ -34788,12 +34798,12 @@ const QI = I(({
|
|
|
34788
34798
|
content: null
|
|
34789
34799
|
}
|
|
34790
34800
|
}), p = ({
|
|
34791
|
-
content:
|
|
34801
|
+
content: F
|
|
34792
34802
|
}) => {
|
|
34793
34803
|
try {
|
|
34794
|
-
if (!
|
|
34804
|
+
if (!F)
|
|
34795
34805
|
throw new Error("please use a valid json file");
|
|
34796
|
-
i.applyJSONSchema(
|
|
34806
|
+
i.applyJSONSchema(F), un({
|
|
34797
34807
|
title: "Successful",
|
|
34798
34808
|
message: "",
|
|
34799
34809
|
color: "green"
|
|
@@ -34805,12 +34815,12 @@ const QI = I(({
|
|
|
34805
34815
|
color: "red"
|
|
34806
34816
|
});
|
|
34807
34817
|
}
|
|
34808
|
-
}, [g, b] =
|
|
34809
|
-
|
|
34818
|
+
}, [g, b] = Q(null);
|
|
34819
|
+
N(() => {
|
|
34810
34820
|
if (!g)
|
|
34811
34821
|
return;
|
|
34812
|
-
const
|
|
34813
|
-
|
|
34822
|
+
const F = new FileReader();
|
|
34823
|
+
F.readAsText(g, "UTF-8"), F.onload = (H) => {
|
|
34814
34824
|
try {
|
|
34815
34825
|
const U = jI(H);
|
|
34816
34826
|
s("content", U), h("content");
|
|
@@ -34820,15 +34830,15 @@ const QI = I(({
|
|
|
34820
34830
|
message: U.message
|
|
34821
34831
|
});
|
|
34822
34832
|
}
|
|
34823
|
-
},
|
|
34824
|
-
|
|
34833
|
+
}, F.onabort = () => console.log("🟨 abort"), F.onerror = () => {
|
|
34834
|
+
F.error && (console.error(F.error), d("content", {
|
|
34825
34835
|
type: "custom",
|
|
34826
|
-
message:
|
|
34836
|
+
message: F.error.message
|
|
34827
34837
|
}));
|
|
34828
34838
|
};
|
|
34829
34839
|
}, [g]);
|
|
34830
34840
|
const [_] = c(["content"]), w = !_, T = (M = l == null ? void 0 : l.content) == null ? void 0 : M.message;
|
|
34831
|
-
return
|
|
34841
|
+
return N(() => {
|
|
34832
34842
|
!_ || T ? n() : t();
|
|
34833
34843
|
}, [_, T]), /* @__PURE__ */ r(R, { mx: "auto", sx: {
|
|
34834
34844
|
position: "relative"
|
|
@@ -34941,7 +34951,7 @@ const QI = I(({
|
|
|
34941
34951
|
const {
|
|
34942
34952
|
t: e,
|
|
34943
34953
|
i18n: t
|
|
34944
|
-
} = y(), n = Br(), a = le(), [i, o] =
|
|
34954
|
+
} = y(), n = Br(), a = le(), [i, o] = Q(""), l = z(() => a.editor.spotlightActionGroups.map((c) => ({
|
|
34945
34955
|
group: e(c.group),
|
|
34946
34956
|
keywords: [c.group, e(c.group)],
|
|
34947
34957
|
actions: c.actions.map((d) => {
|
|
@@ -35520,7 +35530,7 @@ const z8 = I(() => {
|
|
|
35520
35530
|
return;
|
|
35521
35531
|
}
|
|
35522
35532
|
t.editor.open(["_FILTERS_", n.filters.firstID]);
|
|
35523
|
-
}, [o, l] =
|
|
35533
|
+
}, [o, l] = Q(!1), s = () => l(!0), c = () => l(!1);
|
|
35524
35534
|
return /* @__PURE__ */ u(ot.Navbar, { p: 0, zIndex: 299, children: [
|
|
35525
35535
|
/* @__PURE__ */ u(ot.Section, { children: [
|
|
35526
35536
|
/* @__PURE__ */ u(v, { grow: !0, gap: 0, sx: {
|
|
@@ -35637,7 +35647,7 @@ const z8 = I(() => {
|
|
|
35637
35647
|
`, uh = () => {
|
|
35638
35648
|
const {
|
|
35639
35649
|
t: e
|
|
35640
|
-
} = y(), [t, n] =
|
|
35650
|
+
} = y(), [t, n] = Q(!1);
|
|
35641
35651
|
return /* @__PURE__ */ u(q, { children: [
|
|
35642
35652
|
/* @__PURE__ */ r(V, { variant: "subtle", size: "compact-sm", onClick: () => n((a) => !a), children: e(t ? "common.actions.close" : "filter.widget.common.see_data_structure") }),
|
|
35643
35653
|
/* @__PURE__ */ r(hr, { in: t, children: /* @__PURE__ */ r(Et, { language: "typescript", withCopyButton: !1, code: V8 }) })
|
|
@@ -35934,7 +35944,7 @@ const z8 = I(() => {
|
|
|
35934
35944
|
value: _
|
|
35935
35945
|
}))
|
|
35936
35946
|
}));
|
|
35937
|
-
}, [n.default_step]), i = [...n.default_value], [o, l] =
|
|
35947
|
+
}, [n.default_step]), i = [...n.default_value], [o, l] = Q(i), s = (h) => {
|
|
35938
35948
|
l(h), !(h[0] === null || h[1] === null) && (n.setDefaultValue({
|
|
35939
35949
|
value: sr(h[0], h[1], n.default_step),
|
|
35940
35950
|
shortcut: null,
|
|
@@ -35966,23 +35976,23 @@ const z8 = I(() => {
|
|
|
35966
35976
|
/* @__PURE__ */ r(vn, { filter: e })
|
|
35967
35977
|
] });
|
|
35968
35978
|
}), q8 = {
|
|
35969
|
-
[
|
|
35970
|
-
[
|
|
35971
|
-
[
|
|
35972
|
-
[
|
|
35973
|
-
[
|
|
35974
|
-
[
|
|
35975
|
-
[
|
|
35976
|
-
[
|
|
35979
|
+
[j.Select]: R8,
|
|
35980
|
+
[j.MultiSelect]: L8,
|
|
35981
|
+
[j.TreeSelect]: XT,
|
|
35982
|
+
[j.TreeSingleSelect]: iD,
|
|
35983
|
+
[j.TextInput]: P8,
|
|
35984
|
+
[j.Checkbox]: D8,
|
|
35985
|
+
[j.DateRange]: M8,
|
|
35986
|
+
[j.MericoDateRange]: O8
|
|
35977
35987
|
}, jt = {
|
|
35978
|
-
[
|
|
35979
|
-
[
|
|
35980
|
-
[
|
|
35981
|
-
[
|
|
35982
|
-
[
|
|
35983
|
-
[
|
|
35984
|
-
[
|
|
35985
|
-
[
|
|
35988
|
+
[j.Select]: "filter.widget.names.select",
|
|
35989
|
+
[j.MultiSelect]: "filter.widget.names.multi_select",
|
|
35990
|
+
[j.TreeSelect]: "filter.widget.names.tree_select",
|
|
35991
|
+
[j.TreeSingleSelect]: "filter.widget.names.tree_single_select",
|
|
35992
|
+
[j.TextInput]: "filter.widget.names.text_input",
|
|
35993
|
+
[j.Checkbox]: "filter.widget.names.checkbox",
|
|
35994
|
+
[j.DateRange]: "filter.widget.names.date_range",
|
|
35995
|
+
[j.MericoDateRange]: "filter.widget.names.merico_date_range"
|
|
35986
35996
|
}, F8 = I(({
|
|
35987
35997
|
filter: e
|
|
35988
35998
|
}) => {
|
|
@@ -35990,28 +36000,28 @@ const z8 = I(() => {
|
|
|
35990
36000
|
t,
|
|
35991
36001
|
i18n: n
|
|
35992
36002
|
} = y(), a = ie(), i = E.useMemo(() => q8[e.type], [e.type]), o = z(() => [{
|
|
35993
|
-
label: t(jt[
|
|
36003
|
+
label: t(jt[j.Select]),
|
|
35994
36004
|
value: "select"
|
|
35995
36005
|
}, {
|
|
35996
|
-
label: t(jt[
|
|
36006
|
+
label: t(jt[j.MultiSelect]),
|
|
35997
36007
|
value: "multi-select"
|
|
35998
36008
|
}, {
|
|
35999
|
-
label: t(jt[
|
|
36009
|
+
label: t(jt[j.TreeSelect]),
|
|
36000
36010
|
value: "tree-select"
|
|
36001
36011
|
}, {
|
|
36002
|
-
label: t(jt[
|
|
36012
|
+
label: t(jt[j.TreeSingleSelect]),
|
|
36003
36013
|
value: "tree-single-select"
|
|
36004
36014
|
}, {
|
|
36005
|
-
label: t(jt[
|
|
36015
|
+
label: t(jt[j.TextInput]),
|
|
36006
36016
|
value: "text-input"
|
|
36007
36017
|
}, {
|
|
36008
|
-
label: t(jt[
|
|
36018
|
+
label: t(jt[j.Checkbox]),
|
|
36009
36019
|
value: "checkbox"
|
|
36010
36020
|
}, {
|
|
36011
|
-
label: t(jt[
|
|
36021
|
+
label: t(jt[j.DateRange]),
|
|
36012
36022
|
value: "date-range"
|
|
36013
36023
|
}, {
|
|
36014
|
-
label: t(jt[
|
|
36024
|
+
label: t(jt[j.MericoDateRange]),
|
|
36015
36025
|
value: "merico-date-range"
|
|
36016
36026
|
}], [n.language]);
|
|
36017
36027
|
return /* @__PURE__ */ u(v, { grow: !0, gap: 20, align: "top", children: [
|
|
@@ -36086,7 +36096,7 @@ const z8 = I(() => {
|
|
|
36086
36096
|
}), B8 = I(() => {
|
|
36087
36097
|
const {
|
|
36088
36098
|
t: e
|
|
36089
|
-
} = y(), [t, n] =
|
|
36099
|
+
} = y(), [t, n] = Q([]), a = le(), i = (d) => {
|
|
36090
36100
|
a.editor.setPath(["_FILTERS_", d]);
|
|
36091
36101
|
}, o = () => {
|
|
36092
36102
|
a.content.filters.downloadSchema(t);
|
|
@@ -36159,7 +36169,7 @@ const z8 = I(() => {
|
|
|
36159
36169
|
}), j8 = I(() => {
|
|
36160
36170
|
const {
|
|
36161
36171
|
t: e
|
|
36162
|
-
} = y(), t = ie(), [n, a] =
|
|
36172
|
+
} = y(), t = ie(), [n, a] = Q(() => JSON.stringify(t.mock_context.current, null, 4)), i = () => {
|
|
36163
36173
|
try {
|
|
36164
36174
|
t.mock_context.replace(JSON.parse(n));
|
|
36165
36175
|
} catch (l) {
|
|
@@ -36259,7 +36269,7 @@ const z8 = I(() => {
|
|
|
36259
36269
|
} = t, [a, i] = rs(n), o = n !== a, l = E.useCallback(() => {
|
|
36260
36270
|
o && t.setName(a);
|
|
36261
36271
|
}, [o, a]);
|
|
36262
|
-
|
|
36272
|
+
N(() => {
|
|
36263
36273
|
i(n);
|
|
36264
36274
|
}, [n]);
|
|
36265
36275
|
const s = !a.trim();
|
|
@@ -36429,7 +36439,7 @@ const X8 = [{
|
|
|
36429
36439
|
data: e,
|
|
36430
36440
|
loading: t
|
|
36431
36441
|
}) => {
|
|
36432
|
-
const [n, a] =
|
|
36442
|
+
const [n, a] = Q(1), [i, o] = Q(20), l = z(() => {
|
|
36433
36443
|
const s = (n - 1) * i, c = s + i;
|
|
36434
36444
|
return e.slice(s, c);
|
|
36435
36445
|
}, [e, n, i]);
|
|
@@ -36476,7 +36486,7 @@ const X8 = [{
|
|
|
36476
36486
|
}, [e, i]), d = () => {
|
|
36477
36487
|
i.queries.downloadDataByQueryID(null, e);
|
|
36478
36488
|
};
|
|
36479
|
-
|
|
36489
|
+
N(() => {
|
|
36480
36490
|
n && c();
|
|
36481
36491
|
}, [c, n]);
|
|
36482
36492
|
const h = !Array.isArray(o) || o.length === 0;
|
|
@@ -36509,7 +36519,7 @@ const X8 = [{
|
|
|
36509
36519
|
t
|
|
36510
36520
|
} = y(), n = le(), a = ie(), {
|
|
36511
36521
|
panel: i
|
|
36512
|
-
} = Ve(), [o, l] =
|
|
36522
|
+
} = Ve(), [o, l] = Q(!1), s = (d) => {
|
|
36513
36523
|
n.editor.setPath(["_QUERIES_", d]);
|
|
36514
36524
|
}, c = i.queryIDs.length;
|
|
36515
36525
|
return /* @__PURE__ */ u(q, { children: [
|
|
@@ -36571,7 +36581,7 @@ const oM = I(({
|
|
|
36571
36581
|
const {
|
|
36572
36582
|
t: n
|
|
36573
36583
|
} = y(), [a, i] = rs(e);
|
|
36574
|
-
|
|
36584
|
+
N(() => {
|
|
36575
36585
|
i(e);
|
|
36576
36586
|
}, [e]);
|
|
36577
36587
|
const o = iM(), l = e !== a;
|
|
@@ -36663,8 +36673,8 @@ const cM = I(() => {
|
|
|
36663
36673
|
}) => {
|
|
36664
36674
|
const {
|
|
36665
36675
|
t: n
|
|
36666
|
-
} = y(), a = ie(), [i, o] =
|
|
36667
|
-
|
|
36676
|
+
} = y(), a = ie(), [i, o] = Q(t);
|
|
36677
|
+
N(() => {
|
|
36668
36678
|
o(t);
|
|
36669
36679
|
}, [t]);
|
|
36670
36680
|
const [l, {
|
|
@@ -36924,8 +36934,8 @@ const vM = I(({
|
|
|
36924
36934
|
}) => {
|
|
36925
36935
|
const {
|
|
36926
36936
|
t
|
|
36927
|
-
} = y(), n = Ot(), a = le(), i = ie(), [o, l] =
|
|
36928
|
-
|
|
36937
|
+
} = y(), n = Ot(), a = le(), i = ie(), [o, l] = Q(a.editor.panelTab), s = e.queries, d = _M(e.viz.type) && e.dataLoading, h = d || e.queryErrors.length > 0 || e.queryStateMessages !== "" || s.length === 0, p = a.editor.path[1];
|
|
36938
|
+
N(() => {
|
|
36929
36939
|
l((w) => h && w === "Visualization" ? "Data" : w);
|
|
36930
36940
|
}, [e.id, h]);
|
|
36931
36941
|
const g = ne((w) => {
|
|
@@ -37007,7 +37017,7 @@ const vM = I(({
|
|
|
37007
37017
|
}), wM = I(() => {
|
|
37008
37018
|
const {
|
|
37009
37019
|
t: e
|
|
37010
|
-
} = y(), [t, n] =
|
|
37020
|
+
} = y(), [t, n] = Q([]), a = Ot(), i = le(), o = (g) => {
|
|
37011
37021
|
i.editor.setPath(["_QUERIES_", g]);
|
|
37012
37022
|
}, l = () => {
|
|
37013
37023
|
a.openConfirmModal({
|
|
@@ -37447,7 +37457,7 @@ const LM = I(({
|
|
|
37447
37457
|
const {
|
|
37448
37458
|
t
|
|
37449
37459
|
} = y(), n = e.dbInfo;
|
|
37450
|
-
return
|
|
37460
|
+
return N(() => {
|
|
37451
37461
|
n.loadTablesIfEmpty();
|
|
37452
37462
|
}, [n]), n.tables.error ? /* @__PURE__ */ r(k, { c: "red", size: "md", ta: "center", ff: "monospace", children: n.tables.error }) : /* @__PURE__ */ u(Be, { sx: {
|
|
37453
37463
|
height: "100%"
|
|
@@ -37493,7 +37503,7 @@ const LM = I(({
|
|
|
37493
37503
|
}) => {
|
|
37494
37504
|
const {
|
|
37495
37505
|
t: n
|
|
37496
|
-
} = y(), [a, i] =
|
|
37506
|
+
} = y(), [a, i] = Q(!1), {
|
|
37497
37507
|
type: o
|
|
37498
37508
|
} = e;
|
|
37499
37509
|
return o === "http" || o === "merico_metric_system" ? null : /* @__PURE__ */ u(q, { children: [
|
|
@@ -37608,8 +37618,8 @@ const LM = I(({
|
|
|
37608
37618
|
}) => {
|
|
37609
37619
|
const {
|
|
37610
37620
|
t
|
|
37611
|
-
} = y(), [n, a] =
|
|
37612
|
-
|
|
37621
|
+
} = y(), [n, a] = Q(e.name);
|
|
37622
|
+
N(() => {
|
|
37613
37623
|
a(e.name);
|
|
37614
37624
|
}, [e.name]);
|
|
37615
37625
|
const i = z(() => e.conditionOptionsWithInvalidRunbys.optionGroups.map((l) => ({
|
|
@@ -37710,7 +37720,7 @@ WHERE
|
|
|
37710
37720
|
}), _o = I(() => {
|
|
37711
37721
|
const {
|
|
37712
37722
|
t: e
|
|
37713
|
-
} = y(), [t, n] =
|
|
37723
|
+
} = y(), [t, n] = Q(!1);
|
|
37714
37724
|
return /* @__PURE__ */ u(q, { children: [
|
|
37715
37725
|
/* @__PURE__ */ r(_e, { opened: t, onClose: () => n(!1), title: e("query_variable.labels"), zIndex: 320, size: "800px", children: /* @__PURE__ */ r(bh, {}) }),
|
|
37716
37726
|
/* @__PURE__ */ r(V, { variant: "subtle", onClick: () => n(!0), px: 16, styles: {
|
|
@@ -37815,14 +37825,14 @@ WHERE
|
|
|
37815
37825
|
}) => {
|
|
37816
37826
|
const {
|
|
37817
37827
|
t
|
|
37818
|
-
} = y(), n = e.config, [a, i] =
|
|
37828
|
+
} = y(), n = e.config, [a, i] = Q(n.sql), o = () => {
|
|
37819
37829
|
n.setSQL(a);
|
|
37820
37830
|
}, l = () => {
|
|
37821
37831
|
i(n.sql);
|
|
37822
37832
|
}, s = () => {
|
|
37823
37833
|
i(UM);
|
|
37824
37834
|
};
|
|
37825
|
-
|
|
37835
|
+
N(() => {
|
|
37826
37836
|
i(n.sql);
|
|
37827
37837
|
}, [n.sql]);
|
|
37828
37838
|
const c = a !== n.sql;
|
|
@@ -37932,8 +37942,8 @@ WHERE
|
|
|
37932
37942
|
}) => {
|
|
37933
37943
|
const {
|
|
37934
37944
|
t
|
|
37935
|
-
} = y(), n = ie(), a = z(() => e.datasource ? e.typedAsHTTP ? "HTTP" : "SQL" : "Configurations", [e.datasource, e.typedAsHTTP]), [i, o] =
|
|
37936
|
-
|
|
37945
|
+
} = y(), n = ie(), a = z(() => e.datasource ? e.typedAsHTTP ? "HTTP" : "SQL" : "Configurations", [e.datasource, e.typedAsHTTP]), [i, o] = Q(a);
|
|
37946
|
+
N(() => {
|
|
37937
37947
|
o((c) => c !== "Configurations" && a === "Configurations" ? "Configurations" : c);
|
|
37938
37948
|
}, [a]);
|
|
37939
37949
|
const s = n.findQueryUsage(e.id).length === 0;
|
|
@@ -38164,7 +38174,7 @@ const s9 = [{
|
|
|
38164
38174
|
data: e,
|
|
38165
38175
|
loading: t
|
|
38166
38176
|
}) => {
|
|
38167
|
-
const [n, a] =
|
|
38177
|
+
const [n, a] = Q(1), [i, o] = Q(20), l = z(() => {
|
|
38168
38178
|
const s = (n - 1) * i, c = s + i;
|
|
38169
38179
|
return e.slice(s, c);
|
|
38170
38180
|
}, [e, n, i]);
|
|
@@ -38211,7 +38221,7 @@ const s9 = [{
|
|
|
38211
38221
|
}, [e.fetchData]), o = () => {
|
|
38212
38222
|
vu(e.name, e.data);
|
|
38213
38223
|
};
|
|
38214
|
-
|
|
38224
|
+
N(() => {
|
|
38215
38225
|
i();
|
|
38216
38226
|
}, [i]);
|
|
38217
38227
|
const l = !Array.isArray(t) || t.length === 0;
|
|
@@ -38515,7 +38525,7 @@ const s9 = [{
|
|
|
38515
38525
|
queryModel: e
|
|
38516
38526
|
}) => {
|
|
38517
38527
|
const t = e.config, a = e.datasource.mericoMetricInfo;
|
|
38518
|
-
return
|
|
38528
|
+
return N(() => {
|
|
38519
38529
|
a.selectMetric(t.id);
|
|
38520
38530
|
}, [t.id, a]), /* @__PURE__ */ u(D, { gap: 7, children: [
|
|
38521
38531
|
/* @__PURE__ */ u(v, { justify: "flex-start", gap: 8, children: [
|
|
@@ -38654,7 +38664,7 @@ const s9 = [{
|
|
|
38654
38664
|
queryModel: e
|
|
38655
38665
|
}) => {
|
|
38656
38666
|
const t = e.config, a = e.datasource.mericoMetricInfo;
|
|
38657
|
-
return
|
|
38667
|
+
return N(() => {
|
|
38658
38668
|
a.selectMetric(t.id);
|
|
38659
38669
|
}, [t.id, a]), a.metricDetail.metricType !== "sql" ? null : /* @__PURE__ */ u(D, { gap: 7, children: [
|
|
38660
38670
|
/* @__PURE__ */ u(v, { justify: "flex-start", gap: 8, children: [
|
|
@@ -38798,7 +38808,7 @@ const s9 = [{
|
|
|
38798
38808
|
queryModel: e
|
|
38799
38809
|
}) => {
|
|
38800
38810
|
const t = e.config, a = e.datasource.mericoMetricInfo, i = a.metricDetail, o = a.metrics.loading || i.loading, l = i.error, s = wt(t.timeQuery.enabled);
|
|
38801
|
-
if (
|
|
38811
|
+
if (N(() => {
|
|
38802
38812
|
if (s.current && !t.timeQuery.enabled) {
|
|
38803
38813
|
const d = xt(t.extraCalculations) || [], h = Lu(d, !1);
|
|
38804
38814
|
h.length !== d.length && t.setExtraCalculations(h);
|
|
@@ -38835,7 +38845,7 @@ const s9 = [{
|
|
|
38835
38845
|
queryModel: e
|
|
38836
38846
|
}) => {
|
|
38837
38847
|
const t = e.config, n = t.id;
|
|
38838
|
-
|
|
38848
|
+
N(() => {
|
|
38839
38849
|
if (e.run_by.length === 0)
|
|
38840
38850
|
return;
|
|
38841
38851
|
const s = [], c = t.usedFilterVariableSet, d = t.usedTimeQueryVariableSet;
|
|
@@ -38873,7 +38883,7 @@ const s9 = [{
|
|
|
38873
38883
|
}, O9 = I(({
|
|
38874
38884
|
queryModel: e
|
|
38875
38885
|
}) => {
|
|
38876
|
-
const [t, n] =
|
|
38886
|
+
const [t, n] = Q("编辑查询");
|
|
38877
38887
|
return /* @__PURE__ */ u(S, { color: "red", defaultValue: "编辑查询", styles: E9, value: t, onChange: n, w: "60%", children: [
|
|
38878
38888
|
/* @__PURE__ */ u(S.List, { children: [
|
|
38879
38889
|
/* @__PURE__ */ r(S.Tab, { value: "编辑查询", size: "xs", children: "编辑查询" }),
|
|
@@ -38920,9 +38930,9 @@ const s9 = [{
|
|
|
38920
38930
|
queryModel: e
|
|
38921
38931
|
}) => {
|
|
38922
38932
|
const t = e.config, a = e.datasource.mericoMetricInfo, i = a.metrics;
|
|
38923
|
-
|
|
38933
|
+
N(() => {
|
|
38924
38934
|
i.load();
|
|
38925
|
-
}, [i]),
|
|
38935
|
+
}, [i]), N(() => {
|
|
38926
38936
|
!a.metricID && t.id && a.selectMetric(t.id);
|
|
38927
38937
|
}, [t.id]);
|
|
38928
38938
|
const o = z(() => i.data.map((h) => ({
|
|
@@ -39019,12 +39029,12 @@ const s9 = [{
|
|
|
39019
39029
|
}) => {
|
|
39020
39030
|
const {
|
|
39021
39031
|
t: a
|
|
39022
|
-
} = y(), [i, o] =
|
|
39032
|
+
} = y(), [i, o] = Q("SQL"), [l, s] = Q(e.key), c = () => {
|
|
39023
39033
|
e.setKey(l), n(l);
|
|
39024
|
-
}, d = l !== e.key, h = e.isADuplicatedKey(l), [p, g] =
|
|
39034
|
+
}, d = l !== e.key, h = e.isADuplicatedKey(l), [p, g] = Q(e.value), b = () => {
|
|
39025
39035
|
e.setValue(p);
|
|
39026
39036
|
};
|
|
39027
|
-
|
|
39037
|
+
N(() => {
|
|
39028
39038
|
s(e.key), g(e.value);
|
|
39029
39039
|
}, [e]);
|
|
39030
39040
|
const _ = p !== e.value, w = Ot(), T = () => {
|
|
@@ -39102,7 +39112,7 @@ const s9 = [{
|
|
|
39102
39112
|
}), W9 = I(() => {
|
|
39103
39113
|
const {
|
|
39104
39114
|
t: e
|
|
39105
|
-
} = y(), [t, n] =
|
|
39115
|
+
} = y(), [t, n] = Q([]), a = Ot(), i = le(), o = (g) => {
|
|
39106
39116
|
i.editor.setPath(["_SQL_SNIPPETS_", g]);
|
|
39107
39117
|
}, l = () => {
|
|
39108
39118
|
a.openConfirmModal({
|
|
@@ -39253,7 +39263,7 @@ const s9 = [{
|
|
|
39253
39263
|
} = y(), [a, {
|
|
39254
39264
|
setTrue: i,
|
|
39255
39265
|
setFalse: o
|
|
39256
|
-
}] = we(), [l, s] =
|
|
39266
|
+
}] = we(), [l, s] = Q(e ?? Na), c = (b) => {
|
|
39257
39267
|
s({
|
|
39258
39268
|
...l,
|
|
39259
39269
|
enabled: b
|
|
@@ -39410,7 +39420,7 @@ const s9 = [{
|
|
|
39410
39420
|
key: a,
|
|
39411
39421
|
label: a,
|
|
39412
39422
|
order: t.content.filters.current.length + 1,
|
|
39413
|
-
type:
|
|
39423
|
+
type: j.TextInput,
|
|
39414
39424
|
config: Jd(),
|
|
39415
39425
|
visibleInViewsIDs: ["Main"],
|
|
39416
39426
|
auto_submit: !1
|
|
@@ -39546,8 +39556,8 @@ const s9 = [{
|
|
|
39546
39556
|
var g;
|
|
39547
39557
|
const {
|
|
39548
39558
|
t
|
|
39549
|
-
} = y(), n = ie(), a = le().editor, i = a.isOptionActive, o = i(a.path, e), l = a.isOptionOpened, s = a.navigate, c = l(e), [d, h] =
|
|
39550
|
-
|
|
39559
|
+
} = y(), n = ie(), a = le().editor, i = a.isOptionActive, o = i(a.path, e), l = a.isOptionOpened, s = a.navigate, c = l(e), [d, h] = Q(c);
|
|
39560
|
+
N(() => {
|
|
39551
39561
|
h(c);
|
|
39552
39562
|
}, [c]);
|
|
39553
39563
|
const p = e._type === "query";
|
|
@@ -39635,7 +39645,7 @@ const s9 = [{
|
|
|
39635
39645
|
] }) });
|
|
39636
39646
|
}), vV = (e) => e.replace(/([^:])(\/\/+)/g, "$1/");
|
|
39637
39647
|
function xV(e) {
|
|
39638
|
-
|
|
39648
|
+
N(() => {
|
|
39639
39649
|
if (ya.__getMonacoInstance())
|
|
39640
39650
|
return;
|
|
39641
39651
|
console.log("loading monaco for @devtable/dashboard");
|
|
@@ -39652,7 +39662,7 @@ const wV = (e) => {
|
|
|
39652
39662
|
const a = n || window.event;
|
|
39653
39663
|
return a.preventDefault(), a && (a.returnValue = ""), "";
|
|
39654
39664
|
}, []);
|
|
39655
|
-
|
|
39665
|
+
N(() => {
|
|
39656
39666
|
if (e)
|
|
39657
39667
|
return window.addEventListener("beforeunload", t), () => {
|
|
39658
39668
|
window.removeEventListener("beforeunload", t);
|
|
@@ -39716,7 +39726,7 @@ const SV = {
|
|
|
39716
39726
|
}), [T]);
|
|
39717
39727
|
const M = async () => {
|
|
39718
39728
|
await a(T.json, T.content.json);
|
|
39719
|
-
}, $ = Wt(Ji, []),
|
|
39729
|
+
}, $ = Wt(Ji, []), F = oh($);
|
|
39720
39730
|
return wV(T.content.changed), Ul("@devtable/dashboard editor", {
|
|
39721
39731
|
context: e,
|
|
39722
39732
|
dashboard: t,
|
|
@@ -39738,7 +39748,7 @@ const SV = {
|
|
|
39738
39748
|
inEditMode: !0
|
|
39739
39749
|
}, children: [
|
|
39740
39750
|
/* @__PURE__ */ r(YI, {}),
|
|
39741
|
-
/* @__PURE__ */ r(ln.Provider, { value: $, children: /* @__PURE__ */ u(aa, { configure:
|
|
39751
|
+
/* @__PURE__ */ r(ln.Provider, { value: $, children: /* @__PURE__ */ u(aa, { configure: F, children: [
|
|
39742
39752
|
/* @__PURE__ */ u(ot, { padding: 0, navbar: {
|
|
39743
39753
|
width: {
|
|
39744
39754
|
base: 200,
|
|
@@ -40018,7 +40028,7 @@ const DV = ({
|
|
|
40018
40028
|
setFullScreenPanelID: l
|
|
40019
40029
|
}, children: /* @__PURE__ */ r(Un.Provider, { value: {
|
|
40020
40030
|
inEditMode: !1
|
|
40021
|
-
}, children: /* @__PURE__ */ r(R, { className: `${a} dashboard-root`, children: /* @__PURE__ */ r(ln.Provider, { value: M, children: /* @__PURE__ */ r(aa, { configure: $, children: T.content.views.visibleViews.map((
|
|
40031
|
+
}, children: /* @__PURE__ */ r(R, { className: `${a} dashboard-root`, children: /* @__PURE__ */ r(ln.Provider, { value: M, children: /* @__PURE__ */ r(aa, { configure: $, children: T.content.views.visibleViews.map((F) => /* @__PURE__ */ r(fo, { view: F }, F.id)) }) }) }) }) }) }) }) }) }) }) }) }) }) });
|
|
40022
40032
|
}, O$ = I(DV), q$ = () => Promise.resolve().then(() => Mg).then(({
|
|
40023
40033
|
version: e
|
|
40024
40034
|
}) => (console.log(`[@devtable/dashboard] version: ${e}`), e));
|
|
@@ -40037,7 +40047,7 @@ export {
|
|
|
40037
40047
|
CT as DashboardApiClient,
|
|
40038
40048
|
kT as DashboardApiFacadeClient,
|
|
40039
40049
|
E$ as DashboardEditor,
|
|
40040
|
-
|
|
40050
|
+
j as DashboardFilterType,
|
|
40041
40051
|
G4 as DashboardMode,
|
|
40042
40052
|
DI as DashboardModel,
|
|
40043
40053
|
Xs as DashboardModelContextProvider,
|