ia-table 0.14.7 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pivot.js CHANGED
@@ -2,26 +2,27 @@
2
2
  import { jsxs as t, jsx as e, Fragment as Y } from "react/jsx-runtime";
3
3
  import * as j from "react";
4
4
  import q, { useState as D, useCallback as c, useMemo as V, useRef as Q, useEffect as J } from "react";
5
- import { S as X, f as He, g as k, i as ve, o as K, T as pe, B as G, n as Ze, C as U, k as ue, j as oe, M as qe, I as de, l as ee, D as Ue, m as We } from "./right-arrow-u0DuaXma.js";
5
+ import { S as X, g as E, b as ve, T as pe, B as G, C as U, R as oe, M as He, I as de, c as ee } from "./RadioGroup-Cv9QL-Yd.js";
6
+ import { S as Ze, d as K, c as qe, a as ue, e as Ue, b as We } from "./right-arrow-5CR5OWUs.js";
6
7
  import { createPortal as Qe } from "react-dom";
7
8
  const Je = ({
8
9
  title: l,
9
- onClose: h
10
+ onClose: f
10
11
  }) => /* @__PURE__ */ t("div", { className: "ia-table-pivot-header d-flex align-items-center justify-content-between", children: [
11
12
  /* @__PURE__ */ e("h4", { className: "ia-table-pivot-header-title", children: l }),
12
13
  /* @__PURE__ */ e(
13
14
  "button",
14
15
  {
15
16
  className: "ia-table-pivot-header-close-btn d-flex align-items-center justify-content-center",
16
- onClick: h,
17
+ onClick: f,
17
18
  "aria-label": "Close",
18
19
  children: /* @__PURE__ */ e(X, { className: "icon-10" })
19
20
  }
20
21
  )
21
- ] }), fe = q.memo(
22
- ({ message: l, defaultVisible: h = !0, onClose: n }) => {
23
- const [d, f] = D(h), v = c(() => {
24
- f(!1), n == null || n();
22
+ ] }), he = q.memo(
23
+ ({ message: l, defaultVisible: f = !0, onClose: n }) => {
24
+ const [d, h] = D(f), v = c(() => {
25
+ h(!1), n == null || n();
25
26
  }, [n]);
26
27
  return d ? /* @__PURE__ */ t("div", { className: "ia-table-pivot-notification d-flex align-items-center justify-content-between", children: [
27
28
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-notification-content d-flex align-items-center gap-12", children: [
@@ -56,9 +57,9 @@ const Je = ({
56
57
  ] }) : null;
57
58
  }
58
59
  );
59
- fe.displayName = "PivotNotification";
60
+ he.displayName = "PivotNotification";
60
61
  const le = q.memo(
61
- ({ column: l, isDragging: h = !1 }) => {
62
+ ({ column: l, isDragging: f = !1 }) => {
62
63
  const n = c(
63
64
  (d) => {
64
65
  d.dataTransfer.setData("application/json", JSON.stringify(l)), d.dataTransfer.effectAllowed = "move";
@@ -68,21 +69,21 @@ const le = q.memo(
68
69
  return /* @__PURE__ */ t(
69
70
  "div",
70
71
  {
71
- className: `ia-table-pivot-field-item d-flex align-items-center gap-8 ${h ? "dragging" : ""}`,
72
+ className: `ia-table-pivot-field-item d-flex align-items-center gap-8 ${f ? "dragging" : ""}`,
72
73
  draggable: !0,
73
74
  onDragStart: n,
74
75
  children: [
75
- /* @__PURE__ */ e("div", { className: "ia-table-pivot-field-item-drag-handle d-flex align-items-center justify-content-center", children: /* @__PURE__ */ e(He, { className: "ia-table-pivot-drag-icon" }) }),
76
- /* @__PURE__ */ e("span", { className: "ia-table-pivot-field-item-name", children: l.headerName || k(l) })
76
+ /* @__PURE__ */ e("div", { className: "ia-table-pivot-field-item-drag-handle d-flex align-items-center justify-content-center", children: /* @__PURE__ */ e(Ze, { className: "ia-table-pivot-drag-icon" }) }),
77
+ /* @__PURE__ */ e("span", { className: "ia-table-pivot-field-item-name", children: l.headerName || E(l) })
77
78
  ]
78
79
  }
79
80
  );
80
81
  }
81
82
  );
82
83
  le.displayName = "PivotFieldItem";
83
- const he = q.memo(
84
- ({ dimensions: l, measures: h }) => {
85
- const [n, d] = D(""), f = V(() => n ? l.filter((i) => (i.headerName || k(i)).toLowerCase().includes(n.toLowerCase())) : l, [l, n]), v = V(() => !n || !h ? h || [] : h.filter((i) => (i.headerName || k(i)).toLowerCase().includes(n.toLowerCase())), [h, n]), _ = c(
84
+ const fe = q.memo(
85
+ ({ dimensions: l, measures: f }) => {
86
+ const [n, d] = D(""), h = V(() => n ? l.filter((i) => (i.headerName || E(i)).toLowerCase().includes(n.toLowerCase())) : l, [l, n]), v = V(() => !n || !f ? f || [] : f.filter((i) => (i.headerName || E(i)).toLowerCase().includes(n.toLowerCase())), [f, n]), _ = c(
86
87
  (i) => {
87
88
  d(i.target.value);
88
89
  },
@@ -104,14 +105,14 @@ const he = q.memo(
104
105
  /* @__PURE__ */ e("button", { className: "ia-table-pivot-field-list-search-btn d-flex align-items-center justify-content-center", children: /* @__PURE__ */ e(ve, { className: "icon-14" }) })
105
106
  ] }),
106
107
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-field-list-content d-flex flex-column", children: [
107
- f.length > 0 && /* @__PURE__ */ t("div", { className: "ia-table-pivot-field-list-group d-flex flex-column", children: [
108
+ h.length > 0 && /* @__PURE__ */ t("div", { className: "ia-table-pivot-field-list-group d-flex flex-column", children: [
108
109
  /* @__PURE__ */ e("span", { className: "ia-table-pivot-field-list-group-title", children: "Dimensions" }),
109
- /* @__PURE__ */ e("div", { className: "ia-table-pivot-field-list-items d-flex flex-column gap-12", children: f.map((i) => /* @__PURE__ */ e(
110
+ /* @__PURE__ */ e("div", { className: "ia-table-pivot-field-list-items d-flex flex-column gap-12", children: h.map((i) => /* @__PURE__ */ e(
110
111
  le,
111
112
  {
112
113
  column: i
113
114
  },
114
- k(i)
115
+ E(i)
115
116
  )) })
116
117
  ] }),
117
118
  v.length > 0 && /* @__PURE__ */ t("div", { className: "ia-table-pivot-field-list-group d-flex flex-column ", children: [
@@ -121,48 +122,48 @@ const he = q.memo(
121
122
  {
122
123
  column: i
123
124
  },
124
- k(i)
125
+ E(i)
125
126
  )) })
126
127
  ] }),
127
- f.length === 0 && v.length === 0 && /* @__PURE__ */ e("div", { className: "ia-table-pivot-field-list-empty", children: "No fields found" })
128
+ h.length === 0 && v.length === 0 && /* @__PURE__ */ e("div", { className: "ia-table-pivot-field-list-empty", children: "No fields found" })
128
129
  ] })
129
130
  ] });
130
131
  }
131
132
  );
132
- he.displayName = "PivotFieldList";
133
+ fe.displayName = "PivotFieldList";
133
134
  const ne = (l) => /* @__PURE__ */ j.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ j.createElement("path", { d: "M7.99975 11.2827L10.5997 8.69932C10.722 8.5771 10.8747 8.51321 11.0581 8.50766C11.2414 8.5021 11.3997 8.56599 11.5331 8.69932C11.6553 8.82155 11.7164 8.9771 11.7164 9.16599C11.7164 9.35488 11.6553 9.51043 11.5331 9.63266L8.46641 12.6993C8.39975 12.766 8.32753 12.8132 8.24975 12.841C8.17197 12.8688 8.08864 12.8827 7.99975 12.8827C7.91086 12.8827 7.82753 12.8688 7.74975 12.841C7.67197 12.8132 7.59975 12.766 7.53308 12.6993L4.46641 9.63266C4.34419 9.51043 4.2803 9.35766 4.27475 9.17432C4.26919 8.99099 4.33308 8.83266 4.46641 8.69932C4.58864 8.5771 4.74419 8.51599 4.93308 8.51599C5.12197 8.51599 5.27753 8.5771 5.39975 8.69932L7.99975 11.2827ZM7.99975 7.28266L10.5997 4.69932C10.722 4.5771 10.8747 4.51321 11.0581 4.50766C11.2414 4.5021 11.3997 4.56599 11.5331 4.69932C11.6553 4.82155 11.7164 4.9771 11.7164 5.16599C11.7164 5.35488 11.6553 5.51044 11.5331 5.63266L8.46641 8.69932C8.39975 8.76599 8.32753 8.81321 8.24975 8.84099C8.17197 8.86877 8.08864 8.88266 7.99975 8.88266C7.91086 8.88266 7.82753 8.86877 7.74975 8.84099C7.67197 8.81321 7.59975 8.76599 7.53308 8.69932L4.46641 5.63266C4.34419 5.51044 4.2803 5.35766 4.27475 5.17432C4.26919 4.99099 4.33308 4.83266 4.46641 4.69932C4.58864 4.5771 4.74419 4.51599 4.93308 4.51599C5.12197 4.51599 5.27753 4.5771 5.39975 4.69932L7.99975 7.28266Z", fill: "#60697D" })), re = (l) => /* @__PURE__ */ j.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ j.createElement("path", { d: "M12.2005 3.80323C11.9405 3.54323 11.5205 3.54323 11.2605 3.80323L8.00047 7.05657L4.74047 3.79657C4.48047 3.53657 4.06047 3.53657 3.80047 3.79657C3.54047 4.05657 3.54047 4.47657 3.80047 4.73657L7.06047 7.99657L3.80047 11.2566C3.54047 11.5166 3.54047 11.9366 3.80047 12.1966C4.06047 12.4566 4.48047 12.4566 4.74047 12.1966L8.00047 8.93657L11.2605 12.1966C11.5205 12.4566 11.9405 12.4566 12.2005 12.1966C12.4605 11.9366 12.4605 11.5166 12.2005 11.2566L8.94047 7.99657L12.2005 4.73656C12.4538 4.48323 12.4538 4.05656 12.2005 3.80323Z", fill: "#60697D" })), ie = q.memo(
134
135
  ({
135
136
  type: l,
136
- items: h,
137
+ items: f,
137
138
  defaultExpanded: n = !0,
138
139
  onDrop: d,
139
- onRemoveItem: f,
140
+ onRemoveItem: h,
140
141
  onClearAll: v,
141
142
  isDragOver: _
142
143
  }) => {
143
- const i = Q(null), [u, y] = D(n), [N, C] = D(!1), [L, E] = D(/* @__PURE__ */ new Set()), P = c(
144
- (x, O) => {
145
- E((M) => {
146
- const b = new Set(M);
147
- return O ? b.add(x) : b.delete(x), b;
144
+ const i = Q(null), [u, y] = D(n), [N, C] = D(!1), [k, I] = D(/* @__PURE__ */ new Set()), R = c(
145
+ (x, P) => {
146
+ I((F) => {
147
+ const b = new Set(F);
148
+ return P ? b.add(x) : b.delete(x), b;
148
149
  });
149
150
  },
150
151
  []
151
152
  ), r = c(
152
153
  (x) => {
153
- E((O) => {
154
- const M = new Set(O);
155
- return M.delete(x), M;
156
- }), f(x);
154
+ I((P) => {
155
+ const F = new Set(P);
156
+ return F.delete(x), F;
157
+ }), h(x);
157
158
  },
158
- [f]
159
+ [h]
159
160
  ), a = c(() => {
160
- E(/* @__PURE__ */ new Set()), v == null || v();
161
+ I(/* @__PURE__ */ new Set()), v == null || v();
161
162
  }, [v]), T = c(() => {
162
- L.forEach((x) => {
163
- f(x);
164
- }), E(/* @__PURE__ */ new Set());
165
- }, [L, f]), z = L.size > 0, B = _ ?? N, p = c((x) => {
163
+ k.forEach((x) => {
164
+ h(x);
165
+ }), I(/* @__PURE__ */ new Set());
166
+ }, [k, h]), L = k.size > 0, B = _ ?? N, p = c((x) => {
166
167
  x.preventDefault(), x.dataTransfer.dropEffect = "move", C(!0);
167
168
  }, []), m = c((x) => {
168
169
  x.preventDefault(), C(!1);
@@ -170,19 +171,19 @@ const ne = (l) => /* @__PURE__ */ j.createElement("svg", { width: "1em", height:
170
171
  (x) => {
171
172
  x.preventDefault(), C(!1);
172
173
  try {
173
- const O = x.dataTransfer.getData("application/json");
174
- if (O) {
175
- const M = JSON.parse(O);
176
- if (M.extra && M.extra.is_measure)
174
+ const P = x.dataTransfer.getData("application/json");
175
+ if (P) {
176
+ const F = JSON.parse(P);
177
+ if (F.extra && F.extra.is_measure)
177
178
  return;
178
- d(M);
179
+ d(F);
179
180
  }
180
- } catch (O) {
181
- console.error("Error parsing dropped data:", O);
181
+ } catch (P) {
182
+ console.error("Error parsing dropped data:", P);
182
183
  }
183
184
  },
184
185
  [d]
185
- ), R = l === "rows" ? "cyan" : "yellow";
186
+ ), M = l === "rows" ? "cyan" : "yellow";
186
187
  return /* @__PURE__ */ t("div", { className: "ia-table-pivot-drop-zone d-flex flex-column gap-12", children: [
187
188
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-drop-zone-header d-flex align-items-center justify-content-between", children: [
188
189
  /* @__PURE__ */ t(
@@ -202,7 +203,7 @@ const ne = (l) => /* @__PURE__ */ j.createElement("svg", { width: "1em", height:
202
203
  }
203
204
  ),
204
205
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-drop-zone-header-actions d-flex align-items-center gap-8", children: [
205
- z && u && /* @__PURE__ */ e(
206
+ L && u && /* @__PURE__ */ e(
206
207
  pe,
207
208
  {
208
209
  title: "Delete",
@@ -219,47 +220,47 @@ const ne = (l) => /* @__PURE__ */ j.createElement("svg", { width: "1em", height:
219
220
  variant: "tertiary",
220
221
  iconButton: !0,
221
222
  buttonRef: i,
222
- children: /* @__PURE__ */ e(Ze, { className: "icon-16" })
223
+ children: /* @__PURE__ */ e(qe, { className: "icon-16" })
223
224
  }
224
225
  )
225
226
  }
226
227
  ),
227
- h.length > 0 && !z && v && u && /* @__PURE__ */ e(G, { onClick: a, variant: "text", size: "small", children: "Clear all" })
228
+ f.length > 0 && !L && v && u && /* @__PURE__ */ e(G, { onClick: a, variant: "text", size: "small", children: "Clear all" })
228
229
  ] })
229
230
  ] }),
230
231
  u && /* @__PURE__ */ e(
231
232
  "div",
232
233
  {
233
- className: `ia-table-pivot-drop-zone-area ${R} ${B ? "drag-over" : ""} `,
234
+ className: `ia-table-pivot-drop-zone-area ${M} ${B ? "drag-over" : ""} `,
234
235
  onDragOver: p,
235
236
  onDragLeave: m,
236
237
  onDrop: w,
237
- children: h.length === 0 ? /* @__PURE__ */ t("div", { className: "ia-table-pivot-drop-zone-empty d-flex flex-column align-items-center justify-content-center gap-4", children: [
238
+ children: f.length === 0 ? /* @__PURE__ */ t("div", { className: "ia-table-pivot-drop-zone-empty d-flex flex-column align-items-center justify-content-center gap-4", children: [
238
239
  /* @__PURE__ */ e(ne, { className: "icon-24" }),
239
240
  /* @__PURE__ */ e("span", { className: "ia-table-pivot-drop-zone-empty-text", children: "Drag and drop fields here..." })
240
- ] }) : /* @__PURE__ */ e("div", { className: "ia-table-pivot-drop-zone-items d-flex flex-column gap-8", children: h.map((x) => {
241
- const O = k(x), M = x.headerName || O, b = L.has(O);
241
+ ] }) : /* @__PURE__ */ e("div", { className: "ia-table-pivot-drop-zone-items d-flex flex-column gap-8", children: f.map((x) => {
242
+ const P = E(x), F = x.headerName || P, b = k.has(P);
242
243
  return /* @__PURE__ */ t(
243
244
  "div",
244
245
  {
245
- className: `ia-table-pivot-drop-zone-item ${R} d-flex justify-content-between align-items-center gap-8 ${b ? `${R}-checked` : ""}`,
246
+ className: `ia-table-pivot-drop-zone-item ${M} d-flex justify-content-between align-items-center gap-8 ${b ? `${M}-checked` : ""}`,
246
247
  children: [
247
248
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-drop-zone-item-checkbox d-flex align-items-center gap-8", children: [
248
249
  /* @__PURE__ */ e(
249
250
  U,
250
251
  {
251
- onChange: (I) => P(O, I),
252
+ onChange: (O) => R(P, O.target.checked),
252
253
  checked: b
253
254
  }
254
255
  ),
255
- /* @__PURE__ */ e("span", { className: "ia-table-pivot-drop-zone-item-name", children: M })
256
+ /* @__PURE__ */ e("span", { className: "ia-table-pivot-drop-zone-item-name", children: F })
256
257
  ] }),
257
258
  /* @__PURE__ */ e(
258
259
  G,
259
260
  {
260
261
  className: "ia-table-pivot-cross-icon ia-table-pivot-drop-zone-item-remove",
261
- onClick: () => r(O),
262
- "aria-label": `Remove ${M}`,
262
+ onClick: () => r(P),
263
+ "aria-label": `Remove ${F}`,
263
264
  iconButton: !0,
264
265
  variant: "url",
265
266
  simpleButton: !0,
@@ -268,7 +269,7 @@ const ne = (l) => /* @__PURE__ */ j.createElement("svg", { width: "1em", height:
268
269
  )
269
270
  ]
270
271
  },
271
- O
272
+ P
272
273
  );
273
274
  }) })
274
275
  }
@@ -285,14 +286,14 @@ const Ye = {
285
286
  }, be = q.memo(
286
287
  ({
287
288
  defaultExpanded: l = !1,
288
- defaultTotals: h = Ye,
289
+ defaultTotals: f = Ye,
289
290
  onTotalsChange: n,
290
291
  isPivotRowGrandTotal: d,
291
- isPivotColumnGrandTotal: f,
292
+ isPivotColumnGrandTotal: h,
292
293
  isPivotRowSubTotal: v,
293
294
  isPivotColumnSubTotal: _
294
295
  }) => {
295
- const [i, u] = D(l), [y, N] = D(h), C = Q(!0);
296
+ const [i, u] = D(l), [y, N] = D(f), C = Q(!0);
296
297
  J(() => {
297
298
  if (C.current) {
298
299
  C.current = !1;
@@ -300,15 +301,31 @@ const Ye = {
300
301
  }
301
302
  n == null || n(y);
302
303
  }, [y, n]);
303
- const L = c((a) => {
304
- N((T) => ({ ...T, showRowGrandTotal: a }));
305
- }, []), E = c((a) => {
306
- N((T) => ({ ...T, showColumnGrandTotal: a }));
307
- }, []), P = c((a) => {
308
- N((T) => ({ ...T, showRowSubTotal: a }));
309
- }, []), r = c((a) => {
310
- N((T) => ({ ...T, showColumnSubTotal: a }));
311
- }, []);
304
+ const k = c(
305
+ (a) => {
306
+ const T = a.target.checked;
307
+ N((L) => ({ ...L, showRowGrandTotal: T }));
308
+ },
309
+ []
310
+ ), I = c(
311
+ (a) => {
312
+ const T = a.target.checked;
313
+ N((L) => ({ ...L, showColumnGrandTotal: T }));
314
+ },
315
+ []
316
+ ), R = c(
317
+ (a) => {
318
+ const T = a.target.checked;
319
+ N((L) => ({ ...L, showRowSubTotal: T }));
320
+ },
321
+ []
322
+ ), r = c(
323
+ (a) => {
324
+ const T = a.target.checked;
325
+ N((L) => ({ ...L, showColumnSubTotal: T }));
326
+ },
327
+ []
328
+ );
312
329
  return /* @__PURE__ */ t("div", { className: "ia-table-pivot-totals-section d-flex flex-column", children: [
313
330
  /* @__PURE__ */ t(
314
331
  "button",
@@ -327,7 +344,7 @@ const Ye = {
327
344
  }
328
345
  ),
329
346
  i && /* @__PURE__ */ t("div", { className: "ia-table-pivot-totals-section-content d-flex flex-column gap-12", children: [
330
- (d || f) && /* @__PURE__ */ t(Y, { children: [
347
+ (d || h) && /* @__PURE__ */ t(Y, { children: [
331
348
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-totals-group d-flex flex-column gap-16", children: [
332
349
  /* @__PURE__ */ e("span", { className: "ia-table-pivot-totals-group-title", children: "Grand total" }),
333
350
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-totals-options d-flex flex-column gap-8", children: [
@@ -335,15 +352,15 @@ const Ye = {
335
352
  U,
336
353
  {
337
354
  checked: y.showRowGrandTotal,
338
- onChange: L,
355
+ onChange: k,
339
356
  label: "Show row grand total"
340
357
  }
341
358
  ) }),
342
- f && /* @__PURE__ */ e("div", { className: "ia-table-pivot-totals-option", children: /* @__PURE__ */ e(
359
+ h && /* @__PURE__ */ e("div", { className: "ia-table-pivot-totals-option", children: /* @__PURE__ */ e(
343
360
  U,
344
361
  {
345
362
  checked: y.showColumnGrandTotal,
346
- onChange: E,
363
+ onChange: I,
347
364
  label: "Show column grand total"
348
365
  }
349
366
  ) })
@@ -358,7 +375,7 @@ const Ye = {
358
375
  U,
359
376
  {
360
377
  checked: y.showRowSubTotal,
361
- onChange: P,
378
+ onChange: R,
362
379
  label: "Show row sub total"
363
380
  }
364
381
  ) }),
@@ -386,18 +403,18 @@ const Xe = [
386
403
  ], ge = q.memo(
387
404
  ({
388
405
  items: l,
389
- defaultExpanded: h = !1,
406
+ defaultExpanded: f = !1,
390
407
  onDrop: n,
391
408
  onRemoveItem: d,
392
- onAggregationChange: f,
409
+ onAggregationChange: h,
393
410
  onClearAll: v,
394
411
  pivotAggregationFunc: _
395
412
  }) => {
396
- const [i, u] = D(h), [y, N] = D(!1), C = c((r) => {
413
+ const [i, u] = D(f), [y, N] = D(!1), C = c((r) => {
397
414
  r.preventDefault(), r.dataTransfer.dropEffect = "move", N(!0);
398
- }, []), L = c((r) => {
415
+ }, []), k = c((r) => {
399
416
  r.preventDefault(), N(!1);
400
- }, []), E = c(
417
+ }, []), I = c(
401
418
  (r) => {
402
419
  r.preventDefault(), N(!1);
403
420
  try {
@@ -413,8 +430,8 @@ const Xe = [
413
430
  }
414
431
  },
415
432
  [n]
416
- ), P = (r, a) => {
417
- a ? f(r, a.value) : d(r);
433
+ ), R = (r, a) => {
434
+ a ? h(r, a.value) : d(r);
418
435
  };
419
436
  return /* @__PURE__ */ t("div", { className: "ia-table-pivot-values-section d-flex flex-column gap-12", children: [
420
437
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-values-section-header d-flex align-items-center justify-content-between", children: [
@@ -448,14 +465,14 @@ const Xe = [
448
465
  {
449
466
  className: `ia-table-pivot-values-section-area ${y ? "drag-over" : ""} ${l.length > 0 ? "has-items" : ""}`,
450
467
  onDragOver: C,
451
- onDragLeave: L,
452
- onDrop: E,
468
+ onDragLeave: k,
469
+ onDrop: I,
453
470
  children: l.length === 0 ? /* @__PURE__ */ t("div", { className: "ia-table-pivot-values-section-empty d-flex flex-column align-items-center justify-content-center gap-4", children: [
454
471
  /* @__PURE__ */ e(ne, { className: "icon-24" }),
455
472
  /* @__PURE__ */ e("span", { className: "ia-table-pivot-values-section-empty-text", children: "Drag and drop fields here..." })
456
473
  ] }) : /* @__PURE__ */ e("div", { className: "ia-table-pivot-values-section-items d-flex flex-column gap-8", children: l.map((r) => {
457
474
  var p;
458
- const a = k(r), T = r.headerName || a, z = r.pivotAggregation || "sum", B = ((p = r.extra) == null ? void 0 : p.aggregation_func) || _ || Xe;
475
+ const a = E(r), T = r.headerName || a, L = r.pivotAggregation || "sum", B = ((p = r.extra) == null ? void 0 : p.aggregation_func) || _ || Xe;
459
476
  return /* @__PURE__ */ t(
460
477
  "div",
461
478
  {
@@ -481,10 +498,10 @@ const Xe = [
481
498
  className: "ia-table-pivot-values-select",
482
499
  width: "100%",
483
500
  selectedOptions: B.find(
484
- (m) => m.value === z
501
+ (m) => m.value === L
485
502
  ) || B[0],
486
503
  withPortal: !0,
487
- setSelectedOptions: (m) => P(
504
+ setSelectedOptions: (m) => R(
488
505
  a,
489
506
  m
490
507
  ),
@@ -522,22 +539,22 @@ const Ke = [
522
539
  ], Ne = q.memo(
523
540
  ({
524
541
  items: l,
525
- defaultExpanded: h = !1,
542
+ defaultExpanded: f = !1,
526
543
  onDrop: n,
527
544
  onRemoveItem: d,
528
- onFilterValueChange: f,
545
+ onFilterValueChange: h,
529
546
  onFilterModeChange: v,
530
547
  onFilterConditionChange: _,
531
548
  onClearAll: i
532
549
  }) => {
533
- const [u, y] = D(h), [N, C] = D(!1), [L, E] = D({}), P = (m) => m === "number" ? tt : et, r = (m) => {
534
- const w = k(m);
535
- return L[w] || m.pivotFilterMode || "value";
550
+ const [u, y] = D(f), [N, C] = D(!1), [k, I] = D({}), R = (m) => m === "number" ? tt : et, r = (m) => {
551
+ const w = E(m);
552
+ return k[w] || m.pivotFilterMode || "value";
536
553
  }, a = (m, w) => {
537
- E((R) => ({ ...R, [m]: w })), v == null || v(m, w);
554
+ I((M) => ({ ...M, [m]: w })), v == null || v(m, w);
538
555
  }, T = (m, w) => {
539
556
  w ? _ == null || _(m, w.value) : d(m);
540
- }, z = c((m) => {
557
+ }, L = c((m) => {
541
558
  m.preventDefault(), m.dataTransfer.dropEffect = "move", C(!0);
542
559
  }, []), B = c((m) => {
543
560
  m.preventDefault(), C(!1);
@@ -547,10 +564,10 @@ const Ke = [
547
564
  try {
548
565
  const w = m.dataTransfer.getData("application/json");
549
566
  if (w) {
550
- const R = JSON.parse(w);
551
- if (R.extra && R.extra.is_measure)
567
+ const M = JSON.parse(w);
568
+ if (M.extra && M.extra.is_measure)
552
569
  return;
553
- n(R);
570
+ n(M);
554
571
  }
555
572
  } catch (w) {
556
573
  console.error("Error parsing dropped data:", w);
@@ -589,21 +606,21 @@ const Ke = [
589
606
  "div",
590
607
  {
591
608
  className: `ia-table-pivot-filters-section-area ${N ? "drag-over" : ""} ${l.length > 0 ? "has-items" : ""}`,
592
- onDragOver: z,
609
+ onDragOver: L,
593
610
  onDragLeave: B,
594
611
  onDrop: p,
595
612
  children: l.length === 0 ? /* @__PURE__ */ t("div", { className: "ia-table-pivot-filters-section-empty d-flex flex-column align-items-center justify-content-center gap-4", children: [
596
613
  /* @__PURE__ */ e(ne, { className: "icon-24" }),
597
614
  /* @__PURE__ */ e("span", { className: "ia-table-pivot-filters-section-empty-text", children: "Drag and drop fields here..." })
598
615
  ] }) : /* @__PURE__ */ e("div", { className: "ia-table-pivot-filters-section-items d-flex flex-column gap-8", children: l.map((m) => {
599
- const w = k(m), R = m.headerName || w, x = r(m), O = m.pivotFilterValue || "", M = m.pivotFilterCondition;
616
+ const w = E(m), M = m.headerName || w, x = r(m), P = m.pivotFilterValue || "", F = m.pivotFilterCondition;
600
617
  return /* @__PURE__ */ t(
601
618
  "div",
602
619
  {
603
620
  className: "ia-table-pivot-filters-item d-flex flex-column gap-8",
604
621
  children: [
605
622
  /* @__PURE__ */ t("div", { className: "d-flex align-items-center justify-content-between", children: [
606
- /* @__PURE__ */ e("span", { className: "ia-table-pivot-filters-item-label", children: R }),
623
+ /* @__PURE__ */ e("span", { className: "ia-table-pivot-filters-item-label", children: M }),
607
624
  /* @__PURE__ */ e(
608
625
  G,
609
626
  {
@@ -635,22 +652,22 @@ const Ke = [
635
652
  type: "text",
636
653
  className: "ia-table-pivot-filters-item-input",
637
654
  placeholder: "Enter filter value...",
638
- value: O,
639
- onChange: (b) => f(w, b.target.value)
655
+ value: P,
656
+ onChange: (b) => h(w, b.target.value)
640
657
  }
641
658
  ) : /* @__PURE__ */ e(
642
659
  ue,
643
660
  {
644
661
  className: "ia-table-pivot-filters-select",
645
662
  width: "100%",
646
- selectedOptions: P(m.cellDataType).find(
647
- (b) => b.value === M
663
+ selectedOptions: R(m.cellDataType).find(
664
+ (b) => b.value === F
648
665
  ) || null,
649
666
  setSelectedOptions: (b) => T(
650
667
  w,
651
668
  b
652
669
  ),
653
- initialOptions: P(
670
+ initialOptions: R(
654
671
  m.cellDataType
655
672
  ),
656
673
  withPortal: !0
@@ -669,10 +686,10 @@ const Ke = [
669
686
  Ne.displayName = "PivotFiltersSection";
670
687
  const at = ({
671
688
  onCancel: l,
672
- onSave: h,
689
+ onSave: f,
673
690
  onApply: n,
674
691
  isSaveDisabled: d = !1,
675
- isApplyDisabled: f = !1,
692
+ isApplyDisabled: h = !1,
676
693
  isHideSave: v = !1,
677
694
  cancelText: _ = "Cancel",
678
695
  saveText: i = "Save",
@@ -681,58 +698,58 @@ const at = ({
681
698
  /* @__PURE__ */ e("div", { className: "ia-table-pivot-footer-divider" }),
682
699
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-footer-actions d-flex align-items-center justify-content-end gap-12", children: [
683
700
  /* @__PURE__ */ e(G, { onClick: l, variant: "url", children: _ }),
684
- n && /* @__PURE__ */ e(G, { onClick: n, disabled: f, children: u }),
685
- !v && h && /* @__PURE__ */ e(G, { onClick: h, disabled: d, children: i })
701
+ n && /* @__PURE__ */ e(G, { onClick: n, disabled: h, children: u }),
702
+ !v && f && /* @__PURE__ */ e(G, { onClick: f, disabled: d, children: i })
686
703
  ] })
687
704
  ] }), se = (l) => /* @__PURE__ */ j.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ j.createElement("path", { d: "M10.0209 5.85844L8.73465 1.62344C8.4809 0.792187 7.3084 0.792187 7.0634 1.62344L5.7684 5.85844H1.87465C1.0259 5.85844 0.675898 6.95219 1.36715 7.44219L4.55215 9.71719L3.3009 13.7509C3.04715 14.5647 3.99215 15.2209 4.6659 14.7047L7.89465 12.2547L11.1234 14.7134C11.7971 15.2297 12.7421 14.5734 12.4884 13.7597L11.2371 9.72594L14.4221 7.45094C15.1134 6.95219 14.7634 5.86719 13.9146 5.86719H10.0209V5.85844Z", fill: "#E1BC29" })), lt = ({
688
705
  isOpen: l,
689
- onClose: h,
706
+ onClose: f,
690
707
  onSave: n,
691
708
  onReplace: d,
692
- savedViews: f = [],
709
+ savedViews: h = [],
693
710
  maxViews: v = 50,
694
711
  currentViewsCount: _ = 0,
695
712
  initialValues: i
696
713
  }) => {
697
- const [u, y] = D("create"), [N, C] = D((i == null ? void 0 : i.name) ?? ""), [L, E] = D(
714
+ const [u, y] = D("create"), [N, C] = D((i == null ? void 0 : i.name) ?? ""), [k, I] = D(
698
715
  (i == null ? void 0 : i.viewType) ?? "global"
699
- ), [P, r] = D(
716
+ ), [R, r] = D(
700
717
  (i == null ? void 0 : i.isDefault) ?? !1
701
- ), [a, T] = D("all"), [z, B] = D(""), [p, m] = D(null);
718
+ ), [a, T] = D("all"), [L, B] = D(""), [p, m] = D(null);
702
719
  J(() => {
703
- l && i && (C(i.name), E(i.viewType), r(i.isDefault));
720
+ l && i && (C(i.name), I(i.viewType), r(i.isDefault));
704
721
  }, [l, i]);
705
- const w = v - _, R = V(() => {
706
- let S = f;
707
- if (a !== "all" && (S = S.filter(($) => $.viewType === a)), z.trim()) {
708
- const $ = z.toLowerCase();
722
+ const w = v - _, M = V(() => {
723
+ let S = h;
724
+ if (a !== "all" && (S = S.filter(($) => $.viewType === a)), L.trim()) {
725
+ const $ = L.toLowerCase();
709
726
  S = S.filter((W) => W.name.toLowerCase().includes($));
710
727
  }
711
728
  return S;
712
- }, [f, a, z]), x = c(() => {
729
+ }, [h, a, L]), x = c(() => {
713
730
  if (u === "create" && N.trim()) {
714
731
  const S = !!i, $ = i == null ? void 0 : i.name;
715
- n(N.trim(), L, P, S, $);
732
+ n(N.trim(), k, R, S, $);
716
733
  } else u === "replace" && p && d(p);
717
- C(""), E("global"), r(!1), T("all"), B(""), m(null), y("create");
734
+ C(""), I("global"), r(!1), T("all"), B(""), m(null), y("create");
718
735
  }, [
719
736
  u,
720
737
  N,
721
- L,
722
- P,
738
+ k,
739
+ R,
723
740
  p,
724
741
  n,
725
742
  d
726
- ]), O = c(() => {
727
- C(""), E("global"), r(!1), T("all"), B(""), m(null), y("create"), h();
728
- }, [h]), M = c((S) => {
743
+ ]), P = c(() => {
744
+ C(""), I("global"), r(!1), T("all"), B(""), m(null), y("create"), f();
745
+ }, [f]), F = c((S) => {
729
746
  m(($) => $ === S ? null : S);
730
747
  }, []), b = V(() => u === "create" ? !N.trim() : !p, [u, N, p]);
731
748
  return /* @__PURE__ */ e(
732
- qe,
749
+ He,
733
750
  {
734
751
  open: l,
735
- onClose: O,
752
+ onClose: P,
736
753
  title: u === "replace" ? "Save & Proceed" : "Save view",
737
754
  size: "small",
738
755
  width: 364,
@@ -740,7 +757,7 @@ const at = ({
740
757
  primaryButtonLabel: u === "create" ? "Save" : "Replace view",
741
758
  secondaryButtonLabel: "Cancel",
742
759
  onPrimaryButtonClick: x,
743
- onSecondaryButtonClick: O,
760
+ onSecondaryButtonClick: P,
744
761
  primaryButtonProps: { disabled: b },
745
762
  className: "ia-table-save-pivot-modal",
746
763
  children: /* @__PURE__ */ t("div", { className: "ia-table-save-pivot-modal-content d-flex flex-column", children: [
@@ -786,8 +803,8 @@ const at = ({
786
803
  { label: "Personal", value: "personal" }
787
804
  ],
788
805
  className: "ia-table-radio-group-pivot",
789
- selectedOption: L,
790
- onChange: (S) => E(S.target.value),
806
+ selectedOption: k,
807
+ onChange: (S) => I(S.target.value),
791
808
  orientation: "horizontal"
792
809
  }
793
810
  )
@@ -795,8 +812,8 @@ const at = ({
795
812
  /* @__PURE__ */ e("div", { className: "ia-table-save-pivot-modal-default", children: /* @__PURE__ */ e(
796
813
  U,
797
814
  {
798
- checked: P,
799
- onChange: () => r(!P),
815
+ checked: R,
816
+ onChange: () => r(!R),
800
817
  label: "Make it default view"
801
818
  }
802
819
  ) })
@@ -850,17 +867,17 @@ const at = ({
850
867
  de,
851
868
  {
852
869
  placeholder: "Search",
853
- value: z,
870
+ value: L,
854
871
  onChange: (S) => B(S.target.value),
855
872
  leftIcon: /* @__PURE__ */ e(ve, { className: "ia-table-save-pivot-modal-search-icon" })
856
873
  }
857
874
  ) }),
858
875
  /* @__PURE__ */ t("div", { className: "ia-table-save-pivot-modal-views-list", children: [
859
- R.map((S) => /* @__PURE__ */ t(
876
+ M.map((S) => /* @__PURE__ */ t(
860
877
  "div",
861
878
  {
862
879
  className: `ia-table-save-pivot-modal-view-item d-flex align-items-center gap-8 ${p === (S.id || S.name) ? "ia-table-save-pivot-modal-view-item--selected" : ""}`,
863
- onClick: () => M(S.name),
880
+ onClick: () => F(S.name),
864
881
  children: [
865
882
  /* @__PURE__ */ e("span", { className: "ia-table-save-pivot-modal-view-name", children: S.name }),
866
883
  S.isDefault && /* @__PURE__ */ e(se, { className: "ia-table-save-pivot-modal-view-star" })
@@ -868,25 +885,25 @@ const at = ({
868
885
  },
869
886
  S.id
870
887
  )),
871
- R.length === 0 && /* @__PURE__ */ e("div", { className: "ia-table-save-pivot-modal-no-views", children: "No views found" })
888
+ M.length === 0 && /* @__PURE__ */ e("div", { className: "ia-table-save-pivot-modal-no-views", children: "No views found" })
872
889
  ] }),
873
- R.length > 7 && /* @__PURE__ */ e("div", { className: "ia-table-save-pivot-modal-scroll-hint d-flex align-items-center justify-content-center", children: /* @__PURE__ */ e("span", { children: "↓ Scroll for more" }) })
890
+ M.length > 7 && /* @__PURE__ */ e("div", { className: "ia-table-save-pivot-modal-scroll-hint d-flex align-items-center justify-content-center", children: /* @__PURE__ */ e("span", { children: "↓ Scroll for more" }) })
874
891
  ] })
875
892
  ] })
876
893
  }
877
894
  );
878
895
  }, we = ({
879
896
  label: l = "Select saved pivot",
880
- placeholder: h = "Select",
897
+ placeholder: f = "Select",
881
898
  savedViews: n = [],
882
899
  selectedView: d = null,
883
- onSelectView: f,
900
+ onSelectView: h,
884
901
  onClear: v,
885
902
  recentlyUsedViews: _ = [],
886
903
  onViewAll: i,
887
904
  disabled: u = !1
888
905
  }) => {
889
- const [y, N] = D(!1), [C, L] = D("global"), [E, P] = D(""), r = Q(null);
906
+ const [y, N] = D(!1), [C, k] = D("global"), [I, R] = D(""), r = Q(null);
890
907
  J(() => {
891
908
  const p = (m) => {
892
909
  r.current && !r.current.contains(m.target) && N(!1);
@@ -897,15 +914,15 @@ const at = ({
897
914
  let p = n.filter(
898
915
  (m) => (m.viewType || "global") === C
899
916
  );
900
- if (E.trim()) {
901
- const m = E.toLowerCase();
917
+ if (I.trim()) {
918
+ const m = I.toLowerCase();
902
919
  p = p.filter((w) => w.name.toLowerCase().includes(m));
903
920
  }
904
921
  return p;
905
- }, [n, C, E]), T = () => {
922
+ }, [n, C, I]), T = () => {
906
923
  u || N(!y);
907
- }, z = (p) => {
908
- f(p), N(!1), P("");
924
+ }, L = (p) => {
925
+ h(p), N(!1), R("");
909
926
  }, B = (p) => {
910
927
  p.stopPropagation(), N(!1), v == null || v();
911
928
  };
@@ -926,7 +943,7 @@ const at = ({
926
943
  "span",
927
944
  {
928
945
  className: `ia-table-saved-pivot-dropdown__value ${d ? "" : "ia-table-saved-pivot-dropdown__value--placeholder"}`,
929
- children: (d == null ? void 0 : d.name) || h
946
+ children: (d == null ? void 0 : d.name) || f
930
947
  }
931
948
  ),
932
949
  /* @__PURE__ */ t("div", { className: "ia-table-saved-pivot-dropdown__icons d-flex align-items-center gap-8", children: [
@@ -964,7 +981,7 @@ const at = ({
964
981
  { label: "Personal", value: "personal" }
965
982
  ],
966
983
  selectedOption: C,
967
- onChange: (p) => L(p.target.value),
984
+ onChange: (p) => k(p.target.value),
968
985
  orientation: "horizontal"
969
986
  }
970
987
  ) }),
@@ -973,8 +990,8 @@ const at = ({
973
990
  {
974
991
  type: "text",
975
992
  placeholder: "Search here...",
976
- value: E,
977
- onChange: (p) => P(p.target.value)
993
+ value: I,
994
+ onChange: (p) => R(p.target.value)
978
995
  }
979
996
  ),
980
997
  /* @__PURE__ */ t("div", { className: "ia-table-saved-pivot-dropdown__list d-flex flex-column gap-2", children: [
@@ -982,7 +999,7 @@ const at = ({
982
999
  "div",
983
1000
  {
984
1001
  className: `ia-table-saved-pivot-dropdown__item ${(d == null ? void 0 : d.name) === p.name ? "ia-table-saved-pivot-dropdown__item--selected" : ""}`,
985
- onClick: () => z(p),
1002
+ onClick: () => L(p),
986
1003
  children: [
987
1004
  /* @__PURE__ */ e("span", { className: "ia-table-saved-pivot-dropdown__item-name", children: p.name }),
988
1005
  p.isDefault && /* @__PURE__ */ e(se, { className: "ia-table-saved-pivot-dropdown__star-icon ia-table-saved-pivot-dropdown__star-icon--filled" })
@@ -998,7 +1015,7 @@ const at = ({
998
1015
  "div",
999
1016
  {
1000
1017
  className: `ia-table-saved-pivot-dropdown__item ${(d == null ? void 0 : d.name) === p.name ? "ia-table-saved-pivot-dropdown__item--selected" : ""}`,
1001
- onClick: () => z(p),
1018
+ onClick: () => L(p),
1002
1019
  children: /* @__PURE__ */ e("span", { className: "ia-table-saved-pivot-dropdown__item-name", children: p.name })
1003
1020
  },
1004
1021
  `recent-${p.id || p.name}`
@@ -1028,16 +1045,16 @@ const at = ({
1028
1045
  }
1029
1046
  ], st = ({
1030
1047
  selectedMode: l,
1031
- onModeChange: h,
1048
+ onModeChange: f,
1032
1049
  savedPivots: n = [],
1033
1050
  selectedPivot: d = null,
1034
- onSelectPivot: f,
1051
+ onSelectPivot: h,
1035
1052
  onClearPivot: v,
1036
1053
  recentlyUsedPivots: _ = [],
1037
1054
  onViewAllPivots: i
1038
1055
  }) => {
1039
1056
  const u = (N) => {
1040
- f == null || f(N), l !== "saved" && h("saved");
1057
+ h == null || h(N), l !== "saved" && f("saved");
1041
1058
  }, y = () => {
1042
1059
  v == null || v();
1043
1060
  };
@@ -1054,7 +1071,7 @@ const at = ({
1054
1071
  name: "pivotMode",
1055
1072
  value: N.value,
1056
1073
  checked: l === N.value,
1057
- onChange: () => h(N.value),
1074
+ onChange: () => f(N.value),
1058
1075
  className: "ia-table-pivot-mode-radio"
1059
1076
  }
1060
1077
  ),
@@ -1097,13 +1114,13 @@ const at = ({
1097
1114
  }
1098
1115
  }, ot = ({
1099
1116
  isOpen: l,
1100
- onClose: h,
1117
+ onClose: f,
1101
1118
  onSave: n,
1102
1119
  availableFields: d,
1103
1120
  // versions = [],
1104
1121
  // selectedVersion: externalSelectedVersion,
1105
1122
  // onVersionChange,
1106
- initialState: f,
1123
+ initialState: h,
1107
1124
  showNotification: v = !0,
1108
1125
  onNotificationClose: _,
1109
1126
  pivotChildren: i,
@@ -1113,29 +1130,29 @@ const at = ({
1113
1130
  // onEditSavedPivot,
1114
1131
  defaultMode: N = "create",
1115
1132
  handlePivotApply: C,
1116
- isHidePivotSave: L = !1,
1117
- showTotalsSection: E = !1,
1118
- pivotAggregationFunc: P,
1133
+ isHidePivotSave: k = !1,
1134
+ showTotalsSection: I = !1,
1135
+ pivotAggregationFunc: R,
1119
1136
  isPivotRowGrandTotal: r,
1120
1137
  isPivotColumnGrandTotal: a,
1121
1138
  isPivotRowSubTotal: T,
1122
- isPivotColumnSubTotal: z,
1139
+ isPivotColumnSubTotal: L,
1123
1140
  isHideFilters: B,
1124
1141
  isHideValues: p
1125
1142
  }) => {
1126
- const [m, w] = D(!1), [R, x] = D(null), [O, M] = D(null), [b, I] = D(() => ({
1143
+ const [m, w] = D(!1), [M, x] = D(null), [P, F] = D(null), [b, O] = D(() => ({
1127
1144
  ...te,
1128
- ...R === "create" ? {} : f
1145
+ ...M === "create" ? {} : h
1129
1146
  })), S = Q(b.totals);
1130
1147
  J(() => {
1131
- f && f.totals ? L ? x(null) : (f.name && M(f.name), x("saved")) : x(N);
1132
- }, [f, N, L]);
1148
+ h && h.totals ? k ? x(null) : (h.name && F(h.name), x("saved")) : x(N);
1149
+ }, [h, N, k]);
1133
1150
  const $ = c((o) => {
1134
- const g = k(o);
1135
- I((s) => s.rows.items.some(
1136
- (Z) => k(Z) === g
1151
+ const g = E(o);
1152
+ O((s) => s.rows.items.some(
1153
+ (Z) => E(Z) === g
1137
1154
  ) || s.columns.items.some(
1138
- (Z) => k(Z) === g
1155
+ (Z) => E(Z) === g
1139
1156
  ) ? s : {
1140
1157
  ...s,
1141
1158
  rows: {
@@ -1145,11 +1162,11 @@ const at = ({
1145
1162
  });
1146
1163
  }, []), W = c(
1147
1164
  (o) => {
1148
- const g = k(o);
1149
- I((s) => s.columns.items.some(
1150
- (Z) => k(Z) === g
1165
+ const g = E(o);
1166
+ O((s) => s.columns.items.some(
1167
+ (Z) => E(Z) === g
1151
1168
  ) || s.rows.items.some(
1152
- (Z) => k(Z) === g
1169
+ (Z) => E(Z) === g
1153
1170
  ) ? s : {
1154
1171
  ...s,
1155
1172
  columns: {
@@ -1160,40 +1177,40 @@ const at = ({
1160
1177
  },
1161
1178
  []
1162
1179
  ), A = c((o) => {
1163
- I((g) => ({
1180
+ O((g) => ({
1164
1181
  ...g,
1165
1182
  rows: {
1166
1183
  ...g.rows,
1167
1184
  items: g.rows.items.filter(
1168
- (s) => k(s) !== o
1185
+ (s) => E(s) !== o
1169
1186
  )
1170
1187
  }
1171
1188
  }));
1172
1189
  }, []), xe = c((o) => {
1173
- I((g) => ({
1190
+ O((g) => ({
1174
1191
  ...g,
1175
1192
  columns: {
1176
1193
  ...g.columns,
1177
1194
  items: g.columns.items.filter(
1178
- (s) => k(s) !== o
1195
+ (s) => E(s) !== o
1179
1196
  )
1180
1197
  }
1181
1198
  }));
1182
1199
  }, []), Ce = c(() => {
1183
- I((o) => ({
1200
+ O((o) => ({
1184
1201
  ...o,
1185
1202
  rows: { ...o.rows, items: [] }
1186
1203
  }));
1187
1204
  }, []), ye = c(() => {
1188
- I((o) => ({
1205
+ O((o) => ({
1189
1206
  ...o,
1190
1207
  columns: { ...o.columns, items: [] }
1191
1208
  }));
1192
1209
  }, []), Se = c(
1193
1210
  (o) => {
1194
- const g = k(o);
1195
- I((s) => s.values.items.some(
1196
- (H) => k(H) === g
1211
+ const g = E(o);
1212
+ O((s) => s.values.items.some(
1213
+ (H) => E(H) === g
1197
1214
  ) ? s : {
1198
1215
  ...s,
1199
1216
  values: {
@@ -1204,41 +1221,41 @@ const at = ({
1204
1221
  },
1205
1222
  []
1206
1223
  ), De = c((o) => {
1207
- I((g) => ({
1224
+ O((g) => ({
1208
1225
  ...g,
1209
1226
  values: {
1210
1227
  ...g.values,
1211
1228
  items: g.values.items.filter(
1212
- (s) => k(s) !== o
1229
+ (s) => E(s) !== o
1213
1230
  )
1214
1231
  }
1215
1232
  }));
1216
1233
  }, []), Te = c(
1217
1234
  (o, g) => {
1218
- I((s) => ({
1235
+ O((s) => ({
1219
1236
  ...s,
1220
1237
  values: {
1221
1238
  ...s.values,
1222
1239
  items: s.values.items.map(
1223
- (F) => k(F) === o ? {
1224
- ...F,
1240
+ (z) => E(z) === o ? {
1241
+ ...z,
1225
1242
  pivotAggregation: g
1226
- } : F
1243
+ } : z
1227
1244
  )
1228
1245
  }
1229
1246
  }));
1230
1247
  },
1231
1248
  []
1232
1249
  ), _e = c(() => {
1233
- I((o) => ({
1250
+ O((o) => ({
1234
1251
  ...o,
1235
1252
  values: { ...o.values, items: [] }
1236
1253
  }));
1237
- }, []), Le = c(
1254
+ }, []), ke = c(
1238
1255
  (o) => {
1239
- const g = k(o);
1240
- I((s) => s.filters.items.some(
1241
- (H) => k(H) === g
1256
+ const g = E(o);
1257
+ O((s) => s.filters.items.some(
1258
+ (H) => E(H) === g
1242
1259
  ) ? s : {
1243
1260
  ...s,
1244
1261
  filters: {
@@ -1248,24 +1265,24 @@ const at = ({
1248
1265
  });
1249
1266
  },
1250
1267
  []
1251
- ), ke = c((o) => {
1252
- I((g) => ({
1268
+ ), Le = c((o) => {
1269
+ O((g) => ({
1253
1270
  ...g,
1254
1271
  filters: {
1255
1272
  ...g.filters,
1256
1273
  items: g.filters.items.filter(
1257
- (s) => k(s) !== o
1274
+ (s) => E(s) !== o
1258
1275
  )
1259
1276
  }
1260
1277
  }));
1261
1278
  }, []), Ee = c(
1262
1279
  (o, g) => {
1263
- I((s) => ({
1280
+ O((s) => ({
1264
1281
  ...s,
1265
1282
  filters: {
1266
1283
  ...s.filters,
1267
1284
  items: s.filters.items.map(
1268
- (F) => k(F) === o ? { ...F, pivotFilterValue: g } : F
1285
+ (z) => E(z) === o ? { ...z, pivotFilterValue: g } : z
1269
1286
  )
1270
1287
  }
1271
1288
  }));
@@ -1273,12 +1290,12 @@ const at = ({
1273
1290
  []
1274
1291
  ), Ie = c(
1275
1292
  (o, g) => {
1276
- I((s) => ({
1293
+ O((s) => ({
1277
1294
  ...s,
1278
1295
  filters: {
1279
1296
  ...s.filters,
1280
1297
  items: s.filters.items.map(
1281
- (F) => k(F) === o ? { ...F, pivotFilterMode: g } : F
1298
+ (z) => E(z) === o ? { ...z, pivotFilterMode: g } : z
1282
1299
  )
1283
1300
  }
1284
1301
  }));
@@ -1286,41 +1303,41 @@ const at = ({
1286
1303
  []
1287
1304
  ), Oe = c(
1288
1305
  (o, g) => {
1289
- I((s) => ({
1306
+ O((s) => ({
1290
1307
  ...s,
1291
1308
  filters: {
1292
1309
  ...s.filters,
1293
1310
  items: s.filters.items.map(
1294
- (F) => k(F) === o ? { ...F, pivotFilterCondition: g } : F
1311
+ (z) => E(z) === o ? { ...z, pivotFilterCondition: g } : z
1295
1312
  )
1296
1313
  }
1297
1314
  }));
1298
1315
  },
1299
1316
  []
1300
1317
  ), Pe = c(() => {
1301
- I((o) => ({
1318
+ O((o) => ({
1302
1319
  ...o,
1303
1320
  filters: { ...o.filters, items: [] }
1304
1321
  }));
1305
1322
  }, []), Re = c((o) => {
1306
1323
  S.current = o;
1307
1324
  }, []), Me = c((o) => {
1308
- x(o), o === "create" && (M(null), I({ ...te }));
1325
+ x(o), o === "create" && (F(null), O({ ...te }));
1309
1326
  }, []), Fe = c((o) => {
1310
- M(o.name), I(o);
1327
+ F(o.name), O(o);
1311
1328
  }, []), ze = c(() => {
1312
1329
  w(!0);
1313
1330
  }, []), Be = c(() => {
1314
1331
  w(!1);
1315
1332
  }, []), je = c(
1316
- (o, g, s, F, H) => {
1333
+ (o, g, s, z, H) => {
1317
1334
  n({
1318
1335
  ...b,
1319
1336
  totals: S.current,
1320
1337
  name: o,
1321
1338
  viewType: g,
1322
1339
  isDefault: s,
1323
- ...F && { isUpdated: !0, oldName: H }
1340
+ ...z && { isUpdated: !0, oldName: H }
1324
1341
  }), w(!1);
1325
1342
  },
1326
1343
  [n, b]
@@ -1348,29 +1365,29 @@ const at = ({
1348
1365
  }), { dimensions: o, measures: g };
1349
1366
  }, [d]);
1350
1367
  return l ? /* @__PURE__ */ t(Y, { children: [
1351
- /* @__PURE__ */ e("div", { className: "ia-table-pivot-overlay", onClick: h }),
1368
+ /* @__PURE__ */ e("div", { className: "ia-table-pivot-overlay", onClick: f }),
1352
1369
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-panel d-flex flex-column", children: [
1353
- /* @__PURE__ */ e(Je, { title: "Pivot table", onClose: h }),
1370
+ /* @__PURE__ */ e(Je, { title: "Pivot table", onClose: f }),
1354
1371
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-panel-body d-flex flex-column gap-24", children: [
1355
1372
  v && /* @__PURE__ */ e(
1356
- fe,
1373
+ he,
1357
1374
  {
1358
1375
  message: "Drag and drop from field selection or multi select cards for your own analysis",
1359
1376
  onClose: _
1360
1377
  }
1361
1378
  ),
1362
- !L && R && /* @__PURE__ */ t("div", { className: "ia-table-pivot-mode-selector-container", children: [
1379
+ !k && M && /* @__PURE__ */ t("div", { className: "ia-table-pivot-mode-selector-container", children: [
1363
1380
  /* @__PURE__ */ e("p", { className: "ia-table-pivot-mode-selector-title", children: "Choose how you'd like to proceed with pivots" }),
1364
1381
  /* @__PURE__ */ e("div", { className: "d-flex align-items-center", children: /* @__PURE__ */ e(
1365
1382
  st,
1366
1383
  {
1367
- selectedMode: R,
1384
+ selectedMode: M,
1368
1385
  onModeChange: Me,
1369
1386
  savedPivots: u,
1370
- selectedPivot: u.find((o) => o.name === O) || null,
1387
+ selectedPivot: u.find((o) => o.name === P) || null,
1371
1388
  onSelectPivot: Fe,
1372
1389
  onClearPivot: () => {
1373
- M(null), I({ ...te });
1390
+ F(null), O({ ...te });
1374
1391
  },
1375
1392
  recentlyUsedPivots: y
1376
1393
  }
@@ -1379,7 +1396,7 @@ const at = ({
1379
1396
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-panel-content d-flex gap-10", children: [
1380
1397
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-panel-left d-flex flex-column gap-12", children: [
1381
1398
  i && /* @__PURE__ */ e("div", { className: "ia-table-pivot-panel-children", children: i }),
1382
- /* @__PURE__ */ e("div", { className: "ia-table-pivot-panel-fields-container d-flex flex-column", children: /* @__PURE__ */ e(he, { dimensions: Ge, measures: Ve }) })
1399
+ /* @__PURE__ */ e("div", { className: "ia-table-pivot-panel-fields-container d-flex flex-column", children: /* @__PURE__ */ e(fe, { dimensions: Ge, measures: Ve }) })
1383
1400
  ] }),
1384
1401
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-panel-right d-flex flex-column gap-16", children: [
1385
1402
  /* @__PURE__ */ e(
@@ -1412,22 +1429,22 @@ const at = ({
1412
1429
  onRemoveItem: De,
1413
1430
  onAggregationChange: Te,
1414
1431
  onClearAll: _e,
1415
- pivotAggregationFunc: P
1432
+ pivotAggregationFunc: R
1416
1433
  }
1417
1434
  ),
1418
1435
  !B && /* @__PURE__ */ e(
1419
1436
  Ne,
1420
1437
  {
1421
1438
  items: b.filters.items,
1422
- onDrop: Le,
1423
- onRemoveItem: ke,
1439
+ onDrop: ke,
1440
+ onRemoveItem: Le,
1424
1441
  onFilterValueChange: Ee,
1425
1442
  onFilterModeChange: Ie,
1426
1443
  onFilterConditionChange: Oe,
1427
1444
  onClearAll: Pe
1428
1445
  }
1429
1446
  ),
1430
- E && (r || a || T || z) && /* @__PURE__ */ e(
1447
+ I && (r || a || T || L) && /* @__PURE__ */ e(
1431
1448
  be,
1432
1449
  {
1433
1450
  defaultTotals: b.totals,
@@ -1435,7 +1452,7 @@ const at = ({
1435
1452
  isPivotRowGrandTotal: r,
1436
1453
  isPivotColumnGrandTotal: a,
1437
1454
  isPivotRowSubTotal: T,
1438
- isPivotColumnSubTotal: z
1455
+ isPivotColumnSubTotal: L
1439
1456
  }
1440
1457
  )
1441
1458
  ] })
@@ -1444,14 +1461,14 @@ const at = ({
1444
1461
  /* @__PURE__ */ e(
1445
1462
  at,
1446
1463
  {
1447
- onCancel: h,
1464
+ onCancel: f,
1448
1465
  onSave: ze,
1449
1466
  onApply: C ? Ae : void 0,
1450
1467
  isSaveDisabled: ce,
1451
1468
  isApplyDisabled: ce,
1452
- isHideSave: L,
1469
+ isHideSave: k,
1453
1470
  cancelText: "Cancel",
1454
- saveText: R === "saved" ? "Save & Proceed" : "Save",
1471
+ saveText: M === "saved" ? "Save & Proceed" : "Save",
1455
1472
  applyText: "Apply"
1456
1473
  }
1457
1474
  ),
@@ -1465,7 +1482,7 @@ const at = ({
1465
1482
  savedViews: u,
1466
1483
  maxViews: 50,
1467
1484
  currentViewsCount: u.length,
1468
- initialValues: O ? {
1485
+ initialValues: P ? {
1469
1486
  name: b.name,
1470
1487
  viewType: b.viewType ?? "global",
1471
1488
  isDefault: b.isDefault ?? !1
@@ -1570,19 +1587,19 @@ const at = ({
1570
1587
  }
1571
1588
  ], rt = (l) => /* @__PURE__ */ j.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 17 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ j.createElement("path", { d: "M5.70711 9.29289L1.41421 5L0 6.41421L5.70711 12.1213L17 0.828427L15.5858 -0.585785L5.70711 9.29289Z", fill: "#22C55E" })), ct = ({
1572
1589
  onClose: l,
1573
- onComplete: h
1590
+ onComplete: f
1574
1591
  }) => {
1575
- const [n, d] = D(0), f = ae.length, v = ae[n], _ = c(() => {
1576
- n < f - 1 && d((r) => r + 1);
1577
- }, [n, f]), i = c(() => {
1592
+ const [n, d] = D(0), h = ae.length, v = ae[n], _ = c(() => {
1593
+ n < h - 1 && d((r) => r + 1);
1594
+ }, [n, h]), i = c(() => {
1578
1595
  n > 0 && d((r) => r - 1);
1579
1596
  }, [n]), u = c(() => {
1580
1597
  d(0), l();
1581
1598
  }, [l]), y = c(() => {
1582
- d(0), h == null || h(), l();
1583
- }, [l, h]), N = c(() => {
1599
+ d(0), f == null || f(), l();
1600
+ }, [l, f]), N = c(() => {
1584
1601
  d(0), l();
1585
- }, [l]), C = n === 0, L = n === f - 1, E = V(() => {
1602
+ }, [l]), C = n === 0, k = n === h - 1, I = V(() => {
1586
1603
  const { content: r } = v;
1587
1604
  return r.type === "welcome" && r.learnItems ? /* @__PURE__ */ t("div", { className: "ia-table-pivot-tutorial-learn-box", children: [
1588
1605
  /* @__PURE__ */ e("p", { className: "ia-table-pivot-tutorial-learn-title", children: "What you'll learn:" }),
@@ -1639,7 +1656,7 @@ const at = ({
1639
1656
  },
1640
1657
  a.id
1641
1658
  )) }) : null;
1642
- }, [v]), P = /* @__PURE__ */ e(
1659
+ }, [v]), R = /* @__PURE__ */ e(
1643
1660
  "div",
1644
1661
  {
1645
1662
  className: "ia-table-modal-overlay d-flex align-items-center justify-content-center",
@@ -1698,7 +1715,7 @@ const at = ({
1698
1715
  ),
1699
1716
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-tutorial-body", children: [
1700
1717
  /* @__PURE__ */ e("p", { className: "ia-table-pivot-tutorial-description", children: v.description }),
1701
- E,
1718
+ I,
1702
1719
  /* @__PURE__ */ t("div", { className: "ia-table-pivot-tutorial-footer", children: [
1703
1720
  !C && /* @__PURE__ */ e("div", { className: "ia-table-pivot-tutorial-footer-left", children: /* @__PURE__ */ e(
1704
1721
  "button",
@@ -1724,7 +1741,7 @@ const at = ({
1724
1741
  children: "Skip Tutorial"
1725
1742
  }
1726
1743
  ),
1727
- L ? /* @__PURE__ */ e(
1744
+ k ? /* @__PURE__ */ e(
1728
1745
  "button",
1729
1746
  {
1730
1747
  className: "ia-table-pivot-tutorial-btn ia-table-pivot-tutorial-btn--primary",
@@ -1747,19 +1764,19 @@ const at = ({
1747
1764
  )
1748
1765
  }
1749
1766
  );
1750
- return Qe(P, document.body);
1767
+ return Qe(R, document.body);
1751
1768
  }, me = [
1752
1769
  { value: "gmp-0.5", label: "GMP 0.5" },
1753
1770
  { value: "gmp-1.0", label: "GMP 1.0" },
1754
1771
  { value: "gmp-2.0", label: "GMP 2.0" }
1755
- ], ut = ({
1772
+ ], ht = ({
1756
1773
  pivotConfig: l,
1757
- shouldRenderTable: h,
1774
+ shouldRenderTable: f,
1758
1775
  showSaveTableConfig: n
1759
1776
  }) => {
1760
1777
  const {
1761
1778
  savedPivots: d,
1762
- savedPivotState: f,
1779
+ savedPivotState: h,
1763
1780
  handlePivotApply: v,
1764
1781
  handlePivotSave: _,
1765
1782
  isHidePivotSave: i,
@@ -1767,24 +1784,24 @@ const at = ({
1767
1784
  enablePivotTutorial: y,
1768
1785
  showPivotTotalsSection: N,
1769
1786
  pivotChildren: C,
1770
- pivotPanelColumnDef: L,
1771
- pivotAggregationFunc: E,
1772
- isPivotRowGrandTotal: P = !0,
1787
+ pivotPanelColumnDef: k,
1788
+ pivotAggregationFunc: I,
1789
+ isPivotRowGrandTotal: R = !0,
1773
1790
  isPivotColumnGrandTotal: r = !0,
1774
1791
  isPivotRowSubTotal: a = !0,
1775
1792
  isPivotColumnSubTotal: T = !0,
1776
- isHideFilters: z = !1,
1793
+ isHideFilters: L = !1,
1777
1794
  isHideValues: B = !1
1778
- } = l, p = Q(null), [m, w] = D(!1), [R, x] = D(!1), [O, M] = D(
1795
+ } = l, p = Q(null), [m, w] = D(!1), [M, x] = D(!1), [P, F] = D(
1779
1796
  me[0]
1780
- ), [b, I] = D(f);
1797
+ ), [b, O] = D(h);
1781
1798
  J(() => {
1782
- I(f || b);
1783
- }, [f, b]);
1799
+ O(h || b);
1800
+ }, [h, b]);
1784
1801
  const S = (A) => {
1785
- _ && _(A, w), I(A);
1802
+ _ && _(A, w), O(A);
1786
1803
  }, $ = (A) => {
1787
- v && v(A, w), I(A);
1804
+ v && v(A, w), O(A);
1788
1805
  }, W = () => {
1789
1806
  w(!1);
1790
1807
  };
@@ -1826,8 +1843,8 @@ const at = ({
1826
1843
  )
1827
1844
  }
1828
1845
  ),
1829
- h && n && /* @__PURE__ */ e("div", { className: "ia-table-divider-line" }),
1830
- m && (L == null ? void 0 : L.length) && /* @__PURE__ */ e(
1846
+ f && n && /* @__PURE__ */ e("div", { className: "ia-table-divider-line" }),
1847
+ m && (k == null ? void 0 : k.length) && /* @__PURE__ */ e(
1831
1848
  ot,
1832
1849
  {
1833
1850
  isOpen: m,
@@ -1835,26 +1852,26 @@ const at = ({
1835
1852
  onSave: S,
1836
1853
  handlePivotApply: $,
1837
1854
  versions: me,
1838
- onVersionChange: M,
1855
+ onVersionChange: F,
1839
1856
  showNotification: !0,
1840
- selectedVersion: O,
1841
- availableFields: L,
1857
+ selectedVersion: P,
1858
+ availableFields: k,
1842
1859
  initialState: b || void 0,
1843
1860
  pivotChildren: C,
1844
1861
  savedPivots: d,
1845
1862
  recentlyUsedPivots: u,
1846
1863
  isHidePivotSave: i,
1847
1864
  showTotalsSection: N,
1848
- pivotAggregationFunc: E,
1849
- isPivotRowGrandTotal: P,
1865
+ pivotAggregationFunc: I,
1866
+ isPivotRowGrandTotal: R,
1850
1867
  isPivotColumnGrandTotal: r,
1851
1868
  isPivotRowSubTotal: a,
1852
1869
  isPivotColumnSubTotal: T,
1853
- isHideFilters: z,
1870
+ isHideFilters: L,
1854
1871
  isHideValues: B
1855
1872
  }
1856
1873
  ),
1857
- R && y && /* @__PURE__ */ e(
1874
+ M && y && /* @__PURE__ */ e(
1858
1875
  ct,
1859
1876
  {
1860
1877
  onClose: () => x((A) => !A)
@@ -1863,5 +1880,5 @@ const at = ({
1863
1880
  ] });
1864
1881
  };
1865
1882
  export {
1866
- ut as PivotWrapper
1883
+ ht as PivotWrapper
1867
1884
  };