@astrato-io/visualizations 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -0
- package/THIRD_PARTY_NOTICES.md +94 -4
- package/chunks/ClickAwayListener-BbeNMAvj.js +52 -0
- package/chunks/{LinearProgress-CUZ0D8_t.js → LinearProgress-B1FeWaen.js} +54 -54
- package/chunks/app-filter-bar.compiler-BGJ7HAbr.js +64 -0
- package/chunks/bar.compiler-CT0ZbQKc.js +374 -0
- package/chunks/{src-Cum_2NLV.js → builder-B6dWSIdD.js} +5779 -5635
- package/chunks/{coloring-C16AUZEi.js → coloring-B1XAfg6b.js} +234 -233
- package/chunks/{src-BC7cGcJ-.js → definitions-D3OVqmXl.js} +438 -360
- package/chunks/{escobar-BGqT1EsE.js → escobar-eDjtGpkC.js} +4645 -4619
- package/chunks/filter.compiler-DBsyRBJt.js +70 -0
- package/chunks/{filtering-Yq4DEa0t.js → filtering-tqjAyJH5.js} +432 -313
- package/chunks/{grouping-type-BX_9Ix5q.js → grouping-type-On4s9Thj.js} +1 -1
- package/chunks/handlers-VTBfIZYZ.js +13072 -0
- package/chunks/isEqual-BDxAhUo8.js +7514 -0
- package/chunks/line.compiler-CzdM5Ld0.js +198 -0
- package/chunks/{metadata-CPXdYoln.js → metadata-BGElBy5Z.js} +1 -1
- package/chunks/number.compiler-G-R7y16P.js +53 -0
- package/chunks/{src-C0LgoUWY.js → operations-CTNUX6Sy.js} +9576 -9432
- package/chunks/{range-DrzdfBX4.js → range-CiwTbMig.js} +2 -2
- package/chunks/{registry-CExpGJ1N.js → registry-CsQQzukD.js} +153 -153
- package/chunks/{requirements-DNhuShLS.js → requirements-DYjZCFyf.js} +1 -1
- package/chunks/{shared-CKDL4hx9.js → shared-CBvcC5YV.js} +460 -413
- package/chunks/{standalone-D5vnf-9y.js → standalone-0M4HlmDW2.js} +823 -822
- package/chunks/standalone-0ashe9w1.js +411 -0
- package/chunks/{standalone-C85u7U6I.js → standalone-B7jax8wa.js} +93 -94
- package/chunks/standalone-BK0VYU-l.js +463 -0
- package/chunks/{standalone-BDCwI6Hn.js → standalone-BMIbT1b2.js} +815 -815
- package/chunks/standalone-BZV5vOwA.js +6 -0
- package/chunks/standalone-BhDrWj4p.js +1980 -0
- package/chunks/{standalone-CNyNHKVx.js → standalone-BtSHCp2U2.js} +97 -98
- package/chunks/{standalone-CDQnr6qT.js → standalone-BvaKdky9.js} +95 -96
- package/chunks/standalone-BwtM31-f.js +2 -0
- package/chunks/{standalone-CY57qwZ-.js → standalone-C3gg736V.js} +153 -153
- package/chunks/{standalone-DFPva_ku.js → standalone-CC1VUjO32.js} +60 -60
- package/chunks/{standalone-CCNtaJ7s.js → standalone-C_rYnZ0N.js} +41 -41
- package/chunks/{standalone-CZynjFG7.js → standalone-CoLrAxRV.js} +3701 -3482
- package/chunks/{standalone-jiz0L2Dg.js → standalone-DC-aUgXC.js} +104 -104
- package/chunks/standalone-DCtRoTWg.js +675 -0
- package/chunks/standalone-DUDFTBqL.js +833 -0
- package/chunks/standalone-DhZkX9Td.js +2 -0
- package/chunks/{standalone-Dx3MLlrO.js → standalone-DtLElfuM.js} +141 -141
- package/chunks/{standalone-BmfMt74U.js → standalone-G9Q4Uczu.js} +192 -192
- package/chunks/{standalone-BH5NqDwp.js → standalone-JuLF-OoH.js} +390 -391
- package/chunks/standalone-_DeX21JJ.js +383 -0
- package/chunks/{standalone-lBm9hQ-q.js → standalone-gFhKZh8m.js} +34 -34
- package/chunks/standalone-tDNy-SFH.js +281 -0
- package/chunks/{standalone-rJ45Zfl1.js → standalone-v1oxfU20.js} +10 -10
- package/chunks/{standalone-BYm1UjLr.js → standalone-vzBY6q0I2.js} +18 -18
- package/chunks/table.compiler-tb914oj3.js +222 -0
- package/chunks/{ui-D1HQNIBy.js → ui-DQWtv2iM.js} +13485 -3973
- package/chunks/{useFieldName-oqQ3bvnO.js → useFieldName-BvdcoJRl.js} +1 -1
- package/chunks/{utils-Ba9T0TqC.js → utils-Bg7K-t6K.js} +7306 -6024
- package/chunks/{src-DvX5LU9T.js → view-Bn83C8d9.js} +2555 -4831
- package/definitions.js +3 -3
- package/docs/operations/astrato-app-filter-bar.md +17 -17
- package/docs/operations/bar.md +989 -1071
- package/docs/operations/combo.md +717 -738
- package/docs/operations/date-picker.md +25 -25
- package/docs/operations/distribution-gauge.md +471 -607
- package/docs/operations/dot.md +787 -879
- package/docs/operations/filter.md +139 -163
- package/docs/operations/gauge.md +491 -627
- package/docs/operations/heatMap.md +834 -916
- package/docs/operations/histogram.md +166 -180
- package/docs/operations/iframe.md +5 -5
- package/docs/operations/image.md +16 -16
- package/docs/operations/index.md +12 -12
- package/docs/operations/line.md +811 -888
- package/docs/operations/number.md +470 -536
- package/docs/operations/pie.md +825 -958
- package/docs/operations/radar.md +599 -679
- package/docs/operations/sankey.md +462 -584
- package/docs/operations/scatter.md +823 -929
- package/docs/operations/shape.md +34 -34
- package/docs/operations/simpleTextObject.md +18 -25
- package/docs/operations/slider.md +33 -43
- package/docs/operations/table.md +1160 -1150
- package/docs/operations/tree.md +354 -361
- package/docs/operations/treemap.md +545 -637
- package/docs/operations/waterfall.md +369 -379
- package/docs/operations/word-cloud.md +512 -583
- package/getters.js +3 -3
- package/index.js +51 -51
- package/metadata.js +3 -3
- package/operations.js +7 -7
- package/package.json +80 -86
- package/src/definitions/index.d.ts +2 -2
- package/src/definitions/{shared/lib → model/definitions}/available-fields.d.ts +0 -1
- package/src/definitions/{shared/lib/compilers/index.d.ts → model/definitions/compilers/compile.d.ts} +1 -1
- package/src/definitions/model/definitions/data-item-resolution.d.ts +19 -0
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +1341 -0
- package/src/definitions/model/definitions/descriptors/json-schema.d.ts +2 -0
- package/src/definitions/model/definitions/diagnostics.d.ts +5 -0
- package/src/definitions/model/definitions/field-suggestions.d.ts +2 -0
- package/src/definitions/model/definitions/index.d.ts +23 -0
- package/src/definitions/{shared/lib → model/definitions}/registry/compile.d.ts +1 -1
- package/src/definitions/model/definitions/registry/descriptor-registry.d.ts +3 -0
- package/src/definitions/model/definitions/schema-registry.d.ts +660 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/broad-chart.schema.d.ts +1 -1
- package/src/definitions/{shared/lib → model/definitions}/schemas/common.schema.d.ts +0 -1
- package/src/definitions/model/definitions/schemas/index.d.ts +9 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/object.schema.d.ts +6 -6
- package/src/definitions/{shared/lib → model/definitions}/types/definition.types.d.ts +1 -1
- package/src/definitions/model/definitions/types/index.d.ts +3 -0
- package/src/definitions/{shared/lib/registry → model/definitions}/validation.d.ts +1 -1
- package/chunks/Radio-Ciu-F4CU.js +0 -957
- package/chunks/ToggleButton-BCJc3Jlc.js +0 -153
- package/chunks/_baseFlatten-DPXPOrea.js +0 -7076
- package/chunks/app-filter-bar.compiler-j_CVoWTa.js +0 -55
- package/chunks/bar.compiler-oqaPzIut.js +0 -370
- package/chunks/data-item-resolution-1lvYB5ln.js +0 -53
- package/chunks/event-bus-KiSiCJrC.js +0 -2683
- package/chunks/filter.compiler-CuLtc_02.js +0 -60
- package/chunks/gauge-target-type-BkKXAqkX.js +0 -4
- package/chunks/interfaces-VUY4_yVO.js +0 -8742
- package/chunks/line-settings-DfYTUyPz.js +0 -4
- package/chunks/line.compiler-BpA_6Tc7.js +0 -188
- package/chunks/number.compiler-DbkWcG4S.js +0 -44
- package/chunks/pie-uv42Eqal.js +0 -10
- package/chunks/src-Dun_jXtz.js +0 -10295
- package/chunks/standalone-87YV_m9n.js +0 -687
- package/chunks/standalone-BLVAWLNJ.js +0 -385
- package/chunks/standalone-BPomtAVs.js +0 -2
- package/chunks/standalone-BXyBcUOQ.js +0 -2
- package/chunks/standalone-BllF4rDp.js +0 -383
- package/chunks/standalone-BqWyrnZI.js +0 -281
- package/chunks/standalone-DQxxNwF8.js +0 -675
- package/chunks/standalone-DS9T0FZ-.js +0 -830
- package/chunks/standalone-DzixzZAL.js +0 -411
- package/chunks/standalone-QJ1kKMnO.js +0 -6
- package/chunks/table.compiler-BrXkm4Fz.js +0 -213
- package/chunks/toInteger-DVZr-D1j.js +0 -11
- package/chunks/treemap-x_zmJoG7.js +0 -23
- package/chunks/types-dVVCsDWD.js +0 -4
- package/chunks/view-CLqWMV7Z.js +0 -156
- package/src/definitions/shared/index.d.ts +0 -5
- package/src/definitions/shared/lib/registry/descriptor-registry.d.ts +0 -587
- package/src/definitions/shared/lib/registry/index.d.ts +0 -3
- package/src/definitions/shared/lib/schemas/index.d.ts +0 -9
- package/src/definitions/shared/lib/types/index.d.ts +0 -3
- package/src/definitions/{shared/lib → model/definitions}/schemas/app-filter-bar.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/bar.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/filter.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/line.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/number.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/table.schema.d.ts +4 -4
- /package/src/definitions/{shared/lib → model/definitions}/types/compilation.types.d.ts +0 -0
- /package/src/definitions/{shared/lib → model/definitions}/types/descriptor.types.d.ts +0 -0
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import { Ai as l,
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
var
|
|
2
|
+
import { Ks as n, To as r, ac as i, ka as a, oc as o, tc as s } from "./isEqual-BDxAhUo8.js";
|
|
3
|
+
import { $ as c, Ai as l, Cn as u, Di as d, Ei as f, Fn as p, Gi as m, In as h, Mi as g, Ni as _, Oi as v, Pn as y, Yi as b, Zi as x, _ as S, d as C, er as w, ji as T, ki as E } from "./utils-Bg7K-t6K.js";
|
|
4
|
+
import { _ as D, d as O, f as ee, g as te, h as ne, m as re, nt as k, p as A, v as j } from "./ui-DQWtv2iM.js";
|
|
5
|
+
import { t as M } from "./typeof-CJDtcySz.js";
|
|
6
|
+
var N = /* @__PURE__ */ t(((e, t) => {
|
|
7
7
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
8
8
|
function n(e, t) {
|
|
9
9
|
if (t.length < e) throw TypeError(e + " argument" + (e > 1 ? "s" : "") + " required, but only " + t.length + " present");
|
|
10
10
|
}
|
|
11
11
|
t.exports = e.default;
|
|
12
|
-
})),
|
|
13
|
-
var n =
|
|
12
|
+
})), P = /* @__PURE__ */ t(((e, t) => {
|
|
13
|
+
var n = c().default;
|
|
14
14
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
15
|
-
var r = n(
|
|
15
|
+
var r = n(M()), i = n(N());
|
|
16
16
|
function a(e) {
|
|
17
17
|
return (0, i.default)(1, arguments), e instanceof Date || (0, r.default)(e) === "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
18
18
|
}
|
|
19
19
|
t.exports = e.default;
|
|
20
|
-
})),
|
|
21
|
-
var n =
|
|
20
|
+
})), F = /* @__PURE__ */ t(((e, t) => {
|
|
21
|
+
var n = c().default;
|
|
22
22
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
23
|
-
var r = n(
|
|
23
|
+
var r = n(M()), i = n(N());
|
|
24
24
|
function a(e) {
|
|
25
25
|
(0, i.default)(1, arguments);
|
|
26
26
|
var t = Object.prototype.toString.call(e);
|
|
27
27
|
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
28
|
}
|
|
29
29
|
t.exports = e.default;
|
|
30
|
-
})),
|
|
31
|
-
var n =
|
|
30
|
+
})), I = /* @__PURE__ */ t(((e, t) => {
|
|
31
|
+
var n = c().default;
|
|
32
32
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
33
|
-
var r = n(
|
|
33
|
+
var r = n(P()), i = n(F()), a = n(N());
|
|
34
34
|
function o(e) {
|
|
35
35
|
if ((0, a.default)(1, arguments), !(0, r.default)(e) && typeof e != "number") return !1;
|
|
36
36
|
var t = (0, i.default)(e);
|
|
37
37
|
return !isNaN(Number(t));
|
|
38
38
|
}
|
|
39
39
|
t.exports = e.default;
|
|
40
|
-
})),
|
|
41
|
-
var n =
|
|
40
|
+
})), ie = /* @__PURE__ */ t(((e, t) => {
|
|
41
|
+
var n = c().default;
|
|
42
42
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
43
|
-
var r = n(
|
|
43
|
+
var r = n(T()), i = n(F()), a = n(N());
|
|
44
44
|
function o(e, t) {
|
|
45
45
|
(0, a.default)(2, arguments);
|
|
46
46
|
var n = (0, i.default)(e).getTime(), o = (0, r.default)(t);
|
|
47
47
|
return new Date(n + o);
|
|
48
48
|
}
|
|
49
49
|
t.exports = e.default;
|
|
50
|
-
})),
|
|
51
|
-
var n =
|
|
50
|
+
})), ae = /* @__PURE__ */ t(((e, t) => {
|
|
51
|
+
var n = c().default;
|
|
52
52
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
53
|
-
var r = n(
|
|
53
|
+
var r = n(ie()), i = n(N()), a = n(T());
|
|
54
54
|
function o(e, t) {
|
|
55
55
|
(0, i.default)(2, arguments);
|
|
56
56
|
var n = (0, a.default)(t);
|
|
57
57
|
return (0, r.default)(e, -n);
|
|
58
58
|
}
|
|
59
59
|
t.exports = e.default;
|
|
60
|
-
})),
|
|
61
|
-
var n =
|
|
60
|
+
})), L = /* @__PURE__ */ t(((e, t) => {
|
|
61
|
+
var n = c().default;
|
|
62
62
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
63
|
-
var r = n(
|
|
63
|
+
var r = n(F()), i = n(N()), a = 864e5;
|
|
64
64
|
function o(e) {
|
|
65
65
|
(0, i.default)(1, arguments);
|
|
66
66
|
var t = (0, r.default)(e), n = t.getTime();
|
|
@@ -69,20 +69,20 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
69
69
|
return Math.floor(o / a) + 1;
|
|
70
70
|
}
|
|
71
71
|
t.exports = e.default;
|
|
72
|
-
})),
|
|
73
|
-
var n =
|
|
72
|
+
})), R = /* @__PURE__ */ t(((e, t) => {
|
|
73
|
+
var n = c().default;
|
|
74
74
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
75
|
-
var r = n(
|
|
75
|
+
var r = n(F()), i = n(N());
|
|
76
76
|
function a(e) {
|
|
77
77
|
(0, i.default)(1, arguments);
|
|
78
78
|
var t = 1, n = (0, r.default)(e), a = n.getUTCDay(), o = (a < t ? 7 : 0) + a - t;
|
|
79
79
|
return n.setUTCDate(n.getUTCDate() - o), n.setUTCHours(0, 0, 0, 0), n;
|
|
80
80
|
}
|
|
81
81
|
t.exports = e.default;
|
|
82
|
-
})),
|
|
83
|
-
var n =
|
|
82
|
+
})), oe = /* @__PURE__ */ t(((e, t) => {
|
|
83
|
+
var n = c().default;
|
|
84
84
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
85
|
-
var r = n(
|
|
85
|
+
var r = n(F()), i = n(N()), a = n(R());
|
|
86
86
|
function o(e) {
|
|
87
87
|
(0, i.default)(1, arguments);
|
|
88
88
|
var t = (0, r.default)(e), n = t.getUTCFullYear(), o = /* @__PURE__ */ new Date(0);
|
|
@@ -93,27 +93,27 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
93
93
|
return t.getTime() >= s.getTime() ? n + 1 : t.getTime() >= l.getTime() ? n : n - 1;
|
|
94
94
|
}
|
|
95
95
|
t.exports = e.default;
|
|
96
|
-
})),
|
|
97
|
-
var n =
|
|
96
|
+
})), z = /* @__PURE__ */ t(((e, t) => {
|
|
97
|
+
var n = c().default;
|
|
98
98
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
99
|
-
var r = n(
|
|
99
|
+
var r = n(oe()), i = n(R()), a = n(N());
|
|
100
100
|
function o(e) {
|
|
101
101
|
(0, a.default)(1, arguments);
|
|
102
102
|
var t = (0, r.default)(e), n = /* @__PURE__ */ new Date(0);
|
|
103
103
|
return n.setUTCFullYear(t, 0, 4), n.setUTCHours(0, 0, 0, 0), (0, i.default)(n);
|
|
104
104
|
}
|
|
105
105
|
t.exports = e.default;
|
|
106
|
-
})),
|
|
107
|
-
var n =
|
|
108
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default =
|
|
109
|
-
var r = n(
|
|
110
|
-
function
|
|
106
|
+
})), B = /* @__PURE__ */ t(((e, t) => {
|
|
107
|
+
var n = c().default;
|
|
108
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = l;
|
|
109
|
+
var r = n(F()), i = n(R()), a = n(z()), o = n(N()), s = 6048e5;
|
|
110
|
+
function l(e) {
|
|
111
111
|
(0, o.default)(1, arguments);
|
|
112
112
|
var t = (0, r.default)(e), n = (0, i.default)(t).getTime() - (0, a.default)(t).getTime();
|
|
113
113
|
return Math.round(n / s) + 1;
|
|
114
114
|
}
|
|
115
115
|
t.exports = e.default;
|
|
116
|
-
})),
|
|
116
|
+
})), V = /* @__PURE__ */ t(((e) => {
|
|
117
117
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getDefaultOptions = n, e.setDefaultOptions = r;
|
|
118
118
|
var t = {};
|
|
119
119
|
function n() {
|
|
@@ -122,10 +122,10 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
122
122
|
function r(e) {
|
|
123
123
|
t = e;
|
|
124
124
|
}
|
|
125
|
-
})),
|
|
126
|
-
var n =
|
|
125
|
+
})), H = /* @__PURE__ */ t(((e, t) => {
|
|
126
|
+
var n = c().default;
|
|
127
127
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = s;
|
|
128
|
-
var r = n(
|
|
128
|
+
var r = n(F()), i = n(N()), a = n(T()), o = V();
|
|
129
129
|
function s(e, t) {
|
|
130
130
|
var n;
|
|
131
131
|
(0, i.default)(1, arguments);
|
|
@@ -135,11 +135,11 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
135
135
|
return l.setUTCDate(l.getUTCDate() - d), l.setUTCHours(0, 0, 0, 0), l;
|
|
136
136
|
}
|
|
137
137
|
t.exports = e.default;
|
|
138
|
-
})),
|
|
139
|
-
var n =
|
|
140
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default =
|
|
141
|
-
var r = n(
|
|
142
|
-
function
|
|
138
|
+
})), se = /* @__PURE__ */ t(((e, t) => {
|
|
139
|
+
var n = c().default;
|
|
140
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = l;
|
|
141
|
+
var r = n(F()), i = n(N()), a = n(H()), o = n(T()), s = V();
|
|
142
|
+
function l(e, t) {
|
|
143
143
|
var n;
|
|
144
144
|
(0, i.default)(1, arguments);
|
|
145
145
|
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,38 +152,38 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
152
152
|
return c.getTime() >= p.getTime() ? l + 1 : c.getTime() >= h.getTime() ? l : l - 1;
|
|
153
153
|
}
|
|
154
154
|
t.exports = e.default;
|
|
155
|
-
})),
|
|
156
|
-
var n =
|
|
157
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default =
|
|
158
|
-
var r = n(
|
|
159
|
-
function
|
|
155
|
+
})), ce = /* @__PURE__ */ t(((e, t) => {
|
|
156
|
+
var n = c().default;
|
|
157
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = l;
|
|
158
|
+
var r = n(se()), i = n(N()), a = n(H()), o = n(T()), s = V();
|
|
159
|
+
function l(e, t) {
|
|
160
160
|
var n;
|
|
161
161
|
(0, i.default)(1, arguments);
|
|
162
162
|
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
163
|
return d.setUTCFullYear(u, 0, l), d.setUTCHours(0, 0, 0, 0), (0, a.default)(d, t);
|
|
164
164
|
}
|
|
165
165
|
t.exports = e.default;
|
|
166
|
-
})),
|
|
167
|
-
var n =
|
|
168
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default =
|
|
169
|
-
var r = n(
|
|
170
|
-
function
|
|
166
|
+
})), le = /* @__PURE__ */ t(((e, t) => {
|
|
167
|
+
var n = c().default;
|
|
168
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = l;
|
|
169
|
+
var r = n(F()), i = n(H()), a = n(ce()), o = n(N()), s = 6048e5;
|
|
170
|
+
function l(e, t) {
|
|
171
171
|
(0, o.default)(1, arguments);
|
|
172
172
|
var n = (0, r.default)(e), c = (0, i.default)(n, t).getTime() - (0, a.default)(n, t).getTime();
|
|
173
173
|
return Math.round(c / s) + 1;
|
|
174
174
|
}
|
|
175
175
|
t.exports = e.default;
|
|
176
|
-
})),
|
|
176
|
+
})), ue = /* @__PURE__ */ t(((e, t) => {
|
|
177
177
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
178
178
|
function n(e, t) {
|
|
179
179
|
for (var n = e < 0 ? "-" : "", r = Math.abs(e).toString(); r.length < t;) r = "0" + r;
|
|
180
180
|
return n + r;
|
|
181
181
|
}
|
|
182
182
|
t.exports = e.default;
|
|
183
|
-
})),
|
|
184
|
-
var n =
|
|
183
|
+
})), de = /* @__PURE__ */ t(((e, t) => {
|
|
184
|
+
var n = c().default;
|
|
185
185
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
186
|
-
var r = n(
|
|
186
|
+
var r = n(ue());
|
|
187
187
|
e.default = {
|
|
188
188
|
y: function(e, t) {
|
|
189
189
|
var n = e.getUTCFullYear(), i = n > 0 ? n : 1 - n;
|
|
@@ -223,10 +223,10 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
223
223
|
return (0, r.default)(a, t.length);
|
|
224
224
|
}
|
|
225
225
|
}, t.exports = e.default;
|
|
226
|
-
})),
|
|
227
|
-
var n =
|
|
226
|
+
})), fe = /* @__PURE__ */ t(((e, t) => {
|
|
227
|
+
var n = c().default;
|
|
228
228
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
229
|
-
var r = n(
|
|
229
|
+
var r = n(L()), i = n(B()), a = n(oe()), o = n(le()), s = n(se()), l = n(ue()), u = n(de()), d = {
|
|
230
230
|
am: "am",
|
|
231
231
|
pm: "pm",
|
|
232
232
|
midnight: "midnight",
|
|
@@ -235,7 +235,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
235
235
|
afternoon: "afternoon",
|
|
236
236
|
evening: "evening",
|
|
237
237
|
night: "night"
|
|
238
|
-
},
|
|
238
|
+
}, f = {
|
|
239
239
|
G: function(e, t, n) {
|
|
240
240
|
var r = +(e.getUTCFullYear() > 0);
|
|
241
241
|
switch (t) {
|
|
@@ -251,29 +251,29 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
251
251
|
var r = e.getUTCFullYear(), i = r > 0 ? r : 1 - r;
|
|
252
252
|
return n.ordinalNumber(i, { unit: "year" });
|
|
253
253
|
}
|
|
254
|
-
return
|
|
254
|
+
return u.default.y(e, t);
|
|
255
255
|
},
|
|
256
256
|
Y: function(e, t, n, r) {
|
|
257
257
|
var i = (0, s.default)(e, r), a = i > 0 ? i : 1 - i;
|
|
258
258
|
if (t === "YY") {
|
|
259
259
|
var o = a % 100;
|
|
260
|
-
return (0,
|
|
260
|
+
return (0, l.default)(o, 2);
|
|
261
261
|
}
|
|
262
|
-
return t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : (0,
|
|
262
|
+
return t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : (0, l.default)(a, t.length);
|
|
263
263
|
},
|
|
264
264
|
R: function(e, t) {
|
|
265
265
|
var n = (0, a.default)(e);
|
|
266
|
-
return (0,
|
|
266
|
+
return (0, l.default)(n, t.length);
|
|
267
267
|
},
|
|
268
268
|
u: function(e, t) {
|
|
269
269
|
var n = e.getUTCFullYear();
|
|
270
|
-
return (0,
|
|
270
|
+
return (0, l.default)(n, t.length);
|
|
271
271
|
},
|
|
272
272
|
Q: function(e, t, n) {
|
|
273
273
|
var r = Math.ceil((e.getUTCMonth() + 1) / 3);
|
|
274
274
|
switch (t) {
|
|
275
275
|
case "Q": return String(r);
|
|
276
|
-
case "QQ": return (0,
|
|
276
|
+
case "QQ": return (0, l.default)(r, 2);
|
|
277
277
|
case "Qo": return n.ordinalNumber(r, { unit: "quarter" });
|
|
278
278
|
case "QQQ": return n.quarter(r, {
|
|
279
279
|
width: "abbreviated",
|
|
@@ -293,7 +293,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
293
293
|
var r = Math.ceil((e.getUTCMonth() + 1) / 3);
|
|
294
294
|
switch (t) {
|
|
295
295
|
case "q": return String(r);
|
|
296
|
-
case "qq": return (0,
|
|
296
|
+
case "qq": return (0, l.default)(r, 2);
|
|
297
297
|
case "qo": return n.ordinalNumber(r, { unit: "quarter" });
|
|
298
298
|
case "qqq": return n.quarter(r, {
|
|
299
299
|
width: "abbreviated",
|
|
@@ -313,7 +313,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
313
313
|
var r = e.getUTCMonth();
|
|
314
314
|
switch (t) {
|
|
315
315
|
case "M":
|
|
316
|
-
case "MM": return
|
|
316
|
+
case "MM": return u.default.M(e, t);
|
|
317
317
|
case "Mo": return n.ordinalNumber(r + 1, { unit: "month" });
|
|
318
318
|
case "MMM": return n.month(r, {
|
|
319
319
|
width: "abbreviated",
|
|
@@ -333,7 +333,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
333
333
|
var r = e.getUTCMonth();
|
|
334
334
|
switch (t) {
|
|
335
335
|
case "L": return String(r + 1);
|
|
336
|
-
case "LL": return (0,
|
|
336
|
+
case "LL": return (0, l.default)(r + 1, 2);
|
|
337
337
|
case "Lo": return n.ordinalNumber(r + 1, { unit: "month" });
|
|
338
338
|
case "LLL": return n.month(r, {
|
|
339
339
|
width: "abbreviated",
|
|
@@ -351,18 +351,18 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
351
351
|
},
|
|
352
352
|
w: function(e, t, n, r) {
|
|
353
353
|
var i = (0, o.default)(e, r);
|
|
354
|
-
return t === "wo" ? n.ordinalNumber(i, { unit: "week" }) : (0,
|
|
354
|
+
return t === "wo" ? n.ordinalNumber(i, { unit: "week" }) : (0, l.default)(i, t.length);
|
|
355
355
|
},
|
|
356
356
|
I: function(e, t, n) {
|
|
357
357
|
var r = (0, i.default)(e);
|
|
358
|
-
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : (0,
|
|
358
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : (0, l.default)(r, t.length);
|
|
359
359
|
},
|
|
360
360
|
d: function(e, t, n) {
|
|
361
|
-
return t === "do" ? n.ordinalNumber(e.getUTCDate(), { unit: "date" }) :
|
|
361
|
+
return t === "do" ? n.ordinalNumber(e.getUTCDate(), { unit: "date" }) : u.default.d(e, t);
|
|
362
362
|
},
|
|
363
363
|
D: function(e, t, n) {
|
|
364
364
|
var i = (0, r.default)(e);
|
|
365
|
-
return t === "Do" ? n.ordinalNumber(i, { unit: "dayOfYear" }) : (0,
|
|
365
|
+
return t === "Do" ? n.ordinalNumber(i, { unit: "dayOfYear" }) : (0, l.default)(i, t.length);
|
|
366
366
|
},
|
|
367
367
|
E: function(e, t, n) {
|
|
368
368
|
var r = e.getUTCDay();
|
|
@@ -391,7 +391,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
391
391
|
var i = e.getUTCDay(), a = (i - r.weekStartsOn + 8) % 7 || 7;
|
|
392
392
|
switch (t) {
|
|
393
393
|
case "e": return String(a);
|
|
394
|
-
case "ee": return (0,
|
|
394
|
+
case "ee": return (0, l.default)(a, 2);
|
|
395
395
|
case "eo": return n.ordinalNumber(a, { unit: "day" });
|
|
396
396
|
case "eee": return n.day(i, {
|
|
397
397
|
width: "abbreviated",
|
|
@@ -415,7 +415,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
415
415
|
var i = e.getUTCDay(), a = (i - r.weekStartsOn + 8) % 7 || 7;
|
|
416
416
|
switch (t) {
|
|
417
417
|
case "c": return String(a);
|
|
418
|
-
case "cc": return (0,
|
|
418
|
+
case "cc": return (0, l.default)(a, t.length);
|
|
419
419
|
case "co": return n.ordinalNumber(a, { unit: "day" });
|
|
420
420
|
case "ccc": return n.day(i, {
|
|
421
421
|
width: "abbreviated",
|
|
@@ -439,7 +439,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
439
439
|
var r = e.getUTCDay(), i = r === 0 ? 7 : r;
|
|
440
440
|
switch (t) {
|
|
441
441
|
case "i": return String(i);
|
|
442
|
-
case "ii": return (0,
|
|
442
|
+
case "ii": return (0, l.default)(i, t.length);
|
|
443
443
|
case "io": return n.ordinalNumber(i, { unit: "day" });
|
|
444
444
|
case "iii": return n.day(r, {
|
|
445
445
|
width: "abbreviated",
|
|
@@ -482,7 +482,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
482
482
|
}
|
|
483
483
|
},
|
|
484
484
|
b: function(e, t, n) {
|
|
485
|
-
var r = e.getUTCHours(), i = r === 12 ?
|
|
485
|
+
var r = e.getUTCHours(), i = r === 12 ? d.noon : r === 0 ? d.midnight : r / 12 >= 1 ? "pm" : "am";
|
|
486
486
|
switch (t) {
|
|
487
487
|
case "b":
|
|
488
488
|
case "bb": return n.dayPeriod(i, {
|
|
@@ -504,7 +504,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
504
504
|
}
|
|
505
505
|
},
|
|
506
506
|
B: function(e, t, n) {
|
|
507
|
-
var r = e.getUTCHours(), i = r >= 17 ?
|
|
507
|
+
var r = e.getUTCHours(), i = r >= 17 ? d.evening : r >= 12 ? d.afternoon : r >= 4 ? d.morning : d.night;
|
|
508
508
|
switch (t) {
|
|
509
509
|
case "B":
|
|
510
510
|
case "BB":
|
|
@@ -527,45 +527,45 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
527
527
|
var r = e.getUTCHours() % 12;
|
|
528
528
|
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
529
529
|
}
|
|
530
|
-
return
|
|
530
|
+
return u.default.h(e, t);
|
|
531
531
|
},
|
|
532
532
|
H: function(e, t, n) {
|
|
533
|
-
return t === "Ho" ? n.ordinalNumber(e.getUTCHours(), { unit: "hour" }) :
|
|
533
|
+
return t === "Ho" ? n.ordinalNumber(e.getUTCHours(), { unit: "hour" }) : u.default.H(e, t);
|
|
534
534
|
},
|
|
535
535
|
K: function(e, t, n) {
|
|
536
536
|
var r = e.getUTCHours() % 12;
|
|
537
|
-
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : (0,
|
|
537
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : (0, l.default)(r, t.length);
|
|
538
538
|
},
|
|
539
539
|
k: function(e, t, n) {
|
|
540
540
|
var r = e.getUTCHours();
|
|
541
|
-
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : (0,
|
|
541
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : (0, l.default)(r, t.length);
|
|
542
542
|
},
|
|
543
543
|
m: function(e, t, n) {
|
|
544
|
-
return t === "mo" ? n.ordinalNumber(e.getUTCMinutes(), { unit: "minute" }) :
|
|
544
|
+
return t === "mo" ? n.ordinalNumber(e.getUTCMinutes(), { unit: "minute" }) : u.default.m(e, t);
|
|
545
545
|
},
|
|
546
546
|
s: function(e, t, n) {
|
|
547
|
-
return t === "so" ? n.ordinalNumber(e.getUTCSeconds(), { unit: "second" }) :
|
|
547
|
+
return t === "so" ? n.ordinalNumber(e.getUTCSeconds(), { unit: "second" }) : u.default.s(e, t);
|
|
548
548
|
},
|
|
549
549
|
S: function(e, t) {
|
|
550
|
-
return
|
|
550
|
+
return u.default.S(e, t);
|
|
551
551
|
},
|
|
552
552
|
X: function(e, t, n, r) {
|
|
553
553
|
var i = (r._originalDate || e).getTimezoneOffset();
|
|
554
554
|
if (i === 0) return "Z";
|
|
555
555
|
switch (t) {
|
|
556
|
-
case "X": return
|
|
556
|
+
case "X": return m(i);
|
|
557
557
|
case "XXXX":
|
|
558
|
-
case "XX": return
|
|
559
|
-
default: return
|
|
558
|
+
case "XX": return h(i);
|
|
559
|
+
default: return h(i, ":");
|
|
560
560
|
}
|
|
561
561
|
},
|
|
562
562
|
x: function(e, t, n, r) {
|
|
563
563
|
var i = (r._originalDate || e).getTimezoneOffset();
|
|
564
564
|
switch (t) {
|
|
565
|
-
case "x": return
|
|
565
|
+
case "x": return m(i);
|
|
566
566
|
case "xxxx":
|
|
567
|
-
case "xx": return
|
|
568
|
-
default: return
|
|
567
|
+
case "xx": return h(i);
|
|
568
|
+
default: return h(i, ":");
|
|
569
569
|
}
|
|
570
570
|
},
|
|
571
571
|
O: function(e, t, n, r) {
|
|
@@ -573,8 +573,8 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
573
573
|
switch (t) {
|
|
574
574
|
case "O":
|
|
575
575
|
case "OO":
|
|
576
|
-
case "OOO": return "GMT" +
|
|
577
|
-
default: return "GMT" +
|
|
576
|
+
case "OOO": return "GMT" + p(i, ":");
|
|
577
|
+
default: return "GMT" + h(i, ":");
|
|
578
578
|
}
|
|
579
579
|
},
|
|
580
580
|
z: function(e, t, n, r) {
|
|
@@ -582,34 +582,34 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
582
582
|
switch (t) {
|
|
583
583
|
case "z":
|
|
584
584
|
case "zz":
|
|
585
|
-
case "zzz": return "GMT" +
|
|
586
|
-
default: return "GMT" +
|
|
585
|
+
case "zzz": return "GMT" + p(i, ":");
|
|
586
|
+
default: return "GMT" + h(i, ":");
|
|
587
587
|
}
|
|
588
588
|
},
|
|
589
589
|
t: function(e, t, n, r) {
|
|
590
590
|
var i = r._originalDate || e, a = Math.floor(i.getTime() / 1e3);
|
|
591
|
-
return (0,
|
|
591
|
+
return (0, l.default)(a, t.length);
|
|
592
592
|
},
|
|
593
593
|
T: function(e, t, n, r) {
|
|
594
594
|
var i = (r._originalDate || e).getTime();
|
|
595
|
-
return (0,
|
|
595
|
+
return (0, l.default)(i, t.length);
|
|
596
596
|
}
|
|
597
597
|
};
|
|
598
|
-
function
|
|
598
|
+
function p(e, t) {
|
|
599
599
|
var n = e > 0 ? "-" : "+", r = Math.abs(e), i = Math.floor(r / 60), a = r % 60;
|
|
600
600
|
if (a === 0) return n + String(i);
|
|
601
601
|
var o = t || "";
|
|
602
|
-
return n + String(i) + o + (0,
|
|
603
|
-
}
|
|
604
|
-
function p(e, t) {
|
|
605
|
-
return e % 60 == 0 ? (e > 0 ? "-" : "+") + (0, c.default)(Math.abs(e) / 60, 2) : m(e, t);
|
|
602
|
+
return n + String(i) + o + (0, l.default)(a, 2);
|
|
606
603
|
}
|
|
607
604
|
function m(e, t) {
|
|
608
|
-
|
|
605
|
+
return e % 60 == 0 ? (e > 0 ? "-" : "+") + (0, l.default)(Math.abs(e) / 60, 2) : h(e, t);
|
|
606
|
+
}
|
|
607
|
+
function h(e, t) {
|
|
608
|
+
var n = t || "", r = e > 0 ? "-" : "+", i = Math.abs(e), a = (0, l.default)(Math.floor(i / 60), 2), o = (0, l.default)(i % 60, 2);
|
|
609
609
|
return r + a + n + o;
|
|
610
610
|
}
|
|
611
|
-
e.default =
|
|
612
|
-
})),
|
|
611
|
+
e.default = f, t.exports = e.default;
|
|
612
|
+
})), pe = /* @__PURE__ */ t(((e, t) => {
|
|
613
613
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
614
614
|
var n = function(e, t) {
|
|
615
615
|
switch (e) {
|
|
@@ -649,7 +649,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
649
649
|
return s.replace("{{date}}", n(a, t)).replace("{{time}}", r(o, t));
|
|
650
650
|
}
|
|
651
651
|
}, t.exports = e.default;
|
|
652
|
-
})),
|
|
652
|
+
})), U = /* @__PURE__ */ t(((e) => {
|
|
653
653
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.isProtectedDayOfYearToken = r, e.isProtectedWeekYearToken = i, e.throwProtectedError = a;
|
|
654
654
|
var t = ["D", "DD"], n = ["YY", "YYYY"];
|
|
655
655
|
function r(e) {
|
|
@@ -664,7 +664,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
664
664
|
if (e === "D") throw RangeError(`Use \`d\` instead of \`D\` (in \`${t}\`) for formatting days of the month to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);
|
|
665
665
|
if (e === "DD") throw RangeError(`Use \`dd\` instead of \`DD\` (in \`${t}\`) for formatting days of the month to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);
|
|
666
666
|
}
|
|
667
|
-
})),
|
|
667
|
+
})), me = /* @__PURE__ */ t(((e, t) => {
|
|
668
668
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
669
669
|
var n = {
|
|
670
670
|
lessThanXSeconds: {
|
|
@@ -733,7 +733,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
733
733
|
var i, a = n[e];
|
|
734
734
|
return i = typeof a == "string" ? a : t === 1 ? a.one : a.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + i : i + " ago" : i;
|
|
735
735
|
}, t.exports = e.default;
|
|
736
|
-
})),
|
|
736
|
+
})), he = /* @__PURE__ */ t(((e, t) => {
|
|
737
737
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
738
738
|
function n(e) {
|
|
739
739
|
return function() {
|
|
@@ -742,10 +742,10 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
742
742
|
};
|
|
743
743
|
}
|
|
744
744
|
t.exports = e.default;
|
|
745
|
-
})),
|
|
746
|
-
var n =
|
|
745
|
+
})), ge = /* @__PURE__ */ t(((e, t) => {
|
|
746
|
+
var n = c().default;
|
|
747
747
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
748
|
-
var r = n(
|
|
748
|
+
var r = n(he());
|
|
749
749
|
e.default = {
|
|
750
750
|
date: (0, r.default)({
|
|
751
751
|
formats: {
|
|
@@ -775,7 +775,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
775
775
|
defaultWidth: "full"
|
|
776
776
|
})
|
|
777
777
|
}, t.exports = e.default;
|
|
778
|
-
})),
|
|
778
|
+
})), _e = /* @__PURE__ */ t(((e, t) => {
|
|
779
779
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
780
780
|
var n = {
|
|
781
781
|
lastWeek: "'last' eeee 'at' p",
|
|
@@ -788,7 +788,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
788
788
|
e.default = function(e, t, r, i) {
|
|
789
789
|
return n[e];
|
|
790
790
|
}, t.exports = e.default;
|
|
791
|
-
})),
|
|
791
|
+
})), ve = /* @__PURE__ */ t(((e, t) => {
|
|
792
792
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
793
793
|
function n(e) {
|
|
794
794
|
return function(t, n) {
|
|
@@ -805,10 +805,10 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
805
805
|
};
|
|
806
806
|
}
|
|
807
807
|
t.exports = e.default;
|
|
808
|
-
})),
|
|
809
|
-
var n =
|
|
808
|
+
})), ye = /* @__PURE__ */ t(((e, t) => {
|
|
809
|
+
var n = c().default;
|
|
810
810
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
811
|
-
var r = n(
|
|
811
|
+
var r = n(ve());
|
|
812
812
|
e.default = {
|
|
813
813
|
ordinalNumber: function(e, t) {
|
|
814
814
|
var n = Number(e), r = n % 100;
|
|
@@ -1010,7 +1010,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
1010
1010
|
defaultFormattingWidth: "wide"
|
|
1011
1011
|
})
|
|
1012
1012
|
}, t.exports = e.default;
|
|
1013
|
-
})),
|
|
1013
|
+
})), be = /* @__PURE__ */ t(((e, t) => {
|
|
1014
1014
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
1015
1015
|
function n(e) {
|
|
1016
1016
|
return function(t) {
|
|
@@ -1036,7 +1036,7 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
1036
1036
|
for (var n = 0; n < e.length; n++) if (t(e[n])) return n;
|
|
1037
1037
|
}
|
|
1038
1038
|
t.exports = e.default;
|
|
1039
|
-
})),
|
|
1039
|
+
})), xe = /* @__PURE__ */ t(((e, t) => {
|
|
1040
1040
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
1041
1041
|
function n(e) {
|
|
1042
1042
|
return function(t) {
|
|
@@ -1054,12 +1054,12 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
1054
1054
|
};
|
|
1055
1055
|
}
|
|
1056
1056
|
t.exports = e.default;
|
|
1057
|
-
})),
|
|
1058
|
-
var n =
|
|
1057
|
+
})), Se = /* @__PURE__ */ t(((e, t) => {
|
|
1058
|
+
var n = c().default;
|
|
1059
1059
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
1060
|
-
var r = n(
|
|
1060
|
+
var r = n(be());
|
|
1061
1061
|
e.default = {
|
|
1062
|
-
ordinalNumber: (0, n(
|
|
1062
|
+
ordinalNumber: (0, n(xe()).default)({
|
|
1063
1063
|
matchPattern: /^(\d+)(th|st|nd|rd)?/i,
|
|
1064
1064
|
parsePattern: /\d+/i,
|
|
1065
1065
|
valueCallback: function(e) {
|
|
@@ -1182,10 +1182,10 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
1182
1182
|
defaultParseWidth: "any"
|
|
1183
1183
|
})
|
|
1184
1184
|
}, t.exports = e.default;
|
|
1185
|
-
})),
|
|
1186
|
-
var n =
|
|
1185
|
+
})), Ce = /* @__PURE__ */ t(((e, t) => {
|
|
1186
|
+
var n = c().default;
|
|
1187
1187
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
1188
|
-
var r = n(
|
|
1188
|
+
var r = n(me()), i = n(ge()), a = n(_e()), o = n(ye()), s = n(Se());
|
|
1189
1189
|
e.default = {
|
|
1190
1190
|
code: "en-US",
|
|
1191
1191
|
formatDistance: r.default,
|
|
@@ -1198,145 +1198,145 @@ var A = /* @__PURE__ */ t(((e, t) => {
|
|
|
1198
1198
|
firstWeekContainsDate: 1
|
|
1199
1199
|
}
|
|
1200
1200
|
}, t.exports = e.default;
|
|
1201
|
+
})), we = /* @__PURE__ */ t(((e, t) => {
|
|
1202
|
+
var n = c().default;
|
|
1203
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = n(Ce()).default, t.exports = e.default;
|
|
1201
1204
|
})), Te = /* @__PURE__ */ t(((e, t) => {
|
|
1202
|
-
var n =
|
|
1203
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = n(we()).default, t.exports = e.default;
|
|
1204
|
-
})), Ee = /* @__PURE__ */ t(((e, t) => {
|
|
1205
|
-
var n = b().default;
|
|
1205
|
+
var n = c().default;
|
|
1206
1206
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = x;
|
|
1207
|
-
var r = n(
|
|
1207
|
+
var r = n(I()), i = n(ae()), a = n(F()), o = n(fe()), s = n(pe()), u = n(l()), d = U(), f = n(T()), p = n(N()), m = V(), h = n(we()), g = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, _ = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, v = /^'([^]*?)'?$/, y = /''/g, b = /[a-zA-Z]/;
|
|
1208
1208
|
function x(e, t, n) {
|
|
1209
|
-
var
|
|
1210
|
-
(0,
|
|
1211
|
-
var v = String(t),
|
|
1212
|
-
if (!(
|
|
1213
|
-
var
|
|
1214
|
-
if (!(
|
|
1209
|
+
var c, l;
|
|
1210
|
+
(0, p.default)(2, arguments);
|
|
1211
|
+
var v = String(t), y = (0, m.getDefaultOptions)(), x = n?.locale ?? y.locale ?? h.default, C = (0, f.default)(n?.firstWeekContainsDate ?? (n == null || (c = n.locale) == null ? void 0 : c.options?.firstWeekContainsDate) ?? y.firstWeekContainsDate ?? y.locale?.options?.firstWeekContainsDate ?? 1);
|
|
1212
|
+
if (!(C >= 1 && C <= 7)) throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
1213
|
+
var w = (0, f.default)(n?.weekStartsOn ?? (n == null || (l = n.locale) == null ? void 0 : l.options?.weekStartsOn) ?? y.weekStartsOn ?? y.locale?.options?.weekStartsOn ?? 0);
|
|
1214
|
+
if (!(w >= 0 && w <= 6)) throw RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
1215
1215
|
if (!x.localize) throw RangeError("locale must contain localize property");
|
|
1216
1216
|
if (!x.formatLong) throw RangeError("locale must contain formatLong property");
|
|
1217
|
-
var
|
|
1218
|
-
if (!(0, r.default)(
|
|
1219
|
-
var
|
|
1220
|
-
firstWeekContainsDate:
|
|
1221
|
-
weekStartsOn:
|
|
1217
|
+
var T = (0, a.default)(e);
|
|
1218
|
+
if (!(0, r.default)(T)) throw RangeError("Invalid time value");
|
|
1219
|
+
var E = (0, u.default)(T), D = (0, i.default)(T, E), O = {
|
|
1220
|
+
firstWeekContainsDate: C,
|
|
1221
|
+
weekStartsOn: w,
|
|
1222
1222
|
locale: x,
|
|
1223
|
-
_originalDate:
|
|
1223
|
+
_originalDate: T
|
|
1224
1224
|
};
|
|
1225
|
-
return v.match(
|
|
1225
|
+
return v.match(_).map(function(e) {
|
|
1226
1226
|
var t = e[0];
|
|
1227
1227
|
if (t === "p" || t === "P") {
|
|
1228
1228
|
var n = s.default[t];
|
|
1229
1229
|
return n(e, x.formatLong);
|
|
1230
1230
|
}
|
|
1231
1231
|
return e;
|
|
1232
|
-
}).join("").match(
|
|
1232
|
+
}).join("").match(g).map(function(r) {
|
|
1233
1233
|
if (r === "''") return "'";
|
|
1234
1234
|
var i = r[0];
|
|
1235
|
-
if (i === "'") return
|
|
1235
|
+
if (i === "'") return S(r);
|
|
1236
1236
|
var a = o.default[i];
|
|
1237
|
-
if (a) return !(n != null && n.useAdditionalWeekYearTokens) && (0,
|
|
1238
|
-
if (i.match(
|
|
1237
|
+
if (a) return !(n != null && n.useAdditionalWeekYearTokens) && (0, d.isProtectedWeekYearToken)(r) && (0, d.throwProtectedError)(r, t, String(e)), !(n != null && n.useAdditionalDayOfYearTokens) && (0, d.isProtectedDayOfYearToken)(r) && (0, d.throwProtectedError)(r, t, String(e)), a(D, r, x.localize, O);
|
|
1238
|
+
if (i.match(b)) throw RangeError("Format string contains an unescaped latin alphabet character `" + i + "`");
|
|
1239
1239
|
return r;
|
|
1240
1240
|
}).join("");
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1243
|
-
var t = e.match(
|
|
1244
|
-
return t ? t[1].replace(
|
|
1242
|
+
function S(e) {
|
|
1243
|
+
var t = e.match(v);
|
|
1244
|
+
return t ? t[1].replace(y, "'") : e;
|
|
1245
1245
|
}
|
|
1246
1246
|
t.exports = e.default;
|
|
1247
1247
|
}));
|
|
1248
|
-
function
|
|
1249
|
-
var r =
|
|
1250
|
-
return r.formatToParts ?
|
|
1248
|
+
function Ee(e, t, n) {
|
|
1249
|
+
var r = ke(e, n.timeZone, n.locale);
|
|
1250
|
+
return r.formatToParts ? De(r, t) : Oe(r, t);
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function De(e, t) {
|
|
1253
1253
|
for (var n = e.formatToParts(t), r = n.length - 1; r >= 0; --r) if (n[r].type === "timeZoneName") return n[r].value;
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function Oe(e, t) {
|
|
1256
1256
|
var n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
|
|
1257
1257
|
return r ? r[0].substr(1) : "";
|
|
1258
1258
|
}
|
|
1259
|
-
function
|
|
1259
|
+
function ke(e, t, n) {
|
|
1260
1260
|
if (n && !n.code) throw Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");
|
|
1261
1261
|
return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
|
|
1262
1262
|
timeZone: t,
|
|
1263
1263
|
timeZoneName: e
|
|
1264
1264
|
});
|
|
1265
1265
|
}
|
|
1266
|
-
var
|
|
1266
|
+
var Ae = 60 * 1e3, je = {
|
|
1267
1267
|
X: function(e, t, n, r) {
|
|
1268
|
-
var i =
|
|
1268
|
+
var i = Me(r.timeZone, e);
|
|
1269
1269
|
if (i === 0) return "Z";
|
|
1270
1270
|
switch (t) {
|
|
1271
|
-
case "X": return
|
|
1271
|
+
case "X": return Fe(i);
|
|
1272
1272
|
case "XXXX":
|
|
1273
|
-
case "XX": return
|
|
1274
|
-
default: return
|
|
1273
|
+
case "XX": return Pe(i);
|
|
1274
|
+
default: return Pe(i, ":");
|
|
1275
1275
|
}
|
|
1276
1276
|
},
|
|
1277
1277
|
x: function(e, t, n, r) {
|
|
1278
|
-
var i =
|
|
1278
|
+
var i = Me(r.timeZone, e);
|
|
1279
1279
|
switch (t) {
|
|
1280
|
-
case "x": return
|
|
1280
|
+
case "x": return Fe(i);
|
|
1281
1281
|
case "xxxx":
|
|
1282
|
-
case "xx": return
|
|
1283
|
-
default: return
|
|
1282
|
+
case "xx": return Pe(i);
|
|
1283
|
+
default: return Pe(i, ":");
|
|
1284
1284
|
}
|
|
1285
1285
|
},
|
|
1286
1286
|
O: function(e, t, n, r) {
|
|
1287
|
-
var i =
|
|
1287
|
+
var i = Me(r.timeZone, e);
|
|
1288
1288
|
switch (t) {
|
|
1289
1289
|
case "O":
|
|
1290
1290
|
case "OO":
|
|
1291
|
-
case "OOO": return "GMT" +
|
|
1292
|
-
default: return "GMT" +
|
|
1291
|
+
case "OOO": return "GMT" + Ie(i, ":");
|
|
1292
|
+
default: return "GMT" + Pe(i, ":");
|
|
1293
1293
|
}
|
|
1294
1294
|
},
|
|
1295
1295
|
z: function(e, t, n, r) {
|
|
1296
1296
|
switch (t) {
|
|
1297
1297
|
case "z":
|
|
1298
1298
|
case "zz":
|
|
1299
|
-
case "zzz": return
|
|
1300
|
-
default: return
|
|
1299
|
+
case "zzz": return Ee("short", e, r);
|
|
1300
|
+
default: return Ee("long", e, r);
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
1303
|
};
|
|
1304
|
-
function
|
|
1305
|
-
var n = e ?
|
|
1304
|
+
function Me(e, t) {
|
|
1305
|
+
var n = e ? g(e, t, !0) / Ae : t.getTimezoneOffset();
|
|
1306
1306
|
if (Number.isNaN(n)) throw RangeError("Invalid time zone specified: " + e);
|
|
1307
1307
|
return n;
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function Ne(e, t) {
|
|
1310
1310
|
for (var n = e < 0 ? "-" : "", r = Math.abs(e).toString(); r.length < t;) r = "0" + r;
|
|
1311
1311
|
return n + r;
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1314
|
-
var n = t || "", r = e > 0 ? "-" : "+", i = Math.abs(e), a =
|
|
1313
|
+
function Pe(e, t) {
|
|
1314
|
+
var n = t || "", r = e > 0 ? "-" : "+", i = Math.abs(e), a = Ne(Math.floor(i / 60), 2), o = Ne(Math.floor(i % 60), 2);
|
|
1315
1315
|
return r + a + n + o;
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1318
|
-
return e % 60 == 0 ? (e > 0 ? "-" : "+") +
|
|
1317
|
+
function Fe(e, t) {
|
|
1318
|
+
return e % 60 == 0 ? (e > 0 ? "-" : "+") + Ne(Math.abs(e) / 60, 2) : Pe(e, t);
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1320
|
+
function Ie(e, t) {
|
|
1321
1321
|
var n = e > 0 ? "-" : "+", r = Math.abs(e), i = Math.floor(r / 60), a = r % 60;
|
|
1322
1322
|
if (a === 0) return n + String(i);
|
|
1323
1323
|
var o = t || "";
|
|
1324
|
-
return n + String(i) + o +
|
|
1324
|
+
return n + String(i) + o + Ne(a, 2);
|
|
1325
1325
|
}
|
|
1326
|
-
var
|
|
1327
|
-
function
|
|
1328
|
-
var r = String(t), i = n || {}, a = r.match(
|
|
1326
|
+
var Le = /* @__PURE__ */ e(Te()), Re = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
|
|
1327
|
+
function ze(e, t, n) {
|
|
1328
|
+
var r = String(t), i = n || {}, a = r.match(Re);
|
|
1329
1329
|
if (a) {
|
|
1330
|
-
var o =
|
|
1330
|
+
var o = v(i.originalDate || e, i);
|
|
1331
1331
|
r = a.reduce(function(e, t) {
|
|
1332
1332
|
if (t[0] === "'") return e;
|
|
1333
|
-
var n = e.indexOf(t), r = e[n - 1] === "'", a = e.replace(t, "'" +
|
|
1333
|
+
var n = e.indexOf(t), r = e[n - 1] === "'", a = e.replace(t, "'" + je[t[0]](o, t, null, i) + "'");
|
|
1334
1334
|
return r ? a.substring(0, n - 1) + a.substring(n + 1) : a;
|
|
1335
1335
|
}, r);
|
|
1336
1336
|
}
|
|
1337
|
-
return (0,
|
|
1337
|
+
return (0, Le.default)(e, r, i);
|
|
1338
1338
|
}
|
|
1339
|
-
var
|
|
1339
|
+
var Be = /* @__PURE__ */ t(((e, t) => {
|
|
1340
1340
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
1341
1341
|
function n(e, t) {
|
|
1342
1342
|
if (e == null) throw TypeError("assign requires that input parameter not be null or undefined");
|
|
@@ -1344,68 +1344,68 @@ var Ve = /* @__PURE__ */ t(((e, t) => {
|
|
|
1344
1344
|
return e;
|
|
1345
1345
|
}
|
|
1346
1346
|
t.exports = e.default;
|
|
1347
|
-
})),
|
|
1348
|
-
var n =
|
|
1347
|
+
})), Ve = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
1348
|
+
var n = c().default;
|
|
1349
1349
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = i;
|
|
1350
|
-
var r = n(
|
|
1350
|
+
var r = n(Be());
|
|
1351
1351
|
function i(e) {
|
|
1352
1352
|
return (0, r.default)({}, e);
|
|
1353
1353
|
}
|
|
1354
1354
|
t.exports = e.default;
|
|
1355
1355
|
})))());
|
|
1356
|
-
function
|
|
1357
|
-
var i = (0,
|
|
1358
|
-
return i.timeZone = t, i.originalDate = e,
|
|
1356
|
+
function He(e, t, n, r) {
|
|
1357
|
+
var i = (0, Ve.default)(r);
|
|
1358
|
+
return i.timeZone = t, i.originalDate = e, ze(d(e, t), n, i);
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1361
|
-
if (typeof e == "string" && !e.match(
|
|
1362
|
-
var r = (0,
|
|
1363
|
-
return r.timeZone = t,
|
|
1360
|
+
function Ue(e, t, n) {
|
|
1361
|
+
if (typeof e == "string" && !e.match(E)) {
|
|
1362
|
+
var r = (0, Ve.default)(n);
|
|
1363
|
+
return r.timeZone = t, v(e, r);
|
|
1364
1364
|
}
|
|
1365
|
-
var i =
|
|
1365
|
+
var i = v(e, n), a = _(i.getFullYear(), i.getMonth(), i.getDate(), i.getHours(), i.getMinutes(), i.getSeconds(), i.getMilliseconds()).getTime(), o = g(t, new Date(a));
|
|
1366
1366
|
return new Date(a + o);
|
|
1367
1367
|
}
|
|
1368
|
-
var
|
|
1369
|
-
if (!
|
|
1368
|
+
var W = /* @__PURE__ */ e(b()), G = x(), K = (e) => typeof e == "object" && !!e && !Array.isArray(e), We = (e) => K(e) && K(e.associativeListFilter), q = (e) => {
|
|
1369
|
+
if (!K(e)) return;
|
|
1370
1370
|
if (typeof e.fieldKey == "string") return e.fieldKey;
|
|
1371
1371
|
let t = e.field;
|
|
1372
|
-
if (!(!
|
|
1373
|
-
},
|
|
1374
|
-
if (
|
|
1375
|
-
let t =
|
|
1372
|
+
if (!(!K(t) || typeof t.name != "string" || typeof t.view != "string")) return `[${t.view}].[${t.name}]`;
|
|
1373
|
+
}, Ge = (e) => {
|
|
1374
|
+
if (We(e)) return JSON.stringify(["associative", q(e) ?? ""]);
|
|
1375
|
+
let t = K(e) ? e : {};
|
|
1376
1376
|
return JSON.stringify([
|
|
1377
1377
|
"value",
|
|
1378
|
-
|
|
1378
|
+
q(e) ?? "",
|
|
1379
1379
|
t.dateLevel ?? null,
|
|
1380
1380
|
t.datePart ?? null,
|
|
1381
1381
|
t.operator
|
|
1382
1382
|
]);
|
|
1383
|
-
},
|
|
1384
|
-
if (
|
|
1385
|
-
let t =
|
|
1383
|
+
}, J = (e) => {
|
|
1384
|
+
if (We(e)) return JSON.stringify(["associative", q(e) ?? ""]);
|
|
1385
|
+
let t = K(e) ? e : {};
|
|
1386
1386
|
return JSON.stringify([
|
|
1387
1387
|
"value",
|
|
1388
|
-
|
|
1388
|
+
q(e) ?? "",
|
|
1389
1389
|
t.dateLevel ?? null,
|
|
1390
1390
|
t.datePart ?? null
|
|
1391
1391
|
]);
|
|
1392
|
-
},
|
|
1393
|
-
let t =
|
|
1392
|
+
}, Ke = (e) => {
|
|
1393
|
+
let t = K(e) ? e : {};
|
|
1394
1394
|
return {
|
|
1395
1395
|
applied: $e(t.applied),
|
|
1396
1396
|
pending: $e(t.pending)
|
|
1397
1397
|
};
|
|
1398
|
-
},
|
|
1398
|
+
}, qe = (e) => {
|
|
1399
1399
|
let t = /* @__PURE__ */ new Map();
|
|
1400
1400
|
for (let n of e.applied) {
|
|
1401
|
-
let e =
|
|
1401
|
+
let e = Ge(n);
|
|
1402
1402
|
t.set(e, {
|
|
1403
1403
|
identity: e,
|
|
1404
1404
|
applied: n
|
|
1405
1405
|
});
|
|
1406
1406
|
}
|
|
1407
1407
|
for (let n of e.pending) {
|
|
1408
|
-
let e =
|
|
1408
|
+
let e = Ge(n), r = t.get(e);
|
|
1409
1409
|
t.set(e, {
|
|
1410
1410
|
...r,
|
|
1411
1411
|
identity: e,
|
|
@@ -1413,7 +1413,7 @@ var U = /* @__PURE__ */ e(f()), W = r(), G = (e) => typeof e == "object" && !!e
|
|
|
1413
1413
|
});
|
|
1414
1414
|
}
|
|
1415
1415
|
return [...t.values()];
|
|
1416
|
-
},
|
|
1416
|
+
}, Je = (e) => qe(e).flatMap(({ identity: e, applied: t, pending: n }) => {
|
|
1417
1417
|
let r = n ?? t;
|
|
1418
1418
|
return r ? [{
|
|
1419
1419
|
id: e,
|
|
@@ -1421,31 +1421,31 @@ var U = /* @__PURE__ */ e(f()), W = r(), G = (e) => typeof e == "object" && !!e
|
|
|
1421
1421
|
applied: t,
|
|
1422
1422
|
pending: n
|
|
1423
1423
|
}] : [];
|
|
1424
|
-
}),
|
|
1425
|
-
if (
|
|
1424
|
+
}), Ye = (e, t = (e) => e === null ? "∅" : String(e)) => {
|
|
1425
|
+
if (We(e)) return {
|
|
1426
1426
|
isAssociative: !0,
|
|
1427
1427
|
isEmpty: !nt(e.associativeListFilter),
|
|
1428
1428
|
valueCount: 0,
|
|
1429
1429
|
text: "Related records"
|
|
1430
1430
|
};
|
|
1431
|
-
let n = Array.isArray(e.values) ? e.values : [], r = ut(e), i = n.length, a = e.operator ===
|
|
1431
|
+
let n = Array.isArray(e.values) ? e.values : [], r = ut(e), i = n.length, a = e.operator === G.FilterOperator.Set || e.operator === G.FilterOperator.NotSet, o = n.slice(0, 3).map((e) => K(e) ? typeof e.dataType == "string" ? `${e.dataType} filter` : "Value" : t(e));
|
|
1432
1432
|
return {
|
|
1433
1433
|
isAssociative: !1,
|
|
1434
1434
|
isEmpty: !r && !a && i === 0,
|
|
1435
1435
|
valueCount: i,
|
|
1436
1436
|
text: a ? "Has value" : r ? "Dynamic date" : `${o.join(", ")}${i > 3 ? ` +${i - 3}` : ""}`
|
|
1437
1437
|
};
|
|
1438
|
-
},
|
|
1439
|
-
if (!
|
|
1440
|
-
if (
|
|
1441
|
-
let t =
|
|
1438
|
+
}, Xe = (e) => We(e) ? nt(e.associativeListFilter) : e.operator === G.FilterOperator.Set || e.operator === G.FilterOperator.NotSet || ut(e) ? !0 : !Array.isArray(e.values) || e.values.length === 0 ? !1 : e.operator === G.FilterOperator.Between || e.operator === G.FilterOperator.NotBetween ? e.values.length === 2 && st(e.values[0]) && st(e.values[1]) : e.operator === G.FilterOperator.Like || e.operator === G.FilterOperator.NotLike ? e.values.length === 1 && typeof e.values[0] == "string" && e.values[0].trim().length > 0 : [G.FilterOperator.InList, G.FilterOperator.NotInList].includes(e.operator) ? e.values.every(ot) : e.operator === G.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) => {
|
|
1439
|
+
if (!K(e)) return [];
|
|
1440
|
+
if (K(e.associativeListFilter)) {
|
|
1441
|
+
let t = q(e);
|
|
1442
1442
|
return t ? [{
|
|
1443
1443
|
...e,
|
|
1444
1444
|
fieldKey: t,
|
|
1445
1445
|
associativeListFilter: tt(e.associativeListFilter)
|
|
1446
1446
|
}] : [];
|
|
1447
1447
|
}
|
|
1448
|
-
let t =
|
|
1448
|
+
let t = q(e);
|
|
1449
1449
|
if (!t || typeof e.operator != "string") return [];
|
|
1450
1450
|
let n = {
|
|
1451
1451
|
...e,
|
|
@@ -1454,22 +1454,22 @@ var U = /* @__PURE__ */ e(f()), W = r(), G = (e) => typeof e == "object" && !!e
|
|
|
1454
1454
|
return Array.isArray(e.values) && (n.values = e.values.map(et)), [n];
|
|
1455
1455
|
}) : [], et = (e) => {
|
|
1456
1456
|
if (e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean") return e;
|
|
1457
|
-
if (!
|
|
1457
|
+
if (!K(e) || e.isNull === !0 || "value" in e && e.value === null) return null;
|
|
1458
1458
|
if ("value" in e && (typeof e.value == "string" || typeof e.value == "number" || typeof e.value == "boolean")) return e.value;
|
|
1459
1459
|
let t = e;
|
|
1460
1460
|
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
1461
|
}, tt = (e) => {
|
|
1462
|
-
let t = (e) => !
|
|
1462
|
+
let t = (e) => !K(e) || !K(e.filterGroup) ? e : {
|
|
1463
1463
|
...e,
|
|
1464
1464
|
filterGroup: n(e.filterGroup)
|
|
1465
1465
|
}, n = (e) => ({
|
|
1466
1466
|
...e,
|
|
1467
1467
|
...Array.isArray(e.filters) ? { filters: e.filters.map((e) => {
|
|
1468
|
-
if (!
|
|
1468
|
+
if (!K(e)) return e;
|
|
1469
1469
|
let t = { ...e };
|
|
1470
1470
|
return Array.isArray(e.values) && (t.values = e.values.map(et)), t;
|
|
1471
1471
|
}) } : {},
|
|
1472
|
-
...Array.isArray(e.filterGroups) ? { filterGroups: e.filterGroups.map((e) =>
|
|
1472
|
+
...Array.isArray(e.filterGroups) ? { filterGroups: e.filterGroups.map((e) => K(e) ? n(e) : e) } : {}
|
|
1473
1473
|
});
|
|
1474
1474
|
return {
|
|
1475
1475
|
...e,
|
|
@@ -1477,13 +1477,13 @@ var U = /* @__PURE__ */ e(f()), W = r(), G = (e) => typeof e == "object" && !!e
|
|
|
1477
1477
|
...Array.isArray(e.unionFilters) ? { unionFilters: e.unionFilters.map(t) } : {}
|
|
1478
1478
|
};
|
|
1479
1479
|
}, nt = (e) => {
|
|
1480
|
-
if (!
|
|
1480
|
+
if (!K(e) || typeof e.view != "string") return !1;
|
|
1481
1481
|
let t = [e.intersectFilters, e.unionFilters].filter(Array.isArray).flatMap((e) => e);
|
|
1482
1482
|
return t.length > 0 && t.every(rt);
|
|
1483
|
-
}, rt = (e) => !
|
|
1483
|
+
}, rt = (e) => !K(e) || !K(e.filterGroup) ? !1 : it(e.filterGroup), it = (e) => {
|
|
1484
1484
|
let t = Array.isArray(e.filters) ? e.filters : [], n = Array.isArray(e.filterGroups) ? e.filterGroups : [], r = [...t, ...n];
|
|
1485
1485
|
return r.length > 0 && r.every(at);
|
|
1486
|
-
}, at = (e) =>
|
|
1486
|
+
}, at = (e) => K(e) ? K(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 : K(e) && typeof e.dataType == "string", st = (e) => e !== null && ot(e), ct = (e) => K(e) && e.dataType === "geography" && lt(e.valueGeoMinPoint) && lt(e.valueGeoMaxPoint), lt = (e) => {
|
|
1487
1487
|
if (typeof e != "string") return !1;
|
|
1488
1488
|
let t = e.trim().split(/[ ,]+/).map(Number);
|
|
1489
1489
|
if (t.length !== 2 || !t.every(Number.isFinite)) return !1;
|
|
@@ -1504,50 +1504,50 @@ var U = /* @__PURE__ */ e(f()), W = r(), G = (e) => typeof e == "object" && !!e
|
|
|
1504
1504
|
let r = e.dynamicDateRange;
|
|
1505
1505
|
if (r && Number.isFinite(r.offsetBegin) && Number.isFinite(r.offsetEnd) && t.includes(r.part)) return !0;
|
|
1506
1506
|
let i = e.dynamicDateCalc;
|
|
1507
|
-
if (i && Object.values(
|
|
1507
|
+
if (i && Object.values(G.DynamicDateCalcType).includes(i.type)) return !0;
|
|
1508
1508
|
let a = e.dynamicDateCalcRange;
|
|
1509
|
-
return !!(a && Object.values(
|
|
1510
|
-
}, dt = (e) => e.dataType ===
|
|
1509
|
+
return !!(a && Object.values(G.DynamicDateCalcRangeType).includes(a.type));
|
|
1510
|
+
}, dt = (e) => e.dataType === G.FieldType.GEOGRAPHY ? {
|
|
1511
1511
|
fieldKey: e.key,
|
|
1512
|
-
operator:
|
|
1512
|
+
operator: G.FilterOperator.GeoIntersect,
|
|
1513
1513
|
values: [{
|
|
1514
|
-
dataType:
|
|
1514
|
+
dataType: G.FilterValueDataType.Geography,
|
|
1515
1515
|
valueGeoMinPoint: "",
|
|
1516
1516
|
valueGeoMaxPoint: ""
|
|
1517
1517
|
}]
|
|
1518
1518
|
} : {
|
|
1519
1519
|
fieldKey: e.key,
|
|
1520
|
-
operator:
|
|
1520
|
+
operator: G.FilterOperator.InList,
|
|
1521
1521
|
values: []
|
|
1522
1522
|
}, ft = (e, t) => t ? [e[0] ?? null] : [e[0] ?? null, e[1] ?? null], pt = (e, t) => {
|
|
1523
1523
|
let n = typeof e == "string" && /\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?\s*(?:Z|[+-]\d{2}(?::?\d{2})?)$/i.test(e);
|
|
1524
|
-
return typeof e == "string" && !n ?
|
|
1524
|
+
return typeof e == "string" && !n ? Ue(e.replace(" ", "T"), t) : new Date(e);
|
|
1525
1525
|
}, mt = (e, t, n) => {
|
|
1526
1526
|
if (e == null || e === "" || typeof e != "number" && typeof e != "string") return "";
|
|
1527
|
-
if (t ===
|
|
1527
|
+
if (t === G.FieldType.TIME) {
|
|
1528
1528
|
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
1529
|
if (!Number.isFinite(n)) return "";
|
|
1530
1530
|
let r = Math.max(0, Math.floor(n)), i = Math.floor(r / 1e3);
|
|
1531
1531
|
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
1532
|
}
|
|
1533
|
-
if (t ===
|
|
1533
|
+
if (t === G.FieldType.DATE) {
|
|
1534
1534
|
let t = new Date(typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/.test(e) ? `${e}T00:00:00.000Z` : e);
|
|
1535
1535
|
return Number.isFinite(t.getTime()) ? t.toISOString().slice(0, 10) : "";
|
|
1536
1536
|
}
|
|
1537
1537
|
let r = pt(e, n);
|
|
1538
|
-
return Number.isFinite(r.getTime()) ?
|
|
1538
|
+
return Number.isFinite(r.getTime()) ? He(r, n, "yyyy-MM-dd'T'HH:mm:ss.SSS") : "";
|
|
1539
1539
|
}, ht = (e, t, n) => {
|
|
1540
1540
|
if (!e) return null;
|
|
1541
|
-
if (t ===
|
|
1541
|
+
if (t === G.FieldType.TIME) {
|
|
1542
1542
|
let [t = "0", n = "0", r = "0"] = e.split(":"), [i = "0", a = "0"] = r.split(".");
|
|
1543
1543
|
return (Number(t) * 3600 + Number(n) * 60 + Number(i)) * 1e3 + Number(a.padEnd(3, "0").slice(0, 3));
|
|
1544
1544
|
}
|
|
1545
|
-
if (t ===
|
|
1545
|
+
if (t === G.FieldType.DATE) {
|
|
1546
1546
|
let t = /* @__PURE__ */ new Date(`${e}T00:00:00.000Z`);
|
|
1547
1547
|
return Number.isFinite(t.getTime()) ? t.getTime() : null;
|
|
1548
1548
|
}
|
|
1549
1549
|
try {
|
|
1550
|
-
return
|
|
1550
|
+
return Ue(e, n).getTime();
|
|
1551
1551
|
} catch {
|
|
1552
1552
|
return null;
|
|
1553
1553
|
}
|
|
@@ -1556,9 +1556,9 @@ var U = /* @__PURE__ */ e(f()), W = r(), G = (e) => typeof e == "object" && !!e
|
|
|
1556
1556
|
if (typeof e != "number" && (typeof e != "string" || !e.trim())) return [];
|
|
1557
1557
|
let r;
|
|
1558
1558
|
if (typeof e == "number") r = e;
|
|
1559
|
-
else if (t ===
|
|
1560
|
-
else if (t ===
|
|
1561
|
-
else if (t ===
|
|
1559
|
+
else if (t === G.FieldType.DATE) r = Date.parse(e);
|
|
1560
|
+
else if (t === G.FieldType.TIMESTAMP || t === G.FieldType.TIMESTAMP_TZ) r = pt(e, n).getTime();
|
|
1561
|
+
else if (t === G.FieldType.TIME) {
|
|
1562
1562
|
let i = ht(mt(e, t, n), t, n);
|
|
1563
1563
|
r = typeof i == "number" ? i : NaN;
|
|
1564
1564
|
} else r = Number(e);
|
|
@@ -1569,45 +1569,45 @@ var U = /* @__PURE__ */ e(f()), W = r(), G = (e) => typeof e == "object" && !!e
|
|
|
1569
1569
|
}).sort((e, t) => e.order - t.order);
|
|
1570
1570
|
return r.length ? [r[0].value, r[r.length - 1].value] : [];
|
|
1571
1571
|
}, _t = (e) => [
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1572
|
+
G.FieldType.INT,
|
|
1573
|
+
G.FieldType.REAL,
|
|
1574
|
+
G.FieldType.FLOAT,
|
|
1575
|
+
G.FieldType.DECIMAL
|
|
1576
1576
|
].includes(e), Y = (e) => [
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
].includes(e), vt = (e, t) => t.operator ===
|
|
1582
|
-
if (e ===
|
|
1583
|
-
if (e ===
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1577
|
+
G.FieldType.DATE,
|
|
1578
|
+
G.FieldType.TIME,
|
|
1579
|
+
G.FieldType.TIMESTAMP,
|
|
1580
|
+
G.FieldType.TIMESTAMP_TZ
|
|
1581
|
+
].includes(e), vt = (e, t) => t.operator === G.FilterOperator.GeoIntersect ? "geo" : [G.FilterOperator.Set, G.FilterOperator.NotSet].includes(t.operator) ? "null" : [G.FilterOperator.Contains, G.FilterOperator.NotContains].includes(t.operator) ? "text" : Y(e) && (t.dynamicDate || t.dynamicDateCalc || [G.FilterOperator.Equals, G.FilterOperator.NotEquals].includes(t.operator)) ? "date" : t.operator === G.FilterOperator.Like || t.operator === G.FilterOperator.NotLike ? "text" : t.operator === G.FilterOperator.Between || t.operator === G.FilterOperator.NotBetween || t.dynamicDateRange || t.dynamicDateCalcRange ? Y(e) ? "date" : "range" : [G.FilterOperator.InList, G.FilterOperator.NotInList].includes(t.operator) ? "list" : [G.FilterOperator.Equals, G.FilterOperator.NotEquals].includes(t.operator) && Y(e) ? "date" : "scalar", yt = (e) => {
|
|
1582
|
+
if (e === G.FieldType.GEOGRAPHY) return [G.FilterOperator.GeoIntersect];
|
|
1583
|
+
if (e === G.FieldType.BOOLEAN) return [
|
|
1584
|
+
G.FilterOperator.Equals,
|
|
1585
|
+
G.FilterOperator.NotEquals,
|
|
1586
|
+
G.FilterOperator.Set,
|
|
1587
|
+
G.FilterOperator.NotSet
|
|
1588
1588
|
];
|
|
1589
1589
|
let t = [
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1590
|
+
G.FilterOperator.Equals,
|
|
1591
|
+
G.FilterOperator.NotEquals,
|
|
1592
|
+
G.FilterOperator.InList,
|
|
1593
|
+
G.FilterOperator.NotInList,
|
|
1594
|
+
G.FilterOperator.Set,
|
|
1595
|
+
G.FilterOperator.NotSet
|
|
1596
1596
|
];
|
|
1597
1597
|
return _t(e) || Y(e) ? [
|
|
1598
1598
|
...t,
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1599
|
+
G.FilterOperator.GT,
|
|
1600
|
+
G.FilterOperator.GTE,
|
|
1601
|
+
G.FilterOperator.LT,
|
|
1602
|
+
G.FilterOperator.LTE,
|
|
1603
|
+
G.FilterOperator.Between,
|
|
1604
|
+
G.FilterOperator.NotBetween
|
|
1605
1605
|
] : [
|
|
1606
1606
|
...t,
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1607
|
+
G.FilterOperator.Like,
|
|
1608
|
+
G.FilterOperator.NotLike,
|
|
1609
|
+
G.FilterOperator.Contains,
|
|
1610
|
+
G.FilterOperator.NotContains
|
|
1611
1611
|
];
|
|
1612
1612
|
}, X = (e) => {
|
|
1613
1613
|
let t = { ...e };
|
|
@@ -1616,31 +1616,31 @@ var U = /* @__PURE__ */ e(f()), W = r(), G = (e) => typeof e == "object" && !!e
|
|
|
1616
1616
|
...X(e),
|
|
1617
1617
|
values: t
|
|
1618
1618
|
}), Z = (e) => Array.isArray(e.values) ? e.values : [], Q = (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) => {
|
|
1619
|
-
let r = [
|
|
1619
|
+
let r = [G.FilterOperator.Contains, G.FilterOperator.NotContains].includes(t.operator), i = [G.FilterOperator.Like, G.FilterOperator.NotLike].includes(t.operator);
|
|
1620
1620
|
if (!(!r && !i)) return {
|
|
1621
1621
|
dimensions: [{ fieldKey: e }],
|
|
1622
1622
|
measures: [],
|
|
1623
1623
|
filters: [{
|
|
1624
1624
|
fieldKey: e,
|
|
1625
|
-
operator: r ?
|
|
1625
|
+
operator: r ? G.FilterOperator.Contains : G.FilterOperator.Like,
|
|
1626
1626
|
values: [String(Z(t)[0] ?? "").trim()],
|
|
1627
1627
|
dateLevel: t.dateLevel,
|
|
1628
1628
|
datePart: t.datePart
|
|
1629
1629
|
}],
|
|
1630
1630
|
limit: n
|
|
1631
1631
|
};
|
|
1632
|
-
}, Ct = (e) => e ===
|
|
1633
|
-
let n = X(e), r = [
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
].includes(e.operator) ? e.operator : r ?
|
|
1632
|
+
}, Ct = (e) => e === G.FieldType.DATE ? "date" : e === G.FieldType.TIME ? "time" : "datetime-local", wt = (e) => e.dynamicDateCalcRange ? "preset" : e.dynamicDateRange ? "relative" : e.dynamicDateCalc ? "dynamic-calc" : e.dynamicDate ? "dynamic" : [G.FilterOperator.Equals, G.FilterOperator.NotEquals].includes(e.operator) ? "single" : "fixed", Tt = (e, t) => {
|
|
1633
|
+
let n = X(e), r = [G.FilterOperator.NotEquals, G.FilterOperator.NotBetween].includes(e.operator), i = [
|
|
1634
|
+
G.FilterOperator.Equals,
|
|
1635
|
+
G.FilterOperator.NotEquals,
|
|
1636
|
+
G.FilterOperator.GT,
|
|
1637
|
+
G.FilterOperator.GTE,
|
|
1638
|
+
G.FilterOperator.LT,
|
|
1639
|
+
G.FilterOperator.LTE
|
|
1640
|
+
].includes(e.operator) ? e.operator : r ? G.FilterOperator.NotEquals : G.FilterOperator.Equals;
|
|
1641
1641
|
return t === "single" ? {
|
|
1642
1642
|
...n,
|
|
1643
|
-
operator: r ?
|
|
1643
|
+
operator: r ? G.FilterOperator.NotEquals : G.FilterOperator.Equals,
|
|
1644
1644
|
values: [null]
|
|
1645
1645
|
} : t === "dynamic" ? {
|
|
1646
1646
|
...n,
|
|
@@ -1654,15 +1654,15 @@ var U = /* @__PURE__ */ e(f()), W = r(), G = (e) => typeof e == "object" && !!e
|
|
|
1654
1654
|
...n,
|
|
1655
1655
|
operator: i,
|
|
1656
1656
|
values: [],
|
|
1657
|
-
dynamicDateCalc: { type:
|
|
1657
|
+
dynamicDateCalc: { type: G.DynamicDateCalcType.Today }
|
|
1658
1658
|
} : t === "preset" ? {
|
|
1659
1659
|
...n,
|
|
1660
|
-
operator: r ?
|
|
1660
|
+
operator: r ? G.FilterOperator.NotBetween : G.FilterOperator.Between,
|
|
1661
1661
|
values: [],
|
|
1662
|
-
dynamicDateCalcRange: { type:
|
|
1662
|
+
dynamicDateCalcRange: { type: G.DynamicDateCalcRangeType.Today }
|
|
1663
1663
|
} : t === "relative" ? {
|
|
1664
1664
|
...n,
|
|
1665
|
-
operator: r ?
|
|
1665
|
+
operator: r ? G.FilterOperator.NotBetween : G.FilterOperator.Between,
|
|
1666
1666
|
values: [],
|
|
1667
1667
|
dynamicDateRange: {
|
|
1668
1668
|
offsetBegin: 0,
|
|
@@ -1671,22 +1671,22 @@ var U = /* @__PURE__ */ e(f()), W = r(), G = (e) => typeof e == "object" && !!e
|
|
|
1671
1671
|
}
|
|
1672
1672
|
} : {
|
|
1673
1673
|
...n,
|
|
1674
|
-
operator: r ?
|
|
1674
|
+
operator: r ? G.FilterOperator.NotBetween : G.FilterOperator.Between,
|
|
1675
1675
|
values: [null, null]
|
|
1676
1676
|
};
|
|
1677
|
-
}, $ =
|
|
1677
|
+
}, $ = f();
|
|
1678
1678
|
function Et({ filter: e, disabledControls: t, update: n }) {
|
|
1679
1679
|
let r = Z(e), i = r[0], a = (i?.valueGeoMinPoint ?? "").split(/[ ,]+/), o = (i?.valueGeoMaxPoint ?? "").split(/[ ,]+/), s = (t, i, s) => {
|
|
1680
1680
|
let c = t === "min" ? a : o;
|
|
1681
1681
|
c[i] = s;
|
|
1682
1682
|
let l = `${c[0] ?? ""} ${c[1] ?? ""}`.trim(), u = r[0], d = {
|
|
1683
1683
|
...u && typeof u == "object" ? u : {},
|
|
1684
|
-
dataType:
|
|
1684
|
+
dataType: G.FilterValueDataType.Geography,
|
|
1685
1685
|
[t === "min" ? "valueGeoMinPoint" : "valueGeoMaxPoint"]: l
|
|
1686
1686
|
};
|
|
1687
1687
|
n({
|
|
1688
1688
|
...e,
|
|
1689
|
-
operator:
|
|
1689
|
+
operator: G.FilterOperator.GeoIntersect,
|
|
1690
1690
|
values: [d]
|
|
1691
1691
|
});
|
|
1692
1692
|
};
|
|
@@ -1699,7 +1699,7 @@ function Et({ filter: e, disabledControls: t, update: n }) {
|
|
|
1699
1699
|
className: "astrato-app-filter-bar__row",
|
|
1700
1700
|
children: [/* @__PURE__ */ (0, $.jsxs)("label", {
|
|
1701
1701
|
className: "astrato-app-filter-bar__label",
|
|
1702
|
-
children: [e === "min" ? "Minimum longitude" : "Maximum longitude", /* @__PURE__ */ (0, $.jsx)(
|
|
1702
|
+
children: [e === "min" ? "Minimum longitude" : "Maximum longitude", /* @__PURE__ */ (0, $.jsx)(A, {
|
|
1703
1703
|
className: "astrato-app-filter-bar__control",
|
|
1704
1704
|
type: "number",
|
|
1705
1705
|
value: n[0] ?? "",
|
|
@@ -1708,7 +1708,7 @@ function Et({ filter: e, disabledControls: t, update: n }) {
|
|
|
1708
1708
|
})]
|
|
1709
1709
|
}), /* @__PURE__ */ (0, $.jsxs)("label", {
|
|
1710
1710
|
className: "astrato-app-filter-bar__label",
|
|
1711
|
-
children: [e === "min" ? "Minimum latitude" : "Maximum latitude", /* @__PURE__ */ (0, $.jsx)(
|
|
1711
|
+
children: [e === "min" ? "Minimum latitude" : "Maximum latitude", /* @__PURE__ */ (0, $.jsx)(A, {
|
|
1712
1712
|
className: "astrato-app-filter-bar__control",
|
|
1713
1713
|
type: "number",
|
|
1714
1714
|
value: n[1] ?? "",
|
|
@@ -1720,12 +1720,12 @@ function Et({ filter: e, disabledControls: t, update: n }) {
|
|
|
1720
1720
|
})
|
|
1721
1721
|
});
|
|
1722
1722
|
}
|
|
1723
|
-
var Dt = Object.values(
|
|
1723
|
+
var Dt = Object.values(G.DynamicDateCalcRangeType).map((e) => ({
|
|
1724
1724
|
value: e,
|
|
1725
|
-
label:
|
|
1726
|
-
})), Ot = Object.values(
|
|
1725
|
+
label: a[e] ?? e
|
|
1726
|
+
})), Ot = Object.values(G.DynamicDateCalcType).map((e) => ({
|
|
1727
1727
|
value: e,
|
|
1728
|
-
label:
|
|
1728
|
+
label: a[e] ?? e
|
|
1729
1729
|
})), kt = [
|
|
1730
1730
|
{
|
|
1731
1731
|
value: "list",
|
|
@@ -1763,33 +1763,33 @@ var Dt = Object.values(W.DynamicDateCalcRangeType).map((e) => ({
|
|
|
1763
1763
|
icon: "geography"
|
|
1764
1764
|
}
|
|
1765
1765
|
], At = {
|
|
1766
|
-
[
|
|
1767
|
-
[
|
|
1768
|
-
[
|
|
1769
|
-
[
|
|
1770
|
-
[
|
|
1771
|
-
[
|
|
1772
|
-
[
|
|
1773
|
-
[
|
|
1774
|
-
[
|
|
1775
|
-
[
|
|
1776
|
-
[
|
|
1777
|
-
[
|
|
1778
|
-
[
|
|
1779
|
-
[
|
|
1780
|
-
[
|
|
1781
|
-
[
|
|
1782
|
-
[
|
|
1766
|
+
[G.FilterOperator.Equals]: "Equals",
|
|
1767
|
+
[G.FilterOperator.NotEquals]: "Does not equal",
|
|
1768
|
+
[G.FilterOperator.InList]: "In list",
|
|
1769
|
+
[G.FilterOperator.NotInList]: "Excluded from list",
|
|
1770
|
+
[G.FilterOperator.GT]: "Greater than",
|
|
1771
|
+
[G.FilterOperator.GTE]: "Greater than or equal",
|
|
1772
|
+
[G.FilterOperator.LT]: "Less than",
|
|
1773
|
+
[G.FilterOperator.LTE]: "Less than or equal",
|
|
1774
|
+
[G.FilterOperator.Set]: "Is set",
|
|
1775
|
+
[G.FilterOperator.NotSet]: "Is not set",
|
|
1776
|
+
[G.FilterOperator.Between]: "Between",
|
|
1777
|
+
[G.FilterOperator.NotBetween]: "Not between",
|
|
1778
|
+
[G.FilterOperator.Like]: "Like",
|
|
1779
|
+
[G.FilterOperator.NotLike]: "Not like",
|
|
1780
|
+
[G.FilterOperator.Contains]: "Contains",
|
|
1781
|
+
[G.FilterOperator.NotContains]: "Does not contain",
|
|
1782
|
+
[G.FilterOperator.GeoIntersect]: "Intersects bounding box"
|
|
1783
1783
|
};
|
|
1784
1784
|
function jt({ field: e, filter: t, editor: n }) {
|
|
1785
1785
|
let { editorMode: r, disabledControls: i, update: a, valueList: { searchInput: o, setSearchInput: s } } = n, c = Z(t);
|
|
1786
|
-
return r === "list" ? /* @__PURE__ */ (0, $.jsx)(
|
|
1786
|
+
return r === "list" ? /* @__PURE__ */ (0, $.jsx)(te, {
|
|
1787
1787
|
value: o,
|
|
1788
1788
|
disabled: i,
|
|
1789
1789
|
placeholder: "Search values…",
|
|
1790
1790
|
"aria-label": `Search ${e.name} values`,
|
|
1791
1791
|
onChange: (e) => s(e.currentTarget.value)
|
|
1792
|
-
}) : r === "text" ? /* @__PURE__ */ (0, $.jsx)(
|
|
1792
|
+
}) : r === "text" ? /* @__PURE__ */ (0, $.jsx)(A, {
|
|
1793
1793
|
className: "astrato-app-filter-bar__control astrato-app-filter-bar__text-query",
|
|
1794
1794
|
type: "search",
|
|
1795
1795
|
placeholder: "Match text…",
|
|
@@ -1803,14 +1803,14 @@ function jt({ field: e, filter: t, editor: n }) {
|
|
|
1803
1803
|
}) : null;
|
|
1804
1804
|
}
|
|
1805
1805
|
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 ===
|
|
1806
|
+
let { editorMode: i, disabledControls: a, isSingleSelect: o, isChangingMode: s, switchMode: c, changeOperator: l, changeExclude: u } = n, d = t.operator === G.FilterOperator.NotInList || t.operator === G.FilterOperator.NotLike || t.operator === G.FilterOperator.NotBetween || t.operator === G.FilterOperator.NotEquals || t.operator === G.FilterOperator.NotContains, f = kt.filter(({ value: t }) => t === "list" || t === i ? !0 : o ? !1 : t === "text" ? e.dataType !== G.FieldType.BOOLEAN && e.dataType !== G.FieldType.GEOGRAPHY : t === "range" ? _t(e.dataType) : t === "date" && Y(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, $.jsx)(jt, {
|
|
1807
1807
|
field: e,
|
|
1808
1808
|
filter: t,
|
|
1809
1809
|
editor: n
|
|
1810
1810
|
}) : null;
|
|
1811
1811
|
return /* @__PURE__ */ (0, $.jsx)("header", {
|
|
1812
1812
|
className: "astrato-app-filter-bar__editor-options",
|
|
1813
|
-
children: r ? /* @__PURE__ */ (0, $.jsx)(
|
|
1813
|
+
children: r ? /* @__PURE__ */ (0, $.jsx)(D, {
|
|
1814
1814
|
className: "astrato-app-filter-bar__control",
|
|
1815
1815
|
"aria-label": "Filter operator",
|
|
1816
1816
|
value: t.operator,
|
|
@@ -1821,7 +1821,7 @@ function Mt({ field: e, filter: t, editor: n, showAdvancedOperators: r }) {
|
|
|
1821
1821
|
children: At[e] ?? e
|
|
1822
1822
|
}, e))
|
|
1823
1823
|
}) : /* @__PURE__ */ (0, $.jsxs)($.Fragment, { children: [
|
|
1824
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
1824
|
+
/* @__PURE__ */ (0, $.jsx)(O, {
|
|
1825
1825
|
className: "astrato-app-filter-bar__mode-toggle",
|
|
1826
1826
|
"data-variant": "ghost",
|
|
1827
1827
|
"data-icon-only": "true",
|
|
@@ -1832,7 +1832,7 @@ function Mt({ field: e, filter: t, editor: n, showAdvancedOperators: r }) {
|
|
|
1832
1832
|
"aria-disabled": s || void 0,
|
|
1833
1833
|
"aria-busy": s,
|
|
1834
1834
|
onClick: () => void c(m.value),
|
|
1835
|
-
children: /* @__PURE__ */ (0, $.jsx)(
|
|
1835
|
+
children: /* @__PURE__ */ (0, $.jsx)(w, { name: p.icon })
|
|
1836
1836
|
}),
|
|
1837
1837
|
g ?? /* @__PURE__ */ (0, $.jsx)("span", {
|
|
1838
1838
|
className: "astrato-app-filter-bar__mode-label",
|
|
@@ -1841,7 +1841,7 @@ function Mt({ field: e, filter: t, editor: n, showAdvancedOperators: r }) {
|
|
|
1841
1841
|
/* @__PURE__ */ (0, $.jsxs)("label", {
|
|
1842
1842
|
className: "astrato-app-filter-bar__exclude",
|
|
1843
1843
|
"data-active": d,
|
|
1844
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
1844
|
+
children: [/* @__PURE__ */ (0, $.jsx)(A, {
|
|
1845
1845
|
type: "checkbox",
|
|
1846
1846
|
checked: d,
|
|
1847
1847
|
disabled: a || o && i === "list",
|
|
@@ -1858,7 +1858,7 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
1858
1858
|
children: [
|
|
1859
1859
|
/* @__PURE__ */ (0, $.jsxs)("label", {
|
|
1860
1860
|
className: "astrato-app-filter-bar__label",
|
|
1861
|
-
children: ["Date mode", /* @__PURE__ */ (0, $.jsxs)(
|
|
1861
|
+
children: ["Date mode", /* @__PURE__ */ (0, $.jsxs)(D, {
|
|
1862
1862
|
className: "astrato-app-filter-bar__control",
|
|
1863
1863
|
value: wt(e),
|
|
1864
1864
|
disabled: t,
|
|
@@ -1893,7 +1893,7 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
1893
1893
|
}),
|
|
1894
1894
|
e.dynamicDateCalcRange && /* @__PURE__ */ (0, $.jsxs)("label", {
|
|
1895
1895
|
className: "astrato-app-filter-bar__label",
|
|
1896
|
-
children: ["Period", /* @__PURE__ */ (0, $.jsx)(
|
|
1896
|
+
children: ["Period", /* @__PURE__ */ (0, $.jsx)(D, {
|
|
1897
1897
|
className: "astrato-app-filter-bar__control",
|
|
1898
1898
|
value: e.dynamicDateCalcRange.type,
|
|
1899
1899
|
disabled: t,
|
|
@@ -1909,7 +1909,7 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
1909
1909
|
}),
|
|
1910
1910
|
e.dynamicDateCalc && /* @__PURE__ */ (0, $.jsxs)("label", {
|
|
1911
1911
|
className: "astrato-app-filter-bar__label",
|
|
1912
|
-
children: ["Dynamic date", /* @__PURE__ */ (0, $.jsx)(
|
|
1912
|
+
children: ["Dynamic date", /* @__PURE__ */ (0, $.jsx)(D, {
|
|
1913
1913
|
className: "astrato-app-filter-bar__control",
|
|
1914
1914
|
value: e.dynamicDateCalc.type,
|
|
1915
1915
|
disabled: t,
|
|
@@ -1927,7 +1927,7 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
1927
1927
|
className: "astrato-app-filter-bar__row",
|
|
1928
1928
|
children: [/* @__PURE__ */ (0, $.jsxs)("label", {
|
|
1929
1929
|
className: "astrato-app-filter-bar__label",
|
|
1930
|
-
children: ["Offset", /* @__PURE__ */ (0, $.jsx)(
|
|
1930
|
+
children: ["Offset", /* @__PURE__ */ (0, $.jsx)(A, {
|
|
1931
1931
|
className: "astrato-app-filter-bar__control",
|
|
1932
1932
|
type: "number",
|
|
1933
1933
|
value: e.dynamicDate.offset,
|
|
@@ -1942,7 +1942,7 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
1942
1942
|
})]
|
|
1943
1943
|
}), /* @__PURE__ */ (0, $.jsxs)("label", {
|
|
1944
1944
|
className: "astrato-app-filter-bar__label",
|
|
1945
|
-
children: ["Unit", /* @__PURE__ */ (0, $.jsx)(
|
|
1945
|
+
children: ["Unit", /* @__PURE__ */ (0, $.jsx)(D, {
|
|
1946
1946
|
className: "astrato-app-filter-bar__control",
|
|
1947
1947
|
value: e.dynamicDate.part,
|
|
1948
1948
|
disabled: t,
|
|
@@ -1974,7 +1974,7 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
1974
1974
|
children: [
|
|
1975
1975
|
/* @__PURE__ */ (0, $.jsxs)("label", {
|
|
1976
1976
|
className: "astrato-app-filter-bar__label",
|
|
1977
|
-
children: ["Start offset", /* @__PURE__ */ (0, $.jsx)(
|
|
1977
|
+
children: ["Start offset", /* @__PURE__ */ (0, $.jsx)(A, {
|
|
1978
1978
|
className: "astrato-app-filter-bar__control",
|
|
1979
1979
|
type: "number",
|
|
1980
1980
|
value: e.dynamicDateRange.offsetBegin,
|
|
@@ -1990,7 +1990,7 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
1990
1990
|
}),
|
|
1991
1991
|
/* @__PURE__ */ (0, $.jsxs)("label", {
|
|
1992
1992
|
className: "astrato-app-filter-bar__label",
|
|
1993
|
-
children: ["End offset", /* @__PURE__ */ (0, $.jsx)(
|
|
1993
|
+
children: ["End offset", /* @__PURE__ */ (0, $.jsx)(A, {
|
|
1994
1994
|
className: "astrato-app-filter-bar__control",
|
|
1995
1995
|
type: "number",
|
|
1996
1996
|
value: e.dynamicDateRange.offsetEnd,
|
|
@@ -2006,7 +2006,7 @@ function Nt({ filter: e, disabledControls: t, update: n }) {
|
|
|
2006
2006
|
}),
|
|
2007
2007
|
/* @__PURE__ */ (0, $.jsxs)("label", {
|
|
2008
2008
|
className: "astrato-app-filter-bar__label",
|
|
2009
|
-
children: ["Unit", /* @__PURE__ */ (0, $.jsx)(
|
|
2009
|
+
children: ["Unit", /* @__PURE__ */ (0, $.jsx)(D, {
|
|
2010
2010
|
className: "astrato-app-filter-bar__control",
|
|
2011
2011
|
value: e.dynamicDateRange.part,
|
|
2012
2012
|
disabled: t,
|
|
@@ -2043,19 +2043,19 @@ function Pt(e) {
|
|
|
2043
2043
|
className: "astrato-app-filter-bar__values",
|
|
2044
2044
|
children: [r === "date" && /* @__PURE__ */ (0, $.jsx)(Nt, { ...e }), !n.dynamicDateCalcRange && !n.dynamicDateRange && !n.dynamicDate && !n.dynamicDateCalc && /* @__PURE__ */ (0, $.jsx)("div", {
|
|
2045
2045
|
className: "astrato-app-filter-bar__row astrato-app-filter-bar__range-inputs",
|
|
2046
|
-
children: ([
|
|
2046
|
+
children: ([G.FilterOperator.Equals, G.FilterOperator.NotEquals].includes(n.operator) ? [0] : [0, 1]).map((e) => /* @__PURE__ */ (0, $.jsxs)("label", {
|
|
2047
2047
|
className: "astrato-app-filter-bar__label",
|
|
2048
|
-
children: [[
|
|
2048
|
+
children: [[G.FilterOperator.Equals, G.FilterOperator.NotEquals].includes(n.operator) ? "Date" : e === 0 ? "From" : "To", /* @__PURE__ */ (0, $.jsx)(A, {
|
|
2049
2049
|
className: "astrato-app-filter-bar__control",
|
|
2050
2050
|
type: r === "date" ? Ct(t.dataType) : "number",
|
|
2051
|
-
step: r === "date" && t.dataType !==
|
|
2051
|
+
step: r === "date" && t.dataType !== G.FieldType.DATE ? "0.001" : void 0,
|
|
2052
2052
|
value: r === "date" ? mt(s[e], t.dataType, i) : String(s[e] ?? ""),
|
|
2053
2053
|
disabled: a,
|
|
2054
2054
|
onChange: (a) => {
|
|
2055
2055
|
let c = [s[0] ?? null, s[1] ?? null];
|
|
2056
2056
|
c[e] = r === "date" ? ht(a.currentTarget.value, t.dataType, i) : a.currentTarget.value === "" ? null : Number(a.currentTarget.value), o({
|
|
2057
2057
|
...X(n),
|
|
2058
|
-
values: ft(c, [
|
|
2058
|
+
values: ft(c, [G.FilterOperator.Equals, G.FilterOperator.NotEquals].includes(n.operator))
|
|
2059
2059
|
});
|
|
2060
2060
|
}
|
|
2061
2061
|
})]
|
|
@@ -2067,7 +2067,7 @@ function Ft({ field: e, filter: t, timeZone: n, disabledControls: r, update: i }
|
|
|
2067
2067
|
let a = Z(t);
|
|
2068
2068
|
return /* @__PURE__ */ (0, $.jsxs)("label", {
|
|
2069
2069
|
className: "astrato-app-filter-bar__label",
|
|
2070
|
-
children: ["Value", e.dataType ===
|
|
2070
|
+
children: ["Value", e.dataType === G.FieldType.BOOLEAN ? /* @__PURE__ */ (0, $.jsxs)(D, {
|
|
2071
2071
|
className: "astrato-app-filter-bar__control",
|
|
2072
2072
|
value: a[0] == null ? "" : String(a[0]),
|
|
2073
2073
|
disabled: r,
|
|
@@ -2089,10 +2089,10 @@ function Ft({ field: e, filter: t, timeZone: n, disabledControls: r, update: i }
|
|
|
2089
2089
|
children: "False"
|
|
2090
2090
|
})
|
|
2091
2091
|
]
|
|
2092
|
-
}) : /* @__PURE__ */ (0, $.jsx)(
|
|
2092
|
+
}) : /* @__PURE__ */ (0, $.jsx)(A, {
|
|
2093
2093
|
className: "astrato-app-filter-bar__control",
|
|
2094
2094
|
type: Y(e.dataType) ? Ct(e.dataType) : _t(e.dataType) ? "number" : "text",
|
|
2095
|
-
step: Y(e.dataType) && e.dataType !==
|
|
2095
|
+
step: Y(e.dataType) && e.dataType !== G.FieldType.DATE ? "0.001" : void 0,
|
|
2096
2096
|
value: Y(e.dataType) ? mt(a[0], e.dataType, n) : String(a[0] ?? ""),
|
|
2097
2097
|
disabled: r,
|
|
2098
2098
|
onChange: (r) => i({
|
|
@@ -2102,30 +2102,30 @@ function Ft({ field: e, filter: t, timeZone: n, disabledControls: r, update: i }
|
|
|
2102
2102
|
})]
|
|
2103
2103
|
});
|
|
2104
2104
|
}
|
|
2105
|
-
function It({ field: e, filter: t, editor:
|
|
2106
|
-
let a = (0,
|
|
2105
|
+
function It({ field: e, filter: t, editor: n, showAdvancedOperators: i }) {
|
|
2106
|
+
let a = (0, W.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: x, loadMoreError: S, canLoadMore: C, loadMore: T, valueListRef: E, nextPageRef: D } = u, ee = /* @__PURE__ */ (0, $.jsx)(jt, {
|
|
2107
2107
|
field: e,
|
|
2108
2108
|
filter: t,
|
|
2109
|
-
editor:
|
|
2110
|
-
}),
|
|
2109
|
+
editor: n
|
|
2110
|
+
}), te = (e) => {
|
|
2111
2111
|
let n = Z(t), r = Q(e), i = s.has(r) ? n.filter((e) => Q(e) !== r) : [...n, e];
|
|
2112
2112
|
o(bt(t, c ? [e] : i));
|
|
2113
|
-
},
|
|
2113
|
+
}, k = () => {
|
|
2114
2114
|
let e = new Set(d.map(Q)), n = Z(t).filter((t) => !e.has(Q(t)));
|
|
2115
2115
|
o(bt(t, [...n, ...d]));
|
|
2116
|
-
},
|
|
2116
|
+
}, j = () => {
|
|
2117
2117
|
let e = new Set(d.map(Q));
|
|
2118
2118
|
o(bt(t, Z(t).filter((t) => !e.has(Q(t)))));
|
|
2119
|
-
},
|
|
2119
|
+
}, M = () => {
|
|
2120
2120
|
let e = new Set(d.map(Q)), n = Z(t).filter((t) => !e.has(Q(t)));
|
|
2121
2121
|
n.push(...d.filter((e) => !s.has(Q(e)))), o(bt(t, n));
|
|
2122
|
-
},
|
|
2122
|
+
}, N = () => o(bt(t, f)), P = Z(t), F = m ? d : [...new Map([...d, ...P].map((e) => [Q(e), e])).values()], I = new Set([...f, ...p].map(Q));
|
|
2123
2123
|
return /* @__PURE__ */ (0, $.jsxs)("div", {
|
|
2124
2124
|
className: "astrato-app-filter-bar__list-editor",
|
|
2125
2125
|
children: [
|
|
2126
2126
|
i && /* @__PURE__ */ (0, $.jsx)("div", {
|
|
2127
2127
|
className: "astrato-app-filter-bar__search-row",
|
|
2128
|
-
children:
|
|
2128
|
+
children: ee
|
|
2129
2129
|
}),
|
|
2130
2130
|
/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
2131
2131
|
className: "astrato-app-filter-bar__selection-toolbar",
|
|
@@ -2133,121 +2133,121 @@ function It({ field: e, filter: t, editor: r, showAdvancedOperators: i }) {
|
|
|
2133
2133
|
/* @__PURE__ */ (0, $.jsxs)("span", {
|
|
2134
2134
|
className: "astrato-app-filter-bar__muted",
|
|
2135
2135
|
role: "status",
|
|
2136
|
-
children: [
|
|
2136
|
+
children: [P.length, " selected"]
|
|
2137
2137
|
}),
|
|
2138
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
2138
|
+
/* @__PURE__ */ (0, $.jsx)(O, {
|
|
2139
2139
|
"data-variant": "ghost",
|
|
2140
2140
|
"data-icon-only": "true",
|
|
2141
2141
|
disabled: l,
|
|
2142
|
-
"aria-label":
|
|
2143
|
-
title:
|
|
2144
|
-
onClick:
|
|
2145
|
-
children: /* @__PURE__ */ (0, $.jsx)(
|
|
2142
|
+
"aria-label": v === r.Asc ? "Sort descending" : "Sort ascending",
|
|
2143
|
+
title: v === r.Asc ? "Sorted ascending. Switch to descending." : "Sorted descending. Switch to ascending.",
|
|
2144
|
+
onClick: y,
|
|
2145
|
+
children: /* @__PURE__ */ (0, $.jsx)(w, { name: v === r.Asc ? "sortAsc" : "sortDesc" })
|
|
2146
2146
|
}),
|
|
2147
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
2147
|
+
/* @__PURE__ */ (0, $.jsx)(O, {
|
|
2148
2148
|
"data-variant": "ghost",
|
|
2149
2149
|
"aria-label": "Select loaded values",
|
|
2150
2150
|
title: "Select all values currently loaded in this list",
|
|
2151
|
-
disabled: l || c ||
|
|
2152
|
-
onClick:
|
|
2151
|
+
disabled: l || c || b || !d.length,
|
|
2152
|
+
onClick: k,
|
|
2153
2153
|
children: "Select all"
|
|
2154
2154
|
}),
|
|
2155
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
2155
|
+
/* @__PURE__ */ (0, $.jsx)(ne, { actions: [
|
|
2156
2156
|
{
|
|
2157
2157
|
label: "Deselect loaded values",
|
|
2158
|
-
onSelect:
|
|
2159
|
-
disabled: l || c ||
|
|
2158
|
+
onSelect: j,
|
|
2159
|
+
disabled: l || c || b || !d.length
|
|
2160
2160
|
},
|
|
2161
2161
|
{
|
|
2162
2162
|
label: "Invert loaded selection",
|
|
2163
|
-
onSelect:
|
|
2164
|
-
disabled: l || c ||
|
|
2163
|
+
onSelect: M,
|
|
2164
|
+
disabled: l || c || b || !d.length
|
|
2165
2165
|
},
|
|
2166
2166
|
{
|
|
2167
2167
|
label: "Select loaded available values",
|
|
2168
|
-
onSelect:
|
|
2169
|
-
disabled: l || c ||
|
|
2168
|
+
onSelect: N,
|
|
2169
|
+
disabled: l || c || b || !f.length
|
|
2170
2170
|
},
|
|
2171
2171
|
{
|
|
2172
2172
|
label: "Clear values",
|
|
2173
2173
|
onSelect: () => o(bt(t, [])),
|
|
2174
|
-
disabled: l || c || !
|
|
2174
|
+
disabled: l || c || !P.length
|
|
2175
2175
|
}
|
|
2176
2176
|
] })
|
|
2177
2177
|
]
|
|
2178
2178
|
}),
|
|
2179
2179
|
h && /* @__PURE__ */ (0, $.jsxs)("label", {
|
|
2180
2180
|
className: "astrato-app-filter-bar__availability",
|
|
2181
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
2181
|
+
children: [/* @__PURE__ */ (0, $.jsx)(A, {
|
|
2182
2182
|
type: "checkbox",
|
|
2183
2183
|
checked: g,
|
|
2184
|
-
disabled: l ||
|
|
2185
|
-
onChange: (e) =>
|
|
2184
|
+
disabled: l || b,
|
|
2185
|
+
onChange: (e) => _(e.currentTarget.checked)
|
|
2186
2186
|
}), "Include unavailable values"]
|
|
2187
2187
|
}),
|
|
2188
2188
|
/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
2189
2189
|
className: "astrato-app-filter-bar__value-viewport",
|
|
2190
|
-
"data-loading":
|
|
2190
|
+
"data-loading": b,
|
|
2191
2191
|
children: [/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
2192
2192
|
className: "astrato-app-filter-bar__value-list",
|
|
2193
|
-
ref:
|
|
2194
|
-
"aria-busy":
|
|
2193
|
+
ref: E,
|
|
2194
|
+
"aria-busy": b,
|
|
2195
2195
|
children: [
|
|
2196
|
-
|
|
2196
|
+
F.map((e) => {
|
|
2197
2197
|
let t = Q(e);
|
|
2198
2198
|
return /* @__PURE__ */ (0, $.jsxs)("label", {
|
|
2199
2199
|
className: "astrato-app-filter-bar__value",
|
|
2200
2200
|
"data-selected": s.has(t),
|
|
2201
|
-
"data-excluded": h && !
|
|
2202
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
2201
|
+
"data-excluded": h && !I.has(t),
|
|
2202
|
+
children: [/* @__PURE__ */ (0, $.jsx)(A, {
|
|
2203
2203
|
type: c ? "radio" : "checkbox",
|
|
2204
2204
|
name: c ? a : void 0,
|
|
2205
2205
|
checked: s.has(t),
|
|
2206
|
-
disabled: l ||
|
|
2207
|
-
onChange: () =>
|
|
2206
|
+
disabled: l || b,
|
|
2207
|
+
onChange: () => te(e)
|
|
2208
2208
|
}), /* @__PURE__ */ (0, $.jsx)("span", { children: e == null ? "Null" : typeof e == "object" ? "value" in e ? String(e.value) : JSON.stringify(e) : String(e) })]
|
|
2209
2209
|
}, t);
|
|
2210
2210
|
}),
|
|
2211
|
-
!
|
|
2211
|
+
!F.length && !b && /* @__PURE__ */ (0, $.jsx)("div", {
|
|
2212
2212
|
className: "astrato-app-filter-bar__empty",
|
|
2213
2213
|
children: "No matching values"
|
|
2214
2214
|
}),
|
|
2215
2215
|
C && /* @__PURE__ */ (0, $.jsxs)("div", {
|
|
2216
2216
|
className: "astrato-app-filter-bar__next-page",
|
|
2217
|
-
ref:
|
|
2218
|
-
children: [
|
|
2217
|
+
ref: D,
|
|
2218
|
+
children: [x && /* @__PURE__ */ (0, $.jsx)(re, { label: "Loading more values" }), S && /* @__PURE__ */ (0, $.jsxs)($.Fragment, { children: [/* @__PURE__ */ (0, $.jsx)("span", {
|
|
2219
2219
|
role: "alert",
|
|
2220
2220
|
className: "astrato-app-filter-bar__error",
|
|
2221
2221
|
children: S
|
|
2222
|
-
}), /* @__PURE__ */ (0, $.jsx)(
|
|
2222
|
+
}), /* @__PURE__ */ (0, $.jsx)(O, {
|
|
2223
2223
|
"data-variant": "ghost",
|
|
2224
2224
|
disabled: l,
|
|
2225
|
-
onClick: () => void
|
|
2225
|
+
onClick: () => void T(),
|
|
2226
2226
|
children: "Retry loading values"
|
|
2227
2227
|
})] })]
|
|
2228
2228
|
})
|
|
2229
2229
|
]
|
|
2230
|
-
}),
|
|
2230
|
+
}), b && /* @__PURE__ */ (0, $.jsx)(re, { label: "Loading values" })]
|
|
2231
2231
|
})
|
|
2232
2232
|
]
|
|
2233
2233
|
});
|
|
2234
2234
|
}
|
|
2235
2235
|
var Lt = (e, t) => {
|
|
2236
|
-
let n = e.getSelection(), r = Bt(e, n, t), i = n.applied.find(
|
|
2236
|
+
let n = e.getSelection(), r = Bt(e, n, t), i = n.applied.find(We), a = i ? q(i) : void 0;
|
|
2237
2237
|
return {
|
|
2238
2238
|
connectedFilters: r,
|
|
2239
2239
|
associativeListFilter: i && a && (a === t || e.areFieldsConnected(t, a)) ? i.associativeListFilter : void 0
|
|
2240
2240
|
};
|
|
2241
|
-
}, Rt = async (e, t,
|
|
2241
|
+
}, Rt = async (e, t, n, i) => {
|
|
2242
2242
|
let a = qt(Kt(i));
|
|
2243
2243
|
if (!a.length) return [];
|
|
2244
|
-
let { connectedFilters: o, associativeListFilter: s } = Lt(e, t.key), c = Ht(t.key, 0, a.length,
|
|
2244
|
+
let { connectedFilters: o, associativeListFilter: s } = Lt(e, t.key), c = Ht(t.key, 0, a.length, r.Asc, [...o, {
|
|
2245
2245
|
fieldKey: t.key,
|
|
2246
|
-
...
|
|
2247
|
-
...
|
|
2248
|
-
operator:
|
|
2246
|
+
...n.dateLevel ? { dateLevel: n.dateLevel } : {},
|
|
2247
|
+
...n.datePart ? { datePart: n.datePart } : {},
|
|
2248
|
+
operator: G.FilterOperator.InList,
|
|
2249
2249
|
values: a
|
|
2250
|
-
}],
|
|
2250
|
+
}], n.dateLevel, n.datePart, s);
|
|
2251
2251
|
return Gt((await e.query(c)).data);
|
|
2252
2252
|
}, zt = async (e, t, n, r) => {
|
|
2253
2253
|
let { searchQuery: i = null, sortDirection: a, offset: o, limit: s } = r, c = r.availableOffset ?? 0, { connectedFilters: l, associativeListFilter: u } = Lt(e, t.key), d = l.length > 0 || !!u, f = i ? [Ut(t, i)] : [], p = Ht(t.key, o, s, a, f, n.dateLevel, n.datePart), m = Gt((await e.query(p)).data), h = [], g = [], _ = !1;
|
|
@@ -2289,85 +2289,85 @@ var Lt = (e, t) => {
|
|
|
2289
2289
|
let n = t.split(" ").filter((e) => e !== ""), r = Wt(e.dataType) ? n.map(Number).filter((e) => Number.isFinite(e)) : n;
|
|
2290
2290
|
if (r.length > 0) return {
|
|
2291
2291
|
fieldKey: e.key,
|
|
2292
|
-
operator:
|
|
2292
|
+
operator: G.FilterOperator.InList,
|
|
2293
2293
|
values: r
|
|
2294
2294
|
};
|
|
2295
2295
|
}
|
|
2296
2296
|
return {
|
|
2297
2297
|
fieldKey: e.key,
|
|
2298
|
-
operator:
|
|
2298
|
+
operator: G.FilterOperator.Like,
|
|
2299
2299
|
values: [t.toLocaleLowerCase()]
|
|
2300
2300
|
};
|
|
2301
2301
|
}, Wt = (e) => [
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2302
|
+
G.FieldType.DECIMAL,
|
|
2303
|
+
G.FieldType.FLOAT,
|
|
2304
|
+
G.FieldType.INT,
|
|
2305
|
+
G.FieldType.REAL
|
|
2306
2306
|
].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:
|
|
2308
|
-
let [s, c] = (0,
|
|
2307
|
+
function Yt({ field: e, filter: t, services: n, editorMode: i, disabledControls: a, onError: o }) {
|
|
2308
|
+
let [s, c] = (0, W.useState)(""), [l, u] = (0, W.useState)(""), [d, f] = (0, W.useState)([]), [p, m] = (0, W.useState)([]), [h, g] = (0, W.useState)([]), [_, v] = (0, W.useState)(!1), [y, b] = (0, W.useState)(!1), [x, S] = (0, W.useState)(!1), [C, w] = (0, W.useState)(!1), [T, E] = (0, W.useState)(0), [D, O] = (0, W.useState)(!0), [ee, te] = (0, W.useState)(!1), [ne, re] = (0, W.useState)(null), [k, A] = (0, W.useState)(r.Asc), [, j] = (0, W.useState)(0), [M, N] = (0, W.useState)(null), P = (0, W.useRef)(/* @__PURE__ */ new Map()), F = (0, W.useRef)(0), I = (0, W.useRef)(null), ie = (0, W.useRef)(null), ae = (0, W.useRef)(null), L = (0, W.useRef)({
|
|
2309
2309
|
field: e,
|
|
2310
2310
|
filter: t,
|
|
2311
2311
|
searchQuery: l,
|
|
2312
|
-
sortDirection:
|
|
2313
|
-
showAllValues:
|
|
2312
|
+
sortDirection: k,
|
|
2313
|
+
showAllValues: C
|
|
2314
2314
|
});
|
|
2315
|
-
|
|
2315
|
+
L.current = {
|
|
2316
2316
|
field: e,
|
|
2317
2317
|
filter: t,
|
|
2318
2318
|
searchQuery: l,
|
|
2319
|
-
sortDirection:
|
|
2320
|
-
showAllValues:
|
|
2319
|
+
sortDirection: k,
|
|
2320
|
+
showAllValues: C
|
|
2321
2321
|
};
|
|
2322
|
-
let
|
|
2322
|
+
let R = JSON.stringify([
|
|
2323
2323
|
e.key,
|
|
2324
2324
|
e.dataType,
|
|
2325
2325
|
t.dateLevel,
|
|
2326
2326
|
t.datePart,
|
|
2327
2327
|
l,
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
Lt(
|
|
2331
|
-
]),
|
|
2332
|
-
(0,
|
|
2328
|
+
k,
|
|
2329
|
+
C,
|
|
2330
|
+
Lt(n, e.key)
|
|
2331
|
+
]), oe = JSON.stringify(Z(t)), z = D || s !== l, B = x && !C ? y : _;
|
|
2332
|
+
(0, W.useEffect)(() => {
|
|
2333
2333
|
let e = setTimeout(() => u(s), 300);
|
|
2334
2334
|
return () => clearTimeout(e);
|
|
2335
|
-
}, [s]), (0,
|
|
2335
|
+
}, [s]), (0, W.useEffect)(() => n.subscribe(() => j((e) => e + 1)), [n]), (0, W.useEffect)(() => {
|
|
2336
2336
|
if (i !== "list") return;
|
|
2337
|
-
let { field: e, filter: t, searchQuery:
|
|
2338
|
-
return
|
|
2339
|
-
searchQuery:
|
|
2337
|
+
let { field: e, filter: t, searchQuery: r, sortDirection: a, showAllValues: s } = L.current, c = ++F.current;
|
|
2338
|
+
return I.current = null, O(!0), te(!1), re(null), o(null), N(null), P.current.clear(), zt(n, e, t, {
|
|
2339
|
+
searchQuery: r,
|
|
2340
2340
|
sortDirection: a,
|
|
2341
2341
|
offset: 0,
|
|
2342
2342
|
availableOffset: 0,
|
|
2343
2343
|
limit: 100
|
|
2344
2344
|
}).then((e) => {
|
|
2345
|
-
if (
|
|
2346
|
-
let
|
|
2347
|
-
f([...new Map([...i, ...
|
|
2345
|
+
if (F.current !== c) return;
|
|
2346
|
+
let n = e.hasConnectedFilters && !s ? [...e.availableValues, ...e.selectedExcluded] : e.values, i = r ? [] : Z(t);
|
|
2347
|
+
f([...new Map([...i, ...n].map((e) => [Q(e), e])).values()]), m(e.availableValues);
|
|
2348
2348
|
let a = new Set(e.selectedExcluded.map(Q)), o = Z(t).filter((e) => !a.has(Q(e)));
|
|
2349
|
-
g(o), e.availableValues.forEach((e) =>
|
|
2349
|
+
g(o), e.availableValues.forEach((e) => P.current.set(Q(e), !0)), Z(t).forEach((e) => P.current.set(Q(e), !a.has(Q(e)))), v(e.hasMore), b(e.hasMoreAvailable), S(e.hasConnectedFilters), E(e.values.length), N(R), ie.current && (ie.current.scrollTop = 0);
|
|
2350
2350
|
}).catch((e) => {
|
|
2351
|
-
|
|
2351
|
+
F.current === c && o(e instanceof Error ? e.message : "Could not load filter values.");
|
|
2352
2352
|
}).finally(() => {
|
|
2353
|
-
|
|
2353
|
+
F.current === c && O(!1);
|
|
2354
2354
|
}), () => {
|
|
2355
|
-
|
|
2355
|
+
F.current++, I.current = null;
|
|
2356
2356
|
};
|
|
2357
2357
|
}, [
|
|
2358
2358
|
i,
|
|
2359
|
-
|
|
2360
|
-
|
|
2359
|
+
n,
|
|
2360
|
+
R,
|
|
2361
2361
|
o
|
|
2362
|
-
]), (0,
|
|
2363
|
-
if (i !== "list" ||
|
|
2364
|
-
let { field: e, filter: t } =
|
|
2365
|
-
if (!
|
|
2362
|
+
]), (0, W.useEffect)(() => {
|
|
2363
|
+
if (i !== "list" || M !== R || !x) return;
|
|
2364
|
+
let { field: e, filter: t } = L.current, r = Z(t).filter((e) => !P.current.has(Q(e)));
|
|
2365
|
+
if (!r.length) return;
|
|
2366
2366
|
let a = !0;
|
|
2367
|
-
return Rt(
|
|
2367
|
+
return Rt(n, e, t, r).then((e) => {
|
|
2368
2368
|
if (!a) return;
|
|
2369
2369
|
let t = new Set(e.map(Q));
|
|
2370
|
-
|
|
2370
|
+
r.forEach((e) => P.current.set(Q(e), t.has(Q(e)))), g((t) => [...new Map([...t, ...e].map((e) => [Q(e), e])).values()]);
|
|
2371
2371
|
}).catch((e) => {
|
|
2372
2372
|
a && o(e instanceof Error ? e.message : "Could not check selected value availability.");
|
|
2373
2373
|
}), () => {
|
|
@@ -2375,67 +2375,67 @@ function Yt({ field: e, filter: t, services: r, editorMode: i, disabledControls:
|
|
|
2375
2375
|
};
|
|
2376
2376
|
}, [
|
|
2377
2377
|
i,
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2378
|
+
n,
|
|
2379
|
+
R,
|
|
2380
|
+
M,
|
|
2381
2381
|
x,
|
|
2382
|
-
|
|
2382
|
+
oe,
|
|
2383
2383
|
o
|
|
2384
2384
|
]);
|
|
2385
|
-
let
|
|
2386
|
-
if (i !== "list" || a ||
|
|
2387
|
-
let
|
|
2388
|
-
|
|
2385
|
+
let V = (0, W.useCallback)(async () => {
|
|
2386
|
+
if (i !== "list" || a || z || !B || M !== R || I.current !== null) return;
|
|
2387
|
+
let r = ++F.current;
|
|
2388
|
+
I.current = r, te(!0), re(null);
|
|
2389
2389
|
try {
|
|
2390
|
-
let i = await zt(
|
|
2390
|
+
let i = await zt(n, e, t, {
|
|
2391
2391
|
searchQuery: l,
|
|
2392
|
-
sortDirection:
|
|
2393
|
-
offset:
|
|
2392
|
+
sortDirection: k,
|
|
2393
|
+
offset: T,
|
|
2394
2394
|
availableOffset: p.length,
|
|
2395
2395
|
limit: 100
|
|
2396
2396
|
});
|
|
2397
|
-
if (
|
|
2397
|
+
if (F.current !== r) return;
|
|
2398
2398
|
f((e) => {
|
|
2399
|
-
let t = i.hasConnectedFilters && !
|
|
2399
|
+
let t = i.hasConnectedFilters && !C ? i.availableValues : i.values;
|
|
2400
2400
|
return [...e, ...t.filter((t) => !e.some((e) => Q(e) === Q(t)))];
|
|
2401
|
-
}), m((e) => [...e, ...i.availableValues.filter((t) => !e.some((e) => Q(e) === Q(t)))]), i.availableValues.forEach((e) =>
|
|
2401
|
+
}), m((e) => [...e, ...i.availableValues.filter((t) => !e.some((e) => Q(e) === Q(t)))]), i.availableValues.forEach((e) => P.current.set(Q(e), !0)), v(i.hasMore), b(i.hasMoreAvailable), E((e) => e + i.values.length);
|
|
2402
2402
|
} catch (e) {
|
|
2403
|
-
if (
|
|
2404
|
-
|
|
2403
|
+
if (F.current !== r) return;
|
|
2404
|
+
re(e instanceof Error ? e.message : "Could not load more filter values.");
|
|
2405
2405
|
} finally {
|
|
2406
|
-
|
|
2406
|
+
I.current === r && (I.current = null, te(!1));
|
|
2407
2407
|
}
|
|
2408
2408
|
}, [
|
|
2409
2409
|
i,
|
|
2410
2410
|
a,
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2411
|
+
z,
|
|
2412
|
+
B,
|
|
2413
|
+
M,
|
|
2414
|
+
R,
|
|
2415
|
+
n,
|
|
2416
2416
|
e,
|
|
2417
2417
|
t,
|
|
2418
2418
|
l,
|
|
2419
|
-
|
|
2420
|
-
|
|
2419
|
+
k,
|
|
2420
|
+
T,
|
|
2421
2421
|
p.length,
|
|
2422
|
-
|
|
2422
|
+
C
|
|
2423
2423
|
]);
|
|
2424
|
-
return (0,
|
|
2425
|
-
let e =
|
|
2426
|
-
if (!e || !t || !
|
|
2424
|
+
return (0, W.useEffect)(() => {
|
|
2425
|
+
let e = ie.current, t = ae.current;
|
|
2426
|
+
if (!e || !t || !B || ne || z) return;
|
|
2427
2427
|
let n = new IntersectionObserver((e) => {
|
|
2428
|
-
e.some((e) => e.isIntersecting) &&
|
|
2428
|
+
e.some((e) => e.isIntersecting) && V();
|
|
2429
2429
|
}, {
|
|
2430
2430
|
root: e,
|
|
2431
2431
|
rootMargin: "0px 0px 120px 0px"
|
|
2432
2432
|
});
|
|
2433
2433
|
return n.observe(t), () => n.disconnect();
|
|
2434
2434
|
}, [
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2435
|
+
B,
|
|
2436
|
+
ne,
|
|
2437
|
+
z,
|
|
2438
|
+
V
|
|
2439
2439
|
]), {
|
|
2440
2440
|
searchInput: s,
|
|
2441
2441
|
searchQuery: l,
|
|
@@ -2447,21 +2447,21 @@ function Yt({ field: e, filter: t, services: r, editorMode: i, disabledControls:
|
|
|
2447
2447
|
availableValues: p,
|
|
2448
2448
|
availableSelectedValues: h,
|
|
2449
2449
|
hasConnectedFilters: x,
|
|
2450
|
-
showAllValues:
|
|
2451
|
-
setShowAllValues:
|
|
2452
|
-
sortDirection:
|
|
2453
|
-
toggleSortDirection: () =>
|
|
2454
|
-
isRefreshingValues:
|
|
2455
|
-
isLoadingMore:
|
|
2456
|
-
loadMoreError:
|
|
2457
|
-
canLoadMore:
|
|
2458
|
-
loadMore:
|
|
2459
|
-
valueListRef:
|
|
2460
|
-
nextPageRef:
|
|
2450
|
+
showAllValues: C,
|
|
2451
|
+
setShowAllValues: w,
|
|
2452
|
+
sortDirection: k,
|
|
2453
|
+
toggleSortDirection: () => A((e) => e === r.Asc ? r.Desc : r.Asc),
|
|
2454
|
+
isRefreshingValues: z,
|
|
2455
|
+
isLoadingMore: ee,
|
|
2456
|
+
loadMoreError: ne,
|
|
2457
|
+
canLoadMore: B,
|
|
2458
|
+
loadMore: V,
|
|
2459
|
+
valueListRef: ie,
|
|
2460
|
+
nextPageRef: ae
|
|
2461
2461
|
};
|
|
2462
2462
|
}
|
|
2463
2463
|
function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 }) {
|
|
2464
|
-
let [a, o] = (0,
|
|
2464
|
+
let [a, o] = (0, W.useState)(null), [s, c] = (0, W.useState)(!1), l = (0, W.useRef)(0), u = vt(e.dataType, t), d = n.getTimeZone() ?? "UTC", f = i || n.isLocked(e.key), p = (0, W.useMemo)(() => new Set(Z(t).map(Q)), [t.values]), m = n.isSingleSelect(e.key), h = Yt({
|
|
2465
2465
|
field: e,
|
|
2466
2466
|
filter: t,
|
|
2467
2467
|
services: n,
|
|
@@ -2469,9 +2469,9 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2469
2469
|
disabledControls: f,
|
|
2470
2470
|
onError: o
|
|
2471
2471
|
});
|
|
2472
|
-
(0,
|
|
2472
|
+
(0, W.useEffect)(() => {
|
|
2473
2473
|
l.current++;
|
|
2474
|
-
}, [e.key, t]), (0,
|
|
2474
|
+
}, [e.key, t]), (0, W.useEffect)(() => () => {
|
|
2475
2475
|
l.current++;
|
|
2476
2476
|
}, []);
|
|
2477
2477
|
let g = (e) => {
|
|
@@ -2480,11 +2480,11 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2480
2480
|
let a = ++l.current;
|
|
2481
2481
|
o(null);
|
|
2482
2482
|
let s = Z(t), c = i ?? t.operator, f = [
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2483
|
+
G.FilterOperator.NotInList,
|
|
2484
|
+
G.FilterOperator.NotLike,
|
|
2485
|
+
G.FilterOperator.NotBetween,
|
|
2486
|
+
G.FilterOperator.NotEquals,
|
|
2487
|
+
G.FilterOperator.NotContains
|
|
2488
2488
|
].includes(c);
|
|
2489
2489
|
if (r === "list") {
|
|
2490
2490
|
if (t.dynamicDate || t.dynamicDateCalc) {
|
|
@@ -2506,7 +2506,7 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2506
2506
|
}
|
|
2507
2507
|
g({
|
|
2508
2508
|
...X(t),
|
|
2509
|
-
operator:
|
|
2509
|
+
operator: G.FilterOperator.InList,
|
|
2510
2510
|
values: i
|
|
2511
2511
|
});
|
|
2512
2512
|
} catch (e) {
|
|
@@ -2522,7 +2522,7 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2522
2522
|
filters: [{
|
|
2523
2523
|
...t,
|
|
2524
2524
|
fieldKey: e.key,
|
|
2525
|
-
operator:
|
|
2525
|
+
operator: G.FilterOperator.Between
|
|
2526
2526
|
}],
|
|
2527
2527
|
limit: 501
|
|
2528
2528
|
});
|
|
@@ -2534,7 +2534,7 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2534
2534
|
}
|
|
2535
2535
|
h.resetSearch(), g({
|
|
2536
2536
|
...X(t),
|
|
2537
|
-
operator: f ?
|
|
2537
|
+
operator: f ? G.FilterOperator.NotInList : G.FilterOperator.InList,
|
|
2538
2538
|
values: i
|
|
2539
2539
|
});
|
|
2540
2540
|
} catch (e) {
|
|
@@ -2547,7 +2547,7 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2547
2547
|
if (!String(s[0] ?? "").trim()) {
|
|
2548
2548
|
g({
|
|
2549
2549
|
...X(t),
|
|
2550
|
-
operator: f ?
|
|
2550
|
+
operator: f ? G.FilterOperator.NotInList : G.FilterOperator.InList,
|
|
2551
2551
|
values: []
|
|
2552
2552
|
});
|
|
2553
2553
|
return;
|
|
@@ -2562,7 +2562,7 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2562
2562
|
}
|
|
2563
2563
|
g({
|
|
2564
2564
|
...X(t),
|
|
2565
|
-
operator: f ?
|
|
2565
|
+
operator: f ? G.FilterOperator.NotInList : G.FilterOperator.InList,
|
|
2566
2566
|
values: i
|
|
2567
2567
|
});
|
|
2568
2568
|
} catch (e) {
|
|
@@ -2570,11 +2570,11 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2570
2570
|
}
|
|
2571
2571
|
return;
|
|
2572
2572
|
}
|
|
2573
|
-
if ([
|
|
2573
|
+
if ([G.FilterOperator.Between, G.FilterOperator.NotBetween].includes(t.operator)) {
|
|
2574
2574
|
try {
|
|
2575
2575
|
let r = {
|
|
2576
2576
|
...t,
|
|
2577
|
-
operator:
|
|
2577
|
+
operator: G.FilterOperator.Between,
|
|
2578
2578
|
fieldKey: e.key
|
|
2579
2579
|
}, i = await n.query({
|
|
2580
2580
|
dimensions: [{ fieldKey: e.key }],
|
|
@@ -2590,7 +2590,7 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2590
2590
|
}
|
|
2591
2591
|
g({
|
|
2592
2592
|
...X(t),
|
|
2593
|
-
operator: f ?
|
|
2593
|
+
operator: f ? G.FilterOperator.NotInList : G.FilterOperator.InList,
|
|
2594
2594
|
values: s
|
|
2595
2595
|
});
|
|
2596
2596
|
} catch (e) {
|
|
@@ -2600,7 +2600,7 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2600
2600
|
}
|
|
2601
2601
|
g({
|
|
2602
2602
|
...X(t),
|
|
2603
|
-
operator: i ?? (f ?
|
|
2603
|
+
operator: i ?? (f ? G.FilterOperator.NotInList : G.FilterOperator.InList),
|
|
2604
2604
|
values: s
|
|
2605
2605
|
});
|
|
2606
2606
|
return;
|
|
@@ -2609,7 +2609,7 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2609
2609
|
let e = s[0], n = h.searchInput || (e == null ? "" : String(e));
|
|
2610
2610
|
h.resetSearch(), g({
|
|
2611
2611
|
...X(t),
|
|
2612
|
-
operator: i ?? (f ?
|
|
2612
|
+
operator: i ?? (f ? G.FilterOperator.NotLike : G.FilterOperator.Like),
|
|
2613
2613
|
values: [n]
|
|
2614
2614
|
});
|
|
2615
2615
|
return;
|
|
@@ -2617,7 +2617,7 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2617
2617
|
if (r === "null") {
|
|
2618
2618
|
g({
|
|
2619
2619
|
...X(t),
|
|
2620
|
-
operator: i ??
|
|
2620
|
+
operator: i ?? G.FilterOperator.Set,
|
|
2621
2621
|
values: null
|
|
2622
2622
|
});
|
|
2623
2623
|
return;
|
|
@@ -2625,7 +2625,7 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2625
2625
|
if (r === "geo") {
|
|
2626
2626
|
g({
|
|
2627
2627
|
...X(t),
|
|
2628
|
-
operator:
|
|
2628
|
+
operator: G.FilterOperator.GeoIntersect,
|
|
2629
2629
|
values: [null]
|
|
2630
2630
|
});
|
|
2631
2631
|
return;
|
|
@@ -2633,13 +2633,13 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2633
2633
|
if (r === "scalar") {
|
|
2634
2634
|
g({
|
|
2635
2635
|
...X(t),
|
|
2636
|
-
operator: i ??
|
|
2636
|
+
operator: i ?? G.FilterOperator.Equals,
|
|
2637
2637
|
values: [s[0] ?? null]
|
|
2638
2638
|
});
|
|
2639
2639
|
return;
|
|
2640
2640
|
}
|
|
2641
2641
|
if (r === "range" || r === "date") {
|
|
2642
|
-
let r = i ?? (f ?
|
|
2642
|
+
let r = i ?? (f ? G.FilterOperator.NotBetween : G.FilterOperator.Between), c = [];
|
|
2643
2643
|
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
2644
|
let t = await n.query({
|
|
2645
2645
|
dimensions: [],
|
|
@@ -2690,21 +2690,21 @@ function Xt({ field: e, filter: t, services: n, onChange: r, disabled: i = !1 })
|
|
|
2690
2690
|
},
|
|
2691
2691
|
changeExclude: (e) => {
|
|
2692
2692
|
let n = t.operator;
|
|
2693
|
-
u === "list" ? n = e ?
|
|
2693
|
+
u === "list" ? n = e ? G.FilterOperator.NotInList : G.FilterOperator.InList : u === "text" ? n = [G.FilterOperator.Contains, G.FilterOperator.NotContains].includes(t.operator) ? e ? G.FilterOperator.NotContains : G.FilterOperator.Contains : e ? G.FilterOperator.NotLike : G.FilterOperator.Like : u === "scalar" ? n = e ? G.FilterOperator.NotEquals : G.FilterOperator.Equals : (u === "range" || u === "date") && (n = u === "date" && [G.FilterOperator.Equals, G.FilterOperator.NotEquals].includes(t.operator) ? e ? G.FilterOperator.NotEquals : G.FilterOperator.Equals : e ? G.FilterOperator.NotBetween : G.FilterOperator.Between), g({
|
|
2694
2694
|
...t,
|
|
2695
2695
|
operator: n
|
|
2696
2696
|
});
|
|
2697
2697
|
},
|
|
2698
2698
|
changeOperator: (n) => {
|
|
2699
|
-
[
|
|
2699
|
+
[G.FilterOperator.Set, G.FilterOperator.NotSet].includes(n) ? _("null", n) : n === G.FilterOperator.GeoIntersect ? _("geo", n) : [G.FilterOperator.InList, G.FilterOperator.NotInList].includes(n) ? _("list", n) : [G.FilterOperator.Between, G.FilterOperator.NotBetween].includes(n) ? Y(e.dataType) && (t.dynamicDateRange || t.dynamicDateCalcRange) ? g({
|
|
2700
2700
|
...t,
|
|
2701
2701
|
operator: n
|
|
2702
2702
|
}) : _(Y(e.dataType) ? "date" : "range", n) : [
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
].includes(n) ? _("text", n) : [
|
|
2703
|
+
G.FilterOperator.Like,
|
|
2704
|
+
G.FilterOperator.NotLike,
|
|
2705
|
+
G.FilterOperator.Contains,
|
|
2706
|
+
G.FilterOperator.NotContains
|
|
2707
|
+
].includes(n) ? _("text", n) : [G.FilterOperator.Equals, G.FilterOperator.NotEquals].includes(n) && Y(e.dataType) ? t.dynamicDate || t.dynamicDateCalc ? g({
|
|
2708
2708
|
...t,
|
|
2709
2709
|
operator: n,
|
|
2710
2710
|
values: []
|
|
@@ -2770,13 +2770,13 @@ function Zt({ showAdvancedOperators: e = !1, ...t }) {
|
|
|
2770
2770
|
]
|
|
2771
2771
|
});
|
|
2772
2772
|
}
|
|
2773
|
-
var Qt = (e) => !!e && typeof e == "object" && "fieldKey" in e && "operator" in e, $t = (e) => !!e.fieldKey &&
|
|
2773
|
+
var Qt = (e) => !!e && typeof e == "object" && "fieldKey" in e && "operator" in e, $t = (e) => !!e.fieldKey && Ze(e), en = (e) => {
|
|
2774
2774
|
let t = e.filters ?? [], n = t.filter(Qt), r = e.filterGroups ?? [];
|
|
2775
2775
|
return [...t, ...r].length > 0 && t.length === n.length && n.every($t) && r.every(en);
|
|
2776
2776
|
}, tn = (e = []) => ({
|
|
2777
2777
|
filters: [e[0] ? dt(e[0]) : {
|
|
2778
2778
|
fieldKey: "",
|
|
2779
|
-
operator:
|
|
2779
|
+
operator: G.FilterOperator.InList,
|
|
2780
2780
|
values: []
|
|
2781
2781
|
}],
|
|
2782
2782
|
filterGroups: [],
|
|
@@ -2798,7 +2798,7 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2798
2798
|
...e,
|
|
2799
2799
|
filters: [...e.filters ?? [], t[0] ? dt(t[0]) : {
|
|
2800
2800
|
fieldKey: "",
|
|
2801
|
-
operator:
|
|
2801
|
+
operator: G.FilterOperator.InList,
|
|
2802
2802
|
values: []
|
|
2803
2803
|
}]
|
|
2804
2804
|
}));
|
|
@@ -2822,7 +2822,7 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2822
2822
|
children: [
|
|
2823
2823
|
/* @__PURE__ */ (0, $.jsxs)("label", {
|
|
2824
2824
|
className: "astrato-app-filter-bar__label",
|
|
2825
|
-
children: ["Match", /* @__PURE__ */ (0, $.jsxs)(
|
|
2825
|
+
children: ["Match", /* @__PURE__ */ (0, $.jsxs)(D, {
|
|
2826
2826
|
className: "astrato-app-filter-bar__control",
|
|
2827
2827
|
value: e.or ? "or" : "and",
|
|
2828
2828
|
disabled: i,
|
|
@@ -2839,12 +2839,12 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2839
2839
|
})]
|
|
2840
2840
|
})]
|
|
2841
2841
|
}),
|
|
2842
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
2842
|
+
/* @__PURE__ */ (0, $.jsx)(O, {
|
|
2843
2843
|
disabled: i,
|
|
2844
2844
|
onClick: c,
|
|
2845
2845
|
children: "Add condition"
|
|
2846
2846
|
}),
|
|
2847
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
2847
|
+
/* @__PURE__ */ (0, $.jsx)(O, {
|
|
2848
2848
|
disabled: i,
|
|
2849
2849
|
onClick: l,
|
|
2850
2850
|
children: "Add nested group"
|
|
@@ -2859,7 +2859,7 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2859
2859
|
className: "astrato-app-filter-bar__row",
|
|
2860
2860
|
children: [/* @__PURE__ */ (0, $.jsxs)("label", {
|
|
2861
2861
|
className: "astrato-app-filter-bar__label",
|
|
2862
|
-
children: ["Field", /* @__PURE__ */ (0, $.jsxs)(
|
|
2862
|
+
children: ["Field", /* @__PURE__ */ (0, $.jsxs)(D, {
|
|
2863
2863
|
className: "astrato-app-filter-bar__control",
|
|
2864
2864
|
value: e.fieldKey,
|
|
2865
2865
|
disabled: i || !t.length,
|
|
@@ -2875,7 +2875,7 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2875
2875
|
children: e.name
|
|
2876
2876
|
}, e.key))]
|
|
2877
2877
|
})]
|
|
2878
|
-
}), /* @__PURE__ */ (0, $.jsx)(
|
|
2878
|
+
}), /* @__PURE__ */ (0, $.jsx)(O, {
|
|
2879
2879
|
disabled: i,
|
|
2880
2880
|
"aria-label": "Remove condition",
|
|
2881
2881
|
onClick: () => s(r),
|
|
@@ -2898,7 +2898,7 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2898
2898
|
children: [/* @__PURE__ */ (0, $.jsx)("span", {
|
|
2899
2899
|
className: "astrato-app-filter-bar__muted",
|
|
2900
2900
|
children: "Nested group"
|
|
2901
|
-
}), /* @__PURE__ */ (0, $.jsx)(
|
|
2901
|
+
}), /* @__PURE__ */ (0, $.jsx)(O, {
|
|
2902
2902
|
disabled: i,
|
|
2903
2903
|
"aria-label": "Remove nested group",
|
|
2904
2904
|
onClick: () => u(r),
|
|
@@ -2919,8 +2919,8 @@ function rn({ group: e, fields: t, services: n, onChange: r, disabled: i }) {
|
|
|
2919
2919
|
});
|
|
2920
2920
|
}
|
|
2921
2921
|
function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, disabled: a = !1 }) {
|
|
2922
|
-
let [o, s] = (0,
|
|
2923
|
-
(0,
|
|
2922
|
+
let [o, s] = (0, W.useState)(e), [c, l] = (0, W.useState)([]), [u, d] = (0, W.useState)(null), f = n.find((e) => e.key === o.fieldKey), p = o.associativeListFilter;
|
|
2923
|
+
(0, W.useEffect)(() => s(e), [e]), (0, W.useEffect)(() => {
|
|
2924
2924
|
let e = !0;
|
|
2925
2925
|
return l([]), o.fieldKey ? (d(null), r.getAssociatedViews(o.fieldKey).then((t) => {
|
|
2926
2926
|
e && l(t);
|
|
@@ -2932,7 +2932,7 @@ function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, d
|
|
|
2932
2932
|
e = !1;
|
|
2933
2933
|
};
|
|
2934
2934
|
}, [o.fieldKey, r]);
|
|
2935
|
-
let m = (0,
|
|
2935
|
+
let m = (0, W.useMemo)(() => t.filter((e) => c.includes(e.view ?? "")), [t, c]), h = (e, t) => s((n) => ({
|
|
2936
2936
|
...n,
|
|
2937
2937
|
associativeListFilter: {
|
|
2938
2938
|
...n.associativeListFilter,
|
|
@@ -2966,7 +2966,7 @@ function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, d
|
|
|
2966
2966
|
...p,
|
|
2967
2967
|
view: f?.view ?? p.view
|
|
2968
2968
|
}
|
|
2969
|
-
}), x = !!(p.intersectFilters?.length || p.unionFilters?.length),
|
|
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, $.jsxs)("section", {
|
|
2970
2970
|
className: "astrato-app-filter-bar__association-list",
|
|
2971
2971
|
"aria-label": t,
|
|
2972
2972
|
children: [/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
@@ -2974,7 +2974,7 @@ function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, d
|
|
|
2974
2974
|
children: [/* @__PURE__ */ (0, $.jsx)("h4", {
|
|
2975
2975
|
className: "astrato-app-filter-bar__field",
|
|
2976
2976
|
children: t
|
|
2977
|
-
}), /* @__PURE__ */ (0, $.jsxs)(
|
|
2977
|
+
}), /* @__PURE__ */ (0, $.jsxs)(O, {
|
|
2978
2978
|
disabled: a || !m.length,
|
|
2979
2979
|
onClick: () => _(e),
|
|
2980
2980
|
children: ["Add ", e === "intersectFilters" ? "intersection" : "union"]
|
|
@@ -3000,12 +3000,12 @@ function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, d
|
|
|
3000
3000
|
}
|
|
3001
3001
|
}), "Exclude this association"]
|
|
3002
3002
|
}),
|
|
3003
|
-
/* @__PURE__ */ (0, $.jsxs)(
|
|
3003
|
+
/* @__PURE__ */ (0, $.jsxs)(O, {
|
|
3004
3004
|
disabled: a,
|
|
3005
3005
|
onClick: () => v(e, n),
|
|
3006
3006
|
children: ["Move to ", e === "intersectFilters" ? "union" : "intersection"]
|
|
3007
3007
|
}),
|
|
3008
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
3008
|
+
/* @__PURE__ */ (0, $.jsx)(O, {
|
|
3009
3009
|
disabled: a,
|
|
3010
3010
|
onClick: () => y(e, n),
|
|
3011
3011
|
children: "Remove"
|
|
@@ -3028,7 +3028,7 @@ function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, d
|
|
|
3028
3028
|
className: "astrato-app-filter-bar__fieldset",
|
|
3029
3029
|
children: [/* @__PURE__ */ (0, $.jsxs)("label", {
|
|
3030
3030
|
className: "astrato-app-filter-bar__label",
|
|
3031
|
-
children: ["Associate from field", /* @__PURE__ */ (0, $.jsxs)(
|
|
3031
|
+
children: ["Associate from field", /* @__PURE__ */ (0, $.jsxs)(D, {
|
|
3032
3032
|
className: "astrato-app-filter-bar__control",
|
|
3033
3033
|
value: o.fieldKey,
|
|
3034
3034
|
disabled: a || x,
|
|
@@ -3065,17 +3065,17 @@ function an({ filter: e, fields: t, targetFields: n, services: r, onChange: i, d
|
|
|
3065
3065
|
className: "astrato-app-filter-bar__muted",
|
|
3066
3066
|
children: "This field has no associated views."
|
|
3067
3067
|
}),
|
|
3068
|
-
|
|
3069
|
-
|
|
3068
|
+
w("intersectFilters", "Intersections"),
|
|
3069
|
+
w("unionFilters", "Unions"),
|
|
3070
3070
|
/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
3071
3071
|
className: "astrato-app-filter-bar__toolbar",
|
|
3072
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
3072
|
+
children: [/* @__PURE__ */ (0, $.jsx)(O, {
|
|
3073
3073
|
disabled: a,
|
|
3074
3074
|
onClick: () => s(e),
|
|
3075
3075
|
children: "Cancel"
|
|
3076
|
-
}), /* @__PURE__ */ (0, $.jsx)(
|
|
3076
|
+
}), /* @__PURE__ */ (0, $.jsx)(O, {
|
|
3077
3077
|
"data-primary": "true",
|
|
3078
|
-
disabled: a || !
|
|
3078
|
+
disabled: a || !C,
|
|
3079
3079
|
onClick: b,
|
|
3080
3080
|
children: "Update filter"
|
|
3081
3081
|
})]
|
|
@@ -3103,8 +3103,8 @@ var on = (e, t, n, r) => {
|
|
|
3103
3103
|
};
|
|
3104
3104
|
};
|
|
3105
3105
|
function sn(e, t, n) {
|
|
3106
|
-
let r = (0,
|
|
3107
|
-
return i.current = n, (0,
|
|
3106
|
+
let r = (0, W.useRef)(null), i = (0, W.useRef)(n);
|
|
3107
|
+
return i.current = n, (0, W.useLayoutEffect)(() => {
|
|
3108
3108
|
let n = r.current;
|
|
3109
3109
|
if (!n) return;
|
|
3110
3110
|
let a = n.ownerDocument, o = a.defaultView;
|
|
@@ -3149,7 +3149,7 @@ function cn({ id: e, anchor: t, title: n, subtitle: r, icon: i, className: a = "
|
|
|
3149
3149
|
"aria-label": n,
|
|
3150
3150
|
className: `astrato-app-filter-bar__popover ${a}`,
|
|
3151
3151
|
onKeyDown: (e) => {
|
|
3152
|
-
|
|
3152
|
+
j(e), e.key === "Escape" && (e.preventDefault(), c());
|
|
3153
3153
|
},
|
|
3154
3154
|
children: [/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
3155
3155
|
className: "astrato-app-filter-bar__popover-header",
|
|
@@ -3157,7 +3157,7 @@ function cn({ id: e, anchor: t, title: n, subtitle: r, icon: i, className: a = "
|
|
|
3157
3157
|
/* @__PURE__ */ (0, $.jsx)("span", {
|
|
3158
3158
|
className: "astrato-app-filter-bar__heading-icon",
|
|
3159
3159
|
"aria-hidden": "true",
|
|
3160
|
-
children: i ?? /* @__PURE__ */ (0, $.jsx)(
|
|
3160
|
+
children: i ?? /* @__PURE__ */ (0, $.jsx)(w, { name: "filter" })
|
|
3161
3161
|
}),
|
|
3162
3162
|
/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
3163
3163
|
className: "astrato-app-filter-bar__heading",
|
|
@@ -3166,12 +3166,12 @@ function cn({ id: e, anchor: t, title: n, subtitle: r, icon: i, className: a = "
|
|
|
3166
3166
|
children: r
|
|
3167
3167
|
})]
|
|
3168
3168
|
}),
|
|
3169
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
3169
|
+
/* @__PURE__ */ (0, $.jsx)(O, {
|
|
3170
3170
|
"data-variant": "ghost",
|
|
3171
3171
|
"data-icon-only": "true",
|
|
3172
3172
|
"aria-label": "Close filter editor",
|
|
3173
3173
|
onClick: c,
|
|
3174
|
-
children: /* @__PURE__ */ (0, $.jsx)(
|
|
3174
|
+
children: /* @__PURE__ */ (0, $.jsx)(w, { name: "close" })
|
|
3175
3175
|
})
|
|
3176
3176
|
]
|
|
3177
3177
|
}), s]
|
|
@@ -3184,8 +3184,8 @@ var ln = (e, t, n, r) => {
|
|
|
3184
3184
|
return a;
|
|
3185
3185
|
}, 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
3186
|
function dn(e, t, n) {
|
|
3187
|
-
let r = (0,
|
|
3188
|
-
return (0,
|
|
3187
|
+
let r = (0, W.useRef)(null), [i, a] = (0, W.useState)(0);
|
|
3188
|
+
return (0, W.useLayoutEffect)(() => {
|
|
3189
3189
|
let t = r.current;
|
|
3190
3190
|
if (!t || !e) return;
|
|
3191
3191
|
let n = t.ownerDocument.defaultView;
|
|
@@ -3207,12 +3207,12 @@ function dn(e, t, n) {
|
|
|
3207
3207
|
};
|
|
3208
3208
|
}
|
|
3209
3209
|
function fn(e, t) {
|
|
3210
|
-
let n = (0,
|
|
3210
|
+
let n = (0, W.useRef)(null), [r, i] = (0, W.useState)({
|
|
3211
3211
|
width: 0,
|
|
3212
3212
|
buttonBreakpoint: 480,
|
|
3213
3213
|
collapseBreakpoint: 960
|
|
3214
3214
|
});
|
|
3215
|
-
return (0,
|
|
3215
|
+
return (0, W.useLayoutEffect)(() => {
|
|
3216
3216
|
let e = n.current, r = e?.ownerDocument.defaultView;
|
|
3217
3217
|
if (!e || !r || !t) return;
|
|
3218
3218
|
let a = () => {
|
|
@@ -3235,10 +3235,10 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3235
3235
|
let t = () => {
|
|
3236
3236
|
let t = e.engine;
|
|
3237
3237
|
if (!t) return [];
|
|
3238
|
-
let n =
|
|
3238
|
+
let n = m(null, t), r = new Map(n.filter(o).map((e) => [e.key, e])), a = /* @__PURE__ */ new Map();
|
|
3239
3239
|
for (let e of n) {
|
|
3240
|
-
if (
|
|
3241
|
-
|
|
3240
|
+
if (o(e)) {
|
|
3241
|
+
a.set(e.key, {
|
|
3242
3242
|
key: e.key,
|
|
3243
3243
|
name: e.name,
|
|
3244
3244
|
view: e.view,
|
|
@@ -3246,12 +3246,12 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3246
3246
|
});
|
|
3247
3247
|
continue;
|
|
3248
3248
|
}
|
|
3249
|
-
if (!
|
|
3249
|
+
if (!i(e) || !e.dimension?.fieldKey) continue;
|
|
3250
3250
|
let t = e.dimension.fieldKey, n = r.get(t);
|
|
3251
|
-
if (!
|
|
3252
|
-
let r = n?.dataType ??
|
|
3251
|
+
if (!a.has(t)) {
|
|
3252
|
+
let r = n?.dataType ?? s(e);
|
|
3253
3253
|
if (!r) continue;
|
|
3254
|
-
|
|
3254
|
+
a.set(t, {
|
|
3255
3255
|
key: t,
|
|
3256
3256
|
name: e.name,
|
|
3257
3257
|
view: n?.view ?? e.dimension.view,
|
|
@@ -3259,9 +3259,9 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3259
3259
|
});
|
|
3260
3260
|
}
|
|
3261
3261
|
}
|
|
3262
|
-
return [...
|
|
3262
|
+
return [...a.values()];
|
|
3263
3263
|
}, n = () => {
|
|
3264
|
-
let t = e.selection.getActiveSelection(
|
|
3264
|
+
let t = e.selection.getActiveSelection(G.FilterType.ALL);
|
|
3265
3265
|
if (typeof t != "object" || !t) return {
|
|
3266
3266
|
applied: [],
|
|
3267
3267
|
pending: []
|
|
@@ -3271,98 +3271,98 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3271
3271
|
applied: Array.isArray(n.applied) ? n.applied : [],
|
|
3272
3272
|
pending: Array.isArray(n.pending) ? n.pending : []
|
|
3273
3273
|
};
|
|
3274
|
-
}, r = () =>
|
|
3274
|
+
}, r = () => Ke(n()), a = (e) => {
|
|
3275
3275
|
let n = t().find((t) => t.key === e);
|
|
3276
3276
|
return n?.view ? {
|
|
3277
3277
|
name: n.name,
|
|
3278
3278
|
view: n.view,
|
|
3279
3279
|
fieldKey: e
|
|
3280
3280
|
} : void 0;
|
|
3281
|
-
},
|
|
3281
|
+
}, c = (e) => {
|
|
3282
3282
|
let n = t().find((t) => t.key === e);
|
|
3283
3283
|
return {
|
|
3284
3284
|
fieldKey: e,
|
|
3285
3285
|
name: n?.name ?? "",
|
|
3286
3286
|
view: n?.view ?? ""
|
|
3287
3287
|
};
|
|
3288
|
-
}, l = (t) => e.selection.isFieldLocked(
|
|
3288
|
+
}, l = (t) => e.selection.isFieldLocked(c(t)), u = (t) => e.selection.getSingleSelectedFields().some((e) => q(e) === t), d = (t, n) => {
|
|
3289
3289
|
e.selection.setNewSelectionState(t, n);
|
|
3290
|
-
}, f = /* @__PURE__ */ new Set(), p = [],
|
|
3290
|
+
}, f = /* @__PURE__ */ new Set(), p = [], h = /* @__PURE__ */ new Map(), g = () => f.forEach((e) => e()), _ = () => {
|
|
3291
3291
|
let n = t(), i = new Map(n.map((e) => [e.key, e])), a = r(), o = /* @__PURE__ */ new Set([
|
|
3292
3292
|
...n.map((e) => e.key),
|
|
3293
|
-
...a.applied.map((e) =>
|
|
3294
|
-
...a.pending.map((e) =>
|
|
3293
|
+
...a.applied.map((e) => q(e)).filter((e) => !!e),
|
|
3294
|
+
...a.pending.map((e) => q(e)).filter((e) => !!e)
|
|
3295
3295
|
]);
|
|
3296
3296
|
for (let t of o) {
|
|
3297
|
-
if (
|
|
3297
|
+
if (h.has(t)) continue;
|
|
3298
3298
|
let n = i.get(t), r = e.selection.isFieldLocked$({
|
|
3299
3299
|
fieldKey: t,
|
|
3300
3300
|
name: n?.name ?? "",
|
|
3301
3301
|
view: n?.view ?? ""
|
|
3302
|
-
}).subscribe(
|
|
3303
|
-
|
|
3302
|
+
}).subscribe(g);
|
|
3303
|
+
h.set(t, r);
|
|
3304
3304
|
}
|
|
3305
|
-
},
|
|
3306
|
-
p.forEach((e) => e.unsubscribe()), p = [],
|
|
3307
|
-
},
|
|
3305
|
+
}, v = () => {
|
|
3306
|
+
p.forEach((e) => e.unsubscribe()), p = [], h.forEach((e) => e.unsubscribe()), h.clear();
|
|
3307
|
+
}, y = (t) => {
|
|
3308
3308
|
let n = () => t();
|
|
3309
3309
|
if (f.add(n), f.size === 1) try {
|
|
3310
3310
|
p.push(e.selection.onActiveSelectionChange.subscribe(() => {
|
|
3311
|
-
|
|
3311
|
+
_(), g();
|
|
3312
3312
|
}));
|
|
3313
|
-
let t = e.selection.singleSelectFields$?.subscribe(
|
|
3313
|
+
let t = e.selection.singleSelectFields$?.subscribe(g);
|
|
3314
3314
|
t && p.push(t);
|
|
3315
|
-
let n = e.selection.lockedFields$?.subscribe(
|
|
3316
|
-
n && p.push(n), p.push(e.getEvents({ type: pn }).subscribe(
|
|
3315
|
+
let n = e.selection.lockedFields$?.subscribe(g);
|
|
3316
|
+
n && p.push(n), p.push(e.getEvents({ type: pn }).subscribe(g)), _();
|
|
3317
3317
|
} catch (e) {
|
|
3318
|
-
throw f.delete(n),
|
|
3318
|
+
throw f.delete(n), v(), e;
|
|
3319
3319
|
}
|
|
3320
3320
|
return () => {
|
|
3321
|
-
f.delete(n), f.size === 0 &&
|
|
3321
|
+
f.delete(n), f.size === 0 && v();
|
|
3322
3322
|
};
|
|
3323
3323
|
}, b = (e, t) => {
|
|
3324
|
-
let r =
|
|
3324
|
+
let r = q(e);
|
|
3325
3325
|
if (!r || l(r)) return;
|
|
3326
|
-
let i = t === "inherit" ?
|
|
3327
|
-
if (!
|
|
3326
|
+
let i = t === "inherit" ? C() : t, a = n(), o = Ke(a), s = J(e);
|
|
3327
|
+
if (!We(e) && !Ze(e) && u(r) && [...o.applied, ...o.pending].some((e) => J(e) === s && Ze(e))) return;
|
|
3328
3328
|
if (i === "auto") {
|
|
3329
|
-
if (!
|
|
3329
|
+
if (!Ze(e)) {
|
|
3330
3330
|
let e = {
|
|
3331
|
-
applied: a.applied.filter((e) =>
|
|
3332
|
-
pending: a.pending.filter((e) =>
|
|
3331
|
+
applied: a.applied.filter((e) => J(e) !== s),
|
|
3332
|
+
pending: a.pending.filter((e) => J(e) !== s)
|
|
3333
3333
|
};
|
|
3334
|
-
d(e,
|
|
3334
|
+
d(e, G.FilterType.ALL);
|
|
3335
3335
|
return;
|
|
3336
3336
|
}
|
|
3337
3337
|
let t = {
|
|
3338
|
-
applied: [...a.applied.filter((e) =>
|
|
3339
|
-
pending: a.pending.filter((e) =>
|
|
3338
|
+
applied: [...a.applied.filter((e) => J(e) !== s), e],
|
|
3339
|
+
pending: a.pending.filter((e) => J(e) !== s)
|
|
3340
3340
|
};
|
|
3341
|
-
d(t,
|
|
3341
|
+
d(t, G.FilterType.ALL);
|
|
3342
3342
|
return;
|
|
3343
3343
|
}
|
|
3344
3344
|
let c = {
|
|
3345
3345
|
applied: a.applied,
|
|
3346
|
-
pending: [...a.pending.filter((e) =>
|
|
3346
|
+
pending: [...a.pending.filter((e) => J(e) !== s), e]
|
|
3347
3347
|
};
|
|
3348
|
-
d(c,
|
|
3348
|
+
d(c, G.FilterType.ALL);
|
|
3349
3349
|
}, x = (e) => {
|
|
3350
|
-
let t =
|
|
3350
|
+
let t = q(e);
|
|
3351
3351
|
if (!t || l(t) || u(t)) return;
|
|
3352
|
-
let r =
|
|
3353
|
-
applied: i.applied.filter((e) =>
|
|
3354
|
-
pending: i.pending.filter((e) =>
|
|
3352
|
+
let r = Ge(e), i = n(), a = {
|
|
3353
|
+
applied: i.applied.filter((e) => Ge(e) !== r),
|
|
3354
|
+
pending: i.pending.filter((e) => Ge(e) !== r)
|
|
3355
3355
|
};
|
|
3356
|
-
d(a,
|
|
3357
|
-
},
|
|
3356
|
+
d(a, G.FilterType.ALL);
|
|
3357
|
+
}, S = () => {
|
|
3358
3358
|
let n = e.engine;
|
|
3359
3359
|
if (!n) return [];
|
|
3360
|
-
let r = t(),
|
|
3361
|
-
return
|
|
3362
|
-
if (!
|
|
3363
|
-
let t = e.dimension.group.fieldKeys.map((e) =>
|
|
3360
|
+
let r = t(), a = new Map(r.map((e) => [e.key, e])), o = n.getGroupedDimensions();
|
|
3361
|
+
return m(null, n).flatMap((e) => {
|
|
3362
|
+
if (!i(e) || !e.dimension?.group?.fieldKeys.length) return [];
|
|
3363
|
+
let t = e.dimension.group.fieldKeys.map((e) => a.get(e)).filter((e) => !!e);
|
|
3364
3364
|
if (t.length === 0) return [];
|
|
3365
|
-
let n =
|
|
3365
|
+
let n = o[e.id] ?? e.dimension.group.fieldKeys.indexOf(e.dimension.fieldKey), r = mn(e.dimension.group.fieldKeys, new Set(a.keys()), n), s = r >= 0 ? r : Math.max(0, t.findIndex((t) => t.key === e.dimension.fieldKey));
|
|
3366
3366
|
return [{
|
|
3367
3367
|
id: e.id,
|
|
3368
3368
|
name: e.name,
|
|
@@ -3370,13 +3370,13 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3370
3370
|
selectedIndex: s
|
|
3371
3371
|
}];
|
|
3372
3372
|
});
|
|
3373
|
-
},
|
|
3373
|
+
}, C = () => e.selection.getSelectionMode?.() === "manual" ? "manual" : "auto", w = () => {
|
|
3374
3374
|
try {
|
|
3375
3375
|
return e.engine?.capabilities?.associativeFiltering === !0;
|
|
3376
3376
|
} catch {
|
|
3377
3377
|
return !1;
|
|
3378
3378
|
}
|
|
3379
|
-
},
|
|
3379
|
+
}, T = async (t) => {
|
|
3380
3380
|
let n = e.engine;
|
|
3381
3381
|
if (!n) return [];
|
|
3382
3382
|
if (n.getAssociatedViews) return n.getAssociatedViews(t);
|
|
@@ -3390,7 +3390,7 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3390
3390
|
return {
|
|
3391
3391
|
getFields: t,
|
|
3392
3392
|
getSelection: r,
|
|
3393
|
-
subscribe:
|
|
3393
|
+
subscribe: y,
|
|
3394
3394
|
select: b,
|
|
3395
3395
|
remove: x,
|
|
3396
3396
|
apply: () => {
|
|
@@ -3405,48 +3405,48 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
3405
3405
|
d({
|
|
3406
3406
|
applied: e.applied,
|
|
3407
3407
|
pending: []
|
|
3408
|
-
},
|
|
3408
|
+
}, G.FilterType.ALL);
|
|
3409
3409
|
},
|
|
3410
3410
|
clear: () => e.selection.clearAllSelection(),
|
|
3411
3411
|
isLocked: l,
|
|
3412
|
-
isSingleSelect: (t) => e.selection.getSingleSelectedFields().some((e) =>
|
|
3412
|
+
isSingleSelect: (t) => e.selection.getSingleSelectedFields().some((e) => q(e) === t),
|
|
3413
3413
|
canLock: e.selection.canLock === !0,
|
|
3414
3414
|
toggleLock: (t) => {
|
|
3415
|
-
e.selection.toggleFieldLocked(
|
|
3415
|
+
e.selection.toggleFieldLocked(c(t));
|
|
3416
3416
|
},
|
|
3417
3417
|
query: async (t) => {
|
|
3418
3418
|
if (!e.engine) throw Error("Cannot query filter values without an engine");
|
|
3419
3419
|
return await e.engine.getData(t);
|
|
3420
3420
|
},
|
|
3421
3421
|
areFieldsConnected: (t, n) => {
|
|
3422
|
-
let r =
|
|
3423
|
-
return r &&
|
|
3422
|
+
let r = a(t), i = a(n);
|
|
3423
|
+
return r && i ? e.engine?.areFieldsConnected(r, i) ?? !1 : !1;
|
|
3424
3424
|
},
|
|
3425
3425
|
get supportsAssociativeFiltering() {
|
|
3426
|
-
return
|
|
3426
|
+
return w();
|
|
3427
3427
|
},
|
|
3428
3428
|
getAssociativeFields: async (e, t) => {
|
|
3429
|
-
if (!
|
|
3429
|
+
if (!w() || t.aborted) return [];
|
|
3430
3430
|
let n = e.filter((e) => e.view), r = new Set(n.map((e) => e.view)), i = /* @__PURE__ */ new Set(), a = 0;
|
|
3431
3431
|
return await Promise.all(Array.from({ length: Math.min(4, n.length) }, async () => {
|
|
3432
3432
|
for (; !t.aborted && a < n.length;) {
|
|
3433
3433
|
let e = n[a++];
|
|
3434
3434
|
try {
|
|
3435
|
-
(await
|
|
3435
|
+
(await T(e.key)).some((e) => r.has(e)) && i.add(e.key);
|
|
3436
3436
|
} catch {}
|
|
3437
3437
|
}
|
|
3438
|
-
})), t.aborted || !
|
|
3438
|
+
})), t.aborted || !w() ? [] : n.filter((e) => i.has(e.key));
|
|
3439
3439
|
},
|
|
3440
|
-
getAssociatedViews:
|
|
3441
|
-
getSelectionMode:
|
|
3440
|
+
getAssociatedViews: T,
|
|
3441
|
+
getSelectionMode: C,
|
|
3442
3442
|
getTimeZone: () => e.engine?.localeSettings?.timezone,
|
|
3443
|
-
getDimensionGroups:
|
|
3443
|
+
getDimensionGroups: S,
|
|
3444
3444
|
setDimensionGroup: (n, r) => {
|
|
3445
|
-
let
|
|
3446
|
-
if (!
|
|
3447
|
-
let
|
|
3445
|
+
let a = e.engine;
|
|
3446
|
+
if (!a || r < 0) return;
|
|
3447
|
+
let o = m(null, a).find((e) => i(e) && e.id === n && e.dimension?.group?.fieldKeys), s = o && i(o) ? o.dimension?.group?.fieldKeys : void 0, c = new Map(t().map((e) => [e.key, e])), l = s ? hn(s, new Set(c.keys()), r) : void 0;
|
|
3448
3448
|
l !== void 0 && e.emitEvent(pn, {
|
|
3449
|
-
...
|
|
3449
|
+
...a.getGroupedDimensions(),
|
|
3450
3450
|
[n]: l
|
|
3451
3451
|
});
|
|
3452
3452
|
}
|
|
@@ -4042,7 +4042,7 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
4042
4042
|
borderRadius: "50%",
|
|
4043
4043
|
background: "var(--afb-popup-surface, var(--afb-surface, #fff))",
|
|
4044
4044
|
boxShadow: "0 0 0 6px var(--afb-popup-surface, var(--afb-surface, #fff))",
|
|
4045
|
-
animation: `${
|
|
4045
|
+
animation: `${h({ to: { transform: "rotate(360deg)" } })} 750ms linear infinite`,
|
|
4046
4046
|
"@media (prefers-reduced-motion: reduce)": { animation: "none" }
|
|
4047
4047
|
},
|
|
4048
4048
|
"& .astrato-app-filter-bar__sr-only": {
|
|
@@ -4166,7 +4166,7 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
4166
4166
|
marginBlock: 8,
|
|
4167
4167
|
minWidth: 0
|
|
4168
4168
|
}
|
|
4169
|
-
}, Tn =
|
|
4169
|
+
}, Tn = y({
|
|
4170
4170
|
...vn,
|
|
4171
4171
|
...yn,
|
|
4172
4172
|
...bn,
|
|
@@ -4175,122 +4175,122 @@ var pn = "grouped-dimension-level-changed", mn = (e, t, n) => e.flatMap((e, n) =
|
|
|
4175
4175
|
...Cn,
|
|
4176
4176
|
...wn
|
|
4177
4177
|
}), En = /* @__PURE__ */ new Set([
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
]), Dn = (e, t) => [...e.pending, ...e.applied].find((e) =>
|
|
4178
|
+
G.FilterOperator.NotInList,
|
|
4179
|
+
G.FilterOperator.NotBetween,
|
|
4180
|
+
G.FilterOperator.NotLike,
|
|
4181
|
+
G.FilterOperator.NotEquals,
|
|
4182
|
+
G.FilterOperator.NotContains,
|
|
4183
|
+
G.FilterOperator.NotSet
|
|
4184
|
+
]), Dn = (e, t) => [...e.pending, ...e.applied].find((e) => J(e) === J(t));
|
|
4185
4185
|
function On() {
|
|
4186
4186
|
return /* @__PURE__ */ (0, $.jsx)(kn, {});
|
|
4187
4187
|
}
|
|
4188
4188
|
function kn({ isExpanded: e = !1 }) {
|
|
4189
|
-
let t =
|
|
4189
|
+
let t = u(), r = S()((e) => e.vSpec), i = C(), a = (0, W.useMemo)(() => gn(t), [t]), [o, s] = (0, W.useState)({
|
|
4190
4190
|
applied: [],
|
|
4191
4191
|
pending: []
|
|
4192
|
-
}), [c, l] = (0,
|
|
4193
|
-
|
|
4194
|
-
},
|
|
4192
|
+
}), [c, l] = (0, W.useState)(0), [d, f] = (0, W.useState)(), [m, h] = (0, W.useState)(), [g, _] = (0, W.useState)(), [v, y] = (0, W.useState)(), b = (0, W.useRef)(), [x, T] = (0, W.useState)(""), E = (0, W.useId)(), ne = (0, W.useId)(), [re, A] = (0, W.useState)(!1), j = r?.appFilterBarSettings ?? {}, M = () => {
|
|
4193
|
+
s(a.getSelection()), l((e) => e + 1);
|
|
4194
|
+
}, N = (e) => {
|
|
4195
4195
|
try {
|
|
4196
|
-
e(),
|
|
4196
|
+
e(), M(), f(void 0);
|
|
4197
4197
|
} catch (e) {
|
|
4198
|
-
|
|
4198
|
+
f(e instanceof Error ? e.message : "Could not update filters.");
|
|
4199
4199
|
}
|
|
4200
4200
|
};
|
|
4201
|
-
(0,
|
|
4201
|
+
(0, W.useEffect)(() => {
|
|
4202
4202
|
let e;
|
|
4203
4203
|
try {
|
|
4204
|
-
|
|
4204
|
+
M(), e = a.subscribe(M);
|
|
4205
4205
|
} catch (e) {
|
|
4206
|
-
|
|
4206
|
+
f(e instanceof Error ? e.message : "Could not connect to the selection service.");
|
|
4207
4207
|
}
|
|
4208
4208
|
return () => e?.();
|
|
4209
|
-
}, [
|
|
4210
|
-
!e &&
|
|
4209
|
+
}, [a]), (0, W.useEffect)(() => {
|
|
4210
|
+
!e && r?.type === n.AppFilterBar && i();
|
|
4211
4211
|
}, [
|
|
4212
|
-
n,
|
|
4213
4212
|
r,
|
|
4214
|
-
e
|
|
4215
|
-
]), (0, U.useEffect)(() => {
|
|
4216
|
-
if (!h) return;
|
|
4217
|
-
let e = Dn(a, h), t = JSON.stringify(e);
|
|
4218
|
-
t !== b.current && (b.current = t, e ? g(structuredClone(e)) : (g(void 0), p(void 0)));
|
|
4219
|
-
}, [a, h]);
|
|
4220
|
-
let j = (0, U.useMemo)(() => i.getFields(), [i, c]), M = (0, U.useMemo)(() => D.showChartBreakdown === !0 ? i.getDimensionGroups().filter((e) => e.fields.length > 1) : [], [
|
|
4221
4213
|
i,
|
|
4214
|
+
e
|
|
4215
|
+
]), (0, W.useEffect)(() => {
|
|
4216
|
+
if (!g) return;
|
|
4217
|
+
let e = Dn(o, g), t = JSON.stringify(e);
|
|
4218
|
+
t !== b.current && (b.current = t, e ? _(structuredClone(e)) : (_(void 0), h(void 0)));
|
|
4219
|
+
}, [o, g]);
|
|
4220
|
+
let P = (0, W.useMemo)(() => a.getFields(), [a, c]), F = (0, W.useMemo)(() => j.showChartBreakdown === !0 ? a.getDimensionGroups().filter((e) => e.fields.length > 1) : [], [
|
|
4221
|
+
a,
|
|
4222
4222
|
c,
|
|
4223
|
-
|
|
4224
|
-
]),
|
|
4225
|
-
(0,
|
|
4226
|
-
if (!
|
|
4223
|
+
j.showChartBreakdown
|
|
4224
|
+
]), I = (0, W.useMemo)(() => new Map(P.map((e) => [e.key, e])), [P]), ie = j.selectableFieldKeys?.length ? new Set(j.selectableFieldKeys) : void 0, ae = P.filter((e) => !ie || ie.has(e.key)), L = JSON.stringify(ae), R = a.supportsAssociativeFiltering, oe = j.enableAssociativeFilter !== !1 && R, z = m?.kind === "fields", B = R && v?.services === a && v.fieldMetadata === L ? v.fields : [];
|
|
4225
|
+
(0, W.useEffect)(() => {
|
|
4226
|
+
if (!z || !oe) return;
|
|
4227
4227
|
let e = new AbortController();
|
|
4228
4228
|
y(void 0);
|
|
4229
|
-
let t = JSON.parse(
|
|
4230
|
-
return
|
|
4229
|
+
let t = JSON.parse(L);
|
|
4230
|
+
return a.getAssociativeFields(t, e.signal).then((t) => {
|
|
4231
4231
|
e.signal.aborted || y({
|
|
4232
|
-
services:
|
|
4233
|
-
fieldMetadata:
|
|
4232
|
+
services: a,
|
|
4233
|
+
fieldMetadata: L,
|
|
4234
4234
|
fields: t
|
|
4235
4235
|
});
|
|
4236
4236
|
}), () => e.abort();
|
|
4237
4237
|
}, [
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4238
|
+
a,
|
|
4239
|
+
L,
|
|
4240
|
+
oe,
|
|
4241
|
+
z
|
|
4242
4242
|
]);
|
|
4243
|
-
let
|
|
4244
|
-
(0,
|
|
4245
|
-
|
|
4246
|
-
}, [
|
|
4247
|
-
let { chipsRef:
|
|
4248
|
-
|
|
4249
|
-
},
|
|
4250
|
-
|
|
4251
|
-
}),
|
|
4252
|
-
|
|
4253
|
-
}),
|
|
4243
|
+
let V = ae.filter((e) => `${e.name} ${e.view ?? ""}`.toLocaleLowerCase().includes(x.toLocaleLowerCase().trim())), H = Je(o), se = e ? "vertical" : j.orientation ?? "horizontal", { barRef: ce, overflow: le } = fn(!e && j.overflow === "button" ? "button" : se === "vertical" ? "wrap" : j.overflow ?? "wrap", !!r);
|
|
4244
|
+
(0, W.useEffect)(() => {
|
|
4245
|
+
le !== "button" && A(!1), h(void 0), _(void 0);
|
|
4246
|
+
}, [le]);
|
|
4247
|
+
let { chipsRef: ue, visibleCount: de } = dn(le === "collapse", JSON.stringify(H), H.length), fe = H.length - de, pe = H.slice(de).some((e) => e.pending), U = o.pending.length > 0, me = U && o.pending.every(Ze) && (!g || Ze(g)), he = o.applied.length > 0 || U, ge = () => {
|
|
4248
|
+
h(void 0), _(void 0), b.current = void 0;
|
|
4249
|
+
}, _e = () => N(() => {
|
|
4250
|
+
a.cancel(), ge();
|
|
4251
|
+
}), ve = () => N(() => {
|
|
4252
|
+
a.apply(), ge();
|
|
4253
|
+
}), ye = (e) => I.get(e.fieldKey) ?? {
|
|
4254
4254
|
key: e.fieldKey,
|
|
4255
4255
|
name: e.fieldKey,
|
|
4256
|
-
dataType:
|
|
4257
|
-
},
|
|
4258
|
-
b.current = JSON.stringify(Dn(
|
|
4256
|
+
dataType: G.FieldType.STRING
|
|
4257
|
+
}, be = (e, t, n = !1) => {
|
|
4258
|
+
b.current = JSON.stringify(Dn(o, e)), _(structuredClone(e)), h({
|
|
4259
4259
|
kind: "filter",
|
|
4260
4260
|
anchor: t,
|
|
4261
4261
|
fromOverflow: n
|
|
4262
4262
|
});
|
|
4263
|
+
}, xe = (e) => {
|
|
4264
|
+
if (!m) return;
|
|
4265
|
+
let t = o.pending.find((t) => t.fieldKey === e.key && !("associativeListFilter" in t)) ?? o.applied.find((t) => t.fieldKey === e.key && !("associativeListFilter" in t));
|
|
4266
|
+
be(t ?? dt(e), m.anchor);
|
|
4263
4267
|
}, Se = (e) => {
|
|
4264
|
-
|
|
4265
|
-
let t = a.
|
|
4266
|
-
|
|
4267
|
-
}, Ce = (e) => {
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
W.FieldType.TIME,
|
|
4275
|
-
W.FieldType.TIMESTAMP,
|
|
4276
|
-
W.FieldType.TIMESTAMP_TZ
|
|
4277
|
-
].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), p = f?.kind === "filter" && h && Ke(h) === r;
|
|
4268
|
+
_(e);
|
|
4269
|
+
let t = j.selectionMode ?? "inherit", n = t === "inherit" ? a.getSelectionMode() : t, r = !!Dn(a.getSelection(), e), i = "operator" in e && ([G.FilterOperator.InList, G.FilterOperator.NotInList].includes(e.operator) && !e.values?.length || [G.FilterOperator.Like, G.FilterOperator.NotLike].includes(e.operator) && !String(e.values?.[0] ?? "").trim());
|
|
4270
|
+
(Ze(e) || r && (n === "manual" || i)) && N(() => a.select(e, t)), b.current = JSON.stringify(Dn(a.getSelection(), e));
|
|
4271
|
+
}, Ce = (e, t, n = !1) => {
|
|
4272
|
+
let { id: r, filter: i, pending: o } = e, s = ye(i), c = a.isLocked(i.fieldKey), l = a.isSingleSelect(i.fieldKey), u = Qe(i, (e) => [
|
|
4273
|
+
G.FieldType.DATE,
|
|
4274
|
+
G.FieldType.TIME,
|
|
4275
|
+
G.FieldType.TIMESTAMP,
|
|
4276
|
+
G.FieldType.TIMESTAMP_TZ
|
|
4277
|
+
].includes(s.dataType) && "operator" in i && !i.datePart && (typeof e == "number" || typeof e == "string") ? mt(e, s.dataType, a.getTimeZone() ?? "UTC").replace("T", " ") || String(e) : e === null ? "Null" : String(e)), d = "operator" in i && En.has(i.operator), f = m?.kind === "filter" && g && Ge(g) === r;
|
|
4278
4278
|
return /* @__PURE__ */ (0, $.jsxs)("div", {
|
|
4279
4279
|
className: "astrato-app-filter-bar__chip",
|
|
4280
|
-
"data-overflow-hidden": !n && t >=
|
|
4281
|
-
"aria-hidden": !n && t >=
|
|
4280
|
+
"data-overflow-hidden": !n && t >= de,
|
|
4281
|
+
"aria-hidden": !n && t >= de || void 0,
|
|
4282
4282
|
"data-pending": !!o,
|
|
4283
4283
|
"data-excluded": d,
|
|
4284
4284
|
"data-locked": c,
|
|
4285
|
-
children: [/* @__PURE__ */ (0, $.jsxs)(
|
|
4285
|
+
children: [/* @__PURE__ */ (0, $.jsxs)(O, {
|
|
4286
4286
|
"aria-haspopup": "dialog",
|
|
4287
|
-
"aria-controls":
|
|
4288
|
-
"aria-expanded": !!
|
|
4287
|
+
"aria-controls": E,
|
|
4288
|
+
"aria-expanded": !!f,
|
|
4289
4289
|
"aria-label": `${d ? "Not " : ""}${s.name}: ${u.text || "Choose values"}${c ? ", locked" : ""}`,
|
|
4290
|
-
onClick: (e) =>
|
|
4290
|
+
onClick: (e) => be(i, n && m ? m.anchor : e.currentTarget, n),
|
|
4291
4291
|
title: `${s.name}: ${u.text}`,
|
|
4292
4292
|
children: [
|
|
4293
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
4293
|
+
/* @__PURE__ */ (0, $.jsx)(w, { name: "filter" }),
|
|
4294
4294
|
/* @__PURE__ */ (0, $.jsxs)("span", {
|
|
4295
4295
|
className: "astrato-app-filter-bar__chip-label",
|
|
4296
4296
|
children: [
|
|
@@ -4308,211 +4308,211 @@ function kn({ isExpanded: e = !1 }) {
|
|
|
4308
4308
|
}),
|
|
4309
4309
|
c && /* @__PURE__ */ (0, $.jsx)("span", {
|
|
4310
4310
|
"aria-label": "Locked",
|
|
4311
|
-
children: /* @__PURE__ */ (0, $.jsx)(
|
|
4311
|
+
children: /* @__PURE__ */ (0, $.jsx)(w, { name: "lock" })
|
|
4312
4312
|
})
|
|
4313
4313
|
]
|
|
4314
|
-
}), /* @__PURE__ */ (0, $.jsx)(
|
|
4314
|
+
}), /* @__PURE__ */ (0, $.jsx)(O, {
|
|
4315
4315
|
"data-icon-only": "true",
|
|
4316
4316
|
"aria-label": `Remove ${s.name} filter`,
|
|
4317
4317
|
disabled: c || l,
|
|
4318
4318
|
onClick: (e) => {
|
|
4319
4319
|
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
|
-
|
|
4320
|
+
N(() => {
|
|
4321
|
+
a.remove(i), f ? ge() : n?.focus();
|
|
4322
4322
|
});
|
|
4323
4323
|
},
|
|
4324
|
-
children: /* @__PURE__ */ (0, $.jsx)(
|
|
4324
|
+
children: /* @__PURE__ */ (0, $.jsx)(w, { name: "close" })
|
|
4325
4325
|
})]
|
|
4326
4326
|
}, r);
|
|
4327
4327
|
};
|
|
4328
|
-
return
|
|
4329
|
-
ref:
|
|
4330
|
-
className:
|
|
4328
|
+
return r ? le === "button" ? /* @__PURE__ */ (0, $.jsxs)("div", {
|
|
4329
|
+
ref: ce,
|
|
4330
|
+
className: p("astrato-app-filter-bar", Tn),
|
|
4331
4331
|
"data-overflow": "button",
|
|
4332
4332
|
role: "region",
|
|
4333
4333
|
"aria-label": "Filters",
|
|
4334
|
-
children: [/* @__PURE__ */ (0, $.jsxs)(
|
|
4334
|
+
children: [/* @__PURE__ */ (0, $.jsxs)(O, {
|
|
4335
4335
|
className: "astrato-app-filter-bar__overflow astrato-app-filter-bar__trigger",
|
|
4336
|
-
"data-pending":
|
|
4337
|
-
"aria-label": `Filters (${
|
|
4336
|
+
"data-pending": U,
|
|
4337
|
+
"aria-label": `Filters (${H.length})${U ? ", pending changes" : ""}`,
|
|
4338
4338
|
"aria-haspopup": "dialog",
|
|
4339
|
-
"aria-expanded":
|
|
4340
|
-
"aria-controls":
|
|
4341
|
-
onClick: () =>
|
|
4339
|
+
"aria-expanded": re,
|
|
4340
|
+
"aria-controls": ne,
|
|
4341
|
+
onClick: () => A(!0),
|
|
4342
4342
|
children: [
|
|
4343
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
4343
|
+
/* @__PURE__ */ (0, $.jsx)(w, { name: "filter" }),
|
|
4344
4344
|
" Filters (",
|
|
4345
|
-
|
|
4345
|
+
H.length,
|
|
4346
4346
|
")"
|
|
4347
4347
|
]
|
|
4348
|
-
}),
|
|
4349
|
-
id:
|
|
4348
|
+
}), re && /* @__PURE__ */ (0, $.jsxs)(ee, {
|
|
4349
|
+
id: ne,
|
|
4350
4350
|
className: "astrato-app-filter-bar__modal",
|
|
4351
|
-
"aria-labelledby": `${
|
|
4352
|
-
onCloseDialog: () =>
|
|
4351
|
+
"aria-labelledby": `${ne}-title`,
|
|
4352
|
+
onCloseDialog: () => A(!1),
|
|
4353
4353
|
children: [/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
4354
4354
|
className: "astrato-app-filter-bar__popover-header",
|
|
4355
4355
|
children: [/* @__PURE__ */ (0, $.jsxs)("strong", {
|
|
4356
|
-
id: `${
|
|
4356
|
+
id: `${ne}-title`,
|
|
4357
4357
|
children: [
|
|
4358
4358
|
"Filters (",
|
|
4359
|
-
|
|
4359
|
+
H.length,
|
|
4360
4360
|
")"
|
|
4361
4361
|
]
|
|
4362
|
-
}), /* @__PURE__ */ (0, $.jsx)(
|
|
4362
|
+
}), /* @__PURE__ */ (0, $.jsx)(O, {
|
|
4363
4363
|
"data-icon-only": "true",
|
|
4364
4364
|
"data-variant": "ghost",
|
|
4365
4365
|
"aria-label": "Close filters",
|
|
4366
|
-
onClick: () =>
|
|
4367
|
-
children: /* @__PURE__ */ (0, $.jsx)(
|
|
4366
|
+
onClick: () => A(!1),
|
|
4367
|
+
children: /* @__PURE__ */ (0, $.jsx)(w, { name: "close" })
|
|
4368
4368
|
})]
|
|
4369
4369
|
}), /* @__PURE__ */ (0, $.jsx)(kn, { isExpanded: !0 })]
|
|
4370
4370
|
})]
|
|
4371
4371
|
}) : /* @__PURE__ */ (0, $.jsxs)("div", {
|
|
4372
|
-
ref:
|
|
4373
|
-
className:
|
|
4372
|
+
ref: ce,
|
|
4373
|
+
className: p("astrato-app-filter-bar", Tn),
|
|
4374
4374
|
role: "region",
|
|
4375
4375
|
tabIndex: -1,
|
|
4376
4376
|
"aria-label": "Filters",
|
|
4377
|
-
"data-selection-mode":
|
|
4378
|
-
"data-overflow":
|
|
4379
|
-
"data-orientation":
|
|
4377
|
+
"data-selection-mode": j.selectionMode ?? "inherit",
|
|
4378
|
+
"data-overflow": le,
|
|
4379
|
+
"data-orientation": se,
|
|
4380
4380
|
children: [
|
|
4381
|
-
|
|
4382
|
-
"aria-expanded":
|
|
4383
|
-
"aria-controls":
|
|
4381
|
+
j.enableAddingNewFilters !== !1 && /* @__PURE__ */ (0, $.jsxs)(O, {
|
|
4382
|
+
"aria-expanded": m?.kind === "fields",
|
|
4383
|
+
"aria-controls": E,
|
|
4384
4384
|
"aria-haspopup": "dialog",
|
|
4385
4385
|
onClick: (e) => {
|
|
4386
|
-
|
|
4386
|
+
T(""), _(void 0), h({
|
|
4387
4387
|
kind: "fields",
|
|
4388
4388
|
anchor: e.currentTarget
|
|
4389
4389
|
});
|
|
4390
4390
|
},
|
|
4391
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
4391
|
+
children: [/* @__PURE__ */ (0, $.jsx)(w, { name: "plus" }), " New filter"]
|
|
4392
4392
|
}),
|
|
4393
|
-
|
|
4393
|
+
F.length > 0 && /* @__PURE__ */ (0, $.jsxs)(O, {
|
|
4394
4394
|
"aria-haspopup": "dialog",
|
|
4395
|
-
"aria-controls":
|
|
4396
|
-
"aria-expanded":
|
|
4397
|
-
onClick: (e) =>
|
|
4395
|
+
"aria-controls": E,
|
|
4396
|
+
"aria-expanded": m?.kind === "groups",
|
|
4397
|
+
onClick: (e) => h({
|
|
4398
4398
|
kind: "groups",
|
|
4399
4399
|
anchor: e.currentTarget
|
|
4400
4400
|
}),
|
|
4401
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
4401
|
+
children: [/* @__PURE__ */ (0, $.jsx)(w, { name: "dimensions" }), " Chart breakdown"]
|
|
4402
4402
|
}),
|
|
4403
4403
|
/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
4404
|
-
ref:
|
|
4404
|
+
ref: ue,
|
|
4405
4405
|
className: "astrato-app-filter-bar__chips",
|
|
4406
4406
|
"aria-live": "polite",
|
|
4407
4407
|
"aria-relevant": "additions removals",
|
|
4408
4408
|
children: [
|
|
4409
|
-
|
|
4410
|
-
|
|
4409
|
+
H.map((e, t) => Ce(e, t)),
|
|
4410
|
+
le === "collapse" && H.length > 0 && /* @__PURE__ */ (0, $.jsxs)($.Fragment, { children: [/* @__PURE__ */ (0, $.jsx)("div", {
|
|
4411
4411
|
className: "astrato-app-filter-bar__overflow-probes",
|
|
4412
4412
|
"aria-hidden": "true",
|
|
4413
|
-
children:
|
|
4413
|
+
children: H.map((e, t) => /* @__PURE__ */ (0, $.jsxs)("span", {
|
|
4414
4414
|
className: "astrato-app-filter-bar__button astrato-app-filter-bar__overflow",
|
|
4415
4415
|
"data-overflow-count": t + 1,
|
|
4416
4416
|
children: ["+", t + 1]
|
|
4417
4417
|
}, e.id))
|
|
4418
|
-
}), /* @__PURE__ */ (0, $.jsxs)(
|
|
4418
|
+
}), /* @__PURE__ */ (0, $.jsxs)(O, {
|
|
4419
4419
|
className: "astrato-app-filter-bar__overflow",
|
|
4420
|
-
"data-overflow-hidden":
|
|
4421
|
-
"data-pending":
|
|
4422
|
-
"aria-hidden":
|
|
4423
|
-
"aria-label": `${
|
|
4420
|
+
"data-overflow-hidden": fe === 0,
|
|
4421
|
+
"data-pending": pe,
|
|
4422
|
+
"aria-hidden": fe === 0 || void 0,
|
|
4423
|
+
"aria-label": `${fe} hidden filters${pe ? ", pending changes" : ""}`,
|
|
4424
4424
|
"aria-haspopup": "dialog",
|
|
4425
|
-
"aria-controls":
|
|
4426
|
-
"aria-expanded":
|
|
4425
|
+
"aria-controls": E,
|
|
4426
|
+
"aria-expanded": m?.kind === "overflow" || !!m?.fromOverflow,
|
|
4427
4427
|
onClick: (e) => {
|
|
4428
|
-
|
|
4428
|
+
_(void 0), h({
|
|
4429
4429
|
kind: "overflow",
|
|
4430
4430
|
anchor: e.currentTarget
|
|
4431
4431
|
});
|
|
4432
4432
|
},
|
|
4433
|
-
children: ["+",
|
|
4433
|
+
children: ["+", fe]
|
|
4434
4434
|
})] }),
|
|
4435
|
-
!
|
|
4435
|
+
!H.length && /* @__PURE__ */ (0, $.jsxs)("span", {
|
|
4436
4436
|
className: "astrato-app-filter-bar__empty-bar",
|
|
4437
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
4437
|
+
children: [/* @__PURE__ */ (0, $.jsx)(w, { name: "filter" }), "No active filters"]
|
|
4438
4438
|
})
|
|
4439
4439
|
]
|
|
4440
4440
|
}),
|
|
4441
4441
|
/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
4442
4442
|
className: "astrato-app-filter-bar__actions",
|
|
4443
|
-
children: [
|
|
4444
|
-
onClick:
|
|
4443
|
+
children: [U && /* @__PURE__ */ (0, $.jsxs)($.Fragment, { children: [/* @__PURE__ */ (0, $.jsx)(O, {
|
|
4444
|
+
onClick: _e,
|
|
4445
4445
|
"data-variant": "ghost",
|
|
4446
4446
|
children: "Cancel"
|
|
4447
|
-
}), /* @__PURE__ */ (0, $.jsxs)(
|
|
4447
|
+
}), /* @__PURE__ */ (0, $.jsxs)(O, {
|
|
4448
4448
|
"data-primary": "true",
|
|
4449
|
-
disabled: !
|
|
4450
|
-
onClick:
|
|
4451
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
4452
|
-
})] }),
|
|
4449
|
+
disabled: !me,
|
|
4450
|
+
onClick: ve,
|
|
4451
|
+
children: [/* @__PURE__ */ (0, $.jsx)(w, { name: "check" }), " Apply"]
|
|
4452
|
+
})] }), j.showClearAll !== !1 && he && /* @__PURE__ */ (0, $.jsxs)(O, {
|
|
4453
4453
|
"data-variant": "ghost",
|
|
4454
|
-
onClick: () =>
|
|
4455
|
-
|
|
4454
|
+
onClick: () => N(() => {
|
|
4455
|
+
a.clear(), ge();
|
|
4456
4456
|
}),
|
|
4457
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
4457
|
+
children: [/* @__PURE__ */ (0, $.jsx)(w, { name: "reset" }), " Clear all"]
|
|
4458
4458
|
})]
|
|
4459
4459
|
}),
|
|
4460
|
-
|
|
4460
|
+
d && /* @__PURE__ */ (0, $.jsx)("div", {
|
|
4461
4461
|
className: "astrato-app-filter-bar__error",
|
|
4462
4462
|
role: "alert",
|
|
4463
|
-
children:
|
|
4463
|
+
children: d
|
|
4464
4464
|
}),
|
|
4465
|
-
|
|
4466
|
-
id:
|
|
4467
|
-
anchor:
|
|
4468
|
-
placement:
|
|
4469
|
-
className:
|
|
4470
|
-
onClose:
|
|
4471
|
-
subtitle:
|
|
4472
|
-
icon:
|
|
4473
|
-
fieldType:
|
|
4465
|
+
m && (m.kind !== "groups" || F.length > 0) && /* @__PURE__ */ (0, $.jsxs)(cn, {
|
|
4466
|
+
id: E,
|
|
4467
|
+
anchor: m.anchor,
|
|
4468
|
+
placement: se === "vertical" ? "side" : "bottom",
|
|
4469
|
+
className: m.kind === "fields" ? "astrato-app-filter-bar__field-picker" : m.kind === "overflow" ? "astrato-app-filter-bar__overflow-popover" : void 0,
|
|
4470
|
+
onClose: ge,
|
|
4471
|
+
subtitle: m.kind === "groups" ? "Choose the fields shown in your charts" : m.kind === "filter" && g ? ye(g).view : void 0,
|
|
4472
|
+
icon: m.kind === "filter" && g ? /* @__PURE__ */ (0, $.jsx)(k, {
|
|
4473
|
+
fieldType: ye(g).dataType,
|
|
4474
4474
|
fill: "currentColor"
|
|
4475
|
-
}) : /* @__PURE__ */ (0, $.jsx)(
|
|
4476
|
-
title:
|
|
4475
|
+
}) : /* @__PURE__ */ (0, $.jsx)(w, { name: m.kind === "groups" ? "dimensions" : "filter" }),
|
|
4476
|
+
title: m.kind === "fields" ? "Add filter" : m.kind === "groups" ? "Chart breakdown" : m.kind === "overflow" ? `Filters (${H.length})` : g ? ye(g).name : "Filter",
|
|
4477
4477
|
children: [
|
|
4478
|
-
|
|
4478
|
+
m.kind === "overflow" && /* @__PURE__ */ (0, $.jsxs)($.Fragment, { children: [/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
4479
4479
|
className: "astrato-app-filter-bar__overflow-list",
|
|
4480
|
-
children: [
|
|
4480
|
+
children: [H.map((e, t) => Ce(e, t, !0)), !H.length && /* @__PURE__ */ (0, $.jsx)("p", {
|
|
4481
4481
|
className: "astrato-app-filter-bar__muted",
|
|
4482
4482
|
children: "No active filters"
|
|
4483
4483
|
})]
|
|
4484
|
-
}),
|
|
4484
|
+
}), U && /* @__PURE__ */ (0, $.jsxs)("div", {
|
|
4485
4485
|
className: "astrato-app-filter-bar__editor-footer",
|
|
4486
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
4486
|
+
children: [/* @__PURE__ */ (0, $.jsx)(O, {
|
|
4487
4487
|
"data-variant": "ghost",
|
|
4488
|
-
onClick:
|
|
4488
|
+
onClick: _e,
|
|
4489
4489
|
children: "Cancel"
|
|
4490
|
-
}), /* @__PURE__ */ (0, $.jsxs)(
|
|
4490
|
+
}), /* @__PURE__ */ (0, $.jsxs)(O, {
|
|
4491
4491
|
"data-primary": "true",
|
|
4492
|
-
disabled: !
|
|
4493
|
-
onClick:
|
|
4494
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
4492
|
+
disabled: !me,
|
|
4493
|
+
onClick: ve,
|
|
4494
|
+
children: [/* @__PURE__ */ (0, $.jsx)(w, { name: "check" }), " Apply"]
|
|
4495
4495
|
})]
|
|
4496
4496
|
})] }),
|
|
4497
|
-
|
|
4498
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
4497
|
+
m.kind === "fields" && /* @__PURE__ */ (0, $.jsxs)($.Fragment, { children: [
|
|
4498
|
+
/* @__PURE__ */ (0, $.jsx)(te, {
|
|
4499
4499
|
"aria-label": "Search fields",
|
|
4500
4500
|
placeholder: "Search fields…",
|
|
4501
|
-
value:
|
|
4502
|
-
onChange: (e) =>
|
|
4501
|
+
value: x,
|
|
4502
|
+
onChange: (e) => T(e.target.value)
|
|
4503
4503
|
}),
|
|
4504
4504
|
/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
4505
4505
|
className: "astrato-app-filter-bar__values",
|
|
4506
|
-
children: [
|
|
4506
|
+
children: [V.map((e) => /* @__PURE__ */ (0, $.jsxs)(O, {
|
|
4507
4507
|
className: "astrato-app-filter-bar__value astrato-app-filter-bar__field-option",
|
|
4508
|
-
disabled:
|
|
4508
|
+
disabled: a.isLocked(e.key),
|
|
4509
4509
|
title: e.view ? `${e.name} · ${e.view}` : e.name,
|
|
4510
|
-
onClick: () =>
|
|
4510
|
+
onClick: () => xe(e),
|
|
4511
4511
|
children: [
|
|
4512
4512
|
/* @__PURE__ */ (0, $.jsx)("span", {
|
|
4513
4513
|
className: "astrato-app-filter-bar__field-icon",
|
|
4514
4514
|
"aria-hidden": "true",
|
|
4515
|
-
children: /* @__PURE__ */ (0, $.jsx)(
|
|
4515
|
+
children: /* @__PURE__ */ (0, $.jsx)(k, {
|
|
4516
4516
|
fieldType: e.dataType,
|
|
4517
4517
|
fill: "currentColor"
|
|
4518
4518
|
})
|
|
@@ -4527,92 +4527,92 @@ function kn({ isExpanded: e = !1 }) {
|
|
|
4527
4527
|
children: e.view
|
|
4528
4528
|
})]
|
|
4529
4529
|
}),
|
|
4530
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
4530
|
+
/* @__PURE__ */ (0, $.jsx)(w, { name: "chevronRight" })
|
|
4531
4531
|
]
|
|
4532
|
-
}, e.key)), !
|
|
4532
|
+
}, e.key)), !V.length && /* @__PURE__ */ (0, $.jsx)("p", {
|
|
4533
4533
|
className: "astrato-app-filter-bar__muted",
|
|
4534
4534
|
children: "No matching fields"
|
|
4535
4535
|
})]
|
|
4536
4536
|
}),
|
|
4537
|
-
|
|
4537
|
+
oe && B.length > 0 && /* @__PURE__ */ (0, $.jsxs)(O, {
|
|
4538
4538
|
className: "astrato-app-filter-bar__association-action",
|
|
4539
4539
|
"data-variant": "ghost",
|
|
4540
|
-
onClick: () =>
|
|
4541
|
-
fieldKey:
|
|
4540
|
+
onClick: () => be({
|
|
4541
|
+
fieldKey: B[0].key,
|
|
4542
4542
|
associativeListFilter: {
|
|
4543
|
-
view:
|
|
4543
|
+
view: B[0].view ?? "",
|
|
4544
4544
|
intersectFilters: [],
|
|
4545
4545
|
unionFilters: []
|
|
4546
4546
|
}
|
|
4547
|
-
},
|
|
4548
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
4547
|
+
}, m.anchor),
|
|
4548
|
+
children: [/* @__PURE__ */ (0, $.jsx)(w, { name: "association" }), " New associative filter"]
|
|
4549
4549
|
})
|
|
4550
4550
|
] }),
|
|
4551
|
-
|
|
4551
|
+
m.kind === "groups" && F.map((e) => /* @__PURE__ */ (0, $.jsxs)("label", {
|
|
4552
4552
|
className: "astrato-app-filter-bar__field",
|
|
4553
|
-
children: [e.name, /* @__PURE__ */ (0, $.jsx)(
|
|
4553
|
+
children: [e.name, /* @__PURE__ */ (0, $.jsx)(D, {
|
|
4554
4554
|
value: e.selectedIndex,
|
|
4555
|
-
onChange: (t) =>
|
|
4555
|
+
onChange: (t) => N(() => a.setDimensionGroup(e.id, Number(t.target.value))),
|
|
4556
4556
|
children: e.fields.map((e, t) => /* @__PURE__ */ (0, $.jsx)("option", {
|
|
4557
4557
|
value: t,
|
|
4558
4558
|
children: e.name
|
|
4559
4559
|
}, e.key))
|
|
4560
4560
|
})]
|
|
4561
4561
|
}, e.id)),
|
|
4562
|
-
|
|
4563
|
-
filter:
|
|
4564
|
-
fields:
|
|
4565
|
-
targetFields:
|
|
4566
|
-
services:
|
|
4567
|
-
onChange:
|
|
4568
|
-
disabled:
|
|
4562
|
+
m.kind === "filter" && g && /* @__PURE__ */ (0, $.jsxs)($.Fragment, { children: ["associativeListFilter" in g ? R ? /* @__PURE__ */ (0, $.jsx)(an, {
|
|
4563
|
+
filter: g,
|
|
4564
|
+
fields: ae,
|
|
4565
|
+
targetFields: B.some((e) => e.key === g.fieldKey) ? B : [ye(g), ...B],
|
|
4566
|
+
services: a,
|
|
4567
|
+
onChange: Se,
|
|
4568
|
+
disabled: a.isLocked(g.fieldKey)
|
|
4569
4569
|
}) : /* @__PURE__ */ (0, $.jsx)("p", {
|
|
4570
4570
|
className: "astrato-app-filter-bar__muted",
|
|
4571
4571
|
children: "Associative filter editing is unavailable in this app."
|
|
4572
4572
|
}) : /* @__PURE__ */ (0, $.jsx)(Zt, {
|
|
4573
|
-
field:
|
|
4574
|
-
filter:
|
|
4575
|
-
services:
|
|
4576
|
-
onChange:
|
|
4577
|
-
disabled:
|
|
4573
|
+
field: ye(g),
|
|
4574
|
+
filter: g,
|
|
4575
|
+
services: a,
|
|
4576
|
+
onChange: Se,
|
|
4577
|
+
disabled: a.isLocked(g.fieldKey)
|
|
4578
4578
|
}), /* @__PURE__ */ (0, $.jsxs)("div", {
|
|
4579
4579
|
className: "astrato-app-filter-bar__editor-footer",
|
|
4580
4580
|
children: [
|
|
4581
|
-
|
|
4581
|
+
m.fromOverflow && /* @__PURE__ */ (0, $.jsx)(O, {
|
|
4582
4582
|
"data-variant": "ghost",
|
|
4583
4583
|
onClick: () => {
|
|
4584
|
-
|
|
4584
|
+
_(void 0), h({
|
|
4585
4585
|
kind: "overflow",
|
|
4586
|
-
anchor:
|
|
4586
|
+
anchor: m.anchor
|
|
4587
4587
|
});
|
|
4588
4588
|
},
|
|
4589
4589
|
children: "All filters"
|
|
4590
4590
|
}),
|
|
4591
|
-
|
|
4591
|
+
a.canLock && /* @__PURE__ */ (0, $.jsxs)(O, {
|
|
4592
4592
|
"data-variant": "ghost",
|
|
4593
|
-
onClick: () =>
|
|
4594
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
4593
|
+
onClick: () => N(() => a.toggleLock(g.fieldKey)),
|
|
4594
|
+
children: [/* @__PURE__ */ (0, $.jsx)(w, { name: a.isLocked(g.fieldKey) ? "lock" : "unlock" }), a.isLocked(g.fieldKey) ? "Unlock field" : "Lock field"]
|
|
4595
4595
|
}),
|
|
4596
4596
|
/* @__PURE__ */ (0, $.jsx)("div", {
|
|
4597
4597
|
className: "astrato-app-filter-bar__actions",
|
|
4598
|
-
children:
|
|
4598
|
+
children: U ? /* @__PURE__ */ (0, $.jsxs)($.Fragment, { children: [/* @__PURE__ */ (0, $.jsx)(O, {
|
|
4599
4599
|
"data-variant": "ghost",
|
|
4600
|
-
onClick:
|
|
4600
|
+
onClick: _e,
|
|
4601
4601
|
children: "Cancel"
|
|
4602
|
-
}), /* @__PURE__ */ (0, $.jsxs)(
|
|
4602
|
+
}), /* @__PURE__ */ (0, $.jsxs)(O, {
|
|
4603
4603
|
"data-primary": "true",
|
|
4604
|
-
disabled: !
|
|
4605
|
-
onClick:
|
|
4606
|
-
children: [/* @__PURE__ */ (0, $.jsx)(
|
|
4607
|
-
})] }) : /* @__PURE__ */ (0, $.jsx)(
|
|
4608
|
-
onClick:
|
|
4604
|
+
disabled: !me,
|
|
4605
|
+
onClick: ve,
|
|
4606
|
+
children: [/* @__PURE__ */ (0, $.jsx)(w, { name: "check" }), " Apply"]
|
|
4607
|
+
})] }) : /* @__PURE__ */ (0, $.jsx)(O, {
|
|
4608
|
+
onClick: ge,
|
|
4609
4609
|
children: "Done"
|
|
4610
4610
|
})
|
|
4611
4611
|
})
|
|
4612
4612
|
]
|
|
4613
4613
|
})] })
|
|
4614
4614
|
]
|
|
4615
|
-
}, `${
|
|
4615
|
+
}, `${m.kind}:${g?.fieldKey ?? ""}`)
|
|
4616
4616
|
]
|
|
4617
4617
|
}) : null;
|
|
4618
4618
|
}
|