ia-table 0.14.8 → 0.15.1
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/RadioGroup-Cv9QL-Yd.js +1027 -0
- package/dist/chat.d.ts +3374 -0
- package/dist/chat.js +51510 -0
- package/dist/chat.type-Dy7elZcf.js +5088 -0
- package/dist/index.d.ts +1479 -15
- package/dist/index.js +9893 -14590
- package/dist/pivot.d.ts +98 -1
- package/dist/pivot.js +278 -261
- package/dist/right-arrow-C7mpExx-.js +341 -0
- package/package.json +21 -8
- package/dist/right-arrow-u0DuaXma.js +0 -1339
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,
|
|
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-C7mpExx-.js";
|
|
6
7
|
import { createPortal as Qe } from "react-dom";
|
|
7
8
|
const Je = ({
|
|
8
9
|
title: l,
|
|
9
|
-
onClose:
|
|
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:
|
|
17
|
+
onClick: f,
|
|
17
18
|
"aria-label": "Close",
|
|
18
19
|
children: /* @__PURE__ */ e(X, { className: "icon-10" })
|
|
19
20
|
}
|
|
20
21
|
)
|
|
21
|
-
] }),
|
|
22
|
-
({ message: l, defaultVisible:
|
|
23
|
-
const [d,
|
|
24
|
-
|
|
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
|
-
|
|
60
|
+
he.displayName = "PivotNotification";
|
|
60
61
|
const le = q.memo(
|
|
61
|
-
({ column: l, isDragging:
|
|
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 ${
|
|
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(
|
|
76
|
-
/* @__PURE__ */ e("span", { className: "ia-table-pivot-field-item-name", children: l.headerName ||
|
|
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
|
|
84
|
-
({ dimensions: l, measures:
|
|
85
|
-
const [n, d] = D(""),
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
125
|
+
E(i)
|
|
125
126
|
)) })
|
|
126
127
|
] }),
|
|
127
|
-
|
|
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
|
-
|
|
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:
|
|
137
|
+
items: f,
|
|
137
138
|
defaultExpanded: n = !0,
|
|
138
139
|
onDrop: d,
|
|
139
|
-
onRemoveItem:
|
|
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), [
|
|
144
|
-
(x,
|
|
145
|
-
|
|
146
|
-
const b = new Set(
|
|
147
|
-
return
|
|
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
|
-
|
|
154
|
-
const
|
|
155
|
-
return
|
|
156
|
-
}),
|
|
154
|
+
I((P) => {
|
|
155
|
+
const F = new Set(P);
|
|
156
|
+
return F.delete(x), F;
|
|
157
|
+
}), h(x);
|
|
157
158
|
},
|
|
158
|
-
[
|
|
159
|
+
[h]
|
|
159
160
|
), a = c(() => {
|
|
160
|
-
|
|
161
|
+
I(/* @__PURE__ */ new Set()), v == null || v();
|
|
161
162
|
}, [v]), T = c(() => {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}),
|
|
165
|
-
}, [
|
|
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
|
|
174
|
-
if (
|
|
175
|
-
const
|
|
176
|
-
if (
|
|
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(
|
|
179
|
+
d(F);
|
|
179
180
|
}
|
|
180
|
-
} catch (
|
|
181
|
-
console.error("Error parsing dropped data:",
|
|
181
|
+
} catch (P) {
|
|
182
|
+
console.error("Error parsing dropped data:", P);
|
|
182
183
|
}
|
|
183
184
|
},
|
|
184
185
|
[d]
|
|
185
|
-
),
|
|
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
|
-
|
|
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(
|
|
223
|
+
children: /* @__PURE__ */ e(qe, { className: "icon-16" })
|
|
223
224
|
}
|
|
224
225
|
)
|
|
225
226
|
}
|
|
226
227
|
),
|
|
227
|
-
|
|
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 ${
|
|
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:
|
|
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:
|
|
241
|
-
const
|
|
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 ${
|
|
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: (
|
|
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:
|
|
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(
|
|
262
|
-
"aria-label": `Remove ${
|
|
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
|
-
|
|
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:
|
|
289
|
+
defaultTotals: f = Ye,
|
|
289
290
|
onTotalsChange: n,
|
|
290
291
|
isPivotRowGrandTotal: d,
|
|
291
|
-
isPivotColumnGrandTotal:
|
|
292
|
+
isPivotColumnGrandTotal: h,
|
|
292
293
|
isPivotRowSubTotal: v,
|
|
293
294
|
isPivotColumnSubTotal: _
|
|
294
295
|
}) => {
|
|
295
|
-
const [i, u] = D(l), [y, N] = D(
|
|
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
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
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 ||
|
|
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:
|
|
355
|
+
onChange: k,
|
|
339
356
|
label: "Show row grand total"
|
|
340
357
|
}
|
|
341
358
|
) }),
|
|
342
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
406
|
+
defaultExpanded: f = !1,
|
|
390
407
|
onDrop: n,
|
|
391
408
|
onRemoveItem: d,
|
|
392
|
-
onAggregationChange:
|
|
409
|
+
onAggregationChange: h,
|
|
393
410
|
onClearAll: v,
|
|
394
411
|
pivotAggregationFunc: _
|
|
395
412
|
}) => {
|
|
396
|
-
const [i, u] = D(
|
|
413
|
+
const [i, u] = D(f), [y, N] = D(!1), C = c((r) => {
|
|
397
414
|
r.preventDefault(), r.dataTransfer.dropEffect = "move", N(!0);
|
|
398
|
-
}, []),
|
|
415
|
+
}, []), k = c((r) => {
|
|
399
416
|
r.preventDefault(), N(!1);
|
|
400
|
-
}, []),
|
|
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
|
-
),
|
|
417
|
-
a ?
|
|
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:
|
|
452
|
-
onDrop:
|
|
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 =
|
|
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 ===
|
|
501
|
+
(m) => m.value === L
|
|
485
502
|
) || B[0],
|
|
486
503
|
withPortal: !0,
|
|
487
|
-
setSelectedOptions: (m) =>
|
|
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:
|
|
542
|
+
defaultExpanded: f = !1,
|
|
526
543
|
onDrop: n,
|
|
527
544
|
onRemoveItem: d,
|
|
528
|
-
onFilterValueChange:
|
|
545
|
+
onFilterValueChange: h,
|
|
529
546
|
onFilterModeChange: v,
|
|
530
547
|
onFilterConditionChange: _,
|
|
531
548
|
onClearAll: i
|
|
532
549
|
}) => {
|
|
533
|
-
const [u, y] = D(
|
|
534
|
-
const w =
|
|
535
|
-
return
|
|
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
|
-
|
|
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
|
-
},
|
|
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
|
|
551
|
-
if (
|
|
567
|
+
const M = JSON.parse(w);
|
|
568
|
+
if (M.extra && M.extra.is_measure)
|
|
552
569
|
return;
|
|
553
|
-
n(
|
|
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:
|
|
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 =
|
|
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:
|
|
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:
|
|
639
|
-
onChange: (b) =>
|
|
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:
|
|
647
|
-
(b) => b.value ===
|
|
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:
|
|
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:
|
|
689
|
+
onSave: f,
|
|
673
690
|
onApply: n,
|
|
674
691
|
isSaveDisabled: d = !1,
|
|
675
|
-
isApplyDisabled:
|
|
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:
|
|
685
|
-
!v &&
|
|
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:
|
|
706
|
+
onClose: f,
|
|
690
707
|
onSave: n,
|
|
691
708
|
onReplace: d,
|
|
692
|
-
savedViews:
|
|
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) ?? ""), [
|
|
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
|
-
), [
|
|
716
|
+
), [R, r] = D(
|
|
700
717
|
(i == null ? void 0 : i.isDefault) ?? !1
|
|
701
|
-
), [a, T] = D("all"), [
|
|
718
|
+
), [a, T] = D("all"), [L, B] = D(""), [p, m] = D(null);
|
|
702
719
|
J(() => {
|
|
703
|
-
l && i && (C(i.name),
|
|
720
|
+
l && i && (C(i.name), I(i.viewType), r(i.isDefault));
|
|
704
721
|
}, [l, i]);
|
|
705
|
-
const w = v - _,
|
|
706
|
-
let S =
|
|
707
|
-
if (a !== "all" && (S = S.filter(($) => $.viewType === a)),
|
|
708
|
-
const $ =
|
|
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
|
-
}, [
|
|
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(),
|
|
732
|
+
n(N.trim(), k, R, S, $);
|
|
716
733
|
} else u === "replace" && p && d(p);
|
|
717
|
-
C(""),
|
|
734
|
+
C(""), I("global"), r(!1), T("all"), B(""), m(null), y("create");
|
|
718
735
|
}, [
|
|
719
736
|
u,
|
|
720
737
|
N,
|
|
721
|
-
|
|
722
|
-
|
|
738
|
+
k,
|
|
739
|
+
R,
|
|
723
740
|
p,
|
|
724
741
|
n,
|
|
725
742
|
d
|
|
726
|
-
]),
|
|
727
|
-
C(""),
|
|
728
|
-
}, [
|
|
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
|
-
|
|
749
|
+
He,
|
|
733
750
|
{
|
|
734
751
|
open: l,
|
|
735
|
-
onClose:
|
|
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:
|
|
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:
|
|
790
|
-
onChange: (S) =>
|
|
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:
|
|
799
|
-
onChange: () => r(!
|
|
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:
|
|
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
|
-
|
|
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: () =>
|
|
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
|
-
|
|
888
|
+
M.length === 0 && /* @__PURE__ */ e("div", { className: "ia-table-save-pivot-modal-no-views", children: "No views found" })
|
|
872
889
|
] }),
|
|
873
|
-
|
|
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:
|
|
897
|
+
placeholder: f = "Select",
|
|
881
898
|
savedViews: n = [],
|
|
882
899
|
selectedView: d = null,
|
|
883
|
-
onSelectView:
|
|
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,
|
|
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 (
|
|
901
|
-
const m =
|
|
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,
|
|
922
|
+
}, [n, C, I]), T = () => {
|
|
906
923
|
u || N(!y);
|
|
907
|
-
},
|
|
908
|
-
|
|
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) ||
|
|
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) =>
|
|
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:
|
|
977
|
-
onChange: (p) =>
|
|
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: () =>
|
|
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: () =>
|
|
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:
|
|
1048
|
+
onModeChange: f,
|
|
1032
1049
|
savedPivots: n = [],
|
|
1033
1050
|
selectedPivot: d = null,
|
|
1034
|
-
onSelectPivot:
|
|
1051
|
+
onSelectPivot: h,
|
|
1035
1052
|
onClearPivot: v,
|
|
1036
1053
|
recentlyUsedPivots: _ = [],
|
|
1037
1054
|
onViewAllPivots: i
|
|
1038
1055
|
}) => {
|
|
1039
1056
|
const u = (N) => {
|
|
1040
|
-
|
|
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: () =>
|
|
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:
|
|
1117
|
+
onClose: f,
|
|
1101
1118
|
onSave: n,
|
|
1102
1119
|
availableFields: d,
|
|
1103
1120
|
// versions = [],
|
|
1104
1121
|
// selectedVersion: externalSelectedVersion,
|
|
1105
1122
|
// onVersionChange,
|
|
1106
|
-
initialState:
|
|
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:
|
|
1117
|
-
showTotalsSection:
|
|
1118
|
-
pivotAggregationFunc:
|
|
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:
|
|
1139
|
+
isPivotColumnSubTotal: L,
|
|
1123
1140
|
isHideFilters: B,
|
|
1124
1141
|
isHideValues: p
|
|
1125
1142
|
}) => {
|
|
1126
|
-
const [m, w] = D(!1), [
|
|
1143
|
+
const [m, w] = D(!1), [M, x] = D(null), [P, F] = D(null), [b, O] = D(() => ({
|
|
1127
1144
|
...te,
|
|
1128
|
-
...
|
|
1145
|
+
...M === "create" ? {} : h
|
|
1129
1146
|
})), S = Q(b.totals);
|
|
1130
1147
|
J(() => {
|
|
1131
|
-
|
|
1132
|
-
}, [
|
|
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 =
|
|
1135
|
-
|
|
1136
|
-
(Z) =>
|
|
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) =>
|
|
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 =
|
|
1149
|
-
|
|
1150
|
-
(Z) =>
|
|
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) =>
|
|
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
|
-
|
|
1180
|
+
O((g) => ({
|
|
1164
1181
|
...g,
|
|
1165
1182
|
rows: {
|
|
1166
1183
|
...g.rows,
|
|
1167
1184
|
items: g.rows.items.filter(
|
|
1168
|
-
(s) =>
|
|
1185
|
+
(s) => E(s) !== o
|
|
1169
1186
|
)
|
|
1170
1187
|
}
|
|
1171
1188
|
}));
|
|
1172
1189
|
}, []), xe = c((o) => {
|
|
1173
|
-
|
|
1190
|
+
O((g) => ({
|
|
1174
1191
|
...g,
|
|
1175
1192
|
columns: {
|
|
1176
1193
|
...g.columns,
|
|
1177
1194
|
items: g.columns.items.filter(
|
|
1178
|
-
(s) =>
|
|
1195
|
+
(s) => E(s) !== o
|
|
1179
1196
|
)
|
|
1180
1197
|
}
|
|
1181
1198
|
}));
|
|
1182
1199
|
}, []), Ce = c(() => {
|
|
1183
|
-
|
|
1200
|
+
O((o) => ({
|
|
1184
1201
|
...o,
|
|
1185
1202
|
rows: { ...o.rows, items: [] }
|
|
1186
1203
|
}));
|
|
1187
1204
|
}, []), ye = c(() => {
|
|
1188
|
-
|
|
1205
|
+
O((o) => ({
|
|
1189
1206
|
...o,
|
|
1190
1207
|
columns: { ...o.columns, items: [] }
|
|
1191
1208
|
}));
|
|
1192
1209
|
}, []), Se = c(
|
|
1193
1210
|
(o) => {
|
|
1194
|
-
const g =
|
|
1195
|
-
|
|
1196
|
-
(H) =>
|
|
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
|
-
|
|
1224
|
+
O((g) => ({
|
|
1208
1225
|
...g,
|
|
1209
1226
|
values: {
|
|
1210
1227
|
...g.values,
|
|
1211
1228
|
items: g.values.items.filter(
|
|
1212
|
-
(s) =>
|
|
1229
|
+
(s) => E(s) !== o
|
|
1213
1230
|
)
|
|
1214
1231
|
}
|
|
1215
1232
|
}));
|
|
1216
1233
|
}, []), Te = c(
|
|
1217
1234
|
(o, g) => {
|
|
1218
|
-
|
|
1235
|
+
O((s) => ({
|
|
1219
1236
|
...s,
|
|
1220
1237
|
values: {
|
|
1221
1238
|
...s.values,
|
|
1222
1239
|
items: s.values.items.map(
|
|
1223
|
-
(
|
|
1224
|
-
...
|
|
1240
|
+
(z) => E(z) === o ? {
|
|
1241
|
+
...z,
|
|
1225
1242
|
pivotAggregation: g
|
|
1226
|
-
} :
|
|
1243
|
+
} : z
|
|
1227
1244
|
)
|
|
1228
1245
|
}
|
|
1229
1246
|
}));
|
|
1230
1247
|
},
|
|
1231
1248
|
[]
|
|
1232
1249
|
), _e = c(() => {
|
|
1233
|
-
|
|
1250
|
+
O((o) => ({
|
|
1234
1251
|
...o,
|
|
1235
1252
|
values: { ...o.values, items: [] }
|
|
1236
1253
|
}));
|
|
1237
|
-
}, []),
|
|
1254
|
+
}, []), ke = c(
|
|
1238
1255
|
(o) => {
|
|
1239
|
-
const g =
|
|
1240
|
-
|
|
1241
|
-
(H) =>
|
|
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
|
-
),
|
|
1252
|
-
|
|
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) =>
|
|
1274
|
+
(s) => E(s) !== o
|
|
1258
1275
|
)
|
|
1259
1276
|
}
|
|
1260
1277
|
}));
|
|
1261
1278
|
}, []), Ee = c(
|
|
1262
1279
|
(o, g) => {
|
|
1263
|
-
|
|
1280
|
+
O((s) => ({
|
|
1264
1281
|
...s,
|
|
1265
1282
|
filters: {
|
|
1266
1283
|
...s.filters,
|
|
1267
1284
|
items: s.filters.items.map(
|
|
1268
|
-
(
|
|
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
|
-
|
|
1293
|
+
O((s) => ({
|
|
1277
1294
|
...s,
|
|
1278
1295
|
filters: {
|
|
1279
1296
|
...s.filters,
|
|
1280
1297
|
items: s.filters.items.map(
|
|
1281
|
-
(
|
|
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
|
-
|
|
1306
|
+
O((s) => ({
|
|
1290
1307
|
...s,
|
|
1291
1308
|
filters: {
|
|
1292
1309
|
...s.filters,
|
|
1293
1310
|
items: s.filters.items.map(
|
|
1294
|
-
(
|
|
1311
|
+
(z) => E(z) === o ? { ...z, pivotFilterCondition: g } : z
|
|
1295
1312
|
)
|
|
1296
1313
|
}
|
|
1297
1314
|
}));
|
|
1298
1315
|
},
|
|
1299
1316
|
[]
|
|
1300
1317
|
), Pe = c(() => {
|
|
1301
|
-
|
|
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" && (
|
|
1325
|
+
x(o), o === "create" && (F(null), O({ ...te }));
|
|
1309
1326
|
}, []), Fe = c((o) => {
|
|
1310
|
-
|
|
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,
|
|
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
|
-
...
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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
|
-
!
|
|
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:
|
|
1384
|
+
selectedMode: M,
|
|
1368
1385
|
onModeChange: Me,
|
|
1369
1386
|
savedPivots: u,
|
|
1370
|
-
selectedPivot: u.find((o) => o.name ===
|
|
1387
|
+
selectedPivot: u.find((o) => o.name === P) || null,
|
|
1371
1388
|
onSelectPivot: Fe,
|
|
1372
1389
|
onClearPivot: () => {
|
|
1373
|
-
|
|
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(
|
|
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:
|
|
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:
|
|
1423
|
-
onRemoveItem:
|
|
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
|
-
|
|
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:
|
|
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:
|
|
1464
|
+
onCancel: f,
|
|
1448
1465
|
onSave: ze,
|
|
1449
1466
|
onApply: C ? Ae : void 0,
|
|
1450
1467
|
isSaveDisabled: ce,
|
|
1451
1468
|
isApplyDisabled: ce,
|
|
1452
|
-
isHideSave:
|
|
1469
|
+
isHideSave: k,
|
|
1453
1470
|
cancelText: "Cancel",
|
|
1454
|
-
saveText:
|
|
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:
|
|
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:
|
|
1590
|
+
onComplete: f
|
|
1574
1591
|
}) => {
|
|
1575
|
-
const [n, d] = D(0),
|
|
1576
|
-
n <
|
|
1577
|
-
}, [n,
|
|
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),
|
|
1583
|
-
}, [l,
|
|
1599
|
+
d(0), f == null || f(), l();
|
|
1600
|
+
}, [l, f]), N = c(() => {
|
|
1584
1601
|
d(0), l();
|
|
1585
|
-
}, [l]), C = n === 0,
|
|
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]),
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
],
|
|
1772
|
+
], ht = ({
|
|
1756
1773
|
pivotConfig: l,
|
|
1757
|
-
shouldRenderTable:
|
|
1774
|
+
shouldRenderTable: f,
|
|
1758
1775
|
showSaveTableConfig: n
|
|
1759
1776
|
}) => {
|
|
1760
1777
|
const {
|
|
1761
1778
|
savedPivots: d,
|
|
1762
|
-
savedPivotState:
|
|
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:
|
|
1771
|
-
pivotAggregationFunc:
|
|
1772
|
-
isPivotRowGrandTotal:
|
|
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:
|
|
1793
|
+
isHideFilters: L = !1,
|
|
1777
1794
|
isHideValues: B = !1
|
|
1778
|
-
} = l, p = Q(null), [m, w] = D(!1), [
|
|
1795
|
+
} = l, p = Q(null), [m, w] = D(!1), [M, x] = D(!1), [P, F] = D(
|
|
1779
1796
|
me[0]
|
|
1780
|
-
), [b,
|
|
1797
|
+
), [b, O] = D(h);
|
|
1781
1798
|
J(() => {
|
|
1782
|
-
|
|
1783
|
-
}, [
|
|
1799
|
+
O(h || b);
|
|
1800
|
+
}, [h, b]);
|
|
1784
1801
|
const S = (A) => {
|
|
1785
|
-
_ && _(A, w),
|
|
1802
|
+
_ && _(A, w), O(A);
|
|
1786
1803
|
}, $ = (A) => {
|
|
1787
|
-
v && v(A, w),
|
|
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
|
-
|
|
1830
|
-
m && (
|
|
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:
|
|
1855
|
+
onVersionChange: F,
|
|
1839
1856
|
showNotification: !0,
|
|
1840
|
-
selectedVersion:
|
|
1841
|
-
availableFields:
|
|
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:
|
|
1849
|
-
isPivotRowGrandTotal:
|
|
1865
|
+
pivotAggregationFunc: I,
|
|
1866
|
+
isPivotRowGrandTotal: R,
|
|
1850
1867
|
isPivotColumnGrandTotal: r,
|
|
1851
1868
|
isPivotRowSubTotal: a,
|
|
1852
1869
|
isPivotColumnSubTotal: T,
|
|
1853
|
-
isHideFilters:
|
|
1870
|
+
isHideFilters: L,
|
|
1854
1871
|
isHideValues: B
|
|
1855
1872
|
}
|
|
1856
1873
|
),
|
|
1857
|
-
|
|
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
|
-
|
|
1883
|
+
ht as PivotWrapper
|
|
1867
1884
|
};
|