@astrato-io/visualizations 0.6.5 → 0.8.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/README.md +8 -2
- package/THIRD_PARTY_NOTICES.md +2 -229
- package/VISUALIZATION_DEFINITIONS.md +68 -114
- package/chunks/Button-BrGKp9Nm.js +110 -0
- package/chunks/DefaultPropsProvider-BsfB7QTn.js +257 -0
- package/chunks/FieldTypeIcon-Drs6hSJF.js +22 -0
- package/chunks/{LinearProgress-B1FeWaen.js → LinearProgress-VtfFx2vJ.js} +55 -55
- package/chunks/MenuOption-ByRqhRdX.js +3934 -0
- package/chunks/Title-CO5dP1ma.js +1691 -0
- package/chunks/ToggleButton-KOBAimC1.js +112 -0
- package/chunks/{app-filter-bar.compiler-BGJ7HAbr.js → app-filter-bar.compiler-TwVTeoj5.js} +10 -10
- package/chunks/{bar.compiler-CT0ZbQKc.js → bar.compiler-DuQg8EUb.js} +84 -84
- package/chunks/builder-DEDvNq1k.js +201 -0
- package/chunks/{color-settings-ZIvgNTq1.js → color-rules-CN7TcGrC.js} +2 -6
- package/chunks/color-settings-3VRlf_Vw.js +6 -0
- package/chunks/colorManipulator-D8Pjy1pf.js +45 -0
- package/chunks/coloring-CncX_JRX.js +278 -0
- package/chunks/{definitions-D3OVqmXl.js → definitions-BPJQTx16.js} +490 -382
- package/chunks/{escobar-eDjtGpkC.js → escobar-DRhRMYRE.js} +6067 -4742
- package/chunks/event-bus-CrLB-Y8z.js +3 -0
- package/chunks/extend-preset-CUFNpmPe.js +4398 -0
- package/chunks/{filter.compiler-DBsyRBJt.js → filter.compiler-w27dlv0C.js} +12 -12
- package/chunks/{filtering-tqjAyJH5.js → filtering-cc7WqWpg.js} +391 -310
- package/chunks/{handlers-VTBfIZYZ.js → handlers-TOT-7INo.js} +3241 -3442
- package/chunks/icon-picker-styles-CoJmwTRi.js +2246 -0
- package/chunks/isEqual-B8loyPsC.js +12 -0
- package/chunks/label-format-type-weq1XfcX.js +8 -0
- package/chunks/{line.compiler-CzdM5Ld0.js → line.compiler-Ct1WhN2p.js} +27 -27
- package/chunks/logger-DpQtYQnX.js +1163 -0
- package/chunks/lookup-BWllin0q.js +36 -0
- package/chunks/{metadata-BGElBy5Z.js → metadata-WABZrt7Y.js} +1 -1
- package/chunks/{number.compiler-G-R7y16P.js → number.compiler-D8TPly-4.js} +13 -13
- package/chunks/{operations-CTNUX6Sy.js → operations-Dh4v1Ovt.js} +9314 -9283
- package/chunks/{range-CiwTbMig.js → range-Bi-7zT0k.js} +2 -2
- package/chunks/render-wrappers-OEmtaM8g.js +2 -0
- package/chunks/{registry-CsQQzukD.js → requirements-Dvd8jqYF.js} +218 -222
- package/chunks/responsive.styles-DSiOGD7u.js +82 -0
- package/chunks/{shared-CBvcC5YV.js → shared-Bn4N5QcZ.js} +424 -424
- package/chunks/src-77e3mC7i.js +391 -0
- package/chunks/standalone-B55oyW6c.js +689 -0
- package/chunks/{standalone-C3gg736V.js → standalone-BDhPQtzQ.js} +375 -341
- package/chunks/{standalone-BMIbT1b2.js → standalone-BGkmozIb.js} +992 -837
- package/chunks/standalone-BMTCb10X.js +179 -0
- package/chunks/standalone-BXKRE_Se.js +468 -0
- package/chunks/standalone-Bes8srx1.js +354 -0
- package/chunks/standalone-BjZp0QMe.js +2 -0
- package/chunks/{standalone-JuLF-OoH.js → standalone-BlMIwpEe.js} +634 -519
- package/chunks/{standalone-C_rYnZ0N.js → standalone-C8ZAEutO.js} +43 -42
- package/chunks/standalone-C8qAelL4.js +2 -0
- package/chunks/standalone-CJvIXsQE.js +743 -0
- package/chunks/standalone-CLmGb7nn2.js +355 -0
- package/chunks/standalone-CM5XcAN5.js +52327 -0
- package/chunks/standalone-CXNP6-xD.js +420 -0
- package/chunks/{standalone-vzBY6q0I2.js → standalone-D5Q5ngsD.js} +57 -55
- package/chunks/standalone-DLlyRIE6.js +287 -0
- package/chunks/standalone-DMcI1afI.js +396 -0
- package/chunks/{standalone-DC-aUgXC.js → standalone-DN4S1MjT.js} +1111 -1092
- package/chunks/standalone-DT0wKji7.js +6 -0
- package/chunks/standalone-DW6NT205.js +518 -0
- package/chunks/standalone-DYQIQH4c.js +2095 -0
- package/chunks/standalone-D__XCp-h.js +1003 -0
- package/chunks/standalone-XTgSsTAa.js +354 -0
- package/chunks/{standalone-v1oxfU20.js → standalone-XuGksArp.js} +20 -20
- package/chunks/{standalone-0M4HlmDW2.js → standalone-vBnBS2YC.js} +1047 -964
- package/chunks/{standalone-BtSHCp2U2.js → standalone-we5D5MIn.js} +173 -168
- package/chunks/{table.compiler-tb914oj3.js → table.compiler-DMeeHxb6.js} +29 -29
- package/chunks/useFieldName-Cjn9KCVp.js +7 -0
- package/chunks/useSlotProps-DLbQp4lc.js +166 -0
- package/chunks/{utils-Bg7K-t6K.js → utils-vdmi_2PK.js} +6271 -7804
- package/chunks/{view-Bn83C8d9.js → view-BuwQugKb.js} +2717 -3504
- package/chunks/{isEqual-BDxAhUo8.js → visualization-filters-Cc4KU-l-.js} +1887 -1946
- package/chunks/with-html-element-D0uY2zjI.js +7328 -0
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +31 -14
- package/docs/operations/combo.md +1 -1
- package/docs/operations/date-picker.md +3 -3
- package/docs/operations/distribution-gauge.md +13 -13
- package/docs/operations/dot.md +13 -13
- package/docs/operations/filter.md +1 -1
- package/docs/operations/gauge.md +13 -13
- package/docs/operations/heatMap.md +13 -13
- package/docs/operations/histogram.md +1 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +3 -3
- package/docs/operations/line.md +7 -7
- package/docs/operations/number.md +1 -1
- package/docs/operations/pie.md +13 -13
- package/docs/operations/radar.md +7 -7
- package/docs/operations/sankey.md +13 -13
- package/docs/operations/scatter.md +13 -13
- package/docs/operations/shape.md +1 -1
- package/docs/operations/simpleTextObject.md +1 -1
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +18 -1
- package/docs/operations/tree.md +51 -37
- package/docs/operations/treemap.md +63 -49
- package/docs/operations/waterfall.md +1 -1
- package/docs/operations/word-cloud.md +13 -13
- package/getters.js +7 -7
- package/index.js +419 -417
- package/metadata.js +17 -18
- package/operations.js +13 -13
- package/package.json +70 -55
- package/src/definitions/index.d.ts +1 -1
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +53 -30
- package/src/definitions/model/definitions/index.d.ts +1 -1
- package/src/definitions/model/definitions/schema-registry.d.ts +2 -2
- package/src/definitions/model/definitions/schemas/object.schema.d.ts +2 -2
- package/src/definitions/model/definitions/types/compilation.types.d.ts +10 -0
- package/src/definitions/model/definitions/types/index.d.ts +1 -1
- package/src/getters/index.d.ts +1 -1
- package/src/operations/index.d.ts +1 -1
- package/src/types.d.ts +1 -0
- package/chunks/ClickAwayListener-BbeNMAvj.js +0 -52
- package/chunks/builder-B6dWSIdD.js +0 -12289
- package/chunks/coloring-B1XAfg6b.js +0 -664
- package/chunks/events-WZut5Ow6.js +0 -4
- package/chunks/grouping-type-On4s9Thj.js +0 -3
- package/chunks/requirements-DYjZCFyf.js +0 -6
- package/chunks/standalone-0ashe9w1.js +0 -411
- package/chunks/standalone-B7jax8wa.js +0 -339
- package/chunks/standalone-BK0VYU-l.js +0 -463
- package/chunks/standalone-BZV5vOwA.js +0 -6
- package/chunks/standalone-BhDrWj4p.js +0 -1980
- package/chunks/standalone-BvaKdky9.js +0 -344
- package/chunks/standalone-BwtM31-f.js +0 -2
- package/chunks/standalone-CC1VUjO32.js +0 -299
- package/chunks/standalone-CoLrAxRV.js +0 -13198
- package/chunks/standalone-DCtRoTWg.js +0 -675
- package/chunks/standalone-DUDFTBqL.js +0 -833
- package/chunks/standalone-DhZkX9Td.js +0 -2
- package/chunks/standalone-DtLElfuM.js +0 -512
- package/chunks/standalone-G9Q4Uczu.js +0 -726
- package/chunks/standalone-_DeX21JJ.js +0 -383
- package/chunks/standalone-gFhKZh8m.js +0 -179
- package/chunks/standalone-tDNy-SFH.js +0 -281
- package/chunks/ui-DQWtv2iM.js +0 -63551
- package/chunks/useFieldName-BvdcoJRl.js +0 -7
|
@@ -1,66 +1,219 @@
|
|
|
1
1
|
import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
|
|
2
|
+
import { Is as n, Ls as r, Ns as i, Ua as a, qi as o, ws as s } from "./visualization-filters-Cc4KU-l-.js";
|
|
3
|
+
import { An as c, Ei as l, X as u, ai as d, bn as f, ci as p, d as m, g as h, ii as g, jn as _, kn as v, li as y, oi as b, qn as x, ri as S, si as C, ui as w, xi as T } from "./utils-vdmi_2PK.js";
|
|
4
|
+
import { s as E } from "./logger-DpQtYQnX.js";
|
|
5
|
+
import { t as ee } from "./FieldTypeIcon-Drs6hSJF.js";
|
|
6
|
+
import { t as D } from "./typeof-CJDtcySz.js";
|
|
7
|
+
var O = /* @__PURE__ */ e(l()), k = S();
|
|
8
|
+
function te({ label: e }) {
|
|
9
|
+
return /* @__PURE__ */ (0, k.jsxs)("span", {
|
|
10
|
+
className: "astrato-app-filter-bar__loader",
|
|
11
|
+
role: "status",
|
|
12
|
+
children: [/* @__PURE__ */ (0, k.jsx)("span", {
|
|
13
|
+
className: "astrato-app-filter-bar__spinner",
|
|
14
|
+
"aria-hidden": "true"
|
|
15
|
+
}), /* @__PURE__ */ (0, k.jsx)("span", {
|
|
16
|
+
className: "astrato-app-filter-bar__sr-only",
|
|
17
|
+
children: e
|
|
18
|
+
})]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
var A = (0, O.forwardRef)(function({ type: e = "button", className: t = "", ...n }, r) {
|
|
22
|
+
return /* @__PURE__ */ (0, k.jsx)("button", {
|
|
23
|
+
...n,
|
|
24
|
+
type: e,
|
|
25
|
+
className: `astrato-app-filter-bar__button ${t}`,
|
|
26
|
+
ref: r
|
|
27
|
+
});
|
|
28
|
+
}), j = (0, O.forwardRef)(function({ className: e = "", ...t }, n) {
|
|
29
|
+
return /* @__PURE__ */ (0, k.jsx)("input", {
|
|
30
|
+
...t,
|
|
31
|
+
className: `astrato-app-filter-bar__input ${e}`,
|
|
32
|
+
ref: n
|
|
33
|
+
});
|
|
34
|
+
}), M = (0, O.forwardRef)(function({ className: e = "", ...t }, n) {
|
|
35
|
+
return /* @__PURE__ */ (0, k.jsx)("select", {
|
|
36
|
+
...t,
|
|
37
|
+
className: `astrato-app-filter-bar__select ${e}`,
|
|
38
|
+
ref: n
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
(0, O.forwardRef)(function(e, t) {
|
|
42
|
+
return /* @__PURE__ */ (0, k.jsx)(j, {
|
|
43
|
+
...e,
|
|
44
|
+
type: "range",
|
|
45
|
+
ref: t
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
var ne = (0, O.forwardRef)(function(e, t) {
|
|
49
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
50
|
+
className: "astrato-app-filter-bar__search",
|
|
51
|
+
children: [/* @__PURE__ */ (0, k.jsx)(x, { name: "search" }), /* @__PURE__ */ (0, k.jsx)(j, {
|
|
52
|
+
...e,
|
|
53
|
+
type: "search",
|
|
54
|
+
ref: t
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
function N({ actions: e, label: t = "Selection actions", icon: n, align: r = "end", disabled: i = !1 }) {
|
|
59
|
+
let a = (0, O.useRef)(null), o = (0, O.useId)(), s = () => {
|
|
60
|
+
a.current?.removeAttribute("open"), a.current?.querySelector("summary")?.focus();
|
|
61
|
+
};
|
|
62
|
+
return (0, O.useEffect)(() => {
|
|
63
|
+
i && a.current?.removeAttribute("open");
|
|
64
|
+
}, [i]), /* @__PURE__ */ (0, k.jsxs)("details", {
|
|
65
|
+
ref: a,
|
|
66
|
+
className: "astrato-app-filter-bar__menu",
|
|
67
|
+
"data-align": r,
|
|
68
|
+
onToggle: () => {
|
|
69
|
+
a.current?.open && a.current.ownerDocument.activeElement === a.current.querySelector("summary") && (a.current.querySelector("button[aria-checked=\"true\"]:enabled") ?? a.current.querySelector("button:enabled"))?.focus();
|
|
70
|
+
},
|
|
71
|
+
onBlur: (e) => {
|
|
72
|
+
e.currentTarget.contains(e.relatedTarget) || e.currentTarget.removeAttribute("open");
|
|
73
|
+
},
|
|
74
|
+
onKeyDown: (e) => {
|
|
75
|
+
let t = a.current;
|
|
76
|
+
if (!(!t || i)) {
|
|
77
|
+
if (e.key === "Escape" && a.current?.open) e.preventDefault(), e.stopPropagation(), s();
|
|
78
|
+
else if ([
|
|
79
|
+
"ArrowDown",
|
|
80
|
+
"ArrowUp",
|
|
81
|
+
"Home",
|
|
82
|
+
"End"
|
|
83
|
+
].includes(e.key)) {
|
|
84
|
+
e.preventDefault(), e.stopPropagation();
|
|
85
|
+
let n = Array.from(t.querySelectorAll("button:enabled"));
|
|
86
|
+
if (!n.length) return;
|
|
87
|
+
let r = n.indexOf(t.ownerDocument.activeElement), i = t.open;
|
|
88
|
+
t.open = !0, n[e.key === "Home" ? 0 : e.key === "End" || !i && e.key === "ArrowUp" ? n.length - 1 : (r + (e.key === "ArrowUp" ? -1 : 1) + n.length) % n.length]?.focus();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
children: [/* @__PURE__ */ (0, k.jsx)("summary", {
|
|
93
|
+
className: "astrato-app-filter-bar__button",
|
|
94
|
+
"aria-label": t,
|
|
95
|
+
"aria-haspopup": "menu",
|
|
96
|
+
"aria-controls": o,
|
|
97
|
+
"aria-disabled": i || void 0,
|
|
98
|
+
tabIndex: i ? -1 : 0,
|
|
99
|
+
"data-icon-only": n ? "true" : void 0,
|
|
100
|
+
title: t,
|
|
101
|
+
onClick: (e) => {
|
|
102
|
+
i && e.preventDefault();
|
|
103
|
+
},
|
|
104
|
+
children: n ? /* @__PURE__ */ (0, k.jsx)(x, { name: n }) : /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: ["Actions ", /* @__PURE__ */ (0, k.jsx)(x, { name: "chevronDown" })] })
|
|
105
|
+
}), /* @__PURE__ */ (0, k.jsx)("div", {
|
|
106
|
+
className: "astrato-app-filter-bar__menu-items",
|
|
107
|
+
id: o,
|
|
108
|
+
role: "menu",
|
|
109
|
+
"aria-label": t,
|
|
110
|
+
children: e.map(({ label: e, description: t, icon: n, selected: r, disabled: a, onSelect: o }) => /* @__PURE__ */ (0, k.jsxs)(A, {
|
|
111
|
+
role: r === void 0 ? "menuitem" : "menuitemradio",
|
|
112
|
+
"aria-checked": r,
|
|
113
|
+
tabIndex: -1,
|
|
114
|
+
disabled: i || a,
|
|
115
|
+
onClick: () => {
|
|
116
|
+
o(), s();
|
|
117
|
+
},
|
|
118
|
+
children: [
|
|
119
|
+
n && /* @__PURE__ */ (0, k.jsx)(x, { name: n }),
|
|
120
|
+
/* @__PURE__ */ (0, k.jsxs)("span", {
|
|
121
|
+
className: "astrato-app-filter-bar__menu-label",
|
|
122
|
+
children: [/* @__PURE__ */ (0, k.jsx)("span", { children: e }), t && /* @__PURE__ */ (0, k.jsx)("small", { children: t })]
|
|
123
|
+
}),
|
|
124
|
+
r && /* @__PURE__ */ (0, k.jsx)(x, { name: "check" })
|
|
125
|
+
]
|
|
126
|
+
}, e))
|
|
127
|
+
})]
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function P(e) {
|
|
131
|
+
if (e.key !== "Tab" || e.defaultPrevented) return;
|
|
132
|
+
let t = e.currentTarget, n = t.ownerDocument.defaultView, r = Array.from(t.querySelectorAll("button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), a[href], summary:not([aria-disabled=\"true\"]), [tabindex=\"0\"]")).filter((e) => e.tabIndex >= 0 && e.getClientRects().length > 0 && n?.getComputedStyle(e).visibility !== "hidden"), i = r[0], a = r[r.length - 1];
|
|
133
|
+
i ? e.shiftKey && (e.target === i || e.target === t) ? (e.preventDefault(), a.focus()) : !e.shiftKey && (e.target === a || e.target === t) && (e.preventDefault(), i.focus()) : (e.preventDefault(), t.focus());
|
|
134
|
+
}
|
|
135
|
+
function re({ onCloseDialog: e, children: t, ...n }) {
|
|
136
|
+
let r = (0, O.useRef)(null);
|
|
137
|
+
return (0, O.useLayoutEffect)(() => {
|
|
138
|
+
let e = r.current;
|
|
139
|
+
if (!e) return;
|
|
140
|
+
let t = e.getRootNode().activeElement;
|
|
141
|
+
return e.showModal(), () => {
|
|
142
|
+
e.close(), t?.isConnected && t.focus();
|
|
143
|
+
};
|
|
144
|
+
}, []), /* @__PURE__ */ (0, k.jsx)("dialog", {
|
|
145
|
+
...n,
|
|
146
|
+
ref: r,
|
|
147
|
+
onKeyDown: P,
|
|
148
|
+
onCancel: (t) => {
|
|
149
|
+
t.preventDefault(), e();
|
|
150
|
+
},
|
|
151
|
+
onClick: (t) => {
|
|
152
|
+
if (t.target !== t.currentTarget) return;
|
|
153
|
+
let n = t.currentTarget.getBoundingClientRect();
|
|
154
|
+
(t.clientX < n.left || t.clientX > n.right || t.clientY < n.top || t.clientY > n.bottom) && e();
|
|
155
|
+
},
|
|
156
|
+
children: t
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
var F = /* @__PURE__ */ t(((e, t) => {
|
|
7
160
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
8
161
|
function n(e, t) {
|
|
9
162
|
if (t.length < e) throw TypeError(e + " argument" + (e > 1 ? "s" : "") + " required, but only " + t.length + " present");
|
|
10
163
|
}
|
|
11
164
|
t.exports = e.default;
|
|
12
|
-
})),
|
|
13
|
-
var n =
|
|
165
|
+
})), I = /* @__PURE__ */ t(((e, t) => {
|
|
166
|
+
var n = u().default;
|
|
14
167
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
15
|
-
var r = n(
|
|
168
|
+
var r = n(D()), i = n(F());
|
|
16
169
|
function a(e) {
|
|
17
170
|
return (0, i.default)(1, arguments), e instanceof Date || (0, r.default)(e) === "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
18
171
|
}
|
|
19
172
|
t.exports = e.default;
|
|
20
|
-
})),
|
|
21
|
-
var n =
|
|
173
|
+
})), L = /* @__PURE__ */ t(((e, t) => {
|
|
174
|
+
var n = u().default;
|
|
22
175
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
23
|
-
var r = n(
|
|
176
|
+
var r = n(D()), i = n(F());
|
|
24
177
|
function a(e) {
|
|
25
178
|
(0, i.default)(1, arguments);
|
|
26
179
|
var t = Object.prototype.toString.call(e);
|
|
27
180
|
return e instanceof Date || (0, r.default)(e) === "object" && t === "[object Date]" ? new Date(e.getTime()) : typeof e == "number" || t === "[object Number]" ? new Date(e) : ((typeof e == "string" || t === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn((/* @__PURE__ */ Error()).stack)), /* @__PURE__ */ new Date(NaN));
|
|
28
181
|
}
|
|
29
182
|
t.exports = e.default;
|
|
30
|
-
})),
|
|
31
|
-
var n =
|
|
183
|
+
})), ie = /* @__PURE__ */ t(((e, t) => {
|
|
184
|
+
var n = u().default;
|
|
32
185
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
33
|
-
var r = n(
|
|
186
|
+
var r = n(I()), i = n(L()), a = n(F());
|
|
34
187
|
function o(e) {
|
|
35
188
|
if ((0, a.default)(1, arguments), !(0, r.default)(e) && typeof e != "number") return !1;
|
|
36
189
|
var t = (0, i.default)(e);
|
|
37
190
|
return !isNaN(Number(t));
|
|
38
191
|
}
|
|
39
192
|
t.exports = e.default;
|
|
40
|
-
})),
|
|
41
|
-
var n =
|
|
193
|
+
})), ae = /* @__PURE__ */ t(((e, t) => {
|
|
194
|
+
var n = u().default;
|
|
42
195
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
43
|
-
var r = n(
|
|
196
|
+
var r = n(p()), i = n(L()), a = n(F());
|
|
44
197
|
function o(e, t) {
|
|
45
198
|
(0, a.default)(2, arguments);
|
|
46
199
|
var n = (0, i.default)(e).getTime(), o = (0, r.default)(t);
|
|
47
200
|
return new Date(n + o);
|
|
48
201
|
}
|
|
49
202
|
t.exports = e.default;
|
|
50
|
-
})),
|
|
51
|
-
var n =
|
|
203
|
+
})), oe = /* @__PURE__ */ t(((e, t) => {
|
|
204
|
+
var n = u().default;
|
|
52
205
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
53
|
-
var r = n(
|
|
206
|
+
var r = n(ae()), i = n(F()), a = n(p());
|
|
54
207
|
function o(e, t) {
|
|
55
208
|
(0, i.default)(2, arguments);
|
|
56
209
|
var n = (0, a.default)(t);
|
|
57
210
|
return (0, r.default)(e, -n);
|
|
58
211
|
}
|
|
59
212
|
t.exports = e.default;
|
|
60
|
-
})),
|
|
61
|
-
var n =
|
|
213
|
+
})), R = /* @__PURE__ */ t(((e, t) => {
|
|
214
|
+
var n = u().default;
|
|
62
215
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
63
|
-
var r = n(
|
|
216
|
+
var r = n(L()), i = n(F()), a = 864e5;
|
|
64
217
|
function o(e) {
|
|
65
218
|
(0, i.default)(1, arguments);
|
|
66
219
|
var t = (0, r.default)(e), n = t.getTime();
|
|
@@ -69,20 +222,20 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
69
222
|
return Math.floor(o / a) + 1;
|
|
70
223
|
}
|
|
71
224
|
t.exports = e.default;
|
|
72
|
-
})),
|
|
73
|
-
var n =
|
|
225
|
+
})), z = /* @__PURE__ */ t(((e, t) => {
|
|
226
|
+
var n = u().default;
|
|
74
227
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
75
|
-
var r = n(
|
|
228
|
+
var r = n(L()), i = n(F());
|
|
76
229
|
function a(e) {
|
|
77
230
|
(0, i.default)(1, arguments);
|
|
78
231
|
var t = 1, n = (0, r.default)(e), a = n.getUTCDay(), o = (a < t ? 7 : 0) + a - t;
|
|
79
232
|
return n.setUTCDate(n.getUTCDate() - o), n.setUTCHours(0, 0, 0, 0), n;
|
|
80
233
|
}
|
|
81
234
|
t.exports = e.default;
|
|
82
|
-
})),
|
|
83
|
-
var n =
|
|
235
|
+
})), B = /* @__PURE__ */ t(((e, t) => {
|
|
236
|
+
var n = u().default;
|
|
84
237
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
85
|
-
var r = n(
|
|
238
|
+
var r = n(L()), i = n(F()), a = n(z());
|
|
86
239
|
function o(e) {
|
|
87
240
|
(0, i.default)(1, arguments);
|
|
88
241
|
var t = (0, r.default)(e), n = t.getUTCFullYear(), o = /* @__PURE__ */ new Date(0);
|
|
@@ -93,27 +246,27 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
93
246
|
return t.getTime() >= s.getTime() ? n + 1 : t.getTime() >= l.getTime() ? n : n - 1;
|
|
94
247
|
}
|
|
95
248
|
t.exports = e.default;
|
|
96
|
-
})),
|
|
97
|
-
var n =
|
|
249
|
+
})), V = /* @__PURE__ */ t(((e, t) => {
|
|
250
|
+
var n = u().default;
|
|
98
251
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
99
|
-
var r = n(
|
|
252
|
+
var r = n(B()), i = n(z()), a = n(F());
|
|
100
253
|
function o(e) {
|
|
101
254
|
(0, a.default)(1, arguments);
|
|
102
255
|
var t = (0, r.default)(e), n = /* @__PURE__ */ new Date(0);
|
|
103
256
|
return n.setUTCFullYear(t, 0, 4), n.setUTCHours(0, 0, 0, 0), (0, i.default)(n);
|
|
104
257
|
}
|
|
105
258
|
t.exports = e.default;
|
|
106
|
-
})),
|
|
107
|
-
var n =
|
|
108
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default =
|
|
109
|
-
var r = n(
|
|
110
|
-
function
|
|
259
|
+
})), H = /* @__PURE__ */ t(((e, t) => {
|
|
260
|
+
var n = u().default;
|
|
261
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
262
|
+
var r = n(L()), i = n(z()), a = n(V()), o = n(F()), s = 6048e5;
|
|
263
|
+
function c(e) {
|
|
111
264
|
(0, o.default)(1, arguments);
|
|
112
265
|
var t = (0, r.default)(e), n = (0, i.default)(t).getTime() - (0, a.default)(t).getTime();
|
|
113
266
|
return Math.round(n / s) + 1;
|
|
114
267
|
}
|
|
115
268
|
t.exports = e.default;
|
|
116
|
-
})),
|
|
269
|
+
})), se = /* @__PURE__ */ t(((e) => {
|
|
117
270
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getDefaultOptions = n, e.setDefaultOptions = r;
|
|
118
271
|
var t = {};
|
|
119
272
|
function n() {
|
|
@@ -122,10 +275,10 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
122
275
|
function r(e) {
|
|
123
276
|
t = e;
|
|
124
277
|
}
|
|
125
|
-
})),
|
|
126
|
-
var n =
|
|
278
|
+
})), U = /* @__PURE__ */ t(((e, t) => {
|
|
279
|
+
var n = u().default;
|
|
127
280
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = s;
|
|
128
|
-
var r = n(
|
|
281
|
+
var r = n(L()), i = n(F()), a = n(p()), o = se();
|
|
129
282
|
function s(e, t) {
|
|
130
283
|
var n;
|
|
131
284
|
(0, i.default)(1, arguments);
|
|
@@ -135,11 +288,11 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
135
288
|
return l.setUTCDate(l.getUTCDate() - d), l.setUTCHours(0, 0, 0, 0), l;
|
|
136
289
|
}
|
|
137
290
|
t.exports = e.default;
|
|
138
|
-
})),
|
|
139
|
-
var n =
|
|
140
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default =
|
|
141
|
-
var r = n(
|
|
142
|
-
function
|
|
291
|
+
})), ce = /* @__PURE__ */ t(((e, t) => {
|
|
292
|
+
var n = u().default;
|
|
293
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
294
|
+
var r = n(L()), i = n(F()), a = n(U()), o = n(p()), s = se();
|
|
295
|
+
function c(e, t) {
|
|
143
296
|
var n;
|
|
144
297
|
(0, i.default)(1, arguments);
|
|
145
298
|
var c = (0, r.default)(e), l = c.getUTCFullYear(), u = (0, s.getDefaultOptions)(), d = (0, o.default)(t?.firstWeekContainsDate ?? (t == null || (n = t.locale) == null ? void 0 : n.options?.firstWeekContainsDate) ?? u.firstWeekContainsDate ?? u.locale?.options?.firstWeekContainsDate ?? 1);
|
|
@@ -152,22 +305,22 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
152
305
|
return c.getTime() >= p.getTime() ? l + 1 : c.getTime() >= h.getTime() ? l : l - 1;
|
|
153
306
|
}
|
|
154
307
|
t.exports = e.default;
|
|
155
|
-
})),
|
|
156
|
-
var n =
|
|
157
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default =
|
|
158
|
-
var r = n(
|
|
159
|
-
function
|
|
308
|
+
})), le = /* @__PURE__ */ t(((e, t) => {
|
|
309
|
+
var n = u().default;
|
|
310
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
311
|
+
var r = n(ce()), i = n(F()), a = n(U()), o = n(p()), s = se();
|
|
312
|
+
function c(e, t) {
|
|
160
313
|
var n;
|
|
161
314
|
(0, i.default)(1, arguments);
|
|
162
315
|
var c = (0, s.getDefaultOptions)(), l = (0, o.default)(t?.firstWeekContainsDate ?? (t == null || (n = t.locale) == null ? void 0 : n.options?.firstWeekContainsDate) ?? c.firstWeekContainsDate ?? c.locale?.options?.firstWeekContainsDate ?? 1), u = (0, r.default)(e, t), d = /* @__PURE__ */ new Date(0);
|
|
163
316
|
return d.setUTCFullYear(u, 0, l), d.setUTCHours(0, 0, 0, 0), (0, a.default)(d, t);
|
|
164
317
|
}
|
|
165
318
|
t.exports = e.default;
|
|
166
|
-
})),
|
|
167
|
-
var n =
|
|
168
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default =
|
|
169
|
-
var r = n(
|
|
170
|
-
function
|
|
319
|
+
})), W = /* @__PURE__ */ t(((e, t) => {
|
|
320
|
+
var n = u().default;
|
|
321
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
322
|
+
var r = n(L()), i = n(U()), a = n(le()), o = n(F()), s = 6048e5;
|
|
323
|
+
function c(e, t) {
|
|
171
324
|
(0, o.default)(1, arguments);
|
|
172
325
|
var n = (0, r.default)(e), c = (0, i.default)(n, t).getTime() - (0, a.default)(n, t).getTime();
|
|
173
326
|
return Math.round(c / s) + 1;
|
|
@@ -181,7 +334,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
181
334
|
}
|
|
182
335
|
t.exports = e.default;
|
|
183
336
|
})), de = /* @__PURE__ */ t(((e, t) => {
|
|
184
|
-
var n =
|
|
337
|
+
var n = u().default;
|
|
185
338
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
186
339
|
var r = n(ue());
|
|
187
340
|
e.default = {
|
|
@@ -224,9 +377,9 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
224
377
|
}
|
|
225
378
|
}, t.exports = e.default;
|
|
226
379
|
})), fe = /* @__PURE__ */ t(((e, t) => {
|
|
227
|
-
var n =
|
|
380
|
+
var n = u().default;
|
|
228
381
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
229
|
-
var r = n(
|
|
382
|
+
var r = n(R()), i = n(H()), a = n(B()), o = n(W()), s = n(ce()), c = n(ue()), l = n(de()), d = {
|
|
230
383
|
am: "am",
|
|
231
384
|
pm: "pm",
|
|
232
385
|
midnight: "midnight",
|
|
@@ -251,29 +404,29 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
251
404
|
var r = e.getUTCFullYear(), i = r > 0 ? r : 1 - r;
|
|
252
405
|
return n.ordinalNumber(i, { unit: "year" });
|
|
253
406
|
}
|
|
254
|
-
return
|
|
407
|
+
return l.default.y(e, t);
|
|
255
408
|
},
|
|
256
409
|
Y: function(e, t, n, r) {
|
|
257
410
|
var i = (0, s.default)(e, r), a = i > 0 ? i : 1 - i;
|
|
258
411
|
if (t === "YY") {
|
|
259
412
|
var o = a % 100;
|
|
260
|
-
return (0,
|
|
413
|
+
return (0, c.default)(o, 2);
|
|
261
414
|
}
|
|
262
|
-
return t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : (0,
|
|
415
|
+
return t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : (0, c.default)(a, t.length);
|
|
263
416
|
},
|
|
264
417
|
R: function(e, t) {
|
|
265
418
|
var n = (0, a.default)(e);
|
|
266
|
-
return (0,
|
|
419
|
+
return (0, c.default)(n, t.length);
|
|
267
420
|
},
|
|
268
421
|
u: function(e, t) {
|
|
269
422
|
var n = e.getUTCFullYear();
|
|
270
|
-
return (0,
|
|
423
|
+
return (0, c.default)(n, t.length);
|
|
271
424
|
},
|
|
272
425
|
Q: function(e, t, n) {
|
|
273
426
|
var r = Math.ceil((e.getUTCMonth() + 1) / 3);
|
|
274
427
|
switch (t) {
|
|
275
428
|
case "Q": return String(r);
|
|
276
|
-
case "QQ": return (0,
|
|
429
|
+
case "QQ": return (0, c.default)(r, 2);
|
|
277
430
|
case "Qo": return n.ordinalNumber(r, { unit: "quarter" });
|
|
278
431
|
case "QQQ": return n.quarter(r, {
|
|
279
432
|
width: "abbreviated",
|
|
@@ -293,7 +446,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
293
446
|
var r = Math.ceil((e.getUTCMonth() + 1) / 3);
|
|
294
447
|
switch (t) {
|
|
295
448
|
case "q": return String(r);
|
|
296
|
-
case "qq": return (0,
|
|
449
|
+
case "qq": return (0, c.default)(r, 2);
|
|
297
450
|
case "qo": return n.ordinalNumber(r, { unit: "quarter" });
|
|
298
451
|
case "qqq": return n.quarter(r, {
|
|
299
452
|
width: "abbreviated",
|
|
@@ -313,7 +466,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
313
466
|
var r = e.getUTCMonth();
|
|
314
467
|
switch (t) {
|
|
315
468
|
case "M":
|
|
316
|
-
case "MM": return
|
|
469
|
+
case "MM": return l.default.M(e, t);
|
|
317
470
|
case "Mo": return n.ordinalNumber(r + 1, { unit: "month" });
|
|
318
471
|
case "MMM": return n.month(r, {
|
|
319
472
|
width: "abbreviated",
|
|
@@ -333,7 +486,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
333
486
|
var r = e.getUTCMonth();
|
|
334
487
|
switch (t) {
|
|
335
488
|
case "L": return String(r + 1);
|
|
336
|
-
case "LL": return (0,
|
|
489
|
+
case "LL": return (0, c.default)(r + 1, 2);
|
|
337
490
|
case "Lo": return n.ordinalNumber(r + 1, { unit: "month" });
|
|
338
491
|
case "LLL": return n.month(r, {
|
|
339
492
|
width: "abbreviated",
|
|
@@ -351,18 +504,18 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
351
504
|
},
|
|
352
505
|
w: function(e, t, n, r) {
|
|
353
506
|
var i = (0, o.default)(e, r);
|
|
354
|
-
return t === "wo" ? n.ordinalNumber(i, { unit: "week" }) : (0,
|
|
507
|
+
return t === "wo" ? n.ordinalNumber(i, { unit: "week" }) : (0, c.default)(i, t.length);
|
|
355
508
|
},
|
|
356
509
|
I: function(e, t, n) {
|
|
357
510
|
var r = (0, i.default)(e);
|
|
358
|
-
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : (0,
|
|
511
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : (0, c.default)(r, t.length);
|
|
359
512
|
},
|
|
360
513
|
d: function(e, t, n) {
|
|
361
|
-
return t === "do" ? n.ordinalNumber(e.getUTCDate(), { unit: "date" }) :
|
|
514
|
+
return t === "do" ? n.ordinalNumber(e.getUTCDate(), { unit: "date" }) : l.default.d(e, t);
|
|
362
515
|
},
|
|
363
516
|
D: function(e, t, n) {
|
|
364
517
|
var i = (0, r.default)(e);
|
|
365
|
-
return t === "Do" ? n.ordinalNumber(i, { unit: "dayOfYear" }) : (0,
|
|
518
|
+
return t === "Do" ? n.ordinalNumber(i, { unit: "dayOfYear" }) : (0, c.default)(i, t.length);
|
|
366
519
|
},
|
|
367
520
|
E: function(e, t, n) {
|
|
368
521
|
var r = e.getUTCDay();
|
|
@@ -391,7 +544,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
391
544
|
var i = e.getUTCDay(), a = (i - r.weekStartsOn + 8) % 7 || 7;
|
|
392
545
|
switch (t) {
|
|
393
546
|
case "e": return String(a);
|
|
394
|
-
case "ee": return (0,
|
|
547
|
+
case "ee": return (0, c.default)(a, 2);
|
|
395
548
|
case "eo": return n.ordinalNumber(a, { unit: "day" });
|
|
396
549
|
case "eee": return n.day(i, {
|
|
397
550
|
width: "abbreviated",
|
|
@@ -415,7 +568,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
415
568
|
var i = e.getUTCDay(), a = (i - r.weekStartsOn + 8) % 7 || 7;
|
|
416
569
|
switch (t) {
|
|
417
570
|
case "c": return String(a);
|
|
418
|
-
case "cc": return (0,
|
|
571
|
+
case "cc": return (0, c.default)(a, t.length);
|
|
419
572
|
case "co": return n.ordinalNumber(a, { unit: "day" });
|
|
420
573
|
case "ccc": return n.day(i, {
|
|
421
574
|
width: "abbreviated",
|
|
@@ -439,7 +592,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
439
592
|
var r = e.getUTCDay(), i = r === 0 ? 7 : r;
|
|
440
593
|
switch (t) {
|
|
441
594
|
case "i": return String(i);
|
|
442
|
-
case "ii": return (0,
|
|
595
|
+
case "ii": return (0, c.default)(i, t.length);
|
|
443
596
|
case "io": return n.ordinalNumber(i, { unit: "day" });
|
|
444
597
|
case "iii": return n.day(r, {
|
|
445
598
|
width: "abbreviated",
|
|
@@ -527,27 +680,27 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
527
680
|
var r = e.getUTCHours() % 12;
|
|
528
681
|
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
529
682
|
}
|
|
530
|
-
return
|
|
683
|
+
return l.default.h(e, t);
|
|
531
684
|
},
|
|
532
685
|
H: function(e, t, n) {
|
|
533
|
-
return t === "Ho" ? n.ordinalNumber(e.getUTCHours(), { unit: "hour" }) :
|
|
686
|
+
return t === "Ho" ? n.ordinalNumber(e.getUTCHours(), { unit: "hour" }) : l.default.H(e, t);
|
|
534
687
|
},
|
|
535
688
|
K: function(e, t, n) {
|
|
536
689
|
var r = e.getUTCHours() % 12;
|
|
537
|
-
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : (0,
|
|
690
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : (0, c.default)(r, t.length);
|
|
538
691
|
},
|
|
539
692
|
k: function(e, t, n) {
|
|
540
693
|
var r = e.getUTCHours();
|
|
541
|
-
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : (0,
|
|
694
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : (0, c.default)(r, t.length);
|
|
542
695
|
},
|
|
543
696
|
m: function(e, t, n) {
|
|
544
|
-
return t === "mo" ? n.ordinalNumber(e.getUTCMinutes(), { unit: "minute" }) :
|
|
697
|
+
return t === "mo" ? n.ordinalNumber(e.getUTCMinutes(), { unit: "minute" }) : l.default.m(e, t);
|
|
545
698
|
},
|
|
546
699
|
s: function(e, t, n) {
|
|
547
|
-
return t === "so" ? n.ordinalNumber(e.getUTCSeconds(), { unit: "second" }) :
|
|
700
|
+
return t === "so" ? n.ordinalNumber(e.getUTCSeconds(), { unit: "second" }) : l.default.s(e, t);
|
|
548
701
|
},
|
|
549
702
|
S: function(e, t) {
|
|
550
|
-
return
|
|
703
|
+
return l.default.S(e, t);
|
|
551
704
|
},
|
|
552
705
|
X: function(e, t, n, r) {
|
|
553
706
|
var i = (r._originalDate || e).getTimezoneOffset();
|
|
@@ -588,24 +741,24 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
588
741
|
},
|
|
589
742
|
t: function(e, t, n, r) {
|
|
590
743
|
var i = r._originalDate || e, a = Math.floor(i.getTime() / 1e3);
|
|
591
|
-
return (0,
|
|
744
|
+
return (0, c.default)(a, t.length);
|
|
592
745
|
},
|
|
593
746
|
T: function(e, t, n, r) {
|
|
594
747
|
var i = (r._originalDate || e).getTime();
|
|
595
|
-
return (0,
|
|
748
|
+
return (0, c.default)(i, t.length);
|
|
596
749
|
}
|
|
597
750
|
};
|
|
598
751
|
function p(e, t) {
|
|
599
752
|
var n = e > 0 ? "-" : "+", r = Math.abs(e), i = Math.floor(r / 60), a = r % 60;
|
|
600
753
|
if (a === 0) return n + String(i);
|
|
601
754
|
var o = t || "";
|
|
602
|
-
return n + String(i) + o + (0,
|
|
755
|
+
return n + String(i) + o + (0, c.default)(a, 2);
|
|
603
756
|
}
|
|
604
757
|
function m(e, t) {
|
|
605
|
-
return e % 60 == 0 ? (e > 0 ? "-" : "+") + (0,
|
|
758
|
+
return e % 60 == 0 ? (e > 0 ? "-" : "+") + (0, c.default)(Math.abs(e) / 60, 2) : h(e, t);
|
|
606
759
|
}
|
|
607
760
|
function h(e, t) {
|
|
608
|
-
var n = t || "", r = e > 0 ? "-" : "+", i = Math.abs(e), a = (0,
|
|
761
|
+
var n = t || "", r = e > 0 ? "-" : "+", i = Math.abs(e), a = (0, c.default)(Math.floor(i / 60), 2), o = (0, c.default)(i % 60, 2);
|
|
609
762
|
return r + a + n + o;
|
|
610
763
|
}
|
|
611
764
|
e.default = f, t.exports = e.default;
|
|
@@ -649,7 +802,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
649
802
|
return s.replace("{{date}}", n(a, t)).replace("{{time}}", r(o, t));
|
|
650
803
|
}
|
|
651
804
|
}, t.exports = e.default;
|
|
652
|
-
})),
|
|
805
|
+
})), G = /* @__PURE__ */ t(((e) => {
|
|
653
806
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.isProtectedDayOfYearToken = r, e.isProtectedWeekYearToken = i, e.throwProtectedError = a;
|
|
654
807
|
var t = ["D", "DD"], n = ["YY", "YYYY"];
|
|
655
808
|
function r(e) {
|
|
@@ -743,7 +896,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
743
896
|
}
|
|
744
897
|
t.exports = e.default;
|
|
745
898
|
})), ge = /* @__PURE__ */ t(((e, t) => {
|
|
746
|
-
var n =
|
|
899
|
+
var n = u().default;
|
|
747
900
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
748
901
|
var r = n(he());
|
|
749
902
|
e.default = {
|
|
@@ -806,7 +959,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
806
959
|
}
|
|
807
960
|
t.exports = e.default;
|
|
808
961
|
})), ye = /* @__PURE__ */ t(((e, t) => {
|
|
809
|
-
var n =
|
|
962
|
+
var n = u().default;
|
|
810
963
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
811
964
|
var r = n(ve());
|
|
812
965
|
e.default = {
|
|
@@ -1055,7 +1208,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
1055
1208
|
}
|
|
1056
1209
|
t.exports = e.default;
|
|
1057
1210
|
})), Se = /* @__PURE__ */ t(((e, t) => {
|
|
1058
|
-
var n =
|
|
1211
|
+
var n = u().default;
|
|
1059
1212
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
1060
1213
|
var r = n(be());
|
|
1061
1214
|
e.default = {
|
|
@@ -1183,7 +1336,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
1183
1336
|
})
|
|
1184
1337
|
}, t.exports = e.default;
|
|
1185
1338
|
})), Ce = /* @__PURE__ */ t(((e, t) => {
|
|
1186
|
-
var n =
|
|
1339
|
+
var n = u().default;
|
|
1187
1340
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
1188
1341
|
var r = n(me()), i = n(ge()), a = n(_e()), o = n(ye()), s = n(Se());
|
|
1189
1342
|
e.default = {
|
|
@@ -1199,24 +1352,24 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
1199
1352
|
}
|
|
1200
1353
|
}, t.exports = e.default;
|
|
1201
1354
|
})), we = /* @__PURE__ */ t(((e, t) => {
|
|
1202
|
-
var n =
|
|
1355
|
+
var n = u().default;
|
|
1203
1356
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = n(Ce()).default, t.exports = e.default;
|
|
1204
1357
|
})), Te = /* @__PURE__ */ t(((e, t) => {
|
|
1205
|
-
var n =
|
|
1358
|
+
var n = u().default;
|
|
1206
1359
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = x;
|
|
1207
|
-
var r = n(
|
|
1360
|
+
var r = n(ie()), i = n(oe()), a = n(L()), o = n(fe()), s = n(pe()), c = n(C()), l = G(), d = n(p()), f = n(F()), m = se(), h = n(we()), g = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, _ = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, v = /^'([^]*?)'?$/, y = /''/g, b = /[a-zA-Z]/;
|
|
1208
1361
|
function x(e, t, n) {
|
|
1209
|
-
var
|
|
1210
|
-
(0,
|
|
1211
|
-
var v = String(t), y = (0, m.getDefaultOptions)(), x = n?.locale ?? y.locale ?? h.default, C = (0,
|
|
1362
|
+
var u, p;
|
|
1363
|
+
(0, f.default)(2, arguments);
|
|
1364
|
+
var v = String(t), y = (0, m.getDefaultOptions)(), x = n?.locale ?? y.locale ?? h.default, C = (0, d.default)(n?.firstWeekContainsDate ?? (n == null || (u = n.locale) == null ? void 0 : u.options?.firstWeekContainsDate) ?? y.firstWeekContainsDate ?? y.locale?.options?.firstWeekContainsDate ?? 1);
|
|
1212
1365
|
if (!(C >= 1 && C <= 7)) throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
1213
|
-
var w = (0,
|
|
1366
|
+
var w = (0, d.default)(n?.weekStartsOn ?? (n == null || (p = n.locale) == null ? void 0 : p.options?.weekStartsOn) ?? y.weekStartsOn ?? y.locale?.options?.weekStartsOn ?? 0);
|
|
1214
1367
|
if (!(w >= 0 && w <= 6)) throw RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
1215
1368
|
if (!x.localize) throw RangeError("locale must contain localize property");
|
|
1216
1369
|
if (!x.formatLong) throw RangeError("locale must contain formatLong property");
|
|
1217
1370
|
var T = (0, a.default)(e);
|
|
1218
1371
|
if (!(0, r.default)(T)) throw RangeError("Invalid time value");
|
|
1219
|
-
var E = (0,
|
|
1372
|
+
var E = (0, c.default)(T), ee = (0, i.default)(T, E), D = {
|
|
1220
1373
|
firstWeekContainsDate: C,
|
|
1221
1374
|
weekStartsOn: w,
|
|
1222
1375
|
locale: x,
|
|
@@ -1234,7 +1387,7 @@ var N = /* @__PURE__ */ t(((e, t) => {
|
|
|
1234
1387
|
var i = r[0];
|
|
1235
1388
|
if (i === "'") return S(r);
|
|
1236
1389
|
var a = o.default[i];
|
|
1237
|
-
if (a) return !(n != null && n.useAdditionalWeekYearTokens) && (0,
|
|
1390
|
+
if (a) return !(n != null && n.useAdditionalWeekYearTokens) && (0, l.isProtectedWeekYearToken)(r) && (0, l.throwProtectedError)(r, t, String(e)), !(n != null && n.useAdditionalDayOfYearTokens) && (0, l.isProtectedDayOfYearToken)(r) && (0, l.throwProtectedError)(r, t, String(e)), a(ee, r, x.localize, D);
|
|
1238
1391
|
if (i.match(b)) throw RangeError("Format string contains an unescaped latin alphabet character `" + i + "`");
|
|
1239
1392
|
return r;
|
|
1240
1393
|
}).join("");
|
|
@@ -1302,7 +1455,7 @@ var Ae = 60 * 1e3, je = {
|
|
|
1302
1455
|
}
|
|
1303
1456
|
};
|
|
1304
1457
|
function Me(e, t) {
|
|
1305
|
-
var n = e ?
|
|
1458
|
+
var n = e ? y(e, t, !0) / Ae : t.getTimezoneOffset();
|
|
1306
1459
|
if (Number.isNaN(n)) throw RangeError("Invalid time zone specified: " + e);
|
|
1307
1460
|
return n;
|
|
1308
1461
|
}
|
|
@@ -1327,7 +1480,7 @@ var Le = /* @__PURE__ */ e(Te()), Re = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
|
|
|
1327
1480
|
function ze(e, t, n) {
|
|
1328
1481
|
var r = String(t), i = n || {}, a = r.match(Re);
|
|
1329
1482
|
if (a) {
|
|
1330
|
-
var o =
|
|
1483
|
+
var o = d(i.originalDate || e, i);
|
|
1331
1484
|
r = a.reduce(function(e, t) {
|
|
1332
1485
|
if (t[0] === "'") return e;
|
|
1333
1486
|
var n = e.indexOf(t), r = e[n - 1] === "'", a = e.replace(t, "'" + je[t[0]](o, t, null, i) + "'");
|
|
@@ -1345,7 +1498,7 @@ var Be = /* @__PURE__ */ t(((e, t) => {
|
|
|
1345
1498
|
}
|
|
1346
1499
|
t.exports = e.default;
|
|
1347
1500
|
})), Ve = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
1348
|
-
var n =
|
|
1501
|
+
var n = u().default;
|
|
1349
1502
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = i;
|
|
1350
1503
|
var r = n(Be());
|
|
1351
1504
|
function i(e) {
|
|
@@ -1355,42 +1508,42 @@ var Be = /* @__PURE__ */ t(((e, t) => {
|
|
|
1355
1508
|
})))());
|
|
1356
1509
|
function He(e, t, n, r) {
|
|
1357
1510
|
var i = (0, Ve.default)(r);
|
|
1358
|
-
return i.timeZone = t, i.originalDate = e, ze(
|
|
1511
|
+
return i.timeZone = t, i.originalDate = e, ze(g(e, t), n, i);
|
|
1359
1512
|
}
|
|
1360
1513
|
function Ue(e, t, n) {
|
|
1361
|
-
if (typeof e == "string" && !e.match(
|
|
1514
|
+
if (typeof e == "string" && !e.match(b)) {
|
|
1362
1515
|
var r = (0, Ve.default)(n);
|
|
1363
|
-
return r.timeZone = t,
|
|
1516
|
+
return r.timeZone = t, d(e, r);
|
|
1364
1517
|
}
|
|
1365
|
-
var i =
|
|
1518
|
+
var i = d(e, n), a = w(i.getFullYear(), i.getMonth(), i.getDate(), i.getHours(), i.getMinutes(), i.getSeconds(), i.getMilliseconds()).getTime(), o = y(t, new Date(a));
|
|
1366
1519
|
return new Date(a + o);
|
|
1367
1520
|
}
|
|
1368
|
-
var
|
|
1369
|
-
if (!
|
|
1521
|
+
var K = E(), q = (e) => typeof e == "object" && !!e && !Array.isArray(e), We = (e) => q(e) && q(e.associativeListFilter), J = (e) => {
|
|
1522
|
+
if (!q(e)) return;
|
|
1370
1523
|
if (typeof e.fieldKey == "string") return e.fieldKey;
|
|
1371
1524
|
let t = e.field;
|
|
1372
|
-
if (!(!
|
|
1525
|
+
if (!(!q(t) || typeof t.name != "string" || typeof t.view != "string")) return `[${t.view}].[${t.name}]`;
|
|
1373
1526
|
}, Ge = (e) => {
|
|
1374
|
-
if (We(e)) return JSON.stringify(["associative",
|
|
1375
|
-
let t =
|
|
1527
|
+
if (We(e)) return JSON.stringify(["associative", J(e) ?? ""]);
|
|
1528
|
+
let t = q(e) ? e : {};
|
|
1376
1529
|
return JSON.stringify([
|
|
1377
1530
|
"value",
|
|
1378
|
-
|
|
1531
|
+
J(e) ?? "",
|
|
1379
1532
|
t.dateLevel ?? null,
|
|
1380
1533
|
t.datePart ?? null,
|
|
1381
1534
|
t.operator
|
|
1382
1535
|
]);
|
|
1383
|
-
},
|
|
1384
|
-
if (We(e)) return JSON.stringify(["associative",
|
|
1385
|
-
let t =
|
|
1536
|
+
}, Y = (e) => {
|
|
1537
|
+
if (We(e)) return JSON.stringify(["associative", J(e) ?? ""]);
|
|
1538
|
+
let t = q(e) ? e : {};
|
|
1386
1539
|
return JSON.stringify([
|
|
1387
1540
|
"value",
|
|
1388
|
-
|
|
1541
|
+
J(e) ?? "",
|
|
1389
1542
|
t.dateLevel ?? null,
|
|
1390
1543
|
t.datePart ?? null
|
|
1391
1544
|
]);
|
|
1392
1545
|
}, Ke = (e) => {
|
|
1393
|
-
let t =
|
|
1546
|
+
let t = q(e) ? e : {};
|
|
1394
1547
|
return {
|
|
1395
1548
|
applied: $e(t.applied),
|
|
1396
1549
|
pending: $e(t.pending)
|
|
@@ -1428,24 +1581,24 @@ var W = /* @__PURE__ */ e(b()), G = x(), K = (e) => typeof e == "object" && !!e
|
|
|
1428
1581
|
valueCount: 0,
|
|
1429
1582
|
text: "Related records"
|
|
1430
1583
|
};
|
|
1431
|
-
let n = Array.isArray(e.values) ? e.values : [], r = ut(e), i = n.length, a = e.operator ===
|
|
1584
|
+
let n = Array.isArray(e.values) ? e.values : [], r = ut(e), i = n.length, a = e.operator === K.FilterOperator.Set || e.operator === K.FilterOperator.NotSet, o = n.slice(0, 3).map((e) => q(e) ? typeof e.dataType == "string" ? `${e.dataType} filter` : "Value" : t(e));
|
|
1432
1585
|
return {
|
|
1433
1586
|
isAssociative: !1,
|
|
1434
1587
|
isEmpty: !r && !a && i === 0,
|
|
1435
1588
|
valueCount: i,
|
|
1436
1589
|
text: a ? "Has value" : r ? "Dynamic date" : `${o.join(", ")}${i > 3 ? ` +${i - 3}` : ""}`
|
|
1437
1590
|
};
|
|
1438
|
-
}, Xe = (e) => We(e) ? nt(e.associativeListFilter) : e.operator ===
|
|
1439
|
-
if (!
|
|
1440
|
-
if (
|
|
1441
|
-
let t =
|
|
1591
|
+
}, Xe = (e) => We(e) ? nt(e.associativeListFilter) : e.operator === K.FilterOperator.Set || e.operator === K.FilterOperator.NotSet || ut(e) ? !0 : !Array.isArray(e.values) || e.values.length === 0 ? !1 : e.operator === K.FilterOperator.Between || e.operator === K.FilterOperator.NotBetween ? e.values.length === 2 && st(e.values[0]) && st(e.values[1]) : e.operator === K.FilterOperator.Like || e.operator === K.FilterOperator.NotLike ? e.values.length === 1 && typeof e.values[0] == "string" && e.values[0].trim().length > 0 : [K.FilterOperator.InList, K.FilterOperator.NotInList].includes(e.operator) ? e.values.every(ot) : e.operator === K.FilterOperator.GeoIntersect ? e.values.length === 1 && ct(e.values[0]) : e.values.length === 1 && ot(e.values[0]), Ze = Xe, Qe = Ye, $e = (e) => Array.isArray(e) ? e.flatMap((e) => {
|
|
1592
|
+
if (!q(e)) return [];
|
|
1593
|
+
if (q(e.associativeListFilter)) {
|
|
1594
|
+
let t = J(e);
|
|
1442
1595
|
return t ? [{
|
|
1443
1596
|
...e,
|
|
1444
1597
|
fieldKey: t,
|
|
1445
1598
|
associativeListFilter: tt(e.associativeListFilter)
|
|
1446
1599
|
}] : [];
|
|
1447
1600
|
}
|
|
1448
|
-
let t =
|
|
1601
|
+
let t = J(e);
|
|
1449
1602
|
if (!t || typeof e.operator != "string") return [];
|
|
1450
1603
|
let n = {
|
|
1451
1604
|
...e,
|
|
@@ -1454,22 +1607,22 @@ var W = /* @__PURE__ */ e(b()), G = x(), K = (e) => typeof e == "object" && !!e
|
|
|
1454
1607
|
return Array.isArray(e.values) && (n.values = e.values.map(et)), [n];
|
|
1455
1608
|
}) : [], et = (e) => {
|
|
1456
1609
|
if (e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean") return e;
|
|
1457
|
-
if (!
|
|
1610
|
+
if (!q(e) || e.isNull === !0 || "value" in e && e.value === null) return null;
|
|
1458
1611
|
if ("value" in e && (typeof e.value == "string" || typeof e.value == "number" || typeof e.value == "boolean")) return e.value;
|
|
1459
1612
|
let t = e;
|
|
1460
1613
|
return "valueBoolean" in t && t.valueBoolean !== void 0 ? t.valueBoolean : "valueInt" in t && t.valueInt !== void 0 ? t.valueInt : "valueFloat" in t && t.valueFloat !== void 0 ? t.valueFloat : "valueMillisec" in t && t.valueMillisec !== void 0 ? t.valueMillisec : "valueString" in t && t.valueString !== void 0 ? t.valueString : "valueDate" in t && t.valueDate !== void 0 ? t.valueDate : "valueTime" in t && t.valueTime !== void 0 ? t.valueTime : "valueTimeTZ" in t && t.valueTimeTZ !== void 0 ? t.valueTimeTZ : "valueDatetime" in t && t.valueDatetime !== void 0 ? t.valueDatetime : "valueDatetimeTZ" in t && t.valueDatetimeTZ !== void 0 ? t.valueDatetimeTZ : typeof e.dataType == "string" ? e : null;
|
|
1461
1614
|
}, tt = (e) => {
|
|
1462
|
-
let t = (e) => !
|
|
1615
|
+
let t = (e) => !q(e) || !q(e.filterGroup) ? e : {
|
|
1463
1616
|
...e,
|
|
1464
1617
|
filterGroup: n(e.filterGroup)
|
|
1465
1618
|
}, n = (e) => ({
|
|
1466
1619
|
...e,
|
|
1467
1620
|
...Array.isArray(e.filters) ? { filters: e.filters.map((e) => {
|
|
1468
|
-
if (!
|
|
1621
|
+
if (!q(e)) return e;
|
|
1469
1622
|
let t = { ...e };
|
|
1470
1623
|
return Array.isArray(e.values) && (t.values = e.values.map(et)), t;
|
|
1471
1624
|
}) } : {},
|
|
1472
|
-
...Array.isArray(e.filterGroups) ? { filterGroups: e.filterGroups.map((e) =>
|
|
1625
|
+
...Array.isArray(e.filterGroups) ? { filterGroups: e.filterGroups.map((e) => q(e) ? n(e) : e) } : {}
|
|
1473
1626
|
});
|
|
1474
1627
|
return {
|
|
1475
1628
|
...e,
|
|
@@ -1477,13 +1630,13 @@ var W = /* @__PURE__ */ e(b()), G = x(), K = (e) => typeof e == "object" && !!e
|
|
|
1477
1630
|
...Array.isArray(e.unionFilters) ? { unionFilters: e.unionFilters.map(t) } : {}
|
|
1478
1631
|
};
|
|
1479
1632
|
}, nt = (e) => {
|
|
1480
|
-
if (!
|
|
1633
|
+
if (!q(e) || typeof e.view != "string") return !1;
|
|
1481
1634
|
let t = [e.intersectFilters, e.unionFilters].filter(Array.isArray).flatMap((e) => e);
|
|
1482
1635
|
return t.length > 0 && t.every(rt);
|
|
1483
|
-
}, rt = (e) => !
|
|
1636
|
+
}, rt = (e) => !q(e) || !q(e.filterGroup) ? !1 : it(e.filterGroup), it = (e) => {
|
|
1484
1637
|
let t = Array.isArray(e.filters) ? e.filters : [], n = Array.isArray(e.filterGroups) ? e.filterGroups : [], r = [...t, ...n];
|
|
1485
1638
|
return r.length > 0 && r.every(at);
|
|
1486
|
-
}, at = (e) =>
|
|
1639
|
+
}, at = (e) => q(e) ? q(e.filterGroup) ? it(e.filterGroup) : Array.isArray(e.filters) || Array.isArray(e.filterGroups) ? it(e) : typeof e.fieldKey == "string" && typeof e.operator == "string" && Xe(e) : !1, ot = (e) => e === null || typeof e == "boolean" ? !0 : typeof e == "number" ? Number.isFinite(e) : typeof e == "string" ? e.trim().length > 0 : q(e) && typeof e.dataType == "string", st = (e) => e !== null && ot(e), ct = (e) => q(e) && e.dataType === "geography" && lt(e.valueGeoMinPoint) && lt(e.valueGeoMaxPoint), lt = (e) => {
|
|
1487
1640
|
if (typeof e != "string") return !1;
|
|
1488
1641
|
let t = e.trim().split(/[ ,]+/).map(Number);
|
|
1489
1642
|
if (t.length !== 2 || !t.every(Number.isFinite)) return !1;
|
|
@@ -1504,33 +1657,33 @@ var W = /* @__PURE__ */ e(b()), G = x(), K = (e) => typeof e == "object" && !!e
|
|
|
1504
1657
|
let r = e.dynamicDateRange;
|
|
1505
1658
|
if (r && Number.isFinite(r.offsetBegin) && Number.isFinite(r.offsetEnd) && t.includes(r.part)) return !0;
|
|
1506
1659
|
let i = e.dynamicDateCalc;
|
|
1507
|
-
if (i && Object.values(
|
|
1660
|
+
if (i && Object.values(K.DynamicDateCalcType).includes(i.type)) return !0;
|
|
1508
1661
|
let a = e.dynamicDateCalcRange;
|
|
1509
|
-
return !!(a && Object.values(
|
|
1510
|
-
}, dt = (e) => e.dataType ===
|
|
1662
|
+
return !!(a && Object.values(K.DynamicDateCalcRangeType).includes(a.type));
|
|
1663
|
+
}, dt = (e) => e.dataType === K.FieldType.GEOGRAPHY ? {
|
|
1511
1664
|
fieldKey: e.key,
|
|
1512
|
-
operator:
|
|
1665
|
+
operator: K.FilterOperator.GeoIntersect,
|
|
1513
1666
|
values: [{
|
|
1514
|
-
dataType:
|
|
1667
|
+
dataType: K.FilterValueDataType.Geography,
|
|
1515
1668
|
valueGeoMinPoint: "",
|
|
1516
1669
|
valueGeoMaxPoint: ""
|
|
1517
1670
|
}]
|
|
1518
1671
|
} : {
|
|
1519
1672
|
fieldKey: e.key,
|
|
1520
|
-
operator:
|
|
1673
|
+
operator: K.FilterOperator.InList,
|
|
1521
1674
|
values: []
|
|
1522
1675
|
}, ft = (e, t) => t ? [e[0] ?? null] : [e[0] ?? null, e[1] ?? null], pt = (e, t) => {
|
|
1523
1676
|
let n = typeof e == "string" && /\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?\s*(?:Z|[+-]\d{2}(?::?\d{2})?)$/i.test(e);
|
|
1524
1677
|
return typeof e == "string" && !n ? Ue(e.replace(" ", "T"), t) : new Date(e);
|
|
1525
1678
|
}, mt = (e, t, n) => {
|
|
1526
1679
|
if (e == null || e === "" || typeof e != "number" && typeof e != "string") return "";
|
|
1527
|
-
if (t ===
|
|
1680
|
+
if (t === K.FieldType.TIME) {
|
|
1528
1681
|
let t = typeof e == "string" && /^(\d{1,2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/.exec(e), n = typeof e == "number" ? e : t ? (Number(t[1]) * 3600 + Number(t[2]) * 60 + Number(t[3] ?? 0)) * 1e3 + Number((t[4] ?? "").padEnd(3, "0")) : Date.parse(String(e));
|
|
1529
1682
|
if (!Number.isFinite(n)) return "";
|
|
1530
1683
|
let r = Math.max(0, Math.floor(n)), i = Math.floor(r / 1e3);
|
|
1531
1684
|
return `${String(Math.floor(i / 3600) % 24).padStart(2, "0")}:${String(Math.floor(i % 3600 / 60)).padStart(2, "0")}:${String(i % 60).padStart(2, "0")}.${String(r % 1e3).padStart(3, "0")}`;
|
|
1532
1685
|
}
|
|
1533
|
-
if (t ===
|
|
1686
|
+
if (t === K.FieldType.DATE) {
|
|
1534
1687
|
let t = new Date(typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/.test(e) ? `${e}T00:00:00.000Z` : e);
|
|
1535
1688
|
return Number.isFinite(t.getTime()) ? t.toISOString().slice(0, 10) : "";
|
|
1536
1689
|
}
|
|
@@ -1538,11 +1691,11 @@ var W = /* @__PURE__ */ e(b()), G = x(), K = (e) => typeof e == "object" && !!e
|
|
|
1538
1691
|
return Number.isFinite(r.getTime()) ? He(r, n, "yyyy-MM-dd'T'HH:mm:ss.SSS") : "";
|
|
1539
1692
|
}, ht = (e, t, n) => {
|
|
1540
1693
|
if (!e) return null;
|
|
1541
|
-
if (t ===
|
|
1694
|
+
if (t === K.FieldType.TIME) {
|
|
1542
1695
|
let [t = "0", n = "0", r = "0"] = e.split(":"), [i = "0", a = "0"] = r.split(".");
|
|
1543
1696
|
return (Number(t) * 3600 + Number(n) * 60 + Number(i)) * 1e3 + Number(a.padEnd(3, "0").slice(0, 3));
|
|
1544
1697
|
}
|
|
1545
|
-
if (t ===
|
|
1698
|
+
if (t === K.FieldType.DATE) {
|
|
1546
1699
|
let t = /* @__PURE__ */ new Date(`${e}T00:00:00.000Z`);
|
|
1547
1700
|
return Number.isFinite(t.getTime()) ? t.getTime() : null;
|
|
1548
1701
|
}
|
|
@@ -1556,9 +1709,9 @@ var W = /* @__PURE__ */ e(b()), G = x(), K = (e) => typeof e == "object" && !!e
|
|
|
1556
1709
|
if (typeof e != "number" && (typeof e != "string" || !e.trim())) return [];
|
|
1557
1710
|
let r;
|
|
1558
1711
|
if (typeof e == "number") r = e;
|
|
1559
|
-
else if (t ===
|
|
1560
|
-
else if (t ===
|
|
1561
|
-
else if (t ===
|
|
1712
|
+
else if (t === K.FieldType.DATE) r = Date.parse(e);
|
|
1713
|
+
else if (t === K.FieldType.TIMESTAMP || t === K.FieldType.TIMESTAMP_TZ) r = pt(e, n).getTime();
|
|
1714
|
+
else if (t === K.FieldType.TIME) {
|
|
1562
1715
|
let i = ht(mt(e, t, n), t, n);
|
|
1563
1716
|
r = typeof i == "number" ? i : NaN;
|
|
1564
1717
|
} else r = Number(e);
|
|
@@ -1569,78 +1722,78 @@ var W = /* @__PURE__ */ e(b()), G = x(), K = (e) => typeof e == "object" && !!e
|
|
|
1569
1722
|
}).sort((e, t) => e.order - t.order);
|
|
1570
1723
|
return r.length ? [r[0].value, r[r.length - 1].value] : [];
|
|
1571
1724
|
}, _t = (e) => [
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
].includes(e),
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
].includes(e), vt = (e, t) => t.operator ===
|
|
1582
|
-
if (e ===
|
|
1583
|
-
if (e ===
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1725
|
+
K.FieldType.INT,
|
|
1726
|
+
K.FieldType.REAL,
|
|
1727
|
+
K.FieldType.FLOAT,
|
|
1728
|
+
K.FieldType.DECIMAL
|
|
1729
|
+
].includes(e), X = (e) => [
|
|
1730
|
+
K.FieldType.DATE,
|
|
1731
|
+
K.FieldType.TIME,
|
|
1732
|
+
K.FieldType.TIMESTAMP,
|
|
1733
|
+
K.FieldType.TIMESTAMP_TZ
|
|
1734
|
+
].includes(e), vt = (e, t) => t.operator === K.FilterOperator.GeoIntersect ? "geo" : [K.FilterOperator.Set, K.FilterOperator.NotSet].includes(t.operator) ? "null" : [K.FilterOperator.Contains, K.FilterOperator.NotContains].includes(t.operator) ? "text" : X(e) && (t.dynamicDate || t.dynamicDateCalc || [K.FilterOperator.Equals, K.FilterOperator.NotEquals].includes(t.operator)) ? "date" : t.operator === K.FilterOperator.Like || t.operator === K.FilterOperator.NotLike ? "text" : t.operator === K.FilterOperator.Between || t.operator === K.FilterOperator.NotBetween || t.dynamicDateRange || t.dynamicDateCalcRange ? X(e) ? "date" : "range" : [K.FilterOperator.InList, K.FilterOperator.NotInList].includes(t.operator) ? "list" : [K.FilterOperator.Equals, K.FilterOperator.NotEquals].includes(t.operator) && X(e) ? "date" : "scalar", yt = (e) => {
|
|
1735
|
+
if (e === K.FieldType.GEOGRAPHY) return [K.FilterOperator.GeoIntersect];
|
|
1736
|
+
if (e === K.FieldType.BOOLEAN) return [
|
|
1737
|
+
K.FilterOperator.Equals,
|
|
1738
|
+
K.FilterOperator.NotEquals,
|
|
1739
|
+
K.FilterOperator.Set,
|
|
1740
|
+
K.FilterOperator.NotSet
|
|
1588
1741
|
];
|
|
1589
1742
|
let t = [
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1743
|
+
K.FilterOperator.Equals,
|
|
1744
|
+
K.FilterOperator.NotEquals,
|
|
1745
|
+
K.FilterOperator.InList,
|
|
1746
|
+
K.FilterOperator.NotInList,
|
|
1747
|
+
K.FilterOperator.Set,
|
|
1748
|
+
K.FilterOperator.NotSet
|
|
1596
1749
|
];
|
|
1597
|
-
return _t(e) ||
|
|
1750
|
+
return _t(e) || X(e) ? [
|
|
1598
1751
|
...t,
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1752
|
+
K.FilterOperator.GT,
|
|
1753
|
+
K.FilterOperator.GTE,
|
|
1754
|
+
K.FilterOperator.LT,
|
|
1755
|
+
K.FilterOperator.LTE,
|
|
1756
|
+
K.FilterOperator.Between,
|
|
1757
|
+
K.FilterOperator.NotBetween
|
|
1605
1758
|
] : [
|
|
1606
1759
|
...t,
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1760
|
+
K.FilterOperator.Like,
|
|
1761
|
+
K.FilterOperator.NotLike,
|
|
1762
|
+
K.FilterOperator.Contains,
|
|
1763
|
+
K.FilterOperator.NotContains
|
|
1611
1764
|
];
|
|
1612
|
-
},
|
|
1765
|
+
}, Z = (e) => {
|
|
1613
1766
|
let t = { ...e };
|
|
1614
1767
|
return delete t.dynamicDate, delete t.dynamicDateCalc, delete t.dynamicDateRange, delete t.dynamicDateCalcRange, t;
|
|
1615
1768
|
}, bt = (e, t) => ({
|
|
1616
|
-
...
|
|
1769
|
+
...Z(e),
|
|
1617
1770
|
values: t
|
|
1618
|
-
}),
|
|
1619
|
-
let r = [
|
|
1771
|
+
}), Q = (e) => Array.isArray(e.values) ? e.values : [], $ = (e) => `${typeof e}:${typeof e == "object" && e ? JSON.stringify(e) : String(e)}`, xt = (e) => Array.isArray(e.data) ? e.data.map((e) => e[0]) : Object.values(e.data).map((e) => e[0]), St = (e, t, n) => {
|
|
1772
|
+
let r = [K.FilterOperator.Contains, K.FilterOperator.NotContains].includes(t.operator), i = [K.FilterOperator.Like, K.FilterOperator.NotLike].includes(t.operator);
|
|
1620
1773
|
if (!(!r && !i)) return {
|
|
1621
1774
|
dimensions: [{ fieldKey: e }],
|
|
1622
1775
|
measures: [],
|
|
1623
1776
|
filters: [{
|
|
1624
1777
|
fieldKey: e,
|
|
1625
|
-
operator: r ?
|
|
1626
|
-
values: [String(
|
|
1778
|
+
operator: r ? K.FilterOperator.Contains : K.FilterOperator.Like,
|
|
1779
|
+
values: [String(Q(t)[0] ?? "").trim()],
|
|
1627
1780
|
dateLevel: t.dateLevel,
|
|
1628
1781
|
datePart: t.datePart
|
|
1629
1782
|
}],
|
|
1630
1783
|
limit: n
|
|
1631
1784
|
};
|
|
1632
|
-
}, Ct = (e) => e ===
|
|
1633
|
-
let n =
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
].includes(e.operator) ? e.operator : r ?
|
|
1785
|
+
}, Ct = (e) => e === K.FieldType.DATE ? "date" : e === K.FieldType.TIME ? "time" : "datetime-local", wt = (e) => e.dynamicDateCalcRange ? "preset" : e.dynamicDateRange ? "relative" : e.dynamicDateCalc ? "dynamic-calc" : e.dynamicDate ? "dynamic" : [K.FilterOperator.Equals, K.FilterOperator.NotEquals].includes(e.operator) ? "single" : "fixed", Tt = (e, t) => {
|
|
1786
|
+
let n = Z(e), r = [K.FilterOperator.NotEquals, K.FilterOperator.NotBetween].includes(e.operator), i = [
|
|
1787
|
+
K.FilterOperator.Equals,
|
|
1788
|
+
K.FilterOperator.NotEquals,
|
|
1789
|
+
K.FilterOperator.GT,
|
|
1790
|
+
K.FilterOperator.GTE,
|
|
1791
|
+
K.FilterOperator.LT,
|
|
1792
|
+
K.FilterOperator.LTE
|
|
1793
|
+
].includes(e.operator) ? e.operator : r ? K.FilterOperator.NotEquals : K.FilterOperator.Equals;
|
|
1641
1794
|
return t === "single" ? {
|
|
1642
1795
|
...n,
|
|
1643
|
-
operator: r ?
|
|
1796
|
+
operator: r ? K.FilterOperator.NotEquals : K.FilterOperator.Equals,
|
|
1644
1797
|
values: [null]
|
|
1645
1798
|
} : t === "dynamic" ? {
|
|
1646
1799
|
...n,
|
|
@@ -1654,15 +1807,15 @@ var W = /* @__PURE__ */ e(b()), G = x(), K = (e) => typeof e == "object" && !!e
|
|
|
1654
1807
|
...n,
|
|
1655
1808
|
operator: i,
|
|
1656
1809
|
values: [],
|
|
1657
|
-
dynamicDateCalc: { type:
|
|
1810
|
+
dynamicDateCalc: { type: K.DynamicDateCalcType.Today }
|
|
1658
1811
|
} : t === "preset" ? {
|
|
1659
1812
|
...n,
|
|
1660
|
-
operator: r ?
|
|
1813
|
+
operator: r ? K.FilterOperator.NotBetween : K.FilterOperator.Between,
|
|
1661
1814
|
values: [],
|
|
1662
|
-
dynamicDateCalcRange: { type:
|
|
1815
|
+
dynamicDateCalcRange: { type: K.DynamicDateCalcRangeType.Today }
|
|
1663
1816
|
} : t === "relative" ? {
|
|
1664
1817
|
...n,
|
|
1665
|
-
operator: r ?
|
|
1818
|
+
operator: r ? K.FilterOperator.NotBetween : K.FilterOperator.Between,
|
|
1666
1819
|
values: [],
|
|
1667
1820
|
dynamicDateRange: {
|
|
1668
1821
|
offsetBegin: 0,
|
|
@@ -1671,44 +1824,44 @@ var W = /* @__PURE__ */ e(b()), G = x(), K = (e) => typeof e == "object" && !!e
|
|
|
1671
1824
|
}
|
|
1672
1825
|
} : {
|
|
1673
1826
|
...n,
|
|
1674
|
-
operator: r ?
|
|
1827
|
+
operator: r ? K.FilterOperator.NotBetween : K.FilterOperator.Between,
|
|
1675
1828
|
values: [null, null]
|
|
1676
1829
|
};
|
|
1677
|
-
}
|
|
1830
|
+
};
|
|
1678
1831
|
function Et({ filter: e, disabledControls: t, update: n }) {
|
|
1679
|
-
let r =
|
|
1832
|
+
let r = Q(e), i = r[0], a = (i?.valueGeoMinPoint ?? "").split(/[ ,]+/), o = (i?.valueGeoMaxPoint ?? "").split(/[ ,]+/), s = (t, i, s) => {
|
|
1680
1833
|
let c = t === "min" ? a : o;
|
|
1681
1834
|
c[i] = s;
|
|
1682
1835
|
let l = `${c[0] ?? ""} ${c[1] ?? ""}`.trim(), u = r[0], d = {
|
|
1683
1836
|
...u && typeof u == "object" ? u : {},
|
|
1684
|
-
dataType:
|
|
1837
|
+
dataType: K.FilterValueDataType.Geography,
|
|
1685
1838
|
[t === "min" ? "valueGeoMinPoint" : "valueGeoMaxPoint"]: l
|
|
1686
1839
|
};
|
|
1687
1840
|
n({
|
|
1688
1841
|
...e,
|
|
1689
|
-
operator:
|
|
1842
|
+
operator: K.FilterOperator.GeoIntersect,
|
|
1690
1843
|
values: [d]
|
|
1691
1844
|
});
|
|
1692
1845
|
};
|
|
1693
|
-
return /* @__PURE__ */ (0,
|
|
1846
|
+
return /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1694
1847
|
className: "astrato-app-filter-bar__fieldset",
|
|
1695
1848
|
"aria-label": "Geographic bounding box",
|
|
1696
1849
|
children: ["min", "max"].map((e) => {
|
|
1697
1850
|
let n = e === "min" ? a : o;
|
|
1698
|
-
return /* @__PURE__ */ (0,
|
|
1851
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1699
1852
|
className: "astrato-app-filter-bar__row",
|
|
1700
|
-
children: [/* @__PURE__ */ (0,
|
|
1853
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("label", {
|
|
1701
1854
|
className: "astrato-app-filter-bar__label",
|
|
1702
|
-
children: [e === "min" ? "Minimum longitude" : "Maximum longitude", /* @__PURE__ */ (0,
|
|
1855
|
+
children: [e === "min" ? "Minimum longitude" : "Maximum longitude", /* @__PURE__ */ (0, k.jsx)(j, {
|
|
1703
1856
|
className: "astrato-app-filter-bar__control",
|
|
1704
1857
|
type: "number",
|
|
1705
1858
|
value: n[0] ?? "",
|
|
1706
1859
|
disabled: t,
|
|
1707
1860
|
onChange: (t) => s(e, 0, t.currentTarget.value)
|
|
1708
1861
|
})]
|
|
1709
|
-
}), /* @__PURE__ */ (0,
|
|
1862
|
+
}), /* @__PURE__ */ (0, k.jsxs)("label", {
|
|
1710
1863
|
className: "astrato-app-filter-bar__label",
|
|
1711
|
-
children: [e === "min" ? "Minimum latitude" : "Maximum latitude", /* @__PURE__ */ (0,
|
|
1864
|
+
children: [e === "min" ? "Minimum latitude" : "Maximum latitude", /* @__PURE__ */ (0, k.jsx)(j, {
|
|
1712
1865
|
className: "astrato-app-filter-bar__control",
|
|
1713
1866
|
type: "number",
|
|
1714
1867
|
value: n[1] ?? "",
|
|
@@ -1720,12 +1873,12 @@ function Et({ filter: e, disabledControls: t, update: n }) {
|
|
|
1720
1873
|
})
|
|
1721
1874
|
});
|
|
1722
1875
|
}
|
|
1723
|
-
var Dt = Object.values(
|
|
1876
|
+
var Dt = Object.values(K.DynamicDateCalcRangeType).map((e) => ({
|
|
1724
1877
|
value: e,
|
|
1725
|
-
label:
|
|
1726
|
-
})), Ot = Object.values(
|
|
1878
|
+
label: o[e] ?? e
|
|
1879
|
+
})), Ot = Object.values(K.DynamicDateCalcType).map((e) => ({
|
|
1727
1880
|
value: e,
|
|
1728
|
-
label:
|
|
1881
|
+
label: o[e] ?? e
|
|
1729
1882
|
})), kt = [
|
|
1730
1883
|
{
|
|
1731
1884
|
value: "list",
|
|
@@ -1763,33 +1916,33 @@ var Dt = Object.values(G.DynamicDateCalcRangeType).map((e) => ({
|
|
|
1763
1916
|
icon: "geography"
|
|
1764
1917
|
}
|
|
1765
1918
|
], At = {
|
|
1766
|
-
[
|
|
1767
|
-
[
|
|
1768
|
-
[
|
|
1769
|
-
[
|
|
1770
|
-
[
|
|
1771
|
-
[
|
|
1772
|
-
[
|
|
1773
|
-
[
|
|
1774
|
-
[
|
|
1775
|
-
[
|
|
1776
|
-
[
|
|
1777
|
-
[
|
|
1778
|
-
[
|
|
1779
|
-
[
|
|
1780
|
-
[
|
|
1781
|
-
[
|
|
1782
|
-
[
|
|
1919
|
+
[K.FilterOperator.Equals]: "Equals",
|
|
1920
|
+
[K.FilterOperator.NotEquals]: "Does not equal",
|
|
1921
|
+
[K.FilterOperator.InList]: "In list",
|
|
1922
|
+
[K.FilterOperator.NotInList]: "Excluded from list",
|
|
1923
|
+
[K.FilterOperator.GT]: "Greater than",
|
|
1924
|
+
[K.FilterOperator.GTE]: "Greater than or equal",
|
|
1925
|
+
[K.FilterOperator.LT]: "Less than",
|
|
1926
|
+
[K.FilterOperator.LTE]: "Less than or equal",
|
|
1927
|
+
[K.FilterOperator.Set]: "Is set",
|
|
1928
|
+
[K.FilterOperator.NotSet]: "Is not set",
|
|
1929
|
+
[K.FilterOperator.Between]: "Between",
|
|
1930
|
+
[K.FilterOperator.NotBetween]: "Not between",
|
|
1931
|
+
[K.FilterOperator.Like]: "Like",
|
|
1932
|
+
[K.FilterOperator.NotLike]: "Not like",
|
|
1933
|
+
[K.FilterOperator.Contains]: "Contains",
|
|
1934
|
+
[K.FilterOperator.NotContains]: "Does not contain",
|
|
1935
|
+
[K.FilterOperator.GeoIntersect]: "Intersects bounding box"
|
|
1783
1936
|
};
|
|
1784
1937
|
function jt({ field: e, filter: t, editor: n }) {
|
|
1785
|
-
let { editorMode: r, disabledControls: i, update: a, valueList: { searchInput: o, setSearchInput: s } } = n, c =
|
|
1786
|
-
return r === "list" ? /* @__PURE__ */ (0,
|
|
1938
|
+
let { editorMode: r, disabledControls: i, update: a, valueList: { searchInput: o, setSearchInput: s } } = n, c = Q(t);
|
|
1939
|
+
return r === "list" ? /* @__PURE__ */ (0, k.jsx)(ne, {
|
|
1787
1940
|
value: o,
|
|
1788
1941
|
disabled: i,
|
|
1789
1942
|
placeholder: "Search values…",
|
|
1790
1943
|
"aria-label": `Search ${e.name} values`,
|
|
1791
1944
|
onChange: (e) => s(e.currentTarget.value)
|
|
1792
|
-
}) : r === "text" ? /* @__PURE__ */ (0,
|
|
1945
|
+
}) : r === "text" ? /* @__PURE__ */ (0, k.jsx)(j, {
|
|
1793
1946
|
className: "astrato-app-filter-bar__control astrato-app-filter-bar__text-query",
|
|
1794
1947
|
type: "search",
|
|
1795
1948
|
placeholder: "Match text…",
|
|
@@ -1797,31 +1950,31 @@ function jt({ field: e, filter: t, editor: n }) {
|
|
|
1797
1950
|
value: String(c[0] ?? ""),
|
|
1798
1951
|
disabled: i,
|
|
1799
1952
|
onChange: (e) => a({
|
|
1800
|
-
...
|
|
1953
|
+
...Z(t),
|
|
1801
1954
|
values: [e.currentTarget.value]
|
|
1802
1955
|
})
|
|
1803
1956
|
}) : null;
|
|
1804
1957
|
}
|
|
1805
1958
|
function Mt({ field: e, filter: t, editor: n, showAdvancedOperators: r }) {
|
|
1806
|
-
let { editorMode: i, disabledControls: a, isSingleSelect: o, isChangingMode: s, switchMode: c, changeOperator: l, changeExclude: u } = n, d = t.operator ===
|
|
1959
|
+
let { editorMode: i, disabledControls: a, isSingleSelect: o, isChangingMode: s, switchMode: c, changeOperator: l, changeExclude: u } = n, d = t.operator === K.FilterOperator.NotInList || t.operator === K.FilterOperator.NotLike || t.operator === K.FilterOperator.NotBetween || t.operator === K.FilterOperator.NotEquals || t.operator === K.FilterOperator.NotContains, f = kt.filter(({ value: t }) => t === "list" || t === i ? !0 : o ? !1 : t === "text" ? e.dataType !== K.FieldType.BOOLEAN && e.dataType !== K.FieldType.GEOGRAPHY : t === "range" ? _t(e.dataType) : t === "date" && X(e.dataType)), p = kt.find(({ value: e }) => e === i) ?? kt[0], m = f[(f.findIndex(({ value: e }) => e === i) + 1) % f.length], h = f.length > 1 ? `Filter type: ${p.label}. Switch to ${m.label}` : `Filter type: ${p.label}`, g = i === "list" || i === "text" ? /* @__PURE__ */ (0, k.jsx)(jt, {
|
|
1807
1960
|
field: e,
|
|
1808
1961
|
filter: t,
|
|
1809
1962
|
editor: n
|
|
1810
1963
|
}) : null;
|
|
1811
|
-
return /* @__PURE__ */ (0,
|
|
1964
|
+
return /* @__PURE__ */ (0, k.jsx)("header", {
|
|
1812
1965
|
className: "astrato-app-filter-bar__editor-options",
|
|
1813
|
-
children: r ? /* @__PURE__ */ (0,
|
|
1966
|
+
children: r ? /* @__PURE__ */ (0, k.jsx)(M, {
|
|
1814
1967
|
className: "astrato-app-filter-bar__control",
|
|
1815
1968
|
"aria-label": "Filter operator",
|
|
1816
1969
|
value: t.operator,
|
|
1817
1970
|
disabled: a,
|
|
1818
1971
|
onChange: (e) => l(e.currentTarget.value),
|
|
1819
|
-
children: yt(e.dataType).map((e) => /* @__PURE__ */ (0,
|
|
1972
|
+
children: yt(e.dataType).map((e) => /* @__PURE__ */ (0, k.jsx)("option", {
|
|
1820
1973
|
value: e,
|
|
1821
1974
|
children: At[e] ?? e
|
|
1822
1975
|
}, e))
|
|
1823
|
-
}) : /* @__PURE__ */ (0,
|
|
1824
|
-
/* @__PURE__ */ (0,
|
|
1976
|
+
}) : /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [
|
|
1977
|
+
/* @__PURE__ */ (0, k.jsx)(A, {
|
|
1825
1978
|
className: "astrato-app-filter-bar__mode-toggle",
|
|
1826
1979
|
"data-variant": "ghost",
|
|
1827
1980
|
"data-icon-only": "true",
|
|
@@ -1832,16 +1985,16 @@ function Mt({ field: e, filter: t, editor: n, showAdvancedOperators: r }) {
|
|
|
1832
1985
|
"aria-disabled": s || void 0,
|
|
1833
1986
|
"aria-busy": s,
|
|
1834
1987
|
onClick: () => void c(m.value),
|
|
1835
|
-
children: /* @__PURE__ */ (0,
|
|
1988
|
+
children: /* @__PURE__ */ (0, k.jsx)(x, { name: p.icon })
|
|
1836
1989
|
}),
|
|
1837
|
-
g ?? /* @__PURE__ */ (0,
|
|
1990
|
+
g ?? /* @__PURE__ */ (0, k.jsx)("span", {
|
|
1838
1991
|
className: "astrato-app-filter-bar__mode-label",
|
|
1839
1992
|
children: p.label
|
|
1840
1993
|
}),
|
|
1841
|
-
/* @__PURE__ */ (0,
|
|
1994
|
+
/* @__PURE__ */ (0, k.jsxs)("label", {
|
|
1842
1995
|
className: "astrato-app-filter-bar__exclude",
|
|
1843
1996
|
"data-active": d,
|
|
1844
|
-
children: [/* @__PURE__ */ (0,
|
|
1997
|
+
children: [/* @__PURE__ */ (0, k.jsx)(j, {
|
|
1845
1998
|
type: "checkbox",
|
|
1846
1999
|
checked: d,
|
|
1847
2000
|
disabled: a || o && i === "list",
|
|
@@ -1852,48 +2005,48 @@ function Mt({ field: e, filter: t, editor: n, showAdvancedOperators: r }) {
|
|
|
1852
2005
|
});
|
|
1853
2006
|
}
|
|
1854
2007
|
function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
1855
|
-
let r = (t) => n(Tt(e, t));
|
|
1856
|
-
return /* @__PURE__ */ (0,
|
|
2008
|
+
let r = (t) => n(Tt(e, t)), i = e.dynamicDate, a = e.dynamicDateRange;
|
|
2009
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1857
2010
|
className: "astrato-app-filter-bar__fieldset",
|
|
1858
2011
|
children: [
|
|
1859
|
-
/* @__PURE__ */ (0,
|
|
2012
|
+
/* @__PURE__ */ (0, k.jsxs)("label", {
|
|
1860
2013
|
className: "astrato-app-filter-bar__label",
|
|
1861
|
-
children: ["Date mode", /* @__PURE__ */ (0,
|
|
2014
|
+
children: ["Date mode", /* @__PURE__ */ (0, k.jsxs)(M, {
|
|
1862
2015
|
className: "astrato-app-filter-bar__control",
|
|
1863
2016
|
value: wt(e),
|
|
1864
2017
|
disabled: t,
|
|
1865
2018
|
onChange: (e) => r(e.currentTarget.value),
|
|
1866
2019
|
children: [
|
|
1867
|
-
/* @__PURE__ */ (0,
|
|
2020
|
+
/* @__PURE__ */ (0, k.jsx)("option", {
|
|
1868
2021
|
value: "fixed",
|
|
1869
2022
|
children: "Fixed range"
|
|
1870
2023
|
}),
|
|
1871
|
-
/* @__PURE__ */ (0,
|
|
2024
|
+
/* @__PURE__ */ (0, k.jsx)("option", {
|
|
1872
2025
|
value: "single",
|
|
1873
2026
|
children: "Specific date"
|
|
1874
2027
|
}),
|
|
1875
|
-
/* @__PURE__ */ (0,
|
|
2028
|
+
/* @__PURE__ */ (0, k.jsx)("option", {
|
|
1876
2029
|
value: "dynamic",
|
|
1877
2030
|
children: "Dynamic date"
|
|
1878
2031
|
}),
|
|
1879
|
-
/* @__PURE__ */ (0,
|
|
2032
|
+
/* @__PURE__ */ (0, k.jsx)("option", {
|
|
1880
2033
|
value: "dynamic-calc",
|
|
1881
2034
|
children: "Dynamic date preset"
|
|
1882
2035
|
}),
|
|
1883
|
-
/* @__PURE__ */ (0,
|
|
2036
|
+
/* @__PURE__ */ (0, k.jsx)("option", {
|
|
1884
2037
|
value: "preset",
|
|
1885
2038
|
children: "Predefined period"
|
|
1886
2039
|
}),
|
|
1887
|
-
/* @__PURE__ */ (0,
|
|
2040
|
+
/* @__PURE__ */ (0, k.jsx)("option", {
|
|
1888
2041
|
value: "relative",
|
|
1889
2042
|
children: "Relative range"
|
|
1890
2043
|
})
|
|
1891
2044
|
]
|
|
1892
2045
|
})]
|
|
1893
2046
|
}),
|
|
1894
|
-
e.dynamicDateCalcRange && /* @__PURE__ */ (0,
|
|
2047
|
+
e.dynamicDateCalcRange && /* @__PURE__ */ (0, k.jsxs)("label", {
|
|
1895
2048
|
className: "astrato-app-filter-bar__label",
|
|
1896
|
-
children: ["Period", /* @__PURE__ */ (0,
|
|
2049
|
+
children: ["Period", /* @__PURE__ */ (0, k.jsx)(M, {
|
|
1897
2050
|
className: "astrato-app-filter-bar__control",
|
|
1898
2051
|
value: e.dynamicDateCalcRange.type,
|
|
1899
2052
|
disabled: t,
|
|
@@ -1901,15 +2054,15 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
1901
2054
|
...e,
|
|
1902
2055
|
dynamicDateCalcRange: { type: t.currentTarget.value }
|
|
1903
2056
|
}),
|
|
1904
|
-
children: Dt.map(({ value: e, label: t }) => /* @__PURE__ */ (0,
|
|
2057
|
+
children: Dt.map(({ value: e, label: t }) => /* @__PURE__ */ (0, k.jsx)("option", {
|
|
1905
2058
|
value: e,
|
|
1906
2059
|
children: t
|
|
1907
2060
|
}, e))
|
|
1908
2061
|
})]
|
|
1909
2062
|
}),
|
|
1910
|
-
e.dynamicDateCalc && /* @__PURE__ */ (0,
|
|
2063
|
+
e.dynamicDateCalc && /* @__PURE__ */ (0, k.jsxs)("label", {
|
|
1911
2064
|
className: "astrato-app-filter-bar__label",
|
|
1912
|
-
children: ["Dynamic date", /* @__PURE__ */ (0,
|
|
2065
|
+
children: ["Dynamic date", /* @__PURE__ */ (0, k.jsx)(M, {
|
|
1913
2066
|
className: "astrato-app-filter-bar__control",
|
|
1914
2067
|
value: e.dynamicDateCalc.type,
|
|
1915
2068
|
disabled: t,
|
|
@@ -1917,39 +2070,39 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
1917
2070
|
...e,
|
|
1918
2071
|
dynamicDateCalc: { type: t.currentTarget.value }
|
|
1919
2072
|
}),
|
|
1920
|
-
children: Ot.map(({ value: e, label: t }) => /* @__PURE__ */ (0,
|
|
2073
|
+
children: Ot.map(({ value: e, label: t }) => /* @__PURE__ */ (0, k.jsx)("option", {
|
|
1921
2074
|
value: e,
|
|
1922
2075
|
children: t
|
|
1923
2076
|
}, e))
|
|
1924
2077
|
})]
|
|
1925
2078
|
}),
|
|
1926
|
-
|
|
2079
|
+
i && /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1927
2080
|
className: "astrato-app-filter-bar__row",
|
|
1928
|
-
children: [/* @__PURE__ */ (0,
|
|
2081
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("label", {
|
|
1929
2082
|
className: "astrato-app-filter-bar__label",
|
|
1930
|
-
children: ["Offset", /* @__PURE__ */ (0,
|
|
2083
|
+
children: ["Offset", /* @__PURE__ */ (0, k.jsx)(j, {
|
|
1931
2084
|
className: "astrato-app-filter-bar__control",
|
|
1932
2085
|
type: "number",
|
|
1933
|
-
value:
|
|
2086
|
+
value: i.offset,
|
|
1934
2087
|
disabled: t,
|
|
1935
2088
|
onChange: (t) => n({
|
|
1936
2089
|
...e,
|
|
1937
2090
|
dynamicDate: {
|
|
1938
|
-
...
|
|
2091
|
+
...i,
|
|
1939
2092
|
offset: Number(t.currentTarget.value)
|
|
1940
2093
|
}
|
|
1941
2094
|
})
|
|
1942
2095
|
})]
|
|
1943
|
-
}), /* @__PURE__ */ (0,
|
|
2096
|
+
}), /* @__PURE__ */ (0, k.jsxs)("label", {
|
|
1944
2097
|
className: "astrato-app-filter-bar__label",
|
|
1945
|
-
children: ["Unit", /* @__PURE__ */ (0,
|
|
2098
|
+
children: ["Unit", /* @__PURE__ */ (0, k.jsx)(M, {
|
|
1946
2099
|
className: "astrato-app-filter-bar__control",
|
|
1947
|
-
value:
|
|
2100
|
+
value: i.part,
|
|
1948
2101
|
disabled: t,
|
|
1949
2102
|
onChange: (t) => n({
|
|
1950
2103
|
...e,
|
|
1951
2104
|
dynamicDate: {
|
|
1952
|
-
...
|
|
2105
|
+
...i,
|
|
1953
2106
|
part: t.currentTarget.value
|
|
1954
2107
|
}
|
|
1955
2108
|
}),
|
|
@@ -1962,58 +2115,58 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
1962
2115
|
"hour",
|
|
1963
2116
|
"minute",
|
|
1964
2117
|
"second"
|
|
1965
|
-
].map((e) => /* @__PURE__ */ (0,
|
|
2118
|
+
].map((e) => /* @__PURE__ */ (0, k.jsx)("option", {
|
|
1966
2119
|
value: e,
|
|
1967
2120
|
children: e
|
|
1968
2121
|
}, e))
|
|
1969
2122
|
})]
|
|
1970
2123
|
})]
|
|
1971
2124
|
}),
|
|
1972
|
-
|
|
2125
|
+
a && /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1973
2126
|
className: "astrato-app-filter-bar__row",
|
|
1974
2127
|
children: [
|
|
1975
|
-
/* @__PURE__ */ (0,
|
|
2128
|
+
/* @__PURE__ */ (0, k.jsxs)("label", {
|
|
1976
2129
|
className: "astrato-app-filter-bar__label",
|
|
1977
|
-
children: ["Start offset", /* @__PURE__ */ (0,
|
|
2130
|
+
children: ["Start offset", /* @__PURE__ */ (0, k.jsx)(j, {
|
|
1978
2131
|
className: "astrato-app-filter-bar__control",
|
|
1979
2132
|
type: "number",
|
|
1980
|
-
value:
|
|
2133
|
+
value: a.offsetBegin,
|
|
1981
2134
|
disabled: t,
|
|
1982
2135
|
onChange: (t) => n({
|
|
1983
2136
|
...e,
|
|
1984
2137
|
dynamicDateRange: {
|
|
1985
|
-
...
|
|
2138
|
+
...a,
|
|
1986
2139
|
offsetBegin: Number(t.currentTarget.value)
|
|
1987
2140
|
}
|
|
1988
2141
|
})
|
|
1989
2142
|
})]
|
|
1990
2143
|
}),
|
|
1991
|
-
/* @__PURE__ */ (0,
|
|
2144
|
+
/* @__PURE__ */ (0, k.jsxs)("label", {
|
|
1992
2145
|
className: "astrato-app-filter-bar__label",
|
|
1993
|
-
children: ["End offset", /* @__PURE__ */ (0,
|
|
2146
|
+
children: ["End offset", /* @__PURE__ */ (0, k.jsx)(j, {
|
|
1994
2147
|
className: "astrato-app-filter-bar__control",
|
|
1995
2148
|
type: "number",
|
|
1996
|
-
value:
|
|
2149
|
+
value: a.offsetEnd,
|
|
1997
2150
|
disabled: t,
|
|
1998
2151
|
onChange: (t) => n({
|
|
1999
2152
|
...e,
|
|
2000
2153
|
dynamicDateRange: {
|
|
2001
|
-
...
|
|
2154
|
+
...a,
|
|
2002
2155
|
offsetEnd: Number(t.currentTarget.value)
|
|
2003
2156
|
}
|
|
2004
2157
|
})
|
|
2005
2158
|
})]
|
|
2006
2159
|
}),
|
|
2007
|
-
/* @__PURE__ */ (0,
|
|
2160
|
+
/* @__PURE__ */ (0, k.jsxs)("label", {
|
|
2008
2161
|
className: "astrato-app-filter-bar__label",
|
|
2009
|
-
children: ["Unit", /* @__PURE__ */ (0,
|
|
2162
|
+
children: ["Unit", /* @__PURE__ */ (0, k.jsx)(M, {
|
|
2010
2163
|
className: "astrato-app-filter-bar__control",
|
|
2011
|
-
value:
|
|
2164
|
+
value: a.part,
|
|
2012
2165
|
disabled: t,
|
|
2013
2166
|
onChange: (t) => n({
|
|
2014
2167
|
...e,
|
|
2015
2168
|
dynamicDateRange: {
|
|
2016
|
-
...
|
|
2169
|
+
...a,
|
|
2017
2170
|
part: t.currentTarget.value
|
|
2018
2171
|
}
|
|
2019
2172
|
}),
|
|
@@ -2026,7 +2179,7 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
2026
2179
|
"hour",
|
|
2027
2180
|
"minute",
|
|
2028
2181
|
"second"
|
|
2029
|
-
].map((e) => /* @__PURE__ */ (0,
|
|
2182
|
+
].map((e) => /* @__PURE__ */ (0, k.jsx)("option", {
|
|
2030
2183
|
value: e,
|
|
2031
2184
|
children: e
|
|
2032
2185
|
}, e))
|
|
@@ -2038,24 +2191,24 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
2038
2191
|
});
|
|
2039
2192
|
}
|
|
2040
2193
|
function Pt(e) {
|
|
2041
|
-
let { field: t, filter: n, editorMode: r, timeZone: i, disabledControls: a, update: o } = e, s =
|
|
2042
|
-
return /* @__PURE__ */ (0,
|
|
2194
|
+
let { field: t, filter: n, editorMode: r, timeZone: i, disabledControls: a, update: o } = e, s = Q(n);
|
|
2195
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2043
2196
|
className: "astrato-app-filter-bar__values",
|
|
2044
|
-
children: [r === "date" && /* @__PURE__ */ (0,
|
|
2197
|
+
children: [r === "date" && /* @__PURE__ */ (0, k.jsx)(Nt, { ...e }), !n.dynamicDateCalcRange && !n.dynamicDateRange && !n.dynamicDate && !n.dynamicDateCalc && /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2045
2198
|
className: "astrato-app-filter-bar__row astrato-app-filter-bar__range-inputs",
|
|
2046
|
-
children: ([
|
|
2199
|
+
children: ([K.FilterOperator.Equals, K.FilterOperator.NotEquals].includes(n.operator) ? [0] : [0, 1]).map((e) => /* @__PURE__ */ (0, k.jsxs)("label", {
|
|
2047
2200
|
className: "astrato-app-filter-bar__label",
|
|
2048
|
-
children: [[
|
|
2201
|
+
children: [[K.FilterOperator.Equals, K.FilterOperator.NotEquals].includes(n.operator) ? "Date" : e === 0 ? "From" : "To", /* @__PURE__ */ (0, k.jsx)(j, {
|
|
2049
2202
|
className: "astrato-app-filter-bar__control",
|
|
2050
2203
|
type: r === "date" ? Ct(t.dataType) : "number",
|
|
2051
|
-
step: r === "date" && t.dataType !==
|
|
2204
|
+
step: r === "date" && t.dataType !== K.FieldType.DATE ? "0.001" : void 0,
|
|
2052
2205
|
value: r === "date" ? mt(s[e], t.dataType, i) : String(s[e] ?? ""),
|
|
2053
2206
|
disabled: a,
|
|
2054
2207
|
onChange: (a) => {
|
|
2055
2208
|
let c = [s[0] ?? null, s[1] ?? null];
|
|
2056
2209
|
c[e] = r === "date" ? ht(a.currentTarget.value, t.dataType, i) : a.currentTarget.value === "" ? null : Number(a.currentTarget.value), o({
|
|
2057
|
-
...
|
|
2058
|
-
values: ft(c, [
|
|
2210
|
+
...Z(n),
|
|
2211
|
+
values: ft(c, [K.FilterOperator.Equals, K.FilterOperator.NotEquals].includes(n.operator))
|
|
2059
2212
|
});
|
|
2060
2213
|
}
|
|
2061
2214
|
})]
|
|
@@ -2064,162 +2217,162 @@ function Pt(e) {
|
|
|
2064
2217
|
});
|
|
2065
2218
|
}
|
|
2066
2219
|
function Ft({ field: e, filter: t, timeZone: n, disabledControls: r, update: i }) {
|
|
2067
|
-
let a =
|
|
2068
|
-
return /* @__PURE__ */ (0,
|
|
2220
|
+
let a = Q(t);
|
|
2221
|
+
return /* @__PURE__ */ (0, k.jsxs)("label", {
|
|
2069
2222
|
className: "astrato-app-filter-bar__label",
|
|
2070
|
-
children: ["Value", e.dataType ===
|
|
2223
|
+
children: ["Value", e.dataType === K.FieldType.BOOLEAN ? /* @__PURE__ */ (0, k.jsxs)(M, {
|
|
2071
2224
|
className: "astrato-app-filter-bar__control",
|
|
2072
2225
|
value: a[0] == null ? "" : String(a[0]),
|
|
2073
2226
|
disabled: r,
|
|
2074
2227
|
onChange: (e) => i({
|
|
2075
|
-
...
|
|
2228
|
+
...Z(t),
|
|
2076
2229
|
values: [e.currentTarget.value === "" ? null : e.currentTarget.value === "true"]
|
|
2077
2230
|
}),
|
|
2078
2231
|
children: [
|
|
2079
|
-
/* @__PURE__ */ (0,
|
|
2232
|
+
/* @__PURE__ */ (0, k.jsx)("option", {
|
|
2080
2233
|
value: "",
|
|
2081
2234
|
children: "Choose a value"
|
|
2082
2235
|
}),
|
|
2083
|
-
/* @__PURE__ */ (0,
|
|
2236
|
+
/* @__PURE__ */ (0, k.jsx)("option", {
|
|
2084
2237
|
value: "true",
|
|
2085
2238
|
children: "True"
|
|
2086
2239
|
}),
|
|
2087
|
-
/* @__PURE__ */ (0,
|
|
2240
|
+
/* @__PURE__ */ (0, k.jsx)("option", {
|
|
2088
2241
|
value: "false",
|
|
2089
2242
|
children: "False"
|
|
2090
2243
|
})
|
|
2091
2244
|
]
|
|
2092
|
-
}) : /* @__PURE__ */ (0,
|
|
2245
|
+
}) : /* @__PURE__ */ (0, k.jsx)(j, {
|
|
2093
2246
|
className: "astrato-app-filter-bar__control",
|
|
2094
|
-
type:
|
|
2095
|
-
step:
|
|
2096
|
-
value:
|
|
2247
|
+
type: X(e.dataType) ? Ct(e.dataType) : _t(e.dataType) ? "number" : "text",
|
|
2248
|
+
step: X(e.dataType) && e.dataType !== K.FieldType.DATE ? "0.001" : void 0,
|
|
2249
|
+
value: X(e.dataType) ? mt(a[0], e.dataType, n) : String(a[0] ?? ""),
|
|
2097
2250
|
disabled: r,
|
|
2098
2251
|
onChange: (r) => i({
|
|
2099
|
-
...
|
|
2100
|
-
values: [
|
|
2252
|
+
...Z(t),
|
|
2253
|
+
values: [X(e.dataType) ? ht(r.currentTarget.value, e.dataType, n) : _t(e.dataType) ? r.currentTarget.value === "" ? null : Number(r.currentTarget.value) : r.currentTarget.value]
|
|
2101
2254
|
})
|
|
2102
2255
|
})]
|
|
2103
2256
|
});
|
|
2104
2257
|
}
|
|
2105
|
-
function It({ field: e, filter: t, editor: n, showAdvancedOperators:
|
|
2106
|
-
let
|
|
2258
|
+
function It({ field: e, filter: t, editor: n, showAdvancedOperators: r }) {
|
|
2259
|
+
let i = (0, O.useId)(), { update: o, valuesSelected: s, isSingleSelect: c, disabledControls: l, valueList: u } = n, { values: d, availableValues: f, availableSelectedValues: p, searchQuery: m, hasConnectedFilters: h, showAllValues: g, setShowAllValues: _, sortDirection: v, toggleSortDirection: y, isRefreshingValues: b, isLoadingMore: S, loadMoreError: C, canLoadMore: w, loadMore: T, valueListRef: E, nextPageRef: ee } = u, D = /* @__PURE__ */ (0, k.jsx)(jt, {
|
|
2107
2260
|
field: e,
|
|
2108
2261
|
filter: t,
|
|
2109
2262
|
editor: n
|
|
2110
|
-
}),
|
|
2111
|
-
let n =
|
|
2263
|
+
}), M = (e) => {
|
|
2264
|
+
let n = Q(t), r = $(e), i = s.has(r) ? n.filter((e) => $(e) !== r) : [...n, e];
|
|
2112
2265
|
o(bt(t, c ? [e] : i));
|
|
2113
|
-
},
|
|
2114
|
-
let e = new Set(d.map(
|
|
2266
|
+
}, ne = () => {
|
|
2267
|
+
let e = new Set(d.map($)), n = Q(t).filter((t) => !e.has($(t)));
|
|
2115
2268
|
o(bt(t, [...n, ...d]));
|
|
2116
|
-
},
|
|
2117
|
-
let e = new Set(d.map(
|
|
2118
|
-
o(bt(t,
|
|
2119
|
-
},
|
|
2120
|
-
let e = new Set(d.map(
|
|
2121
|
-
n.push(...d.filter((e) => !s.has(
|
|
2122
|
-
},
|
|
2123
|
-
return /* @__PURE__ */ (0,
|
|
2269
|
+
}, P = () => {
|
|
2270
|
+
let e = new Set(d.map($));
|
|
2271
|
+
o(bt(t, Q(t).filter((t) => !e.has($(t)))));
|
|
2272
|
+
}, re = () => {
|
|
2273
|
+
let e = new Set(d.map($)), n = Q(t).filter((t) => !e.has($(t)));
|
|
2274
|
+
n.push(...d.filter((e) => !s.has($(e)))), o(bt(t, n));
|
|
2275
|
+
}, F = () => o(bt(t, f)), I = Q(t), L = m ? d : [...new Map([...d, ...I].map((e) => [$(e), e])).values()], ie = new Set([...f, ...p].map($));
|
|
2276
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2124
2277
|
className: "astrato-app-filter-bar__list-editor",
|
|
2125
2278
|
children: [
|
|
2126
|
-
|
|
2279
|
+
r && /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2127
2280
|
className: "astrato-app-filter-bar__search-row",
|
|
2128
|
-
children:
|
|
2281
|
+
children: D
|
|
2129
2282
|
}),
|
|
2130
|
-
/* @__PURE__ */ (0,
|
|
2283
|
+
/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2131
2284
|
className: "astrato-app-filter-bar__selection-toolbar",
|
|
2132
2285
|
children: [
|
|
2133
|
-
/* @__PURE__ */ (0,
|
|
2286
|
+
/* @__PURE__ */ (0, k.jsxs)("span", {
|
|
2134
2287
|
className: "astrato-app-filter-bar__muted",
|
|
2135
2288
|
role: "status",
|
|
2136
|
-
children: [
|
|
2289
|
+
children: [I.length, " selected"]
|
|
2137
2290
|
}),
|
|
2138
|
-
/* @__PURE__ */ (0,
|
|
2291
|
+
/* @__PURE__ */ (0, k.jsx)(A, {
|
|
2139
2292
|
"data-variant": "ghost",
|
|
2140
2293
|
"data-icon-only": "true",
|
|
2141
2294
|
disabled: l,
|
|
2142
|
-
"aria-label": v ===
|
|
2143
|
-
title: v ===
|
|
2295
|
+
"aria-label": v === a.Asc ? "Sort descending" : "Sort ascending",
|
|
2296
|
+
title: v === a.Asc ? "Sorted ascending. Switch to descending." : "Sorted descending. Switch to ascending.",
|
|
2144
2297
|
onClick: y,
|
|
2145
|
-
children: /* @__PURE__ */ (0,
|
|
2298
|
+
children: /* @__PURE__ */ (0, k.jsx)(x, { name: v === a.Asc ? "sortAsc" : "sortDesc" })
|
|
2146
2299
|
}),
|
|
2147
|
-
/* @__PURE__ */ (0,
|
|
2300
|
+
/* @__PURE__ */ (0, k.jsx)(A, {
|
|
2148
2301
|
"data-variant": "ghost",
|
|
2149
2302
|
"aria-label": "Select loaded values",
|
|
2150
2303
|
title: "Select all values currently loaded in this list",
|
|
2151
2304
|
disabled: l || c || b || !d.length,
|
|
2152
|
-
onClick:
|
|
2305
|
+
onClick: ne,
|
|
2153
2306
|
children: "Select all"
|
|
2154
2307
|
}),
|
|
2155
|
-
/* @__PURE__ */ (0,
|
|
2308
|
+
/* @__PURE__ */ (0, k.jsx)(N, { actions: [
|
|
2156
2309
|
{
|
|
2157
2310
|
label: "Deselect loaded values",
|
|
2158
|
-
onSelect:
|
|
2311
|
+
onSelect: P,
|
|
2159
2312
|
disabled: l || c || b || !d.length
|
|
2160
2313
|
},
|
|
2161
2314
|
{
|
|
2162
2315
|
label: "Invert loaded selection",
|
|
2163
|
-
onSelect:
|
|
2316
|
+
onSelect: re,
|
|
2164
2317
|
disabled: l || c || b || !d.length
|
|
2165
2318
|
},
|
|
2166
2319
|
{
|
|
2167
2320
|
label: "Select loaded available values",
|
|
2168
|
-
onSelect:
|
|
2321
|
+
onSelect: F,
|
|
2169
2322
|
disabled: l || c || b || !f.length
|
|
2170
2323
|
},
|
|
2171
2324
|
{
|
|
2172
2325
|
label: "Clear values",
|
|
2173
2326
|
onSelect: () => o(bt(t, [])),
|
|
2174
|
-
disabled: l || c || !
|
|
2327
|
+
disabled: l || c || !I.length
|
|
2175
2328
|
}
|
|
2176
2329
|
] })
|
|
2177
2330
|
]
|
|
2178
2331
|
}),
|
|
2179
|
-
h && /* @__PURE__ */ (0,
|
|
2332
|
+
h && /* @__PURE__ */ (0, k.jsxs)("label", {
|
|
2180
2333
|
className: "astrato-app-filter-bar__availability",
|
|
2181
|
-
children: [/* @__PURE__ */ (0,
|
|
2334
|
+
children: [/* @__PURE__ */ (0, k.jsx)(j, {
|
|
2182
2335
|
type: "checkbox",
|
|
2183
2336
|
checked: g,
|
|
2184
2337
|
disabled: l || b,
|
|
2185
2338
|
onChange: (e) => _(e.currentTarget.checked)
|
|
2186
2339
|
}), "Include unavailable values"]
|
|
2187
2340
|
}),
|
|
2188
|
-
/* @__PURE__ */ (0,
|
|
2341
|
+
/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2189
2342
|
className: "astrato-app-filter-bar__value-viewport",
|
|
2190
2343
|
"data-loading": b,
|
|
2191
|
-
children: [/* @__PURE__ */ (0,
|
|
2344
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2192
2345
|
className: "astrato-app-filter-bar__value-list",
|
|
2193
2346
|
ref: E,
|
|
2194
2347
|
"aria-busy": b,
|
|
2195
2348
|
children: [
|
|
2196
|
-
|
|
2197
|
-
let t =
|
|
2198
|
-
return /* @__PURE__ */ (0,
|
|
2349
|
+
L.map((e) => {
|
|
2350
|
+
let t = $(e);
|
|
2351
|
+
return /* @__PURE__ */ (0, k.jsxs)("label", {
|
|
2199
2352
|
className: "astrato-app-filter-bar__value",
|
|
2200
2353
|
"data-selected": s.has(t),
|
|
2201
|
-
"data-excluded": h && !
|
|
2202
|
-
children: [/* @__PURE__ */ (0,
|
|
2354
|
+
"data-excluded": h && !ie.has(t),
|
|
2355
|
+
children: [/* @__PURE__ */ (0, k.jsx)(j, {
|
|
2203
2356
|
type: c ? "radio" : "checkbox",
|
|
2204
|
-
name: c ?
|
|
2357
|
+
name: c ? i : void 0,
|
|
2205
2358
|
checked: s.has(t),
|
|
2206
2359
|
disabled: l || b,
|
|
2207
|
-
onChange: () =>
|
|
2208
|
-
}), /* @__PURE__ */ (0,
|
|
2360
|
+
onChange: () => M(e)
|
|
2361
|
+
}), /* @__PURE__ */ (0, k.jsx)("span", { children: e == null ? "Null" : typeof e == "object" ? "value" in e ? String(e.value) : JSON.stringify(e) : String(e) })]
|
|
2209
2362
|
}, t);
|
|
2210
2363
|
}),
|
|
2211
|
-
!
|
|
2364
|
+
!L.length && !b && /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2212
2365
|
className: "astrato-app-filter-bar__empty",
|
|
2213
2366
|
children: "No matching values"
|
|
2214
2367
|
}),
|
|
2215
|
-
|
|
2368
|
+
w && /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2216
2369
|
className: "astrato-app-filter-bar__next-page",
|
|
2217
|
-
ref:
|
|
2218
|
-
children: [
|
|
2370
|
+
ref: ee,
|
|
2371
|
+
children: [S && /* @__PURE__ */ (0, k.jsx)(te, { label: "Loading more values" }), C && /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [/* @__PURE__ */ (0, k.jsx)("span", {
|
|
2219
2372
|
role: "alert",
|
|
2220
2373
|
className: "astrato-app-filter-bar__error",
|
|
2221
|
-
children:
|
|
2222
|
-
}), /* @__PURE__ */ (0,
|
|
2374
|
+
children: C
|
|
2375
|
+
}), /* @__PURE__ */ (0, k.jsx)(A, {
|
|
2223
2376
|
"data-variant": "ghost",
|
|
2224
2377
|
disabled: l,
|
|
2225
2378
|
onClick: () => void T(),
|
|
@@ -2227,26 +2380,26 @@ function It({ field: e, filter: t, editor: n, showAdvancedOperators: i }) {
|
|
|
2227
2380
|
})] })]
|
|
2228
2381
|
})
|
|
2229
2382
|
]
|
|
2230
|
-
}), b && /* @__PURE__ */ (0,
|
|
2383
|
+
}), b && /* @__PURE__ */ (0, k.jsx)(te, { label: "Loading values" })]
|
|
2231
2384
|
})
|
|
2232
2385
|
]
|
|
2233
2386
|
});
|
|
2234
2387
|
}
|
|
2235
2388
|
var Lt = (e, t) => {
|
|
2236
|
-
let n = e.getSelection(), r = Bt(e, n, t), i = n.applied.find(We), a = i ?
|
|
2389
|
+
let n = e.getSelection(), r = Bt(e, n, t), i = n.applied.find(We), a = i ? J(i) : void 0;
|
|
2237
2390
|
return {
|
|
2238
2391
|
connectedFilters: r,
|
|
2239
2392
|
associativeListFilter: i && a && (a === t || e.areFieldsConnected(t, a)) ? i.associativeListFilter : void 0
|
|
2240
2393
|
};
|
|
2241
|
-
}, Rt = async (e, t, n,
|
|
2242
|
-
let
|
|
2243
|
-
if (!
|
|
2244
|
-
let { connectedFilters: o, associativeListFilter: s } = Lt(e, t.key), c = Ht(t.key, 0,
|
|
2394
|
+
}, Rt = async (e, t, n, r) => {
|
|
2395
|
+
let i = qt(Kt(r));
|
|
2396
|
+
if (!i.length) return [];
|
|
2397
|
+
let { connectedFilters: o, associativeListFilter: s } = Lt(e, t.key), c = Ht(t.key, 0, i.length, a.Asc, [...o, {
|
|
2245
2398
|
fieldKey: t.key,
|
|
2246
2399
|
...n.dateLevel ? { dateLevel: n.dateLevel } : {},
|
|
2247
2400
|
...n.datePart ? { datePart: n.datePart } : {},
|
|
2248
|
-
operator:
|
|
2249
|
-
values:
|
|
2401
|
+
operator: K.FilterOperator.InList,
|
|
2402
|
+
values: i
|
|
2250
2403
|
}], n.dateLevel, n.datePart, s);
|
|
2251
2404
|
return Gt((await e.query(c)).data);
|
|
2252
2405
|
}, zt = async (e, t, n, r) => {
|
|
@@ -2289,34 +2442,34 @@ var Lt = (e, t) => {
|
|
|
2289
2442
|
let n = t.split(" ").filter((e) => e !== ""), r = Wt(e.dataType) ? n.map(Number).filter((e) => Number.isFinite(e)) : n;
|
|
2290
2443
|
if (r.length > 0) return {
|
|
2291
2444
|
fieldKey: e.key,
|
|
2292
|
-
operator:
|
|
2445
|
+
operator: K.FilterOperator.InList,
|
|
2293
2446
|
values: r
|
|
2294
2447
|
};
|
|
2295
2448
|
}
|
|
2296
2449
|
return {
|
|
2297
2450
|
fieldKey: e.key,
|
|
2298
|
-
operator:
|
|
2451
|
+
operator: K.FilterOperator.Like,
|
|
2299
2452
|
values: [t.toLocaleLowerCase()]
|
|
2300
2453
|
};
|
|
2301
2454
|
}, Wt = (e) => [
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2455
|
+
K.FieldType.DECIMAL,
|
|
2456
|
+
K.FieldType.FLOAT,
|
|
2457
|
+
K.FieldType.INT,
|
|
2458
|
+
K.FieldType.REAL
|
|
2306
2459
|
].includes(e), Gt = (e) => Array.isArray(e) ? e.map((e) => e[0]) : Object.values(e).map((e) => e[0]), Kt = (e) => Array.isArray(e) ? e.filter((e) => e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean") : [], qt = (e) => [...new Set(e)], Jt = (e, t) => e === t || JSON.stringify(e) === JSON.stringify(t);
|
|
2307
|
-
function Yt({ field: e, filter: t, services: n, editorMode:
|
|
2308
|
-
let [s, c] = (0,
|
|
2460
|
+
function Yt({ field: e, filter: t, services: n, editorMode: r, disabledControls: i, onError: o }) {
|
|
2461
|
+
let [s, c] = (0, O.useState)(""), [l, u] = (0, O.useState)(""), [d, f] = (0, O.useState)([]), [p, m] = (0, O.useState)([]), [h, g] = (0, O.useState)([]), [_, v] = (0, O.useState)(!1), [y, b] = (0, O.useState)(!1), [x, S] = (0, O.useState)(!1), [C, w] = (0, O.useState)(!1), [T, E] = (0, O.useState)(0), [ee, D] = (0, O.useState)(!0), [k, te] = (0, O.useState)(!1), [A, j] = (0, O.useState)(null), [M, ne] = (0, O.useState)(a.Asc), [, N] = (0, O.useState)(0), [P, re] = (0, O.useState)(null), F = (0, O.useRef)(/* @__PURE__ */ new Map()), I = (0, O.useRef)(0), L = (0, O.useRef)(null), ie = (0, O.useRef)(null), ae = (0, O.useRef)(null), oe = (0, O.useRef)({
|
|
2309
2462
|
field: e,
|
|
2310
2463
|
filter: t,
|
|
2311
2464
|
searchQuery: l,
|
|
2312
|
-
sortDirection:
|
|
2465
|
+
sortDirection: M,
|
|
2313
2466
|
showAllValues: C
|
|
2314
2467
|
});
|
|
2315
|
-
|
|
2468
|
+
oe.current = {
|
|
2316
2469
|
field: e,
|
|
2317
2470
|
filter: t,
|
|
2318
2471
|
searchQuery: l,
|
|
2319
|
-
sortDirection:
|
|
2472
|
+
sortDirection: M,
|
|
2320
2473
|
showAllValues: C
|
|
2321
2474
|
};
|
|
2322
2475
|
let R = JSON.stringify([
|
|
@@ -2325,117 +2478,117 @@ function Yt({ field: e, filter: t, services: n, editorMode: i, disabledControls:
|
|
|
2325
2478
|
t.dateLevel,
|
|
2326
2479
|
t.datePart,
|
|
2327
2480
|
l,
|
|
2328
|
-
|
|
2481
|
+
M,
|
|
2329
2482
|
C,
|
|
2330
2483
|
Lt(n, e.key)
|
|
2331
|
-
]),
|
|
2332
|
-
(0,
|
|
2484
|
+
]), z = JSON.stringify(Q(t)), B = ee || s !== l, V = x && !C ? y : _;
|
|
2485
|
+
(0, O.useEffect)(() => {
|
|
2333
2486
|
let e = setTimeout(() => u(s), 300);
|
|
2334
2487
|
return () => clearTimeout(e);
|
|
2335
|
-
}, [s]), (0,
|
|
2336
|
-
if (
|
|
2337
|
-
let { field: e, filter: t, searchQuery:
|
|
2338
|
-
return
|
|
2339
|
-
searchQuery:
|
|
2488
|
+
}, [s]), (0, O.useEffect)(() => n.subscribe(() => N((e) => e + 1)), [n]), (0, O.useEffect)(() => {
|
|
2489
|
+
if (r !== "list") return;
|
|
2490
|
+
let { field: e, filter: t, searchQuery: i, sortDirection: a, showAllValues: s } = oe.current, c = ++I.current;
|
|
2491
|
+
return L.current = null, D(!0), te(!1), j(null), o(null), re(null), F.current.clear(), zt(n, e, t, {
|
|
2492
|
+
searchQuery: i,
|
|
2340
2493
|
sortDirection: a,
|
|
2341
2494
|
offset: 0,
|
|
2342
2495
|
availableOffset: 0,
|
|
2343
2496
|
limit: 100
|
|
2344
2497
|
}).then((e) => {
|
|
2345
|
-
if (
|
|
2346
|
-
let n = e.hasConnectedFilters && !s ? [...e.availableValues, ...e.selectedExcluded] : e.values,
|
|
2347
|
-
f([...new Map([...
|
|
2348
|
-
let a = new Set(e.selectedExcluded.map(
|
|
2349
|
-
g(o), e.availableValues.forEach((e) =>
|
|
2498
|
+
if (I.current !== c) return;
|
|
2499
|
+
let n = e.hasConnectedFilters && !s ? [...e.availableValues, ...e.selectedExcluded] : e.values, r = i ? [] : Q(t);
|
|
2500
|
+
f([...new Map([...r, ...n].map((e) => [$(e), e])).values()]), m(e.availableValues);
|
|
2501
|
+
let a = new Set(e.selectedExcluded.map($)), o = Q(t).filter((e) => !a.has($(e)));
|
|
2502
|
+
g(o), e.availableValues.forEach((e) => F.current.set($(e), !0)), Q(t).forEach((e) => F.current.set($(e), !a.has($(e)))), v(e.hasMore), b(e.hasMoreAvailable), S(e.hasConnectedFilters), E(e.values.length), re(R), ie.current && (ie.current.scrollTop = 0);
|
|
2350
2503
|
}).catch((e) => {
|
|
2351
|
-
|
|
2504
|
+
I.current === c && o(e instanceof Error ? e.message : "Could not load filter values.");
|
|
2352
2505
|
}).finally(() => {
|
|
2353
|
-
|
|
2506
|
+
I.current === c && D(!1);
|
|
2354
2507
|
}), () => {
|
|
2355
|
-
|
|
2508
|
+
I.current++, L.current = null;
|
|
2356
2509
|
};
|
|
2357
2510
|
}, [
|
|
2358
|
-
|
|
2511
|
+
r,
|
|
2359
2512
|
n,
|
|
2360
2513
|
R,
|
|
2361
2514
|
o
|
|
2362
|
-
]), (0,
|
|
2363
|
-
if (
|
|
2364
|
-
let { field: e, filter: t } =
|
|
2365
|
-
if (!
|
|
2515
|
+
]), (0, O.useEffect)(() => {
|
|
2516
|
+
if (r !== "list" || P !== R || !x) return;
|
|
2517
|
+
let { field: e, filter: t } = oe.current, i = Q(t).filter((e) => !F.current.has($(e)));
|
|
2518
|
+
if (!i.length) return;
|
|
2366
2519
|
let a = !0;
|
|
2367
|
-
return Rt(n, e, t,
|
|
2520
|
+
return Rt(n, e, t, i).then((e) => {
|
|
2368
2521
|
if (!a) return;
|
|
2369
|
-
let t = new Set(e.map(
|
|
2370
|
-
|
|
2522
|
+
let t = new Set(e.map($));
|
|
2523
|
+
i.forEach((e) => F.current.set($(e), t.has($(e)))), g((t) => [...new Map([...t, ...e].map((e) => [$(e), e])).values()]);
|
|
2371
2524
|
}).catch((e) => {
|
|
2372
2525
|
a && o(e instanceof Error ? e.message : "Could not check selected value availability.");
|
|
2373
2526
|
}), () => {
|
|
2374
2527
|
a = !1;
|
|
2375
2528
|
};
|
|
2376
2529
|
}, [
|
|
2377
|
-
|
|
2530
|
+
r,
|
|
2378
2531
|
n,
|
|
2379
2532
|
R,
|
|
2380
|
-
|
|
2533
|
+
P,
|
|
2381
2534
|
x,
|
|
2382
|
-
|
|
2535
|
+
z,
|
|
2383
2536
|
o
|
|
2384
2537
|
]);
|
|
2385
|
-
let
|
|
2386
|
-
if (
|
|
2387
|
-
let
|
|
2388
|
-
|
|
2538
|
+
let H = (0, O.useCallback)(async () => {
|
|
2539
|
+
if (r !== "list" || i || B || !V || P !== R || L.current !== null) return;
|
|
2540
|
+
let a = ++I.current;
|
|
2541
|
+
L.current = a, te(!0), j(null);
|
|
2389
2542
|
try {
|
|
2390
|
-
let
|
|
2543
|
+
let r = await zt(n, e, t, {
|
|
2391
2544
|
searchQuery: l,
|
|
2392
|
-
sortDirection:
|
|
2545
|
+
sortDirection: M,
|
|
2393
2546
|
offset: T,
|
|
2394
2547
|
availableOffset: p.length,
|
|
2395
2548
|
limit: 100
|
|
2396
2549
|
});
|
|
2397
|
-
if (
|
|
2550
|
+
if (I.current !== a) return;
|
|
2398
2551
|
f((e) => {
|
|
2399
|
-
let t =
|
|
2400
|
-
return [...e, ...t.filter((t) => !e.some((e) =>
|
|
2401
|
-
}), m((e) => [...e, ...
|
|
2552
|
+
let t = r.hasConnectedFilters && !C ? r.availableValues : r.values;
|
|
2553
|
+
return [...e, ...t.filter((t) => !e.some((e) => $(e) === $(t)))];
|
|
2554
|
+
}), m((e) => [...e, ...r.availableValues.filter((t) => !e.some((e) => $(e) === $(t)))]), r.availableValues.forEach((e) => F.current.set($(e), !0)), v(r.hasMore), b(r.hasMoreAvailable), E((e) => e + r.values.length);
|
|
2402
2555
|
} catch (e) {
|
|
2403
|
-
if (
|
|
2404
|
-
|
|
2556
|
+
if (I.current !== a) return;
|
|
2557
|
+
j(e instanceof Error ? e.message : "Could not load more filter values.");
|
|
2405
2558
|
} finally {
|
|
2406
|
-
|
|
2559
|
+
L.current === a && (L.current = null, te(!1));
|
|
2407
2560
|
}
|
|
2408
2561
|
}, [
|
|
2562
|
+
r,
|
|
2409
2563
|
i,
|
|
2410
|
-
a,
|
|
2411
|
-
z,
|
|
2412
2564
|
B,
|
|
2413
|
-
|
|
2565
|
+
V,
|
|
2566
|
+
P,
|
|
2414
2567
|
R,
|
|
2415
2568
|
n,
|
|
2416
2569
|
e,
|
|
2417
2570
|
t,
|
|
2418
2571
|
l,
|
|
2419
|
-
|
|
2572
|
+
M,
|
|
2420
2573
|
T,
|
|
2421
2574
|
p.length,
|
|
2422
2575
|
C
|
|
2423
2576
|
]);
|
|
2424
|
-
return (0,
|
|
2577
|
+
return (0, O.useEffect)(() => {
|
|
2425
2578
|
let e = ie.current, t = ae.current;
|
|
2426
|
-
if (!e || !t || !
|
|
2579
|
+
if (!e || !t || !V || A || B) return;
|
|
2427
2580
|
let n = new IntersectionObserver((e) => {
|
|
2428
|
-
e.some((e) => e.isIntersecting) &&
|
|
2581
|
+
e.some((e) => e.isIntersecting) && H();
|
|
2429
2582
|
}, {
|
|
2430
2583
|
root: e,
|
|
2431
2584
|
rootMargin: "0px 0px 120px 0px"
|
|
2432
2585
|
});
|
|
2433
2586
|
return n.observe(t), () => n.disconnect();
|
|
2434
2587
|
}, [
|
|
2588
|
+
V,
|
|
2589
|
+
A,
|
|
2435
2590
|
B,
|
|
2436
|
-
|
|
2437
|
-
z,
|
|
2438
|
-
V
|
|
2591
|
+
H
|
|
2439
2592
|
]), {
|
|
2440
2593
|
searchInput: s,
|
|
2441
2594
|
searchQuery: l,
|
|
@@ -2449,19 +2602,19 @@ function Yt({ field: e, filter: t, services: n, editorMode: i, disabledControls:
|
|
|
2449
2602
|
hasConnectedFilters: x,
|
|
2450
2603
|
showAllValues: C,
|
|
2451
2604
|
setShowAllValues: w,
|
|
2452
|
-
sortDirection:
|
|
2453
|
-
toggleSortDirection: () =>
|
|
2454
|
-
isRefreshingValues:
|
|
2455
|
-
isLoadingMore:
|
|
2456
|
-
loadMoreError:
|
|
2457
|
-
canLoadMore:
|
|
2458
|
-
loadMore:
|
|
2605
|
+
sortDirection: M,
|
|
2606
|
+
toggleSortDirection: () => ne((e) => e === a.Asc ? a.Desc : a.Asc),
|
|
2607
|
+
isRefreshingValues: B,
|
|
2608
|
+
isLoadingMore: k,
|
|
2609
|
+
loadMoreError: A,
|
|
2610
|
+
canLoadMore: V,
|
|
2611
|
+
loadMore: H,
|
|
2459
2612
|
valueListRef: ie,
|
|
2460
2613
|
nextPageRef: ae
|
|
2461
2614
|
};
|
|
2462
2615
|
}
|
|
2463
2616
|
function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 }) {
|
|
2464
|
-
let [a, o] = (0,
|
|
2617
|
+
let [a, o] = (0, O.useState)(null), [s, c] = (0, O.useState)(!1), l = (0, O.useRef)(0), u = vt(e.dataType, t), d = n.getTimeZone() ?? "UTC", f = i || n.isLocked(e.key), p = (0, O.useMemo)(() => new Set(Q(t).map($)), [t.values]), m = n.isSingleSelect(e.key), h = Yt({
|
|
2465
2618
|
field: e,
|
|
2466
2619
|
filter: t,
|
|
2467
2620
|
services: n,
|
|
@@ -2469,9 +2622,9 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2469
2622
|
disabledControls: f,
|
|
2470
2623
|
onError: o
|
|
2471
2624
|
});
|
|
2472
|
-
(0,
|
|
2625
|
+
(0, O.useEffect)(() => {
|
|
2473
2626
|
l.current++;
|
|
2474
|
-
}, [e.key, t]), (0,
|
|
2627
|
+
}, [e.key, t]), (0, O.useEffect)(() => () => {
|
|
2475
2628
|
l.current++;
|
|
2476
2629
|
}, []);
|
|
2477
2630
|
let g = (e) => {
|
|
@@ -2479,12 +2632,12 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2479
2632
|
}, _ = async (r, i) => {
|
|
2480
2633
|
let a = ++l.current;
|
|
2481
2634
|
o(null);
|
|
2482
|
-
let s =
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2635
|
+
let s = Q(t), c = i ?? t.operator, f = [
|
|
2636
|
+
K.FilterOperator.NotInList,
|
|
2637
|
+
K.FilterOperator.NotLike,
|
|
2638
|
+
K.FilterOperator.NotBetween,
|
|
2639
|
+
K.FilterOperator.NotEquals,
|
|
2640
|
+
K.FilterOperator.NotContains
|
|
2488
2641
|
].includes(c);
|
|
2489
2642
|
if (r === "list") {
|
|
2490
2643
|
if (t.dynamicDate || t.dynamicDateCalc) {
|
|
@@ -2505,8 +2658,8 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2505
2658
|
return;
|
|
2506
2659
|
}
|
|
2507
2660
|
g({
|
|
2508
|
-
...
|
|
2509
|
-
operator:
|
|
2661
|
+
...Z(t),
|
|
2662
|
+
operator: K.FilterOperator.InList,
|
|
2510
2663
|
values: i
|
|
2511
2664
|
});
|
|
2512
2665
|
} catch (e) {
|
|
@@ -2522,7 +2675,7 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2522
2675
|
filters: [{
|
|
2523
2676
|
...t,
|
|
2524
2677
|
fieldKey: e.key,
|
|
2525
|
-
operator:
|
|
2678
|
+
operator: K.FilterOperator.Between
|
|
2526
2679
|
}],
|
|
2527
2680
|
limit: 501
|
|
2528
2681
|
});
|
|
@@ -2533,8 +2686,8 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2533
2686
|
return;
|
|
2534
2687
|
}
|
|
2535
2688
|
h.resetSearch(), g({
|
|
2536
|
-
...
|
|
2537
|
-
operator: f ?
|
|
2689
|
+
...Z(t),
|
|
2690
|
+
operator: f ? K.FilterOperator.NotInList : K.FilterOperator.InList,
|
|
2538
2691
|
values: i
|
|
2539
2692
|
});
|
|
2540
2693
|
} catch (e) {
|
|
@@ -2546,8 +2699,8 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2546
2699
|
if (r) {
|
|
2547
2700
|
if (!String(s[0] ?? "").trim()) {
|
|
2548
2701
|
g({
|
|
2549
|
-
...
|
|
2550
|
-
operator: f ?
|
|
2702
|
+
...Z(t),
|
|
2703
|
+
operator: f ? K.FilterOperator.NotInList : K.FilterOperator.InList,
|
|
2551
2704
|
values: []
|
|
2552
2705
|
});
|
|
2553
2706
|
return;
|
|
@@ -2561,8 +2714,8 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2561
2714
|
return;
|
|
2562
2715
|
}
|
|
2563
2716
|
g({
|
|
2564
|
-
...
|
|
2565
|
-
operator: f ?
|
|
2717
|
+
...Z(t),
|
|
2718
|
+
operator: f ? K.FilterOperator.NotInList : K.FilterOperator.InList,
|
|
2566
2719
|
values: i
|
|
2567
2720
|
});
|
|
2568
2721
|
} catch (e) {
|
|
@@ -2570,11 +2723,11 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2570
2723
|
}
|
|
2571
2724
|
return;
|
|
2572
2725
|
}
|
|
2573
|
-
if ([
|
|
2726
|
+
if ([K.FilterOperator.Between, K.FilterOperator.NotBetween].includes(t.operator)) {
|
|
2574
2727
|
try {
|
|
2575
2728
|
let r = {
|
|
2576
2729
|
...t,
|
|
2577
|
-
operator:
|
|
2730
|
+
operator: K.FilterOperator.Between,
|
|
2578
2731
|
fieldKey: e.key
|
|
2579
2732
|
}, i = await n.query({
|
|
2580
2733
|
dimensions: [{ fieldKey: e.key }],
|
|
@@ -2589,8 +2742,8 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2589
2742
|
return;
|
|
2590
2743
|
}
|
|
2591
2744
|
g({
|
|
2592
|
-
...
|
|
2593
|
-
operator: f ?
|
|
2745
|
+
...Z(t),
|
|
2746
|
+
operator: f ? K.FilterOperator.NotInList : K.FilterOperator.InList,
|
|
2594
2747
|
values: s
|
|
2595
2748
|
});
|
|
2596
2749
|
} catch (e) {
|
|
@@ -2599,8 +2752,8 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2599
2752
|
return;
|
|
2600
2753
|
}
|
|
2601
2754
|
g({
|
|
2602
|
-
...
|
|
2603
|
-
operator: i ?? (f ?
|
|
2755
|
+
...Z(t),
|
|
2756
|
+
operator: i ?? (f ? K.FilterOperator.NotInList : K.FilterOperator.InList),
|
|
2604
2757
|
values: s
|
|
2605
2758
|
});
|
|
2606
2759
|
return;
|
|
@@ -2608,38 +2761,38 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2608
2761
|
if (r === "text") {
|
|
2609
2762
|
let e = s[0], n = h.searchInput || (e == null ? "" : String(e));
|
|
2610
2763
|
h.resetSearch(), g({
|
|
2611
|
-
...
|
|
2612
|
-
operator: i ?? (f ?
|
|
2764
|
+
...Z(t),
|
|
2765
|
+
operator: i ?? (f ? K.FilterOperator.NotLike : K.FilterOperator.Like),
|
|
2613
2766
|
values: [n]
|
|
2614
2767
|
});
|
|
2615
2768
|
return;
|
|
2616
2769
|
}
|
|
2617
2770
|
if (r === "null") {
|
|
2618
2771
|
g({
|
|
2619
|
-
...
|
|
2620
|
-
operator: i ??
|
|
2772
|
+
...Z(t),
|
|
2773
|
+
operator: i ?? K.FilterOperator.Set,
|
|
2621
2774
|
values: null
|
|
2622
2775
|
});
|
|
2623
2776
|
return;
|
|
2624
2777
|
}
|
|
2625
2778
|
if (r === "geo") {
|
|
2626
2779
|
g({
|
|
2627
|
-
...
|
|
2628
|
-
operator:
|
|
2780
|
+
...Z(t),
|
|
2781
|
+
operator: K.FilterOperator.GeoIntersect,
|
|
2629
2782
|
values: [null]
|
|
2630
2783
|
});
|
|
2631
2784
|
return;
|
|
2632
2785
|
}
|
|
2633
2786
|
if (r === "scalar") {
|
|
2634
2787
|
g({
|
|
2635
|
-
...
|
|
2636
|
-
operator: i ??
|
|
2788
|
+
...Z(t),
|
|
2789
|
+
operator: i ?? K.FilterOperator.Equals,
|
|
2637
2790
|
values: [s[0] ?? null]
|
|
2638
2791
|
});
|
|
2639
2792
|
return;
|
|
2640
2793
|
}
|
|
2641
2794
|
if (r === "range" || r === "date") {
|
|
2642
|
-
let r = i ?? (f ?
|
|
2795
|
+
let r = i ?? (f ? K.FilterOperator.NotBetween : K.FilterOperator.Between), c = [];
|
|
2643
2796
|
if (s.length >= 2 && (u === "list" || u === "range" || u === "date") && (c = gt(s, e.dataType, d)), c.length !== 2 || c[0] == null || c[1] == null) try {
|
|
2644
2797
|
let t = await n.query({
|
|
2645
2798
|
dimensions: [],
|
|
@@ -2661,7 +2814,7 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2661
2814
|
return;
|
|
2662
2815
|
}
|
|
2663
2816
|
g({
|
|
2664
|
-
...
|
|
2817
|
+
...Z(t),
|
|
2665
2818
|
operator: r,
|
|
2666
2819
|
values: c.length === 2 ? c : [null, null]
|
|
2667
2820
|
});
|
|
@@ -2690,29 +2843,29 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2690
2843
|
},
|
|
2691
2844
|
changeExclude: (e) => {
|
|
2692
2845
|
let n = t.operator;
|
|
2693
|
-
u === "list" ? n = e ?
|
|
2846
|
+
u === "list" ? n = e ? K.FilterOperator.NotInList : K.FilterOperator.InList : u === "text" ? n = [K.FilterOperator.Contains, K.FilterOperator.NotContains].includes(t.operator) ? e ? K.FilterOperator.NotContains : K.FilterOperator.Contains : e ? K.FilterOperator.NotLike : K.FilterOperator.Like : u === "scalar" ? n = e ? K.FilterOperator.NotEquals : K.FilterOperator.Equals : (u === "range" || u === "date") && (n = u === "date" && [K.FilterOperator.Equals, K.FilterOperator.NotEquals].includes(t.operator) ? e ? K.FilterOperator.NotEquals : K.FilterOperator.Equals : e ? K.FilterOperator.NotBetween : K.FilterOperator.Between), g({
|
|
2694
2847
|
...t,
|
|
2695
2848
|
operator: n
|
|
2696
2849
|
});
|
|
2697
2850
|
},
|
|
2698
2851
|
changeOperator: (n) => {
|
|
2699
|
-
[
|
|
2852
|
+
[K.FilterOperator.Set, K.FilterOperator.NotSet].includes(n) ? _("null", n) : n === K.FilterOperator.GeoIntersect ? _("geo", n) : [K.FilterOperator.InList, K.FilterOperator.NotInList].includes(n) ? _("list", n) : [K.FilterOperator.Between, K.FilterOperator.NotBetween].includes(n) ? X(e.dataType) && (t.dynamicDateRange || t.dynamicDateCalcRange) ? g({
|
|
2700
2853
|
...t,
|
|
2701
2854
|
operator: n
|
|
2702
|
-
}) : _(
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
].includes(n) ? _("text", n) : [
|
|
2855
|
+
}) : _(X(e.dataType) ? "date" : "range", n) : [
|
|
2856
|
+
K.FilterOperator.Like,
|
|
2857
|
+
K.FilterOperator.NotLike,
|
|
2858
|
+
K.FilterOperator.Contains,
|
|
2859
|
+
K.FilterOperator.NotContains
|
|
2860
|
+
].includes(n) ? _("text", n) : [K.FilterOperator.Equals, K.FilterOperator.NotEquals].includes(n) && X(e.dataType) ? t.dynamicDate || t.dynamicDateCalc ? g({
|
|
2708
2861
|
...t,
|
|
2709
2862
|
operator: n,
|
|
2710
2863
|
values: []
|
|
2711
2864
|
}) : g({
|
|
2712
|
-
...
|
|
2865
|
+
...Z(t),
|
|
2713
2866
|
operator: n,
|
|
2714
|
-
values: [
|
|
2715
|
-
}) :
|
|
2867
|
+
values: [Q(t)[0] ?? null]
|
|
2868
|
+
}) : X(e.dataType) && (t.dynamicDate || t.dynamicDateCalc) ? g({
|
|
2716
2869
|
...t,
|
|
2717
2870
|
operator: n,
|
|
2718
2871
|
values: []
|
|
@@ -2728,41 +2881,41 @@ function Zt({ showAdvancedOperators: e = !1, ...t }) {
|
|
|
2728
2881
|
disabledControls: a,
|
|
2729
2882
|
update: o
|
|
2730
2883
|
};
|
|
2731
|
-
return /* @__PURE__ */ (0,
|
|
2884
|
+
return /* @__PURE__ */ (0, k.jsxs)("section", {
|
|
2732
2885
|
className: "astrato-app-filter-bar__editor",
|
|
2733
2886
|
"aria-label": `Filter ${c.name}`,
|
|
2734
2887
|
children: [
|
|
2735
|
-
/* @__PURE__ */ (0,
|
|
2888
|
+
/* @__PURE__ */ (0, k.jsx)(Mt, {
|
|
2736
2889
|
field: c,
|
|
2737
2890
|
filter: l,
|
|
2738
2891
|
editor: n,
|
|
2739
2892
|
showAdvancedOperators: e
|
|
2740
2893
|
}),
|
|
2741
|
-
r === "list" && /* @__PURE__ */ (0,
|
|
2894
|
+
r === "list" && /* @__PURE__ */ (0, k.jsx)(It, {
|
|
2742
2895
|
field: c,
|
|
2743
2896
|
filter: l,
|
|
2744
2897
|
editor: n,
|
|
2745
2898
|
showAdvancedOperators: e
|
|
2746
2899
|
}),
|
|
2747
|
-
r === "text" && e && /* @__PURE__ */ (0,
|
|
2900
|
+
r === "text" && e && /* @__PURE__ */ (0, k.jsxs)("label", {
|
|
2748
2901
|
className: "astrato-app-filter-bar__label",
|
|
2749
|
-
children: ["Match text", /* @__PURE__ */ (0,
|
|
2902
|
+
children: ["Match text", /* @__PURE__ */ (0, k.jsx)(jt, {
|
|
2750
2903
|
field: c,
|
|
2751
2904
|
filter: l,
|
|
2752
2905
|
editor: n
|
|
2753
2906
|
})]
|
|
2754
2907
|
}),
|
|
2755
|
-
r === "scalar" && /* @__PURE__ */ (0,
|
|
2756
|
-
r === "null" && /* @__PURE__ */ (0,
|
|
2908
|
+
r === "scalar" && /* @__PURE__ */ (0, k.jsx)(Ft, { ...u }),
|
|
2909
|
+
r === "null" && /* @__PURE__ */ (0, k.jsx)("p", {
|
|
2757
2910
|
className: "astrato-app-filter-bar__muted",
|
|
2758
2911
|
children: "This operator matches whether the field has a value."
|
|
2759
2912
|
}),
|
|
2760
|
-
r === "geo" && /* @__PURE__ */ (0,
|
|
2761
|
-
(r === "range" || r === "date") && /* @__PURE__ */ (0,
|
|
2913
|
+
r === "geo" && /* @__PURE__ */ (0, k.jsx)(Et, { ...u }),
|
|
2914
|
+
(r === "range" || r === "date") && /* @__PURE__ */ (0, k.jsx)(Pt, {
|
|
2762
2915
|
...u,
|
|
2763
2916
|
editorMode: r
|
|
2764
2917
|
}),
|
|
2765
|
-
s && /* @__PURE__ */ (0,
|
|
2918
|
+
s && /* @__PURE__ */ (0, k.jsx)("p", {
|
|
2766
2919
|
className: "astrato-app-filter-bar__error",
|
|
2767
2920
|
role: "alert",
|
|
2768
2921
|
children: s
|
|
@@ -2776,7 +2929,7 @@ var Qt = (e) => !!e && typeof e == "object" && "fieldKey" in e && "operator" in
|
|
|
2776
2929
|
}, tn = (e = []) => ({
|
|
2777
2930
|
filters: [e[0] ? dt(e[0]) : {
|
|
2778
2931
|
fieldKey: "",
|
|
2779
|
-
operator:
|
|
2932
|
+
operator: K.FilterOperator.InList,
|
|
2780
2933
|
values: []
|
|
2781
2934
|
}],
|
|
2782
2935
|
filterGroups: [],
|
|
@@ -2798,7 +2951,7 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2798
2951
|
...e,
|
|
2799
2952
|
filters: [...e.filters ?? [], t[0] ? dt(t[0]) : {
|
|
2800
2953
|
fieldKey: "",
|
|
2801
|
-
operator:
|
|
2954
|
+
operator: K.FilterOperator.InList,
|
|
2802
2955
|
values: []
|
|
2803
2956
|
}]
|
|
2804
2957
|
}));
|
|
@@ -2813,16 +2966,16 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2813
2966
|
filterGroups: (t.filterGroups ?? []).filter((t, n) => n !== e)
|
|
2814
2967
|
}));
|
|
2815
2968
|
};
|
|
2816
|
-
return /* @__PURE__ */ (0,
|
|
2969
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2817
2970
|
className: "astrato-app-filter-bar__group",
|
|
2818
2971
|
"data-operator": e.or ? "or" : "and",
|
|
2819
2972
|
children: [
|
|
2820
|
-
/* @__PURE__ */ (0,
|
|
2973
|
+
/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2821
2974
|
className: "astrato-app-filter-bar__row",
|
|
2822
2975
|
children: [
|
|
2823
|
-
/* @__PURE__ */ (0,
|
|
2976
|
+
/* @__PURE__ */ (0, k.jsxs)("label", {
|
|
2824
2977
|
className: "astrato-app-filter-bar__label",
|
|
2825
|
-
children: ["Match", /* @__PURE__ */ (0,
|
|
2978
|
+
children: ["Match", /* @__PURE__ */ (0, k.jsxs)(M, {
|
|
2826
2979
|
className: "astrato-app-filter-bar__control",
|
|
2827
2980
|
value: e.or ? "or" : "and",
|
|
2828
2981
|
disabled: i,
|
|
@@ -2830,21 +2983,21 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2830
2983
|
...t,
|
|
2831
2984
|
or: e.currentTarget.value === "or"
|
|
2832
2985
|
})),
|
|
2833
|
-
children: [/* @__PURE__ */ (0,
|
|
2986
|
+
children: [/* @__PURE__ */ (0, k.jsx)("option", {
|
|
2834
2987
|
value: "and",
|
|
2835
2988
|
children: "All conditions (AND)"
|
|
2836
|
-
}), /* @__PURE__ */ (0,
|
|
2989
|
+
}), /* @__PURE__ */ (0, k.jsx)("option", {
|
|
2837
2990
|
value: "or",
|
|
2838
2991
|
children: "Any condition (OR)"
|
|
2839
2992
|
})]
|
|
2840
2993
|
})]
|
|
2841
2994
|
}),
|
|
2842
|
-
/* @__PURE__ */ (0,
|
|
2995
|
+
/* @__PURE__ */ (0, k.jsx)(A, {
|
|
2843
2996
|
disabled: i,
|
|
2844
2997
|
onClick: c,
|
|
2845
2998
|
children: "Add condition"
|
|
2846
2999
|
}),
|
|
2847
|
-
/* @__PURE__ */ (0,
|
|
3000
|
+
/* @__PURE__ */ (0, k.jsx)(A, {
|
|
2848
3001
|
disabled: i,
|
|
2849
3002
|
onClick: l,
|
|
2850
3003
|
children: "Add nested group"
|
|
@@ -2853,13 +3006,13 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2853
3006
|
}),
|
|
2854
3007
|
(e.filters ?? []).map((e, r) => {
|
|
2855
3008
|
let a = t.find((t) => t.key === e.fieldKey);
|
|
2856
|
-
return /* @__PURE__ */ (0,
|
|
3009
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2857
3010
|
className: "astrato-app-filter-bar__condition",
|
|
2858
|
-
children: [/* @__PURE__ */ (0,
|
|
3011
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2859
3012
|
className: "astrato-app-filter-bar__row",
|
|
2860
|
-
children: [/* @__PURE__ */ (0,
|
|
3013
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("label", {
|
|
2861
3014
|
className: "astrato-app-filter-bar__label",
|
|
2862
|
-
children: ["Field", /* @__PURE__ */ (0,
|
|
3015
|
+
children: ["Field", /* @__PURE__ */ (0, k.jsxs)(M, {
|
|
2863
3016
|
className: "astrato-app-filter-bar__control",
|
|
2864
3017
|
value: e.fieldKey,
|
|
2865
3018
|
disabled: i || !t.length,
|
|
@@ -2867,21 +3020,21 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2867
3020
|
let n = t.find((t) => t.key === e.currentTarget.value);
|
|
2868
3021
|
n && o(r, dt(n));
|
|
2869
3022
|
},
|
|
2870
|
-
children: [/* @__PURE__ */ (0,
|
|
3023
|
+
children: [/* @__PURE__ */ (0, k.jsx)("option", {
|
|
2871
3024
|
value: "",
|
|
2872
3025
|
children: "Choose a field"
|
|
2873
|
-
}), t.map((e) => /* @__PURE__ */ (0,
|
|
3026
|
+
}), t.map((e) => /* @__PURE__ */ (0, k.jsx)("option", {
|
|
2874
3027
|
value: e.key,
|
|
2875
3028
|
children: e.name
|
|
2876
3029
|
}, e.key))]
|
|
2877
3030
|
})]
|
|
2878
|
-
}), /* @__PURE__ */ (0,
|
|
3031
|
+
}), /* @__PURE__ */ (0, k.jsx)(A, {
|
|
2879
3032
|
disabled: i,
|
|
2880
3033
|
"aria-label": "Remove condition",
|
|
2881
3034
|
onClick: () => s(r),
|
|
2882
3035
|
children: "Remove"
|
|
2883
3036
|
})]
|
|
2884
|
-
}), a && /* @__PURE__ */ (0,
|
|
3037
|
+
}), a && /* @__PURE__ */ (0, k.jsx)(Zt, {
|
|
2885
3038
|
field: a,
|
|
2886
3039
|
filter: e,
|
|
2887
3040
|
services: n,
|
|
@@ -2891,20 +3044,20 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2891
3044
|
})]
|
|
2892
3045
|
}, `filter-${r}`);
|
|
2893
3046
|
}),
|
|
2894
|
-
(e.filterGroups ?? []).map((e, r) => /* @__PURE__ */ (0,
|
|
3047
|
+
(e.filterGroups ?? []).map((e, r) => /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2895
3048
|
className: "astrato-app-filter-bar__nested-group",
|
|
2896
|
-
children: [/* @__PURE__ */ (0,
|
|
3049
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2897
3050
|
className: "astrato-app-filter-bar__row",
|
|
2898
|
-
children: [/* @__PURE__ */ (0,
|
|
3051
|
+
children: [/* @__PURE__ */ (0, k.jsx)("span", {
|
|
2899
3052
|
className: "astrato-app-filter-bar__muted",
|
|
2900
3053
|
children: "Nested group"
|
|
2901
|
-
}), /* @__PURE__ */ (0,
|
|
3054
|
+
}), /* @__PURE__ */ (0, k.jsx)(A, {
|
|
2902
3055
|
disabled: i,
|
|
2903
3056
|
"aria-label": "Remove nested group",
|
|
2904
3057
|
onClick: () => u(r),
|
|
2905
3058
|
children: "Remove group"
|
|
2906
3059
|
})]
|
|
2907
|
-
}), /* @__PURE__ */ (0,
|
|
3060
|
+
}), /* @__PURE__ */ (0, k.jsx)(rn, {
|
|
2908
3061
|
group: e,
|
|
2909
3062
|
fields: t,
|
|
2910
3063
|
services: n,
|
|
@@ -2919,8 +3072,8 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2919
3072
|
});
|
|
2920
3073
|
}
|
|
2921
3074
|
function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, disabled: a = !1 }) {
|
|
2922
|
-
let [o, s] = (0,
|
|
2923
|
-
(0,
|
|
3075
|
+
let [o, s] = (0, O.useState)(e), [c, l] = (0, O.useState)([]), [u, d] = (0, O.useState)(null), f = n.find((e) => e.key === o.fieldKey), p = o.associativeListFilter;
|
|
3076
|
+
(0, O.useEffect)(() => s(e), [e]), (0, O.useEffect)(() => {
|
|
2924
3077
|
let e = !0;
|
|
2925
3078
|
return l([]), o.fieldKey ? (d(null), r.getAssociatedViews(o.fieldKey).then((t) => {
|
|
2926
3079
|
e && l(t);
|
|
@@ -2932,7 +3085,7 @@ function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, d
|
|
|
2932
3085
|
e = !1;
|
|
2933
3086
|
};
|
|
2934
3087
|
}, [o.fieldKey, r]);
|
|
2935
|
-
let m = (0,
|
|
3088
|
+
let m = (0, O.useMemo)(() => t.filter((e) => c.includes(e.view ?? "")), [t, c]), h = (e, t) => s((n) => ({
|
|
2936
3089
|
...n,
|
|
2937
3090
|
associativeListFilter: {
|
|
2938
3091
|
...n.associativeListFilter,
|
|
@@ -2966,28 +3119,28 @@ function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, d
|
|
|
2966
3119
|
...p,
|
|
2967
3120
|
view: f?.view ?? p.view
|
|
2968
3121
|
}
|
|
2969
|
-
}), x = !!(p.intersectFilters?.length || p.unionFilters?.length), S = [...p.intersectFilters ?? [], ...p.unionFilters ?? []], C = !!(o.fieldKey && S.length && m.length && !u) && S.every((e) => en(e.filterGroup)), w = (e, t) => /* @__PURE__ */ (0,
|
|
3122
|
+
}), x = !!(p.intersectFilters?.length || p.unionFilters?.length), S = [...p.intersectFilters ?? [], ...p.unionFilters ?? []], C = !!(o.fieldKey && S.length && m.length && !u) && S.every((e) => en(e.filterGroup)), w = (e, t) => /* @__PURE__ */ (0, k.jsxs)("section", {
|
|
2970
3123
|
className: "astrato-app-filter-bar__association-list",
|
|
2971
3124
|
"aria-label": t,
|
|
2972
|
-
children: [/* @__PURE__ */ (0,
|
|
3125
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2973
3126
|
className: "astrato-app-filter-bar__row",
|
|
2974
|
-
children: [/* @__PURE__ */ (0,
|
|
3127
|
+
children: [/* @__PURE__ */ (0, k.jsx)("h4", {
|
|
2975
3128
|
className: "astrato-app-filter-bar__field",
|
|
2976
3129
|
children: t
|
|
2977
|
-
}), /* @__PURE__ */ (0,
|
|
3130
|
+
}), /* @__PURE__ */ (0, k.jsxs)(A, {
|
|
2978
3131
|
disabled: a || !m.length,
|
|
2979
3132
|
onClick: () => _(e),
|
|
2980
3133
|
children: ["Add ", e === "intersectFilters" ? "intersection" : "union"]
|
|
2981
3134
|
})]
|
|
2982
|
-
}), (p[e] ?? []).map((t, n) => /* @__PURE__ */ (0,
|
|
3135
|
+
}), (p[e] ?? []).map((t, n) => /* @__PURE__ */ (0, k.jsxs)("article", {
|
|
2983
3136
|
className: "astrato-app-filter-bar__association",
|
|
2984
3137
|
"data-negative": t.isNegativeAssociation === !0,
|
|
2985
|
-
children: [/* @__PURE__ */ (0,
|
|
3138
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2986
3139
|
className: "astrato-app-filter-bar__row",
|
|
2987
3140
|
children: [
|
|
2988
|
-
/* @__PURE__ */ (0,
|
|
3141
|
+
/* @__PURE__ */ (0, k.jsxs)("label", {
|
|
2989
3142
|
className: "astrato-app-filter-bar__muted",
|
|
2990
|
-
children: [/* @__PURE__ */ (0,
|
|
3143
|
+
children: [/* @__PURE__ */ (0, k.jsx)("input", {
|
|
2991
3144
|
type: "checkbox",
|
|
2992
3145
|
checked: t.isNegativeAssociation === !0,
|
|
2993
3146
|
disabled: a,
|
|
@@ -3000,18 +3153,18 @@ function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, d
|
|
|
3000
3153
|
}
|
|
3001
3154
|
}), "Exclude this association"]
|
|
3002
3155
|
}),
|
|
3003
|
-
/* @__PURE__ */ (0,
|
|
3156
|
+
/* @__PURE__ */ (0, k.jsxs)(A, {
|
|
3004
3157
|
disabled: a,
|
|
3005
3158
|
onClick: () => v(e, n),
|
|
3006
3159
|
children: ["Move to ", e === "intersectFilters" ? "union" : "intersection"]
|
|
3007
3160
|
}),
|
|
3008
|
-
/* @__PURE__ */ (0,
|
|
3161
|
+
/* @__PURE__ */ (0, k.jsx)(A, {
|
|
3009
3162
|
disabled: a,
|
|
3010
3163
|
onClick: () => y(e, n),
|
|
3011
3164
|
children: "Remove"
|
|
3012
3165
|
})
|
|
3013
3166
|
]
|
|
3014
|
-
}), /* @__PURE__ */ (0,
|
|
3167
|
+
}), /* @__PURE__ */ (0, k.jsx)(rn, {
|
|
3015
3168
|
group: t.filterGroup,
|
|
3016
3169
|
fields: m,
|
|
3017
3170
|
services: r,
|
|
@@ -3020,15 +3173,15 @@ function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, d
|
|
|
3020
3173
|
})]
|
|
3021
3174
|
}, `${e}-${n}`))]
|
|
3022
3175
|
});
|
|
3023
|
-
return /* @__PURE__ */ (0,
|
|
3176
|
+
return /* @__PURE__ */ (0, k.jsxs)("section", {
|
|
3024
3177
|
className: "astrato-app-filter-bar__editor",
|
|
3025
3178
|
"aria-label": "Associative filter",
|
|
3026
3179
|
children: [
|
|
3027
|
-
/* @__PURE__ */ (0,
|
|
3180
|
+
/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
3028
3181
|
className: "astrato-app-filter-bar__fieldset",
|
|
3029
|
-
children: [/* @__PURE__ */ (0,
|
|
3182
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("label", {
|
|
3030
3183
|
className: "astrato-app-filter-bar__label",
|
|
3031
|
-
children: ["Associate from field", /* @__PURE__ */ (0,
|
|
3184
|
+
children: ["Associate from field", /* @__PURE__ */ (0, k.jsxs)(M, {
|
|
3032
3185
|
className: "astrato-app-filter-bar__control",
|
|
3033
3186
|
value: o.fieldKey,
|
|
3034
3187
|
disabled: a || x,
|
|
@@ -3043,37 +3196,37 @@ function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, d
|
|
|
3043
3196
|
}
|
|
3044
3197
|
});
|
|
3045
3198
|
},
|
|
3046
|
-
children: [/* @__PURE__ */ (0,
|
|
3199
|
+
children: [/* @__PURE__ */ (0, k.jsx)("option", {
|
|
3047
3200
|
value: "",
|
|
3048
3201
|
children: "Choose a field"
|
|
3049
|
-
}), n.map((e) => /* @__PURE__ */ (0,
|
|
3202
|
+
}), n.map((e) => /* @__PURE__ */ (0, k.jsx)("option", {
|
|
3050
3203
|
value: e.key,
|
|
3051
3204
|
children: e.name
|
|
3052
3205
|
}, e.key))]
|
|
3053
3206
|
})]
|
|
3054
|
-
}), /* @__PURE__ */ (0,
|
|
3207
|
+
}), /* @__PURE__ */ (0, k.jsx)("p", {
|
|
3055
3208
|
className: "astrato-app-filter-bar__muted",
|
|
3056
3209
|
children: f?.view ? `Conditions apply to associated fields from ${f.view}.` : "Choose a field to load its associated views."
|
|
3057
3210
|
})]
|
|
3058
3211
|
}),
|
|
3059
|
-
u && /* @__PURE__ */ (0,
|
|
3212
|
+
u && /* @__PURE__ */ (0, k.jsx)("p", {
|
|
3060
3213
|
className: "astrato-app-filter-bar__error",
|
|
3061
3214
|
role: "alert",
|
|
3062
3215
|
children: u
|
|
3063
3216
|
}),
|
|
3064
|
-
o.fieldKey && c.length === 0 && !u && /* @__PURE__ */ (0,
|
|
3217
|
+
o.fieldKey && c.length === 0 && !u && /* @__PURE__ */ (0, k.jsx)("p", {
|
|
3065
3218
|
className: "astrato-app-filter-bar__muted",
|
|
3066
3219
|
children: "This field has no associated views."
|
|
3067
3220
|
}),
|
|
3068
3221
|
w("intersectFilters", "Intersections"),
|
|
3069
3222
|
w("unionFilters", "Unions"),
|
|
3070
|
-
/* @__PURE__ */ (0,
|
|
3223
|
+
/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
3071
3224
|
className: "astrato-app-filter-bar__toolbar",
|
|
3072
|
-
children: [/* @__PURE__ */ (0,
|
|
3225
|
+
children: [/* @__PURE__ */ (0, k.jsx)(A, {
|
|
3073
3226
|
disabled: a,
|
|
3074
3227
|
onClick: () => s(e),
|
|
3075
3228
|
children: "Cancel"
|
|
3076
|
-
}), /* @__PURE__ */ (0,
|
|
3229
|
+
}), /* @__PURE__ */ (0, k.jsx)(A, {
|
|
3077
3230
|
"data-primary": "true",
|
|
3078
3231
|
disabled: a || !C,
|
|
3079
3232
|
onClick: b,
|
|
@@ -3103,8 +3256,8 @@ var on = (e, t, n, r) => {
|
|
|
3103
3256
|
};
|
|
3104
3257
|
};
|
|
3105
3258
|
function sn(e, t, n) {
|
|
3106
|
-
let r = (0,
|
|
3107
|
-
return i.current = n, (0,
|
|
3259
|
+
let r = (0, O.useRef)(null), i = (0, O.useRef)(n);
|
|
3260
|
+
return i.current = n, (0, O.useLayoutEffect)(() => {
|
|
3108
3261
|
let n = r.current;
|
|
3109
3262
|
if (!n) return;
|
|
3110
3263
|
let a = n.ownerDocument, o = a.defaultView;
|
|
@@ -3141,7 +3294,7 @@ function sn(e, t, n) {
|
|
|
3141
3294
|
}, [e, t]), r;
|
|
3142
3295
|
}
|
|
3143
3296
|
function cn({ id: e, anchor: t, title: n, subtitle: r, icon: i, className: a = "", placement: o = "bottom", children: s, onClose: c }) {
|
|
3144
|
-
return /* @__PURE__ */ (0,
|
|
3297
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
3145
3298
|
ref: sn(t, o, c),
|
|
3146
3299
|
id: e,
|
|
3147
3300
|
role: "dialog",
|
|
@@ -3149,29 +3302,29 @@ function cn({ id: e, anchor: t, title: n, subtitle: r, icon: i, className: a = "
|
|
|
3149
3302
|
"aria-label": n,
|
|
3150
3303
|
className: `astrato-app-filter-bar__popover ${a}`,
|
|
3151
3304
|
onKeyDown: (e) => {
|
|
3152
|
-
|
|
3305
|
+
P(e), e.key === "Escape" && (e.preventDefault(), c());
|
|
3153
3306
|
},
|
|
3154
|
-
children: [/* @__PURE__ */ (0,
|
|
3307
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
3155
3308
|
className: "astrato-app-filter-bar__popover-header",
|
|
3156
3309
|
children: [
|
|
3157
|
-
/* @__PURE__ */ (0,
|
|
3310
|
+
/* @__PURE__ */ (0, k.jsx)("span", {
|
|
3158
3311
|
className: "astrato-app-filter-bar__heading-icon",
|
|
3159
3312
|
"aria-hidden": "true",
|
|
3160
|
-
children: i ?? /* @__PURE__ */ (0,
|
|
3313
|
+
children: i ?? /* @__PURE__ */ (0, k.jsx)(x, { name: "filter" })
|
|
3161
3314
|
}),
|
|
3162
|
-
/* @__PURE__ */ (0,
|
|
3315
|
+
/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
3163
3316
|
className: "astrato-app-filter-bar__heading",
|
|
3164
|
-
children: [/* @__PURE__ */ (0,
|
|
3317
|
+
children: [/* @__PURE__ */ (0, k.jsx)("strong", { children: n }), r && /* @__PURE__ */ (0, k.jsx)("span", {
|
|
3165
3318
|
className: "astrato-app-filter-bar__muted",
|
|
3166
3319
|
children: r
|
|
3167
3320
|
})]
|
|
3168
3321
|
}),
|
|
3169
|
-
/* @__PURE__ */ (0,
|
|
3322
|
+
/* @__PURE__ */ (0, k.jsx)(A, {
|
|
3170
3323
|
"data-variant": "ghost",
|
|
3171
3324
|
"data-icon-only": "true",
|
|
3172
3325
|
"aria-label": "Close filter editor",
|
|
3173
3326
|
onClick: c,
|
|
3174
|
-
children: /* @__PURE__ */ (0,
|
|
3327
|
+
children: /* @__PURE__ */ (0, k.jsx)(x, { name: "close" })
|
|
3175
3328
|
})
|
|
3176
3329
|
]
|
|
3177
3330
|
}), s]
|
|
@@ -3184,8 +3337,8 @@ var ln = (e, t, n, r) => {
|
|
|
3184
3337
|
return a;
|
|
3185
3338
|
}, un = (e, t, n = 480, r = 960) => e !== "collapse-button" && e !== "wrap-collapse-button" ? e : t < n ? "button" : e === "wrap-collapse-button" && t >= Math.max(n, r) ? "wrap" : "collapse";
|
|
3186
3339
|
function dn(e, t, n) {
|
|
3187
|
-
let r = (0,
|
|
3188
|
-
return (0,
|
|
3340
|
+
let r = (0, O.useRef)(null), [i, a] = (0, O.useState)(0);
|
|
3341
|
+
return (0, O.useLayoutEffect)(() => {
|
|
3189
3342
|
let t = r.current;
|
|
3190
3343
|
if (!t || !e) return;
|
|
3191
3344
|
let n = t.ownerDocument.defaultView;
|
|
@@ -3207,12 +3360,12 @@ function dn(e, t, n) {
|
|
|
3207
3360
|
};
|
|
3208
3361
|
}
|
|
3209
3362
|
function fn(e, t) {
|
|
3210
|
-
let n = (0,
|
|
3363
|
+
let n = (0, O.useRef)(null), [r, i] = (0, O.useState)({
|
|
3211
3364
|
width: 0,
|
|
3212
3365
|
buttonBreakpoint: 480,
|
|
3213
3366
|
collapseBreakpoint: 960
|
|
3214
3367
|
});
|
|
3215
|
-
return (0,
|
|
3368
|
+
return (0, O.useLayoutEffect)(() => {
|
|
3216
3369
|
let e = n.current, r = e?.ownerDocument.defaultView;
|
|
3217
3370
|
if (!e || !r || !t) return;
|
|
3218
3371
|
let a = () => {
|
|
@@ -3235,10 +3388,10 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3235
3388
|
let t = () => {
|
|
3236
3389
|
let t = e.engine;
|
|
3237
3390
|
if (!t) return [];
|
|
3238
|
-
let
|
|
3239
|
-
for (let e of
|
|
3240
|
-
if (
|
|
3241
|
-
|
|
3391
|
+
let a = T(null, t), o = new Map(a.filter(r).map((e) => [e.key, e])), s = /* @__PURE__ */ new Map();
|
|
3392
|
+
for (let e of a) {
|
|
3393
|
+
if (r(e)) {
|
|
3394
|
+
s.set(e.key, {
|
|
3242
3395
|
key: e.key,
|
|
3243
3396
|
name: e.name,
|
|
3244
3397
|
view: e.view,
|
|
@@ -3246,22 +3399,22 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3246
3399
|
});
|
|
3247
3400
|
continue;
|
|
3248
3401
|
}
|
|
3249
|
-
if (!
|
|
3250
|
-
let t = e.dimension.fieldKey,
|
|
3251
|
-
if (!
|
|
3252
|
-
let
|
|
3253
|
-
if (!
|
|
3254
|
-
|
|
3402
|
+
if (!n(e) || !e.dimension?.fieldKey) continue;
|
|
3403
|
+
let t = e.dimension.fieldKey, a = o.get(t);
|
|
3404
|
+
if (!s.has(t)) {
|
|
3405
|
+
let n = a?.dataType ?? i(e);
|
|
3406
|
+
if (!n) continue;
|
|
3407
|
+
s.set(t, {
|
|
3255
3408
|
key: t,
|
|
3256
3409
|
name: e.name,
|
|
3257
|
-
view:
|
|
3258
|
-
dataType:
|
|
3410
|
+
view: a?.view ?? e.dimension.view,
|
|
3411
|
+
dataType: n
|
|
3259
3412
|
});
|
|
3260
3413
|
}
|
|
3261
3414
|
}
|
|
3262
|
-
return [...
|
|
3263
|
-
},
|
|
3264
|
-
let t = e.selection.getActiveSelection(
|
|
3415
|
+
return [...s.values()];
|
|
3416
|
+
}, a = () => {
|
|
3417
|
+
let t = e.selection.getActiveSelection(K.FilterType.ALL);
|
|
3265
3418
|
if (typeof t != "object" || !t) return {
|
|
3266
3419
|
applied: [],
|
|
3267
3420
|
pending: []
|
|
@@ -3271,7 +3424,7 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3271
3424
|
applied: Array.isArray(n.applied) ? n.applied : [],
|
|
3272
3425
|
pending: Array.isArray(n.pending) ? n.pending : []
|
|
3273
3426
|
};
|
|
3274
|
-
},
|
|
3427
|
+
}, o = () => Ke(a()), s = (e) => {
|
|
3275
3428
|
let n = t().find((t) => t.key === e);
|
|
3276
3429
|
return n?.view ? {
|
|
3277
3430
|
name: n.name,
|
|
@@ -3285,98 +3438,100 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3285
3438
|
name: n?.name ?? "",
|
|
3286
3439
|
view: n?.view ?? ""
|
|
3287
3440
|
};
|
|
3288
|
-
}, l = (t) => e.selection.isFieldLocked(c(t)), u = (t) => e.selection.getSingleSelectedFields().some((e) =>
|
|
3441
|
+
}, l = (t) => e.selection.isFieldLocked(c(t)), u = (t) => e.selection.getSingleSelectedFields().some((e) => J(e) === t), d = (t, n) => {
|
|
3289
3442
|
e.selection.setNewSelectionState(t, n);
|
|
3290
|
-
}, f = /* @__PURE__ */ new Set(), p = [],
|
|
3291
|
-
let n = t(),
|
|
3443
|
+
}, f = /* @__PURE__ */ new Set(), p = [], m = /* @__PURE__ */ new Map(), h = () => f.forEach((e) => e()), g = () => {
|
|
3444
|
+
let n = t(), r = new Map(n.map((e) => [e.key, e])), i = o(), a = /* @__PURE__ */ new Set([
|
|
3292
3445
|
...n.map((e) => e.key),
|
|
3293
|
-
...
|
|
3294
|
-
...
|
|
3446
|
+
...i.applied.map((e) => J(e)).filter((e) => !!e),
|
|
3447
|
+
...i.pending.map((e) => J(e)).filter((e) => !!e)
|
|
3295
3448
|
]);
|
|
3296
|
-
for (let t of
|
|
3297
|
-
if (
|
|
3298
|
-
let n =
|
|
3449
|
+
for (let t of a) {
|
|
3450
|
+
if (m.has(t)) continue;
|
|
3451
|
+
let n = r.get(t), i = e.selection.isFieldLocked$({
|
|
3299
3452
|
fieldKey: t,
|
|
3300
3453
|
name: n?.name ?? "",
|
|
3301
3454
|
view: n?.view ?? ""
|
|
3302
|
-
}).subscribe(
|
|
3303
|
-
|
|
3455
|
+
}).subscribe(h);
|
|
3456
|
+
m.set(t, i);
|
|
3304
3457
|
}
|
|
3305
|
-
},
|
|
3306
|
-
p.forEach((e) => e.unsubscribe()), p = [],
|
|
3307
|
-
},
|
|
3458
|
+
}, _ = () => {
|
|
3459
|
+
p.forEach((e) => e.unsubscribe()), p = [], m.forEach((e) => e.unsubscribe()), m.clear();
|
|
3460
|
+
}, v = (t) => {
|
|
3308
3461
|
let n = () => t();
|
|
3309
3462
|
if (f.add(n), f.size === 1) try {
|
|
3310
3463
|
p.push(e.selection.onActiveSelectionChange.subscribe(() => {
|
|
3311
|
-
|
|
3464
|
+
g(), h();
|
|
3312
3465
|
}));
|
|
3313
|
-
let t = e.selection.singleSelectFields$?.subscribe(
|
|
3466
|
+
let t = e.selection.singleSelectFields$?.subscribe(h);
|
|
3314
3467
|
t && p.push(t);
|
|
3315
|
-
let n = e.selection.lockedFields$?.subscribe(
|
|
3316
|
-
n && p.push(n), p.push(e.getEvents({ type: pn }).subscribe(
|
|
3468
|
+
let n = e.selection.lockedFields$?.subscribe(h);
|
|
3469
|
+
n && p.push(n), p.push(e.getEvents({ type: pn }).subscribe(h)), g();
|
|
3317
3470
|
} catch (e) {
|
|
3318
|
-
throw f.delete(n),
|
|
3471
|
+
throw f.delete(n), _(), e;
|
|
3319
3472
|
}
|
|
3320
3473
|
return () => {
|
|
3321
|
-
f.delete(n), f.size === 0 &&
|
|
3474
|
+
f.delete(n), f.size === 0 && _();
|
|
3322
3475
|
};
|
|
3323
|
-
},
|
|
3324
|
-
let
|
|
3325
|
-
if (!
|
|
3326
|
-
let
|
|
3327
|
-
if (!We(e) && !Ze(e) && u(
|
|
3328
|
-
if (
|
|
3476
|
+
}, y = (e, t) => {
|
|
3477
|
+
let n = J(e);
|
|
3478
|
+
if (!n || l(n)) return;
|
|
3479
|
+
let r = t === "inherit" ? S() : t, i = a(), o = Ke(i), s = Y(e);
|
|
3480
|
+
if (!We(e) && !Ze(e) && u(n) && [...o.applied, ...o.pending].some((e) => Y(e) === s && Ze(e))) return;
|
|
3481
|
+
if (r === "auto") {
|
|
3329
3482
|
if (!Ze(e)) {
|
|
3330
3483
|
let e = {
|
|
3331
|
-
applied:
|
|
3332
|
-
pending:
|
|
3484
|
+
applied: i.applied.filter((e) => Y(e) !== s),
|
|
3485
|
+
pending: i.pending.filter((e) => Y(e) !== s)
|
|
3333
3486
|
};
|
|
3334
|
-
d(e,
|
|
3487
|
+
d(e, K.FilterType.ALL);
|
|
3335
3488
|
return;
|
|
3336
3489
|
}
|
|
3337
3490
|
let t = {
|
|
3338
|
-
applied: [...
|
|
3339
|
-
pending:
|
|
3491
|
+
applied: [...i.applied.filter((e) => Y(e) !== s), e],
|
|
3492
|
+
pending: i.pending.filter((e) => Y(e) !== s)
|
|
3340
3493
|
};
|
|
3341
|
-
d(t,
|
|
3494
|
+
d(t, K.FilterType.ALL);
|
|
3342
3495
|
return;
|
|
3343
3496
|
}
|
|
3344
3497
|
let c = {
|
|
3345
|
-
applied:
|
|
3346
|
-
pending: [...
|
|
3498
|
+
applied: i.applied,
|
|
3499
|
+
pending: [...i.pending.filter((e) => Y(e) !== s), e]
|
|
3347
3500
|
};
|
|
3348
|
-
d(c,
|
|
3349
|
-
},
|
|
3350
|
-
let t =
|
|
3501
|
+
d(c, K.FilterType.ALL);
|
|
3502
|
+
}, b = (e) => {
|
|
3503
|
+
let t = J(e);
|
|
3351
3504
|
if (!t || l(t) || u(t)) return;
|
|
3352
|
-
let
|
|
3353
|
-
applied:
|
|
3354
|
-
pending:
|
|
3505
|
+
let n = Ge(e), r = a(), i = {
|
|
3506
|
+
applied: r.applied.filter((e) => Ge(e) !== n),
|
|
3507
|
+
pending: r.pending.filter((e) => Ge(e) !== n)
|
|
3355
3508
|
};
|
|
3356
|
-
d(
|
|
3357
|
-
},
|
|
3358
|
-
let
|
|
3359
|
-
if (!
|
|
3360
|
-
let
|
|
3361
|
-
return
|
|
3362
|
-
if (!
|
|
3363
|
-
let t = e.dimension
|
|
3364
|
-
if (t.length
|
|
3365
|
-
let
|
|
3509
|
+
d(i, K.FilterType.ALL);
|
|
3510
|
+
}, x = () => {
|
|
3511
|
+
let r = e.engine;
|
|
3512
|
+
if (!r) return [];
|
|
3513
|
+
let i = t(), a = new Map(i.map((e) => [e.key, e])), o = r.getGroupedDimensions();
|
|
3514
|
+
return T(null, r).flatMap((e) => {
|
|
3515
|
+
if (!n(e)) return [];
|
|
3516
|
+
let t = e.dimension, r = t?.group;
|
|
3517
|
+
if (!t || !r?.fieldKeys.length) return [];
|
|
3518
|
+
let i = r.fieldKeys.map((e) => a.get(e)).filter((e) => !!e);
|
|
3519
|
+
if (i.length === 0) return [];
|
|
3520
|
+
let s = o[e.id] ?? r.fieldKeys.indexOf(t.fieldKey), c = mn(r.fieldKeys, new Set(a.keys()), s), l = c >= 0 ? c : Math.max(0, i.findIndex((e) => e.key === t.fieldKey));
|
|
3366
3521
|
return [{
|
|
3367
3522
|
id: e.id,
|
|
3368
3523
|
name: e.name,
|
|
3369
|
-
fields:
|
|
3370
|
-
selectedIndex:
|
|
3524
|
+
fields: i,
|
|
3525
|
+
selectedIndex: l
|
|
3371
3526
|
}];
|
|
3372
3527
|
});
|
|
3373
|
-
},
|
|
3528
|
+
}, S = () => e.selection.getSelectionMode?.() === "manual" ? "manual" : "auto", C = () => {
|
|
3374
3529
|
try {
|
|
3375
3530
|
return e.engine?.capabilities?.associativeFiltering === !0;
|
|
3376
3531
|
} catch {
|
|
3377
3532
|
return !1;
|
|
3378
3533
|
}
|
|
3379
|
-
},
|
|
3534
|
+
}, w = async (t) => {
|
|
3380
3535
|
let n = e.engine;
|
|
3381
3536
|
if (!n) return [];
|
|
3382
3537
|
if (n.getAssociatedViews) return n.getAssociatedViews(t);
|
|
@@ -3389,27 +3544,27 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3389
3544
|
};
|
|
3390
3545
|
return {
|
|
3391
3546
|
getFields: t,
|
|
3392
|
-
getSelection:
|
|
3393
|
-
subscribe:
|
|
3394
|
-
select:
|
|
3395
|
-
remove:
|
|
3547
|
+
getSelection: o,
|
|
3548
|
+
subscribe: v,
|
|
3549
|
+
select: y,
|
|
3550
|
+
remove: b,
|
|
3396
3551
|
apply: () => {
|
|
3397
|
-
let t =
|
|
3552
|
+
let t = a().pending;
|
|
3398
3553
|
e.selection.confirmSelectionAll(t, {
|
|
3399
3554
|
overrideValues: !0,
|
|
3400
3555
|
overrideOperator: !0
|
|
3401
3556
|
});
|
|
3402
3557
|
},
|
|
3403
3558
|
cancel: () => {
|
|
3404
|
-
let e =
|
|
3559
|
+
let e = a();
|
|
3405
3560
|
d({
|
|
3406
3561
|
applied: e.applied,
|
|
3407
3562
|
pending: []
|
|
3408
|
-
},
|
|
3563
|
+
}, K.FilterType.ALL);
|
|
3409
3564
|
},
|
|
3410
3565
|
clear: () => e.selection.clearAllSelection(),
|
|
3411
3566
|
isLocked: l,
|
|
3412
|
-
isSingleSelect: (t) => e.selection.getSingleSelectedFields().some((e) =>
|
|
3567
|
+
isSingleSelect: (t) => e.selection.getSingleSelectedFields().some((e) => J(e) === t),
|
|
3413
3568
|
canLock: e.selection.canLock === !0,
|
|
3414
3569
|
toggleLock: (t) => {
|
|
3415
3570
|
e.selection.toggleFieldLocked(c(t));
|
|
@@ -3419,35 +3574,35 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3419
3574
|
return await e.engine.getData(t);
|
|
3420
3575
|
},
|
|
3421
3576
|
areFieldsConnected: (t, n) => {
|
|
3422
|
-
let r =
|
|
3577
|
+
let r = s(t), i = s(n);
|
|
3423
3578
|
return r && i ? e.engine?.areFieldsConnected(r, i) ?? !1 : !1;
|
|
3424
3579
|
},
|
|
3425
3580
|
get supportsAssociativeFiltering() {
|
|
3426
|
-
return
|
|
3581
|
+
return C();
|
|
3427
3582
|
},
|
|
3428
3583
|
getAssociativeFields: async (e, t) => {
|
|
3429
|
-
if (!
|
|
3584
|
+
if (!C() || t.aborted) return [];
|
|
3430
3585
|
let n = e.filter((e) => e.view), r = new Set(n.map((e) => e.view)), i = /* @__PURE__ */ new Set(), a = 0;
|
|
3431
3586
|
return await Promise.all(Array.from({ length: Math.min(4, n.length) }, async () => {
|
|
3432
3587
|
for (; !t.aborted && a < n.length;) {
|
|
3433
3588
|
let e = n[a++];
|
|
3434
3589
|
try {
|
|
3435
|
-
(await
|
|
3590
|
+
(await w(e.key)).some((e) => r.has(e)) && i.add(e.key);
|
|
3436
3591
|
} catch {}
|
|
3437
3592
|
}
|
|
3438
|
-
})), t.aborted || !
|
|
3593
|
+
})), t.aborted || !C() ? [] : n.filter((e) => i.has(e.key));
|
|
3439
3594
|
},
|
|
3440
|
-
getAssociatedViews:
|
|
3441
|
-
getSelectionMode:
|
|
3595
|
+
getAssociatedViews: w,
|
|
3596
|
+
getSelectionMode: S,
|
|
3442
3597
|
getTimeZone: () => e.engine?.localeSettings?.timezone,
|
|
3443
|
-
getDimensionGroups:
|
|
3444
|
-
setDimensionGroup: (
|
|
3598
|
+
getDimensionGroups: x,
|
|
3599
|
+
setDimensionGroup: (r, i) => {
|
|
3445
3600
|
let a = e.engine;
|
|
3446
|
-
if (!a ||
|
|
3447
|
-
let o =
|
|
3601
|
+
if (!a || i < 0) return;
|
|
3602
|
+
let o = T(null, a).find((e) => n(e) && e.id === r && e.dimension?.group?.fieldKeys), s = o && n(o) ? o.dimension?.group?.fieldKeys : void 0, c = new Map(t().map((e) => [e.key, e])), l = s ? hn(s, new Set(c.keys()), i) : void 0;
|
|
3448
3603
|
l !== void 0 && e.emitEvent(pn, {
|
|
3449
3604
|
...a.getGroupedDimensions(),
|
|
3450
|
-
[
|
|
3605
|
+
[r]: l
|
|
3451
3606
|
});
|
|
3452
3607
|
}
|
|
3453
3608
|
};
|
|
@@ -4042,7 +4197,7 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
4042
4197
|
borderRadius: "50%",
|
|
4043
4198
|
background: "var(--afb-popup-surface, var(--afb-surface, #fff))",
|
|
4044
4199
|
boxShadow: "0 0 0 6px var(--afb-popup-surface, var(--afb-surface, #fff))",
|
|
4045
|
-
animation: `${
|
|
4200
|
+
animation: `${_({ to: { transform: "rotate(360deg)" } })} 750ms linear infinite`,
|
|
4046
4201
|
"@media (prefers-reduced-motion: reduce)": { animation: "none" }
|
|
4047
4202
|
},
|
|
4048
4203
|
"& .astrato-app-filter-bar__sr-only": {
|
|
@@ -4166,7 +4321,7 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
4166
4321
|
marginBlock: 8,
|
|
4167
4322
|
minWidth: 0
|
|
4168
4323
|
}
|
|
4169
|
-
}, Tn =
|
|
4324
|
+
}, Tn = v({
|
|
4170
4325
|
...vn,
|
|
4171
4326
|
...yn,
|
|
4172
4327
|
...bn,
|
|
@@ -4175,247 +4330,247 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
4175
4330
|
...Cn,
|
|
4176
4331
|
...wn
|
|
4177
4332
|
}), En = /* @__PURE__ */ new Set([
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
]), Dn = (e, t) => [...e.pending, ...e.applied].find((e) =>
|
|
4333
|
+
K.FilterOperator.NotInList,
|
|
4334
|
+
K.FilterOperator.NotBetween,
|
|
4335
|
+
K.FilterOperator.NotLike,
|
|
4336
|
+
K.FilterOperator.NotEquals,
|
|
4337
|
+
K.FilterOperator.NotContains,
|
|
4338
|
+
K.FilterOperator.NotSet
|
|
4339
|
+
]), Dn = (e, t) => [...e.pending, ...e.applied].find((e) => Y(e) === Y(t));
|
|
4185
4340
|
function On() {
|
|
4186
|
-
return /* @__PURE__ */ (0,
|
|
4341
|
+
return /* @__PURE__ */ (0, k.jsx)(kn, {});
|
|
4187
4342
|
}
|
|
4188
4343
|
function kn({ isExpanded: e = !1 }) {
|
|
4189
|
-
let t =
|
|
4344
|
+
let t = f(), n = h()((e) => e.vSpec), r = m(), i = (0, O.useMemo)(() => gn(t), [t]), [a, o] = (0, O.useState)({
|
|
4190
4345
|
applied: [],
|
|
4191
4346
|
pending: []
|
|
4192
|
-
}), [
|
|
4193
|
-
|
|
4194
|
-
},
|
|
4347
|
+
}), [l, u] = (0, O.useState)(0), [d, p] = (0, O.useState)(), [g, _] = (0, O.useState)(), [v, y] = (0, O.useState)(), [b, S] = (0, O.useState)(), C = (0, O.useRef)(), [w, T] = (0, O.useState)(""), E = (0, O.useId)(), D = (0, O.useId)(), [te, j] = (0, O.useState)(!1), N = n?.appFilterBarSettings ?? {}, P = () => {
|
|
4348
|
+
o(i.getSelection()), u((e) => e + 1);
|
|
4349
|
+
}, F = (e) => {
|
|
4195
4350
|
try {
|
|
4196
|
-
e(),
|
|
4351
|
+
e(), P(), p(void 0);
|
|
4197
4352
|
} catch (e) {
|
|
4198
|
-
|
|
4353
|
+
p(e instanceof Error ? e.message : "Could not update filters.");
|
|
4199
4354
|
}
|
|
4200
4355
|
};
|
|
4201
|
-
(0,
|
|
4356
|
+
(0, O.useEffect)(() => {
|
|
4202
4357
|
let e;
|
|
4203
4358
|
try {
|
|
4204
|
-
|
|
4359
|
+
P(), e = i.subscribe(P);
|
|
4205
4360
|
} catch (e) {
|
|
4206
|
-
|
|
4361
|
+
p(e instanceof Error ? e.message : "Could not connect to the selection service.");
|
|
4207
4362
|
}
|
|
4208
4363
|
return () => e?.();
|
|
4209
|
-
}, [
|
|
4210
|
-
!e &&
|
|
4364
|
+
}, [i]), (0, O.useEffect)(() => {
|
|
4365
|
+
!e && n?.type === s.AppFilterBar && r();
|
|
4211
4366
|
}, [
|
|
4367
|
+
n,
|
|
4212
4368
|
r,
|
|
4213
|
-
i,
|
|
4214
4369
|
e
|
|
4215
|
-
]), (0,
|
|
4216
|
-
if (!
|
|
4217
|
-
let e = Dn(
|
|
4218
|
-
t !==
|
|
4219
|
-
}, [
|
|
4220
|
-
let
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
]),
|
|
4225
|
-
(0,
|
|
4226
|
-
if (!
|
|
4370
|
+
]), (0, O.useEffect)(() => {
|
|
4371
|
+
if (!v) return;
|
|
4372
|
+
let e = Dn(a, v), t = JSON.stringify(e);
|
|
4373
|
+
t !== C.current && (C.current = t, e ? y(structuredClone(e)) : (y(void 0), _(void 0)));
|
|
4374
|
+
}, [a, v]);
|
|
4375
|
+
let I = (0, O.useMemo)(() => i.getFields(), [i, l]), L = (0, O.useMemo)(() => N.showChartBreakdown === !0 ? i.getDimensionGroups().filter((e) => e.fields.length > 1) : [], [
|
|
4376
|
+
i,
|
|
4377
|
+
l,
|
|
4378
|
+
N.showChartBreakdown
|
|
4379
|
+
]), ie = (0, O.useMemo)(() => new Map(I.map((e) => [e.key, e])), [I]), ae = N.selectableFieldKeys?.length ? new Set(N.selectableFieldKeys) : void 0, oe = I.filter((e) => !ae || ae.has(e.key)), R = JSON.stringify(oe), z = i.supportsAssociativeFiltering, B = N.enableAssociativeFilter !== !1 && z, V = g?.kind === "fields", H = z && b?.services === i && b.fieldMetadata === R ? b.fields : [];
|
|
4380
|
+
(0, O.useEffect)(() => {
|
|
4381
|
+
if (!V || !B) return;
|
|
4227
4382
|
let e = new AbortController();
|
|
4228
|
-
|
|
4229
|
-
let t = JSON.parse(
|
|
4230
|
-
return
|
|
4231
|
-
e.signal.aborted ||
|
|
4232
|
-
services:
|
|
4233
|
-
fieldMetadata:
|
|
4383
|
+
S(void 0);
|
|
4384
|
+
let t = JSON.parse(R);
|
|
4385
|
+
return i.getAssociativeFields(t, e.signal).then((t) => {
|
|
4386
|
+
e.signal.aborted || S({
|
|
4387
|
+
services: i,
|
|
4388
|
+
fieldMetadata: R,
|
|
4234
4389
|
fields: t
|
|
4235
4390
|
});
|
|
4236
4391
|
}), () => e.abort();
|
|
4237
4392
|
}, [
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4393
|
+
i,
|
|
4394
|
+
R,
|
|
4395
|
+
B,
|
|
4396
|
+
V
|
|
4242
4397
|
]);
|
|
4243
|
-
let
|
|
4244
|
-
(0,
|
|
4245
|
-
|
|
4246
|
-
}, [
|
|
4247
|
-
let { chipsRef: ue, visibleCount: de } = dn(
|
|
4248
|
-
|
|
4249
|
-
}, _e = () =>
|
|
4250
|
-
|
|
4251
|
-
}), ve = () =>
|
|
4252
|
-
|
|
4253
|
-
}), ye = (e) =>
|
|
4398
|
+
let se = oe.filter((e) => `${e.name} ${e.view ?? ""}`.toLocaleLowerCase().includes(w.toLocaleLowerCase().trim())), U = Je(a), ce = e ? "vertical" : N.orientation ?? "horizontal", { barRef: le, overflow: W } = fn(!e && N.overflow === "button" ? "button" : ce === "vertical" ? "wrap" : N.overflow ?? "wrap", !!n);
|
|
4399
|
+
(0, O.useEffect)(() => {
|
|
4400
|
+
W !== "button" && j(!1), _(void 0), y(void 0);
|
|
4401
|
+
}, [W]);
|
|
4402
|
+
let { chipsRef: ue, visibleCount: de } = dn(W === "collapse", JSON.stringify(U), U.length), fe = U.length - de, pe = U.slice(de).some((e) => e.pending), G = a.pending.length > 0, me = G && a.pending.every(Ze) && (!v || Ze(v)), he = a.applied.length > 0 || G, ge = () => {
|
|
4403
|
+
_(void 0), y(void 0), C.current = void 0;
|
|
4404
|
+
}, _e = () => F(() => {
|
|
4405
|
+
i.cancel(), ge();
|
|
4406
|
+
}), ve = () => F(() => {
|
|
4407
|
+
i.apply(), ge();
|
|
4408
|
+
}), ye = (e) => ie.get(e.fieldKey) ?? {
|
|
4254
4409
|
key: e.fieldKey,
|
|
4255
4410
|
name: e.fieldKey,
|
|
4256
|
-
dataType:
|
|
4411
|
+
dataType: K.FieldType.STRING
|
|
4257
4412
|
}, be = (e, t, n = !1) => {
|
|
4258
|
-
|
|
4413
|
+
C.current = JSON.stringify(Dn(a, e)), y(structuredClone(e)), _({
|
|
4259
4414
|
kind: "filter",
|
|
4260
4415
|
anchor: t,
|
|
4261
4416
|
fromOverflow: n
|
|
4262
4417
|
});
|
|
4263
4418
|
}, xe = (e) => {
|
|
4264
|
-
if (!
|
|
4265
|
-
let t =
|
|
4266
|
-
be(t ?? dt(e),
|
|
4419
|
+
if (!g) return;
|
|
4420
|
+
let t = a.pending.find((t) => t.fieldKey === e.key && !("associativeListFilter" in t)) ?? a.applied.find((t) => t.fieldKey === e.key && !("associativeListFilter" in t));
|
|
4421
|
+
be(t ?? dt(e), g.anchor);
|
|
4267
4422
|
}, Se = (e) => {
|
|
4268
|
-
|
|
4269
|
-
let t =
|
|
4270
|
-
(Ze(e) || r && (n === "manual" ||
|
|
4423
|
+
y(e);
|
|
4424
|
+
let t = N.selectionMode ?? "inherit", n = t === "inherit" ? i.getSelectionMode() : t, r = !!Dn(i.getSelection(), e), a = "operator" in e && ([K.FilterOperator.InList, K.FilterOperator.NotInList].includes(e.operator) && !e.values?.length || [K.FilterOperator.Like, K.FilterOperator.NotLike].includes(e.operator) && !String(e.values?.[0] ?? "").trim());
|
|
4425
|
+
(Ze(e) || r && (n === "manual" || a)) && F(() => i.select(e, t)), C.current = JSON.stringify(Dn(i.getSelection(), e));
|
|
4271
4426
|
}, Ce = (e, t, n = !1) => {
|
|
4272
|
-
let { id: r, filter:
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
].includes(s.dataType) && "operator" in
|
|
4278
|
-
return /* @__PURE__ */ (0,
|
|
4427
|
+
let { id: r, filter: a, pending: o } = e, s = ye(a), c = i.isLocked(a.fieldKey), l = i.isSingleSelect(a.fieldKey), u = Qe(a, (e) => [
|
|
4428
|
+
K.FieldType.DATE,
|
|
4429
|
+
K.FieldType.TIME,
|
|
4430
|
+
K.FieldType.TIMESTAMP,
|
|
4431
|
+
K.FieldType.TIMESTAMP_TZ
|
|
4432
|
+
].includes(s.dataType) && "operator" in a && !a.datePart && (typeof e == "number" || typeof e == "string") ? mt(e, s.dataType, i.getTimeZone() ?? "UTC").replace("T", " ") || String(e) : e === null ? "Null" : String(e)), d = "operator" in a && En.has(a.operator), f = g?.kind === "filter" && v && Ge(v) === r;
|
|
4433
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
4279
4434
|
className: "astrato-app-filter-bar__chip",
|
|
4280
4435
|
"data-overflow-hidden": !n && t >= de,
|
|
4281
4436
|
"aria-hidden": !n && t >= de || void 0,
|
|
4282
4437
|
"data-pending": !!o,
|
|
4283
4438
|
"data-excluded": d,
|
|
4284
4439
|
"data-locked": c,
|
|
4285
|
-
children: [/* @__PURE__ */ (0,
|
|
4440
|
+
children: [/* @__PURE__ */ (0, k.jsxs)(A, {
|
|
4286
4441
|
"aria-haspopup": "dialog",
|
|
4287
4442
|
"aria-controls": E,
|
|
4288
4443
|
"aria-expanded": !!f,
|
|
4289
4444
|
"aria-label": `${d ? "Not " : ""}${s.name}: ${u.text || "Choose values"}${c ? ", locked" : ""}`,
|
|
4290
|
-
onClick: (e) => be(
|
|
4445
|
+
onClick: (e) => be(a, n && g ? g.anchor : e.currentTarget, n),
|
|
4291
4446
|
title: `${s.name}: ${u.text}`,
|
|
4292
4447
|
children: [
|
|
4293
|
-
/* @__PURE__ */ (0,
|
|
4294
|
-
/* @__PURE__ */ (0,
|
|
4448
|
+
/* @__PURE__ */ (0, k.jsx)(x, { name: "filter" }),
|
|
4449
|
+
/* @__PURE__ */ (0, k.jsxs)("span", {
|
|
4295
4450
|
className: "astrato-app-filter-bar__chip-label",
|
|
4296
4451
|
children: [
|
|
4297
|
-
/* @__PURE__ */ (0,
|
|
4298
|
-
/* @__PURE__ */ (0,
|
|
4452
|
+
/* @__PURE__ */ (0, k.jsx)("strong", { children: d ? `Not ${s.name}` : s.name }),
|
|
4453
|
+
/* @__PURE__ */ (0, k.jsx)("span", {
|
|
4299
4454
|
className: "astrato-app-filter-bar__chip-divider",
|
|
4300
4455
|
"aria-hidden": "true",
|
|
4301
4456
|
children: "·"
|
|
4302
4457
|
}),
|
|
4303
|
-
/* @__PURE__ */ (0,
|
|
4458
|
+
/* @__PURE__ */ (0, k.jsx)("span", {
|
|
4304
4459
|
className: "astrato-app-filter-bar__chip-summary",
|
|
4305
4460
|
children: u.text || "Choose values"
|
|
4306
4461
|
})
|
|
4307
4462
|
]
|
|
4308
4463
|
}),
|
|
4309
|
-
c && /* @__PURE__ */ (0,
|
|
4464
|
+
c && /* @__PURE__ */ (0, k.jsx)("span", {
|
|
4310
4465
|
"aria-label": "Locked",
|
|
4311
|
-
children: /* @__PURE__ */ (0,
|
|
4466
|
+
children: /* @__PURE__ */ (0, k.jsx)(x, { name: "lock" })
|
|
4312
4467
|
})
|
|
4313
4468
|
]
|
|
4314
|
-
}), /* @__PURE__ */ (0,
|
|
4469
|
+
}), /* @__PURE__ */ (0, k.jsx)(A, {
|
|
4315
4470
|
"data-icon-only": "true",
|
|
4316
4471
|
"aria-label": `Remove ${s.name} filter`,
|
|
4317
4472
|
disabled: c || l,
|
|
4318
4473
|
onClick: (e) => {
|
|
4319
4474
|
let t = e.currentTarget.closest(".astrato-app-filter-bar__chip"), n = (t?.nextElementSibling ?? t?.previousElementSibling)?.querySelector("button:not(:disabled)") ?? t?.closest("[role=\"dialog\"], dialog")?.querySelector("button:not(:disabled)");
|
|
4320
|
-
|
|
4321
|
-
|
|
4475
|
+
F(() => {
|
|
4476
|
+
i.remove(a), f ? ge() : n?.focus();
|
|
4322
4477
|
});
|
|
4323
4478
|
},
|
|
4324
|
-
children: /* @__PURE__ */ (0,
|
|
4479
|
+
children: /* @__PURE__ */ (0, k.jsx)(x, { name: "close" })
|
|
4325
4480
|
})]
|
|
4326
4481
|
}, r);
|
|
4327
4482
|
};
|
|
4328
|
-
return
|
|
4329
|
-
ref:
|
|
4330
|
-
className:
|
|
4483
|
+
return n ? W === "button" ? /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
4484
|
+
ref: le,
|
|
4485
|
+
className: c("astrato-app-filter-bar", Tn),
|
|
4331
4486
|
"data-overflow": "button",
|
|
4332
4487
|
role: "region",
|
|
4333
4488
|
"aria-label": "Filters",
|
|
4334
|
-
children: [/* @__PURE__ */ (0,
|
|
4489
|
+
children: [/* @__PURE__ */ (0, k.jsxs)(A, {
|
|
4335
4490
|
className: "astrato-app-filter-bar__overflow astrato-app-filter-bar__trigger",
|
|
4336
|
-
"data-pending":
|
|
4337
|
-
"aria-label": `Filters (${
|
|
4491
|
+
"data-pending": G,
|
|
4492
|
+
"aria-label": `Filters (${U.length})${G ? ", pending changes" : ""}`,
|
|
4338
4493
|
"aria-haspopup": "dialog",
|
|
4339
|
-
"aria-expanded":
|
|
4340
|
-
"aria-controls":
|
|
4341
|
-
onClick: () =>
|
|
4494
|
+
"aria-expanded": te,
|
|
4495
|
+
"aria-controls": D,
|
|
4496
|
+
onClick: () => j(!0),
|
|
4342
4497
|
children: [
|
|
4343
|
-
/* @__PURE__ */ (0,
|
|
4498
|
+
/* @__PURE__ */ (0, k.jsx)(x, { name: "filter" }),
|
|
4344
4499
|
" Filters (",
|
|
4345
|
-
|
|
4500
|
+
U.length,
|
|
4346
4501
|
")"
|
|
4347
4502
|
]
|
|
4348
|
-
}),
|
|
4349
|
-
id:
|
|
4503
|
+
}), te && /* @__PURE__ */ (0, k.jsxs)(re, {
|
|
4504
|
+
id: D,
|
|
4350
4505
|
className: "astrato-app-filter-bar__modal",
|
|
4351
|
-
"aria-labelledby": `${
|
|
4352
|
-
onCloseDialog: () =>
|
|
4353
|
-
children: [/* @__PURE__ */ (0,
|
|
4506
|
+
"aria-labelledby": `${D}-title`,
|
|
4507
|
+
onCloseDialog: () => j(!1),
|
|
4508
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
4354
4509
|
className: "astrato-app-filter-bar__popover-header",
|
|
4355
|
-
children: [/* @__PURE__ */ (0,
|
|
4356
|
-
id: `${
|
|
4510
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("strong", {
|
|
4511
|
+
id: `${D}-title`,
|
|
4357
4512
|
children: [
|
|
4358
4513
|
"Filters (",
|
|
4359
|
-
|
|
4514
|
+
U.length,
|
|
4360
4515
|
")"
|
|
4361
4516
|
]
|
|
4362
|
-
}), /* @__PURE__ */ (0,
|
|
4517
|
+
}), /* @__PURE__ */ (0, k.jsx)(A, {
|
|
4363
4518
|
"data-icon-only": "true",
|
|
4364
4519
|
"data-variant": "ghost",
|
|
4365
4520
|
"aria-label": "Close filters",
|
|
4366
|
-
onClick: () =>
|
|
4367
|
-
children: /* @__PURE__ */ (0,
|
|
4521
|
+
onClick: () => j(!1),
|
|
4522
|
+
children: /* @__PURE__ */ (0, k.jsx)(x, { name: "close" })
|
|
4368
4523
|
})]
|
|
4369
|
-
}), /* @__PURE__ */ (0,
|
|
4524
|
+
}), /* @__PURE__ */ (0, k.jsx)(kn, { isExpanded: !0 })]
|
|
4370
4525
|
})]
|
|
4371
|
-
}) : /* @__PURE__ */ (0,
|
|
4372
|
-
ref:
|
|
4373
|
-
className:
|
|
4526
|
+
}) : /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
4527
|
+
ref: le,
|
|
4528
|
+
className: c("astrato-app-filter-bar", Tn),
|
|
4374
4529
|
role: "region",
|
|
4375
4530
|
tabIndex: -1,
|
|
4376
4531
|
"aria-label": "Filters",
|
|
4377
|
-
"data-selection-mode":
|
|
4378
|
-
"data-overflow":
|
|
4379
|
-
"data-orientation":
|
|
4532
|
+
"data-selection-mode": N.selectionMode ?? "inherit",
|
|
4533
|
+
"data-overflow": W,
|
|
4534
|
+
"data-orientation": ce,
|
|
4380
4535
|
children: [
|
|
4381
|
-
|
|
4382
|
-
"aria-expanded":
|
|
4536
|
+
N.enableAddingNewFilters !== !1 && /* @__PURE__ */ (0, k.jsxs)(A, {
|
|
4537
|
+
"aria-expanded": g?.kind === "fields",
|
|
4383
4538
|
"aria-controls": E,
|
|
4384
4539
|
"aria-haspopup": "dialog",
|
|
4385
4540
|
onClick: (e) => {
|
|
4386
|
-
T(""),
|
|
4541
|
+
T(""), y(void 0), _({
|
|
4387
4542
|
kind: "fields",
|
|
4388
4543
|
anchor: e.currentTarget
|
|
4389
4544
|
});
|
|
4390
4545
|
},
|
|
4391
|
-
children: [/* @__PURE__ */ (0,
|
|
4546
|
+
children: [/* @__PURE__ */ (0, k.jsx)(x, { name: "plus" }), " New filter"]
|
|
4392
4547
|
}),
|
|
4393
|
-
|
|
4548
|
+
L.length > 0 && /* @__PURE__ */ (0, k.jsxs)(A, {
|
|
4394
4549
|
"aria-haspopup": "dialog",
|
|
4395
4550
|
"aria-controls": E,
|
|
4396
|
-
"aria-expanded":
|
|
4397
|
-
onClick: (e) =>
|
|
4551
|
+
"aria-expanded": g?.kind === "groups",
|
|
4552
|
+
onClick: (e) => _({
|
|
4398
4553
|
kind: "groups",
|
|
4399
4554
|
anchor: e.currentTarget
|
|
4400
4555
|
}),
|
|
4401
|
-
children: [/* @__PURE__ */ (0,
|
|
4556
|
+
children: [/* @__PURE__ */ (0, k.jsx)(x, { name: "dimensions" }), " Chart breakdown"]
|
|
4402
4557
|
}),
|
|
4403
|
-
/* @__PURE__ */ (0,
|
|
4558
|
+
/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
4404
4559
|
ref: ue,
|
|
4405
4560
|
className: "astrato-app-filter-bar__chips",
|
|
4406
4561
|
"aria-live": "polite",
|
|
4407
4562
|
"aria-relevant": "additions removals",
|
|
4408
4563
|
children: [
|
|
4409
|
-
|
|
4410
|
-
|
|
4564
|
+
U.map((e, t) => Ce(e, t)),
|
|
4565
|
+
W === "collapse" && U.length > 0 && /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [/* @__PURE__ */ (0, k.jsx)("div", {
|
|
4411
4566
|
className: "astrato-app-filter-bar__overflow-probes",
|
|
4412
4567
|
"aria-hidden": "true",
|
|
4413
|
-
children:
|
|
4568
|
+
children: U.map((e, t) => /* @__PURE__ */ (0, k.jsxs)("span", {
|
|
4414
4569
|
className: "astrato-app-filter-bar__button astrato-app-filter-bar__overflow",
|
|
4415
4570
|
"data-overflow-count": t + 1,
|
|
4416
4571
|
children: ["+", t + 1]
|
|
4417
4572
|
}, e.id))
|
|
4418
|
-
}), /* @__PURE__ */ (0,
|
|
4573
|
+
}), /* @__PURE__ */ (0, k.jsxs)(A, {
|
|
4419
4574
|
className: "astrato-app-filter-bar__overflow",
|
|
4420
4575
|
"data-overflow-hidden": fe === 0,
|
|
4421
4576
|
"data-pending": pe,
|
|
@@ -4423,188 +4578,188 @@ function kn({ isExpanded: e = !1 }) {
|
|
|
4423
4578
|
"aria-label": `${fe} hidden filters${pe ? ", pending changes" : ""}`,
|
|
4424
4579
|
"aria-haspopup": "dialog",
|
|
4425
4580
|
"aria-controls": E,
|
|
4426
|
-
"aria-expanded":
|
|
4581
|
+
"aria-expanded": g?.kind === "overflow" || !!g?.fromOverflow,
|
|
4427
4582
|
onClick: (e) => {
|
|
4428
|
-
|
|
4583
|
+
y(void 0), _({
|
|
4429
4584
|
kind: "overflow",
|
|
4430
4585
|
anchor: e.currentTarget
|
|
4431
4586
|
});
|
|
4432
4587
|
},
|
|
4433
4588
|
children: ["+", fe]
|
|
4434
4589
|
})] }),
|
|
4435
|
-
!
|
|
4590
|
+
!U.length && /* @__PURE__ */ (0, k.jsxs)("span", {
|
|
4436
4591
|
className: "astrato-app-filter-bar__empty-bar",
|
|
4437
|
-
children: [/* @__PURE__ */ (0,
|
|
4592
|
+
children: [/* @__PURE__ */ (0, k.jsx)(x, { name: "filter" }), "No active filters"]
|
|
4438
4593
|
})
|
|
4439
4594
|
]
|
|
4440
4595
|
}),
|
|
4441
|
-
/* @__PURE__ */ (0,
|
|
4596
|
+
/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
4442
4597
|
className: "astrato-app-filter-bar__actions",
|
|
4443
|
-
children: [
|
|
4598
|
+
children: [G && /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [/* @__PURE__ */ (0, k.jsx)(A, {
|
|
4444
4599
|
onClick: _e,
|
|
4445
4600
|
"data-variant": "ghost",
|
|
4446
4601
|
children: "Cancel"
|
|
4447
|
-
}), /* @__PURE__ */ (0,
|
|
4602
|
+
}), /* @__PURE__ */ (0, k.jsxs)(A, {
|
|
4448
4603
|
"data-primary": "true",
|
|
4449
4604
|
disabled: !me,
|
|
4450
4605
|
onClick: ve,
|
|
4451
|
-
children: [/* @__PURE__ */ (0,
|
|
4452
|
-
})] }),
|
|
4606
|
+
children: [/* @__PURE__ */ (0, k.jsx)(x, { name: "check" }), " Apply"]
|
|
4607
|
+
})] }), N.showClearAll !== !1 && he && /* @__PURE__ */ (0, k.jsxs)(A, {
|
|
4453
4608
|
"data-variant": "ghost",
|
|
4454
|
-
onClick: () =>
|
|
4455
|
-
|
|
4609
|
+
onClick: () => F(() => {
|
|
4610
|
+
i.clear(), ge();
|
|
4456
4611
|
}),
|
|
4457
|
-
children: [/* @__PURE__ */ (0,
|
|
4612
|
+
children: [/* @__PURE__ */ (0, k.jsx)(x, { name: "reset" }), " Clear all"]
|
|
4458
4613
|
})]
|
|
4459
4614
|
}),
|
|
4460
|
-
d && /* @__PURE__ */ (0,
|
|
4615
|
+
d && /* @__PURE__ */ (0, k.jsx)("div", {
|
|
4461
4616
|
className: "astrato-app-filter-bar__error",
|
|
4462
4617
|
role: "alert",
|
|
4463
4618
|
children: d
|
|
4464
4619
|
}),
|
|
4465
|
-
|
|
4620
|
+
g && (g.kind !== "groups" || L.length > 0) && /* @__PURE__ */ (0, k.jsxs)(cn, {
|
|
4466
4621
|
id: E,
|
|
4467
|
-
anchor:
|
|
4468
|
-
placement:
|
|
4469
|
-
className:
|
|
4622
|
+
anchor: g.anchor,
|
|
4623
|
+
placement: ce === "vertical" ? "side" : "bottom",
|
|
4624
|
+
className: g.kind === "fields" ? "astrato-app-filter-bar__field-picker" : g.kind === "overflow" ? "astrato-app-filter-bar__overflow-popover" : void 0,
|
|
4470
4625
|
onClose: ge,
|
|
4471
|
-
subtitle:
|
|
4472
|
-
icon:
|
|
4473
|
-
fieldType: ye(
|
|
4626
|
+
subtitle: g.kind === "groups" ? "Choose the fields shown in your charts" : g.kind === "filter" && v ? ye(v).view : void 0,
|
|
4627
|
+
icon: g.kind === "filter" && v ? /* @__PURE__ */ (0, k.jsx)(ee, {
|
|
4628
|
+
fieldType: ye(v).dataType,
|
|
4474
4629
|
fill: "currentColor"
|
|
4475
|
-
}) : /* @__PURE__ */ (0,
|
|
4476
|
-
title:
|
|
4630
|
+
}) : /* @__PURE__ */ (0, k.jsx)(x, { name: g.kind === "groups" ? "dimensions" : "filter" }),
|
|
4631
|
+
title: g.kind === "fields" ? "Add filter" : g.kind === "groups" ? "Chart breakdown" : g.kind === "overflow" ? `Filters (${U.length})` : v ? ye(v).name : "Filter",
|
|
4477
4632
|
children: [
|
|
4478
|
-
|
|
4633
|
+
g.kind === "overflow" && /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
4479
4634
|
className: "astrato-app-filter-bar__overflow-list",
|
|
4480
|
-
children: [
|
|
4635
|
+
children: [U.map((e, t) => Ce(e, t, !0)), !U.length && /* @__PURE__ */ (0, k.jsx)("p", {
|
|
4481
4636
|
className: "astrato-app-filter-bar__muted",
|
|
4482
4637
|
children: "No active filters"
|
|
4483
4638
|
})]
|
|
4484
|
-
}),
|
|
4639
|
+
}), G && /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
4485
4640
|
className: "astrato-app-filter-bar__editor-footer",
|
|
4486
|
-
children: [/* @__PURE__ */ (0,
|
|
4641
|
+
children: [/* @__PURE__ */ (0, k.jsx)(A, {
|
|
4487
4642
|
"data-variant": "ghost",
|
|
4488
4643
|
onClick: _e,
|
|
4489
4644
|
children: "Cancel"
|
|
4490
|
-
}), /* @__PURE__ */ (0,
|
|
4645
|
+
}), /* @__PURE__ */ (0, k.jsxs)(A, {
|
|
4491
4646
|
"data-primary": "true",
|
|
4492
4647
|
disabled: !me,
|
|
4493
4648
|
onClick: ve,
|
|
4494
|
-
children: [/* @__PURE__ */ (0,
|
|
4649
|
+
children: [/* @__PURE__ */ (0, k.jsx)(x, { name: "check" }), " Apply"]
|
|
4495
4650
|
})]
|
|
4496
4651
|
})] }),
|
|
4497
|
-
|
|
4498
|
-
/* @__PURE__ */ (0,
|
|
4652
|
+
g.kind === "fields" && /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [
|
|
4653
|
+
/* @__PURE__ */ (0, k.jsx)(ne, {
|
|
4499
4654
|
"aria-label": "Search fields",
|
|
4500
4655
|
placeholder: "Search fields…",
|
|
4501
|
-
value:
|
|
4656
|
+
value: w,
|
|
4502
4657
|
onChange: (e) => T(e.target.value)
|
|
4503
4658
|
}),
|
|
4504
|
-
/* @__PURE__ */ (0,
|
|
4659
|
+
/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
4505
4660
|
className: "astrato-app-filter-bar__values",
|
|
4506
|
-
children: [
|
|
4661
|
+
children: [se.map((e) => /* @__PURE__ */ (0, k.jsxs)(A, {
|
|
4507
4662
|
className: "astrato-app-filter-bar__value astrato-app-filter-bar__field-option",
|
|
4508
|
-
disabled:
|
|
4663
|
+
disabled: i.isLocked(e.key),
|
|
4509
4664
|
title: e.view ? `${e.name} · ${e.view}` : e.name,
|
|
4510
4665
|
onClick: () => xe(e),
|
|
4511
4666
|
children: [
|
|
4512
|
-
/* @__PURE__ */ (0,
|
|
4667
|
+
/* @__PURE__ */ (0, k.jsx)("span", {
|
|
4513
4668
|
className: "astrato-app-filter-bar__field-icon",
|
|
4514
4669
|
"aria-hidden": "true",
|
|
4515
|
-
children: /* @__PURE__ */ (0,
|
|
4670
|
+
children: /* @__PURE__ */ (0, k.jsx)(ee, {
|
|
4516
4671
|
fieldType: e.dataType,
|
|
4517
4672
|
fill: "currentColor"
|
|
4518
4673
|
})
|
|
4519
4674
|
}),
|
|
4520
|
-
/* @__PURE__ */ (0,
|
|
4675
|
+
/* @__PURE__ */ (0, k.jsxs)("span", {
|
|
4521
4676
|
className: "astrato-app-filter-bar__field-name",
|
|
4522
|
-
children: [/* @__PURE__ */ (0,
|
|
4677
|
+
children: [/* @__PURE__ */ (0, k.jsx)("span", {
|
|
4523
4678
|
className: "astrato-app-filter-bar__field-label",
|
|
4524
4679
|
children: e.name
|
|
4525
|
-
}), /* @__PURE__ */ (0,
|
|
4680
|
+
}), /* @__PURE__ */ (0, k.jsx)("small", {
|
|
4526
4681
|
className: "astrato-app-filter-bar__muted",
|
|
4527
4682
|
children: e.view
|
|
4528
4683
|
})]
|
|
4529
4684
|
}),
|
|
4530
|
-
/* @__PURE__ */ (0,
|
|
4685
|
+
/* @__PURE__ */ (0, k.jsx)(x, { name: "chevronRight" })
|
|
4531
4686
|
]
|
|
4532
|
-
}, e.key)), !
|
|
4687
|
+
}, e.key)), !se.length && /* @__PURE__ */ (0, k.jsx)("p", {
|
|
4533
4688
|
className: "astrato-app-filter-bar__muted",
|
|
4534
4689
|
children: "No matching fields"
|
|
4535
4690
|
})]
|
|
4536
4691
|
}),
|
|
4537
|
-
|
|
4692
|
+
B && H.length > 0 && /* @__PURE__ */ (0, k.jsxs)(A, {
|
|
4538
4693
|
className: "astrato-app-filter-bar__association-action",
|
|
4539
4694
|
"data-variant": "ghost",
|
|
4540
4695
|
onClick: () => be({
|
|
4541
|
-
fieldKey:
|
|
4696
|
+
fieldKey: H[0].key,
|
|
4542
4697
|
associativeListFilter: {
|
|
4543
|
-
view:
|
|
4698
|
+
view: H[0].view ?? "",
|
|
4544
4699
|
intersectFilters: [],
|
|
4545
4700
|
unionFilters: []
|
|
4546
4701
|
}
|
|
4547
|
-
},
|
|
4548
|
-
children: [/* @__PURE__ */ (0,
|
|
4702
|
+
}, g.anchor),
|
|
4703
|
+
children: [/* @__PURE__ */ (0, k.jsx)(x, { name: "association" }), " New associative filter"]
|
|
4549
4704
|
})
|
|
4550
4705
|
] }),
|
|
4551
|
-
|
|
4706
|
+
g.kind === "groups" && L.map((e) => /* @__PURE__ */ (0, k.jsxs)("label", {
|
|
4552
4707
|
className: "astrato-app-filter-bar__field",
|
|
4553
|
-
children: [e.name, /* @__PURE__ */ (0,
|
|
4708
|
+
children: [e.name, /* @__PURE__ */ (0, k.jsx)(M, {
|
|
4554
4709
|
value: e.selectedIndex,
|
|
4555
|
-
onChange: (t) =>
|
|
4556
|
-
children: e.fields.map((e, t) => /* @__PURE__ */ (0,
|
|
4710
|
+
onChange: (t) => F(() => i.setDimensionGroup(e.id, Number(t.target.value))),
|
|
4711
|
+
children: e.fields.map((e, t) => /* @__PURE__ */ (0, k.jsx)("option", {
|
|
4557
4712
|
value: t,
|
|
4558
4713
|
children: e.name
|
|
4559
4714
|
}, e.key))
|
|
4560
4715
|
})]
|
|
4561
4716
|
}, e.id)),
|
|
4562
|
-
|
|
4563
|
-
filter:
|
|
4564
|
-
fields:
|
|
4565
|
-
targetFields:
|
|
4566
|
-
services:
|
|
4717
|
+
g.kind === "filter" && v && /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: ["associativeListFilter" in v ? z ? /* @__PURE__ */ (0, k.jsx)(an, {
|
|
4718
|
+
filter: v,
|
|
4719
|
+
fields: oe,
|
|
4720
|
+
targetFields: H.some((e) => e.key === v.fieldKey) ? H : [ye(v), ...H],
|
|
4721
|
+
services: i,
|
|
4567
4722
|
onChange: Se,
|
|
4568
|
-
disabled:
|
|
4569
|
-
}) : /* @__PURE__ */ (0,
|
|
4723
|
+
disabled: i.isLocked(v.fieldKey)
|
|
4724
|
+
}) : /* @__PURE__ */ (0, k.jsx)("p", {
|
|
4570
4725
|
className: "astrato-app-filter-bar__muted",
|
|
4571
4726
|
children: "Associative filter editing is unavailable in this app."
|
|
4572
|
-
}) : /* @__PURE__ */ (0,
|
|
4573
|
-
field: ye(
|
|
4574
|
-
filter:
|
|
4575
|
-
services:
|
|
4727
|
+
}) : /* @__PURE__ */ (0, k.jsx)(Zt, {
|
|
4728
|
+
field: ye(v),
|
|
4729
|
+
filter: v,
|
|
4730
|
+
services: i,
|
|
4576
4731
|
onChange: Se,
|
|
4577
|
-
disabled:
|
|
4578
|
-
}), /* @__PURE__ */ (0,
|
|
4732
|
+
disabled: i.isLocked(v.fieldKey)
|
|
4733
|
+
}), /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
4579
4734
|
className: "astrato-app-filter-bar__editor-footer",
|
|
4580
4735
|
children: [
|
|
4581
|
-
|
|
4736
|
+
g.fromOverflow && /* @__PURE__ */ (0, k.jsx)(A, {
|
|
4582
4737
|
"data-variant": "ghost",
|
|
4583
4738
|
onClick: () => {
|
|
4584
|
-
|
|
4739
|
+
y(void 0), _({
|
|
4585
4740
|
kind: "overflow",
|
|
4586
|
-
anchor:
|
|
4741
|
+
anchor: g.anchor
|
|
4587
4742
|
});
|
|
4588
4743
|
},
|
|
4589
4744
|
children: "All filters"
|
|
4590
4745
|
}),
|
|
4591
|
-
|
|
4746
|
+
i.canLock && /* @__PURE__ */ (0, k.jsxs)(A, {
|
|
4592
4747
|
"data-variant": "ghost",
|
|
4593
|
-
onClick: () =>
|
|
4594
|
-
children: [/* @__PURE__ */ (0,
|
|
4748
|
+
onClick: () => F(() => i.toggleLock(v.fieldKey)),
|
|
4749
|
+
children: [/* @__PURE__ */ (0, k.jsx)(x, { name: i.isLocked(v.fieldKey) ? "lock" : "unlock" }), i.isLocked(v.fieldKey) ? "Unlock field" : "Lock field"]
|
|
4595
4750
|
}),
|
|
4596
|
-
/* @__PURE__ */ (0,
|
|
4751
|
+
/* @__PURE__ */ (0, k.jsx)("div", {
|
|
4597
4752
|
className: "astrato-app-filter-bar__actions",
|
|
4598
|
-
children:
|
|
4753
|
+
children: G ? /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [/* @__PURE__ */ (0, k.jsx)(A, {
|
|
4599
4754
|
"data-variant": "ghost",
|
|
4600
4755
|
onClick: _e,
|
|
4601
4756
|
children: "Cancel"
|
|
4602
|
-
}), /* @__PURE__ */ (0,
|
|
4757
|
+
}), /* @__PURE__ */ (0, k.jsxs)(A, {
|
|
4603
4758
|
"data-primary": "true",
|
|
4604
4759
|
disabled: !me,
|
|
4605
4760
|
onClick: ve,
|
|
4606
|
-
children: [/* @__PURE__ */ (0,
|
|
4607
|
-
})] }) : /* @__PURE__ */ (0,
|
|
4761
|
+
children: [/* @__PURE__ */ (0, k.jsx)(x, { name: "check" }), " Apply"]
|
|
4762
|
+
})] }) : /* @__PURE__ */ (0, k.jsx)(A, {
|
|
4608
4763
|
onClick: ge,
|
|
4609
4764
|
children: "Done"
|
|
4610
4765
|
})
|
|
@@ -4612,7 +4767,7 @@ function kn({ isExpanded: e = !1 }) {
|
|
|
4612
4767
|
]
|
|
4613
4768
|
})] })
|
|
4614
4769
|
]
|
|
4615
|
-
}, `${
|
|
4770
|
+
}, `${g.kind}:${v?.fieldKey ?? ""}`)
|
|
4616
4771
|
]
|
|
4617
4772
|
}) : null;
|
|
4618
4773
|
}
|