@astrato-io/visualizations 0.10.1 → 0.12.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/CHANGELOG.md +30 -1
- package/README.md +148 -5
- package/THIRD_PARTY_NOTICES.md +494 -0
- package/VISUALIZATION_DEFINITIONS.md +9 -146
- package/chunks/{Button-Dn3rJrYf.js → Button-CQdoKSXX.js} +3 -3
- package/chunks/{CircularProgress-BFeu06Yb.js → CircularProgress-DpT1lwWw.js} +20 -20
- package/chunks/FieldTypeIcon-Cg4F9Q5D.js +22 -0
- package/chunks/{LinearProgress-ClO6GUjN.js → LinearProgress-B7S0Q26A.js} +14 -14
- package/chunks/{MenuOption-Czc34u4q.js → MenuOption-DpKFJxmo.js} +167 -167
- package/chunks/{Title-BgYnaVTR.js → Title-m5damhc0.js} +37 -37
- package/chunks/{_createAggregator-BMu9uRax.js → _createAggregator-BA8_iU9q.js} +17 -17
- package/chunks/{app-filter-bar.compiler-CVir0wkl.js → app-filter-bar.compiler--T4Qz3Wu.js} +8 -8
- package/chunks/{bar-layout-C_UgRlVl.js → bar-layout-OFhxn2Go.js} +2 -2
- package/chunks/{bar.compiler-DYuFdi9J.js → bar.compiler-hWZBYYvV.js} +71 -69
- package/chunks/{builder-C-TKA-My.js → builder-7w_bgV_h.js} +106 -55
- package/chunks/{coloring-BtnPiQ_o.js → coloring-Cd6p0GQJ.js} +93 -88
- package/chunks/{createSimplePaletteValueFilter--zrZxRV9.js → createSimplePaletteValueFilter-CiJT8s1s.js} +169 -169
- package/chunks/defaults-CMFqXvaJ.js +3 -0
- package/chunks/{definitions-CT304NDn.js → definitions-DTauTjIX.js} +399 -398
- package/chunks/{escobar-CvEV2ES1.js → escobar-CMvphKSK.js} +4949 -4879
- package/chunks/{extend-preset-D9-JP92b.js → extend-preset-BpXttHFk.js} +449 -450
- package/chunks/{filter.compiler-CXeZznks.js → filter.compiler-DOGFweJz.js} +10 -10
- package/chunks/{filtering-8_bFv-jb.js → filtering-NOnDcGbo.js} +241 -241
- package/chunks/handlers-CyYFSfhM.js +15393 -0
- package/chunks/{icon-picker-styles-BXiJ1SZS.js → icon-picker-styles-DuSERhBU.js} +8 -8
- package/chunks/{isEqual-D8Ay63xR.js → isEqual-4f8yUUtC.js} +1 -1
- package/chunks/{isFocusVisible-Bu8gGZu5.js → isFocusVisible-Czm70MGc.js} +9 -9
- package/chunks/line.compiler-B-4H55_T.js +203 -0
- package/chunks/linear-Bq_r9l5S.js +264 -0
- package/chunks/{logger-DdZpR7xZ.js → logger-Cioob-QV.js} +74 -73
- package/chunks/{lookup-BWllin0q.js → lookup-B3tWH2hX.js} +1 -0
- package/chunks/{map.compiler-Q_Y1Pvat.js → map.compiler-Cv5V6EhF.js} +40 -40
- package/chunks/measure-axis-label-format-COy8U_dd.js +27 -0
- package/chunks/measure-format-default-B_kuGSzi.js +26 -0
- package/chunks/{metadata-BQm_TXI1.js → metadata-dGSe5UWy.js} +5 -5
- package/chunks/number.compiler-D7nMcEMv.js +57 -0
- package/chunks/{operations-DKQWuLL7.js → operations-CgfehCad.js} +11397 -11114
- package/chunks/{range-BdhzvYQ_.js → range-Dmwp9kVB.js} +2 -2
- package/chunks/{react-dom-BGP4tbXV.js → react-dom-CfuL-m78.js} +82 -82
- package/chunks/{render-wrappers-BZpyDnJy.js → render-wrappers--g-zPFBW.js} +1 -1
- package/chunks/{requirements-e8Fe96ag.js → requirements-DHayNJ2C.js} +245 -221
- package/chunks/{shared-C_2F90xq.js → shared-DoEN9nNM.js} +505 -494
- package/chunks/standalone-B3hRGgYi.js +773 -0
- package/chunks/{standalone-BkbiH-o8.js → standalone-BPNXgFft.js} +498 -759
- package/chunks/standalone-BPTT8XEu.js +424 -0
- package/chunks/standalone-BgAeHROc.js +2 -0
- package/chunks/{standalone-BE_ONgiG.js → standalone-BkQxag7M.js} +102 -102
- package/chunks/{standalone-Cc98Pdr6.js → standalone-Bxa3x6dg.js} +872 -872
- package/chunks/standalone-C0If-V6O.js +773 -0
- package/chunks/standalone-C1TOyflX.js +287 -0
- package/chunks/{standalone-CY_kjarf.js → standalone-CE5PwJN0.js} +18 -18
- package/chunks/{standalone-B8ZSqauS.js → standalone-CG7IFN6n.js} +120 -120
- package/chunks/{standalone-wOWRCpdn.js → standalone-CKlgGu80.js} +49 -49
- package/chunks/standalone-CNf-oA2U.js +355 -0
- package/chunks/{standalone-BDrXVxlP.js → standalone-CXPdWFlw.js} +14 -14
- package/chunks/{standalone-z0o52o5t.js → standalone-Cf0_5tbu.js} +5567 -5568
- package/chunks/{standalone-Cl0TSfqC.js → standalone-DMi4-Vp3.js} +122 -122
- package/chunks/{standalone-DNh9NcMa.js → standalone-DTEX67C8.js} +154 -154
- package/chunks/{standalone-DHRalbVO.js → standalone-DU46-kYv.js} +279 -279
- package/chunks/standalone-Dbn3jSH6.js +690 -0
- package/chunks/{standalone-CsoMmE9T.js → standalone-DdcAL_k_.js} +839 -843
- package/chunks/standalone-DwCIA0UG.js +1057 -0
- package/chunks/standalone-Dz13tl3P.js +357 -0
- package/chunks/standalone-H9GFzFk_.js +8377 -0
- package/chunks/{standalone-CaTxAydz.js → standalone-MduR0qre.js} +2227 -1000
- package/chunks/standalone-ejTz66P3.js +2 -0
- package/chunks/{standalone-DflyWtuR.js → standalone-keB-0wK3.js} +216 -216
- package/chunks/{standalone-BTY3w_JA.js → standalone-nnkuQd0K.js} +28 -28
- package/chunks/standalone-vGGR6Vcn.js +6 -0
- package/chunks/{table.compiler-COaHE9VD.js → table.compiler-mS4UvhLT.js} +31 -31
- package/chunks/theme-MYp6Rj1J.js +232 -0
- package/chunks/{useFieldName-CdnCWzhd.js → useFieldName-AdSak4Ch.js} +1 -1
- package/chunks/{utils-DganVptf.js → utils-CUKgR7it.js} +4216 -4070
- package/chunks/{view-Bzlros43.js → view-BeYwpcVD.js} +1561 -1561
- package/chunks/{visualization-filters-D7i6oh1Z.js → visualization-filters-B9qik5_K.js} +2683 -2342
- package/chunks/{with-html-element-CiIhFEa5.js → with-html-element-1GSeLT59.js} +3712 -3682
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +144 -32
- package/docs/operations/combo.md +79 -17
- package/docs/operations/date-picker.md +4 -4
- package/docs/operations/distribution-gauge.md +18 -16
- package/docs/operations/dot.md +107 -24
- package/docs/operations/filter.md +10 -8
- package/docs/operations/gauge.md +20 -18
- package/docs/operations/heatMap.md +73 -21
- package/docs/operations/histogram.md +45 -12
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +12 -11
- package/docs/operations/line.md +86 -24
- package/docs/operations/map.md +5274 -0
- package/docs/operations/number.md +10 -9
- package/docs/operations/pie.md +23 -21
- package/docs/operations/radar.md +13 -11
- package/docs/operations/sankey.md +19 -17
- package/docs/operations/scatter.md +111 -28
- package/docs/operations/shape.md +5 -5
- package/docs/operations/simpleTextObject.md +4 -4
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +27 -25
- package/docs/operations/tree.md +5 -3
- package/docs/operations/treemap.md +70 -18
- package/docs/operations/waterfall.md +40 -7
- package/docs/operations/word-cloud.md +69 -17
- package/getters.js +3 -3
- package/index.js +585 -612
- package/metadata.js +2 -2
- package/operations.js +25 -18
- package/package.json +74 -70
- package/src/definitions/index.d.ts +1 -7
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +3 -48
- package/src/definitions/model/definitions/schema-registry.d.ts +15 -14
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +3 -3
- package/src/definitions/model/definitions/schemas/broad-chart.schema.d.ts +2 -2
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +19 -6
- package/src/definitions/model/definitions/schemas/index.d.ts +1 -1
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +4 -3
- package/src/definitions/model/definitions/schemas/number.schema.d.ts +1 -1
- package/src/definitions/model/definitions/schemas/table.schema.d.ts +14 -14
- package/src/index.d.ts +1 -1
- package/src/operations/index.d.ts +11 -1
- package/src/types.d.ts +166 -1
- package/src/visualization-catalog.d.ts +3 -0
- package/styles.css +1 -1
- package/chunks/FieldTypeIcon-DrMoGpHJ.js +0 -22
- package/chunks/color-rules-DYJL4fIW.js +0 -15
- package/chunks/color-settings-DJFoFTip.js +0 -5
- package/chunks/defaults-Dtk7fg3C.js +0 -3
- package/chunks/handlers-C6CZ0XJA.js +0 -15399
- package/chunks/line.compiler-DmHpmQCC.js +0 -198
- package/chunks/number.compiler-DQdg6zTy.js +0 -53
- package/chunks/standalone-4MsKiqs0.js +0 -355
- package/chunks/standalone-B794g9pE.js +0 -1012
- package/chunks/standalone-BA2YXyJS.js +0 -422
- package/chunks/standalone-BgumbdaJ2.js +0 -357
- package/chunks/standalone-Blh4qejk.js +0 -689
- package/chunks/standalone-CXY4FpF7.js +0 -773
- package/chunks/standalone-DH0xTEes.js +0 -2
- package/chunks/standalone-DcnHjNnC.js +0 -2
- package/chunks/standalone-DrHdGkY7.js +0 -762
- package/chunks/standalone-c_rROMtx.js +0 -287
- package/chunks/standalone-drcFLeN6.js +0 -6
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { s as
|
|
5
|
-
import { A as
|
|
6
|
-
import { C as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { a as
|
|
9
|
-
import { f as
|
|
10
|
-
import { n as
|
|
11
|
-
import { d as
|
|
12
|
-
import { t as
|
|
13
|
-
function
|
|
14
|
-
return
|
|
2
|
+
import { Go as t, Ko as n, Sa as r, To as i, Ua as a, ca as o, ga as s, ic as c, oa as l, pc as u, ql as d, qo as f, vl as p } from "./visualization-filters-B9qik5_K.js";
|
|
3
|
+
import { A as m, Ar as h, En as g, G as _, Ir as v, K as y, Mt as b, Pn as x, Q as S, Rr as C, Tt as w, Ur as T, X as E, Xn as D, Z as O, at as k, c as A, et as j, f as M, fi as N, h as P, j as F, l as I, m as ee, n as te, q as ne, tn as re } from "./utils-CUKgR7it.js";
|
|
4
|
+
import { s as ie } from "./logger-Cioob-QV.js";
|
|
5
|
+
import { A as L, I as ae, P as R, a as oe, d as z, h as se, m as ce, u as le } from "./MenuOption-DpKFJxmo.js";
|
|
6
|
+
import { C as ue, a as de, b as fe, c as pe, d as me, g as he, h as ge, i as _e, l as ve, n as ye, o as be, r as xe, s as Se, t as Ce, u as we, v as Te, y as Ee } from "./filtering-NOnDcGbo.js";
|
|
7
|
+
import { _ as De, a as Oe, c as B, d as V, f as H, g as ke, i as Ae, l as je, m as Me, o as Ne, u as Pe, v as Fe } from "./react-dom-CfuL-m78.js";
|
|
8
|
+
import { a as Ie, i as U, n as Le } from "./isFocusVisible-Czm70MGc.js";
|
|
9
|
+
import { f as Re, g as ze, l as W, n as Be, p as Ve, y as He } from "./Title-m5damhc0.js";
|
|
10
|
+
import { n as Ue, r as We, t as Ge } from "./CircularProgress-DpT1lwWw.js";
|
|
11
|
+
import { d as Ke, f as G, p as qe } from "./responsive.styles-FItb913l.js";
|
|
12
|
+
import { t as Je } from "./Button-CQdoKSXX.js";
|
|
13
|
+
function Ye(e) {
|
|
14
|
+
return Fe("MuiCheckbox", e);
|
|
15
15
|
}
|
|
16
|
-
var
|
|
16
|
+
var Xe = De("MuiCheckbox", [
|
|
17
17
|
"root",
|
|
18
18
|
"checked",
|
|
19
19
|
"disabled",
|
|
@@ -23,18 +23,18 @@ var Ye = Te("MuiCheckbox", [
|
|
|
23
23
|
"sizeSmall",
|
|
24
24
|
"sizeMedium"
|
|
25
25
|
]);
|
|
26
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function Ze({ props: e, name: t }) {
|
|
27
|
+
return ue({
|
|
28
28
|
props: e,
|
|
29
29
|
name: t,
|
|
30
|
-
defaultTheme:
|
|
31
|
-
themeId:
|
|
30
|
+
defaultTheme: ne,
|
|
31
|
+
themeId: w
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
34
|
+
function Qe(e) {
|
|
35
|
+
return Fe("MuiSvgIcon", e);
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
De("MuiSvgIcon", [
|
|
38
38
|
"root",
|
|
39
39
|
"colorPrimary",
|
|
40
40
|
"colorSecondary",
|
|
@@ -46,31 +46,31 @@ Te("MuiSvgIcon", [
|
|
|
46
46
|
"fontSizeMedium",
|
|
47
47
|
"fontSizeLarge"
|
|
48
48
|
]);
|
|
49
|
-
var K = /* @__PURE__ */ e(
|
|
49
|
+
var K = /* @__PURE__ */ e(N(), 1), q = T(), $e = (e) => {
|
|
50
50
|
let { color: t, fontSize: n, classes: r } = e;
|
|
51
|
-
return
|
|
51
|
+
return Me({ root: [
|
|
52
52
|
"root",
|
|
53
|
-
t !== "inherit" && `color${
|
|
54
|
-
`fontSize${
|
|
55
|
-
] },
|
|
56
|
-
},
|
|
53
|
+
t !== "inherit" && `color${B(t)}`,
|
|
54
|
+
`fontSize${B(n)}`
|
|
55
|
+
] }, Qe, r);
|
|
56
|
+
}, et = V("svg", {
|
|
57
57
|
name: "MuiSvgIcon",
|
|
58
58
|
slot: "Root",
|
|
59
59
|
overridesResolver: (e, t) => {
|
|
60
60
|
let { ownerState: n } = e;
|
|
61
61
|
return [
|
|
62
62
|
t.root,
|
|
63
|
-
n.color !== "inherit" && t[`color${
|
|
64
|
-
t[`fontSize${
|
|
63
|
+
n.color !== "inherit" && t[`color${B(n.color)}`],
|
|
64
|
+
t[`fontSize${B(n.fontSize)}`]
|
|
65
65
|
];
|
|
66
66
|
}
|
|
67
|
-
})(
|
|
67
|
+
})(Pe(({ theme: e }) => ({
|
|
68
68
|
userSelect: "none",
|
|
69
69
|
width: "1em",
|
|
70
70
|
height: "1em",
|
|
71
71
|
display: "inline-block",
|
|
72
72
|
flexShrink: 0,
|
|
73
|
-
...
|
|
73
|
+
...Oe(e, "fill", { duration: (e.vars ?? e).transitions?.duration?.shorter }),
|
|
74
74
|
variants: [
|
|
75
75
|
{
|
|
76
76
|
props: (e) => !e.hasSvgAsChild,
|
|
@@ -109,8 +109,8 @@ var K = /* @__PURE__ */ e(k(), 1), q = ee(), Qe = (e) => {
|
|
|
109
109
|
style: { color: void 0 }
|
|
110
110
|
}
|
|
111
111
|
]
|
|
112
|
-
}))),
|
|
113
|
-
let n =
|
|
112
|
+
}))), tt = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
113
|
+
let n = je({
|
|
114
114
|
props: e,
|
|
115
115
|
name: "MuiSvgIcon"
|
|
116
116
|
}), { children: r, className: i, color: a = "inherit", component: o = "svg", fontSize: s = "medium", htmlColor: c, inheritViewBox: l = !1, titleAccess: u, viewBox: d = "0 0 24 24", ...f } = n, p = /*#__PURE__*/ K.isValidElement(r) && r.type === "svg", m = {
|
|
@@ -124,10 +124,10 @@ var K = /* @__PURE__ */ e(k(), 1), q = ee(), Qe = (e) => {
|
|
|
124
124
|
hasSvgAsChild: p
|
|
125
125
|
}, h = {};
|
|
126
126
|
l || (h.viewBox = d);
|
|
127
|
-
let g =
|
|
128
|
-
return /*#__PURE__*/ (0, q.jsxs)(
|
|
127
|
+
let g = $e(m);
|
|
128
|
+
return /*#__PURE__*/ (0, q.jsxs)(et, {
|
|
129
129
|
as: o,
|
|
130
|
-
className:
|
|
130
|
+
className: k(g.root, i),
|
|
131
131
|
focusable: "false",
|
|
132
132
|
color: c,
|
|
133
133
|
"aria-hidden": !u || void 0,
|
|
@@ -140,22 +140,22 @@ var K = /* @__PURE__ */ e(k(), 1), q = ee(), Qe = (e) => {
|
|
|
140
140
|
children: [p ? r.props.children : r, u ? /*#__PURE__*/ (0, q.jsx)("title", { children: u }) : null]
|
|
141
141
|
});
|
|
142
142
|
});
|
|
143
|
-
|
|
144
|
-
function
|
|
143
|
+
tt.muiName = "SvgIcon";
|
|
144
|
+
function nt(e, t) {
|
|
145
145
|
function n(t, n) {
|
|
146
|
-
return /*#__PURE__*/ (0, q.jsx)(
|
|
146
|
+
return /*#__PURE__*/ (0, q.jsx)(tt, {
|
|
147
147
|
"data-testid": void 0,
|
|
148
148
|
ref: n,
|
|
149
149
|
...t,
|
|
150
150
|
children: e
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
return n.muiName =
|
|
153
|
+
return n.muiName = tt.muiName, /*#__PURE__*/ K.memo(/*#__PURE__*/ K.forwardRef(n));
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
return
|
|
155
|
+
function rt(e) {
|
|
156
|
+
return Fe("MuiCollapse", e);
|
|
157
157
|
}
|
|
158
|
-
|
|
158
|
+
De("MuiCollapse", [
|
|
159
159
|
"root",
|
|
160
160
|
"horizontal",
|
|
161
161
|
"vertical",
|
|
@@ -164,16 +164,16 @@ Te("MuiCollapse", [
|
|
|
164
164
|
"wrapper",
|
|
165
165
|
"wrapperInner"
|
|
166
166
|
]);
|
|
167
|
-
var
|
|
167
|
+
var it = {}, at = (e) => {
|
|
168
168
|
let { orientation: t, classes: n } = e;
|
|
169
|
-
return
|
|
169
|
+
return Me({
|
|
170
170
|
root: ["root", t],
|
|
171
171
|
entered: ["entered"],
|
|
172
172
|
hidden: ["hidden"],
|
|
173
173
|
wrapper: ["wrapper", t],
|
|
174
174
|
wrapperInner: ["wrapperInner", t]
|
|
175
|
-
},
|
|
176
|
-
},
|
|
175
|
+
}, rt, n);
|
|
176
|
+
}, ot = V("div", {
|
|
177
177
|
name: "MuiCollapse",
|
|
178
178
|
slot: "Root",
|
|
179
179
|
overridesResolver: (e, t) => {
|
|
@@ -185,7 +185,7 @@ var rt = {}, it = (e) => {
|
|
|
185
185
|
n.state === "exited" && !n.in && n.collapsedSize === "0px" && t.hidden
|
|
186
186
|
];
|
|
187
187
|
}
|
|
188
|
-
})(
|
|
188
|
+
})(Pe(({ theme: e }) => ({
|
|
189
189
|
height: 0,
|
|
190
190
|
overflow: "hidden",
|
|
191
191
|
transition: e.transitions.create("height"),
|
|
@@ -217,7 +217,7 @@ var rt = {}, it = (e) => {
|
|
|
217
217
|
style: { visibility: "hidden" }
|
|
218
218
|
}
|
|
219
219
|
]
|
|
220
|
-
}))),
|
|
220
|
+
}))), st = V("div", {
|
|
221
221
|
name: "MuiCollapse",
|
|
222
222
|
slot: "Wrapper"
|
|
223
223
|
})({
|
|
@@ -230,7 +230,7 @@ var rt = {}, it = (e) => {
|
|
|
230
230
|
height: "100%"
|
|
231
231
|
}
|
|
232
232
|
}]
|
|
233
|
-
}),
|
|
233
|
+
}), ct = V("div", {
|
|
234
234
|
name: "MuiCollapse",
|
|
235
235
|
slot: "WrapperInner"
|
|
236
236
|
})({
|
|
@@ -242,112 +242,112 @@ var rt = {}, it = (e) => {
|
|
|
242
242
|
height: "100%"
|
|
243
243
|
}
|
|
244
244
|
}]
|
|
245
|
-
}),
|
|
246
|
-
let n =
|
|
245
|
+
}), lt = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
246
|
+
let n = je({
|
|
247
247
|
props: e,
|
|
248
248
|
name: "MuiCollapse"
|
|
249
|
-
}), { addEndListener: r, children: i, className: a, collapsedSize: o = "0px", component: s, disablePrefersReducedMotion: c = !1, easing: l, in: u, onEnter: d, onEntered: f, onEntering: p, onExit: m, onExited: h, onExiting: g, orientation:
|
|
249
|
+
}), { addEndListener: r, children: i, className: a, collapsedSize: o = "0px", component: s, disablePrefersReducedMotion: c = !1, easing: l, in: u, onEnter: d, onEntered: f, onEntering: p, onExit: m, onExited: h, onExiting: g, orientation: _ = "vertical", slots: v = it, slotProps: b = it, style: x, timeout: S = E.standard, TransitionComponent: C = Ve, ...w } = n, T = {
|
|
250
250
|
...n,
|
|
251
|
-
orientation:
|
|
251
|
+
orientation: _,
|
|
252
252
|
collapsedSize: o
|
|
253
|
-
}, D =
|
|
254
|
-
|
|
255
|
-
}),
|
|
256
|
-
let n =
|
|
257
|
-
|
|
258
|
-
let { duration: r, easing: i } =
|
|
253
|
+
}, D = at(T), O = y(), A = K.useRef(null), j = K.useRef(null), M = typeof o == "number" ? `${o}px` : o, N = _ === "horizontal", P = N ? "width" : "height", F = Re(O.motion.reducedMotion, c), I = K.useRef(null), ee = He(t, I), te = () => A.current ? A.current[N ? "clientWidth" : "clientHeight"] : 0, ne = Ne(I, (e, t) => {
|
|
254
|
+
A.current && N && (A.current.style.position = "absolute"), e.style[P] = M, d && d(e, t);
|
|
255
|
+
}), re = Ne(I, (e, t) => {
|
|
256
|
+
let n = te();
|
|
257
|
+
A.current && N && (A.current.style.position = "");
|
|
258
|
+
let { duration: r, easing: i } = Ae({
|
|
259
259
|
style: x,
|
|
260
260
|
timeout: S,
|
|
261
261
|
easing: l
|
|
262
262
|
}, { mode: "enter" });
|
|
263
263
|
if (S === "auto" && !F.shouldReduceMotion) {
|
|
264
264
|
let e = O.transitions.getAutoHeightDuration(n);
|
|
265
|
-
|
|
266
|
-
} else
|
|
265
|
+
j.current = e;
|
|
266
|
+
} else j.current = null;
|
|
267
267
|
let a = F.getTransitionTiming({
|
|
268
|
-
duration:
|
|
268
|
+
duration: j.current ?? r,
|
|
269
269
|
delay: void 0
|
|
270
270
|
});
|
|
271
271
|
e.style.transitionDuration = typeof a.duration == "string" ? a.duration : `${a.duration}ms`, e.style[P] = `${n}px`, e.style.transitionTimingFunction = i, p && p(e, t);
|
|
272
|
-
}),
|
|
272
|
+
}), ie = Ne(I, (e, t) => {
|
|
273
273
|
e.style[P] = "auto", f && f(e, t);
|
|
274
|
-
}),
|
|
275
|
-
e.style[P] = `${
|
|
276
|
-
}),
|
|
277
|
-
let t =
|
|
274
|
+
}), L = Ne(I, (e) => {
|
|
275
|
+
e.style[P] = `${te()}px`, m && m(e);
|
|
276
|
+
}), ae = Ne(I, h), R = Ne(I, (e) => {
|
|
277
|
+
let t = te(), { duration: n, easing: r } = Ae({
|
|
278
278
|
style: x,
|
|
279
279
|
timeout: S,
|
|
280
280
|
easing: l
|
|
281
281
|
}, { mode: "exit" });
|
|
282
282
|
if (S === "auto" && !F.shouldReduceMotion) {
|
|
283
283
|
let e = O.transitions.getAutoHeightDuration(t);
|
|
284
|
-
|
|
285
|
-
} else
|
|
284
|
+
j.current = e;
|
|
285
|
+
} else j.current = null;
|
|
286
286
|
let i = F.getTransitionTiming({
|
|
287
|
-
duration:
|
|
287
|
+
duration: j.current ?? n,
|
|
288
288
|
delay: void 0
|
|
289
289
|
});
|
|
290
|
-
e.style.transitionDuration = typeof i.duration == "string" ? i.duration : `${i.duration}ms`, e.style[P] =
|
|
291
|
-
}),
|
|
290
|
+
e.style.transitionDuration = typeof i.duration == "string" ? i.duration : `${i.duration}ms`, e.style[P] = M, e.style.transitionTimingFunction = r, g && g(e);
|
|
291
|
+
}), oe = r ? (e) => {
|
|
292
292
|
r(I.current, e);
|
|
293
|
-
} : void 0,
|
|
294
|
-
slots:
|
|
293
|
+
} : void 0, z = {
|
|
294
|
+
slots: v,
|
|
295
295
|
slotProps: b,
|
|
296
296
|
component: s
|
|
297
|
-
}, [
|
|
298
|
-
ref:
|
|
299
|
-
className:
|
|
300
|
-
elementType:
|
|
301
|
-
externalForwardedProps:
|
|
302
|
-
ownerState:
|
|
297
|
+
}, [se, ce] = Le("root", {
|
|
298
|
+
ref: ee,
|
|
299
|
+
className: k(D.root, a),
|
|
300
|
+
elementType: ot,
|
|
301
|
+
externalForwardedProps: z,
|
|
302
|
+
ownerState: T,
|
|
303
303
|
additionalProps: { style: {
|
|
304
|
-
[N ? "minWidth" : "minHeight"]:
|
|
304
|
+
[N ? "minWidth" : "minHeight"]: M,
|
|
305
305
|
...x
|
|
306
306
|
} }
|
|
307
|
-
}), [
|
|
308
|
-
ref:
|
|
307
|
+
}), [le, ue] = Le("wrapper", {
|
|
308
|
+
ref: A,
|
|
309
309
|
className: D.wrapper,
|
|
310
|
-
elementType: ot,
|
|
311
|
-
externalForwardedProps: ae,
|
|
312
|
-
ownerState: E
|
|
313
|
-
}), [ue, de] = Ie("wrapperInner", {
|
|
314
|
-
className: D.wrapperInner,
|
|
315
310
|
elementType: st,
|
|
316
|
-
externalForwardedProps:
|
|
317
|
-
ownerState:
|
|
311
|
+
externalForwardedProps: z,
|
|
312
|
+
ownerState: T
|
|
313
|
+
}), [de, fe] = Le("wrapperInner", {
|
|
314
|
+
className: D.wrapperInner,
|
|
315
|
+
elementType: ct,
|
|
316
|
+
externalForwardedProps: z,
|
|
317
|
+
ownerState: T
|
|
318
318
|
});
|
|
319
319
|
return /*#__PURE__*/ (0, q.jsx)(C, {
|
|
320
320
|
in: u,
|
|
321
|
-
onEnter:
|
|
322
|
-
onEntered:
|
|
323
|
-
onEntering:
|
|
324
|
-
onExit:
|
|
325
|
-
onExited:
|
|
326
|
-
onExiting:
|
|
327
|
-
addEndListener:
|
|
328
|
-
getAutoTimeout: S === "auto" ? () =>
|
|
321
|
+
onEnter: ne,
|
|
322
|
+
onEntered: ie,
|
|
323
|
+
onEntering: re,
|
|
324
|
+
onExit: L,
|
|
325
|
+
onExited: ae,
|
|
326
|
+
onExiting: R,
|
|
327
|
+
addEndListener: oe,
|
|
328
|
+
getAutoTimeout: S === "auto" ? () => j.current : void 0,
|
|
329
329
|
reduceMotion: F.shouldReduceMotion,
|
|
330
330
|
nodeRef: I,
|
|
331
331
|
timeout: S === "auto" ? null : S,
|
|
332
332
|
...w,
|
|
333
333
|
children: (e, { ownerState: t, ...n }) => {
|
|
334
334
|
let r = {
|
|
335
|
-
...
|
|
335
|
+
...T,
|
|
336
336
|
state: e
|
|
337
337
|
};
|
|
338
|
-
return /*#__PURE__*/ (0, q.jsx)(
|
|
339
|
-
...
|
|
340
|
-
className:
|
|
338
|
+
return /*#__PURE__*/ (0, q.jsx)(se, {
|
|
339
|
+
...ce,
|
|
340
|
+
className: k(ce.className, {
|
|
341
341
|
entered: D.entered,
|
|
342
|
-
exited: !u &&
|
|
342
|
+
exited: !u && M === "0px" && D.hidden
|
|
343
343
|
}[e]),
|
|
344
344
|
ownerState: r,
|
|
345
345
|
...n,
|
|
346
|
-
children: /*#__PURE__*/ (0, q.jsx)(
|
|
347
|
-
...
|
|
346
|
+
children: /*#__PURE__*/ (0, q.jsx)(le, {
|
|
347
|
+
...ue,
|
|
348
348
|
ownerState: r,
|
|
349
|
-
children: /*#__PURE__*/ (0, q.jsx)(
|
|
350
|
-
...
|
|
349
|
+
children: /*#__PURE__*/ (0, q.jsx)(de, {
|
|
350
|
+
...fe,
|
|
351
351
|
ownerState: r,
|
|
352
352
|
children: i
|
|
353
353
|
})
|
|
@@ -356,11 +356,11 @@ var rt = {}, it = (e) => {
|
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
358
|
});
|
|
359
|
-
|
|
360
|
-
function
|
|
361
|
-
return
|
|
359
|
+
lt && (lt.muiSupportAuto = !0);
|
|
360
|
+
function ut(e) {
|
|
361
|
+
return Fe("PrivateSwitchBase", e);
|
|
362
362
|
}
|
|
363
|
-
|
|
363
|
+
De("PrivateSwitchBase", [
|
|
364
364
|
"root",
|
|
365
365
|
"checked",
|
|
366
366
|
"disabled",
|
|
@@ -368,18 +368,18 @@ Te("PrivateSwitchBase", [
|
|
|
368
368
|
"edgeStart",
|
|
369
369
|
"edgeEnd"
|
|
370
370
|
]);
|
|
371
|
-
var
|
|
371
|
+
var dt = (e) => {
|
|
372
372
|
let { classes: t, checked: n, disabled: r, edge: i } = e;
|
|
373
|
-
return
|
|
373
|
+
return Me({
|
|
374
374
|
root: [
|
|
375
375
|
"root",
|
|
376
376
|
n && "checked",
|
|
377
377
|
r && "disabled",
|
|
378
|
-
i && `edge${
|
|
378
|
+
i && `edge${B(i)}`
|
|
379
379
|
],
|
|
380
380
|
input: ["input"]
|
|
381
|
-
},
|
|
382
|
-
},
|
|
381
|
+
}, ut, t);
|
|
382
|
+
}, ft = V(Ue, { name: "MuiSwitchBase" })({
|
|
383
383
|
padding: 9,
|
|
384
384
|
borderRadius: "50%",
|
|
385
385
|
variants: [
|
|
@@ -406,7 +406,7 @@ var ut = (e) => {
|
|
|
406
406
|
style: { marginRight: -12 }
|
|
407
407
|
}
|
|
408
408
|
]
|
|
409
|
-
}),
|
|
409
|
+
}), pt = V("input", {
|
|
410
410
|
name: "MuiSwitchBase",
|
|
411
411
|
shouldForwardProp: H
|
|
412
412
|
})({
|
|
@@ -420,13 +420,13 @@ var ut = (e) => {
|
|
|
420
420
|
margin: 0,
|
|
421
421
|
padding: 0,
|
|
422
422
|
zIndex: 1
|
|
423
|
-
}),
|
|
424
|
-
let { autoFocus: n, checked: r, checkedIcon: i, defaultChecked: a, disabled: o, disableFocusRipple: s = !1, edge: c = !1, icon: l, id: u, name: d, onBlur: f, onChange: p, onFocus: m, readOnly: h, required: g = !1, tabIndex: _, type: v, value: y, slots: b = {}, slotProps: x = {}, ...S } = e, { nativeButton: C, ...w } = S, [T, E] =
|
|
423
|
+
}), mt = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
424
|
+
let { autoFocus: n, checked: r, checkedIcon: i, defaultChecked: a, disabled: o, disableFocusRipple: s = !1, edge: c = !1, icon: l, id: u, name: d, onBlur: f, onChange: p, onFocus: m, readOnly: h, required: g = !1, tabIndex: _, type: v, value: y, slots: b = {}, slotProps: x = {}, ...S } = e, { nativeButton: C, ...w } = S, [T, E] = ze({
|
|
425
425
|
controlled: r,
|
|
426
426
|
default: !!a,
|
|
427
427
|
name: "SwitchBase",
|
|
428
428
|
state: "checked"
|
|
429
|
-
}), D =
|
|
429
|
+
}), D = fe(), O = (e) => {
|
|
430
430
|
m && m(e), D && D.onFocus && D.onFocus(e);
|
|
431
431
|
}, k = (e) => {
|
|
432
432
|
f && f(e), D && D.onBlur && D.onBlur(e);
|
|
@@ -442,12 +442,12 @@ var ut = (e) => {
|
|
|
442
442
|
disabled: j,
|
|
443
443
|
disableFocusRipple: s,
|
|
444
444
|
edge: c
|
|
445
|
-
}, P =
|
|
445
|
+
}, P = dt(N), F = {
|
|
446
446
|
slots: b,
|
|
447
447
|
slotProps: x
|
|
448
|
-
}, [I,
|
|
448
|
+
}, [I, ee] = Le("root", {
|
|
449
449
|
ref: t,
|
|
450
|
-
elementType:
|
|
450
|
+
elementType: ft,
|
|
451
451
|
className: P.root,
|
|
452
452
|
shouldForwardComponentProp: !0,
|
|
453
453
|
externalForwardedProps: {
|
|
@@ -472,8 +472,8 @@ var ut = (e) => {
|
|
|
472
472
|
tabIndex: null,
|
|
473
473
|
internalDisabledThemeFocusVisible: !0
|
|
474
474
|
}
|
|
475
|
-
}), [
|
|
476
|
-
elementType:
|
|
475
|
+
}), [te, ne] = Le("input", {
|
|
476
|
+
elementType: pt,
|
|
477
477
|
className: P.input,
|
|
478
478
|
externalForwardedProps: F,
|
|
479
479
|
getSlotProps: (e) => ({
|
|
@@ -498,21 +498,21 @@ var ut = (e) => {
|
|
|
498
498
|
}
|
|
499
499
|
});
|
|
500
500
|
return /*#__PURE__*/ (0, q.jsxs)(I, {
|
|
501
|
-
...
|
|
502
|
-
children: [/*#__PURE__*/ (0, q.jsx)(
|
|
501
|
+
...ee,
|
|
502
|
+
children: [/*#__PURE__*/ (0, q.jsx)(te, { ...ne }), T ? i : l]
|
|
503
503
|
});
|
|
504
|
-
}),
|
|
505
|
-
let { classes: t, indeterminate: n, color: r, size: i } = e, a =
|
|
504
|
+
}), ht = nt(/*#__PURE__*/ (0, q.jsx)("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }), "CheckBoxOutlineBlank"), gt = nt(/*#__PURE__*/ (0, q.jsx)("path", { d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }), "CheckBox"), _t = nt(/*#__PURE__*/ (0, q.jsx)("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z" }), "IndeterminateCheckBox"), vt = (e) => {
|
|
505
|
+
let { classes: t, indeterminate: n, color: r, size: i } = e, a = Me({ root: [
|
|
506
506
|
"root",
|
|
507
507
|
n && "indeterminate",
|
|
508
|
-
`color${
|
|
509
|
-
`size${
|
|
510
|
-
] },
|
|
508
|
+
`color${B(r)}`,
|
|
509
|
+
`size${B(i)}`
|
|
510
|
+
] }, Ye, t);
|
|
511
511
|
return {
|
|
512
512
|
...t,
|
|
513
513
|
...a
|
|
514
514
|
};
|
|
515
|
-
},
|
|
515
|
+
}, yt = V(mt, {
|
|
516
516
|
shouldForwardProp: (e) => H(e) || e === "classes",
|
|
517
517
|
name: "MuiCheckbox",
|
|
518
518
|
slot: "Root",
|
|
@@ -521,14 +521,14 @@ var ut = (e) => {
|
|
|
521
521
|
return [
|
|
522
522
|
t.root,
|
|
523
523
|
n.indeterminate && t.indeterminate,
|
|
524
|
-
t[`size${
|
|
525
|
-
n.color !== "default" && t[`color${
|
|
524
|
+
t[`size${B(n.size)}`],
|
|
525
|
+
n.color !== "default" && t[`color${B(n.color)}`]
|
|
526
526
|
];
|
|
527
527
|
}
|
|
528
|
-
})(
|
|
528
|
+
})(Pe(({ theme: e }) => ({
|
|
529
529
|
color: (e.vars || e).palette.text.secondary,
|
|
530
|
-
...e.focusVisible && { [`&.${
|
|
531
|
-
...
|
|
530
|
+
...e.focusVisible && { [`&.${We.focusVisible} svg:first-of-type`]: {
|
|
531
|
+
...O,
|
|
532
532
|
borderRadius: (e.vars || e).shape.borderRadius,
|
|
533
533
|
...e.focusVisible
|
|
534
534
|
} },
|
|
@@ -540,18 +540,18 @@ var ut = (e) => {
|
|
|
540
540
|
},
|
|
541
541
|
style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity) } }
|
|
542
542
|
},
|
|
543
|
-
...Object.entries(e.palette).filter(
|
|
543
|
+
...Object.entries(e.palette).filter(qe()).map(([t]) => ({
|
|
544
544
|
props: {
|
|
545
545
|
color: t,
|
|
546
546
|
disableRipple: !1
|
|
547
547
|
},
|
|
548
548
|
style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity) } }
|
|
549
549
|
})),
|
|
550
|
-
...Object.entries(e.palette).filter(
|
|
550
|
+
...Object.entries(e.palette).filter(qe()).map(([t]) => ({
|
|
551
551
|
props: { color: t },
|
|
552
552
|
style: {
|
|
553
|
-
[`&.${
|
|
554
|
-
[`&.${
|
|
553
|
+
[`&.${Xe.checked}, &.${Xe.indeterminate}`]: { color: (e.vars || e).palette[t].main },
|
|
554
|
+
[`&.${Xe.disabled}`]: { color: (e.vars || e).palette.action.disabled }
|
|
555
555
|
}
|
|
556
556
|
})),
|
|
557
557
|
{
|
|
@@ -559,24 +559,24 @@ var ut = (e) => {
|
|
|
559
559
|
style: { "&:hover": { "@media (hover: none)": { backgroundColor: "transparent" } } }
|
|
560
560
|
}
|
|
561
561
|
]
|
|
562
|
-
}))),
|
|
563
|
-
let n =
|
|
562
|
+
}))), bt = /*#__PURE__*/ (0, q.jsx)(gt, {}), xt = /*#__PURE__*/ (0, q.jsx)(ht, {}), St = /*#__PURE__*/ (0, q.jsx)(_t, {}), Ct = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
563
|
+
let n = je({
|
|
564
564
|
props: e,
|
|
565
565
|
name: "MuiCheckbox"
|
|
566
|
-
}), { checkedIcon: r =
|
|
566
|
+
}), { checkedIcon: r = bt, color: i = "primary", icon: a = xt, indeterminate: o = !1, indeterminateIcon: s = St, size: c = "medium", disableRipple: l = !1, className: u, slots: d = {}, slotProps: f = {}, ...p } = n, m = o ? s : a, h = o ? s : r, g = {
|
|
567
567
|
...n,
|
|
568
568
|
disableRipple: l,
|
|
569
569
|
color: i,
|
|
570
570
|
indeterminate: o,
|
|
571
571
|
size: c
|
|
572
|
-
}, _ =
|
|
573
|
-
|
|
572
|
+
}, _ = vt(g), v = typeof f.input == "function" ? f.input(g) : f.input, y = K.useRef(null), b = He(y, v?.ref);
|
|
573
|
+
ae(() => {
|
|
574
574
|
y.current && (y.current.indeterminate = o);
|
|
575
575
|
});
|
|
576
|
-
let [x, S] =
|
|
576
|
+
let [x, S] = Le("root", {
|
|
577
577
|
ref: t,
|
|
578
|
-
elementType:
|
|
579
|
-
className:
|
|
578
|
+
elementType: yt,
|
|
579
|
+
className: k(_.root, u),
|
|
580
580
|
shouldForwardComponentProp: !0,
|
|
581
581
|
externalForwardedProps: {
|
|
582
582
|
slots: d,
|
|
@@ -591,7 +591,7 @@ var ut = (e) => {
|
|
|
591
591
|
disableRipple: n.disableRipple,
|
|
592
592
|
slots: d,
|
|
593
593
|
slotProps: { input: {
|
|
594
|
-
...
|
|
594
|
+
...R(v, {
|
|
595
595
|
"data-indeterminate": o,
|
|
596
596
|
onChange: (e) => {
|
|
597
597
|
e.target.indeterminate = o;
|
|
@@ -605,13 +605,13 @@ var ut = (e) => {
|
|
|
605
605
|
...S,
|
|
606
606
|
classes: _
|
|
607
607
|
});
|
|
608
|
-
}),
|
|
608
|
+
}), wt = (e) => ({
|
|
609
609
|
hasImage: !!e.dimensions[1]?.dataItem,
|
|
610
610
|
hasMeasure: !!e.measures[0]?.dataItem,
|
|
611
611
|
searchEnabled: !!e.filterSettings?.searchable,
|
|
612
612
|
quickSelection: !!e.filterSettings?.quickSelect
|
|
613
|
-
}), J =
|
|
614
|
-
...e &&
|
|
613
|
+
}), J = ie(), Tt = /* @__PURE__ */ e(g()), Et = _({ menuTrigger: ({ responsive: e, isDisplayImportant: t }) => ({
|
|
614
|
+
...e && Ke,
|
|
615
615
|
display: t ? "inline-flex !important" : "inline-flex",
|
|
616
616
|
alignItems: "center",
|
|
617
617
|
justifyContent: "center",
|
|
@@ -647,11 +647,11 @@ var ut = (e) => {
|
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
649
|
}) });
|
|
650
|
-
function
|
|
651
|
-
let { isPreview: t, areSelectedValues: n, arePendingValues: r, isNotEnabled: i, responsive: a, onClear: o, onDeselectAll: s, onSelectAll: c, onSelectExcluded: l, toggleNotOperator: u, onLockClick: d, isSingleSelectField: f = !1 } = e, [p, m] = (0, K.useState)(!1),
|
|
650
|
+
function Dt(e) {
|
|
651
|
+
let { isPreview: t, areSelectedValues: n, arePendingValues: r, isNotEnabled: i, responsive: a, onClear: o, onDeselectAll: s, onSelectAll: c, onSelectExcluded: l, toggleNotOperator: u, onLockClick: d, isSingleSelectField: f = !1 } = e, [p, m] = (0, K.useState)(!1), g = Et({
|
|
652
652
|
responsive: a,
|
|
653
653
|
isDisplayImportant: !0
|
|
654
|
-
}), _ =
|
|
654
|
+
}), _ = re().daedalus.getWorkbookProperties()?.isLockUnlockFieldsEnabled ?? !1, v = [{
|
|
655
655
|
disabled: t || !r,
|
|
656
656
|
key: "clear",
|
|
657
657
|
label: "Clear",
|
|
@@ -692,14 +692,14 @@ function Et(e) {
|
|
|
692
692
|
key: "lock",
|
|
693
693
|
label: "Lock",
|
|
694
694
|
type: "option",
|
|
695
|
-
icon: { right: /* @__PURE__ */ (0, q.jsx)(
|
|
695
|
+
icon: { right: /* @__PURE__ */ (0, q.jsx)(D, {}) },
|
|
696
696
|
onClick: d
|
|
697
|
-
}), /* @__PURE__ */ (0, q.jsx)(
|
|
697
|
+
}), /* @__PURE__ */ (0, q.jsx)(Be, {
|
|
698
698
|
open: p,
|
|
699
699
|
placement: "bottom-end",
|
|
700
|
-
title: /* @__PURE__ */ (0, q.jsx)(
|
|
700
|
+
title: /* @__PURE__ */ (0, q.jsx)(L, {
|
|
701
701
|
onClickAway: () => m(!1),
|
|
702
|
-
children: /* @__PURE__ */ (0, q.jsx)(
|
|
702
|
+
children: /* @__PURE__ */ (0, q.jsx)(oe, {
|
|
703
703
|
appearance: "legacy",
|
|
704
704
|
onClose: () => m(!1),
|
|
705
705
|
options: v,
|
|
@@ -707,11 +707,11 @@ function Et(e) {
|
|
|
707
707
|
style: { margin: "-8px -12px" }
|
|
708
708
|
})
|
|
709
709
|
}),
|
|
710
|
-
children: /* @__PURE__ */ (0, q.jsx)(
|
|
710
|
+
children: /* @__PURE__ */ (0, q.jsx)(z, {
|
|
711
711
|
onClick: () => m(!p),
|
|
712
712
|
"data-testid": "filter-button-icon-dots",
|
|
713
|
-
className:
|
|
714
|
-
children: /* @__PURE__ */ (0, q.jsx)(
|
|
713
|
+
className: g.menuTrigger,
|
|
714
|
+
children: /* @__PURE__ */ (0, q.jsx)(h, {
|
|
715
715
|
fill: "currentColor",
|
|
716
716
|
size: 20
|
|
717
717
|
})
|
|
@@ -727,31 +727,31 @@ function Y() {
|
|
|
727
727
|
return e;
|
|
728
728
|
}, Y.apply(null, arguments);
|
|
729
729
|
}
|
|
730
|
-
var
|
|
731
|
-
function
|
|
732
|
-
let n = K.useRef(
|
|
733
|
-
return n.current ===
|
|
730
|
+
var Ot = {};
|
|
731
|
+
function kt(e, t) {
|
|
732
|
+
let n = K.useRef(Ot);
|
|
733
|
+
return n.current === Ot && (n.current = e(t)), n;
|
|
734
734
|
}
|
|
735
|
-
function
|
|
736
|
-
let i =
|
|
737
|
-
return
|
|
735
|
+
function At(e, t, n, r) {
|
|
736
|
+
let i = kt(jt).current;
|
|
737
|
+
return Mt(i, e, t, n, r) && Nt(i, [
|
|
738
738
|
e,
|
|
739
739
|
t,
|
|
740
740
|
n,
|
|
741
741
|
r
|
|
742
742
|
]), i.callback;
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function jt() {
|
|
745
745
|
return {
|
|
746
746
|
callback: null,
|
|
747
747
|
cleanup: null,
|
|
748
748
|
refs: []
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function Mt(e, t, n, r, i) {
|
|
752
752
|
return e.refs[0] !== t || e.refs[1] !== n || e.refs[2] !== r || e.refs[3] !== i;
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function Nt(e, t) {
|
|
755
755
|
if (e.refs = t, t.every((e) => e == null)) {
|
|
756
756
|
e.callback = null;
|
|
757
757
|
return;
|
|
@@ -792,13 +792,13 @@ function Mt(e, t) {
|
|
|
792
792
|
}
|
|
793
793
|
};
|
|
794
794
|
}
|
|
795
|
-
function Nt(e) {
|
|
796
|
-
return Xe;
|
|
797
|
-
}
|
|
798
795
|
function Pt(e) {
|
|
799
|
-
return
|
|
796
|
+
return Ze;
|
|
797
|
+
}
|
|
798
|
+
function Ft(e) {
|
|
799
|
+
return Fe("MuiSimpleTreeView", e);
|
|
800
800
|
}
|
|
801
|
-
|
|
801
|
+
De("MuiSimpleTreeView", [
|
|
802
802
|
"root",
|
|
803
803
|
"item",
|
|
804
804
|
"itemContent",
|
|
@@ -807,24 +807,24 @@ Te("MuiSimpleTreeView", [
|
|
|
807
807
|
"itemLabel",
|
|
808
808
|
"itemCheckbox"
|
|
809
809
|
]);
|
|
810
|
-
var
|
|
811
|
-
function
|
|
810
|
+
var It = Object.freeze([]), Lt = Object.freeze({});
|
|
811
|
+
function Rt(e, t) {
|
|
812
812
|
return function(n, ...r) {
|
|
813
813
|
let i = new URL(e);
|
|
814
814
|
return i.searchParams.set("code", n.toString()), r.forEach((e) => i.searchParams.append("args[]", e)), `${t} error #${n}; visit ${i} for the full message.`;
|
|
815
815
|
};
|
|
816
816
|
}
|
|
817
|
-
var
|
|
818
|
-
let e = K.useContext(
|
|
819
|
-
if (e == null) throw Error(
|
|
817
|
+
var zt = Rt("https://base-ui.com/production-error", "Base UI"), Bt = Rt("https://mui.com/x/production-error", "MUI X"), Vt = /*#__PURE__*/ K.createContext(null), Ht = () => {
|
|
818
|
+
let e = K.useContext(Vt);
|
|
819
|
+
if (e == null) throw Error(Bt(190));
|
|
820
820
|
return e;
|
|
821
|
-
},
|
|
821
|
+
}, Ut = /*#__PURE__*/ K.createContext({
|
|
822
822
|
classes: {},
|
|
823
823
|
slots: {},
|
|
824
824
|
slotProps: {}
|
|
825
|
-
}),
|
|
826
|
-
let { store: t, apiRef: n, rootRef: r } = e, i =
|
|
827
|
-
|
|
825
|
+
}), Wt = () => K.useContext(Ut), Gt = (e) => {
|
|
826
|
+
let { store: t, apiRef: n, rootRef: r } = e, i = kt(() => t.buildPublicAPI()).current;
|
|
827
|
+
Kt(i, n);
|
|
828
828
|
let a = K.useCallback((e) => {
|
|
829
829
|
let n = null, r = null, i = [], a = {};
|
|
830
830
|
t.itemPluginManager.listPlugins().forEach((t) => {
|
|
@@ -876,11 +876,11 @@ var Rt = Lt("https://base-ui.com/production-error", "Base UI"), zt = Lt("https:/
|
|
|
876
876
|
r
|
|
877
877
|
]);
|
|
878
878
|
};
|
|
879
|
-
function
|
|
879
|
+
function Kt(e, t) {
|
|
880
880
|
t != null && t.current !== e && (t.current = e);
|
|
881
881
|
}
|
|
882
|
-
function
|
|
883
|
-
let { store: t, apiRef: n, rootRef: r, classes: i =
|
|
882
|
+
function qt(e) {
|
|
883
|
+
let { store: t, apiRef: n, rootRef: r, classes: i = Lt, slots: a = Lt, slotProps: o = Lt, children: s } = e, c = Gt({
|
|
884
884
|
store: t,
|
|
885
885
|
apiRef: n,
|
|
886
886
|
rootRef: r
|
|
@@ -913,15 +913,15 @@ function Kt(e) {
|
|
|
913
913
|
o.loading,
|
|
914
914
|
o.itemLoader
|
|
915
915
|
]);
|
|
916
|
-
return /*#__PURE__*/ (0, q.jsx)(
|
|
916
|
+
return /*#__PURE__*/ (0, q.jsx)(Vt.Provider, {
|
|
917
917
|
value: c,
|
|
918
|
-
children: /*#__PURE__*/ (0, q.jsx)(
|
|
918
|
+
children: /*#__PURE__*/ (0, q.jsx)(Ut.Provider, {
|
|
919
919
|
value: l,
|
|
920
920
|
children: s
|
|
921
921
|
})
|
|
922
922
|
});
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function Jt(e, t) {
|
|
925
925
|
if (e == null) return {};
|
|
926
926
|
var n = {};
|
|
927
927
|
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
@@ -930,7 +930,7 @@ function qt(e, t) {
|
|
|
930
930
|
}
|
|
931
931
|
return n;
|
|
932
932
|
}
|
|
933
|
-
var
|
|
933
|
+
var Yt = [
|
|
934
934
|
"apiRef",
|
|
935
935
|
"slots",
|
|
936
936
|
"slotProps",
|
|
@@ -954,8 +954,8 @@ var Jt = [
|
|
|
954
954
|
"onItemFocus",
|
|
955
955
|
"itemHeight"
|
|
956
956
|
];
|
|
957
|
-
function
|
|
958
|
-
let { apiRef: t, slots: n, slotProps: r, disabledItemsFocusable: i, onItemClick: a, itemChildrenIndentation: o, id: s, expandedItems: c, defaultExpandedItems: l, onExpandedItemsChange: u, onItemExpansionToggle: d, expansionTrigger: f, disableSelection: p, selectedItems: m, defaultSelectedItems: h, multiSelect: g, checkboxSelection: _, selectionPropagation: v, onSelectedItemsChange: y, onItemSelectionToggle: b, onItemFocus: x, itemHeight: S } = e, C =
|
|
957
|
+
function Xt(e) {
|
|
958
|
+
let { apiRef: t, slots: n, slotProps: r, disabledItemsFocusable: i, onItemClick: a, itemChildrenIndentation: o, id: s, expandedItems: c, defaultExpandedItems: l, onExpandedItemsChange: u, onItemExpansionToggle: d, expansionTrigger: f, disableSelection: p, selectedItems: m, defaultSelectedItems: h, multiSelect: g, checkboxSelection: _, selectionPropagation: v, onSelectedItemsChange: y, onItemSelectionToggle: b, onItemFocus: x, itemHeight: S } = e, C = Jt(e, Yt);
|
|
959
959
|
return {
|
|
960
960
|
apiRef: t,
|
|
961
961
|
slots: n,
|
|
@@ -1004,18 +1004,18 @@ function Yt(e) {
|
|
|
1004
1004
|
forwardedProps: C
|
|
1005
1005
|
};
|
|
1006
1006
|
}
|
|
1007
|
-
var
|
|
1007
|
+
var Zt = {
|
|
1008
1008
|
maxSize: 1,
|
|
1009
1009
|
equalityCheck: Object.is
|
|
1010
|
-
},
|
|
1011
|
-
memoize:
|
|
1012
|
-
memoizeOptions:
|
|
1013
|
-
}),
|
|
1010
|
+
}, Qt = Te({
|
|
1011
|
+
memoize: Ee,
|
|
1012
|
+
memoizeOptions: Zt
|
|
1013
|
+
}), $t = ((e) => {
|
|
1014
1014
|
let t = e?.memoizeOptions, n = e;
|
|
1015
1015
|
return e !== void 0 && (e.memoize === void 0 ? typeof t == "object" && t && !Array.isArray(t) && (n = {
|
|
1016
1016
|
...e,
|
|
1017
1017
|
memoizeOptions: {
|
|
1018
|
-
...
|
|
1018
|
+
...Zt,
|
|
1019
1019
|
...t
|
|
1020
1020
|
}
|
|
1021
1021
|
}) : t === void 0 && (n = {
|
|
@@ -1023,7 +1023,7 @@ var Xt = {
|
|
|
1023
1023
|
memoizeOptions: void 0
|
|
1024
1024
|
})), (...e) => {
|
|
1025
1025
|
let t = /* @__PURE__ */ new WeakMap(), r = 1, i = e[e.length - 1], a = e.length === 1 ? [(e) => e, i] : e, o = a.length - 1, s = i.length === 0 ? 0 : i.length - o;
|
|
1026
|
-
if (s < 0 || s > 3) throw Error(
|
|
1026
|
+
if (s < 0 || s > 3) throw Error(zt(2));
|
|
1027
1027
|
return (e, o, c, l) => {
|
|
1028
1028
|
let u = e.__cacheKey__;
|
|
1029
1029
|
u || (u = { id: r }, e.__cacheKey__ = u, r += 1);
|
|
@@ -1061,7 +1061,7 @@ var Xt = {
|
|
|
1061
1061
|
];
|
|
1062
1062
|
break;
|
|
1063
1063
|
}
|
|
1064
|
-
n && (e = [...e, n]), d =
|
|
1064
|
+
n && (e = [...e, n]), d = Qt(...e), d.selectorArgs = r, t.set(u, d);
|
|
1065
1065
|
}
|
|
1066
1066
|
switch (s) {
|
|
1067
1067
|
case 3: d.selectorArgs[2] = l;
|
|
@@ -1077,22 +1077,22 @@ var Xt = {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
};
|
|
1079
1079
|
};
|
|
1080
|
-
})(),
|
|
1081
|
-
function
|
|
1082
|
-
return
|
|
1080
|
+
})(), en = 19;
|
|
1081
|
+
function tn(e) {
|
|
1082
|
+
return en >= e;
|
|
1083
1083
|
}
|
|
1084
|
-
var
|
|
1085
|
-
function
|
|
1086
|
-
return
|
|
1084
|
+
var nn = [], rn = void 0;
|
|
1085
|
+
function an() {
|
|
1086
|
+
return rn;
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1089
|
-
|
|
1088
|
+
function on(e) {
|
|
1089
|
+
nn.push(e);
|
|
1090
1090
|
}
|
|
1091
|
-
var
|
|
1091
|
+
var sn = F(), cn = /* @__PURE__ */ e(m(), 1), ln = tn(19) ? dn : fn;
|
|
1092
1092
|
function X(e, t, n, r, i) {
|
|
1093
|
-
return
|
|
1093
|
+
return ln(e, t, n, r, i);
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1095
|
+
function un(e, t, n, r, i) {
|
|
1096
1096
|
let a = K.useCallback(() => t(e.getSnapshot(), n, r, i), [
|
|
1097
1097
|
e,
|
|
1098
1098
|
t,
|
|
@@ -1100,9 +1100,9 @@ function ln(e, t, n, r, i) {
|
|
|
1100
1100
|
r,
|
|
1101
1101
|
i
|
|
1102
1102
|
]);
|
|
1103
|
-
return (0,
|
|
1103
|
+
return (0, sn.useSyncExternalStore)(e.subscribe, a, a);
|
|
1104
1104
|
}
|
|
1105
|
-
|
|
1105
|
+
on({
|
|
1106
1106
|
before(e) {
|
|
1107
1107
|
e.syncIndex = 0, e.didInitialize || (e.syncTick = 1, e.syncHooks = [], e.didChangeStore = !0, e.getSnapshot = () => {
|
|
1108
1108
|
let t = !1;
|
|
@@ -1122,12 +1122,12 @@ an({
|
|
|
1122
1122
|
return () => {
|
|
1123
1123
|
for (let e of r) e();
|
|
1124
1124
|
};
|
|
1125
|
-
}), (0,
|
|
1125
|
+
}), (0, sn.useSyncExternalStore)(e.subscribe, e.getSnapshot, e.getSnapshot));
|
|
1126
1126
|
}
|
|
1127
1127
|
});
|
|
1128
|
-
function
|
|
1129
|
-
let a =
|
|
1130
|
-
if (!a) return
|
|
1128
|
+
function dn(e, t, n, r, i) {
|
|
1129
|
+
let a = an();
|
|
1130
|
+
if (!a) return un(e, t, n, r, i);
|
|
1131
1131
|
let o = a.syncIndex;
|
|
1132
1132
|
a.syncIndex += 1;
|
|
1133
1133
|
let s;
|
|
@@ -1140,10 +1140,10 @@ function un(e, t, n, r, i) {
|
|
|
1140
1140
|
value: t(e.getSnapshot(), n, r, i)
|
|
1141
1141
|
}, a.syncHooks.push(s)), s.value;
|
|
1142
1142
|
}
|
|
1143
|
-
function
|
|
1144
|
-
return (0,
|
|
1143
|
+
function fn(e, t, n, r, i) {
|
|
1144
|
+
return (0, cn.useSyncExternalStoreWithSelector)(e.subscribe, e.getSnapshot, e.getSnapshot, (e) => t(e, n, r, i));
|
|
1145
1145
|
}
|
|
1146
|
-
var
|
|
1146
|
+
var pn = class {
|
|
1147
1147
|
static create(e) {
|
|
1148
1148
|
return new this(e);
|
|
1149
1149
|
}
|
|
@@ -1185,19 +1185,19 @@ var fn = class {
|
|
|
1185
1185
|
use(e, t, n, r) {
|
|
1186
1186
|
return X(this, e, t, n, r);
|
|
1187
1187
|
}
|
|
1188
|
-
},
|
|
1189
|
-
function
|
|
1190
|
-
K.useEffect(e,
|
|
1188
|
+
}, mn = { ...K }, hn = typeof document < "u" ? K.useLayoutEffect : () => {};
|
|
1189
|
+
function gn(e) {
|
|
1190
|
+
K.useEffect(e, It);
|
|
1191
1191
|
}
|
|
1192
|
-
var
|
|
1193
|
-
treeId:
|
|
1194
|
-
treeItemIdAttribute: (e, t, n) => n ?? `${
|
|
1195
|
-
},
|
|
1192
|
+
var _n = (e) => e.providedTreeId ?? e.treeId, vn = {
|
|
1193
|
+
treeId: _n,
|
|
1194
|
+
treeItemIdAttribute: (e, t, n) => n ?? `${_n(e) ?? ""}-${t}`
|
|
1195
|
+
}, yn = (e) => {
|
|
1196
1196
|
let t = {};
|
|
1197
1197
|
return e.forEach((e, n) => {
|
|
1198
1198
|
t[e] = n;
|
|
1199
1199
|
}), t;
|
|
1200
|
-
},
|
|
1200
|
+
}, bn = (e, t) => {
|
|
1201
1201
|
if (t == null) return !1;
|
|
1202
1202
|
let n = e[t];
|
|
1203
1203
|
if (!n) return !1;
|
|
@@ -1208,10 +1208,10 @@ var gn = (e) => e.providedTreeId ?? e.treeId, _n = {
|
|
|
1208
1208
|
}
|
|
1209
1209
|
return !1;
|
|
1210
1210
|
};
|
|
1211
|
-
function
|
|
1211
|
+
function xn(e) {
|
|
1212
1212
|
let { storeParameters: t, items: n, parentId: r, depth: i, isItemExpandable: a, otherItemsMetaLookup: o } = e, s = {}, c = {}, l = [], u = [], d = (e) => {
|
|
1213
1213
|
let n = t.getItemId ? t.getItemId(e) : e.id;
|
|
1214
|
-
|
|
1214
|
+
Cn({
|
|
1215
1215
|
id: n,
|
|
1216
1216
|
parentId: r,
|
|
1217
1217
|
item: e,
|
|
@@ -1219,7 +1219,7 @@ function bn(e) {
|
|
|
1219
1219
|
siblingsMetaLookup: s
|
|
1220
1220
|
});
|
|
1221
1221
|
let d = t.getItemLabel ? t.getItemLabel(e) : e.label;
|
|
1222
|
-
if (d == null) throw Error(
|
|
1222
|
+
if (d == null) throw Error(Bt(192, JSON.stringify(e)));
|
|
1223
1223
|
let f = (t.getItemChildren ? t.getItemChildren(e) : e.children) || [];
|
|
1224
1224
|
u.push({
|
|
1225
1225
|
id: n,
|
|
@@ -1240,13 +1240,13 @@ function bn(e) {
|
|
|
1240
1240
|
metaLookup: s,
|
|
1241
1241
|
modelLookup: c,
|
|
1242
1242
|
orderedChildrenIds: l,
|
|
1243
|
-
childrenIndexes:
|
|
1243
|
+
childrenIndexes: yn(l),
|
|
1244
1244
|
itemsChildren: u
|
|
1245
1245
|
};
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function Sn(e) {
|
|
1248
1248
|
let { storeParameters: t, items: n, parentId: r, depth: i, isItemExpandable: a, existingItemMetaLookup: o } = e, s = {}, c = {}, l = {}, u = {}, d = Y({}, o), f = (e, n, r) => {
|
|
1249
|
-
let i =
|
|
1249
|
+
let i = xn({
|
|
1250
1250
|
storeParameters: t,
|
|
1251
1251
|
items: e,
|
|
1252
1252
|
parentId: n,
|
|
@@ -1264,29 +1264,29 @@ function xn(e) {
|
|
|
1264
1264
|
itemChildrenIndexesLookup: u
|
|
1265
1265
|
};
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1268
|
-
if (e == null) throw Error(
|
|
1269
|
-
if (i[e] != null || r[e] != null && r[e].parentId !== t) throw Error(
|
|
1267
|
+
function Cn({ id: e, parentId: t, item: n, itemMetaLookup: r, siblingsMetaLookup: i }) {
|
|
1268
|
+
if (e == null) throw Error(Bt(193, JSON.stringify(n)));
|
|
1269
|
+
if (i[e] != null || r[e] != null && r[e].parentId !== t) throw Error(Bt(194, e));
|
|
1270
1270
|
}
|
|
1271
|
-
var
|
|
1271
|
+
var wn = [], Z = {
|
|
1272
1272
|
domStructure: (e) => e.domStructure,
|
|
1273
1273
|
disabledItemFocusable: (e) => e.disabledItemsFocusable,
|
|
1274
1274
|
itemMetaLookup: (e) => e.itemMetaLookup,
|
|
1275
1275
|
itemOrderedChildrenIdsLookup: (e) => e.itemOrderedChildrenIdsLookup,
|
|
1276
1276
|
itemMeta: (e, t) => e.itemMetaLookup[t ?? "__TREE_VIEW_ROOT_PARENT_ID__"] ?? null,
|
|
1277
|
-
itemOrderedChildrenIds: (e, t) => e.itemOrderedChildrenIdsLookup[t ?? "__TREE_VIEW_ROOT_PARENT_ID__"] ??
|
|
1277
|
+
itemOrderedChildrenIds: (e, t) => e.itemOrderedChildrenIdsLookup[t ?? "__TREE_VIEW_ROOT_PARENT_ID__"] ?? wn,
|
|
1278
1278
|
itemModel: (e, t) => e.itemModelLookup[t],
|
|
1279
|
-
isItemDisabled: (e, t) =>
|
|
1279
|
+
isItemDisabled: (e, t) => bn(e.itemMetaLookup, t),
|
|
1280
1280
|
itemIndex: (e, t) => {
|
|
1281
1281
|
let n = e.itemMetaLookup[t];
|
|
1282
1282
|
return n == null ? -1 : e.itemChildrenIndexesLookup[n.parentId ?? "__TREE_VIEW_ROOT_PARENT_ID__"][n.id];
|
|
1283
1283
|
},
|
|
1284
1284
|
itemParentId: (e, t) => e.itemMetaLookup[t]?.parentId ?? null,
|
|
1285
1285
|
itemDepth: (e, t) => e.itemMetaLookup[t]?.depth ?? 0,
|
|
1286
|
-
canItemBeFocused: (e, t) => e.disabledItemsFocusable || e.itemModelLookup[t] != null && !
|
|
1286
|
+
canItemBeFocused: (e, t) => e.disabledItemsFocusable || e.itemModelLookup[t] != null && !bn(e.itemMetaLookup, t),
|
|
1287
1287
|
itemChildrenIndentation: (e) => e.itemChildrenIndentation,
|
|
1288
1288
|
itemHeight: (e) => e.itemHeight
|
|
1289
|
-
},
|
|
1289
|
+
}, Tn = class {
|
|
1290
1290
|
constructor(e) {
|
|
1291
1291
|
this.store = e;
|
|
1292
1292
|
}
|
|
@@ -1301,7 +1301,7 @@ var Cn = [], Z = {
|
|
|
1301
1301
|
let r = n;
|
|
1302
1302
|
return e[r] !== t[r];
|
|
1303
1303
|
});
|
|
1304
|
-
static buildItemsStateIfNeeded = (e) =>
|
|
1304
|
+
static buildItemsStateIfNeeded = (e) => Sn({
|
|
1305
1305
|
storeParameters: e,
|
|
1306
1306
|
items: e.items,
|
|
1307
1307
|
parentId: null,
|
|
@@ -1325,8 +1325,8 @@ var Cn = [], Z = {
|
|
|
1325
1325
|
};
|
|
1326
1326
|
addItems = ({ items: e, parentId: t = null, index: n }) => {
|
|
1327
1327
|
if (e.length === 0) return;
|
|
1328
|
-
if (t != null && Z.itemMeta(this.store.state, t) == null) throw Error(
|
|
1329
|
-
let r = t == null ? -1 : Z.itemDepth(this.store.state, t), i = this.store.parameters.dataSource, { itemMetaLookup: a, itemModelLookup: o, itemOrderedChildrenIdsLookup: s, itemChildrenIndexesLookup: c } =
|
|
1328
|
+
if (t != null && Z.itemMeta(this.store.state, t) == null) throw Error(Bt(295, t));
|
|
1329
|
+
let r = t == null ? -1 : Z.itemDepth(this.store.state, t), i = this.store.parameters.dataSource, { itemMetaLookup: a, itemModelLookup: o, itemOrderedChildrenIdsLookup: s, itemChildrenIndexesLookup: c } = Sn({
|
|
1330
1330
|
storeParameters: this.store.parameters,
|
|
1331
1331
|
items: e,
|
|
1332
1332
|
parentId: t,
|
|
@@ -1334,11 +1334,11 @@ var Cn = [], Z = {
|
|
|
1334
1334
|
isItemExpandable: (e, t) => t != null && t.length > 0 || i != null && i.getChildrenCount(e) !== 0,
|
|
1335
1335
|
existingItemMetaLookup: this.store.state.itemMetaLookup
|
|
1336
1336
|
});
|
|
1337
|
-
for (let e of Object.keys(a)) if (this.store.state.itemMetaLookup[e] != null) throw Error(
|
|
1337
|
+
for (let e of Object.keys(a)) if (this.store.state.itemMetaLookup[e] != null) throw Error(Bt(194, e));
|
|
1338
1338
|
let l = t ?? "__TREE_VIEW_ROOT_PARENT_ID__", u = Z.itemOrderedChildrenIds(this.store.state, t), d = n ?? u.length;
|
|
1339
|
-
if (d < 0 || d > u.length) throw Error(
|
|
1339
|
+
if (d < 0 || d > u.length) throw Error(Bt(296, d, u.length));
|
|
1340
1340
|
let f = s[l], p = [...u];
|
|
1341
|
-
p.splice(d, 0, ...f), s[l] = p, c[l] =
|
|
1341
|
+
p.splice(d, 0, ...f), s[l] = p, c[l] = yn(p);
|
|
1342
1342
|
let m = Y({}, this.store.state.itemMetaLookup, a);
|
|
1343
1343
|
t != null && !m[t].expandable && (m[t] = Y({}, m[t], { expandable: !0 })), this.store.update({
|
|
1344
1344
|
itemMetaLookup: m,
|
|
@@ -1358,7 +1358,7 @@ var Cn = [], Z = {
|
|
|
1358
1358
|
getItemDOMElement = (e) => {
|
|
1359
1359
|
let t = Z.itemMeta(this.store.state, e);
|
|
1360
1360
|
if (t == null) return null;
|
|
1361
|
-
let n =
|
|
1361
|
+
let n = vn.treeItemIdAttribute(this.store.state, e, t.idAttribute);
|
|
1362
1362
|
return document.getElementById(n);
|
|
1363
1363
|
};
|
|
1364
1364
|
setItemChildren = ({ items: e, parentId: t, getChildrenCount: n, recursive: r = !1 }) => {
|
|
@@ -1369,9 +1369,9 @@ var Cn = [], Z = {
|
|
|
1369
1369
|
depth: i + 1,
|
|
1370
1370
|
isItemExpandable: n ? (e) => n(e) !== 0 : () => !1
|
|
1371
1371
|
}, s;
|
|
1372
|
-
if (r) s =
|
|
1372
|
+
if (r) s = Sn(Y({}, o, { existingItemMetaLookup: a }));
|
|
1373
1373
|
else {
|
|
1374
|
-
let e = t ?? "__TREE_VIEW_ROOT_PARENT_ID__", { metaLookup: n, modelLookup: r, orderedChildrenIds: i, childrenIndexes: c } =
|
|
1374
|
+
let e = t ?? "__TREE_VIEW_ROOT_PARENT_ID__", { metaLookup: n, modelLookup: r, orderedChildrenIds: i, childrenIndexes: c } = xn(Y({}, o, { otherItemsMetaLookup: a }));
|
|
1375
1375
|
s = {
|
|
1376
1376
|
itemMetaLookup: n,
|
|
1377
1377
|
itemModelLookup: r,
|
|
@@ -1409,34 +1409,34 @@ var Cn = [], Z = {
|
|
|
1409
1409
|
handleItemClick = (e, t) => {
|
|
1410
1410
|
this.store.parameters.onItemClick?.(e, t);
|
|
1411
1411
|
};
|
|
1412
|
-
},
|
|
1412
|
+
}, En = $t((e) => e.selectedItems, (e) => Array.isArray(e) ? e : e == null ? [] : [e]), Dn = $t(En, (e) => {
|
|
1413
1413
|
let t = /* @__PURE__ */ new Map();
|
|
1414
1414
|
return e.forEach((e) => {
|
|
1415
1415
|
t.set(e, !0);
|
|
1416
1416
|
}), t;
|
|
1417
|
-
}),
|
|
1418
|
-
if (
|
|
1417
|
+
}), On = (e, t) => e.itemMetaLookup[t]?.selectable ?? !0, kn = (e, t) => Dn(e).has(t), An = (e, t) => !e.disableSelection && !Z.isItemDisabled(e, t) && On(e, t), jn = (e) => e.selectionPropagation, Mn = (e, t) => {
|
|
1418
|
+
if (kn(e, t)) return "selected";
|
|
1419
1419
|
if (Z.itemOrderedChildrenIds(e, t).length === 0) return "unselected";
|
|
1420
1420
|
let n = !1, r = !1, i = (a) => {
|
|
1421
|
-
a !== t &&
|
|
1421
|
+
a !== t && An(e, a) && (kn(e, a) ? n = !0 : r = !0), Z.itemOrderedChildrenIds(e, a).forEach(i);
|
|
1422
1422
|
};
|
|
1423
|
-
return i(t),
|
|
1423
|
+
return i(t), jn(e).parents ? n && r ? "indeterminate" : n && !r ? "selected" : "unselected" : n ? "indeterminate" : "unselected";
|
|
1424
1424
|
}, Q = {
|
|
1425
1425
|
selectedItemsRaw: (e) => e.selectedItems,
|
|
1426
|
-
selectedItems:
|
|
1427
|
-
selectedItemsMap:
|
|
1426
|
+
selectedItems: En,
|
|
1427
|
+
selectedItemsMap: Dn,
|
|
1428
1428
|
enabled: (e) => !e.disableSelection,
|
|
1429
1429
|
isMultiSelectEnabled: (e) => e.multiSelect,
|
|
1430
1430
|
isCheckboxSelectionEnabled: (e) => e.checkboxSelection,
|
|
1431
|
-
propagationRules:
|
|
1432
|
-
isItemSelected:
|
|
1433
|
-
itemSelectionStatus:
|
|
1434
|
-
isItemIndeterminate: (e, t) =>
|
|
1435
|
-
isFeatureEnabledForItem: (e, t) => !e.disableSelection &&
|
|
1436
|
-
canItemBeSelected:
|
|
1437
|
-
isItemSelectable:
|
|
1438
|
-
},
|
|
1439
|
-
let { itemId: t } = e, { store: n } =
|
|
1431
|
+
propagationRules: jn,
|
|
1432
|
+
isItemSelected: kn,
|
|
1433
|
+
itemSelectionStatus: Mn,
|
|
1434
|
+
isItemIndeterminate: (e, t) => Mn(e, t) === "indeterminate",
|
|
1435
|
+
isFeatureEnabledForItem: (e, t) => !e.disableSelection && On(e, t),
|
|
1436
|
+
canItemBeSelected: An,
|
|
1437
|
+
isItemSelectable: On
|
|
1438
|
+
}, Nn = ({ props: e }) => {
|
|
1439
|
+
let { itemId: t } = e, { store: n } = Ht(), r = X(n, Q.isCheckboxSelectionEnabled), i = X(n, Q.isFeatureEnabledForItem, t), a = X(n, Q.canItemBeSelected, t), o = X(n, Z.isItemDisabled, t), s = X(n, Q.isItemSelectable, t), c = X(n, Q.itemSelectionStatus, t), l = X(n, Q.isItemSelected, t), u = o || !s;
|
|
1440
1440
|
return { propsEnhancers: {
|
|
1441
1441
|
root: () => {
|
|
1442
1442
|
let e;
|
|
@@ -1459,15 +1459,15 @@ var Cn = [], Z = {
|
|
|
1459
1459
|
indeterminate: c === "indeterminate"
|
|
1460
1460
|
})
|
|
1461
1461
|
} };
|
|
1462
|
-
},
|
|
1462
|
+
}, Pn = $t((e) => e.expandedItems, (e) => {
|
|
1463
1463
|
let t = /* @__PURE__ */ new Map();
|
|
1464
1464
|
return e.forEach((e) => {
|
|
1465
1465
|
t.set(e, !0);
|
|
1466
1466
|
}), t;
|
|
1467
1467
|
}), $ = {
|
|
1468
1468
|
expandedItemsRaw: (e) => e.expandedItems,
|
|
1469
|
-
expandedItemsMap:
|
|
1470
|
-
flatList:
|
|
1469
|
+
expandedItemsMap: Pn,
|
|
1470
|
+
flatList: $t(Z.itemOrderedChildrenIdsLookup, Pn, (e, t) => {
|
|
1471
1471
|
function n(r) {
|
|
1472
1472
|
if (!t.has(r)) return [r];
|
|
1473
1473
|
let i = [r], a = e[r] || [];
|
|
@@ -1477,24 +1477,24 @@ var Cn = [], Z = {
|
|
|
1477
1477
|
return (e.__TREE_VIEW_ROOT_PARENT_ID__ ?? []).flatMap(n);
|
|
1478
1478
|
}),
|
|
1479
1479
|
triggerSlot: (e) => e.expansionTrigger,
|
|
1480
|
-
isItemExpanded: (e, t) =>
|
|
1480
|
+
isItemExpanded: (e, t) => Pn(e).has(t),
|
|
1481
1481
|
isItemExpandable: (e, t) => Z.itemMeta(e, t)?.expandable ?? !1
|
|
1482
|
-
},
|
|
1482
|
+
}, Fn = (e, t) => {
|
|
1483
1483
|
let n = t.length - 1;
|
|
1484
1484
|
for (; n >= 0 && !Z.canItemBeFocused(e, t[n]);) --n;
|
|
1485
1485
|
if (n !== -1) return t[n];
|
|
1486
|
-
},
|
|
1486
|
+
}, In = (e, t) => {
|
|
1487
1487
|
let n = Z.itemMeta(e, t);
|
|
1488
1488
|
if (!n) return null;
|
|
1489
1489
|
let r = Z.itemOrderedChildrenIds(e, n.parentId), i = Z.itemIndex(e, t);
|
|
1490
1490
|
if (i === 0) return n.parentId;
|
|
1491
1491
|
let a = i - 1;
|
|
1492
1492
|
for (; !Z.canItemBeFocused(e, r[a]) && a >= 0;) --a;
|
|
1493
|
-
if (a === -1) return n.parentId == null ? null :
|
|
1494
|
-
let o = r[a], s =
|
|
1495
|
-
for (; $.isItemExpanded(e, o) && s != null;) o = s, s =
|
|
1493
|
+
if (a === -1) return n.parentId == null ? null : In(e, n.parentId);
|
|
1494
|
+
let o = r[a], s = Fn(e, Z.itemOrderedChildrenIds(e, o));
|
|
1495
|
+
for (; $.isItemExpanded(e, o) && s != null;) o = s, s = Fn(e, Z.itemOrderedChildrenIds(e, o));
|
|
1496
1496
|
return o;
|
|
1497
|
-
},
|
|
1497
|
+
}, Ln = (e, t) => {
|
|
1498
1498
|
if ($.isItemExpanded(e, t)) {
|
|
1499
1499
|
let n = Z.itemOrderedChildrenIds(e, t).find((t) => Z.canItemBeFocused(e, t));
|
|
1500
1500
|
if (n != null) return n;
|
|
@@ -1510,15 +1510,15 @@ var Cn = [], Z = {
|
|
|
1510
1510
|
n = Z.itemMeta(e, n.parentId);
|
|
1511
1511
|
}
|
|
1512
1512
|
return null;
|
|
1513
|
-
},
|
|
1513
|
+
}, Rn = (e) => {
|
|
1514
1514
|
let t = null;
|
|
1515
1515
|
for (; t == null || $.isItemExpanded(e, t);) {
|
|
1516
|
-
let n =
|
|
1516
|
+
let n = Fn(e, Z.itemOrderedChildrenIds(e, t));
|
|
1517
1517
|
if (n == null) return t;
|
|
1518
1518
|
t = n;
|
|
1519
1519
|
}
|
|
1520
1520
|
return t;
|
|
1521
|
-
},
|
|
1521
|
+
}, zn = (e) => Z.itemOrderedChildrenIds(e, null).find((t) => Z.canItemBeFocused(e, t)), Bn = (e, t, n) => {
|
|
1522
1522
|
if (t === n) return [t, n];
|
|
1523
1523
|
let r = Z.itemMeta(e, t), i = Z.itemMeta(e, n);
|
|
1524
1524
|
if (!r || !i) return [t, n];
|
|
@@ -1527,7 +1527,7 @@ var Cn = [], Z = {
|
|
|
1527
1527
|
for (; !u && !l;) d && (a.push(s), l = o.indexOf(s) !== -1, d = s !== null, !l && d && (s = Z.itemParentId(e, s))), f && !l && (o.push(c), u = a.indexOf(c) !== -1, f = c !== null, !u && f && (c = Z.itemParentId(e, c)));
|
|
1528
1528
|
let p = l ? s : c, m = Z.itemOrderedChildrenIds(e, p), h = a[a.indexOf(p) - 1], g = o[o.indexOf(p) - 1];
|
|
1529
1529
|
return m.indexOf(h) < m.indexOf(g) ? [t, n] : [n, t];
|
|
1530
|
-
},
|
|
1530
|
+
}, Vn = (e, t, n) => {
|
|
1531
1531
|
let r = (t) => {
|
|
1532
1532
|
if ($.isItemExpandable(e, t) && $.isItemExpanded(e, t)) return Z.itemOrderedChildrenIds(e, t)[0];
|
|
1533
1533
|
let n = Z.itemMeta(e, t);
|
|
@@ -1536,30 +1536,30 @@ var Cn = [], Z = {
|
|
|
1536
1536
|
if (r < t.length - 1) return t[r + 1];
|
|
1537
1537
|
n = n.parentId ? Z.itemMeta(e, n.parentId) : null;
|
|
1538
1538
|
}
|
|
1539
|
-
throw Error(
|
|
1540
|
-
}, [i, a] =
|
|
1539
|
+
throw Error(Bt(191));
|
|
1540
|
+
}, [i, a] = Bn(e, t, n), o = [i], s = i;
|
|
1541
1541
|
for (; s !== a;) s = r(s), Z.isItemDisabled(e, s) || o.push(s);
|
|
1542
1542
|
return o;
|
|
1543
|
-
},
|
|
1544
|
-
let t =
|
|
1545
|
-
for (; t != null;) n.push(t), t =
|
|
1543
|
+
}, Hn = (e) => {
|
|
1544
|
+
let t = zn(e), n = [];
|
|
1545
|
+
for (; t != null;) n.push(t), t = Ln(e, t);
|
|
1546
1546
|
return n;
|
|
1547
|
-
},
|
|
1547
|
+
}, Un = (e, t) => t !== e.closest("*[role=\"treeitem\"]"), Wn = class {
|
|
1548
1548
|
lastSelectedItem = null;
|
|
1549
1549
|
lastSelectedRange = {};
|
|
1550
1550
|
constructor(e) {
|
|
1551
|
-
this.store = e, e.itemPluginManager.register(
|
|
1551
|
+
this.store = e, e.itemPluginManager.register(Nn, null);
|
|
1552
1552
|
}
|
|
1553
1553
|
setSelectedItems = (e, t, n) => {
|
|
1554
|
-
let { selectionPropagation: r =
|
|
1555
|
-
if (c = l && (r.descendants || r.parents) ?
|
|
1554
|
+
let { selectionPropagation: r = Lt, selectedItems: i, onItemSelectionToggle: a, onSelectedItemsChange: o } = this.store.parameters, s = Q.selectedItemsRaw(this.store.state), c, l = Q.isMultiSelectEnabled(this.store.state);
|
|
1555
|
+
if (c = l && (r.descendants || r.parents) ? Gn({
|
|
1556
1556
|
store: this.store,
|
|
1557
1557
|
selectionPropagation: r,
|
|
1558
1558
|
newModel: t,
|
|
1559
1559
|
oldModel: s,
|
|
1560
1560
|
additionalItemsToPropagate: n
|
|
1561
1561
|
}) : t, i === void 0 && this.store.set("selectedItems", c), a) if (l) {
|
|
1562
|
-
let t =
|
|
1562
|
+
let t = Kn({
|
|
1563
1563
|
newModel: c,
|
|
1564
1564
|
oldModel: s
|
|
1565
1565
|
});
|
|
@@ -1575,8 +1575,8 @@ var Cn = [], Z = {
|
|
|
1575
1575
|
if (!Q.isMultiSelectEnabled(this.store.state)) return;
|
|
1576
1576
|
let r = Q.selectedItems(this.store.state).slice();
|
|
1577
1577
|
Object.keys(this.lastSelectedRange).length > 0 && (r = r.filter((e) => !this.lastSelectedRange[e]));
|
|
1578
|
-
let i =
|
|
1579
|
-
r = r.concat(o), this.setSelectedItems(e, r), this.lastSelectedRange =
|
|
1578
|
+
let i = qn(r), a = Vn(this.store.state, t, n).filter((e) => Q.isItemSelectable(this.store.state, e)), o = a.filter((e) => !i[e]);
|
|
1579
|
+
r = r.concat(o), this.setSelectedItems(e, r), this.lastSelectedRange = qn(a);
|
|
1580
1580
|
};
|
|
1581
1581
|
getItemSelection = (e) => Q.itemSelectionStatus(this.store.state, e);
|
|
1582
1582
|
buildPublicAPI = () => ({
|
|
@@ -1584,7 +1584,7 @@ var Cn = [], Z = {
|
|
|
1584
1584
|
setItemSelection: this.setItemSelection
|
|
1585
1585
|
});
|
|
1586
1586
|
propagateSelectionToNewItems = (e, t) => {
|
|
1587
|
-
let { selectionPropagation: n =
|
|
1587
|
+
let { selectionPropagation: n = Lt } = this.store.parameters;
|
|
1588
1588
|
if (e == null || t.length === 0 || !n.descendants || !Q.isMultiSelectEnabled(this.store.state) || !Q.isItemSelected(this.store.state, e)) return;
|
|
1589
1589
|
let r = Q.selectedItems(this.store.state).concat(t);
|
|
1590
1590
|
this.setSelectedItems(null, r, t);
|
|
@@ -1600,20 +1600,20 @@ var Cn = [], Z = {
|
|
|
1600
1600
|
};
|
|
1601
1601
|
selectAllNavigableItems = (e) => {
|
|
1602
1602
|
if (!Q.isMultiSelectEnabled(this.store.state)) return;
|
|
1603
|
-
let t =
|
|
1604
|
-
this.setSelectedItems(e, t), this.lastSelectedRange =
|
|
1603
|
+
let t = Hn(this.store.state);
|
|
1604
|
+
this.setSelectedItems(e, t), this.lastSelectedRange = qn(t);
|
|
1605
1605
|
};
|
|
1606
1606
|
expandSelectionRange = (e, t) => {
|
|
1607
1607
|
if (this.lastSelectedItem != null) {
|
|
1608
|
-
let [n, r] =
|
|
1608
|
+
let [n, r] = Bn(this.store.state, t, this.lastSelectedItem);
|
|
1609
1609
|
this.selectRange(e, [n, r]);
|
|
1610
1610
|
}
|
|
1611
1611
|
};
|
|
1612
1612
|
selectRangeFromStartToItem = (e, t) => {
|
|
1613
|
-
this.selectRange(e, [
|
|
1613
|
+
this.selectRange(e, [zn(this.store.state), t]);
|
|
1614
1614
|
};
|
|
1615
1615
|
selectRangeFromItemToEnd = (e, t) => {
|
|
1616
|
-
this.selectRange(e, [t,
|
|
1616
|
+
this.selectRange(e, [t, Rn(this.store.state)]);
|
|
1617
1617
|
};
|
|
1618
1618
|
selectItemFromArrowNavigation = (e, t, n) => {
|
|
1619
1619
|
if (!Q.isMultiSelectEnabled(this.store.state)) return;
|
|
@@ -1624,9 +1624,9 @@ var Cn = [], Z = {
|
|
|
1624
1624
|
}) : (this.lastSelectedRange[t] || (this.lastSelectedRange = {}), this.lastSelectedRange[n] ? (r = r.filter((e) => e !== t), delete this.lastSelectedRange[t]) : (Q.isItemSelected(this.store.state, n) || r.push(n), this.lastSelectedRange[n] = !0)), this.setSelectedItems(e, r);
|
|
1625
1625
|
};
|
|
1626
1626
|
};
|
|
1627
|
-
function
|
|
1627
|
+
function Gn({ store: e, selectionPropagation: t, newModel: n, oldModel: r, additionalItemsToPropagate: i }) {
|
|
1628
1628
|
if (!t.descendants && !t.parents) return n;
|
|
1629
|
-
let a = !1, o =
|
|
1629
|
+
let a = !1, o = qn(n), s = Kn({
|
|
1630
1630
|
newModel: n,
|
|
1631
1631
|
oldModel: r
|
|
1632
1632
|
});
|
|
@@ -1659,7 +1659,7 @@ function Wn({ store: e, selectionPropagation: t, newModel: n, oldModel: r, addit
|
|
|
1659
1659
|
}
|
|
1660
1660
|
}), a ? Object.keys(o) : n;
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function Kn({ oldModel: e, newModel: t }) {
|
|
1663
1663
|
let n = /* @__PURE__ */ new Map();
|
|
1664
1664
|
t.forEach((e) => {
|
|
1665
1665
|
n.set(e, !0);
|
|
@@ -1672,14 +1672,14 @@ function Gn({ oldModel: e, newModel: t }) {
|
|
|
1672
1672
|
removed: e.filter((e) => !n.has(e))
|
|
1673
1673
|
};
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1675
|
+
function qn(e) {
|
|
1676
1676
|
let t = {};
|
|
1677
1677
|
return e.forEach((e) => {
|
|
1678
1678
|
t[e] = !0;
|
|
1679
1679
|
}), t;
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1682
|
-
let r = X(e,
|
|
1681
|
+
function Jn(e, t, n) {
|
|
1682
|
+
let r = X(e, vn.treeId), i = X(e, Z.itemChildrenIndentation), a = X(e, Q.isMultiSelectEnabled);
|
|
1683
1683
|
return (o) => Y({
|
|
1684
1684
|
ref: n,
|
|
1685
1685
|
role: "tree",
|
|
@@ -1695,15 +1695,15 @@ function qn(e, t, n) {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
});
|
|
1697
1697
|
}
|
|
1698
|
-
function
|
|
1698
|
+
function Yn(e) {
|
|
1699
1699
|
return e.replace(/["\\]/g, "\\$&");
|
|
1700
1700
|
}
|
|
1701
|
-
var
|
|
1702
|
-
function
|
|
1703
|
-
let { children: t, itemId: n = null, idAttribute: r } = e, { store: i, rootRef: a } =
|
|
1701
|
+
var Xn = /*#__PURE__*/ K.createContext(null);
|
|
1702
|
+
function Zn(e) {
|
|
1703
|
+
let { children: t, itemId: n = null, idAttribute: r } = e, { store: i, rootRef: a } = Ht(), o = K.useRef(/* @__PURE__ */ new Map()), [, s] = K.useReducer((e) => e + 1, 0);
|
|
1704
1704
|
K.useEffect(() => {
|
|
1705
1705
|
if (!a.current) return;
|
|
1706
|
-
let e = Z.itemOrderedChildrenIds(i.state, n ?? null) ?? [], t =
|
|
1706
|
+
let e = Z.itemOrderedChildrenIds(i.state, n ?? null) ?? [], t = Yn(r ?? a.current.id);
|
|
1707
1707
|
if (n != null) {
|
|
1708
1708
|
let e = a.current.querySelector(`*[id="${t}"][role="treeitem"]`);
|
|
1709
1709
|
if (e && e.getAttribute("aria-expanded") === "false") return;
|
|
@@ -1720,44 +1720,44 @@ function Xn(e) {
|
|
|
1720
1720
|
},
|
|
1721
1721
|
parentId: n
|
|
1722
1722
|
}), [n]);
|
|
1723
|
-
return /*#__PURE__*/ (0, q.jsx)(
|
|
1723
|
+
return /*#__PURE__*/ (0, q.jsx)(Xn.Provider, {
|
|
1724
1724
|
value: c,
|
|
1725
1725
|
children: t
|
|
1726
1726
|
});
|
|
1727
1727
|
}
|
|
1728
|
-
var
|
|
1729
|
-
function
|
|
1730
|
-
return
|
|
1728
|
+
var Qn = /*#__PURE__*/ K.createContext(() => -1), $n = typeof Symbol.dispose == "symbol" ? Symbol.dispose : Symbol.for("Symbol.dispose"), er = typeof SuppressedError == "function" ? SuppressedError : void 0;
|
|
1729
|
+
function tr(e, t) {
|
|
1730
|
+
return er ? new er(e, t) : Object.assign(/* @__PURE__ */ Error("An error was suppressed during disposal."), {
|
|
1731
1731
|
name: "SuppressedError",
|
|
1732
1732
|
error: e,
|
|
1733
1733
|
suppressed: t
|
|
1734
1734
|
});
|
|
1735
1735
|
}
|
|
1736
|
-
function
|
|
1736
|
+
function nr(e) {
|
|
1737
1737
|
if (e) throw ReferenceError("MUI X: The disposable stack is disposed.");
|
|
1738
1738
|
}
|
|
1739
|
-
var
|
|
1739
|
+
var rr = class e {
|
|
1740
1740
|
stack = [];
|
|
1741
1741
|
isDisposed = !1;
|
|
1742
1742
|
get disposed() {
|
|
1743
1743
|
return this.isDisposed;
|
|
1744
1744
|
}
|
|
1745
1745
|
use(e) {
|
|
1746
|
-
if (
|
|
1747
|
-
let t = e[
|
|
1746
|
+
if (nr(this.isDisposed), e != null) {
|
|
1747
|
+
let t = e[$n];
|
|
1748
1748
|
if (typeof t != "function") throw TypeError("MUI X: The value is not disposable.");
|
|
1749
1749
|
this.stack.push(() => t.call(e));
|
|
1750
1750
|
}
|
|
1751
1751
|
return e;
|
|
1752
1752
|
}
|
|
1753
1753
|
adopt(e, t) {
|
|
1754
|
-
return
|
|
1754
|
+
return nr(this.isDisposed), this.stack.push(() => t(e)), e;
|
|
1755
1755
|
}
|
|
1756
1756
|
defer(e) {
|
|
1757
|
-
|
|
1757
|
+
nr(this.isDisposed), this.stack.push(e);
|
|
1758
1758
|
}
|
|
1759
1759
|
move() {
|
|
1760
|
-
|
|
1760
|
+
nr(this.isDisposed);
|
|
1761
1761
|
let t = new e();
|
|
1762
1762
|
return t.stack = this.stack, this.stack = [], this.isDisposed = !0, t;
|
|
1763
1763
|
}
|
|
@@ -1768,35 +1768,35 @@ var nr = class e {
|
|
|
1768
1768
|
for (let n = this.stack.length - 1; n >= 0; --n) try {
|
|
1769
1769
|
this.stack[n]();
|
|
1770
1770
|
} catch (n) {
|
|
1771
|
-
t = e ?
|
|
1771
|
+
t = e ? tr(n, t) : n, e = !0;
|
|
1772
1772
|
}
|
|
1773
1773
|
if (this.stack = [], e) throw t;
|
|
1774
1774
|
}
|
|
1775
|
-
[
|
|
1775
|
+
[$n]() {
|
|
1776
1776
|
this.dispose();
|
|
1777
1777
|
}
|
|
1778
|
-
},
|
|
1778
|
+
}, ir = globalThis.DisposableStack ?? rr;
|
|
1779
1779
|
globalThis.AsyncDisposableStack;
|
|
1780
|
-
var
|
|
1781
|
-
|
|
1782
|
-
var
|
|
1783
|
-
function
|
|
1784
|
-
let t = K.useRef(
|
|
1785
|
-
if (t.current ===
|
|
1780
|
+
var ar = mn;
|
|
1781
|
+
ar.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE ?? ar.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1782
|
+
var or = Symbol("useDisposable.mount"), sr = Symbol();
|
|
1783
|
+
function cr(e) {
|
|
1784
|
+
let t = K.useRef(sr);
|
|
1785
|
+
if (t.current === sr) {
|
|
1786
1786
|
let n = e(), r = () => {
|
|
1787
|
-
n[
|
|
1787
|
+
n[$n](), t.current = sr;
|
|
1788
1788
|
};
|
|
1789
|
-
n[
|
|
1789
|
+
n[or] = () => r, t.current = n;
|
|
1790
1790
|
}
|
|
1791
|
-
return
|
|
1791
|
+
return gn(t.current[or]), t.current;
|
|
1792
1792
|
}
|
|
1793
|
-
var
|
|
1794
|
-
function
|
|
1795
|
-
let n =
|
|
1793
|
+
var lr = cr;
|
|
1794
|
+
function ur(e, t) {
|
|
1795
|
+
let n = j(), r = S(), i = lr(() => new e(Y({}, t, {
|
|
1796
1796
|
isRtl: n,
|
|
1797
1797
|
defaultId: r
|
|
1798
1798
|
})));
|
|
1799
|
-
return
|
|
1799
|
+
return hn(() => i.updateStateFromParameters(Y({}, t, {
|
|
1800
1800
|
isRtl: n,
|
|
1801
1801
|
defaultId: r
|
|
1802
1802
|
})), [
|
|
@@ -1804,9 +1804,9 @@ function lr(e, t) {
|
|
|
1804
1804
|
n,
|
|
1805
1805
|
r,
|
|
1806
1806
|
t
|
|
1807
|
-
]),
|
|
1807
|
+
]), gn(i.mountEffect), i;
|
|
1808
1808
|
}
|
|
1809
|
-
var
|
|
1809
|
+
var dr = class {
|
|
1810
1810
|
maxListeners = 20;
|
|
1811
1811
|
warnOnce = !1;
|
|
1812
1812
|
events = {};
|
|
@@ -1842,36 +1842,36 @@ var ur = class {
|
|
|
1842
1842
|
n.removeListener(e, r), t.apply(n, i);
|
|
1843
1843
|
});
|
|
1844
1844
|
}
|
|
1845
|
-
},
|
|
1846
|
-
function
|
|
1845
|
+
}, fr = ({ isItemEditable: e, expansionTrigger: t }) => t || (e ? "iconContainer" : "content");
|
|
1846
|
+
function pr(e) {
|
|
1847
1847
|
return {
|
|
1848
1848
|
disabledItemsFocusable: e.disabledItemsFocusable ?? !1,
|
|
1849
1849
|
itemChildrenIndentation: e.itemChildrenIndentation ?? "12px",
|
|
1850
1850
|
providedTreeId: e.id,
|
|
1851
|
-
expansionTrigger:
|
|
1851
|
+
expansionTrigger: fr({
|
|
1852
1852
|
isItemEditable: e.isItemEditable,
|
|
1853
1853
|
expansionTrigger: e.expansionTrigger
|
|
1854
1854
|
}),
|
|
1855
1855
|
disableSelection: e.disableSelection ?? !1,
|
|
1856
1856
|
multiSelect: e.multiSelect ?? !1,
|
|
1857
1857
|
checkboxSelection: e.checkboxSelection ?? !1,
|
|
1858
|
-
selectionPropagation: e.selectionPropagation ??
|
|
1858
|
+
selectionPropagation: e.selectionPropagation ?? Lt,
|
|
1859
1859
|
itemHeight: e.itemHeight ?? null
|
|
1860
1860
|
};
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1862
|
+
function mr(e, t, n) {
|
|
1863
1863
|
return e === void 0 ? t === void 0 ? n : t : e;
|
|
1864
1864
|
}
|
|
1865
|
-
function
|
|
1865
|
+
function hr(e) {
|
|
1866
1866
|
return Y({
|
|
1867
1867
|
treeId: e.defaultId,
|
|
1868
1868
|
focusedItemId: null
|
|
1869
|
-
},
|
|
1870
|
-
expandedItems:
|
|
1871
|
-
selectedItems:
|
|
1869
|
+
}, pr(e), Tn.buildItemsStateIfNeeded(e), {
|
|
1870
|
+
expandedItems: mr(e.expandedItems, e.defaultExpandedItems, []),
|
|
1871
|
+
selectedItems: mr(e.selectedItems, e.defaultSelectedItems, e.multiSelect ? It : null)
|
|
1872
1872
|
});
|
|
1873
1873
|
}
|
|
1874
|
-
var
|
|
1874
|
+
var gr = class {
|
|
1875
1875
|
timeoutIds = /* @__PURE__ */ new Map();
|
|
1876
1876
|
intervalIds = /* @__PURE__ */ new Map();
|
|
1877
1877
|
startTimeout = (e, t, n) => {
|
|
@@ -1897,7 +1897,7 @@ var hr = class {
|
|
|
1897
1897
|
clearAll = () => {
|
|
1898
1898
|
this.timeoutIds.forEach(clearTimeout), this.timeoutIds.clear(), this.intervalIds.forEach(clearInterval), this.intervalIds.clear();
|
|
1899
1899
|
};
|
|
1900
|
-
},
|
|
1900
|
+
}, _r = class {
|
|
1901
1901
|
constructor(e) {
|
|
1902
1902
|
this.store = e;
|
|
1903
1903
|
}
|
|
@@ -1940,26 +1940,26 @@ var hr = class {
|
|
|
1940
1940
|
for (let n of e) t[n] = Y({}, t[n], { expandable: !0 });
|
|
1941
1941
|
this.store.set("itemMetaLookup", t);
|
|
1942
1942
|
};
|
|
1943
|
-
},
|
|
1943
|
+
}, vr = {
|
|
1944
1944
|
isItemEditable: (e, t) => {
|
|
1945
1945
|
let n = e.isItemEditable, r = Z.itemModel(e, t);
|
|
1946
1946
|
return !r || n == null ? !1 : typeof n == "boolean" ? n : n(r);
|
|
1947
1947
|
},
|
|
1948
1948
|
isItemBeingEdited: (e, t) => t != null && e.editedItemId === t,
|
|
1949
1949
|
isAnyItemBeingEdited: (e) => !!e.editedItemId
|
|
1950
|
-
},
|
|
1950
|
+
}, yr = 500, br = class {
|
|
1951
1951
|
typeaheadQuery = "";
|
|
1952
1952
|
constructor(e) {
|
|
1953
|
-
this.store = e, this.labelMap =
|
|
1954
|
-
this.store.shouldIgnoreItemsStateUpdate() || (this.labelMap =
|
|
1953
|
+
this.store = e, this.labelMap = Sr(Z.itemMetaLookup(this.store.state)), this.store.registerStoreEffect(Z.itemMetaLookup, (e, t) => {
|
|
1954
|
+
this.store.shouldIgnoreItemsStateUpdate() || (this.labelMap = Sr(t));
|
|
1955
1955
|
});
|
|
1956
1956
|
}
|
|
1957
1957
|
canToggleItemSelection = (e) => Q.canItemBeSelected(this.store.state, e);
|
|
1958
1958
|
canToggleItemExpansion = (e) => !Z.isItemDisabled(this.store.state, e) && $.isItemExpandable(this.store.state, e);
|
|
1959
1959
|
getFirstItemMatchingTypeaheadQuery = (e, t) => {
|
|
1960
1960
|
let n = (e) => {
|
|
1961
|
-
let t =
|
|
1962
|
-
return t === null ?
|
|
1961
|
+
let t = Ln(this.store.state, e);
|
|
1962
|
+
return t === null ? zn(this.store.state) : t;
|
|
1963
1963
|
}, r = (t) => {
|
|
1964
1964
|
let r = null, i = {}, a = t.length > 1 ? e : n(e);
|
|
1965
1965
|
for (; r == null && !i[a];) this.labelMap[a]?.startsWith(t) ? r = a : (i[a] = !0, a = n(a));
|
|
@@ -1973,7 +1973,7 @@ var hr = class {
|
|
|
1973
1973
|
this.labelMap = e(this.labelMap);
|
|
1974
1974
|
};
|
|
1975
1975
|
handleItemKeyDown = async (e, t) => {
|
|
1976
|
-
if (e.defaultMuiPrevented || e.altKey ||
|
|
1976
|
+
if (e.defaultMuiPrevented || e.altKey || Un(e.target, e.currentTarget)) return;
|
|
1977
1977
|
let n = e.ctrlKey || e.metaKey, r = e.key, i = Q.isMultiSelectEnabled(this.store.state);
|
|
1978
1978
|
switch (!0) {
|
|
1979
1979
|
case r === " " && this.canToggleItemSelection(t):
|
|
@@ -1985,7 +1985,7 @@ var hr = class {
|
|
|
1985
1985
|
});
|
|
1986
1986
|
break;
|
|
1987
1987
|
case r === "Enter":
|
|
1988
|
-
this.store.labelEditing?.setEditedItem &&
|
|
1988
|
+
this.store.labelEditing?.setEditedItem && vr.isItemEditable(this.store.state, t) && !vr.isItemBeingEdited(this.store.state, t) ? this.store.labelEditing.setEditedItem(t) : this.canToggleItemExpansion(t) ? (this.store.expansion.setItemExpansion({
|
|
1989
1989
|
event: e,
|
|
1990
1990
|
itemId: t
|
|
1991
1991
|
}), e.preventDefault()) : this.canToggleItemSelection(t) && (i ? (e.preventDefault(), this.store.selection.setItemSelection({
|
|
@@ -1998,19 +1998,19 @@ var hr = class {
|
|
|
1998
1998
|
}), e.preventDefault()));
|
|
1999
1999
|
break;
|
|
2000
2000
|
case r === "ArrowDown": {
|
|
2001
|
-
let n =
|
|
2001
|
+
let n = Ln(this.store.state, t);
|
|
2002
2002
|
n && (e.preventDefault(), this.store.focus.focusItem(e, n), i && e.shiftKey && this.canToggleItemSelection(n) && this.store.selection.selectItemFromArrowNavigation(e, t, n));
|
|
2003
2003
|
break;
|
|
2004
2004
|
}
|
|
2005
2005
|
case r === "ArrowUp": {
|
|
2006
|
-
let n =
|
|
2006
|
+
let n = In(this.store.state, t);
|
|
2007
2007
|
n && (e.preventDefault(), this.store.focus.focusItem(e, n), i && e.shiftKey && this.canToggleItemSelection(n) && this.store.selection.selectItemFromArrowNavigation(e, t, n));
|
|
2008
2008
|
break;
|
|
2009
2009
|
}
|
|
2010
2010
|
case r === "ArrowRight" && !this.store.parameters.isRtl || r === "ArrowLeft" && this.store.parameters.isRtl:
|
|
2011
2011
|
if (n) return;
|
|
2012
2012
|
if ($.isItemExpanded(this.store.state, t)) {
|
|
2013
|
-
let n =
|
|
2013
|
+
let n = Ln(this.store.state, t);
|
|
2014
2014
|
n && (this.store.focus.focusItem(e, n), e.preventDefault());
|
|
2015
2015
|
} else this.canToggleItemExpansion(t) && (this.store.expansion.setItemExpansion({
|
|
2016
2016
|
event: e,
|
|
@@ -2029,10 +2029,10 @@ var hr = class {
|
|
|
2029
2029
|
}
|
|
2030
2030
|
break;
|
|
2031
2031
|
case r === "Home":
|
|
2032
|
-
this.canToggleItemSelection(t) && i && n && e.shiftKey ? this.store.selection.selectRangeFromStartToItem(e, t) : this.store.focus.focusItem(e,
|
|
2032
|
+
this.canToggleItemSelection(t) && i && n && e.shiftKey ? this.store.selection.selectRangeFromStartToItem(e, t) : this.store.focus.focusItem(e, zn(this.store.state)), e.preventDefault();
|
|
2033
2033
|
break;
|
|
2034
2034
|
case r === "End":
|
|
2035
|
-
this.canToggleItemSelection(t) && i && n && e.shiftKey ? this.store.selection.selectRangeFromItemToEnd(e, t) : this.store.focus.focusItem(e,
|
|
2035
|
+
this.canToggleItemSelection(t) && i && n && e.shiftKey ? this.store.selection.selectRangeFromItemToEnd(e, t) : this.store.focus.focusItem(e, Rn(this.store.state)), e.preventDefault();
|
|
2036
2036
|
break;
|
|
2037
2037
|
case r === "*":
|
|
2038
2038
|
this.store.expansion.expandAllSiblings(e, t), e.preventDefault();
|
|
@@ -2040,10 +2040,10 @@ var hr = class {
|
|
|
2040
2040
|
case String.fromCharCode(e.keyCode) === "A" && n && i && Q.enabled(this.store.state):
|
|
2041
2041
|
this.store.selection.selectAllNavigableItems(e), e.preventDefault();
|
|
2042
2042
|
break;
|
|
2043
|
-
case !n && !e.shiftKey &&
|
|
2043
|
+
case !n && !e.shiftKey && xr(r): {
|
|
2044
2044
|
this.store.timeoutManager.clearTimeout("typeahead");
|
|
2045
2045
|
let n = this.getFirstItemMatchingTypeaheadQuery(t, r);
|
|
2046
|
-
n == null ? this.typeaheadQuery = "" : (this.store.focus.focusItem(e, n), e.preventDefault()), this.store.timeoutManager.startTimeout("typeahead",
|
|
2046
|
+
n == null ? this.typeaheadQuery = "" : (this.store.focus.focusItem(e, n), e.preventDefault()), this.store.timeoutManager.startTimeout("typeahead", yr, () => {
|
|
2047
2047
|
this.typeaheadQuery = "";
|
|
2048
2048
|
});
|
|
2049
2049
|
break;
|
|
@@ -2051,25 +2051,25 @@ var hr = class {
|
|
|
2051
2051
|
}
|
|
2052
2052
|
};
|
|
2053
2053
|
};
|
|
2054
|
-
function
|
|
2054
|
+
function xr(e) {
|
|
2055
2055
|
return !!e && e.length === 1 && !!e.match(/\S/);
|
|
2056
2056
|
}
|
|
2057
|
-
function
|
|
2057
|
+
function Sr(e) {
|
|
2058
2058
|
let t = {};
|
|
2059
2059
|
return Object.values(e).forEach((e) => {
|
|
2060
2060
|
t[e.id] = e.label.toLowerCase();
|
|
2061
2061
|
}), t;
|
|
2062
2062
|
}
|
|
2063
|
-
var
|
|
2064
|
-
if (!r &&
|
|
2063
|
+
var Cr = $t(Q.selectedItems, $.expandedItemsMap, Z.itemMetaLookup, Z.disabledItemFocusable, (e) => Z.itemOrderedChildrenIds(e, null), (e, t, n, r, i) => e.find((e) => {
|
|
2064
|
+
if (!r && bn(n, e)) return !1;
|
|
2065
2065
|
let i = n[e];
|
|
2066
2066
|
return i && (i.parentId == null || t.has(i.parentId));
|
|
2067
|
-
}) ?? i.find((e) => r || !
|
|
2068
|
-
defaultFocusableItemId:
|
|
2069
|
-
isItemTheDefaultFocusableItem: (e, t) =>
|
|
2067
|
+
}) ?? i.find((e) => r || !bn(n, e)) ?? null), wr = {
|
|
2068
|
+
defaultFocusableItemId: Cr,
|
|
2069
|
+
isItemTheDefaultFocusableItem: (e, t) => Cr(e) === t,
|
|
2070
2070
|
focusedItemId: (e) => e.focusedItemId,
|
|
2071
2071
|
isItemFocused: (e, t) => e.focusedItemId === t
|
|
2072
|
-
},
|
|
2072
|
+
}, Tr = class {
|
|
2073
2073
|
constructor(e) {
|
|
2074
2074
|
this.store = e;
|
|
2075
2075
|
let t = e.state;
|
|
@@ -2078,17 +2078,17 @@ var Sr = Qt(Q.selectedItems, $.expandedItemsMap, Z.itemMetaLookup, Z.disabledIte
|
|
|
2078
2078
|
t = e;
|
|
2079
2079
|
return;
|
|
2080
2080
|
}
|
|
2081
|
-
let n =
|
|
2081
|
+
let n = wr.focusedItemId(e);
|
|
2082
2082
|
if (n == null || Z.itemMeta(e, n)) {
|
|
2083
2083
|
t = e;
|
|
2084
2084
|
return;
|
|
2085
2085
|
}
|
|
2086
|
-
let r = (t) => t == null || !Z.itemMeta(e, t) ? null : t, i = r(
|
|
2086
|
+
let r = (t) => t == null || !Z.itemMeta(e, t) ? null : t, i = r(Ln(t, n)) ?? r(In(t, n)) ?? zn(e);
|
|
2087
2087
|
i == null ? this.setFocusedItemId(null) : this.applyItemFocus(null, i), t = e;
|
|
2088
2088
|
}));
|
|
2089
2089
|
}
|
|
2090
2090
|
setFocusedItemId = (e) => {
|
|
2091
|
-
|
|
2091
|
+
wr.focusedItemId(this.store.state) !== e && this.store.set("focusedItemId", e);
|
|
2092
2092
|
};
|
|
2093
2093
|
applyItemFocus = (e, t) => {
|
|
2094
2094
|
this.store.items.getItemDOMElement(t)?.focus(), this.setFocusedItemId(t), this.store.parameters.onItemFocus?.(e, t);
|
|
@@ -2099,7 +2099,7 @@ var Sr = Qt(Q.selectedItems, $.expandedItemsMap, Z.itemMetaLookup, Z.disabledIte
|
|
|
2099
2099
|
n && (n.parentId == null || $.isItemExpanded(this.store.state, n.parentId)) && this.applyItemFocus(e, t);
|
|
2100
2100
|
};
|
|
2101
2101
|
removeFocusedItem = () => {
|
|
2102
|
-
let e =
|
|
2102
|
+
let e = wr.focusedItemId(this.store.state);
|
|
2103
2103
|
if (e != null) {
|
|
2104
2104
|
if (Z.itemMeta(this.store.state, e)) {
|
|
2105
2105
|
let t = this.store.items.getItemDOMElement(e);
|
|
@@ -2110,13 +2110,13 @@ var Sr = Qt(Q.selectedItems, $.expandedItemsMap, Z.itemMetaLookup, Z.disabledIte
|
|
|
2110
2110
|
};
|
|
2111
2111
|
handleRootFocus = (e) => {
|
|
2112
2112
|
if (e.defaultMuiPrevented) return;
|
|
2113
|
-
let t =
|
|
2113
|
+
let t = wr.defaultFocusableItemId(this.store.state);
|
|
2114
2114
|
e.target === e.currentTarget && t != null && this.applyItemFocus(e, t);
|
|
2115
2115
|
};
|
|
2116
2116
|
handleRootBlur = (e) => {
|
|
2117
2117
|
e.defaultMuiPrevented || this.setFocusedItemId(null);
|
|
2118
2118
|
};
|
|
2119
|
-
},
|
|
2119
|
+
}, Er = class {
|
|
2120
2120
|
itemPlugins = [];
|
|
2121
2121
|
itemWrappers = [];
|
|
2122
2122
|
register = (e, t) => {
|
|
@@ -2124,15 +2124,15 @@ var Sr = Qt(Q.selectedItems, $.expandedItemsMap, Z.itemMetaLookup, Z.disabledIte
|
|
|
2124
2124
|
};
|
|
2125
2125
|
listPlugins = () => this.itemPlugins;
|
|
2126
2126
|
listWrappers = () => this.itemWrappers;
|
|
2127
|
-
},
|
|
2127
|
+
}, Dr = class extends pn {
|
|
2128
2128
|
initialParameters = null;
|
|
2129
|
-
disposables = new
|
|
2130
|
-
eventManager = this.disposables.adopt(new
|
|
2131
|
-
timeoutManager = this.disposables.adopt(new
|
|
2132
|
-
itemPluginManager = new
|
|
2129
|
+
disposables = new ir();
|
|
2130
|
+
eventManager = this.disposables.adopt(new dr(), (e) => e.removeAllListeners());
|
|
2131
|
+
timeoutManager = this.disposables.adopt(new gr(), (e) => e.clearAll());
|
|
2132
|
+
itemPluginManager = new Er();
|
|
2133
2133
|
constructor(e, t, n) {
|
|
2134
|
-
let r =
|
|
2135
|
-
super(i), this.parameters = e, this.instanceName = t, this.mapper = n, this.items = new
|
|
2134
|
+
let r = hr(e), i = n.getInitialState(r, e);
|
|
2135
|
+
super(i), this.parameters = e, this.instanceName = t, this.mapper = n, this.items = new Tn(this), this.focus = new Tr(this), this.expansion = new _r(this), this.selection = new Wn(this), this.keyboardNavigation = new br(this);
|
|
2136
2136
|
}
|
|
2137
2137
|
buildPublicAPI() {
|
|
2138
2138
|
return Y({}, this.items.buildPublicAPI(), this.focus.buildPublicAPI(), this.expansion.buildPublicAPI(), this.selection.buildPublicAPI());
|
|
@@ -2140,13 +2140,13 @@ var Sr = Qt(Q.selectedItems, $.expandedItemsMap, Z.itemMetaLookup, Z.disabledIte
|
|
|
2140
2140
|
updateStateFromParameters(e) {
|
|
2141
2141
|
let t = (t, n, r) => {
|
|
2142
2142
|
e[n] !== void 0 && (t[n] = e[n]);
|
|
2143
|
-
}, n =
|
|
2144
|
-
t(n, "expandedItems", "defaultExpandedItems"), t(n, "selectedItems", "defaultSelectedItems"), this.state.treeId !== e.defaultId && (n.treeId = e.defaultId), !this.mapper.shouldIgnoreItemsStateUpdate(e) &&
|
|
2143
|
+
}, n = pr(e);
|
|
2144
|
+
t(n, "expandedItems", "defaultExpandedItems"), t(n, "selectedItems", "defaultSelectedItems"), this.state.treeId !== e.defaultId && (n.treeId = e.defaultId), !this.mapper.shouldIgnoreItemsStateUpdate(e) && Tn.shouldRebuildItemsState(e, this.parameters) && Object.assign(n, Tn.buildItemsStateIfNeeded(e));
|
|
2145
2145
|
let r = this.mapper.updateStateFromParameters(n, e, t);
|
|
2146
2146
|
this.update(r), this.parameters = e;
|
|
2147
2147
|
}
|
|
2148
2148
|
mountEffect = () => {};
|
|
2149
|
-
[
|
|
2149
|
+
[$n]() {
|
|
2150
2150
|
if (!this.disposables.disposed) try {
|
|
2151
2151
|
this.disposables.dispose();
|
|
2152
2152
|
} catch {}
|
|
@@ -2160,23 +2160,23 @@ var Sr = Qt(Q.selectedItems, $.expandedItemsMap, Z.itemMetaLookup, Z.disabledIte
|
|
|
2160
2160
|
}));
|
|
2161
2161
|
};
|
|
2162
2162
|
publishEvent = (e, t, n) => {
|
|
2163
|
-
|
|
2163
|
+
Or(n) && n.isPropagationStopped() || this.eventManager.emit(e, t, n);
|
|
2164
2164
|
};
|
|
2165
2165
|
subscribeEvent = (e, t) => {
|
|
2166
2166
|
this.eventManager.on(e, t);
|
|
2167
2167
|
};
|
|
2168
2168
|
};
|
|
2169
|
-
function
|
|
2169
|
+
function Or(e) {
|
|
2170
2170
|
return e?.isPropagationStopped !== void 0;
|
|
2171
2171
|
}
|
|
2172
|
-
var
|
|
2172
|
+
var kr = {
|
|
2173
2173
|
isEmpty: (e) => e.lazyLoadedItems == null || Object.keys(e.lazyLoadedItems.loading).length === 0 && Object.keys(e.lazyLoadedItems.errors).length === 0,
|
|
2174
2174
|
isItemLoading: (e, t) => e.lazyLoadedItems?.loading[t ?? "__TREE_VIEW_ROOT_PARENT_ID__"] != null,
|
|
2175
2175
|
itemLoadingChildrenCount: (e, t) => e.lazyLoadedItems?.loading[t ?? "__TREE_VIEW_ROOT_PARENT_ID__"] ?? -1,
|
|
2176
2176
|
itemHasError: (e, t) => !!e.lazyLoadedItems?.errors[t ?? "__TREE_VIEW_ROOT_PARENT_ID__"],
|
|
2177
2177
|
itemError: (e, t) => e.lazyLoadedItems?.errors[t ?? "__TREE_VIEW_ROOT_PARENT_ID__"]
|
|
2178
|
-
},
|
|
2179
|
-
let { store: n, publicAPI: r } =
|
|
2178
|
+
}, Ar = (e) => Array.isArray(e) ? e.length > 0 && e.some(Ar) : !!e, jr = ({ itemId: e, children: t }) => {
|
|
2179
|
+
let { store: n, publicAPI: r } = Ht(), i = X(n, $.isItemExpandable, e), a = X(n, kr.isItemLoading, e), o = X(n, kr.itemHasError, e), s = Ar(t) || i, c = X(n, $.isItemExpanded, e), l = X(n, wr.isItemFocused, e), u = X(n, Q.isItemSelected, e), d = X(n, Q.isItemIndeterminate, e), f = X(n, Z.isItemDisabled, e), p = X(n, vr.isItemBeingEdited, e), m = {
|
|
2180
2180
|
expandable: s,
|
|
2181
2181
|
expanded: c,
|
|
2182
2182
|
focused: l,
|
|
@@ -2184,7 +2184,7 @@ var Or = {
|
|
|
2184
2184
|
indeterminate: d,
|
|
2185
2185
|
disabled: f,
|
|
2186
2186
|
editing: p,
|
|
2187
|
-
editable: X(n,
|
|
2187
|
+
editable: X(n, vr.isItemEditable, e),
|
|
2188
2188
|
loading: a,
|
|
2189
2189
|
error: o
|
|
2190
2190
|
}, h = (t) => {
|
|
@@ -2223,20 +2223,20 @@ var Or = {
|
|
|
2223
2223
|
handleCheckboxSelection: _,
|
|
2224
2224
|
toggleItemEditing: v,
|
|
2225
2225
|
handleSaveItemLabel: (t, r) => {
|
|
2226
|
-
n.labelEditing &&
|
|
2226
|
+
n.labelEditing && vr.isItemBeingEdited(n.state, e) && (n.labelEditing.updateItemLabel(e, r), v(), n.focus.focusItem(t, e));
|
|
2227
2227
|
},
|
|
2228
2228
|
handleCancelItemLabelEditing: (t) => {
|
|
2229
|
-
n.labelEditing &&
|
|
2229
|
+
n.labelEditing && vr.isItemBeingEdited(n.state, e) && (v(), n.focus.focusItem(t, e));
|
|
2230
2230
|
}
|
|
2231
2231
|
},
|
|
2232
2232
|
status: m,
|
|
2233
2233
|
publicAPI: r
|
|
2234
2234
|
};
|
|
2235
|
-
},
|
|
2236
|
-
let { store: r } =
|
|
2237
|
-
if (u == null) throw Error(
|
|
2238
|
-
let { registerChild: d, unregisterChild: f, parentId: p } = u, m =
|
|
2239
|
-
return
|
|
2235
|
+
}, Mr = ({ props: e, rootRef: t, contentRef: n }) => {
|
|
2236
|
+
let { store: r } = Ht(), { children: i, disabled: a = !1, disableSelection: o = !1, label: s, itemId: c, id: l } = e, u = K.useContext(Xn);
|
|
2237
|
+
if (u == null) throw Error(Bt(196));
|
|
2238
|
+
let { registerChild: d, unregisterChild: f, parentId: p } = u, m = Ar(i), h = K.useRef(null), g = At(h, n), _ = X(r, vn.treeItemIdAttribute, c, l), v = K.useRef(!0), y = kt(Symbol);
|
|
2239
|
+
return hn(() => (d(_, c), () => {
|
|
2240
2240
|
f(_), f(_);
|
|
2241
2241
|
}), [
|
|
2242
2242
|
r,
|
|
@@ -2244,9 +2244,9 @@ var Or = {
|
|
|
2244
2244
|
f,
|
|
2245
2245
|
_,
|
|
2246
2246
|
c
|
|
2247
|
-
]),
|
|
2247
|
+
]), hn(() => (v.current = !0, () => {
|
|
2248
2248
|
v.current = !1;
|
|
2249
|
-
}), []),
|
|
2249
|
+
}), []), hn(() => {
|
|
2250
2250
|
let e = r.jsxItems.upsertJSXItem({
|
|
2251
2251
|
id: c,
|
|
2252
2252
|
idAttribute: l,
|
|
@@ -2277,24 +2277,24 @@ var Or = {
|
|
|
2277
2277
|
contentRef: g,
|
|
2278
2278
|
rootRef: t
|
|
2279
2279
|
};
|
|
2280
|
-
},
|
|
2281
|
-
let r = K.useContext(
|
|
2282
|
-
return /*#__PURE__*/ (0, q.jsx)(
|
|
2280
|
+
}, Nr = ({ children: e, itemId: t, idAttribute: n }) => {
|
|
2281
|
+
let r = K.useContext(Qn);
|
|
2282
|
+
return /*#__PURE__*/ (0, q.jsx)(Zn, {
|
|
2283
2283
|
itemId: t,
|
|
2284
2284
|
idAttribute: n,
|
|
2285
|
-
children: /*#__PURE__*/ (0, q.jsx)(
|
|
2285
|
+
children: /*#__PURE__*/ (0, q.jsx)(Qn.Provider, {
|
|
2286
2286
|
value: r + 1,
|
|
2287
2287
|
children: e
|
|
2288
2288
|
})
|
|
2289
2289
|
});
|
|
2290
|
-
},
|
|
2290
|
+
}, Pr = class {
|
|
2291
2291
|
itemOwners = /* @__PURE__ */ new Map();
|
|
2292
2292
|
constructor(e) {
|
|
2293
|
-
this.store = e, e.itemPluginManager.register(
|
|
2293
|
+
this.store = e, e.itemPluginManager.register(Mr, Nr);
|
|
2294
2294
|
}
|
|
2295
2295
|
upsertJSXItem = (e, t) => {
|
|
2296
2296
|
let n = this.itemOwners.get(e.id);
|
|
2297
|
-
if (n != null && n !== t) throw Error(
|
|
2297
|
+
if (n != null && n !== t) throw Error(Bt(195, e.id));
|
|
2298
2298
|
this.itemOwners.set(e.id, t);
|
|
2299
2299
|
let r = Z.itemMeta(this.store.state, e.id);
|
|
2300
2300
|
if (r != null) {
|
|
@@ -2330,28 +2330,28 @@ var Or = {
|
|
|
2330
2330
|
let n = e ?? "__TREE_VIEW_ROOT_PARENT_ID__";
|
|
2331
2331
|
this.store.update({
|
|
2332
2332
|
itemOrderedChildrenIdsLookup: Y({}, this.store.state.itemOrderedChildrenIdsLookup, { [n]: t }),
|
|
2333
|
-
itemChildrenIndexesLookup: Y({}, this.store.state.itemChildrenIndexesLookup, { [n]:
|
|
2333
|
+
itemChildrenIndexesLookup: Y({}, this.store.state.itemChildrenIndexesLookup, { [n]: yn(t) })
|
|
2334
2334
|
}), e !== null && Q.isMultiSelectEnabled(this.store.state) && Q.propagationRules(this.store.state).descendants && Q.isItemSelected(this.store.state, e) && this.store.selection.setItemSelection({
|
|
2335
2335
|
itemId: e,
|
|
2336
2336
|
shouldBeSelected: !0,
|
|
2337
2337
|
keepExistingSelection: !0
|
|
2338
2338
|
});
|
|
2339
2339
|
};
|
|
2340
|
-
},
|
|
2340
|
+
}, Fr = {
|
|
2341
2341
|
getInitialState: (e) => e,
|
|
2342
2342
|
updateStateFromParameters: (e) => e,
|
|
2343
2343
|
shouldIgnoreItemsStateUpdate: () => !0
|
|
2344
|
-
},
|
|
2345
|
-
jsxItems = new
|
|
2344
|
+
}, Ir = class extends Dr {
|
|
2345
|
+
jsxItems = new Pr(this);
|
|
2346
2346
|
constructor(e) {
|
|
2347
|
-
super(Y({}, e, { items:
|
|
2347
|
+
super(Y({}, e, { items: It }), "SimpleTreeView", Fr);
|
|
2348
2348
|
}
|
|
2349
2349
|
updateStateFromParameters(e) {
|
|
2350
|
-
super.updateStateFromParameters(Y({}, e, { items:
|
|
2350
|
+
super.updateStateFromParameters(Y({}, e, { items: It }));
|
|
2351
2351
|
}
|
|
2352
|
-
},
|
|
2352
|
+
}, Lr = Pt("MuiSimpleTreeView"), Rr = (e) => {
|
|
2353
2353
|
let { classes: t } = e;
|
|
2354
|
-
return K.useMemo(() =>
|
|
2354
|
+
return K.useMemo(() => Me({
|
|
2355
2355
|
root: ["root"],
|
|
2356
2356
|
item: ["item"],
|
|
2357
2357
|
itemContent: ["itemContent"],
|
|
@@ -2359,8 +2359,8 @@ var Or = {
|
|
|
2359
2359
|
itemIconContainer: ["itemIconContainer"],
|
|
2360
2360
|
itemLabel: ["itemLabel"],
|
|
2361
2361
|
itemCheckbox: ["itemCheckbox"]
|
|
2362
|
-
},
|
|
2363
|
-
},
|
|
2362
|
+
}, Ft, t), [t]);
|
|
2363
|
+
}, zr = V("ul", {
|
|
2364
2364
|
name: "MuiSimpleTreeView",
|
|
2365
2365
|
slot: "Root"
|
|
2366
2366
|
})({
|
|
@@ -2369,38 +2369,38 @@ var Or = {
|
|
|
2369
2369
|
listStyle: "none",
|
|
2370
2370
|
outline: 0,
|
|
2371
2371
|
position: "relative"
|
|
2372
|
-
}),
|
|
2373
|
-
let n =
|
|
2372
|
+
}), Br = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
2373
|
+
let n = Lr({
|
|
2374
2374
|
props: e,
|
|
2375
2375
|
name: "MuiSimpleTreeView"
|
|
2376
|
-
}), { slots: r, slotProps: i, apiRef: a, parameters: o, forwardedProps: s } =
|
|
2376
|
+
}), { slots: r, slotProps: i, apiRef: a, parameters: o, forwardedProps: s } = Xt(n), c = ur(Ir, o), l = K.useRef(null), u = Jn(c, s, At(t, l)), d = Rr(n), f = r?.root ?? zr, p = W({
|
|
2377
2377
|
elementType: f,
|
|
2378
2378
|
externalSlotProps: i?.root,
|
|
2379
2379
|
className: d.root,
|
|
2380
2380
|
getSlotProps: u,
|
|
2381
2381
|
ownerState: n
|
|
2382
2382
|
});
|
|
2383
|
-
return /*#__PURE__*/ (0, q.jsx)(
|
|
2383
|
+
return /*#__PURE__*/ (0, q.jsx)(qt, {
|
|
2384
2384
|
store: c,
|
|
2385
2385
|
classes: d,
|
|
2386
2386
|
slots: r,
|
|
2387
2387
|
slotProps: i,
|
|
2388
2388
|
apiRef: a,
|
|
2389
2389
|
rootRef: l,
|
|
2390
|
-
children: /*#__PURE__*/ (0, q.jsx)(
|
|
2390
|
+
children: /*#__PURE__*/ (0, q.jsx)(Zn, {
|
|
2391
2391
|
itemId: null,
|
|
2392
2392
|
idAttribute: null,
|
|
2393
|
-
children: /*#__PURE__*/ (0, q.jsx)(
|
|
2393
|
+
children: /*#__PURE__*/ (0, q.jsx)(Qn.Provider, {
|
|
2394
2394
|
value: 0,
|
|
2395
2395
|
children: /*#__PURE__*/ (0, q.jsx)(f, Y({}, p))
|
|
2396
2396
|
})
|
|
2397
2397
|
})
|
|
2398
2398
|
});
|
|
2399
|
-
}),
|
|
2400
|
-
let { runItemPlugins: t, publicAPI: n, store: r } =
|
|
2399
|
+
}), Vr = (e, t, n) => typeof n == "function" ? n(e, t) : n, Hr = (e) => {
|
|
2400
|
+
let { runItemPlugins: t, publicAPI: n, store: r } = Ht(), i = K.useContext(Qn), a = X(r, Vr, e.itemId, i), { id: o, itemId: s, label: c, children: l, rootRef: u } = e, { rootRef: d, contentRef: f, propsEnhancers: p } = t(e), { interactions: m, status: h } = jr({
|
|
2401
2401
|
itemId: s,
|
|
2402
2402
|
children: l
|
|
2403
|
-
}), g = K.useRef(null), _ = K.useRef(null), v =
|
|
2403
|
+
}), g = K.useRef(null), _ = K.useRef(null), v = At(u, d, g), y = At(f, _), b = K.useRef(null), x = X(r, Q.isCheckboxSelectionEnabled), S = X(r, vn.treeItemIdAttribute, s, o), C = X(r, wr.isItemTheDefaultFocusableItem, s), w = X(r, Z.itemHeight), T = {
|
|
2404
2404
|
rootRefObject: g,
|
|
2405
2405
|
contentRefObject: _,
|
|
2406
2406
|
interactions: m
|
|
@@ -2409,7 +2409,7 @@ var Or = {
|
|
|
2409
2409
|
}, D = (e) => (t) => {
|
|
2410
2410
|
if (e.onBlur?.(t), t.defaultMuiPrevented) return;
|
|
2411
2411
|
let n = r.items.getItemDOMElement(s);
|
|
2412
|
-
h.editing || t.relatedTarget &&
|
|
2412
|
+
h.editing || t.relatedTarget && Un(t.relatedTarget, n) && (t.target && t.target?.dataset?.element === "labelInput" && Un(t.target, n) || t.relatedTarget?.dataset?.element === "labelInput") || r.focus.removeFocusedItem();
|
|
2413
2413
|
}, O = (e) => (t) => {
|
|
2414
2414
|
e.onKeyDown?.(t), !(t.defaultMuiPrevented || t.target?.dataset?.element === "labelInput") && r.keyboardNavigation.handleItemKeyDown(t, s);
|
|
2415
2415
|
}, k = (e) => (t) => {
|
|
@@ -2499,10 +2499,10 @@ var Or = {
|
|
|
2499
2499
|
publicAPI: n
|
|
2500
2500
|
};
|
|
2501
2501
|
};
|
|
2502
|
-
function
|
|
2503
|
-
return
|
|
2502
|
+
function Ur(e) {
|
|
2503
|
+
return Fe("MuiTreeItem", e);
|
|
2504
2504
|
}
|
|
2505
|
-
|
|
2505
|
+
De("MuiTreeItem", [
|
|
2506
2506
|
"root",
|
|
2507
2507
|
"content",
|
|
2508
2508
|
"groupTransition",
|
|
@@ -2514,29 +2514,29 @@ Te("MuiTreeItem", [
|
|
|
2514
2514
|
"errorIcon",
|
|
2515
2515
|
"loadingIcon"
|
|
2516
2516
|
]);
|
|
2517
|
-
var
|
|
2518
|
-
function
|
|
2517
|
+
var Wr = nt(/*#__PURE__*/ (0, q.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "TreeViewExpandIcon"), Gr = nt(/*#__PURE__*/ (0, q.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "TreeViewCollapseIcon"), Kr = ["ownerState"];
|
|
2518
|
+
function qr(e, t, n) {
|
|
2519
2519
|
return e === void 0 ? t === void 0 ? n : t : e;
|
|
2520
2520
|
}
|
|
2521
|
-
function
|
|
2522
|
-
let { slots: t, slotProps: n, status: r } = e, { slots: i, slotProps: a } =
|
|
2523
|
-
collapseIcon:
|
|
2524
|
-
expandIcon:
|
|
2525
|
-
endIcon:
|
|
2521
|
+
function Jr(e) {
|
|
2522
|
+
let { slots: t, slotProps: n, status: r } = e, { slots: i, slotProps: a } = Wt(), o = {
|
|
2523
|
+
collapseIcon: qr(t?.collapseIcon, i.collapseIcon, Gr),
|
|
2524
|
+
expandIcon: qr(t?.expandIcon, i.expandIcon, Wr),
|
|
2525
|
+
endIcon: qr(t?.endIcon, i.endIcon),
|
|
2526
2526
|
icon: t?.icon
|
|
2527
2527
|
}, s;
|
|
2528
2528
|
s = o?.icon ? "icon" : r.expandable ? r.expanded ? "collapseIcon" : "expandIcon" : "endIcon";
|
|
2529
|
-
let c = o[s], l =
|
|
2529
|
+
let c = o[s], l = Jt(W({
|
|
2530
2530
|
elementType: c,
|
|
2531
|
-
externalSlotProps: (e) => Y({},
|
|
2531
|
+
externalSlotProps: (e) => Y({}, Ie(a[s], e), Ie(n?.[s], e)),
|
|
2532
2532
|
ownerState: {}
|
|
2533
|
-
}),
|
|
2533
|
+
}), Kr);
|
|
2534
2534
|
return c ? /*#__PURE__*/ (0, q.jsx)(c, Y({}, l)) : null;
|
|
2535
2535
|
}
|
|
2536
|
-
var
|
|
2536
|
+
var Yr = V("div", {
|
|
2537
2537
|
name: "MuiTreeItemDragAndDropOverlay",
|
|
2538
2538
|
slot: "Root",
|
|
2539
|
-
shouldForwardProp: (e) =>
|
|
2539
|
+
shouldForwardProp: (e) => ke(e) && e !== "action"
|
|
2540
2540
|
})(({ theme: e }) => ({
|
|
2541
2541
|
position: "absolute",
|
|
2542
2542
|
left: 0,
|
|
@@ -2577,11 +2577,11 @@ var Jr = V("div", {
|
|
|
2577
2577
|
}
|
|
2578
2578
|
]
|
|
2579
2579
|
}));
|
|
2580
|
-
function Yr(e) {
|
|
2581
|
-
return e.action == null ? null : /*#__PURE__*/ (0, q.jsx)(Jr, Y({}, e));
|
|
2582
|
-
}
|
|
2583
2580
|
function Xr(e) {
|
|
2584
|
-
|
|
2581
|
+
return e.action == null ? null : /*#__PURE__*/ (0, q.jsx)(Yr, Y({}, e));
|
|
2582
|
+
}
|
|
2583
|
+
function Zr(e) {
|
|
2584
|
+
let { children: t, itemId: n, id: r } = e, { wrapItem: i, store: a } = Ht(), o = X(a, vn.treeItemIdAttribute, n, r);
|
|
2585
2585
|
return /*#__PURE__*/ (0, q.jsx)(K.Fragment, { children: i({
|
|
2586
2586
|
children: t,
|
|
2587
2587
|
itemId: n,
|
|
@@ -2589,7 +2589,7 @@ function Xr(e) {
|
|
|
2589
2589
|
idAttribute: o
|
|
2590
2590
|
}) });
|
|
2591
2591
|
}
|
|
2592
|
-
var
|
|
2592
|
+
var Qr = V("input", {
|
|
2593
2593
|
name: "MuiTreeItem",
|
|
2594
2594
|
slot: "LabelInput"
|
|
2595
2595
|
})(({ theme: e }) => Y({}, e.typography.body1, {
|
|
@@ -2600,7 +2600,7 @@ var Zr = V("input", {
|
|
|
2600
2600
|
padding: "0 2px",
|
|
2601
2601
|
boxSizing: "border-box",
|
|
2602
2602
|
"&:focus": { outline: `1px solid ${(e.vars || e).palette.primary.main}` }
|
|
2603
|
-
})),
|
|
2603
|
+
})), $r = ["visible"], ei = [
|
|
2604
2604
|
"id",
|
|
2605
2605
|
"itemId",
|
|
2606
2606
|
"label",
|
|
@@ -2610,7 +2610,7 @@ var Zr = V("input", {
|
|
|
2610
2610
|
"slots",
|
|
2611
2611
|
"slotProps",
|
|
2612
2612
|
"classes"
|
|
2613
|
-
],
|
|
2613
|
+
], ti = Pt("MuiTreeItem"), ni = V("li", {
|
|
2614
2614
|
name: "MuiTreeItem",
|
|
2615
2615
|
slot: "Root"
|
|
2616
2616
|
})({
|
|
@@ -2618,10 +2618,10 @@ var Zr = V("input", {
|
|
|
2618
2618
|
margin: 0,
|
|
2619
2619
|
padding: 0,
|
|
2620
2620
|
outline: 0
|
|
2621
|
-
}),
|
|
2621
|
+
}), ri = V("div", {
|
|
2622
2622
|
name: "MuiTreeItem",
|
|
2623
2623
|
slot: "Content",
|
|
2624
|
-
shouldForwardProp: (e) =>
|
|
2624
|
+
shouldForwardProp: (e) => ke(e) && e !== "status"
|
|
2625
2625
|
})(({ theme: e }) => ({
|
|
2626
2626
|
padding: e.spacing(.5, 1),
|
|
2627
2627
|
paddingLeft: `calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`,
|
|
@@ -2653,10 +2653,10 @@ var Zr = V("input", {
|
|
|
2653
2653
|
}
|
|
2654
2654
|
},
|
|
2655
2655
|
"&[data-selected][data-focused]": { backgroundColor: e.alpha((e.vars || e).palette.primary.main, `${(e.vars || e).palette.action.selectedOpacity} + ${(e.vars || e).palette.action.focusOpacity}`) }
|
|
2656
|
-
})),
|
|
2656
|
+
})), ii = V("div", {
|
|
2657
2657
|
name: "MuiTreeItem",
|
|
2658
2658
|
slot: "Label",
|
|
2659
|
-
shouldForwardProp: (e) =>
|
|
2659
|
+
shouldForwardProp: (e) => ke(e) && e !== "editable"
|
|
2660
2660
|
})(({ theme: e }) => Y({
|
|
2661
2661
|
width: "100%",
|
|
2662
2662
|
boxSizing: "border-box",
|
|
@@ -2666,7 +2666,7 @@ var Zr = V("input", {
|
|
|
2666
2666
|
}, e.typography.body1, { variants: [{
|
|
2667
2667
|
props: ({ editable: e }) => e,
|
|
2668
2668
|
style: { paddingLeft: "2px" }
|
|
2669
|
-
}] })),
|
|
2669
|
+
}] })), ai = V("div", {
|
|
2670
2670
|
name: "MuiTreeItem",
|
|
2671
2671
|
slot: "IconContainer"
|
|
2672
2672
|
})({
|
|
@@ -2677,14 +2677,14 @@ var Zr = V("input", {
|
|
|
2677
2677
|
position: "relative",
|
|
2678
2678
|
cursor: "inherit",
|
|
2679
2679
|
"& svg": { fontSize: 18 }
|
|
2680
|
-
}),
|
|
2680
|
+
}), oi = V(lt, {
|
|
2681
2681
|
name: "MuiTreeItem",
|
|
2682
2682
|
slot: "GroupTransition",
|
|
2683
2683
|
overridesResolver: (e, t) => t.groupTransition
|
|
2684
2684
|
})({
|
|
2685
2685
|
margin: 0,
|
|
2686
2686
|
padding: 0
|
|
2687
|
-
}),
|
|
2687
|
+
}), si = V("div", {
|
|
2688
2688
|
name: "MuiTreeItem",
|
|
2689
2689
|
slot: "ErrorIcon"
|
|
2690
2690
|
})({
|
|
@@ -2694,18 +2694,18 @@ var Zr = V("input", {
|
|
|
2694
2694
|
height: 7,
|
|
2695
2695
|
borderRadius: "50%",
|
|
2696
2696
|
backgroundColor: "red"
|
|
2697
|
-
}),
|
|
2697
|
+
}), ci = V(Ge, {
|
|
2698
2698
|
name: "MuiTreeItem",
|
|
2699
2699
|
slot: "LoadingIcon"
|
|
2700
|
-
})({ color: "text.primary" }),
|
|
2701
|
-
let { visible: n } = e, r =
|
|
2702
|
-
return n ? /*#__PURE__*/ (0, q.jsx)(
|
|
2700
|
+
})({ color: "text.primary" }), li = V(/*#__PURE__*/ K.forwardRef((e, t) => {
|
|
2701
|
+
let { visible: n } = e, r = Jt(e, $r);
|
|
2702
|
+
return n ? /*#__PURE__*/ (0, q.jsx)(Ct, Y({}, r, { ref: t })) : null;
|
|
2703
2703
|
}), {
|
|
2704
2704
|
name: "MuiTreeItem",
|
|
2705
2705
|
slot: "Checkbox"
|
|
2706
|
-
})({ padding: 0 }),
|
|
2707
|
-
let { classes: t } =
|
|
2708
|
-
return
|
|
2706
|
+
})({ padding: 0 }), ui = (e) => {
|
|
2707
|
+
let { classes: t } = Wt();
|
|
2708
|
+
return Me({
|
|
2709
2709
|
root: ["root"],
|
|
2710
2710
|
content: ["content"],
|
|
2711
2711
|
iconContainer: ["iconContainer"],
|
|
@@ -2716,30 +2716,30 @@ var Zr = V("input", {
|
|
|
2716
2716
|
dragAndDropOverlay: ["dragAndDropOverlay"],
|
|
2717
2717
|
errorIcon: ["errorIcon"],
|
|
2718
2718
|
loadingIcon: ["loadingIcon"]
|
|
2719
|
-
},
|
|
2720
|
-
root:
|
|
2721
|
-
content:
|
|
2722
|
-
iconContainer:
|
|
2723
|
-
checkbox:
|
|
2724
|
-
label:
|
|
2725
|
-
groupTransition:
|
|
2726
|
-
labelInput:
|
|
2727
|
-
dragAndDropOverlay:
|
|
2728
|
-
errorIcon:
|
|
2729
|
-
loadingIcon:
|
|
2719
|
+
}, Ur, Y({}, e, {
|
|
2720
|
+
root: k(e?.root, t.root),
|
|
2721
|
+
content: k(e?.content, t.itemContent),
|
|
2722
|
+
iconContainer: k(e?.iconContainer, t.itemIconContainer),
|
|
2723
|
+
checkbox: k(e?.checkbox, t.itemCheckbox),
|
|
2724
|
+
label: k(e?.label, t.itemLabel),
|
|
2725
|
+
groupTransition: k(e?.groupTransition, t.itemGroupTransition),
|
|
2726
|
+
labelInput: k(e?.labelInput, t.itemLabelInput),
|
|
2727
|
+
dragAndDropOverlay: k(e?.dragAndDropOverlay, t.itemDragAndDropOverlay),
|
|
2728
|
+
errorIcon: k(e?.errorIcon, t.itemErrorIcon),
|
|
2729
|
+
loadingIcon: k(e?.loadingIcon, t.itemLoadingIcon)
|
|
2730
2730
|
}));
|
|
2731
|
-
},
|
|
2732
|
-
let n =
|
|
2731
|
+
}, di = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
2732
|
+
let n = ti({
|
|
2733
2733
|
props: e,
|
|
2734
2734
|
name: "MuiTreeItem"
|
|
2735
|
-
}), { id: r, itemId: i, label: a, disabled: o, disableSelection: s, children: c, slots: l = {}, slotProps: u = {}, classes: d } = n, f =
|
|
2735
|
+
}), { id: r, itemId: i, label: a, disabled: o, disableSelection: s, children: c, slots: l = {}, slotProps: u = {}, classes: d } = n, f = Jt(n, ei), { getContextProviderProps: p, getRootProps: m, getContentProps: h, getIconContainerProps: g, getCheckboxProps: _, getLabelProps: v, getGroupTransitionProps: y, getLabelInputProps: b, getDragAndDropOverlayProps: x, getErrorContainerProps: S, getLoadingContainerProps: C, status: w } = Hr({
|
|
2736
2736
|
id: r,
|
|
2737
2737
|
itemId: i,
|
|
2738
2738
|
children: c,
|
|
2739
2739
|
label: a,
|
|
2740
2740
|
disabled: o,
|
|
2741
2741
|
disableSelection: s
|
|
2742
|
-
}), T =
|
|
2742
|
+
}), T = ui(d), E = l.root ?? ni, D = W({
|
|
2743
2743
|
elementType: E,
|
|
2744
2744
|
getSlotProps: m,
|
|
2745
2745
|
externalForwardedProps: f,
|
|
@@ -2747,75 +2747,75 @@ var Zr = V("input", {
|
|
|
2747
2747
|
additionalProps: { ref: t },
|
|
2748
2748
|
ownerState: {},
|
|
2749
2749
|
className: T.root
|
|
2750
|
-
}), O = l.content ??
|
|
2750
|
+
}), O = l.content ?? ri, k = W({
|
|
2751
2751
|
elementType: O,
|
|
2752
2752
|
getSlotProps: h,
|
|
2753
2753
|
externalSlotProps: u.content,
|
|
2754
2754
|
ownerState: {},
|
|
2755
2755
|
className: T.content
|
|
2756
|
-
}), A = l.iconContainer ??
|
|
2756
|
+
}), A = l.iconContainer ?? ai, j = W({
|
|
2757
2757
|
elementType: A,
|
|
2758
2758
|
getSlotProps: g,
|
|
2759
2759
|
externalSlotProps: u.iconContainer,
|
|
2760
2760
|
ownerState: {},
|
|
2761
2761
|
className: T.iconContainer
|
|
2762
|
-
}), M = l.label ??
|
|
2762
|
+
}), M = l.label ?? ii, N = W({
|
|
2763
2763
|
elementType: M,
|
|
2764
2764
|
getSlotProps: v,
|
|
2765
2765
|
externalSlotProps: u.label,
|
|
2766
2766
|
ownerState: {},
|
|
2767
2767
|
className: T.label
|
|
2768
|
-
}), P = l.checkbox ??
|
|
2768
|
+
}), P = l.checkbox ?? li, F = W({
|
|
2769
2769
|
elementType: P,
|
|
2770
2770
|
getSlotProps: _,
|
|
2771
2771
|
externalSlotProps: u.checkbox,
|
|
2772
2772
|
ownerState: {},
|
|
2773
2773
|
className: T.checkbox
|
|
2774
|
-
}), I = l.groupTransition ?? void 0,
|
|
2774
|
+
}), I = l.groupTransition ?? void 0, ee = W({
|
|
2775
2775
|
elementType: I,
|
|
2776
2776
|
getSlotProps: y,
|
|
2777
2777
|
externalSlotProps: u.groupTransition,
|
|
2778
2778
|
ownerState: {},
|
|
2779
2779
|
className: T.groupTransition
|
|
2780
|
-
}),
|
|
2781
|
-
elementType:
|
|
2780
|
+
}), te = l.labelInput ?? Qr, ne = W({
|
|
2781
|
+
elementType: te,
|
|
2782
2782
|
getSlotProps: b,
|
|
2783
2783
|
externalSlotProps: u.labelInput,
|
|
2784
2784
|
ownerState: {},
|
|
2785
2785
|
className: T.labelInput
|
|
2786
|
-
}),
|
|
2787
|
-
elementType:
|
|
2786
|
+
}), re = l.dragAndDropOverlay ?? Xr, ie = W({
|
|
2787
|
+
elementType: re,
|
|
2788
2788
|
getSlotProps: x,
|
|
2789
2789
|
externalSlotProps: u.dragAndDropOverlay,
|
|
2790
2790
|
ownerState: {},
|
|
2791
2791
|
className: T.dragAndDropOverlay
|
|
2792
|
-
}),
|
|
2793
|
-
elementType:
|
|
2792
|
+
}), L = l.errorIcon ?? si, ae = W({
|
|
2793
|
+
elementType: L,
|
|
2794
2794
|
getSlotProps: S,
|
|
2795
2795
|
externalSlotProps: u.errorIcon,
|
|
2796
2796
|
ownerState: {},
|
|
2797
2797
|
className: T.errorIcon
|
|
2798
|
-
}),
|
|
2799
|
-
elementType:
|
|
2798
|
+
}), R = l.loadingIcon ?? ci, oe = W({
|
|
2799
|
+
elementType: R,
|
|
2800
2800
|
getSlotProps: C,
|
|
2801
2801
|
externalSlotProps: u.loadingIcon,
|
|
2802
2802
|
ownerState: {},
|
|
2803
2803
|
className: T.loadingIcon
|
|
2804
2804
|
});
|
|
2805
|
-
return /*#__PURE__*/ (0, q.jsx)(
|
|
2806
|
-
/*#__PURE__*/ (0, q.jsxs)(A, Y({}, j, { children: [w.error && /*#__PURE__*/ (0, q.jsx)(
|
|
2805
|
+
return /*#__PURE__*/ (0, q.jsx)(Zr, Y({}, p(), { children: /*#__PURE__*/ (0, q.jsxs)(E, Y({}, D, { children: [/*#__PURE__*/ (0, q.jsxs)(O, Y({}, k, { children: [
|
|
2806
|
+
/*#__PURE__*/ (0, q.jsxs)(A, Y({}, j, { children: [w.error && /*#__PURE__*/ (0, q.jsx)(L, Y({}, ae)), w.loading ? /*#__PURE__*/ (0, q.jsx)(R, Y({}, oe)) : /*#__PURE__*/ (0, q.jsx)(Jr, {
|
|
2807
2807
|
status: w,
|
|
2808
2808
|
slots: l,
|
|
2809
2809
|
slotProps: u
|
|
2810
2810
|
})] })),
|
|
2811
2811
|
/*#__PURE__*/ (0, q.jsx)(P, Y({}, F)),
|
|
2812
|
-
w.editing ? /*#__PURE__*/ (0, q.jsx)(
|
|
2813
|
-
/*#__PURE__*/ (0, q.jsx)(
|
|
2814
|
-
] })), c && /*#__PURE__*/ (0, q.jsx)(
|
|
2815
|
-
}),
|
|
2812
|
+
w.editing ? /*#__PURE__*/ (0, q.jsx)(te, Y({}, ne)) : /*#__PURE__*/ (0, q.jsx)(M, Y({}, N)),
|
|
2813
|
+
/*#__PURE__*/ (0, q.jsx)(re, Y({}, ie))
|
|
2814
|
+
] })), c && /*#__PURE__*/ (0, q.jsx)(oi, Y({ as: I }, ee))] })) }));
|
|
2815
|
+
}), fi = "5px", pi = (e) => ({ "& > .MuiTreeItem-content": {
|
|
2816
2816
|
backgroundColor: `${e} !important`,
|
|
2817
|
-
borderRadius:
|
|
2818
|
-
} }),
|
|
2817
|
+
borderRadius: fi
|
|
2818
|
+
} }), mi = (e, t) => ({
|
|
2819
2819
|
width: "100%",
|
|
2820
2820
|
minWidth: 0,
|
|
2821
2821
|
"& .MuiTreeItem-groupTransition": {
|
|
@@ -2829,11 +2829,11 @@ var Zr = V("input", {
|
|
|
2829
2829
|
},
|
|
2830
2830
|
"& .MuiTreeItem-content:hover": {
|
|
2831
2831
|
backgroundColor: `${e} !important`,
|
|
2832
|
-
borderRadius:
|
|
2832
|
+
borderRadius: fi
|
|
2833
2833
|
},
|
|
2834
2834
|
"& .MuiTreeItem-content:hover .MuiTreeItem-iconContainer:has(svg)": {
|
|
2835
2835
|
backgroundColor: e,
|
|
2836
|
-
borderRadius:
|
|
2836
|
+
borderRadius: fi
|
|
2837
2837
|
},
|
|
2838
2838
|
...t && {
|
|
2839
2839
|
[G.sm]: { "& .MuiTreeItem-iconContainer": {
|
|
@@ -2851,14 +2851,14 @@ var Zr = V("input", {
|
|
|
2851
2851
|
}
|
|
2852
2852
|
} }
|
|
2853
2853
|
}
|
|
2854
|
-
}),
|
|
2854
|
+
}), hi = (e, t, n) => {
|
|
2855
2855
|
let r = n[t] ?? [];
|
|
2856
2856
|
return [...e].sort(([, e], [, t]) => {
|
|
2857
2857
|
let n = Number(r.includes(t.value)) - Number(r.includes(e.value)), i = Number(e.disabled) - Number(t.disabled);
|
|
2858
2858
|
return n || i;
|
|
2859
2859
|
});
|
|
2860
|
-
},
|
|
2861
|
-
let [m, h] = (0, K.useState)([]), g =
|
|
2860
|
+
}, gi = ({ filterValues: e, filterDimensionsCount: t, searchTerm: r, isLoading: a = !1, isPreview: o, isFieldLocked: s, hoverColor: c, filterFontSize: l, filterFontColor: u, vSpec: d, dimensionSelectionMethods: f, selectionMode: p }) => {
|
|
2861
|
+
let [m, h] = (0, K.useState)([]), g = P(f.map(({ field: e, fieldKey: t }) => e ?? { fieldKey: t })), _ = d.dimensions.filter((e) => e.role === i.FILTER_DIMENSION), y = d.dimensions.find((e) => e.role === i.FILTER_IMAGE) ?? (d.dimensions.every((e) => !e.role) ? d.dimensions[1] : void 0), b = e.reduce((e, t) => typeof t.measure1 == "number" ? e === null ? t.measure1 : Math.max(e, t.measure1) : e, null), x = (0, K.useMemo)(() => {
|
|
2862
2862
|
let t = /* @__PURE__ */ new Map();
|
|
2863
2863
|
return e.forEach(({ dimension: e, childDimension: n, dimensionValues: r, disabled: i, image: a, measure1: o, measure2: s }) => {
|
|
2864
2864
|
let c = r ?? [e, ...n === void 0 ? [] : [n]], l = c.length;
|
|
@@ -2875,39 +2875,39 @@ var Zr = V("input", {
|
|
|
2875
2875
|
}
|
|
2876
2876
|
d && (o != null || s != null) && (d.measure1 = o, d.measure2 = s), d && a && (d.image = a);
|
|
2877
2877
|
}), Array.from(t.entries());
|
|
2878
|
-
}, [e]),
|
|
2878
|
+
}, [e]), S = (0, K.useMemo)(() => {
|
|
2879
2879
|
let e = /* @__PURE__ */ new Map(), t = (e) => `tree-${encodeURIComponent(JSON.stringify(e))}`, n = (r, i) => {
|
|
2880
2880
|
let a = t(i);
|
|
2881
2881
|
e.set(a, r), Array.from(r.children.entries()).forEach(([e, t]) => {
|
|
2882
2882
|
n(t, [...i, e]);
|
|
2883
2883
|
});
|
|
2884
2884
|
};
|
|
2885
|
-
return
|
|
2886
|
-
}, [
|
|
2885
|
+
return x.forEach(([e, t]) => n(t, [e])), e;
|
|
2886
|
+
}, [x]);
|
|
2887
2887
|
(0, K.useEffect)(() => {
|
|
2888
|
-
!
|
|
2888
|
+
!r || a || h(Array.from(S.entries()).filter(([, e]) => e.children.size > 0).map(([e]) => e));
|
|
2889
2889
|
}, [
|
|
2890
|
+
a,
|
|
2890
2891
|
r,
|
|
2891
|
-
|
|
2892
|
-
C
|
|
2892
|
+
S
|
|
2893
2893
|
]), (0, K.useEffect)(() => {
|
|
2894
|
-
|
|
2895
|
-
}, [
|
|
2894
|
+
r || h([]);
|
|
2895
|
+
}, [r]);
|
|
2896
2896
|
let w = (e, t) => {
|
|
2897
2897
|
h(t);
|
|
2898
|
-
}, T = f.map((e) => e?.state.pending ?? e?.state.applied ?? []), E = f.map((e) => e?.state.applied ?? []), D = (e,
|
|
2899
|
-
if (p ===
|
|
2900
|
-
let n =
|
|
2898
|
+
}, T = f.map((e) => e?.state.pending ?? e?.state.applied ?? []), E = f.map((e) => e?.state.applied ?? []), D = (e, r, i, a = T) => {
|
|
2899
|
+
if (p === n.AllLevels && i.some((e, t) => {
|
|
2900
|
+
let n = a[t] ?? [];
|
|
2901
2901
|
return (f[t]?.operators.pending ?? f[t]?.operators.applied) !== J.FilterOperator.NotInList && n.length > 0 && !n.includes(e.value);
|
|
2902
2902
|
})) return "none";
|
|
2903
|
-
if (
|
|
2904
|
-
let
|
|
2905
|
-
return
|
|
2903
|
+
if (r === t - 1) return a[r]?.includes(e.value) ? "full" : "none";
|
|
2904
|
+
let o = Array.from(e.children.values()).map((t) => D(t, r + 1, [...i, e], a));
|
|
2905
|
+
return o.length > 0 && o.every((e) => e === "full") ? "full" : o.some((e) => e !== "none") ? "partial" : "none";
|
|
2906
2906
|
}, O = (e) => e.some((e, t) => {
|
|
2907
2907
|
let n = E[t] ?? [];
|
|
2908
2908
|
return f[t]?.operators.applied !== J.FilterOperator.NotInList && n.length > 0 && !n.includes(e.value);
|
|
2909
|
-
}), k = (e,
|
|
2910
|
-
let m = `tree-${encodeURIComponent(JSON.stringify(a))}`, h =
|
|
2909
|
+
}), k = (e, i, a, u) => {
|
|
2910
|
+
let m = `tree-${encodeURIComponent(JSON.stringify(a))}`, h = i < t - 1 && !!_[i]?.expandOnly, v = hi(Array.from(e.children.entries()), i + 1, E), S = v.length > 0, C = O(u), w = D(e, i, u), A = w !== "full", j = p === n.AllLevels, M = /* @__PURE__ */ new Map(), N = (e, t) => {
|
|
2911
2911
|
let n = M.get(t) ?? /* @__PURE__ */ new Set();
|
|
2912
2912
|
n.add(e), M.set(t, n);
|
|
2913
2913
|
};
|
|
@@ -2918,19 +2918,19 @@ var Zr = V("input", {
|
|
|
2918
2918
|
if (e.disabled) return !1;
|
|
2919
2919
|
let r = n === t - 1, i = !r && Array.from(e.children.values()).map((e) => P(e, n + 1)).some(Boolean);
|
|
2920
2920
|
return !r && !i ? !1 : ((r || j && !_[n]?.expandOnly) && N(e.value, n), !0);
|
|
2921
|
-
}, F = P(e,
|
|
2922
|
-
return /* @__PURE__ */ (0, q.jsx)(
|
|
2921
|
+
}, F = P(e, i), I = A && Array.from(M).some(([e, t]) => g[e] && t.size > 1), ee = !F || e.disabled || C || s || !!o || I, te = (!F || e.disabled || C) && !S || s || !!o;
|
|
2922
|
+
return /* @__PURE__ */ (0, q.jsx)(di, {
|
|
2923
2923
|
itemId: m,
|
|
2924
|
-
disabled:
|
|
2925
|
-
sx: w === "full" ?
|
|
2924
|
+
disabled: te,
|
|
2925
|
+
sx: w === "full" ? pi(c) : {},
|
|
2926
2926
|
"data-testid": `${e.label}-tree-item`,
|
|
2927
|
-
label: /* @__PURE__ */ (0, q.jsx)(
|
|
2927
|
+
label: /* @__PURE__ */ (0, q.jsx)(we, {
|
|
2928
2928
|
selected: w === "full",
|
|
2929
2929
|
applied: !1,
|
|
2930
|
-
disabled:
|
|
2931
|
-
hoverColor:
|
|
2930
|
+
disabled: ee,
|
|
2931
|
+
hoverColor: c,
|
|
2932
2932
|
onSelect: h ? void 0 : (e) => {
|
|
2933
|
-
if (e.stopPropagation(), !
|
|
2933
|
+
if (e.stopPropagation(), !ee) {
|
|
2934
2934
|
if (j && !A) {
|
|
2935
2935
|
let e = T.map((e, t) => g[t] ? e : e.filter((e) => !M.get(t)?.has(e))), n = /* @__PURE__ */ new Map(), r = (i, a, o) => {
|
|
2936
2936
|
if (a === t - 1) {
|
|
@@ -2942,7 +2942,7 @@ var Zr = V("input", {
|
|
|
2942
2942
|
}
|
|
2943
2943
|
i.children.forEach((e) => r(e, a + 1, [...o, i]));
|
|
2944
2944
|
};
|
|
2945
|
-
|
|
2945
|
+
x.forEach(([, e]) => r(e, 0, [])), u.forEach((e, t) => {
|
|
2946
2946
|
!_[t]?.expandOnly && !n.get(t)?.has(e.value) && N(e.value, t);
|
|
2947
2947
|
});
|
|
2948
2948
|
}
|
|
@@ -2961,58 +2961,58 @@ var Zr = V("input", {
|
|
|
2961
2961
|
showSelectionIcon: !h,
|
|
2962
2962
|
checkboxState: w,
|
|
2963
2963
|
dimensionValue: e.value,
|
|
2964
|
-
dimensionFormatter: _[
|
|
2964
|
+
dimensionFormatter: _[i]?.formatter,
|
|
2965
2965
|
measure1Value: e.measure1,
|
|
2966
2966
|
measure1Label: d.measures[0]?.filterValueLabel,
|
|
2967
2967
|
measure1Formatter: d.measures[0]?.formatter,
|
|
2968
2968
|
measure2Value: e.measure2,
|
|
2969
2969
|
measure2Label: d.measures[1]?.filterValueLabel,
|
|
2970
2970
|
measure2Formatter: d.measures[1]?.formatter,
|
|
2971
|
-
maxValue:
|
|
2971
|
+
maxValue: b,
|
|
2972
2972
|
imageValue: e.image,
|
|
2973
|
-
imageFit:
|
|
2974
|
-
searchTerm:
|
|
2973
|
+
imageFit: y?.imageFit,
|
|
2974
|
+
searchTerm: r,
|
|
2975
2975
|
fontStyle: d.filterSettings?.fontStyle,
|
|
2976
2976
|
fontSize: l,
|
|
2977
2977
|
progressBarColor: d.filterSettings?.filterStyle?.progressBarColor,
|
|
2978
2978
|
responsive: d?.filterSettings?.responsive
|
|
2979
2979
|
}),
|
|
2980
|
-
children:
|
|
2980
|
+
children: v.map(([t, n]) => k(n, i + 1, [...a, t], [...u, e]))
|
|
2981
2981
|
}, m);
|
|
2982
2982
|
};
|
|
2983
|
-
return /* @__PURE__ */ (0, q.jsx)(
|
|
2983
|
+
return /* @__PURE__ */ (0, q.jsx)(Br, {
|
|
2984
2984
|
"aria-label": "Filter values",
|
|
2985
2985
|
itemChildrenIndentation: 0,
|
|
2986
2986
|
slots: {
|
|
2987
|
-
collapseIcon: () => /* @__PURE__ */ (0, q.jsx)(
|
|
2987
|
+
collapseIcon: () => /* @__PURE__ */ (0, q.jsx)(C, {
|
|
2988
2988
|
size: l,
|
|
2989
2989
|
fill: u,
|
|
2990
2990
|
"data-testid": "collapse-icon"
|
|
2991
2991
|
}),
|
|
2992
|
-
expandIcon: () => /* @__PURE__ */ (0, q.jsx)(
|
|
2992
|
+
expandIcon: () => /* @__PURE__ */ (0, q.jsx)(v, {
|
|
2993
2993
|
size: l,
|
|
2994
2994
|
fill: u,
|
|
2995
2995
|
"data-testid": "expand-icon"
|
|
2996
2996
|
})
|
|
2997
2997
|
},
|
|
2998
|
-
sx:
|
|
2998
|
+
sx: mi(c, d?.filterSettings?.responsive),
|
|
2999
2999
|
expandedItems: m,
|
|
3000
3000
|
selectedItems: null,
|
|
3001
3001
|
onExpandedItemsChange: w,
|
|
3002
|
-
children:
|
|
3002
|
+
children: hi(x, 0, E).map(([e, t]) => k(t, 0, [e], []))
|
|
3003
3003
|
});
|
|
3004
|
-
},
|
|
3005
|
-
borderBottom: `1px solid ${
|
|
3004
|
+
}, _i = {
|
|
3005
|
+
borderBottom: `1px solid ${a.grey5}`,
|
|
3006
3006
|
margin: "0 12px",
|
|
3007
3007
|
width: "calc(100% - 24px)"
|
|
3008
|
-
},
|
|
3008
|
+
}, vi = {
|
|
3009
3009
|
flexGrow: 1,
|
|
3010
3010
|
borderRadius: 0,
|
|
3011
3011
|
height: 28,
|
|
3012
3012
|
boxShadow: "0 3px 6px rgba(0, 0, 0, 0.2)",
|
|
3013
3013
|
clipPath: "inset(0 0 -10px 0)",
|
|
3014
3014
|
transform: "translateY(-3px)"
|
|
3015
|
-
},
|
|
3015
|
+
}, yi = {
|
|
3016
3016
|
position: "absolute",
|
|
3017
3017
|
inset: 0,
|
|
3018
3018
|
display: "flex",
|
|
@@ -3020,53 +3020,51 @@ var Zr = V("input", {
|
|
|
3020
3020
|
alignItems: "flex-end",
|
|
3021
3021
|
pointerEvents: "auto",
|
|
3022
3022
|
zIndex: 2
|
|
3023
|
-
},
|
|
3024
|
-
let v =
|
|
3023
|
+
}, bi = ({ vSpec: e, vTheme: t, filterValues: n, isPreview: u = !1, loadMoreData: d, searchTerm: f, setSearchTerm: m, allValuesLoaded: h, isSearching: g = !1, isApplyingFilters: _ = !1 }) => {
|
|
3024
|
+
let v = t ?? r, y = re(), [b, S] = (0, K.useState)(f), C = !!e.filterSettings?.defaultNotState, w = e.filterSettings?.selectionMode ?? l.selectionMode, [T, E] = (0, K.useState)(C), [D, O] = he(e), k = (0, K.useMemo)(() => (0, Tt.default)((e) => m(e), 300), [m]), j = n.reduce((e, t) => (t.disabled || e.push(t.dimension), e), []), M = e.dimensions.filter((e) => e.role === i.FILTER_DIMENSION), N = M[0] ?? e.dimensions[0], P = M.length > 1, F = u ? [] : M.length > 0 ? M.map((e, t) => ({
|
|
3025
3025
|
dataItem: e.dataItem,
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
values: o.map((e) => e.dimensionValues ? e.dimensionValues[t] : [e.dimension, e.childDimension][t]).filter((e) => e !== void 0)
|
|
3026
|
+
...p(e.dataItem, e),
|
|
3027
|
+
values: n.map((e) => e.dimensionValues ? e.dimensionValues[t] : [e.dimension, e.childDimension][t]).filter((e) => e !== void 0)
|
|
3029
3028
|
})) : [{
|
|
3030
3029
|
dataItem: N?.dataItem,
|
|
3031
|
-
|
|
3032
|
-
datePart: N?.datePart ?? void 0,
|
|
3030
|
+
...p(N?.dataItem, N),
|
|
3033
3031
|
values: j
|
|
3034
|
-
}], { hasImage:
|
|
3035
|
-
...
|
|
3036
|
-
..."backgroundColor" in
|
|
3037
|
-
},
|
|
3038
|
-
...
|
|
3039
|
-
"--background-color":
|
|
3040
|
-
})["--background-color-hover"] ??
|
|
3041
|
-
disabled:
|
|
3042
|
-
state:
|
|
3043
|
-
defaultOperator:
|
|
3044
|
-
commitHistory:
|
|
3045
|
-
}), { onClear:
|
|
3032
|
+
}], { hasImage: ne, hasMeasure: ie, searchEnabled: L, quickSelection: ae } = wt(e), R = e.filterSettings?.filterStyle, { backgroundColor: oe, ...z } = R ?? {}, le = R && {
|
|
3033
|
+
...z,
|
|
3034
|
+
..."backgroundColor" in R ? { backgroundColor: oe ?? void 0 } : {}
|
|
3035
|
+
}, ue = e.filterSettings?.filterStyle?.backgroundColor ?? o.backgroundColor, fe = e.filterSettings?.fontStyle?.fontSize ?? o.fontSize, ge = s(v, e.filterSettings?.fontStyle?.fontColor), _e = ce({
|
|
3036
|
+
...se,
|
|
3037
|
+
"--background-color": ue
|
|
3038
|
+
})["--background-color-hover"] ?? a.grey3, be = A(F, {
|
|
3039
|
+
disabled: u,
|
|
3040
|
+
state: ae ? J.SelectionState.APPLIED : void 0,
|
|
3041
|
+
defaultOperator: T ? J.FilterOperator.NotInList : J.FilterOperator.InList,
|
|
3042
|
+
commitHistory: ae
|
|
3043
|
+
}), { onClear: we, onClick: Te, onDeselectAll: Ee, onSelectExcluded: De, onNotOperatorChange: Oe, onSelectAll: B, field: V, state: H, operators: ke } = be[0] ?? I, { isFieldLocked: Ae = !1, toggleFieldLock: je } = te(V ?? void 0), Me = H.pending ?? H.applied ?? [], Ne = ee(V ? [V] : []);
|
|
3046
3044
|
(0, K.useEffect)(() => {
|
|
3047
|
-
let e =
|
|
3045
|
+
let e = ke.pending ?? ke.applied;
|
|
3048
3046
|
if (e) {
|
|
3049
|
-
|
|
3047
|
+
E(e === J.FilterOperator.NotInList);
|
|
3050
3048
|
return;
|
|
3051
3049
|
}
|
|
3052
|
-
|
|
3053
|
-
}, [
|
|
3054
|
-
let
|
|
3055
|
-
|
|
3056
|
-
}, [
|
|
3057
|
-
function
|
|
3058
|
-
|
|
3050
|
+
E(C);
|
|
3051
|
+
}, [C, ke]);
|
|
3052
|
+
let Pe = (0, K.useCallback)(() => {
|
|
3053
|
+
E((e) => !e), Oe();
|
|
3054
|
+
}, [E, Oe]);
|
|
3055
|
+
function Fe() {
|
|
3056
|
+
h ? B() : y.daedalus.emitEvent(J.AstratoEvents.SHOW_GLOBAL_NOTIFICATION, {
|
|
3059
3057
|
type: "warn",
|
|
3060
3058
|
message: "Cannot select values, because not all of them are loaded!"
|
|
3061
3059
|
});
|
|
3062
3060
|
}
|
|
3063
|
-
let
|
|
3061
|
+
let Ie = Ae || _ && !P || g, U = (0, K.useRef)(null);
|
|
3064
3062
|
(0, K.useEffect)(() => {
|
|
3065
|
-
U.current?.toggleAttribute("inert",
|
|
3066
|
-
}, [
|
|
3067
|
-
let
|
|
3068
|
-
|
|
3069
|
-
|
|
3063
|
+
U.current?.toggleAttribute("inert", Ie);
|
|
3064
|
+
}, [Ie]);
|
|
3065
|
+
let Le = (0, K.useMemo)(() => Ae ? n.filter((e) => (H.pending ?? H.applied ?? []).includes(e.dimension)) : n, [
|
|
3066
|
+
n,
|
|
3067
|
+
Ae,
|
|
3070
3068
|
H.pending,
|
|
3071
3069
|
H.applied
|
|
3072
3070
|
]);
|
|
@@ -3075,104 +3073,104 @@ var Zr = V("input", {
|
|
|
3075
3073
|
position: "relative",
|
|
3076
3074
|
height: "100%"
|
|
3077
3075
|
},
|
|
3078
|
-
children: /* @__PURE__ */ (0, q.jsx)(
|
|
3076
|
+
children: /* @__PURE__ */ (0, q.jsx)(Ce, {
|
|
3079
3077
|
blurBackground: !0,
|
|
3080
|
-
filterStyle:
|
|
3081
|
-
fontSize: e.filterSettings?.fontStyle?.fontSize ??
|
|
3082
|
-
children: /* @__PURE__ */ (0, q.jsxs)(
|
|
3083
|
-
value:
|
|
3084
|
-
appliedOperator:
|
|
3085
|
-
pendingOperator:
|
|
3078
|
+
filterStyle: le,
|
|
3079
|
+
fontSize: e.filterSettings?.fontStyle?.fontSize ?? o.fontSize,
|
|
3080
|
+
children: /* @__PURE__ */ (0, q.jsxs)(me.Provider, {
|
|
3081
|
+
value: c({
|
|
3082
|
+
appliedOperator: ke.applied,
|
|
3083
|
+
pendingOperator: ke.pending
|
|
3086
3084
|
}),
|
|
3087
3085
|
children: [
|
|
3088
|
-
/* @__PURE__ */ (0, q.jsx)(
|
|
3089
|
-
measureTitle:
|
|
3090
|
-
dimensionTitle:
|
|
3091
|
-
searchEnabled:
|
|
3086
|
+
/* @__PURE__ */ (0, q.jsx)(xe, {
|
|
3087
|
+
measureTitle: O ?? "",
|
|
3088
|
+
dimensionTitle: D,
|
|
3089
|
+
searchEnabled: L && !u,
|
|
3092
3090
|
searchTerm: b,
|
|
3093
3091
|
onSearchChange: (e) => {
|
|
3094
|
-
|
|
3092
|
+
S(e), k(e);
|
|
3095
3093
|
},
|
|
3096
|
-
onApplySearched:
|
|
3094
|
+
onApplySearched: Fe,
|
|
3097
3095
|
fontStyle: e.filterSettings?.fontStyle ?? {},
|
|
3098
3096
|
vTheme: v,
|
|
3099
|
-
isNotEnabled:
|
|
3097
|
+
isNotEnabled: T,
|
|
3100
3098
|
responsive: e?.filterSettings?.responsive,
|
|
3101
|
-
isLocked:
|
|
3102
|
-
children:
|
|
3103
|
-
isPreview:
|
|
3099
|
+
isLocked: Ae,
|
|
3100
|
+
children: ae ? null : /* @__PURE__ */ (0, q.jsx)(Dt, {
|
|
3101
|
+
isPreview: u,
|
|
3104
3102
|
responsive: e?.filterSettings?.responsive,
|
|
3105
|
-
areSelectedValues:
|
|
3103
|
+
areSelectedValues: Me.length > 0,
|
|
3106
3104
|
arePendingValues: !!H.pending,
|
|
3107
|
-
onClear:
|
|
3108
|
-
onDeselectAll:
|
|
3109
|
-
onSelectExcluded:
|
|
3110
|
-
onSelectAll:
|
|
3111
|
-
toggleNotOperator:
|
|
3112
|
-
onLockClick:
|
|
3113
|
-
isNotEnabled:
|
|
3114
|
-
isSingleSelectField:
|
|
3105
|
+
onClear: we,
|
|
3106
|
+
onDeselectAll: Ee,
|
|
3107
|
+
onSelectExcluded: De,
|
|
3108
|
+
onSelectAll: B,
|
|
3109
|
+
toggleNotOperator: Pe,
|
|
3110
|
+
onLockClick: je,
|
|
3111
|
+
isNotEnabled: T,
|
|
3112
|
+
isSingleSelectField: Ne
|
|
3115
3113
|
})
|
|
3116
3114
|
}),
|
|
3117
|
-
g ? /* @__PURE__ */ (0, q.jsx)(
|
|
3115
|
+
g ? /* @__PURE__ */ (0, q.jsx)(de, { loading: !0 }) : /* @__PURE__ */ (0, q.jsx)("div", { style: _i }),
|
|
3118
3116
|
/* @__PURE__ */ (0, q.jsx)("div", {
|
|
3119
3117
|
ref: U,
|
|
3120
3118
|
style: {
|
|
3121
3119
|
height: "100%",
|
|
3122
|
-
opacity:
|
|
3123
|
-
pointerEvents:
|
|
3120
|
+
opacity: Ie ? .5 : 1,
|
|
3121
|
+
pointerEvents: Ie ? "none" : void 0,
|
|
3124
3122
|
transition: "opacity 0.15s ease"
|
|
3125
3123
|
},
|
|
3126
|
-
children: /* @__PURE__ */ (0, q.jsxs)(
|
|
3127
|
-
loadMoreData:
|
|
3124
|
+
children: /* @__PURE__ */ (0, q.jsxs)(ye, {
|
|
3125
|
+
loadMoreData: d,
|
|
3128
3126
|
responsive: e?.filterSettings?.responsive,
|
|
3129
|
-
children: [
|
|
3127
|
+
children: [h && Le.length === 0 && !g && !_ ? /* @__PURE__ */ (0, q.jsx)(pe, {
|
|
3130
3128
|
responsive: e?.filterSettings?.responsive,
|
|
3131
3129
|
applied: !1,
|
|
3132
3130
|
disabled: !1,
|
|
3133
3131
|
selected: !1,
|
|
3134
|
-
hoverColor:
|
|
3132
|
+
hoverColor: _e,
|
|
3135
3133
|
fontStyle: e.filterSettings?.fontStyle,
|
|
3136
3134
|
dimensionValue: "No results to display."
|
|
3137
|
-
}) : null, P ? /* @__PURE__ */ (0, q.jsx)(
|
|
3138
|
-
filterValues:
|
|
3135
|
+
}) : null, P ? /* @__PURE__ */ (0, q.jsx)(gi, {
|
|
3136
|
+
filterValues: Le,
|
|
3139
3137
|
filterDimensionsCount: M.length,
|
|
3140
|
-
searchTerm:
|
|
3138
|
+
searchTerm: f,
|
|
3141
3139
|
isLoading: g || _,
|
|
3142
|
-
isPreview:
|
|
3143
|
-
isFieldLocked:
|
|
3144
|
-
hoverColor:
|
|
3145
|
-
filterFontSize:
|
|
3146
|
-
filterFontColor:
|
|
3140
|
+
isPreview: u,
|
|
3141
|
+
isFieldLocked: Ae,
|
|
3142
|
+
hoverColor: _e,
|
|
3143
|
+
filterFontSize: fe,
|
|
3144
|
+
filterFontColor: ge,
|
|
3147
3145
|
vSpec: e,
|
|
3148
|
-
dimensionSelectionMethods:
|
|
3149
|
-
selectionMode:
|
|
3150
|
-
}) :
|
|
3146
|
+
dimensionSelectionMethods: be,
|
|
3147
|
+
selectionMode: w
|
|
3148
|
+
}) : ne || ie ? /* @__PURE__ */ (0, q.jsx)(ve, {
|
|
3151
3149
|
vSpec: e,
|
|
3152
|
-
filterValues:
|
|
3153
|
-
hoverColor:
|
|
3154
|
-
onItemClick:
|
|
3155
|
-
selectedValues:
|
|
3150
|
+
filterValues: Le,
|
|
3151
|
+
hoverColor: _e,
|
|
3152
|
+
onItemClick: Te,
|
|
3153
|
+
selectedValues: Me,
|
|
3156
3154
|
appliedValues: H.applied ?? [],
|
|
3157
|
-
searchTerm:
|
|
3158
|
-
}) : /* @__PURE__ */ (0, q.jsx)(
|
|
3155
|
+
searchTerm: f
|
|
3156
|
+
}) : /* @__PURE__ */ (0, q.jsx)(Se, {
|
|
3159
3157
|
vSpec: e,
|
|
3160
|
-
filterValues:
|
|
3161
|
-
hoverColor:
|
|
3162
|
-
onItemClick:
|
|
3163
|
-
selectedValues:
|
|
3158
|
+
filterValues: Le,
|
|
3159
|
+
hoverColor: _e,
|
|
3160
|
+
onItemClick: Te,
|
|
3161
|
+
selectedValues: Me,
|
|
3164
3162
|
appliedValues: H.applied ?? [],
|
|
3165
|
-
searchTerm:
|
|
3163
|
+
searchTerm: f
|
|
3166
3164
|
})]
|
|
3167
3165
|
})
|
|
3168
3166
|
}),
|
|
3169
|
-
|
|
3170
|
-
style:
|
|
3171
|
-
children: /* @__PURE__ */ (0, q.jsx)(
|
|
3167
|
+
Ae && /* @__PURE__ */ (0, q.jsx)("div", {
|
|
3168
|
+
style: yi,
|
|
3169
|
+
children: /* @__PURE__ */ (0, q.jsx)(Je, {
|
|
3172
3170
|
color: "secondary",
|
|
3173
|
-
style:
|
|
3174
|
-
onClick: () =>
|
|
3175
|
-
children: /* @__PURE__ */ (0, q.jsxs)(q.Fragment, { children: [/* @__PURE__ */ (0, q.jsx)(
|
|
3171
|
+
style: vi,
|
|
3172
|
+
onClick: () => je(),
|
|
3173
|
+
children: /* @__PURE__ */ (0, q.jsxs)(q.Fragment, { children: [/* @__PURE__ */ (0, q.jsx)(x, { fill: "white" }), "Unlock"] })
|
|
3176
3174
|
})
|
|
3177
3175
|
})
|
|
3178
3176
|
]
|
|
@@ -3180,17 +3178,17 @@ var Zr = V("input", {
|
|
|
3180
3178
|
})
|
|
3181
3179
|
});
|
|
3182
3180
|
};
|
|
3183
|
-
function
|
|
3184
|
-
let { quickSelection: t, isPreview: n, areSelectedValues: r, state: i, responsive: a, isSingleSelectField: o = !1, onClear: s, onDeselectAll: c, onSelectAll: l, onSelectExcluded: u, onNotOperatorChange: d, onLockClick: f } = e, [p, m] = (0, K.useState)(!1),
|
|
3181
|
+
function xi(e) {
|
|
3182
|
+
let { quickSelection: t, isPreview: n, areSelectedValues: r, state: i, responsive: a, isSingleSelectField: o = !1, onClear: s, onDeselectAll: c, onSelectAll: l, onSelectExcluded: u, onNotOperatorChange: d, onLockClick: f } = e, [p, m] = (0, K.useState)(!1), g = Et({ responsive: a }), { appliedOperator: _, pendingOperator: v } = (0, K.useContext)(me), y = _ ?? v ?? J.FilterOperator.InList, b = re().daedalus.getWorkbookProperties()?.isLockUnlockFieldsEnabled ?? !1;
|
|
3185
3183
|
if (t) return null;
|
|
3186
|
-
let
|
|
3184
|
+
let x = [{
|
|
3187
3185
|
disabled: n || !i.pending,
|
|
3188
3186
|
key: "clear",
|
|
3189
3187
|
label: "Clear",
|
|
3190
3188
|
type: "option",
|
|
3191
3189
|
onClick: s
|
|
3192
3190
|
}];
|
|
3193
|
-
return o ||
|
|
3191
|
+
return o || x.push({
|
|
3194
3192
|
key: "divider",
|
|
3195
3193
|
type: "divider"
|
|
3196
3194
|
}, {
|
|
@@ -3202,7 +3200,7 @@ function bi(e) {
|
|
|
3202
3200
|
}, {
|
|
3203
3201
|
disabled: n,
|
|
3204
3202
|
key: "select-all",
|
|
3205
|
-
label:
|
|
3203
|
+
label: y === J.FilterOperator.InList ? "Select all" : "Exclude all",
|
|
3206
3204
|
type: "option",
|
|
3207
3205
|
onClick: l
|
|
3208
3206
|
}, {
|
|
@@ -3217,39 +3215,39 @@ function bi(e) {
|
|
|
3217
3215
|
label: "Exclude",
|
|
3218
3216
|
type: "option",
|
|
3219
3217
|
onClick: d
|
|
3220
|
-
}),
|
|
3218
|
+
}), b && x.push({
|
|
3221
3219
|
key: "divider",
|
|
3222
3220
|
type: "divider"
|
|
3223
3221
|
}, {
|
|
3224
3222
|
key: "lock",
|
|
3225
3223
|
label: "Lock",
|
|
3226
3224
|
type: "option",
|
|
3227
|
-
icon: { right: /* @__PURE__ */ (0, q.jsx)(
|
|
3225
|
+
icon: { right: /* @__PURE__ */ (0, q.jsx)(D, {}) },
|
|
3228
3226
|
onClick: f
|
|
3229
|
-
}), /* @__PURE__ */ (0, q.jsx)(
|
|
3227
|
+
}), /* @__PURE__ */ (0, q.jsx)(Be, {
|
|
3230
3228
|
open: p,
|
|
3231
3229
|
placement: "bottom-end",
|
|
3232
|
-
title: /* @__PURE__ */ (0, q.jsx)(
|
|
3230
|
+
title: /* @__PURE__ */ (0, q.jsx)(L, {
|
|
3233
3231
|
onClickAway: () => m(!1),
|
|
3234
|
-
children: /* @__PURE__ */ (0, q.jsx)(
|
|
3232
|
+
children: /* @__PURE__ */ (0, q.jsx)(oe, {
|
|
3235
3233
|
appearance: "legacy",
|
|
3236
3234
|
onClose: () => m(!1),
|
|
3237
|
-
options:
|
|
3235
|
+
options: x,
|
|
3238
3236
|
responsive: a,
|
|
3239
3237
|
style: { margin: "-8px -12px" }
|
|
3240
3238
|
})
|
|
3241
3239
|
}),
|
|
3242
|
-
children: /* @__PURE__ */ (0, q.jsx)(
|
|
3240
|
+
children: /* @__PURE__ */ (0, q.jsx)(z, {
|
|
3243
3241
|
onClick: () => m(!p),
|
|
3244
|
-
className:
|
|
3245
|
-
children: /* @__PURE__ */ (0, q.jsx)(
|
|
3242
|
+
className: g.menuTrigger,
|
|
3243
|
+
children: /* @__PURE__ */ (0, q.jsx)(h, {
|
|
3246
3244
|
fill: "currentColor",
|
|
3247
3245
|
size: 20
|
|
3248
3246
|
})
|
|
3249
3247
|
})
|
|
3250
3248
|
});
|
|
3251
3249
|
}
|
|
3252
|
-
var
|
|
3250
|
+
var Si = _({
|
|
3253
3251
|
searchWrapper: (e) => ({
|
|
3254
3252
|
alignItems: "center",
|
|
3255
3253
|
display: "flex",
|
|
@@ -3272,8 +3270,8 @@ var xi = C({
|
|
|
3272
3270
|
margin: 0,
|
|
3273
3271
|
backgroundColor: "transparent"
|
|
3274
3272
|
},
|
|
3275
|
-
...
|
|
3276
|
-
...
|
|
3273
|
+
...wi("bottom", e),
|
|
3274
|
+
...wi("top", e)
|
|
3277
3275
|
}),
|
|
3278
3276
|
unlockButtonStyles: {
|
|
3279
3277
|
width: "100%",
|
|
@@ -3283,108 +3281,108 @@ var xi = C({
|
|
|
3283
3281
|
transform: "translateY(-3px)"
|
|
3284
3282
|
}
|
|
3285
3283
|
});
|
|
3286
|
-
function
|
|
3287
|
-
let { children:
|
|
3284
|
+
function Ci(e) {
|
|
3285
|
+
let { children: t, isOpen: n, setIsOpen: r, isPreview: i, vSpec: s, vTheme: c, onSearchChange: l, setLocalSearch: u, allValuesLoaded: d, onSelectAll: f, localSearch: p, searchTerm: m, loadMoreData: h, headerElement: g, filterValues: _, hierarchicalMode: v, filterDimensionsCount: y, dimensionSelectionMethods: b, selectionMode: S, onNotOperatorChange: C, onClick: w, onDeselectAll: T, onClear: E, onSelectExcluded: D, state: O, onLockClick: k, isLocked: A, isSingleSelectField: j = !1, isSearching: M = !1, isApplyingFilters: N = !1 } = e, P = re(), F = Si(s?.filterSettings?.responsive), I = N || M, ee = (0, K.useRef)(null);
|
|
3288
3286
|
(0, K.useEffect)(() => {
|
|
3289
|
-
|
|
3290
|
-
}, [
|
|
3291
|
-
let { quickSelection:
|
|
3292
|
-
if (
|
|
3293
|
-
let { backgroundColor: e, ...t } =
|
|
3294
|
-
|
|
3287
|
+
ee.current?.toggleAttribute("inert", I);
|
|
3288
|
+
}, [I]);
|
|
3289
|
+
let { quickSelection: te, hasMeasure: ne, hasImage: ie, searchEnabled: ae } = wt(s), R = O.pending ?? O.applied ?? [], oe = s.filterSettings?.filterStyle, z;
|
|
3290
|
+
if (oe) {
|
|
3291
|
+
let { backgroundColor: e, ...t } = oe;
|
|
3292
|
+
z = {
|
|
3295
3293
|
...t,
|
|
3296
|
-
..."backgroundColor" in
|
|
3294
|
+
..."backgroundColor" in oe ? { backgroundColor: e ?? void 0 } : {}
|
|
3297
3295
|
};
|
|
3298
3296
|
}
|
|
3299
|
-
let ue = s.filterSettings?.filterStyle?.borderRadius ??
|
|
3300
|
-
...
|
|
3301
|
-
"--background-color":
|
|
3302
|
-
})["--background-color-hover"] ??
|
|
3303
|
-
function
|
|
3297
|
+
let ue = s.filterSettings?.filterStyle?.borderRadius ?? o.borderRadius, fe = s.filterSettings?.fontStyle?.fontColor ?? c?.fonts?.general?.color ?? a.mainDarkNavy, me = s.filterSettings?.filterStyle?.backgroundColor ?? o.backgroundColor, he = ce({
|
|
3298
|
+
...se,
|
|
3299
|
+
"--background-color": me
|
|
3300
|
+
})["--background-color-hover"] ?? a.grey3;
|
|
3301
|
+
function _e(e) {
|
|
3304
3302
|
switch (e.key) {
|
|
3305
3303
|
case "Enter":
|
|
3306
|
-
d ? f() :
|
|
3304
|
+
d ? f() : P.daedalus.emitEvent(J.AstratoEvents.SHOW_GLOBAL_NOTIFICATION, {
|
|
3307
3305
|
type: "warn",
|
|
3308
3306
|
message: "Cannot select values, because not all of them are loaded!"
|
|
3309
3307
|
});
|
|
3310
3308
|
break;
|
|
3311
3309
|
case "Escape":
|
|
3312
|
-
|
|
3310
|
+
v ? l("") : u("");
|
|
3313
3311
|
break;
|
|
3314
3312
|
}
|
|
3315
3313
|
}
|
|
3316
|
-
return /* @__PURE__ */ (0, q.jsx)(
|
|
3314
|
+
return /* @__PURE__ */ (0, q.jsx)(Be, {
|
|
3317
3315
|
placement: "bottom-start",
|
|
3318
3316
|
arrow: !1,
|
|
3319
|
-
open:
|
|
3320
|
-
classes: { popper:
|
|
3321
|
-
slotProps: { popper: { anchorEl:
|
|
3322
|
-
title: /* @__PURE__ */ (0, q.jsx)(
|
|
3323
|
-
onClickAway: () =>
|
|
3317
|
+
open: n,
|
|
3318
|
+
classes: { popper: F.tooltip },
|
|
3319
|
+
slotProps: { popper: { anchorEl: g?.current?.firstElementChild } },
|
|
3320
|
+
title: /* @__PURE__ */ (0, q.jsx)(L, {
|
|
3321
|
+
onClickAway: () => r(!1),
|
|
3324
3322
|
children: /* @__PURE__ */ (0, q.jsx)("div", {
|
|
3325
3323
|
style: {
|
|
3326
|
-
minWidth:
|
|
3324
|
+
minWidth: g.current?.clientWidth,
|
|
3327
3325
|
maxWidth: "80vw",
|
|
3328
|
-
fontSize: s.filterSettings?.fontStyle?.fontSize ??
|
|
3326
|
+
fontSize: s.filterSettings?.fontStyle?.fontSize ?? o.fontSize
|
|
3329
3327
|
},
|
|
3330
|
-
children:
|
|
3328
|
+
children: n && /* @__PURE__ */ (0, q.jsxs)("div", {
|
|
3331
3329
|
style: { position: "relative" },
|
|
3332
3330
|
children: [/* @__PURE__ */ (0, q.jsx)("div", {
|
|
3333
3331
|
style: {
|
|
3334
|
-
filter:
|
|
3335
|
-
pointerEvents:
|
|
3332
|
+
filter: A ? "brightness(0.93)" : void 0,
|
|
3333
|
+
pointerEvents: A ? "none" : void 0
|
|
3336
3334
|
},
|
|
3337
|
-
children: /* @__PURE__ */ (0, q.jsxs)(
|
|
3338
|
-
filterStyle:
|
|
3339
|
-
isLocked:
|
|
3335
|
+
children: /* @__PURE__ */ (0, q.jsxs)(be, {
|
|
3336
|
+
filterStyle: z,
|
|
3337
|
+
isLocked: A,
|
|
3340
3338
|
children: [
|
|
3341
|
-
|
|
3342
|
-
className:
|
|
3339
|
+
ae && !i && /* @__PURE__ */ (0, q.jsxs)("div", {
|
|
3340
|
+
className: F.searchWrapper,
|
|
3343
3341
|
style: { color: fe },
|
|
3344
|
-
children: [/* @__PURE__ */ (0, q.jsx)(
|
|
3345
|
-
className:
|
|
3342
|
+
children: [/* @__PURE__ */ (0, q.jsx)(le, {
|
|
3343
|
+
className: F.searchWrapperSearch,
|
|
3346
3344
|
"data-testid": "filter-search-input",
|
|
3347
3345
|
onChange: (e) => {
|
|
3348
3346
|
l(e.target.value);
|
|
3349
3347
|
},
|
|
3350
|
-
autoFocus: !
|
|
3351
|
-
onPaste:
|
|
3352
|
-
onKeyDown:
|
|
3348
|
+
autoFocus: !A,
|
|
3349
|
+
onPaste: ge(l),
|
|
3350
|
+
onKeyDown: _e,
|
|
3353
3351
|
style: {
|
|
3354
3352
|
color: fe,
|
|
3355
3353
|
borderColor: fe
|
|
3356
3354
|
},
|
|
3357
3355
|
value: p,
|
|
3358
3356
|
responsive: s?.filterSettings?.responsive
|
|
3359
|
-
}), /* @__PURE__ */ (0, q.jsx)(
|
|
3357
|
+
}), /* @__PURE__ */ (0, q.jsx)(xi, {
|
|
3360
3358
|
responsive: s?.filterSettings?.responsive,
|
|
3361
|
-
isPreview:
|
|
3362
|
-
quickSelection:
|
|
3363
|
-
areSelectedValues: !!
|
|
3364
|
-
state:
|
|
3359
|
+
isPreview: i,
|
|
3360
|
+
quickSelection: te,
|
|
3361
|
+
areSelectedValues: !!R.length,
|
|
3362
|
+
state: O,
|
|
3365
3363
|
onClear: E,
|
|
3366
3364
|
onDeselectAll: T,
|
|
3367
3365
|
onSelectAll: f,
|
|
3368
|
-
onSelectExcluded:
|
|
3366
|
+
onSelectExcluded: D,
|
|
3369
3367
|
onNotOperatorChange: C,
|
|
3370
|
-
onLockClick:
|
|
3371
|
-
isSingleSelectField:
|
|
3368
|
+
onLockClick: k,
|
|
3369
|
+
isSingleSelectField: j
|
|
3372
3370
|
})]
|
|
3373
3371
|
}),
|
|
3374
|
-
/* @__PURE__ */ (0, q.jsx)(
|
|
3372
|
+
/* @__PURE__ */ (0, q.jsx)(de, { loading: M }),
|
|
3375
3373
|
/* @__PURE__ */ (0, q.jsx)("div", {
|
|
3376
|
-
ref:
|
|
3374
|
+
ref: ee,
|
|
3377
3375
|
style: {
|
|
3378
|
-
opacity:
|
|
3379
|
-
pointerEvents:
|
|
3376
|
+
opacity: I ? .5 : 1,
|
|
3377
|
+
pointerEvents: I ? "none" : void 0,
|
|
3380
3378
|
transition: "opacity 0.15s ease"
|
|
3381
3379
|
},
|
|
3382
|
-
children: /* @__PURE__ */ (0, q.jsxs)(
|
|
3383
|
-
loadMoreData:
|
|
3380
|
+
children: /* @__PURE__ */ (0, q.jsxs)(ye, {
|
|
3381
|
+
loadMoreData: h,
|
|
3384
3382
|
isDropdown: !0,
|
|
3385
|
-
hasSearch:
|
|
3383
|
+
hasSearch: ae,
|
|
3386
3384
|
responsive: s?.filterSettings?.responsive,
|
|
3387
|
-
children: [d &&
|
|
3385
|
+
children: [d && _.length === 0 && !M && !N ? /* @__PURE__ */ (0, q.jsx)(pe, {
|
|
3388
3386
|
applied: !1,
|
|
3389
3387
|
disabled: !1,
|
|
3390
3388
|
selected: !1,
|
|
@@ -3392,54 +3390,54 @@ function Si(e) {
|
|
|
3392
3390
|
fontStyle: s.filterSettings?.fontStyle,
|
|
3393
3391
|
dimensionValue: "No results to display.",
|
|
3394
3392
|
responsive: s?.filterSettings?.responsive
|
|
3395
|
-
}) : null,
|
|
3396
|
-
filterValues:
|
|
3397
|
-
filterDimensionsCount:
|
|
3393
|
+
}) : null, v ? /* @__PURE__ */ (0, q.jsx)(gi, {
|
|
3394
|
+
filterValues: _,
|
|
3395
|
+
filterDimensionsCount: y,
|
|
3398
3396
|
searchTerm: m,
|
|
3399
|
-
isLoading:
|
|
3400
|
-
isPreview:
|
|
3401
|
-
isFieldLocked:
|
|
3397
|
+
isLoading: M || N,
|
|
3398
|
+
isPreview: i,
|
|
3399
|
+
isFieldLocked: A,
|
|
3402
3400
|
hoverColor: he,
|
|
3403
|
-
filterFontSize: s.filterSettings?.fontStyle?.fontSize ??
|
|
3401
|
+
filterFontSize: s.filterSettings?.fontStyle?.fontSize ?? o.fontSize,
|
|
3404
3402
|
filterFontColor: fe,
|
|
3405
3403
|
vSpec: s,
|
|
3406
|
-
dimensionSelectionMethods:
|
|
3404
|
+
dimensionSelectionMethods: b,
|
|
3407
3405
|
selectionMode: S
|
|
3408
|
-
}) :
|
|
3406
|
+
}) : ie || ne ? /* @__PURE__ */ (0, q.jsx)(ve, {
|
|
3409
3407
|
vSpec: s,
|
|
3410
|
-
filterValues:
|
|
3408
|
+
filterValues: _,
|
|
3411
3409
|
hoverColor: he,
|
|
3412
3410
|
onItemClick: w,
|
|
3413
|
-
selectedValues:
|
|
3414
|
-
appliedValues:
|
|
3411
|
+
selectedValues: R,
|
|
3412
|
+
appliedValues: O.applied ?? [],
|
|
3415
3413
|
searchTerm: m
|
|
3416
|
-
}) : /* @__PURE__ */ (0, q.jsx)(
|
|
3414
|
+
}) : /* @__PURE__ */ (0, q.jsx)(Se, {
|
|
3417
3415
|
vSpec: s,
|
|
3418
|
-
filterValues:
|
|
3416
|
+
filterValues: _,
|
|
3419
3417
|
hoverColor: he,
|
|
3420
3418
|
onItemClick: w,
|
|
3421
|
-
selectedValues:
|
|
3422
|
-
appliedValues:
|
|
3419
|
+
selectedValues: R,
|
|
3420
|
+
appliedValues: O.applied ?? [],
|
|
3423
3421
|
searchTerm: m
|
|
3424
3422
|
})]
|
|
3425
3423
|
})
|
|
3426
3424
|
})
|
|
3427
3425
|
]
|
|
3428
3426
|
})
|
|
3429
|
-
}),
|
|
3427
|
+
}), A && /* @__PURE__ */ (0, q.jsx)(Je, {
|
|
3430
3428
|
color: "secondary",
|
|
3431
3429
|
style: { borderRadius: `0 0 ${ue}px ${ue}px` },
|
|
3432
|
-
className:
|
|
3433
|
-
onClick:
|
|
3434
|
-
children: /* @__PURE__ */ (0, q.jsxs)(q.Fragment, { children: [/* @__PURE__ */ (0, q.jsx)(
|
|
3430
|
+
className: F.unlockButtonStyles,
|
|
3431
|
+
onClick: k,
|
|
3432
|
+
children: /* @__PURE__ */ (0, q.jsxs)(q.Fragment, { children: [/* @__PURE__ */ (0, q.jsx)(x, { fill: "white" }), "Unlock"] })
|
|
3435
3433
|
})]
|
|
3436
3434
|
})
|
|
3437
3435
|
})
|
|
3438
3436
|
}),
|
|
3439
|
-
children:
|
|
3437
|
+
children: t
|
|
3440
3438
|
});
|
|
3441
3439
|
}
|
|
3442
|
-
function
|
|
3440
|
+
function wi(e, t) {
|
|
3443
3441
|
let n = e === "top" ? "marginBottom" : "marginTop";
|
|
3444
3442
|
return { [`&[data-popper-placement*="${e}"]`]: { "& .MuiTooltip-tooltip": {
|
|
3445
3443
|
[n]: 8,
|
|
@@ -3450,100 +3448,98 @@ function Ci(e, t) {
|
|
|
3450
3448
|
}
|
|
3451
3449
|
} } };
|
|
3452
3450
|
}
|
|
3453
|
-
var
|
|
3451
|
+
var Ti = {
|
|
3454
3452
|
backgroundColor: "transparent",
|
|
3455
3453
|
borderEnabled: !1
|
|
3456
|
-
},
|
|
3457
|
-
let
|
|
3458
|
-
if (
|
|
3459
|
-
let { backgroundColor: e, ...t } =
|
|
3460
|
-
|
|
3454
|
+
}, Ei = ({ vSpec: e, filterValues: t, isPreview: n = !1, vTheme: r, loadMoreData: a, searchTerm: s, setSearchTerm: u, allValuesLoaded: d, isSearching: f = !1, isApplyingFilters: m = !1 }) => {
|
|
3455
|
+
let h = (0, K.useRef)(null), [g, _] = (0, K.useState)(!1), [v, y] = (0, K.useState)(s), b = e.dimensions[0]?.formatter, x = e.dimensions.filter((e) => e.role === i.FILTER_DIMENSION), S = x.length > 1, C = t.map((e) => e.dimension), [w, T] = he(e), { quickSelection: E } = wt(e), D = e.filterSettings?.filterStyle, O;
|
|
3456
|
+
if (D) {
|
|
3457
|
+
let { backgroundColor: e, ...t } = D;
|
|
3458
|
+
O = {
|
|
3461
3459
|
...t,
|
|
3462
|
-
..."backgroundColor" in
|
|
3460
|
+
..."backgroundColor" in D ? { backgroundColor: e ?? void 0 } : {}
|
|
3463
3461
|
};
|
|
3464
3462
|
}
|
|
3465
|
-
let k = e.filterSettings?.defaultNotState ? J.FilterOperator.NotInList : J.FilterOperator.InList,
|
|
3463
|
+
let k = e.filterSettings?.defaultNotState ? J.FilterOperator.NotInList : J.FilterOperator.InList, j = A(n ? [] : S ? x.map((e, n) => ({
|
|
3466
3464
|
dataItem: e.dataItem,
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
values: r.map((e) => e.dimensionValues ? e.dimensionValues[t] : [e.dimension, e.childDimension][t]).filter((e) => e !== void 0)
|
|
3465
|
+
...p(e.dataItem, e),
|
|
3466
|
+
values: t.map((e) => e.dimensionValues ? e.dimensionValues[n] : [e.dimension, e.childDimension][n]).filter((e) => e !== void 0)
|
|
3470
3467
|
})) : [{
|
|
3471
3468
|
dataItem: e.dimensions[0]?.dataItem,
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
values: S
|
|
3469
|
+
...p(e.dimensions[0]?.dataItem, e.dimensions[0]),
|
|
3470
|
+
values: C
|
|
3475
3471
|
}], {
|
|
3476
|
-
disabled:
|
|
3477
|
-
state:
|
|
3472
|
+
disabled: n,
|
|
3473
|
+
state: E ? J.SelectionState.APPLIED : void 0,
|
|
3478
3474
|
defaultOperator: k,
|
|
3479
|
-
commitHistory:
|
|
3480
|
-
}),
|
|
3481
|
-
|
|
3482
|
-
},
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3475
|
+
commitHistory: E
|
|
3476
|
+
}), M = (0, K.useMemo)(() => (0, Tt.default)((e) => u(e), 300), [u]), { onClear: N, onClick: P, onDeselectAll: F, onSelectExcluded: ne, onSelectAll: re, onNotOperatorChange: ie, state: L, operators: ae, field: R } = j[0] ?? I, oe = L.pending ?? L.applied ?? [], { isFieldLocked: z = !1, toggleFieldLock: se } = te(R ?? void 0), ce = ee(R ? [R] : []), le = (e) => {
|
|
3477
|
+
y(e), M(e);
|
|
3478
|
+
}, ue = (0, K.useMemo)(() => z ? t.filter((e) => (L.pending ?? L.applied ?? []).includes(e.dimension)) : t, [
|
|
3479
|
+
t,
|
|
3480
|
+
z,
|
|
3481
|
+
L.pending,
|
|
3482
|
+
L.applied
|
|
3487
3483
|
]);
|
|
3488
|
-
return /* @__PURE__ */ (0, q.jsx)(
|
|
3484
|
+
return /* @__PURE__ */ (0, q.jsx)(Ce, {
|
|
3489
3485
|
noBorder: !0,
|
|
3490
|
-
filterStyle:
|
|
3491
|
-
fontSize: e.filterSettings?.fontStyle?.fontSize ??
|
|
3492
|
-
children: /* @__PURE__ */ (0, q.jsx)(
|
|
3493
|
-
value:
|
|
3494
|
-
appliedOperator:
|
|
3495
|
-
pendingOperator:
|
|
3486
|
+
filterStyle: Ti,
|
|
3487
|
+
fontSize: e.filterSettings?.fontStyle?.fontSize ?? o.fontSize,
|
|
3488
|
+
children: /* @__PURE__ */ (0, q.jsx)(me.Provider, {
|
|
3489
|
+
value: c({
|
|
3490
|
+
appliedOperator: ae.applied,
|
|
3491
|
+
pendingOperator: ae.pending
|
|
3496
3492
|
}),
|
|
3497
|
-
children: /* @__PURE__ */ (0, q.jsx)(
|
|
3498
|
-
isOpen:
|
|
3499
|
-
isPreview:
|
|
3493
|
+
children: /* @__PURE__ */ (0, q.jsx)(Ci, {
|
|
3494
|
+
isOpen: g,
|
|
3495
|
+
isPreview: n,
|
|
3500
3496
|
vSpec: e,
|
|
3501
|
-
vTheme:
|
|
3502
|
-
allValuesLoaded:
|
|
3503
|
-
localSearch:
|
|
3504
|
-
searchTerm:
|
|
3505
|
-
headerElement:
|
|
3506
|
-
setIsOpen:
|
|
3507
|
-
onSearchChange:
|
|
3508
|
-
setLocalSearch:
|
|
3509
|
-
loadMoreData:
|
|
3510
|
-
filterValues:
|
|
3511
|
-
hierarchicalMode:
|
|
3512
|
-
filterDimensionsCount:
|
|
3513
|
-
dimensionSelectionMethods:
|
|
3514
|
-
selectionMode: e.filterSettings?.selectionMode ??
|
|
3515
|
-
onNotOperatorChange:
|
|
3516
|
-
onClick:
|
|
3517
|
-
onDeselectAll:
|
|
3518
|
-
onSelectAll:
|
|
3519
|
-
onClear:
|
|
3520
|
-
onSelectExcluded:
|
|
3521
|
-
state:
|
|
3522
|
-
onLockClick:
|
|
3523
|
-
isLocked:
|
|
3524
|
-
isSingleSelectField:
|
|
3525
|
-
isSearching:
|
|
3526
|
-
isApplyingFilters:
|
|
3497
|
+
vTheme: r,
|
|
3498
|
+
allValuesLoaded: d,
|
|
3499
|
+
localSearch: v,
|
|
3500
|
+
searchTerm: s,
|
|
3501
|
+
headerElement: h,
|
|
3502
|
+
setIsOpen: _,
|
|
3503
|
+
onSearchChange: le,
|
|
3504
|
+
setLocalSearch: y,
|
|
3505
|
+
loadMoreData: a,
|
|
3506
|
+
filterValues: ue,
|
|
3507
|
+
hierarchicalMode: S,
|
|
3508
|
+
filterDimensionsCount: x.length,
|
|
3509
|
+
dimensionSelectionMethods: j,
|
|
3510
|
+
selectionMode: e.filterSettings?.selectionMode ?? l.selectionMode,
|
|
3511
|
+
onNotOperatorChange: ie,
|
|
3512
|
+
onClick: P,
|
|
3513
|
+
onDeselectAll: F,
|
|
3514
|
+
onSelectAll: re,
|
|
3515
|
+
onClear: N,
|
|
3516
|
+
onSelectExcluded: ne,
|
|
3517
|
+
state: L,
|
|
3518
|
+
onLockClick: se,
|
|
3519
|
+
isLocked: z,
|
|
3520
|
+
isSingleSelectField: ce,
|
|
3521
|
+
isSearching: f,
|
|
3522
|
+
isApplyingFilters: m,
|
|
3527
3523
|
children: /* @__PURE__ */ (0, q.jsx)("div", {
|
|
3528
|
-
ref:
|
|
3524
|
+
ref: h,
|
|
3529
3525
|
style: { height: "100%" },
|
|
3530
|
-
children: /* @__PURE__ */ (0, q.jsx)(
|
|
3531
|
-
measureTitle:
|
|
3532
|
-
dimensionTitle:
|
|
3533
|
-
isOpen:
|
|
3534
|
-
onToggle: () =>
|
|
3535
|
-
dimensionFormatter:
|
|
3536
|
-
selectedValues:
|
|
3526
|
+
children: /* @__PURE__ */ (0, q.jsx)(_e, {
|
|
3527
|
+
measureTitle: T ?? "",
|
|
3528
|
+
dimensionTitle: w,
|
|
3529
|
+
isOpen: g,
|
|
3530
|
+
onToggle: () => _(!g),
|
|
3531
|
+
dimensionFormatter: b,
|
|
3532
|
+
selectedValues: oe,
|
|
3537
3533
|
fontStyle: e.filterSettings?.fontStyle ?? {},
|
|
3538
|
-
filterStyle:
|
|
3534
|
+
filterStyle: O,
|
|
3539
3535
|
responsive: e?.filterSettings?.responsive,
|
|
3540
|
-
isLocked:
|
|
3536
|
+
isLocked: z
|
|
3541
3537
|
})
|
|
3542
3538
|
})
|
|
3543
3539
|
})
|
|
3544
3540
|
})
|
|
3545
3541
|
});
|
|
3546
|
-
},
|
|
3542
|
+
}, Di = [
|
|
3547
3543
|
{ value: "Value 1" },
|
|
3548
3544
|
{ value: "Value 2" },
|
|
3549
3545
|
{ value: "Value 3" },
|
|
@@ -3555,84 +3551,84 @@ var wi = {
|
|
|
3555
3551
|
{ value: "Value 9" },
|
|
3556
3552
|
{ value: "Value 10" },
|
|
3557
3553
|
{ value: "Value 11" }
|
|
3558
|
-
],
|
|
3559
|
-
let
|
|
3554
|
+
], Oi = ({ vSpec: e, vTheme: n }) => {
|
|
3555
|
+
let r = Di.map((e) => ({ dimension: e.value })), i = {
|
|
3560
3556
|
...e,
|
|
3561
3557
|
dimensions: [{
|
|
3562
3558
|
dataItem: {
|
|
3563
3559
|
internalKey: "filter-preview",
|
|
3564
|
-
uniqueSignature:
|
|
3560
|
+
uniqueSignature: u(),
|
|
3565
3561
|
schema: "excel",
|
|
3566
3562
|
view: "pokemon",
|
|
3567
3563
|
name: "city",
|
|
3568
3564
|
dataType: J.FieldType.STRING,
|
|
3569
|
-
type:
|
|
3565
|
+
type: d.Dimension
|
|
3570
3566
|
},
|
|
3571
3567
|
label: "Dimension"
|
|
3572
3568
|
}],
|
|
3573
3569
|
measures: []
|
|
3574
3570
|
};
|
|
3575
|
-
return e.filterSettings?.mode ===
|
|
3571
|
+
return e.filterSettings?.mode === t.Dropdown ? /* @__PURE__ */ (0, q.jsx)(Ei, {
|
|
3576
3572
|
allValuesLoaded: !0,
|
|
3577
3573
|
vSpec: i,
|
|
3578
|
-
vTheme:
|
|
3579
|
-
filterValues:
|
|
3574
|
+
vTheme: n,
|
|
3575
|
+
filterValues: r,
|
|
3580
3576
|
isPreview: !0,
|
|
3581
3577
|
searchTerm: "",
|
|
3582
3578
|
setSearchTerm: () => null,
|
|
3583
3579
|
loadMoreData: () => void 0
|
|
3584
|
-
}) : /* @__PURE__ */ (0, q.jsx)(
|
|
3580
|
+
}) : /* @__PURE__ */ (0, q.jsx)(bi, {
|
|
3585
3581
|
allValuesLoaded: !0,
|
|
3586
3582
|
vSpec: i,
|
|
3587
|
-
vTheme:
|
|
3588
|
-
filterValues:
|
|
3583
|
+
vTheme: n,
|
|
3584
|
+
filterValues: r,
|
|
3589
3585
|
isPreview: !0,
|
|
3590
3586
|
searchTerm: "",
|
|
3591
3587
|
setSearchTerm: () => null,
|
|
3592
3588
|
loadMoreData: () => void 0
|
|
3593
3589
|
});
|
|
3594
|
-
},
|
|
3595
|
-
let
|
|
3590
|
+
}, ki = b(({ vSpec: e, filterValues: n = [], vTheme: r, loadMoreData: i, searchTerm: a, setSearchTerm: o, allValuesLoaded: s, isSearching: c = !1, isApplyingFilters: l = !1 }) => {
|
|
3591
|
+
let u = M();
|
|
3596
3592
|
if ((0, K.useEffect)(() => {
|
|
3597
|
-
e?.dimensions?.length < 2 &&
|
|
3598
|
-
}, [e]), !e?.dimensions?.length && e?.dimensions !== void 0) return /* @__PURE__ */ (0, q.jsx)(
|
|
3593
|
+
e?.dimensions?.length < 2 && u();
|
|
3594
|
+
}, [e]), !e?.dimensions?.length && e?.dimensions !== void 0) return /* @__PURE__ */ (0, q.jsx)(Oi, {
|
|
3599
3595
|
vSpec: {
|
|
3600
3596
|
...e,
|
|
3601
3597
|
filterSettings: {
|
|
3602
3598
|
...e.filterSettings,
|
|
3603
|
-
mode: e.filterSettings?.mode ??
|
|
3604
|
-
source: e.filterSettings?.source ??
|
|
3599
|
+
mode: e.filterSettings?.mode ?? t.Listbox,
|
|
3600
|
+
source: e.filterSettings?.source ?? f.Engine,
|
|
3605
3601
|
fontStyle: e.filterSettings?.fontStyle ?? {}
|
|
3606
3602
|
}
|
|
3607
3603
|
},
|
|
3608
|
-
vTheme:
|
|
3604
|
+
vTheme: r
|
|
3609
3605
|
});
|
|
3610
3606
|
if (e?.dimensions === void 0 || !e?.filterSettings?.mode || !e?.filterSettings?.source) return null;
|
|
3611
3607
|
switch (e.filterSettings.mode) {
|
|
3612
|
-
case
|
|
3613
|
-
case
|
|
3608
|
+
case t.Image: return null;
|
|
3609
|
+
case t.Dropdown: return /* @__PURE__ */ (0, q.jsx)(Ei, {
|
|
3614
3610
|
allValuesLoaded: s,
|
|
3615
3611
|
vSpec: e,
|
|
3616
|
-
vTheme:
|
|
3617
|
-
filterValues:
|
|
3618
|
-
loadMoreData:
|
|
3619
|
-
searchTerm:
|
|
3620
|
-
setSearchTerm:
|
|
3612
|
+
vTheme: r,
|
|
3613
|
+
filterValues: n,
|
|
3614
|
+
loadMoreData: i,
|
|
3615
|
+
searchTerm: a,
|
|
3616
|
+
setSearchTerm: o,
|
|
3621
3617
|
isSearching: c,
|
|
3622
3618
|
isApplyingFilters: l
|
|
3623
3619
|
});
|
|
3624
|
-
case
|
|
3625
|
-
default: return /* @__PURE__ */ (0, q.jsx)(
|
|
3620
|
+
case t.Listbox:
|
|
3621
|
+
default: return /* @__PURE__ */ (0, q.jsx)(bi, {
|
|
3626
3622
|
allValuesLoaded: s,
|
|
3627
3623
|
vSpec: e,
|
|
3628
|
-
vTheme:
|
|
3629
|
-
filterValues:
|
|
3630
|
-
loadMoreData:
|
|
3631
|
-
searchTerm:
|
|
3632
|
-
setSearchTerm:
|
|
3624
|
+
vTheme: r,
|
|
3625
|
+
filterValues: n,
|
|
3626
|
+
loadMoreData: i,
|
|
3627
|
+
searchTerm: a,
|
|
3628
|
+
setSearchTerm: o,
|
|
3633
3629
|
isSearching: c,
|
|
3634
3630
|
isApplyingFilters: l
|
|
3635
3631
|
});
|
|
3636
3632
|
}
|
|
3637
3633
|
});
|
|
3638
|
-
export {
|
|
3634
|
+
export { ki as Filter };
|