@astrato-io/visualizations 0.0.0-stage → 0.6.4

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 (145) 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 +8387 -0
  5. package/VISUALIZATION_DEFINITIONS.md +2378 -0
  6. package/chunks/LinearProgress-CUZ0D8_t.js +253 -0
  7. package/chunks/Radio-Ciu-F4CU.js +957 -0
  8. package/chunks/ToggleButton-BCJc3Jlc.js +153 -0
  9. package/chunks/_baseFlatten-DPXPOrea.js +7076 -0
  10. package/chunks/accessors-DemrDevR.js +128 -0
  11. package/chunks/app-filter-bar.compiler-j_CVoWTa.js +55 -0
  12. package/chunks/bar.compiler-oqaPzIut.js +370 -0
  13. package/chunks/color-settings-ZIvgNTq1.js +10 -0
  14. package/chunks/coloring-C16AUZEi.js +663 -0
  15. package/chunks/data-item-resolution-1lvYB5ln.js +53 -0
  16. package/chunks/debounce-fn-CUixuz45.js +7 -0
  17. package/chunks/escobar-BGqT1EsE.js +34580 -0
  18. package/chunks/event-bus-KiSiCJrC.js +2683 -0
  19. package/chunks/events-WZut5Ow6.js +4 -0
  20. package/chunks/extend-BKUkc4_i.js +37 -0
  21. package/chunks/filter.compiler-CuLtc_02.js +60 -0
  22. package/chunks/filtering-Yq4DEa0t.js +953 -0
  23. package/chunks/gauge-target-type-BkKXAqkX.js +4 -0
  24. package/chunks/grouping-type-BX_9Ix5q.js +3 -0
  25. package/chunks/interfaces-VUY4_yVO.js +8742 -0
  26. package/chunks/line-settings-DfYTUyPz.js +4 -0
  27. package/chunks/line.compiler-BpA_6Tc7.js +188 -0
  28. package/chunks/metadata-CPXdYoln.js +28 -0
  29. package/chunks/number.compiler-DbkWcG4S.js +44 -0
  30. package/chunks/pie-uv42Eqal.js +10 -0
  31. package/chunks/range-DrzdfBX4.js +22 -0
  32. package/chunks/registry-CExpGJ1N.js +920 -0
  33. package/chunks/requirements-DNhuShLS.js +6 -0
  34. package/chunks/rolldown-runtime-DleVn1XH.js +28 -0
  35. package/chunks/set-coloring-datafield-B3uIS1Pe.js +8 -0
  36. package/chunks/shared-CKDL4hx9.js +1171 -0
  37. package/chunks/src-BC7cGcJ-.js +2024 -0
  38. package/chunks/src-BOS6SqkZ.js +67 -0
  39. package/chunks/src-C0LgoUWY.js +26105 -0
  40. package/chunks/src-Cum_2NLV.js +12145 -0
  41. package/chunks/src-D9XogOrc.js +422 -0
  42. package/chunks/src-Dun_jXtz.js +10295 -0
  43. package/chunks/src-DvX5LU9T.js +14742 -0
  44. package/chunks/standalone-87YV_m9n.js +687 -0
  45. package/chunks/standalone-BDCwI6Hn.js +4619 -0
  46. package/chunks/standalone-BH5NqDwp.js +1763 -0
  47. package/chunks/standalone-BLVAWLNJ.js +385 -0
  48. package/chunks/standalone-BPomtAVs.js +2 -0
  49. package/chunks/standalone-BXyBcUOQ.js +2 -0
  50. package/chunks/standalone-BYm1UjLr.js +140 -0
  51. package/chunks/standalone-BllF4rDp.js +383 -0
  52. package/chunks/standalone-BmfMt74U.js +726 -0
  53. package/chunks/standalone-BqWyrnZI.js +281 -0
  54. package/chunks/standalone-C85u7U6I.js +340 -0
  55. package/chunks/standalone-CCNtaJ7s.js +741 -0
  56. package/chunks/standalone-CDQnr6qT.js +345 -0
  57. package/chunks/standalone-CNyNHKVx.js +674 -0
  58. package/chunks/standalone-CY57qwZ-.js +1129 -0
  59. package/chunks/standalone-CZynjFG7.js +12979 -0
  60. package/chunks/standalone-D5vnf-9y.js +3943 -0
  61. package/chunks/standalone-DFPva_ku.js +299 -0
  62. package/chunks/standalone-DQxxNwF8.js +675 -0
  63. package/chunks/standalone-DS9T0FZ-.js +830 -0
  64. package/chunks/standalone-Dx3MLlrO.js +512 -0
  65. package/chunks/standalone-DzixzZAL.js +411 -0
  66. package/chunks/standalone-QJ1kKMnO.js +6 -0
  67. package/chunks/standalone-jiz0L2Dg.js +3855 -0
  68. package/chunks/standalone-lBm9hQ-q.js +179 -0
  69. package/chunks/standalone-rJ45Zfl1.js +68 -0
  70. package/chunks/stroke-dash-UgMEcCS4.js +6 -0
  71. package/chunks/table.compiler-BrXkm4Fz.js +213 -0
  72. package/chunks/toInteger-DVZr-D1j.js +11 -0
  73. package/chunks/treemap-x_zmJoG7.js +23 -0
  74. package/chunks/typeof-CJDtcySz.js +13 -0
  75. package/chunks/types-dVVCsDWD.js +4 -0
  76. package/chunks/ui-D1HQNIBy.js +54039 -0
  77. package/chunks/url-utils-B17gj_mr.js +5501 -0
  78. package/chunks/useFieldName-oqQ3bvnO.js +7 -0
  79. package/chunks/utils-Ba9T0TqC.js +31097 -0
  80. package/chunks/view-CLqWMV7Z.js +156 -0
  81. package/definitions.js +3 -0
  82. package/docs/operations/astrato-app-filter-bar.md +161 -0
  83. package/docs/operations/bar.md +7050 -0
  84. package/docs/operations/combo.md +5825 -0
  85. package/docs/operations/date-picker.md +644 -0
  86. package/docs/operations/distribution-gauge.md +3218 -0
  87. package/docs/operations/dot.md +5662 -0
  88. package/docs/operations/filter.md +1507 -0
  89. package/docs/operations/gauge.md +3452 -0
  90. package/docs/operations/heatMap.md +6026 -0
  91. package/docs/operations/histogram.md +1870 -0
  92. package/docs/operations/iframe.md +56 -0
  93. package/docs/operations/image.md +177 -0
  94. package/docs/operations/index.md +46 -0
  95. package/docs/operations/line.md +6468 -0
  96. package/docs/operations/number.md +3969 -0
  97. package/docs/operations/pie.md +6089 -0
  98. package/docs/operations/radar.md +4646 -0
  99. package/docs/operations/sankey.md +3210 -0
  100. package/docs/operations/scatter.md +6075 -0
  101. package/docs/operations/shape.md +315 -0
  102. package/docs/operations/simpleTextObject.md +706 -0
  103. package/docs/operations/slider.md +230 -0
  104. package/docs/operations/table.md +8790 -0
  105. package/docs/operations/tree.md +2874 -0
  106. package/docs/operations/treemap.md +3619 -0
  107. package/docs/operations/waterfall.md +2938 -0
  108. package/docs/operations/word-cloud.md +3071 -0
  109. package/getters.js +18 -0
  110. package/index.js +1183 -0
  111. package/metadata.js +20 -0
  112. package/operations.js +64 -0
  113. package/package.json +191 -4
  114. package/src/definitions/index.d.ts +2 -0
  115. package/src/definitions/shared/index.d.ts +5 -0
  116. package/src/definitions/shared/lib/available-fields.d.ts +36 -0
  117. package/src/definitions/shared/lib/compilers/index.d.ts +7 -0
  118. package/src/definitions/shared/lib/registry/compile.d.ts +2 -0
  119. package/src/definitions/shared/lib/registry/descriptor-registry.d.ts +587 -0
  120. package/src/definitions/shared/lib/registry/index.d.ts +3 -0
  121. package/src/definitions/shared/lib/registry/validation.d.ts +3 -0
  122. package/src/definitions/shared/lib/schemas/app-filter-bar.schema.d.ts +22 -0
  123. package/src/definitions/shared/lib/schemas/bar.schema.d.ts +73 -0
  124. package/src/definitions/shared/lib/schemas/broad-chart.schema.d.ts +68 -0
  125. package/src/definitions/shared/lib/schemas/common.schema.d.ts +304 -0
  126. package/src/definitions/shared/lib/schemas/filter.schema.d.ts +22 -0
  127. package/src/definitions/shared/lib/schemas/index.d.ts +9 -0
  128. package/src/definitions/shared/lib/schemas/line.schema.d.ts +72 -0
  129. package/src/definitions/shared/lib/schemas/number.schema.d.ts +21 -0
  130. package/src/definitions/shared/lib/schemas/object.schema.d.ts +215 -0
  131. package/src/definitions/shared/lib/schemas/table.schema.d.ts +458 -0
  132. package/src/definitions/shared/lib/types/compilation.types.d.ts +36 -0
  133. package/src/definitions/shared/lib/types/definition.types.d.ts +2 -0
  134. package/src/definitions/shared/lib/types/descriptor.types.d.ts +39 -0
  135. package/src/definitions/shared/lib/types/index.d.ts +3 -0
  136. package/src/getters/index.d.ts +30 -0
  137. package/src/index.d.ts +4 -0
  138. package/src/metadata/index.d.ts +4 -0
  139. package/src/operations/index.d.ts +30 -0
  140. package/src/registry/index.d.ts +6 -0
  141. package/src/runtime/index.d.ts +2 -0
  142. package/src/types.d.ts +307 -0
  143. package/src/visualization-catalog.d.ts +82 -0
  144. package/src/web-components/index.d.ts +12 -0
  145. package/styles.css +2 -0
@@ -0,0 +1,953 @@
1
+ import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
+ import { Oa as t, Sr as n, Ta as r, Wn as i, Xr as a, Yn as o, ba as s, ds as c, fa as l, n as u, qo as d, t as f, ui as p, xa as m } from "./interfaces-VUY4_yVO.js";
3
+ import { G as h, K as g, Ki as _, Nn as v, Sr as y, bi as b, d as x, gi as S, pi as C, pn as w, pr as T, wi as E, yi as D } from "./utils-Ba9T0TqC.js";
4
+ import { _ as O, g as ee, h as te, n as ne, v as k } from "./ui-D1HQNIBy.js";
5
+ import { C as A, S as j, w as M } from "./_baseFlatten-DPXPOrea.js";
6
+ import { o as N, r as re } from "./Radio-Ciu-F4CU.js";
7
+ import { t as ie } from "./LinearProgress-CUZ0D8_t.js";
8
+ var P = (e, t, n) => Math.ceil(t) + Math.ceil(n) >= Math.floor(e) && n > 0, F = (e, t) => t && !a(t) ? String(w(t, e)) : e === !0 ? "True" : e === !1 ? "False" : e === null ? "-" : String(e), ae = /* @__PURE__ */ e(ne()), I = (e, t) => {
9
+ let [n, r] = (0, ae.default)(e, (e) => t.indexOf(e.dimension) !== -1);
10
+ return [n, r];
11
+ }, oe = (e) => [o(e?.dimensions[0]) ?? (e?.dimensions[0]?.label || e?.dimensions[0]?.dataItem.name || "Sample"), e?.measures[0] && e?.filterSettings?.showMeasureLabel ? ` | ${o(e?.measures[0]) || e?.measures[0]?.label || e?.measures[0]?.dataItem.name}` : null], L = (e) => async (t) => {
12
+ t.preventDefault(), t.stopPropagation(), e((t.clipboardData.getData("Text") || await navigator.clipboard.readText()).replaceAll("\r\n", " ").replaceAll("\r", " ").replaceAll("\n", " "));
13
+ }, R = c(), se = (e) => {
14
+ if (!e.length) return [];
15
+ if (e.length === 1) return [e[0], e[0]];
16
+ let t = Infinity, n = -Infinity;
17
+ return e.forEach((e) => {
18
+ t > e && (t = e), n < e && (n = e);
19
+ }), [t, n];
20
+ }, z = p("getToRangeSelectionHandler", "#cbacba"), ce = (e, t) => async () => {
21
+ let n = e.selection.getActiveSelection(R.FilterType.VALUE), r = structuredClone(n), i = r.applied.find((e) => e.field.name === t.name && e.field.view === t.view);
22
+ if (i ||= r.pending.find((e) => e.field.name === t.name && e.field.view === t.view), !i) {
23
+ let n = R.FilterOperator.Between;
24
+ r.pending.push({
25
+ operator: n,
26
+ field: {
27
+ name: t.name,
28
+ view: t.view,
29
+ schema: t.schema
30
+ },
31
+ values: []
32
+ }), e.selection.setNewSelectionState(r);
33
+ return;
34
+ }
35
+ if (i.operator = i.operator === R.FilterOperator.InList ? R.FilterOperator.Between : R.FilterOperator.NotBetween, (i.values ?? []).length === 0) {
36
+ e.selection.declineSelection(i), e.selection.removeSelection(i);
37
+ let n = {
38
+ dimensions: [],
39
+ measures: [{
40
+ fieldKeys: [t.key],
41
+ aggregation: "MIN",
42
+ filters: []
43
+ }, {
44
+ fieldKeys: [t.key],
45
+ aggregation: "MAX",
46
+ filters: []
47
+ }]
48
+ }, a = e.engine;
49
+ if (!a) {
50
+ z.error("There is no data engine available");
51
+ return;
52
+ }
53
+ 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;
54
+ if (s === null || c === null) {
55
+ z.error("There is something wrong with the min/max data");
56
+ return;
57
+ }
58
+ return i.values = [s, c], e.selection.setNewSelectionState(r, R.FilterType.VALUE), i.operator;
59
+ }
60
+ return i.values = se(i.values), e.selection.setNewSelectionState(r, R.FilterType.VALUE), i.operator;
61
+ }, B = p("getToValueSelectionHandler", "#cbacba"), le = i(n()), V = (e, t, n, r, i) => async () => {
62
+ let a = n ?? le, o = e.selection.getActiveSelection(R.FilterType.VALUE), s = structuredClone(o), c = s.pending.find((e) => e.field.name === t.name && e.field.view === t.view);
63
+ if (c ||= s.applied.find((e) => e.field.name === t.name && e.field.view === t.view), !c) {
64
+ B.warn("There was no selection connected to clicked field!", JSON.stringify(t));
65
+ return;
66
+ }
67
+ if (r) return c.operator = R.FilterOperator.InList, c.values = [], delete c.dynamicDateRange, delete c.dynamicDateCalcRange, e.selection.setNewSelectionState(s, R.FilterType.VALUE), c.operator;
68
+ if ([R.FilterOperator.InList, R.FilterOperator.NotInList].includes(c.operator)) return c.operator;
69
+ if ([R.FilterOperator.Like, R.FilterOperator.NotLike].includes(c.operator)) {
70
+ let n = c.values;
71
+ if (c.operator = c.operator === R.FilterOperator.Like ? R.FilterOperator.InList : R.FilterOperator.NotInList, n?.length) {
72
+ let r = {
73
+ dimensions: [{ fieldKey: t.key }],
74
+ limit: a + 1,
75
+ measures: [],
76
+ filters: [{
77
+ fieldKey: t.key,
78
+ operator: R.FilterOperator.Like,
79
+ values: n
80
+ }]
81
+ }, o = e.engine;
82
+ if (!o) {
83
+ B.error("There is no data engine available");
84
+ return;
85
+ }
86
+ let { data: l, meta: u } = await o.getData(r);
87
+ if (u.rows >= a + 1) return c.values = [], e.selection.setNewSelectionState(s, R.FilterType.VALUE), i?.(c.operator, String(n[0] ?? "")), c.operator;
88
+ c.values = Object.values(l).flat();
89
+ }
90
+ return e.selection.setNewSelectionState(s, R.FilterType.VALUE), c.operator;
91
+ }
92
+ c.operator = c.operator === R.FilterOperator.Between ? R.FilterOperator.InList : R.FilterOperator.NotInList;
93
+ let l = {
94
+ dimensions: [{ fieldKey: t.key }],
95
+ limit: a,
96
+ measures: [],
97
+ filters: []
98
+ };
99
+ c.values && (l.filters?.push({
100
+ fieldKey: t.key,
101
+ operator: R.FilterOperator.Between,
102
+ values: c.values
103
+ }), l.limit = a + 1);
104
+ let u = e.engine;
105
+ if (!u) {
106
+ B.error("There is no data engine available");
107
+ return;
108
+ }
109
+ let { data: d, meta: f } = await u.getData(l);
110
+ return f.rows >= a + 1 ? (e.daedalus.emitEvent(R.AstratoEvents.SHOW_GLOBAL_NOTIFICATION, {
111
+ type: "warn",
112
+ message: "Cannot change the selection type, because too many values would have to be selected!"
113
+ }), c.operator) : (c.values = Object.values(d).flat(), e.selection.setNewSelectionState(s, R.FilterType.VALUE), c.operator);
114
+ }, H = (e, t) => (n) => {
115
+ let r = e.selection.getActiveSelection(R.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);
116
+ if (o ||= i.pending.find((e) => e.field.name === t.name && e.field.view === t.view), !o) {
117
+ let n = R.FilterOperator.Like;
118
+ return i.pending.push({
119
+ operator: n,
120
+ field: {
121
+ name: t.name,
122
+ view: t.view,
123
+ schema: t.schema
124
+ },
125
+ values: a
126
+ }), e.selection.setNewSelectionState(i), n;
127
+ }
128
+ return o.operator === R.FilterOperator.InList ? (o.operator = R.FilterOperator.Like, o.values = a) : o.operator === R.FilterOperator.NotInList ? (o.operator = R.FilterOperator.NotLike, o.values = a) : (o.operator = o.operator === R.FilterOperator.NotLike ? R.FilterOperator.NotLike : R.FilterOperator.Like, o.values = a.length ? a : o.values), e.selection.setNewSelectionState(i, R.FilterType.VALUE), o.operator;
129
+ }, U = (e, t) => ({
130
+ fontFamily: m(t, e?.fontFamily) ?? void 0,
131
+ fontStyle: e?.italic ? "italic" : "normal",
132
+ fontWeight: e?.bold ? "bold" : "normal",
133
+ textDecoration: `${e?.underlined ? "underline" : ""} ${e?.strikethrough ? "line-through" : ""}`,
134
+ color: s(t, e?.fontColor)
135
+ }), W = (e) => e === d.Line ? "solid" : "dashed", G = (e, t) => {
136
+ let { backgroundColor: n, borderColor: r, borderEnabled: i, borderRadius: a, borderStyle: o, borderWidth: s } = {
137
+ ...l,
138
+ ...e
139
+ }, c = "0px";
140
+ return i && (c = `${a}px`, t && (c = `${a}px ${a}px 0 0`)), {
141
+ backgroundColor: n,
142
+ border: i ? `${s}px ${W(o)} ${r}` : "none",
143
+ borderRadius: c
144
+ };
145
+ };
146
+ function K(e) {
147
+ return {
148
+ boxSizing: "border-box",
149
+ alignItems: "center",
150
+ cursor: "pointer",
151
+ height: 24,
152
+ padding: "3px 6px",
153
+ border: `1px solid ${t.grey4}`,
154
+ borderRadius: 16,
155
+ display: "flex",
156
+ marginRight: 4,
157
+ flexShrink: 0,
158
+ backgroundColor: t.mainBrightPink,
159
+ color: t.white,
160
+ ...u.bold11,
161
+ ...u.overflowEllipsis,
162
+ "&:hover": { borderColor: t.grey2 },
163
+ ...e && {
164
+ [M.md]: {
165
+ height: 20,
166
+ padding: "2px 6px",
167
+ ...u.bold10
168
+ },
169
+ [M.sm]: {
170
+ height: 16,
171
+ padding: "1px 4px",
172
+ ...u.normal10
173
+ },
174
+ [M.xs]: {
175
+ height: 12,
176
+ padding: "0px 4px",
177
+ fontSize: 8,
178
+ lineHeight: "10px"
179
+ }
180
+ }
181
+ };
182
+ }
183
+ var q = /* @__PURE__ */ e(_()), J = (0, q.createContext)({});
184
+ q.forwardRef(function(e, t) {
185
+ return q.createElement("img", {
186
+ ...e,
187
+ ref: t,
188
+ 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"
189
+ });
190
+ });
191
+ var ue = (e, t) => typeof e == "number" && typeof t == "number" ? e / t : 0, de = (e, t, n, r, i, a) => {
192
+ let o = "";
193
+ if (e) {
194
+ t && (o += `${t}: `);
195
+ let r = F(e, n);
196
+ o += r;
197
+ }
198
+ if (r) {
199
+ e && (o += " | "), i && (o += `${i}: `);
200
+ let t = F(r, a);
201
+ o += t;
202
+ }
203
+ return o;
204
+ }, Y = E(), X = h({ iconContainer: {
205
+ width: 16,
206
+ flexShrink: 0
207
+ } }), Z = ({ disabled: e, isApplied: n, isSelected: r, isNot: i, fontColor: a }) => {
208
+ let o = X(), s = a ?? (n ? t.mainDarkNavy : void 0);
209
+ return /* @__PURE__ */ (0, Y.jsxs)("div", {
210
+ className: o.iconContainer,
211
+ style: { opacity: e ? .25 : void 0 },
212
+ children: [r && i ? /* @__PURE__ */ (0, Y.jsx)(C, { fill: t.mainBrightPink }) : null, r && !i ? /* @__PURE__ */ (0, Y.jsx)(b, { fill: s }) : null]
213
+ });
214
+ }, fe = (e) => {
215
+ let { r: t, g: n, b: r, a: i } = ee(e) ? te(e) : k(e), a = (i ?? 1) * .6;
216
+ return O({
217
+ r: t,
218
+ g: n,
219
+ b: r,
220
+ a: a < 0 ? 0 : a
221
+ });
222
+ }, pe = h({
223
+ progressBar: {
224
+ height: "100%",
225
+ borderRadius: "4px",
226
+ position: "absolute",
227
+ bottom: 1,
228
+ top: 1
229
+ },
230
+ progressBarSelectedOrApplied: { color: t.mainDarkNavy },
231
+ labelsContainer: {
232
+ display: "flex",
233
+ flexDirection: "row",
234
+ justifyContent: "space-between",
235
+ alignItems: "center",
236
+ width: "100%",
237
+ height: "100%",
238
+ overflow: "hidden",
239
+ position: "relative",
240
+ "&:hover": {
241
+ color: t.mainDarkNavy,
242
+ "& > div": { backgroundColor: t.grey5 }
243
+ }
244
+ },
245
+ label: (e) => ({
246
+ ...u.normal11,
247
+ ...u.overflowEllipsis,
248
+ color: "inherit",
249
+ marginRight: "5px",
250
+ height: "100%",
251
+ zIndex: 1,
252
+ display: "inline-flex",
253
+ alignItems: "center",
254
+ ...j(e)
255
+ }),
256
+ dimensionLabel: {
257
+ paddingLeft: 4,
258
+ flexGrow: 1,
259
+ flexShrink: 0
260
+ },
261
+ measuresLabel: {
262
+ flexGrow: 0,
263
+ flexShrink: 1
264
+ },
265
+ rowDisabled: { color: t.grey3 }
266
+ }), me = ({ dimensionDisplayValue: e, measuresLabel: n, showLabelProgress: i, isSelected: a, isApplied: o, disabled: s, searchTerm: c, barWidth: l, fontStyle: u, progressColor: d = t.lightBlue, textAlign: f, responsive: p }) => {
267
+ let m = pe(p), h = {
268
+ ...U(u, g()?.astrato ?? r),
269
+ ...f ? {
270
+ textAlign: f,
271
+ justifyContent: f === "right" ? "flex-end" : f === "center" ? "center" : "flex-start"
272
+ } : {}
273
+ }, _ = a || o ? d : fe(d);
274
+ return /* @__PURE__ */ (0, Y.jsxs)("div", {
275
+ className: v({
276
+ [m.labelsContainer]: !0,
277
+ [m.progressBarSelectedOrApplied]: a || o
278
+ }),
279
+ children: [
280
+ i && /* @__PURE__ */ (0, Y.jsx)("div", {
281
+ style: {
282
+ width: `${l * 100}%`,
283
+ backgroundColor: _
284
+ },
285
+ className: v({
286
+ [m.progressBar]: !0,
287
+ [m.rowDisabled]: s
288
+ }),
289
+ "data-testid": "item-list-label-progress"
290
+ }),
291
+ /* @__PURE__ */ (0, Y.jsx)("span", {
292
+ style: h,
293
+ className: v(m.label, m.dimensionLabel),
294
+ title: e,
295
+ children: /* @__PURE__ */ (0, Y.jsx)(N, {
296
+ phrase: c ?? "",
297
+ children: e ?? ""
298
+ })
299
+ }),
300
+ /* @__PURE__ */ (0, Y.jsx)("span", {
301
+ style: h,
302
+ className: v(m.label, m.measuresLabel),
303
+ children: n
304
+ })
305
+ ]
306
+ });
307
+ }, he = h({
308
+ rowWrapper: (e) => ({
309
+ cursor: "pointer",
310
+ userSelect: "none",
311
+ display: "flex",
312
+ flexDirection: "row",
313
+ alignItems: "center",
314
+ height: "32px",
315
+ boxSizing: "border-box",
316
+ borderRadius: 6,
317
+ paddingRight: 8,
318
+ ...e && {
319
+ [M.md]: {
320
+ height: "24px",
321
+ paddingRight: 6
322
+ },
323
+ [M.sm]: {
324
+ height: "20px",
325
+ paddingRight: 4
326
+ },
327
+ [M.xs]: {
328
+ height: "16px",
329
+ paddingRight: 2
330
+ }
331
+ }
332
+ }),
333
+ rowSelected: { backgroundColor: "var(--filter-hover-color)" },
334
+ rowHover: { "&:hover": { backgroundColor: "var(--filter-hover-color)" } },
335
+ rowApplied: {
336
+ backgroundColor: "initial",
337
+ "& > div > span": { color: `${t.mainDarkNavy} !important` }
338
+ },
339
+ rowDisabled: { "& span": { color: `${t.grey3} !important` } }
340
+ }), Q = ({ selected: e, applied: n, disabled: r, hoverColor: i, onSelect: a, showProgressBar: o, searchTerm: s, doneRenderingCallback: c, dimensionValue: l, dimensionFormatter: u, imageValue: d, measure1Value: f, measure1Label: p, measure1Formatter: m, measure2Value: h, measure2Label: g, measure2Formatter: _, maxValue: y, imageFit: b, fontStyle: x, progressBarColor: S, responsive: C }) => {
341
+ let w = he(C), T = !!d, E = o && f !== void 0 && !h, D = F(l, u), O = de(f, p, m, h, g, _);
342
+ return (0, q.useEffect)(() => {
343
+ T || c?.();
344
+ }, []), /* @__PURE__ */ (0, Y.jsxs)("div", {
345
+ tabIndex: 0,
346
+ role: "button",
347
+ onClick: a,
348
+ "data-testid": `big-list-item-dimension-${l}`,
349
+ className: v({
350
+ [w.rowWrapper]: !0,
351
+ [w.rowHover]: !E,
352
+ [w.rowSelected]: !E && e,
353
+ [w.rowApplied]: n && !r,
354
+ [w.rowDisabled]: r
355
+ }),
356
+ style: { "--filter-hover-color": i ?? t.grey5 },
357
+ children: [
358
+ T && /* @__PURE__ */ (0, Y.jsx)("img", {
359
+ alt: "",
360
+ width: 32,
361
+ height: 32,
362
+ src: d,
363
+ onError: (e) => {
364
+ 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", c?.();
365
+ },
366
+ style: {
367
+ borderRadius: 6,
368
+ marginRight: 8,
369
+ objectFit: `${b ?? "contain"}`
370
+ },
371
+ "data-testid": `big-list-item-dimension-${l}-image`,
372
+ onLoad: c,
373
+ loading: "lazy"
374
+ }),
375
+ /* @__PURE__ */ (0, Y.jsx)(me, {
376
+ dimensionDisplayValue: D,
377
+ measuresLabel: O,
378
+ showLabelProgress: E,
379
+ progressColor: S,
380
+ isApplied: n,
381
+ isSelected: e,
382
+ disabled: r,
383
+ searchTerm: s,
384
+ barWidth: ue(f, y),
385
+ fontStyle: x,
386
+ responsive: C
387
+ }),
388
+ /* @__PURE__ */ (0, Y.jsx)(Z, {
389
+ disabled: r,
390
+ isApplied: n,
391
+ isSelected: e,
392
+ fontColor: x?.fontColor ?? void 0
393
+ })
394
+ ]
395
+ });
396
+ }, ge = (e) => {
397
+ let t = [...e].sort((e, t) => _e(e?.measure1 ?? void 0, t?.measure1 ?? void 0)), n = t.length > 0 ? t[0] : null;
398
+ return typeof n?.measure1 == "number" ? n : null;
399
+ }, _e = (e, t) => {
400
+ if (e && t) {
401
+ if (e < t) return 1;
402
+ if (e > t) return -1;
403
+ } else if (e && !t) return -1;
404
+ return 0;
405
+ }, ve = ({ filterValues: e, onItemClick: t, selectedValues: n, appliedValues: r, searchTerm: i, vSpec: a, hoverColor: o }) => {
406
+ let s = (0, q.useRef)(e.length), c = x(), l = () => {
407
+ --s.current, s.current === 0 && c();
408
+ };
409
+ if (!a?.dimensions[0]?.dataItem) return null;
410
+ let u = a.dimensions[0]?.formatter, d = a.dimensions[1]?.imageFit, f = a.measures[0]?.formatter, p = a.measures[1]?.formatter, [m, h] = I(e, r), g = (e, r) => {
411
+ switch (!0) {
412
+ case n.includes(e.dimension):
413
+ t(e.dimension);
414
+ break;
415
+ case e.disabled: break;
416
+ default: t(e.dimension, { shift: r.shiftKey ? [...m, ...h].reduce((e, t) => (t.disabled || e.push(t.dimension), e), []) : null });
417
+ }
418
+ }, _ = ge(e), v = s.current > 0 ? l : void 0;
419
+ return /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [m.map((e) => /* @__PURE__ */ (0, Y.jsx)(Q, {
420
+ searchTerm: i,
421
+ disabled: !!e.disabled,
422
+ onSelect: (t) => g(e, t),
423
+ showProgressBar: a.filterSettings?.showProgressBar,
424
+ selected: n.indexOf(e.dimension) !== -1,
425
+ applied: !0,
426
+ hoverColor: o,
427
+ dimensionValue: e.dimension,
428
+ dimensionFormatter: u,
429
+ imageValue: e.image ?? void 0,
430
+ measure1Value: e.measure1,
431
+ measure1Label: a.measures[0]?.filterValueLabel,
432
+ measure1Formatter: f,
433
+ measure2Value: e.measure2,
434
+ measure2Label: a.measures[1]?.filterValueLabel,
435
+ measure2Formatter: p,
436
+ maxValue: _?.measure1,
437
+ imageFit: d,
438
+ doneRenderingCallback: v,
439
+ fontStyle: a.filterSettings?.fontStyle,
440
+ progressBarColor: a.filterSettings?.filterStyle?.progressBarColor,
441
+ responsive: a.filterSettings?.responsive
442
+ }, String(e.dimension))), h.map((e) => /* @__PURE__ */ (0, Y.jsx)(Q, {
443
+ searchTerm: i,
444
+ disabled: !!e.disabled,
445
+ onSelect: (t) => g(e, t),
446
+ showProgressBar: a.filterSettings?.showProgressBar,
447
+ selected: n.indexOf(e.dimension) !== -1,
448
+ applied: !1,
449
+ hoverColor: o,
450
+ dimensionValue: e.dimension,
451
+ dimensionFormatter: u,
452
+ imageValue: e.image ?? void 0,
453
+ measure1Value: e.measure1,
454
+ measure1Label: a.measures[0]?.filterValueLabel,
455
+ measure1Formatter: f,
456
+ measure2Value: e.measure2,
457
+ measure2Label: a.measures[1]?.filterValueLabel,
458
+ measure2Formatter: p,
459
+ maxValue: _?.measure1,
460
+ imageFit: d,
461
+ doneRenderingCallback: v,
462
+ fontStyle: a.filterSettings?.fontStyle,
463
+ progressBarColor: a.filterSettings?.filterStyle?.progressBarColor,
464
+ responsive: a.filterSettings?.responsive
465
+ }, String(e.dimension)))] });
466
+ }, ye = h({
467
+ rowWrapper: (e) => ({
468
+ userSelect: "none",
469
+ display: "flex",
470
+ flexDirection: "row",
471
+ alignItems: "center",
472
+ justifyContent: "space-between",
473
+ boxSizing: "border-box",
474
+ height: 28,
475
+ padding: 4,
476
+ borderRadius: 5,
477
+ ...e && {
478
+ [M.md]: { height: 24 },
479
+ [M.sm]: {
480
+ height: 20,
481
+ padding: "2px 4px"
482
+ },
483
+ [M.xs]: {
484
+ height: 16,
485
+ padding: "1px 4px"
486
+ }
487
+ },
488
+ "& > span": {
489
+ flexShrink: 0,
490
+ maxWidth: "100%",
491
+ ...u.overflowEllipsis
492
+ }
493
+ }),
494
+ rowWrapperClickable: {
495
+ "&:hover": { backgroundColor: "var(--filter-hover-color)" },
496
+ cursor: "pointer"
497
+ },
498
+ rowSelected: {
499
+ backgroundColor: "var(--filter-hover-color)",
500
+ "& > span": { maxWidth: "calc(100% - 20px)" }
501
+ },
502
+ rowApplied: {
503
+ backgroundColor: "initial",
504
+ "& > span": {
505
+ color: `${t.mainDarkNavy} !important`,
506
+ maxWidth: "calc(100% - 20px)"
507
+ }
508
+ },
509
+ rowDisabled: { "& span": { color: `${t.grey3} !important` } },
510
+ label: (e) => ({ ...j(e) })
511
+ }), $ = ({ selected: e, applied: n, disabled: i, hoverColor: a, dimensionValue: o, dimensionFormatter: s, searchTerm: c, onSelect: l, fontStyle: u, responsive: d }) => {
512
+ let f = ye(d), p = g()?.astrato ?? r, m = F(o, s), h = (0, q.useContext)(J), _ = (h.pendingOperator ?? h.appliedOperator) === R.FilterOperator.NotInList, y = _ && n && e, b = U({
513
+ ...u,
514
+ strikethrough: y
515
+ }, p);
516
+ return /* @__PURE__ */ (0, Y.jsxs)("div", {
517
+ tabIndex: 0,
518
+ role: "button",
519
+ onClick: l,
520
+ "data-testid": `small-list-item-dimension-${o}`,
521
+ className: v({
522
+ [f.rowWrapper]: !0,
523
+ [f.rowWrapperClickable]: !!l,
524
+ [f.rowSelected]: e,
525
+ [f.rowApplied]: n && !e,
526
+ [f.rowDisabled]: i
527
+ }),
528
+ style: { "--filter-hover-color": a ?? t.grey5 },
529
+ children: [/* @__PURE__ */ (0, Y.jsx)("span", {
530
+ className: f.label,
531
+ style: b,
532
+ children: /* @__PURE__ */ (0, Y.jsx)(N, {
533
+ phrase: c ?? "",
534
+ children: m ?? ""
535
+ })
536
+ }), /* @__PURE__ */ (0, Y.jsx)(Z, {
537
+ disabled: i,
538
+ isApplied: n,
539
+ isSelected: e,
540
+ isNot: _,
541
+ fontColor: u?.fontColor ?? void 0
542
+ })]
543
+ });
544
+ }, be = ({ filterValues: e, onItemClick: t, selectedValues: n, appliedValues: r, searchTerm: i, vSpec: a, hoverColor: o }) => {
545
+ let s = a.dimensions[0]?.formatter;
546
+ if (!a?.dimensions[0]?.dataItem) return null;
547
+ let [c, l] = I(e, r), u = (e, r) => {
548
+ switch (!0) {
549
+ case n.includes(e.dimension):
550
+ t(e.dimension);
551
+ break;
552
+ case e.disabled: break;
553
+ default: t(e.dimension, { shift: r.shiftKey ? [...c, ...l].reduce((e, t) => (t.disabled || e.push(t.dimension), e), []) : null });
554
+ }
555
+ };
556
+ return /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [c.map((e) => /* @__PURE__ */ (0, Y.jsx)($, {
557
+ searchTerm: i,
558
+ disabled: !!e.disabled,
559
+ dimensionValue: e.dimension,
560
+ dimensionFormatter: s,
561
+ onSelect: (t) => u(e, t),
562
+ selected: n.indexOf(e.dimension) !== -1,
563
+ applied: !0,
564
+ hoverColor: o,
565
+ fontStyle: a.filterSettings?.fontStyle,
566
+ responsive: a.filterSettings?.responsive
567
+ }, `applied-${e.dimension}`)), l.map((e) => /* @__PURE__ */ (0, Y.jsx)($, {
568
+ searchTerm: i,
569
+ disabled: !!e.disabled,
570
+ dimensionValue: e.dimension,
571
+ dimensionFormatter: s,
572
+ onSelect: (t) => u(e, t),
573
+ selected: n.indexOf(e.dimension) !== -1,
574
+ applied: !1,
575
+ hoverColor: o,
576
+ fontStyle: a.filterSettings?.fontStyle,
577
+ responsive: a.filterSettings?.responsive
578
+ }, `not-applied-${e.dimension}`))] });
579
+ }, xe = h({ dropdownContainer: {
580
+ overflow: "hidden",
581
+ backdropFilter: "blur(1.25px)",
582
+ zIndex: 1500
583
+ } }), Se = ({ children: e, filterStyle: t, isLocked: n }) => {
584
+ let r = xe(), i = G(t, n);
585
+ return /* @__PURE__ */ (0, Y.jsx)("div", {
586
+ className: r.dropdownContainer,
587
+ style: i,
588
+ children: e
589
+ });
590
+ }, Ce = h({ root: {
591
+ background: t.grey5,
592
+ height: 2,
593
+ "& .MuiLinearProgress-bar": { background: t.mainDarkNavy }
594
+ } }), we = ({ loading: e }) => {
595
+ let t = Ce();
596
+ return e ? /* @__PURE__ */ (0, Y.jsx)(ie, {
597
+ className: t.root,
598
+ "data-testid": "filter-search-progress"
599
+ }) : null;
600
+ }, Te = h({
601
+ dropdownButton: (e) => ({
602
+ cursor: "pointer",
603
+ display: "flex",
604
+ flexDirection: "row",
605
+ alignItems: "center",
606
+ justifyContent: "space-between",
607
+ padding: 8,
608
+ height: "min(40px, 100%)",
609
+ backdropFilter: "blur(1.25px)",
610
+ "&:hover, &:focus": {
611
+ boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.1)",
612
+ outline: "none"
613
+ },
614
+ ...e && {
615
+ [M.lg]: { height: "min(28px, 100%)" },
616
+ [M.md]: {
617
+ padding: "0 4px",
618
+ height: "min(24px, 100%)"
619
+ },
620
+ [M.sm]: {
621
+ padding: "0 2px",
622
+ height: "min(20px, 100%)"
623
+ },
624
+ [M.xs]: {
625
+ padding: 0,
626
+ height: "min(16px, 100%)"
627
+ }
628
+ }
629
+ }),
630
+ headerTitlesContainer: {
631
+ color: t.grey1,
632
+ display: "flex",
633
+ alignItems: "center",
634
+ width: "100%",
635
+ minWidth: 0
636
+ },
637
+ title: (e) => ({
638
+ fontWeight: "bold !important",
639
+ flexShrink: 1,
640
+ minWidth: 0,
641
+ ...u.overflowEllipsis,
642
+ ...j(e)
643
+ }),
644
+ valuesLabel: {
645
+ ...u.overflowEllipsis,
646
+ paddingLeft: 4,
647
+ fontWeight: "bold !important"
648
+ },
649
+ expandIcon: (e) => ({
650
+ display: "flex",
651
+ flexDirection: "row",
652
+ alignItems: "center",
653
+ boxSizing: "border-box",
654
+ ...e && A
655
+ }),
656
+ notPart: (e) => ({ ...K(e) })
657
+ }), Ee = ({ dimensionTitle: e, measureTitle: t, isOpen: n, onToggle: i, dimensionFormatter: a, selectedValues: o = [], fontStyle: s, filterStyle: c, responsive: l, isLocked: u }) => {
658
+ let d = g()?.astrato ?? r, f = Te(l), p = (0, q.useContext)(J), m = (p.pendingOperator ?? p.appliedOperator) === R.FilterOperator.NotInList, h = {
659
+ button: G(c),
660
+ label: U(s, d)
661
+ }, _ = h.label.color, v = (e) => String(typeof e == "boolean" ? e : a ? w(a, e) : e), b = [...o].sort().slice(0, 15).map(v).join(", "), x = o.length > 0;
662
+ return /* @__PURE__ */ (0, Y.jsxs)("div", {
663
+ role: "button",
664
+ tabIndex: 0,
665
+ "data-testid": "filter-header-dropdown",
666
+ className: f.dropdownButton,
667
+ onClick: (e) => {
668
+ e.currentTarget.blur(), i?.();
669
+ },
670
+ onKeyUp: (e) => {
671
+ (e.key === "Enter" || e.key === " ") && (e.stopPropagation(), e.preventDefault(), i?.());
672
+ },
673
+ style: h.button,
674
+ children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
675
+ className: f.headerTitlesContainer,
676
+ style: { color: _ },
677
+ children: [
678
+ u && /* @__PURE__ */ (0, Y.jsx)(y, {
679
+ fill: "currentColor",
680
+ style: { marginRight: 8 }
681
+ }),
682
+ m && /* @__PURE__ */ (0, Y.jsx)("div", {
683
+ className: f.notPart,
684
+ children: "NOT"
685
+ }),
686
+ /* @__PURE__ */ (0, Y.jsx)("div", {
687
+ className: f.title,
688
+ style: h.label,
689
+ children: e
690
+ }),
691
+ /* @__PURE__ */ (0, Y.jsxs)("div", {
692
+ className: f.title,
693
+ style: {
694
+ ...h.label,
695
+ display: "flex",
696
+ flexShrink: 99999
697
+ },
698
+ children: [t, x && /* @__PURE__ */ (0, Y.jsxs)("div", {
699
+ className: f.valuesLabel,
700
+ children: [" ", b]
701
+ })]
702
+ })
703
+ ]
704
+ }), /* @__PURE__ */ (0, Y.jsx)("div", {
705
+ className: f.expandIcon,
706
+ style: { color: _ },
707
+ children: n ? /* @__PURE__ */ (0, Y.jsx)(S, {
708
+ size: 24,
709
+ fill: "currentColor"
710
+ }) : /* @__PURE__ */ (0, Y.jsx)(D, {
711
+ size: 24,
712
+ fill: "currentColor"
713
+ })
714
+ })]
715
+ });
716
+ }, De = h({
717
+ headerListbox: (e) => ({
718
+ height: 36,
719
+ margin: "0 12px 8px",
720
+ display: "flex",
721
+ alignItems: "center",
722
+ boxSizing: "border-box",
723
+ ...e && {
724
+ [M.md]: {
725
+ height: 32,
726
+ margin: "0 12px 6px"
727
+ },
728
+ [M.sm]: {
729
+ height: 28,
730
+ margin: "0 12px 4px"
731
+ },
732
+ [M.xs]: {
733
+ height: 24,
734
+ margin: "0 12px"
735
+ }
736
+ }
737
+ }),
738
+ headerListboxSearch: { flexGrow: 1 },
739
+ headerTitlesContainer: {
740
+ minWidth: 0,
741
+ color: t.grey1,
742
+ cursor: "pointer",
743
+ flexGrow: 1,
744
+ flexShrink: 1,
745
+ display: "flex",
746
+ alignItems: "center"
747
+ },
748
+ title: (e) => ({
749
+ ...u.overflowEllipsis,
750
+ fontWeight: "bold !important",
751
+ ...j(e)
752
+ }),
753
+ iconButton: (e) => ({
754
+ ...e && A,
755
+ cursor: "pointer",
756
+ display: "inline-flex",
757
+ alignItems: "center",
758
+ justifyContent: "center",
759
+ minWidth: 22,
760
+ width: 22,
761
+ height: 22,
762
+ padding: 0,
763
+ border: "none",
764
+ borderRadius: 6,
765
+ backgroundColor: "transparent",
766
+ color: "inherit",
767
+ lineHeight: 0,
768
+ "&:hover": { boxShadow: "inset 0 0 0 1px currentColor" },
769
+ "&:focus": { outline: "none" },
770
+ ...e && {
771
+ [M.md]: {
772
+ minWidth: 20,
773
+ width: 20,
774
+ height: 20,
775
+ borderRadius: 5
776
+ },
777
+ [M.sm]: {
778
+ minWidth: 16,
779
+ width: 16,
780
+ height: 16,
781
+ borderRadius: 4
782
+ },
783
+ [M.xs]: {
784
+ minWidth: 12,
785
+ width: 12,
786
+ height: 12,
787
+ borderRadius: 3
788
+ }
789
+ }
790
+ }),
791
+ notPart: (e) => ({ ...K(e) })
792
+ }), Oe = ({ children: e, dimensionTitle: t, measureTitle: n, searchEnabled: i, searchTerm: a, onSearchChange: o, onApplySearched: s, fontStyle: c, vTheme: l = r, isNotEnabled: u, responsive: d, isLocked: f }) => {
793
+ let p = De(d), m = U(c, l), h = m.color, [g, _] = (0, q.useState)(!1);
794
+ (0, q.useEffect)(() => {
795
+ !i && a && o("");
796
+ }, [i]);
797
+ let v = () => {
798
+ i && _(!0);
799
+ }, b = () => {
800
+ o(""), _(!1);
801
+ }, x = () => {
802
+ s();
803
+ };
804
+ return i ? /* @__PURE__ */ (0, Y.jsx)("div", {
805
+ "data-testid": "filter-header-title",
806
+ className: p.headerListbox,
807
+ style: { color: h },
808
+ children: g ? /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(re, {
809
+ responsive: d,
810
+ autoFocus: !0,
811
+ className: p.headerListboxSearch,
812
+ "data-testid": "filter-search-input",
813
+ onChange: (e) => {
814
+ o(e.target.value);
815
+ },
816
+ style: {
817
+ color: h,
818
+ borderColor: h
819
+ },
820
+ onPaste: L(o),
821
+ onKeyDown: (e) => {
822
+ switch (e.key) {
823
+ case "Enter":
824
+ x();
825
+ break;
826
+ case "Escape":
827
+ b(), o("");
828
+ break;
829
+ }
830
+ },
831
+ value: a
832
+ }), e] }) : /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [
833
+ /* @__PURE__ */ (0, Y.jsx)("button", {
834
+ "data-testid": "filter-header-show-search-button",
835
+ onClick: v,
836
+ className: p.iconButton,
837
+ style: { marginRight: 8 },
838
+ children: /* @__PURE__ */ (0, Y.jsx)(T, {
839
+ fill: "currentColor",
840
+ size: 20
841
+ })
842
+ }),
843
+ f && /* @__PURE__ */ (0, Y.jsx)(y, {
844
+ fill: "currentColor",
845
+ style: { marginRight: 8 }
846
+ }),
847
+ /* @__PURE__ */ (0, Y.jsxs)("div", {
848
+ onClick: v,
849
+ className: p.headerTitlesContainer,
850
+ children: [
851
+ u && /* @__PURE__ */ (0, Y.jsx)("div", {
852
+ className: p.notPart,
853
+ children: "NOT"
854
+ }),
855
+ /* @__PURE__ */ (0, Y.jsx)("span", {
856
+ className: p.title,
857
+ style: m,
858
+ children: t
859
+ }),
860
+ /* @__PURE__ */ (0, Y.jsx)("span", {
861
+ className: p.title,
862
+ style: m,
863
+ children: n
864
+ })
865
+ ]
866
+ }),
867
+ e
868
+ ] })
869
+ }) : /* @__PURE__ */ (0, Y.jsxs)("div", {
870
+ "data-testid": "filter-header-title",
871
+ className: p.headerListbox,
872
+ style: { color: h },
873
+ children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
874
+ className: p.headerTitlesContainer,
875
+ children: [
876
+ u && /* @__PURE__ */ (0, Y.jsx)("div", {
877
+ className: p.notPart,
878
+ children: "NOT"
879
+ }),
880
+ /* @__PURE__ */ (0, Y.jsx)("span", {
881
+ className: p.title,
882
+ style: m,
883
+ children: t
884
+ }),
885
+ /* @__PURE__ */ (0, Y.jsx)("span", {
886
+ className: p.title,
887
+ style: m,
888
+ children: n
889
+ })
890
+ ]
891
+ }), e]
892
+ });
893
+ }, ke = h({
894
+ container: {
895
+ margin: 0,
896
+ padding: 0
897
+ },
898
+ scrollContainer: (e) => ({
899
+ ...f.propertiesPanel,
900
+ padding: "0 12px",
901
+ ...e && {
902
+ [M.md]: { padding: "0 8px" },
903
+ [M.sm]: { padding: "0 6px" },
904
+ [M.xs]: { padding: "0 4px" }
905
+ }
906
+ })
907
+ }), Ae = ({ children: e, loadMoreData: t, isDropdown: n = !1, hasSearch: r = !1, responsive: i }) => {
908
+ let a = ke(i);
909
+ return /* @__PURE__ */ (0, Y.jsx)("div", {
910
+ className: a.container,
911
+ "data-testid": "list-container",
912
+ style: {
913
+ height: n ? void 0 : "calc(100% - 44px)",
914
+ paddingTop: n && !r ? 8 : void 0,
915
+ paddingBottom: n ? 8 : void 0
916
+ },
917
+ children: /* @__PURE__ */ (0, Y.jsx)("div", {
918
+ className: a.scrollContainer,
919
+ style: {
920
+ height: n ? void 0 : "100%",
921
+ maxHeight: n ? 330 - (r ? 40 : 0) : void 0
922
+ },
923
+ onScroll: (e) => {
924
+ let { scrollHeight: n, clientHeight: r, scrollTop: i } = e.currentTarget;
925
+ P(n, r, i) && t();
926
+ },
927
+ children: e
928
+ })
929
+ });
930
+ }, je = h({
931
+ mainFilterContainer: {
932
+ width: "100%",
933
+ height: "100%",
934
+ overflow: "hidden"
935
+ },
936
+ blurBackground: { backdropFilter: "blur(1.25px)" },
937
+ noBorder: { border: "none !important" }
938
+ }), Me = ({ children: e, noBorder: t, blurBackground: n, filterStyle: r, fontSize: i }) => {
939
+ let a = je(), o = G(r);
940
+ return /* @__PURE__ */ (0, Y.jsx)("div", {
941
+ className: v({
942
+ [a.mainFilterContainer]: !0,
943
+ [a.noBorder]: t,
944
+ [a.blurBackground]: n
945
+ }),
946
+ style: {
947
+ ...o,
948
+ fontSize: i ? `${i}px` : void 0
949
+ },
950
+ children: e
951
+ });
952
+ };
953
+ export { we as a, $ as c, H as d, V as f, P as g, oe as h, Ee as i, ve as l, L as m, Ae as n, Se as o, ce as p, Oe as r, be as s, Me as t, J as u };