@astrato-io/visualizations 0.0.0-stage → 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.
Files changed (139) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE +93 -0
  3. package/README.md +843 -2
  4. package/THIRD_PARTY_NOTICES.md +8477 -0
  5. package/VISUALIZATION_DEFINITIONS.md +2378 -0
  6. package/chunks/ClickAwayListener-BbeNMAvj.js +52 -0
  7. package/chunks/LinearProgress-B1FeWaen.js +253 -0
  8. package/chunks/accessors-DemrDevR.js +128 -0
  9. package/chunks/app-filter-bar.compiler-BGJ7HAbr.js +64 -0
  10. package/chunks/bar.compiler-CT0ZbQKc.js +374 -0
  11. package/chunks/builder-B6dWSIdD.js +12289 -0
  12. package/chunks/color-settings-ZIvgNTq1.js +10 -0
  13. package/chunks/coloring-B1XAfg6b.js +664 -0
  14. package/chunks/debounce-fn-CUixuz45.js +7 -0
  15. package/chunks/definitions-D3OVqmXl.js +2102 -0
  16. package/chunks/escobar-eDjtGpkC.js +34606 -0
  17. package/chunks/events-WZut5Ow6.js +4 -0
  18. package/chunks/extend-BKUkc4_i.js +37 -0
  19. package/chunks/filter.compiler-DBsyRBJt.js +70 -0
  20. package/chunks/filtering-tqjAyJH5.js +1072 -0
  21. package/chunks/grouping-type-On4s9Thj.js +3 -0
  22. package/chunks/handlers-VTBfIZYZ.js +13072 -0
  23. package/chunks/isEqual-BDxAhUo8.js +7514 -0
  24. package/chunks/line.compiler-CzdM5Ld0.js +198 -0
  25. package/chunks/metadata-BGElBy5Z.js +28 -0
  26. package/chunks/number.compiler-G-R7y16P.js +53 -0
  27. package/chunks/operations-CTNUX6Sy.js +26249 -0
  28. package/chunks/range-CiwTbMig.js +22 -0
  29. package/chunks/registry-CsQQzukD.js +920 -0
  30. package/chunks/requirements-DYjZCFyf.js +6 -0
  31. package/chunks/rolldown-runtime-DleVn1XH.js +28 -0
  32. package/chunks/set-coloring-datafield-B3uIS1Pe.js +8 -0
  33. package/chunks/shared-CBvcC5YV.js +1218 -0
  34. package/chunks/src-BOS6SqkZ.js +67 -0
  35. package/chunks/src-D9XogOrc.js +422 -0
  36. package/chunks/standalone-0M4HlmDW2.js +3944 -0
  37. package/chunks/standalone-0ashe9w1.js +411 -0
  38. package/chunks/standalone-B7jax8wa.js +339 -0
  39. package/chunks/standalone-BK0VYU-l.js +463 -0
  40. package/chunks/standalone-BMIbT1b2.js +4619 -0
  41. package/chunks/standalone-BZV5vOwA.js +6 -0
  42. package/chunks/standalone-BhDrWj4p.js +1980 -0
  43. package/chunks/standalone-BtSHCp2U2.js +673 -0
  44. package/chunks/standalone-BvaKdky9.js +344 -0
  45. package/chunks/standalone-BwtM31-f.js +2 -0
  46. package/chunks/standalone-C3gg736V.js +1129 -0
  47. package/chunks/standalone-CC1VUjO32.js +299 -0
  48. package/chunks/standalone-C_rYnZ0N.js +741 -0
  49. package/chunks/standalone-CoLrAxRV.js +13198 -0
  50. package/chunks/standalone-DC-aUgXC.js +3855 -0
  51. package/chunks/standalone-DCtRoTWg.js +675 -0
  52. package/chunks/standalone-DUDFTBqL.js +833 -0
  53. package/chunks/standalone-DhZkX9Td.js +2 -0
  54. package/chunks/standalone-DtLElfuM.js +512 -0
  55. package/chunks/standalone-G9Q4Uczu.js +726 -0
  56. package/chunks/standalone-JuLF-OoH.js +1762 -0
  57. package/chunks/standalone-_DeX21JJ.js +383 -0
  58. package/chunks/standalone-gFhKZh8m.js +179 -0
  59. package/chunks/standalone-tDNy-SFH.js +281 -0
  60. package/chunks/standalone-v1oxfU20.js +68 -0
  61. package/chunks/standalone-vzBY6q0I2.js +140 -0
  62. package/chunks/stroke-dash-UgMEcCS4.js +6 -0
  63. package/chunks/table.compiler-tb914oj3.js +222 -0
  64. package/chunks/typeof-CJDtcySz.js +13 -0
  65. package/chunks/ui-DQWtv2iM.js +63551 -0
  66. package/chunks/url-utils-B17gj_mr.js +5501 -0
  67. package/chunks/useFieldName-BvdcoJRl.js +7 -0
  68. package/chunks/utils-Bg7K-t6K.js +32379 -0
  69. package/chunks/view-Bn83C8d9.js +12466 -0
  70. package/definitions.js +3 -0
  71. package/docs/operations/astrato-app-filter-bar.md +161 -0
  72. package/docs/operations/bar.md +6968 -0
  73. package/docs/operations/combo.md +5804 -0
  74. package/docs/operations/date-picker.md +644 -0
  75. package/docs/operations/distribution-gauge.md +3082 -0
  76. package/docs/operations/dot.md +5570 -0
  77. package/docs/operations/filter.md +1483 -0
  78. package/docs/operations/gauge.md +3316 -0
  79. package/docs/operations/heatMap.md +5944 -0
  80. package/docs/operations/histogram.md +1856 -0
  81. package/docs/operations/iframe.md +56 -0
  82. package/docs/operations/image.md +177 -0
  83. package/docs/operations/index.md +46 -0
  84. package/docs/operations/line.md +6391 -0
  85. package/docs/operations/number.md +3903 -0
  86. package/docs/operations/pie.md +5956 -0
  87. package/docs/operations/radar.md +4566 -0
  88. package/docs/operations/sankey.md +3088 -0
  89. package/docs/operations/scatter.md +5969 -0
  90. package/docs/operations/shape.md +315 -0
  91. package/docs/operations/simpleTextObject.md +699 -0
  92. package/docs/operations/slider.md +220 -0
  93. package/docs/operations/table.md +8800 -0
  94. package/docs/operations/tree.md +2867 -0
  95. package/docs/operations/treemap.md +3527 -0
  96. package/docs/operations/waterfall.md +2928 -0
  97. package/docs/operations/word-cloud.md +3000 -0
  98. package/getters.js +18 -0
  99. package/index.js +1183 -0
  100. package/metadata.js +20 -0
  101. package/operations.js +64 -0
  102. package/package.json +185 -4
  103. package/src/definitions/index.d.ts +2 -0
  104. package/src/definitions/model/definitions/available-fields.d.ts +35 -0
  105. package/src/definitions/model/definitions/compilers/compile.d.ts +7 -0
  106. package/src/definitions/model/definitions/data-item-resolution.d.ts +19 -0
  107. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +1341 -0
  108. package/src/definitions/model/definitions/descriptors/json-schema.d.ts +2 -0
  109. package/src/definitions/model/definitions/diagnostics.d.ts +5 -0
  110. package/src/definitions/model/definitions/field-suggestions.d.ts +2 -0
  111. package/src/definitions/model/definitions/index.d.ts +23 -0
  112. package/src/definitions/model/definitions/registry/compile.d.ts +2 -0
  113. package/src/definitions/model/definitions/registry/descriptor-registry.d.ts +3 -0
  114. package/src/definitions/model/definitions/schema-registry.d.ts +660 -0
  115. package/src/definitions/model/definitions/schemas/app-filter-bar.schema.d.ts +22 -0
  116. package/src/definitions/model/definitions/schemas/bar.schema.d.ts +73 -0
  117. package/src/definitions/model/definitions/schemas/broad-chart.schema.d.ts +68 -0
  118. package/src/definitions/model/definitions/schemas/common.schema.d.ts +303 -0
  119. package/src/definitions/model/definitions/schemas/filter.schema.d.ts +22 -0
  120. package/src/definitions/model/definitions/schemas/index.d.ts +9 -0
  121. package/src/definitions/model/definitions/schemas/line.schema.d.ts +72 -0
  122. package/src/definitions/model/definitions/schemas/number.schema.d.ts +21 -0
  123. package/src/definitions/model/definitions/schemas/object.schema.d.ts +215 -0
  124. package/src/definitions/model/definitions/schemas/table.schema.d.ts +458 -0
  125. package/src/definitions/model/definitions/types/compilation.types.d.ts +36 -0
  126. package/src/definitions/model/definitions/types/definition.types.d.ts +2 -0
  127. package/src/definitions/model/definitions/types/descriptor.types.d.ts +39 -0
  128. package/src/definitions/model/definitions/types/index.d.ts +3 -0
  129. package/src/definitions/model/definitions/validation.d.ts +3 -0
  130. package/src/getters/index.d.ts +30 -0
  131. package/src/index.d.ts +4 -0
  132. package/src/metadata/index.d.ts +4 -0
  133. package/src/operations/index.d.ts +30 -0
  134. package/src/registry/index.d.ts +6 -0
  135. package/src/runtime/index.d.ts +2 -0
  136. package/src/types.d.ts +307 -0
  137. package/src/visualization-catalog.d.ts +82 -0
  138. package/src/web-components/index.d.ts +12 -0
  139. package/styles.css +2 -0
@@ -0,0 +1,1072 @@
1
+ import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
+ import { Bn as t, Gn as n, Ko as r, Kr as i, Sa as a, Ta as o, _a as s, la as c, oi as l, qa as u, va as d, vr as f } from "./isEqual-BDxAhUo8.js";
3
+ import { Ei as p, Fn as m, G as h, J as g, K as _, Si as v, Yi as y, Zi as b, d as x, hi as S, hn as C, hr as w, pt as T, q as E, qi as D, st as O, vi as k, wr as A, xi as j } from "./utils-Bg7K-t6K.js";
4
+ import { Ft as M, It as N, M as P, N as ee, Nt as F, P as te, Pt as I, ft as L, j as ne, n as re, ut as ie, vt as R } from "./ui-DQWtv2iM.js";
5
+ import { t as ae } from "./LinearProgress-B1FeWaen.js";
6
+ var oe = (e, t, n) => Math.ceil(t) + Math.ceil(n) >= Math.floor(e) && n > 0;
7
+ function se(e) {
8
+ let { theme: t, name: n, props: r } = e;
9
+ return !t || !t.components || !t.components[n] || !t.components[n].defaultProps ? r : O(t.components[n].defaultProps, r);
10
+ }
11
+ function ce({ props: e, name: t, defaultTheme: n, themeId: r }) {
12
+ let i = T(n);
13
+ return r && (i = i[r] || i), se({
14
+ theme: i,
15
+ name: t,
16
+ props: e
17
+ });
18
+ }
19
+ var z = (e, t) => t && !i(t) ? String(C(t, e)) : e === !0 ? "True" : e === !1 ? "False" : e === null ? "-" : String(e), le = /* @__PURE__ */ e(re()), B = (e, t) => {
20
+ let [n, r] = (0, le.default)(e, (e) => t.indexOf(e.dimension) !== -1);
21
+ return [n, r];
22
+ }, ue = (e) => {
23
+ let t = e?.dimensions.filter((e) => e.role === u.FILTER_DIMENSION);
24
+ return [(t?.length ? t : e?.dimensions.slice(0, 1) ?? []).map(V).join(" - ") || "Sample", e?.measures[0] && e?.filterSettings?.showMeasureLabel ? ` | ${V(e?.measures[0])}` : null];
25
+ };
26
+ function V(e) {
27
+ return n(e) || e.label || e.dataItem?.name || "";
28
+ }
29
+ var H = (e) => async (t) => {
30
+ t.preventDefault(), t.stopPropagation(), e((t.clipboardData.getData("Text") || await navigator.clipboard.readText()).replaceAll("\r\n", " ").replaceAll("\r", " ").replaceAll("\n", " "));
31
+ }, U = b(), de = (e) => {
32
+ if (!e.length) return [];
33
+ if (e.length === 1) return [e[0], e[0]];
34
+ let t = Infinity, n = -Infinity;
35
+ return e.forEach((e) => {
36
+ t > e && (t = e), n < e && (n = e);
37
+ }), [t, n];
38
+ }, W = l("getToRangeSelectionHandler", "#cbacba"), fe = (e, t) => async () => {
39
+ let n = e.selection.getActiveSelection(U.FilterType.VALUE), r = structuredClone(n), i = r.applied.find((e) => e.field.name === t.name && e.field.view === t.view);
40
+ if (i ||= r.pending.find((e) => e.field.name === t.name && e.field.view === t.view), !i) {
41
+ let n = U.FilterOperator.Between;
42
+ r.pending.push({
43
+ operator: n,
44
+ field: D(e.engine, t),
45
+ values: []
46
+ }), e.selection.setNewSelectionState(r);
47
+ return;
48
+ }
49
+ if (i.operator = i.operator === U.FilterOperator.InList ? U.FilterOperator.Between : U.FilterOperator.NotBetween, (i.values ?? []).length === 0) {
50
+ e.selection.declineSelection(i), e.selection.removeSelection(i);
51
+ let n = {
52
+ dimensions: [],
53
+ measures: [{
54
+ fieldKeys: [t.key],
55
+ aggregation: "MIN",
56
+ filters: []
57
+ }, {
58
+ fieldKeys: [t.key],
59
+ aggregation: "MAX",
60
+ filters: []
61
+ }]
62
+ }, a = e.engine;
63
+ if (!a) {
64
+ W.error("There is no data engine available");
65
+ return;
66
+ }
67
+ let { data: o } = await a.getData(n), s = typeof o[0][0] == "number" ? o[0][0] : null, c = typeof o[0][1] == "number" ? o[0][1] : null;
68
+ if (s === null || c === null) {
69
+ W.error("There is something wrong with the min/max data");
70
+ return;
71
+ }
72
+ return i.values = [s, c], e.selection.setNewSelectionState(r, U.FilterType.VALUE), i.operator;
73
+ }
74
+ return i.values = de(i.values), e.selection.setNewSelectionState(r, U.FilterType.VALUE), i.operator;
75
+ }, G = l("getToValueSelectionHandler", "#cbacba"), pe = t(f()), me = (e, t, n, r, i) => async () => {
76
+ let a = n ?? pe, o = e.selection.getActiveSelection(U.FilterType.VALUE), s = structuredClone(o), c = s.pending.find((e) => e.field.name === t.name && e.field.view === t.view);
77
+ if (c ||= s.applied.find((e) => e.field.name === t.name && e.field.view === t.view), !c) {
78
+ G.warn("There was no selection connected to clicked field!", JSON.stringify(t));
79
+ return;
80
+ }
81
+ if (r) return c.operator = U.FilterOperator.InList, c.values = [], delete c.dynamicDateRange, delete c.dynamicDateCalcRange, e.selection.setNewSelectionState(s, U.FilterType.VALUE), c.operator;
82
+ if ([U.FilterOperator.InList, U.FilterOperator.NotInList].includes(c.operator)) return c.operator;
83
+ if ([U.FilterOperator.Like, U.FilterOperator.NotLike].includes(c.operator)) {
84
+ let n = c.values;
85
+ if (c.operator = c.operator === U.FilterOperator.Like ? U.FilterOperator.InList : U.FilterOperator.NotInList, n?.length) {
86
+ let r = {
87
+ dimensions: [{ fieldKey: t.key }],
88
+ limit: a + 1,
89
+ measures: [],
90
+ filters: [{
91
+ fieldKey: t.key,
92
+ operator: U.FilterOperator.Like,
93
+ values: n
94
+ }]
95
+ }, o = e.engine;
96
+ if (!o) {
97
+ G.error("There is no data engine available");
98
+ return;
99
+ }
100
+ let { data: l, meta: u } = await o.getData(r);
101
+ if (u.rows >= a + 1) return c.values = [], e.selection.setNewSelectionState(s, U.FilterType.VALUE), i?.(c.operator, String(n[0] ?? "")), c.operator;
102
+ c.values = Object.values(l).flat();
103
+ }
104
+ return e.selection.setNewSelectionState(s, U.FilterType.VALUE), c.operator;
105
+ }
106
+ c.operator = c.operator === U.FilterOperator.Between ? U.FilterOperator.InList : U.FilterOperator.NotInList;
107
+ let l = {
108
+ dimensions: [{ fieldKey: t.key }],
109
+ limit: a,
110
+ measures: [],
111
+ filters: []
112
+ };
113
+ c.values && (l.filters?.push({
114
+ fieldKey: t.key,
115
+ operator: U.FilterOperator.Between,
116
+ values: c.values
117
+ }), l.limit = a + 1);
118
+ let u = e.engine;
119
+ if (!u) {
120
+ G.error("There is no data engine available");
121
+ return;
122
+ }
123
+ let { data: d, meta: f } = await u.getData(l);
124
+ return f.rows >= a + 1 ? (e.daedalus.emitEvent(U.AstratoEvents.SHOW_GLOBAL_NOTIFICATION, {
125
+ type: "warn",
126
+ message: "Cannot change the selection type, because too many values would have to be selected!"
127
+ }), c.operator) : (c.values = Object.values(d).flat(), e.selection.setNewSelectionState(s, U.FilterType.VALUE), c.operator);
128
+ }, he = (e, t) => (n) => {
129
+ let r = e.selection.getActiveSelection(U.FilterType.VALUE), i = structuredClone(r), a = n?.trim() ? [n.trim()] : [""], o = i.applied.find((e) => e.field.name === t.name && e.field.view === t.view);
130
+ if (o ||= i.pending.find((e) => e.field.name === t.name && e.field.view === t.view), !o) {
131
+ let n = U.FilterOperator.Like;
132
+ return i.pending.push({
133
+ operator: n,
134
+ field: D(e.engine, t),
135
+ values: a
136
+ }), e.selection.setNewSelectionState(i), n;
137
+ }
138
+ return o.operator === U.FilterOperator.InList ? (o.operator = U.FilterOperator.Like, o.values = a) : o.operator === U.FilterOperator.NotInList ? (o.operator = U.FilterOperator.NotLike, o.values = a) : (o.operator = o.operator === U.FilterOperator.NotLike ? U.FilterOperator.NotLike : U.FilterOperator.Like, o.values = a.length ? a : o.values), e.selection.setNewSelectionState(i, U.FilterType.VALUE), o.operator;
139
+ }, K = (e, t) => ({
140
+ fontFamily: d(t, e?.fontFamily) ?? void 0,
141
+ fontStyle: e?.italic ? "italic" : "normal",
142
+ fontWeight: e?.bold ? "bold" : "normal",
143
+ textDecoration: `${e?.underlined ? "underline" : ""} ${e?.strikethrough ? "line-through" : ""}`,
144
+ color: s(t, e?.fontColor)
145
+ }), ge = (e) => e === r.Line ? "solid" : "dashed", q = (e, t) => {
146
+ let { backgroundColor: n, borderColor: r, borderEnabled: i, borderRadius: a, borderStyle: o, borderWidth: s } = {
147
+ ...c,
148
+ ...e
149
+ }, l = "0px";
150
+ return i && (l = `${a}px`, t && (l = `${a}px ${a}px 0 0`)), {
151
+ backgroundColor: n,
152
+ border: i ? `${s}px ${ge(o)} ${r}` : "none",
153
+ borderRadius: l
154
+ };
155
+ };
156
+ function J(e) {
157
+ return {
158
+ boxSizing: "border-box",
159
+ alignItems: "center",
160
+ cursor: "pointer",
161
+ height: 24,
162
+ padding: "3px 6px",
163
+ border: `1px solid ${o.grey4}`,
164
+ borderRadius: 16,
165
+ display: "flex",
166
+ marginRight: 4,
167
+ flexShrink: 0,
168
+ backgroundColor: o.mainBrightPink,
169
+ color: o.white,
170
+ ...E.bold11,
171
+ ...E.overflowEllipsis,
172
+ "&:hover": { borderColor: o.grey2 },
173
+ ...e && {
174
+ [N.md]: {
175
+ height: 20,
176
+ padding: "2px 6px",
177
+ ...E.bold10
178
+ },
179
+ [N.sm]: {
180
+ height: 16,
181
+ padding: "1px 4px",
182
+ ...E.normal10
183
+ },
184
+ [N.xs]: {
185
+ height: 12,
186
+ padding: "0px 4px",
187
+ fontSize: 8,
188
+ lineHeight: "10px"
189
+ }
190
+ }
191
+ };
192
+ }
193
+ var Y = /* @__PURE__ */ e(y()), X = (0, Y.createContext)({});
194
+ Y.forwardRef(function(e, t) {
195
+ return Y.createElement("img", {
196
+ ...e,
197
+ ref: t,
198
+ src: "data:image/svg+xml,%3Csvg%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M28.2534%2028.2533L27.2134%2027.2133L24.0001%2024L17.8801%2017.88L4.78677%204.78666L3.74677%203.74666C3.22677%203.22666%202.38677%203.22666%201.86677%203.74666C1.33344%204.26666%201.33344%205.10666%201.85344%205.62666L4.0001%207.77333V25.3333C4.0001%2026.8%205.2001%2028%206.66677%2028H24.2268L26.3734%2030.1467C26.8934%2030.6667%2027.7334%2030.6667%2028.2534%2030.1467C28.7734%2029.6267%2028.7734%2028.7733%2028.2534%2028.2533ZM8.02677%2024C7.46677%2024%207.1601%2023.36%207.50677%2022.92L10.8268%2018.6533C11.0934%2018.32%2011.6001%2018.3067%2011.8668%2018.64L14.6668%2022.0133L16.2268%2020L20.2268%2024H8.02677ZM28.0001%2024.2267L7.77344%203.99999H25.3334C26.8001%203.99999%2028.0001%205.19999%2028.0001%206.66666V24.2267Z%22%20fill%3D%22%23BDBDBD%22%2F%3E%0A%3C%2Fsvg%3E%0A"
199
+ });
200
+ });
201
+ var _e = (e, t) => typeof e == "number" && typeof t == "number" ? e / t : 0, ve = (e, t, n, r, i, a) => {
202
+ let o = "";
203
+ if (e) {
204
+ t && (o += `${t}: `);
205
+ let r = z(e, n);
206
+ o += r;
207
+ }
208
+ if (r) {
209
+ e && (o += " | "), i && (o += `${i}: `);
210
+ let t = z(r, a);
211
+ o += t;
212
+ }
213
+ return o;
214
+ }, Z = p(), ye = h({ iconContainer: {
215
+ width: 16,
216
+ flexShrink: 0
217
+ } }), be = ({ disabled: e, isApplied: t, isSelected: n, isNot: r, fontColor: i }) => {
218
+ let a = ye(), s = i ?? (t ? o.mainDarkNavy : void 0);
219
+ return /* @__PURE__ */ (0, Z.jsxs)("div", {
220
+ className: a.iconContainer,
221
+ style: { opacity: e ? .25 : void 0 },
222
+ children: [n && r ? /* @__PURE__ */ (0, Z.jsx)(S, { fill: o.mainBrightPink }) : null, n && !r ? /* @__PURE__ */ (0, Z.jsx)(v, { fill: s }) : null]
223
+ });
224
+ }, xe = (e) => {
225
+ let { r: t, g: n, b: r, a: i } = P(e) ? ne(e) : te(e), a = (i ?? 1) * .6;
226
+ return ee({
227
+ r: t,
228
+ g: n,
229
+ b: r,
230
+ a: a < 0 ? 0 : a
231
+ });
232
+ }, Se = h({
233
+ progressBar: {
234
+ height: "100%",
235
+ borderRadius: "4px",
236
+ position: "absolute",
237
+ bottom: 1,
238
+ top: 1
239
+ },
240
+ progressBarSelectedOrApplied: { color: o.mainDarkNavy },
241
+ labelsContainer: {
242
+ display: "flex",
243
+ flexDirection: "row",
244
+ justifyContent: "space-between",
245
+ alignItems: "center",
246
+ width: "100%",
247
+ height: "100%",
248
+ overflow: "hidden",
249
+ position: "relative",
250
+ "&:hover": {
251
+ color: o.mainDarkNavy,
252
+ "& > div": { backgroundColor: o.grey5 }
253
+ }
254
+ },
255
+ label: ({ responsive: e, fontSize: t }) => ({
256
+ ...E.normal11,
257
+ ...E.overflowEllipsis,
258
+ color: "inherit",
259
+ marginRight: "5px",
260
+ height: "100%",
261
+ zIndex: 1,
262
+ display: "inline-flex",
263
+ alignItems: "center",
264
+ ...t ? {
265
+ fontSize: `${t}px`,
266
+ lineHeight: 1.2,
267
+ ...e && {
268
+ [N.md]: { fontSize: `min(${t * F.md}px, 14px)` },
269
+ [N.sm]: { fontSize: `min(${t * F.sm}px, 12px)` },
270
+ [N.xs]: {
271
+ fontSize: `min(${t * F.xs}px, 10px)`,
272
+ fontWeight: "normal !important"
273
+ }
274
+ }
275
+ } : I(e)
276
+ }),
277
+ dimensionLabel: {
278
+ paddingLeft: 4,
279
+ flexGrow: 1,
280
+ flexShrink: 0
281
+ },
282
+ measuresLabel: {
283
+ flexGrow: 0,
284
+ flexShrink: 1
285
+ },
286
+ rowDisabled: { color: o.grey3 }
287
+ }), Ce = ({ dimensionDisplayValue: e, measuresLabel: t, showLabelProgress: n, isSelected: r, isApplied: i, strikethrough: s, disabled: c, searchTerm: l, barWidth: u, fontStyle: d, progressColor: f = o.lightBlue, textAlign: p, responsive: h, fontSize: _ }) => {
288
+ let v = Se({
289
+ responsive: h,
290
+ fontSize: _
291
+ }), y = g()?.astrato ?? a, b = {
292
+ ...K({
293
+ ...d,
294
+ strikethrough: d?.strikethrough || s
295
+ }, y),
296
+ ...p ? {
297
+ textAlign: p,
298
+ justifyContent: p === "right" ? "flex-end" : p === "center" ? "center" : "flex-start"
299
+ } : {}
300
+ }, x = r || i ? f : xe(f);
301
+ return /* @__PURE__ */ (0, Z.jsxs)("div", {
302
+ className: m({
303
+ [v.labelsContainer]: !0,
304
+ [v.progressBarSelectedOrApplied]: r || i
305
+ }),
306
+ children: [
307
+ n && /* @__PURE__ */ (0, Z.jsx)("div", {
308
+ style: {
309
+ width: `${u * 100}%`,
310
+ backgroundColor: x
311
+ },
312
+ className: m({
313
+ [v.progressBar]: !0,
314
+ [v.rowDisabled]: c
315
+ }),
316
+ "data-testid": "item-list-label-progress"
317
+ }),
318
+ /* @__PURE__ */ (0, Z.jsx)("span", {
319
+ style: b,
320
+ className: m(v.label, v.dimensionLabel),
321
+ title: e,
322
+ children: /* @__PURE__ */ (0, Z.jsx)(L, {
323
+ phrase: l ?? "",
324
+ children: e ?? ""
325
+ })
326
+ }),
327
+ /* @__PURE__ */ (0, Z.jsx)("span", {
328
+ style: b,
329
+ className: m(v.label, v.measuresLabel),
330
+ children: t
331
+ })
332
+ ]
333
+ });
334
+ }, we = h({
335
+ rowWrapper: (e) => ({
336
+ cursor: "pointer",
337
+ userSelect: "none",
338
+ display: "flex",
339
+ flexDirection: "row",
340
+ alignItems: "center",
341
+ height: "32px",
342
+ boxSizing: "border-box",
343
+ borderRadius: 6,
344
+ paddingRight: 8,
345
+ ...e && {
346
+ [N.md]: {
347
+ height: "24px",
348
+ paddingRight: 6
349
+ },
350
+ [N.sm]: {
351
+ height: "16px",
352
+ paddingRight: 4
353
+ },
354
+ [N.xs]: {
355
+ height: "12px",
356
+ paddingRight: 2
357
+ }
358
+ }
359
+ }),
360
+ checkboxWrapper: (e) => ({
361
+ display: "flex",
362
+ alignItems: "center",
363
+ flexShrink: 0,
364
+ marginRight: 6,
365
+ ...e && {
366
+ [N.md]: {
367
+ "& input[type=\"checkbox\"], & svg": {
368
+ width: "14px !important",
369
+ height: "14px !important"
370
+ },
371
+ "& > div, & > div > div": { height: "14px" }
372
+ },
373
+ [N.sm]: {
374
+ "& input[type=\"checkbox\"], & svg": {
375
+ width: "11px !important",
376
+ height: "11px !important"
377
+ },
378
+ "& > div, & > div > div": { height: "11px" }
379
+ },
380
+ [N.xs]: {
381
+ "& input[type=\"checkbox\"], & svg": {
382
+ width: "10px !important",
383
+ height: "10px !important"
384
+ },
385
+ "& > div, & > div > div": { height: "10px" }
386
+ }
387
+ }
388
+ }),
389
+ rowSelected: { backgroundColor: "var(--filter-hover-color)" },
390
+ rowHover: { "&:hover": { backgroundColor: "var(--filter-hover-color)" } },
391
+ rowApplied: {
392
+ backgroundColor: "initial",
393
+ "& > div > span": { color: `${o.mainDarkNavy} !important` }
394
+ },
395
+ rowDisabled: { "& span": { color: `${o.grey3} !important` } }
396
+ }), Q = ({ selected: e, applied: t, disabled: n, hoverColor: r, onSelect: i, showProgressBar: a, showCheckbox: s, showSelectionIcon: c = !0, checkboxState: l = "none", fontSize: u, searchTerm: d, doneRenderingCallback: f, dimensionValue: p, dimensionFormatter: h, imageValue: g, measure1Value: _, measure1Label: v, measure1Formatter: y, measure2Value: b, measure2Label: x, measure2Formatter: S, maxValue: C, imageFit: w, fontStyle: T, progressBarColor: E, responsive: D }) => {
397
+ let O = we(D), k = (0, Y.useContext)(X), A = (k.pendingOperator ?? k.appliedOperator) === U.FilterOperator.NotInList, j = !!g, M = a && _ !== void 0 && !b, N = z(p, h), P = ve(_, v, y, b, x, S);
398
+ return (0, Y.useEffect)(() => {
399
+ j || f?.();
400
+ }, []), /* @__PURE__ */ (0, Z.jsxs)("div", {
401
+ tabIndex: 0,
402
+ role: "button",
403
+ onClick: i,
404
+ "data-testid": `big-list-item-dimension-${p}`,
405
+ className: m({
406
+ [O.rowWrapper]: !0,
407
+ [O.rowHover]: !M,
408
+ [O.rowSelected]: !M && e,
409
+ [O.rowApplied]: t && !n,
410
+ [O.rowDisabled]: n
411
+ }),
412
+ style: { "--filter-hover-color": r ?? o.grey5 },
413
+ children: [
414
+ s ? /* @__PURE__ */ (0, Z.jsx)("div", {
415
+ "aria-hidden": !0,
416
+ style: { pointerEvents: "none" },
417
+ className: O.checkboxWrapper,
418
+ children: /* @__PURE__ */ (0, Z.jsx)(R, {
419
+ value: l,
420
+ onChange: () => void 0,
421
+ testId: `dimension-${p}-checkbox`
422
+ })
423
+ }) : null,
424
+ j && /* @__PURE__ */ (0, Z.jsx)("img", {
425
+ alt: "",
426
+ width: 32,
427
+ height: 32,
428
+ src: g,
429
+ onError: (e) => {
430
+ e.currentTarget.src = "data:image/svg+xml,%3Csvg%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M28.2534%2028.2533L27.2134%2027.2133L24.0001%2024L17.8801%2017.88L4.78677%204.78666L3.74677%203.74666C3.22677%203.22666%202.38677%203.22666%201.86677%203.74666C1.33344%204.26666%201.33344%205.10666%201.85344%205.62666L4.0001%207.77333V25.3333C4.0001%2026.8%205.2001%2028%206.66677%2028H24.2268L26.3734%2030.1467C26.8934%2030.6667%2027.7334%2030.6667%2028.2534%2030.1467C28.7734%2029.6267%2028.7734%2028.7733%2028.2534%2028.2533ZM8.02677%2024C7.46677%2024%207.1601%2023.36%207.50677%2022.92L10.8268%2018.6533C11.0934%2018.32%2011.6001%2018.3067%2011.8668%2018.64L14.6668%2022.0133L16.2268%2020L20.2268%2024H8.02677ZM28.0001%2024.2267L7.77344%203.99999H25.3334C26.8001%203.99999%2028.0001%205.19999%2028.0001%206.66666V24.2267Z%22%20fill%3D%22%23BDBDBD%22%2F%3E%0A%3C%2Fsvg%3E%0A", f?.();
431
+ },
432
+ style: {
433
+ borderRadius: 6,
434
+ marginRight: 8,
435
+ objectFit: `${w ?? "contain"}`
436
+ },
437
+ "data-testid": `big-list-item-dimension-${p}-image`,
438
+ onLoad: f,
439
+ loading: "lazy"
440
+ }),
441
+ /* @__PURE__ */ (0, Z.jsx)(Ce, {
442
+ dimensionDisplayValue: N,
443
+ measuresLabel: P,
444
+ showLabelProgress: M,
445
+ progressColor: E,
446
+ isApplied: t,
447
+ isSelected: e,
448
+ strikethrough: A && t && e,
449
+ disabled: n,
450
+ searchTerm: d,
451
+ barWidth: _e(_, C),
452
+ fontStyle: T,
453
+ responsive: D,
454
+ fontSize: u
455
+ }),
456
+ !s && c ? /* @__PURE__ */ (0, Z.jsx)(be, {
457
+ disabled: n,
458
+ isApplied: t,
459
+ isSelected: e,
460
+ isNot: A,
461
+ fontColor: T?.fontColor ?? void 0
462
+ }) : null
463
+ ]
464
+ });
465
+ }, Te = (e) => {
466
+ let t = [...e].sort((e, t) => Ee(e?.measure1 ?? void 0, t?.measure1 ?? void 0)), n = t.length > 0 ? t[0] : null;
467
+ return typeof n?.measure1 == "number" ? n : null;
468
+ }, Ee = (e, t) => {
469
+ if (e && t) {
470
+ if (e < t) return 1;
471
+ if (e > t) return -1;
472
+ } else if (e && !t) return -1;
473
+ return 0;
474
+ }, De = ({ filterValues: e, onItemClick: t, selectedValues: n, appliedValues: r, searchTerm: i, vSpec: a, hoverColor: o }) => {
475
+ let s = (0, Y.useRef)(e.length), c = x(), l = () => {
476
+ --s.current, s.current === 0 && c();
477
+ };
478
+ if (!a?.dimensions[0]?.dataItem) return null;
479
+ let u = a.dimensions[0]?.formatter, d = a.dimensions[1]?.imageFit, f = a.measures[0]?.formatter, p = a.measures[1]?.formatter, [m, h] = B(e, r), g = (e, r) => {
480
+ switch (!0) {
481
+ case n.includes(e.dimension):
482
+ t(e.dimension);
483
+ break;
484
+ case e.disabled: break;
485
+ default: t(e.dimension, { shift: r.shiftKey ? [...m, ...h].reduce((e, t) => (t.disabled || e.push(t.dimension), e), []) : null });
486
+ }
487
+ }, _ = Te(e), v = s.current > 0 ? l : void 0;
488
+ return /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [m.map((e) => /* @__PURE__ */ (0, Z.jsx)(Q, {
489
+ searchTerm: i,
490
+ disabled: !!e.disabled,
491
+ onSelect: (t) => g(e, t),
492
+ showProgressBar: a.filterSettings?.showProgressBar,
493
+ selected: n.indexOf(e.dimension) !== -1,
494
+ applied: !0,
495
+ hoverColor: o,
496
+ dimensionValue: e.dimension,
497
+ dimensionFormatter: u,
498
+ imageValue: e.image ?? void 0,
499
+ measure1Value: e.measure1,
500
+ measure1Label: a.measures[0]?.filterValueLabel,
501
+ measure1Formatter: f,
502
+ measure2Value: e.measure2,
503
+ measure2Label: a.measures[1]?.filterValueLabel,
504
+ measure2Formatter: p,
505
+ maxValue: _?.measure1,
506
+ imageFit: d,
507
+ doneRenderingCallback: v,
508
+ fontStyle: a.filterSettings?.fontStyle,
509
+ progressBarColor: a.filterSettings?.filterStyle?.progressBarColor,
510
+ responsive: a.filterSettings?.responsive
511
+ }, String(e.dimension))), h.map((e) => /* @__PURE__ */ (0, Z.jsx)(Q, {
512
+ searchTerm: i,
513
+ disabled: !!e.disabled,
514
+ onSelect: (t) => g(e, t),
515
+ showProgressBar: a.filterSettings?.showProgressBar,
516
+ selected: n.indexOf(e.dimension) !== -1,
517
+ applied: !1,
518
+ hoverColor: o,
519
+ dimensionValue: e.dimension,
520
+ dimensionFormatter: u,
521
+ imageValue: e.image ?? void 0,
522
+ measure1Value: e.measure1,
523
+ measure1Label: a.measures[0]?.filterValueLabel,
524
+ measure1Formatter: f,
525
+ measure2Value: e.measure2,
526
+ measure2Label: a.measures[1]?.filterValueLabel,
527
+ measure2Formatter: p,
528
+ maxValue: _?.measure1,
529
+ imageFit: d,
530
+ doneRenderingCallback: v,
531
+ fontStyle: a.filterSettings?.fontStyle,
532
+ progressBarColor: a.filterSettings?.filterStyle?.progressBarColor,
533
+ responsive: a.filterSettings?.responsive
534
+ }, String(e.dimension)))] });
535
+ }, Oe = h({
536
+ rowWrapper: (e) => ({
537
+ userSelect: "none",
538
+ display: "flex",
539
+ flexDirection: "row",
540
+ alignItems: "center",
541
+ justifyContent: "space-between",
542
+ boxSizing: "border-box",
543
+ height: 28,
544
+ padding: 4,
545
+ borderRadius: 5,
546
+ ...e && {
547
+ [N.md]: { height: 24 },
548
+ [N.sm]: {
549
+ height: 20,
550
+ padding: "2px 4px"
551
+ },
552
+ [N.xs]: {
553
+ height: 16,
554
+ padding: "1px 4px"
555
+ }
556
+ },
557
+ "& > span": {
558
+ flexShrink: 0,
559
+ maxWidth: "100%",
560
+ ...E.overflowEllipsis
561
+ }
562
+ }),
563
+ rowWrapperClickable: {
564
+ "&:hover": { backgroundColor: "var(--filter-hover-color)" },
565
+ cursor: "pointer"
566
+ },
567
+ rowWrapperStartAligned: { justifyContent: "flex-start" },
568
+ rowSelected: {
569
+ backgroundColor: "var(--filter-hover-color)",
570
+ "& > span": { maxWidth: "calc(100% - 20px)" }
571
+ },
572
+ rowApplied: {
573
+ backgroundColor: "initial",
574
+ "& > span": {
575
+ color: `${o.mainDarkNavy} !important`,
576
+ maxWidth: "calc(100% - 20px)"
577
+ }
578
+ },
579
+ rowDisabled: { "& span": { color: `${o.grey3} !important` } },
580
+ label: (e) => ({ ...I(e) })
581
+ }), $ = ({ selected: e, applied: t, disabled: n, hoverColor: r, dimensionValue: i, dimensionFormatter: s, searchTerm: c, onSelect: l, fontStyle: u, responsive: d, showCheckbox: f, showSelectionIcon: p = !0, checkboxState: h = "none", alignContentStart: _, fontSize: v }) => {
582
+ let y = Oe(d), b = g()?.astrato ?? a, x = z(i, s), S = (0, Y.useContext)(X), C = (S.pendingOperator ?? S.appliedOperator) === U.FilterOperator.NotInList, w = C && t && e, T = K({
583
+ ...u,
584
+ strikethrough: w
585
+ }, b);
586
+ return /* @__PURE__ */ (0, Z.jsxs)("div", {
587
+ tabIndex: 0,
588
+ role: "button",
589
+ onClick: l,
590
+ "data-testid": `small-list-item-dimension-${i}`,
591
+ className: m({
592
+ [y.rowWrapper]: !0,
593
+ [y.rowWrapperClickable]: !!l,
594
+ [y.rowWrapperStartAligned]: _,
595
+ [y.rowSelected]: e,
596
+ [y.rowApplied]: t && !e,
597
+ [y.rowDisabled]: n
598
+ }),
599
+ style: { "--filter-hover-color": r ?? o.grey5 },
600
+ children: [
601
+ f ? /* @__PURE__ */ (0, Z.jsx)("div", {
602
+ "aria-hidden": !0,
603
+ style: {
604
+ display: "flex",
605
+ alignItems: "center",
606
+ flexShrink: 0,
607
+ marginRight: 6,
608
+ pointerEvents: "none"
609
+ },
610
+ children: /* @__PURE__ */ (0, Z.jsx)(R, {
611
+ value: h,
612
+ onChange: () => void 0
613
+ })
614
+ }) : null,
615
+ /* @__PURE__ */ (0, Z.jsx)("span", {
616
+ className: y.label,
617
+ style: {
618
+ ...T,
619
+ ...v ? {
620
+ fontSize: v,
621
+ lineHeight: "14px"
622
+ } : {}
623
+ },
624
+ children: /* @__PURE__ */ (0, Z.jsx)(L, {
625
+ phrase: c ?? "",
626
+ children: x ?? ""
627
+ })
628
+ }),
629
+ f ? null : /* @__PURE__ */ (0, Z.jsx)(be, {
630
+ disabled: n,
631
+ isApplied: t,
632
+ isSelected: p && e,
633
+ isNot: C,
634
+ fontColor: u?.fontColor ?? void 0
635
+ })
636
+ ]
637
+ });
638
+ }, ke = ({ filterValues: e, onItemClick: t, selectedValues: n, appliedValues: r, searchTerm: i, vSpec: a, hoverColor: o }) => {
639
+ let s = a.dimensions[0]?.formatter;
640
+ if (!a?.dimensions[0]?.dataItem) return null;
641
+ let [c, l] = B(e, r), u = (e, r) => {
642
+ switch (!0) {
643
+ case n.includes(e.dimension):
644
+ t(e.dimension);
645
+ break;
646
+ case e.disabled: break;
647
+ default: t(e.dimension, { shift: r.shiftKey ? [...c, ...l].reduce((e, t) => (t.disabled || e.push(t.dimension), e), []) : null });
648
+ }
649
+ };
650
+ return /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [c.map((e) => /* @__PURE__ */ (0, Z.jsx)($, {
651
+ searchTerm: i,
652
+ disabled: !!e.disabled,
653
+ dimensionValue: e.dimension,
654
+ dimensionFormatter: s,
655
+ onSelect: (t) => u(e, t),
656
+ selected: n.indexOf(e.dimension) !== -1,
657
+ applied: !0,
658
+ hoverColor: o,
659
+ fontStyle: a.filterSettings?.fontStyle,
660
+ responsive: a.filterSettings?.responsive
661
+ }, `applied-${e.dimension}`)), l.map((e) => /* @__PURE__ */ (0, Z.jsx)($, {
662
+ searchTerm: i,
663
+ disabled: !!e.disabled,
664
+ dimensionValue: e.dimension,
665
+ dimensionFormatter: s,
666
+ onSelect: (t) => u(e, t),
667
+ selected: n.indexOf(e.dimension) !== -1,
668
+ applied: !1,
669
+ hoverColor: o,
670
+ fontStyle: a.filterSettings?.fontStyle,
671
+ responsive: a.filterSettings?.responsive
672
+ }, `not-applied-${e.dimension}`))] });
673
+ }, Ae = h({ dropdownContainer: {
674
+ overflow: "hidden",
675
+ backdropFilter: "blur(1.25px)",
676
+ zIndex: 1500
677
+ } }), je = ({ children: e, filterStyle: t, isLocked: n }) => {
678
+ let r = Ae(), i = q(t, n);
679
+ return /* @__PURE__ */ (0, Z.jsx)("div", {
680
+ className: r.dropdownContainer,
681
+ style: i,
682
+ children: e
683
+ });
684
+ }, Me = h({ root: {
685
+ background: o.grey5,
686
+ height: 2,
687
+ "& .MuiLinearProgress-bar": { background: o.mainDarkNavy }
688
+ } }), Ne = ({ loading: e }) => {
689
+ let t = Me();
690
+ return e ? /* @__PURE__ */ (0, Z.jsx)(ae, {
691
+ className: t.root,
692
+ "data-testid": "filter-search-progress"
693
+ }) : null;
694
+ }, Pe = h({
695
+ dropdownButton: (e) => ({
696
+ cursor: "pointer",
697
+ display: "flex",
698
+ flexDirection: "row",
699
+ alignItems: "center",
700
+ justifyContent: "space-between",
701
+ padding: 8,
702
+ height: "min(40px, 100%)",
703
+ backdropFilter: "blur(1.25px)",
704
+ "&:hover, &:focus": {
705
+ boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.1)",
706
+ outline: "none"
707
+ },
708
+ ...e && {
709
+ [N.lg]: { height: "min(28px, 100%)" },
710
+ [N.md]: {
711
+ padding: "0 4px",
712
+ height: "min(24px, 100%)"
713
+ },
714
+ [N.sm]: {
715
+ padding: "0 2px",
716
+ height: "min(20px, 100%)"
717
+ },
718
+ [N.xs]: {
719
+ padding: 0,
720
+ height: "min(16px, 100%)"
721
+ }
722
+ }
723
+ }),
724
+ headerTitlesContainer: {
725
+ color: o.grey1,
726
+ display: "flex",
727
+ alignItems: "center",
728
+ width: "100%",
729
+ minWidth: 0
730
+ },
731
+ title: (e) => ({
732
+ fontWeight: "bold !important",
733
+ flexShrink: 1,
734
+ minWidth: 0,
735
+ ...E.overflowEllipsis,
736
+ ...I(e)
737
+ }),
738
+ measureTitle: {
739
+ ...E.overflowEllipsis,
740
+ minWidth: 0,
741
+ flexShrink: 1,
742
+ whiteSpaceCollapse: "preserve"
743
+ },
744
+ valuesLabel: {
745
+ ...E.overflowEllipsis,
746
+ paddingLeft: 4,
747
+ fontWeight: "bold !important",
748
+ minWidth: 0,
749
+ flexShrink: 1
750
+ },
751
+ expandIcon: (e) => ({
752
+ display: "flex",
753
+ flexDirection: "row",
754
+ alignItems: "center",
755
+ boxSizing: "border-box",
756
+ ...e && M
757
+ }),
758
+ notPart: (e) => ({ ...J(e) })
759
+ }), Fe = ({ dimensionTitle: e, measureTitle: t, isOpen: n, onToggle: r, dimensionFormatter: i, selectedValues: o = [], fontStyle: s, filterStyle: c, responsive: l, isLocked: u }) => {
760
+ let d = g()?.astrato ?? a, f = Pe(l), p = (0, Y.useContext)(X), m = (p.pendingOperator ?? p.appliedOperator) === U.FilterOperator.NotInList, h = {
761
+ button: q(c),
762
+ label: K(s, d)
763
+ }, _ = h.label.color, v = (e) => String(typeof e == "boolean" ? e : i ? C(i, e) : e), y = [...o].sort().slice(0, 15).map(v).join(", "), b = o.length > 0;
764
+ return /* @__PURE__ */ (0, Z.jsxs)("div", {
765
+ role: "button",
766
+ tabIndex: 0,
767
+ "data-testid": "filter-header-dropdown",
768
+ className: f.dropdownButton,
769
+ onClick: (e) => {
770
+ e.currentTarget.blur(), r?.();
771
+ },
772
+ onKeyUp: (e) => {
773
+ (e.key === "Enter" || e.key === " ") && (e.stopPropagation(), e.preventDefault(), r?.());
774
+ },
775
+ style: h.button,
776
+ children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
777
+ className: f.headerTitlesContainer,
778
+ style: { color: _ },
779
+ children: [
780
+ u && /* @__PURE__ */ (0, Z.jsx)(A, {
781
+ fill: "currentColor",
782
+ style: { marginRight: 8 }
783
+ }),
784
+ m && /* @__PURE__ */ (0, Z.jsx)("div", {
785
+ className: f.notPart,
786
+ children: "NOT"
787
+ }),
788
+ /* @__PURE__ */ (0, Z.jsx)("div", {
789
+ className: f.title,
790
+ style: h.label,
791
+ children: e
792
+ }),
793
+ /* @__PURE__ */ (0, Z.jsxs)("div", {
794
+ className: f.title,
795
+ style: {
796
+ ...h.label,
797
+ display: "flex"
798
+ },
799
+ children: [/* @__PURE__ */ (0, Z.jsx)("span", {
800
+ className: f.measureTitle,
801
+ children: t
802
+ }), b && /* @__PURE__ */ (0, Z.jsxs)("div", {
803
+ className: f.valuesLabel,
804
+ children: [" ", y]
805
+ })]
806
+ })
807
+ ]
808
+ }), /* @__PURE__ */ (0, Z.jsx)("div", {
809
+ className: f.expandIcon,
810
+ style: { color: _ },
811
+ children: n ? /* @__PURE__ */ (0, Z.jsx)(k, {
812
+ size: 24,
813
+ fill: "currentColor"
814
+ }) : /* @__PURE__ */ (0, Z.jsx)(j, {
815
+ size: 24,
816
+ fill: "currentColor"
817
+ })
818
+ })]
819
+ });
820
+ }, Ie = h({
821
+ headerListbox: (e) => ({
822
+ height: 36,
823
+ margin: "0 12px 8px",
824
+ display: "flex",
825
+ alignItems: "center",
826
+ boxSizing: "border-box",
827
+ ...e && {
828
+ [N.md]: {
829
+ height: 32,
830
+ margin: "0 12px 6px"
831
+ },
832
+ [N.sm]: {
833
+ height: 28,
834
+ margin: "0 12px 4px"
835
+ },
836
+ [N.xs]: {
837
+ height: 24,
838
+ margin: "0 12px"
839
+ }
840
+ }
841
+ }),
842
+ headerListboxSearch: { flexGrow: 1 },
843
+ headerTitlesContainer: {
844
+ minWidth: 0,
845
+ color: o.grey1,
846
+ cursor: "pointer",
847
+ flexGrow: 1,
848
+ flexShrink: 1,
849
+ display: "flex",
850
+ alignItems: "center"
851
+ },
852
+ title: (e) => ({
853
+ ...E.overflowEllipsis,
854
+ fontWeight: "bold !important",
855
+ ...I(e)
856
+ }),
857
+ iconButton: (e) => ({
858
+ ...e && M,
859
+ cursor: "pointer",
860
+ display: "inline-flex",
861
+ alignItems: "center",
862
+ justifyContent: "center",
863
+ minWidth: 22,
864
+ width: 22,
865
+ height: 22,
866
+ padding: 0,
867
+ border: "none",
868
+ borderRadius: 6,
869
+ backgroundColor: "transparent",
870
+ color: "inherit",
871
+ lineHeight: 0,
872
+ "&:hover": { boxShadow: "inset 0 0 0 1px currentColor" },
873
+ "&:focus": { outline: "none" },
874
+ ...e && {
875
+ [N.md]: {
876
+ minWidth: 20,
877
+ width: 20,
878
+ height: 20,
879
+ borderRadius: 5
880
+ },
881
+ [N.sm]: {
882
+ minWidth: 16,
883
+ width: 16,
884
+ height: 16,
885
+ borderRadius: 4
886
+ },
887
+ [N.xs]: {
888
+ minWidth: 12,
889
+ width: 12,
890
+ height: 12,
891
+ borderRadius: 3
892
+ }
893
+ }
894
+ }),
895
+ notPart: (e) => ({ ...J(e) })
896
+ }), Le = ({ children: e, dimensionTitle: t, measureTitle: n, searchEnabled: r, searchTerm: i, onSearchChange: o, onApplySearched: s, fontStyle: c, vTheme: l = a, isNotEnabled: u, responsive: d, isLocked: f }) => {
897
+ let p = Ie(d), m = K(c, l), h = m.color, [g, _] = (0, Y.useState)(!1);
898
+ (0, Y.useEffect)(() => {
899
+ !r && i && o("");
900
+ }, [r]);
901
+ let v = () => {
902
+ r && _(!0);
903
+ }, y = () => {
904
+ o(""), _(!1);
905
+ }, b = () => {
906
+ s();
907
+ };
908
+ return r ? /* @__PURE__ */ (0, Z.jsx)("div", {
909
+ "data-testid": "filter-header-title",
910
+ className: p.headerListbox,
911
+ style: { color: h },
912
+ children: g ? /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [/* @__PURE__ */ (0, Z.jsx)(ie, {
913
+ responsive: d,
914
+ autoFocus: !0,
915
+ className: p.headerListboxSearch,
916
+ "data-testid": "filter-search-input",
917
+ onChange: (e) => {
918
+ o(e.target.value);
919
+ },
920
+ style: {
921
+ color: h,
922
+ borderColor: h
923
+ },
924
+ onPaste: H(o),
925
+ onKeyDown: (e) => {
926
+ switch (e.key) {
927
+ case "Enter":
928
+ b();
929
+ break;
930
+ case "Escape":
931
+ y(), o("");
932
+ break;
933
+ }
934
+ },
935
+ value: i
936
+ }), e] }) : /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [
937
+ /* @__PURE__ */ (0, Z.jsx)("button", {
938
+ "data-testid": "filter-header-show-search-button",
939
+ onClick: v,
940
+ className: p.iconButton,
941
+ style: { marginRight: 8 },
942
+ children: /* @__PURE__ */ (0, Z.jsx)(w, {
943
+ fill: "currentColor",
944
+ size: 20
945
+ })
946
+ }),
947
+ f && /* @__PURE__ */ (0, Z.jsx)(A, {
948
+ fill: "currentColor",
949
+ style: { marginRight: 8 }
950
+ }),
951
+ /* @__PURE__ */ (0, Z.jsxs)("div", {
952
+ onClick: v,
953
+ className: p.headerTitlesContainer,
954
+ children: [
955
+ u && /* @__PURE__ */ (0, Z.jsx)("div", {
956
+ className: p.notPart,
957
+ children: "NOT"
958
+ }),
959
+ /* @__PURE__ */ (0, Z.jsx)("span", {
960
+ className: p.title,
961
+ style: m,
962
+ children: t
963
+ }),
964
+ /* @__PURE__ */ (0, Z.jsx)("span", {
965
+ className: p.title,
966
+ style: {
967
+ ...m,
968
+ whiteSpaceCollapse: "preserve"
969
+ },
970
+ children: n
971
+ })
972
+ ]
973
+ }),
974
+ e
975
+ ] })
976
+ }) : /* @__PURE__ */ (0, Z.jsxs)("div", {
977
+ "data-testid": "filter-header-title",
978
+ className: p.headerListbox,
979
+ style: { color: h },
980
+ children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
981
+ className: p.headerTitlesContainer,
982
+ children: [
983
+ u && /* @__PURE__ */ (0, Z.jsx)("div", {
984
+ className: p.notPart,
985
+ children: "NOT"
986
+ }),
987
+ /* @__PURE__ */ (0, Z.jsx)("span", {
988
+ className: p.title,
989
+ style: m,
990
+ children: t
991
+ }),
992
+ /* @__PURE__ */ (0, Z.jsx)("span", {
993
+ className: p.title,
994
+ style: {
995
+ ...m,
996
+ whiteSpaceCollapse: "preserve"
997
+ },
998
+ children: n
999
+ })
1000
+ ]
1001
+ }), e]
1002
+ });
1003
+ }, Re = h({
1004
+ container: ({ responsive: e, isDropdown: t }) => ({
1005
+ margin: 0,
1006
+ padding: 0,
1007
+ ...!t && {
1008
+ height: "calc(100% - 44px)",
1009
+ ...e && {
1010
+ [N.sm]: { height: "calc(100% - 36px)" },
1011
+ [N.xs]: { height: "calc(100% - 32px)" }
1012
+ }
1013
+ }
1014
+ }),
1015
+ scrollContainer: ({ responsive: e }) => ({
1016
+ ..._.propertiesPanel,
1017
+ padding: "0 12px",
1018
+ ...e && {
1019
+ [N.md]: { padding: "0 8px" },
1020
+ [N.sm]: { padding: "0 6px" },
1021
+ [N.xs]: { padding: "0 4px" }
1022
+ }
1023
+ })
1024
+ }), ze = ({ children: e, loadMoreData: t, isDropdown: n = !1, hasSearch: r = !1, responsive: i }) => {
1025
+ let a = Re({
1026
+ responsive: i,
1027
+ isDropdown: n
1028
+ });
1029
+ return /* @__PURE__ */ (0, Z.jsx)("div", {
1030
+ className: a.container,
1031
+ "data-testid": "list-container",
1032
+ style: {
1033
+ paddingTop: n && !r ? 8 : void 0,
1034
+ paddingBottom: n ? 8 : void 0
1035
+ },
1036
+ children: /* @__PURE__ */ (0, Z.jsx)("div", {
1037
+ className: a.scrollContainer,
1038
+ style: {
1039
+ height: n ? void 0 : "100%",
1040
+ maxHeight: n ? 330 - (r ? 40 : 0) : void 0
1041
+ },
1042
+ onScroll: (e) => {
1043
+ let { scrollHeight: n, clientHeight: r, scrollTop: i } = e.currentTarget;
1044
+ oe(n, r, i) && t();
1045
+ },
1046
+ children: e
1047
+ })
1048
+ });
1049
+ }, Be = h({
1050
+ mainFilterContainer: {
1051
+ width: "100%",
1052
+ height: "100%",
1053
+ overflow: "hidden"
1054
+ },
1055
+ blurBackground: { backdropFilter: "blur(1.25px)" },
1056
+ noBorder: { border: "none !important" }
1057
+ }), Ve = ({ children: e, noBorder: t, blurBackground: n, filterStyle: r, fontSize: i }) => {
1058
+ let a = Be(), o = q(r);
1059
+ return /* @__PURE__ */ (0, Z.jsx)("div", {
1060
+ className: m({
1061
+ [a.mainFilterContainer]: !0,
1062
+ [a.noBorder]: t,
1063
+ [a.blurBackground]: n
1064
+ }),
1065
+ style: {
1066
+ ...o,
1067
+ fontSize: i ? `${i}px` : void 0
1068
+ },
1069
+ children: e
1070
+ });
1071
+ };
1072
+ export { ce as _, Ne as a, $ as c, X as d, he as f, ue as g, H as h, Fe as i, De as l, fe as m, ze as n, je as o, me as p, Le as r, ke as s, Ve as t, Q as u, oe as v };