serverside_pivot 0.0.95 → 0.0.96
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/react/chunks/ContextMenu-DJuS4qTZ.mjs +198 -0
- package/dist/react/chunks/{DetailDrawer-DCKIxSpW.mjs → DetailDrawer-DgKSC5Vu.mjs} +1 -1
- package/dist/react/chunks/{DetailSidePanel-DgUWPBQk.mjs → DetailSidePanel-CC5Dugyl.mjs} +1 -1
- package/dist/react/chunks/{DetailSurfaceContent-BEL6xuaZ.mjs → DetailSurfaceContent-CrQVHlcU.mjs} +52 -53
- package/dist/react/chunks/{ECharts2dRenderer-Dgkp9_1P.mjs → ECharts2dRenderer-46gLrUdf.mjs} +1 -1
- package/dist/react/chunks/{ECharts3dRenderer-70VOp8V0.mjs → ECharts3dRenderer-Dg4ta5Bl.mjs} +1 -1
- package/dist/react/chunks/{EditSidePanel-CygqVXLX.mjs → EditSidePanel-CkShaByb.mjs} +1 -1
- package/dist/react/chunks/{InlineDetailPanel-BUBRWdFW.mjs → InlineDetailPanel-mnwjoD0I.mjs} +1 -1
- package/dist/react/chunks/{PivotCharts-VX5-mEEp.mjs → PivotCharts-MX-Z7DlR.mjs} +1207 -1193
- package/dist/react/chunks/{ReportEditor-B5j-CU9-.mjs → ReportEditor-U0E42xKL.mjs} +506 -480
- package/dist/react/chunks/SidebarPanel-BzRW1Kgq.mjs +3944 -0
- package/dist/react/chunks/{SparklineDetailGraph-Cfe2KcOp.mjs → SparklineDetailGraph-35Tim_8B.mjs} +1 -1
- package/dist/react/chunks/{installCanvasRenderer-C4h5pc1p.mjs → installCanvasRenderer-DRq0xpXO.mjs} +1 -1
- package/dist/react/chunks/react-CL4GbEOd.mjs +33206 -0
- package/dist/react/chunks/{xlsx.mini.min-CzdkdH3N.mjs → xlsx.mini.min-kfIgXMVB.mjs} +1 -1
- package/dist/react/components/DashTanstackPivot.react.d.ts +4 -0
- package/dist/react/components/ShimmerFallback.d.ts +11 -0
- package/dist/react/components/ThemedSelect.d.ts +8 -0
- package/dist/react/contexts/PivotThemeContext.d.ts +1 -0
- package/dist/react/hooks/useColumnDefs.d.ts +1 -1
- package/dist/react/hooks/useRenderHelpers.d.ts +1 -1
- package/dist/react/hooks/useServerSideRowModel.d.ts +1 -1
- package/dist/react/index.mjs +5 -5
- package/dist/react/react.d.ts +1 -1
- package/dist/react/runtime/client/clientPivotTransport.d.ts +1 -0
- package/dist/react/runtime/client/duckdbWasmExecutor.d.ts +3 -0
- package/dist/react/runtime/client/types.d.ts +12 -0
- package/dist/react/runtime/runtimeDomains.d.ts +94 -2
- package/dist/react/runtime/useRuntimeColumnAutoSizing.d.ts +1 -1
- package/dist/react/runtime/useRuntimeViewSnapshot.d.ts +1 -1
- package/dist/react/utils/dataBars.d.ts +1 -0
- package/dist/react/utils/domEvents.d.ts +1 -0
- package/dist/react/utils/helpers.d.ts +5 -0
- package/dist/react/utils/pivotLayoutUtils.d.ts +4 -0
- package/dist/react/utils/sorting.d.ts +1 -1
- package/package.json +1 -1
- package/dist/react/chunks/ContextMenu-1G-o1ms9.mjs +0 -195
- package/dist/react/chunks/SidebarPanel-LXUE6nPd.mjs +0 -3742
- package/dist/react/chunks/react-CDa-ADnG.mjs +0 -31199
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import t, { useState as H, useRef as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
1
|
+
import t, { useState as H, useRef as Fe, useMemo as W, useCallback as B, useEffect as Ee } from "react";
|
|
2
|
+
import { ab as St, an as wt, I as m, ao as Ct, T as U, ad as kt, _ as M, ap as At } from "./react-CL4GbEOd.mjs";
|
|
3
|
+
const oe = () => `r${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`, Qe = [
|
|
4
4
|
{ value: "eq", label: "Equals" },
|
|
5
5
|
{ value: "not_eq", label: "Not equals" },
|
|
6
6
|
{ value: "in", label: "In list" },
|
|
@@ -11,7 +11,7 @@ const ae = () => `r${Date.now().toString(36)}${Math.random().toString(36).slice(
|
|
|
11
11
|
{ value: "gte", label: "Greater or equal" },
|
|
12
12
|
{ value: "lt", label: "Less than" },
|
|
13
13
|
{ value: "lte", label: "Less or equal" }
|
|
14
|
-
],
|
|
14
|
+
], pe = /* @__PURE__ */ new Set(["in", "not_in"]), $t = {
|
|
15
15
|
eq: "=",
|
|
16
16
|
not_eq: "!=",
|
|
17
17
|
in: "in",
|
|
@@ -22,7 +22,7 @@ const ae = () => `r${Date.now().toString(36)}${Math.random().toString(36).slice(
|
|
|
22
22
|
gte: ">=",
|
|
23
23
|
lt: "<",
|
|
24
24
|
lte: "<="
|
|
25
|
-
},
|
|
25
|
+
}, Ft = /* @__PURE__ */ new Set([
|
|
26
26
|
"depth",
|
|
27
27
|
"_id",
|
|
28
28
|
"_path",
|
|
@@ -32,8 +32,8 @@ const ae = () => `r${Date.now().toString(36)}${Math.random().toString(36).slice(
|
|
|
32
32
|
"_has_children",
|
|
33
33
|
"_is_expanded",
|
|
34
34
|
"__col_schema"
|
|
35
|
-
]), T = "default",
|
|
36
|
-
const l = e && typeof e == "object" ? e : {}, n = Number(l.indent), a = Number(l.borderWidth), r = typeof l.borderStyle == "string" &&
|
|
35
|
+
]), T = "default", De = "branch:", Ue = ["", "solid", "dashed", "dotted", "double"], et = (e = "") => ({ _id: oe(), field: e, operator: "eq", value: "", values: [] }), Le = () => ({ op: "AND", clauses: [] }), Bt = () => ({ _id: oe(), label: "", condition: Le(), child: null }), Se = (e = {}) => {
|
|
36
|
+
const l = e && typeof e == "object" ? e : {}, n = Number(l.indent), a = Number(l.borderWidth), r = typeof l.borderStyle == "string" && Ue.includes(l.borderStyle) ? l.borderStyle : "";
|
|
37
37
|
return {
|
|
38
38
|
indent: Number.isFinite(n) && n >= 0 ? Math.floor(n) : "",
|
|
39
39
|
bold: l.bold === !0,
|
|
@@ -47,7 +47,7 @@ const ae = () => `r${Date.now().toString(36)}${Math.random().toString(36).slice(
|
|
|
47
47
|
borderWidth: Number.isFinite(a) && a > 0 ? Math.floor(a) : ""
|
|
48
48
|
};
|
|
49
49
|
}, Y = (e = "") => ({
|
|
50
|
-
_id:
|
|
50
|
+
_id: oe(),
|
|
51
51
|
field: e,
|
|
52
52
|
label: "",
|
|
53
53
|
topN: null,
|
|
@@ -55,37 +55,37 @@ const ae = () => `r${Date.now().toString(36)}${Math.random().toString(36).slice(
|
|
|
55
55
|
sortDir: "desc",
|
|
56
56
|
sortAbs: !1,
|
|
57
57
|
filters: null,
|
|
58
|
-
format:
|
|
58
|
+
format: Se(),
|
|
59
59
|
defaultChild: null,
|
|
60
60
|
branches: []
|
|
61
|
-
}),
|
|
62
|
-
_id: typeof e._id == "string" ? e._id :
|
|
61
|
+
}), Dt = (e) => !e || typeof e.field != "string" || !e.field ? null : {
|
|
62
|
+
_id: typeof e._id == "string" ? e._id : oe(),
|
|
63
63
|
field: e.field,
|
|
64
|
-
operator:
|
|
64
|
+
operator: Qe.some((l) => l.value === e.operator) ? e.operator : "eq",
|
|
65
65
|
value: e.value !== void 0 && e.value !== null ? String(e.value) : "",
|
|
66
66
|
values: Array.isArray(e.values) ? e.values.map(String).filter(Boolean) : []
|
|
67
|
-
},
|
|
67
|
+
}, ze = (e) => ({
|
|
68
68
|
op: e && e.op === "OR" ? "OR" : "AND",
|
|
69
|
-
clauses: Array.isArray(e && e.clauses) ? e.clauses.map(
|
|
70
|
-
}),
|
|
71
|
-
_id: typeof e._id == "string" ? e._id :
|
|
69
|
+
clauses: Array.isArray(e && e.clauses) ? e.clauses.map(Dt).filter(Boolean) : []
|
|
70
|
+
}), Re = (e) => !e || typeof e != "object" ? null : {
|
|
71
|
+
_id: typeof e._id == "string" ? e._id : oe(),
|
|
72
72
|
label: typeof e.label == "string" ? e.label : "",
|
|
73
|
-
condition:
|
|
73
|
+
condition: ze(e.condition),
|
|
74
74
|
sourceRowPath: Array.isArray(e.sourceRowPath) ? e.sourceRowPath.map(String).filter(Boolean) : [],
|
|
75
75
|
sourcePathFields: Array.isArray(e.sourcePathFields) ? e.sourcePathFields.map(String).filter(Boolean) : [],
|
|
76
76
|
child: e.child ? V(e.child) : null
|
|
77
77
|
};
|
|
78
78
|
function V(e) {
|
|
79
79
|
if (!e || typeof e != "object") return null;
|
|
80
|
-
let l = Array.isArray(e.branches) ? e.branches.map(
|
|
81
|
-
l.length === 0 && e.childrenByValue && typeof e.childrenByValue == "object" && (l = Object.entries(e.childrenByValue).filter(([a]) => a).map(([a, r]) =>
|
|
80
|
+
let l = Array.isArray(e.branches) ? e.branches.map(Re).filter(Boolean) : [];
|
|
81
|
+
l.length === 0 && e.childrenByValue && typeof e.childrenByValue == "object" && (l = Object.entries(e.childrenByValue).filter(([a]) => a).map(([a, r]) => Re({
|
|
82
82
|
label: a,
|
|
83
83
|
condition: { op: "AND", clauses: [{ field: e.field || "", operator: "eq", value: a, values: [] }] },
|
|
84
84
|
child: r
|
|
85
85
|
})).filter(Boolean));
|
|
86
|
-
const n = e.filters && typeof e.filters == "object" ?
|
|
86
|
+
const n = e.filters && typeof e.filters == "object" ? ze(e.filters) : null;
|
|
87
87
|
return {
|
|
88
|
-
_id: typeof e._id == "string" ? e._id :
|
|
88
|
+
_id: typeof e._id == "string" ? e._id : oe(),
|
|
89
89
|
field: typeof e.field == "string" ? e.field : "",
|
|
90
90
|
label: typeof e.label == "string" ? e.label : "",
|
|
91
91
|
topN: Number.isFinite(Number(e.topN)) && Number(e.topN) > 0 ? Math.floor(Number(e.topN)) : null,
|
|
@@ -93,16 +93,16 @@ function V(e) {
|
|
|
93
93
|
sortDir: e.sortDir === "asc" ? "asc" : "desc",
|
|
94
94
|
sortAbs: e.sortAbs === !0,
|
|
95
95
|
filters: n && n.clauses.length > 0 ? n : null,
|
|
96
|
-
format:
|
|
96
|
+
format: Se(e.format),
|
|
97
97
|
defaultChild: e.defaultChild ? V(e.defaultChild) : null,
|
|
98
98
|
branches: l
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
const _e = (e) => `${
|
|
102
|
-
if (typeof e != "string" || !e.startsWith(
|
|
103
|
-
const l = parseInt(e.slice(
|
|
101
|
+
const _e = (e) => `${De}${e}`, Ce = (e) => {
|
|
102
|
+
if (typeof e != "string" || !e.startsWith(De)) return -1;
|
|
103
|
+
const l = parseInt(e.slice(De.length), 10);
|
|
104
104
|
return Number.isFinite(l) ? l : -1;
|
|
105
|
-
},
|
|
105
|
+
}, Rt = (e, l) => {
|
|
106
106
|
const n = new Set(
|
|
107
107
|
(l || []).filter(
|
|
108
108
|
/** @param {any} [config] @returns {any} */
|
|
@@ -114,9 +114,9 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
114
114
|
);
|
|
115
115
|
return (e || []).filter(
|
|
116
116
|
/** @param {any} [field] @returns {any} */
|
|
117
|
-
(a) => a && typeof a == "string" &&
|
|
117
|
+
(a) => a && typeof a == "string" && !Ft.has(a) && (!a.startsWith("_") || kt(a)) && !n.has(a)
|
|
118
118
|
);
|
|
119
|
-
},
|
|
119
|
+
}, Nt = (e) => {
|
|
120
120
|
const l = [
|
|
121
121
|
{ value: "", label: "(default)" },
|
|
122
122
|
{ value: "__field__", label: "Field value (A→Z / Z→A)" }
|
|
@@ -129,24 +129,24 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
129
129
|
l.push({ value: a, label: r });
|
|
130
130
|
}
|
|
131
131
|
), l;
|
|
132
|
-
},
|
|
132
|
+
}, ke = (e) => !e || !e.clauses || e.clauses.length === 0 ? "No filter" : e.clauses.map(
|
|
133
133
|
/** @param {any} [clause] @returns {any} */
|
|
134
134
|
(l) => {
|
|
135
|
-
const n = M(l.field), a =
|
|
136
|
-
if (
|
|
135
|
+
const n = M(l.field), a = $t[l.operator] || l.operator;
|
|
136
|
+
if (pe.has(l.operator)) {
|
|
137
137
|
const r = l.values.slice(0, 3), i = l.values.length > 3 ? ` +${l.values.length - 3}` : "";
|
|
138
138
|
return `${n} ${a} [${r.join(", ")}${i}]`;
|
|
139
139
|
}
|
|
140
140
|
return `${n} ${a} ${l.value || "..."}`;
|
|
141
141
|
}
|
|
142
|
-
).join(` ${e.op} `),
|
|
142
|
+
).join(` ${e.op} `), tt = (e, l) => {
|
|
143
143
|
if (!e) return "";
|
|
144
144
|
const n = (l || []).find(
|
|
145
145
|
/** @param {any} [item] @returns {any} */
|
|
146
146
|
(a) => a.value === e
|
|
147
147
|
);
|
|
148
148
|
return n ? n.label : M(e);
|
|
149
|
-
},
|
|
149
|
+
}, lt = (e) => e ? e.label && e.label.trim() ? e.label.trim() : e.field ? M(e.field) : "Select field" : "Select field", It = (e) => !e || !e.field ? !1 : pe.has(e.operator) ? Array.isArray(e.values) && e.values.length > 0 : e.value !== void 0 && e.value !== null && String(e.value).trim() !== "", Ne = (e) => !!(e && Array.isArray(e.clauses) && e.clauses.length > 0) && e.clauses.every(It), Ge = (e, l) => {
|
|
150
150
|
if (!e || !l || typeof l != "object") return !1;
|
|
151
151
|
const n = l[e.field], a = n == null ? "" : String(n), r = e.value === void 0 || e.value === null ? "" : String(e.value), i = Array.isArray(e.values) ? e.values.map(String) : [], s = Number(a), f = Number(r);
|
|
152
152
|
switch (e.operator) {
|
|
@@ -172,8 +172,8 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
172
172
|
default:
|
|
173
173
|
return a === r;
|
|
174
174
|
}
|
|
175
|
-
},
|
|
176
|
-
if (!
|
|
175
|
+
}, Ye = (e, l) => {
|
|
176
|
+
if (!Ne(e) || !Array.isArray(l) || l.length === 0) return !0;
|
|
177
177
|
const n = l.filter((r) => r && typeof r == "object" && !r._isTotal && !r._isOther);
|
|
178
178
|
return n.some(
|
|
179
179
|
/** @param {any} [row] @returns {any} */
|
|
@@ -185,17 +185,17 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
185
185
|
/** @param {any} [row] @returns {any} */
|
|
186
186
|
(r) => e.op === "OR" ? e.clauses.some(
|
|
187
187
|
/** @param {any} [clause] @returns {any} */
|
|
188
|
-
(i) =>
|
|
188
|
+
(i) => Ge(i, r)
|
|
189
189
|
) : e.clauses.every(
|
|
190
190
|
/** @param {any} [clause] @returns {any} */
|
|
191
|
-
(i) =>
|
|
191
|
+
(i) => Ge(i, r)
|
|
192
192
|
)
|
|
193
193
|
) : !0;
|
|
194
|
-
},
|
|
194
|
+
}, Pt = (e, l) => {
|
|
195
195
|
if (!Array.isArray(e) || e.length === 0 || !Array.isArray(l) || l.length === 0) return !0;
|
|
196
196
|
const n = e.map(String).join("|||");
|
|
197
197
|
return l.some((a) => a && typeof a == "object" && a._path === n);
|
|
198
|
-
},
|
|
198
|
+
}, Ze = (e, {
|
|
199
199
|
allFields: l = [],
|
|
200
200
|
valConfigs: n = [],
|
|
201
201
|
data: a = []
|
|
@@ -203,48 +203,48 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
203
203
|
const r = [], i = [], s = (n || []).some(
|
|
204
204
|
/** @param {any} [config] @returns {any} */
|
|
205
205
|
(y) => y && y.field && y.agg
|
|
206
|
-
), f = new Set(Array.isArray(l) ? l : []),
|
|
206
|
+
), f = new Set(Array.isArray(l) ? l : []), E = /* @__PURE__ */ new Map(), b = Array.isArray(a) ? a : [], F = (y, C) => {
|
|
207
207
|
const c = y.trim().toLowerCase();
|
|
208
208
|
if (c) {
|
|
209
|
-
if (
|
|
210
|
-
r.push(`Duplicate header "${y}" at ${
|
|
209
|
+
if (E.has(c)) {
|
|
210
|
+
r.push(`Duplicate header "${y}" at ${C}; already used at ${E.get(c)}.`);
|
|
211
211
|
return;
|
|
212
212
|
}
|
|
213
|
-
|
|
213
|
+
E.set(c, C);
|
|
214
214
|
}
|
|
215
|
-
}, N = (y,
|
|
215
|
+
}, N = (y, C, c = /* @__PURE__ */ new Set()) => {
|
|
216
216
|
if (!y) return;
|
|
217
|
-
const
|
|
218
|
-
if (c.has(
|
|
219
|
-
r.push(`Circular row override detected at ${
|
|
217
|
+
const h = y._id || `${C}:${y.field || ""}`;
|
|
218
|
+
if (c.has(h)) {
|
|
219
|
+
r.push(`Circular row override detected at ${C}.`);
|
|
220
220
|
return;
|
|
221
221
|
}
|
|
222
|
-
const
|
|
223
|
-
|
|
222
|
+
const v = new Set(c);
|
|
223
|
+
v.add(h), y.field ? f.size > 0 && !f.has(y.field) && r.push(`Field "${M(y.field)}" at ${C} is no longer available.`) : r.push(`Missing field at ${C}.`), F(lt(y), C), y.topN && !s && r.push(`Top-N at ${C} needs at least one measure selected.`), y.filters && !Ne(y.filters) ? r.push(`Level filter at ${C} has incomplete rules.`) : y.filters && !Ye(y.filters, b) && r.push(`Level filter at ${C} does not match any loaded rows.`), y.defaultChild && N(y.defaultChild, `${C} > Default children`, v), (y.branches || []).forEach(
|
|
224
224
|
/** @param {any} [branch] @param {any} [index] @returns {any} */
|
|
225
225
|
(u, D) => {
|
|
226
|
-
const R = u.label && u.label.trim() ? u.label.trim() : `Row override ${D + 1}`, x = `${
|
|
227
|
-
|
|
226
|
+
const R = u.label && u.label.trim() ? u.label.trim() : `Row override ${D + 1}`, x = `${C} > ${R}`;
|
|
227
|
+
Ne(u.condition) ? Ye(u.condition, b) || r.push(`Row override "${R}" does not match any loaded rows.`) : r.push(`Row override "${R}" needs a complete row rule.`), Array.isArray(u.sourcePathFields) && u.sourcePathFields.length > 0 && u.sourcePathFields[u.sourcePathFields.length - 1] !== y.field && r.push(`Row override "${R}" was created for another level and no longer points to this row path.`), Pt(u.sourceRowPath, b) || i.push(`Row override "${R}" points to a row path that is not in the current loaded rows.`), u.child && N(u.child, `${x} > Custom children`, v), u.child || i.push(`Row override "${R}" has no Custom children; it only renames the matching row.`);
|
|
228
228
|
}
|
|
229
229
|
);
|
|
230
230
|
};
|
|
231
231
|
return e ? N(e, "Level 1") : r.push("Report needs at least Level 1."), { errors: r, warnings: i, valid: r.length === 0 };
|
|
232
|
-
},
|
|
232
|
+
}, Lt = (e) => !e || !e.branchBadge ? `Level ${e ? e.levelNumber : 1}` : e.branchDepth === 0 ? `Override children ${e.branchBadge}` : `Override child level ${e.branchBadge}.${e.branchDepth + 1}`, ae = (e, l) => {
|
|
233
233
|
let n = e;
|
|
234
234
|
for (let a = 0; n && a < l.length; a += 1) {
|
|
235
235
|
const r = l[a];
|
|
236
236
|
if (r === T)
|
|
237
237
|
n = n.defaultChild || null;
|
|
238
238
|
else {
|
|
239
|
-
const i =
|
|
239
|
+
const i = Ce(r);
|
|
240
240
|
n = i >= 0 && n.branches[i] ? n.branches[i].child : null;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
return n || null;
|
|
244
|
-
},
|
|
245
|
-
const a =
|
|
244
|
+
}, Be = (e, l, n) => {
|
|
245
|
+
const a = ae(e, l);
|
|
246
246
|
return a && a.branches[n] ? a.branches[n] : null;
|
|
247
|
-
},
|
|
247
|
+
}, _ = (e, l, n) => {
|
|
248
248
|
if (!e) return e;
|
|
249
249
|
const a = (r, i) => {
|
|
250
250
|
if (!r) return r;
|
|
@@ -255,17 +255,17 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
255
255
|
...r,
|
|
256
256
|
defaultChild: a(r.defaultChild, i + 1)
|
|
257
257
|
});
|
|
258
|
-
const f =
|
|
258
|
+
const f = Ce(s);
|
|
259
259
|
return f < 0 || f >= r.branches.length ? r : V({
|
|
260
260
|
...r,
|
|
261
261
|
branches: r.branches.map(
|
|
262
262
|
/** @param {any} [branch] @param {any} [index] @returns {any} */
|
|
263
|
-
(
|
|
263
|
+
(E, b) => b === f ? { ...E, child: a(E.child, i + 1) } : E
|
|
264
264
|
)
|
|
265
265
|
});
|
|
266
266
|
};
|
|
267
267
|
return a(e, 0);
|
|
268
|
-
},
|
|
268
|
+
}, me = (e, l, n, a) => e && _(
|
|
269
269
|
e,
|
|
270
270
|
l,
|
|
271
271
|
/** @param {any} [node] @returns {any} */
|
|
@@ -273,10 +273,10 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
273
273
|
...r,
|
|
274
274
|
branches: r.branches.map(
|
|
275
275
|
/** @param {any} [branch] @param {any} [index] @returns {any} */
|
|
276
|
-
(i, s) => s === n ?
|
|
276
|
+
(i, s) => s === n ? Re(a(i)) : i
|
|
277
277
|
)
|
|
278
278
|
}
|
|
279
|
-
),
|
|
279
|
+
), zt = (e) => {
|
|
280
280
|
if (!e) return [];
|
|
281
281
|
const l = [], n = (a, r) => {
|
|
282
282
|
a && (l.push({
|
|
@@ -321,13 +321,13 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
321
321
|
branchBadge: null,
|
|
322
322
|
branchDepth: 0
|
|
323
323
|
}), l;
|
|
324
|
-
},
|
|
324
|
+
}, re = (e = []) => e.join(">"), Ae = (e = [], l = []) => re(e) === re(l), Q = (e) => e == null ? "" : String(e), Z = (e) => e ? e.type === "node" ? `node:${re(e.path)}` : e.type === "branch" ? `branch:${re(e.nodePath)}:${e.branchIndex}` : e.type === "rowPath" ? `rowPath:${re(e.nodePath)}:${e.field}:${Q(e.value)}` : "" : "", we = (e, l) => (e || []).find(
|
|
325
325
|
/** @param {any} [item] @returns {any} */
|
|
326
|
-
(n) => n.kind === "node" &&
|
|
327
|
-
) || null,
|
|
326
|
+
(n) => n.kind === "node" && Ae(n.nodePath, l)
|
|
327
|
+
) || null, rt = (e, l, n) => (e || []).find(
|
|
328
328
|
/** @param {any} [item] @returns {any} */
|
|
329
|
-
(a) => a.kind === "branch" &&
|
|
330
|
-
) || null,
|
|
329
|
+
(a) => a.kind === "branch" && Ae(a.nodePath, l) && a.branchIndex === n
|
|
330
|
+
) || null, Xe = (e, l, n) => {
|
|
331
331
|
if (!e || !l) return !1;
|
|
332
332
|
const a = Q(n);
|
|
333
333
|
return (e.condition && Array.isArray(e.condition.clauses) ? e.condition.clauses : []).some(
|
|
@@ -335,12 +335,12 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
335
335
|
(i) => !i || i.field !== l ? !1 : i.operator === "eq" || i.operator === "=" ? Q(i.value) === a : i.operator === "in" ? Array.isArray(i.values) && i.values.map(Q).includes(a) : !1
|
|
336
336
|
);
|
|
337
337
|
}, _t = (e, l, n, a = "") => ({
|
|
338
|
-
...
|
|
338
|
+
...Bt(),
|
|
339
339
|
label: Q(n || l),
|
|
340
340
|
condition: {
|
|
341
341
|
op: "AND",
|
|
342
342
|
clauses: [{
|
|
343
|
-
...
|
|
343
|
+
...et(e),
|
|
344
344
|
operator: "eq",
|
|
345
345
|
value: Q(l),
|
|
346
346
|
values: []
|
|
@@ -354,7 +354,7 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
354
354
|
} catch {
|
|
355
355
|
return V(e);
|
|
356
356
|
}
|
|
357
|
-
},
|
|
357
|
+
}, Ie = (e) => Array.from({ length: Math.max(0, e) }, () => T), We = (e, l = 1, n = []) => {
|
|
358
358
|
const a = [];
|
|
359
359
|
let r = e, i = 0, s = Array.isArray(n) ? [...n] : [];
|
|
360
360
|
for (; r; )
|
|
@@ -374,7 +374,7 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
374
374
|
defaultChild: l
|
|
375
375
|
});
|
|
376
376
|
return l;
|
|
377
|
-
},
|
|
377
|
+
}, nt = (e, l, n) => {
|
|
378
378
|
const a = We(e).map(
|
|
379
379
|
/** @param {any} [item] @returns {any} */
|
|
380
380
|
(s) => s.node
|
|
@@ -383,45 +383,45 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
383
383
|
return e;
|
|
384
384
|
const r = [...a], [i] = r.splice(l, 1);
|
|
385
385
|
return r.splice(n, 0, i), Wt(r);
|
|
386
|
-
},
|
|
386
|
+
}, Tt = (e) => {
|
|
387
387
|
const l = Oe(e);
|
|
388
388
|
return !l || !l.field ? null : l;
|
|
389
|
-
},
|
|
389
|
+
}, jt = (e, l) => l ? l.type === "node" ? we(e, l.path) : l.type === "branch" ? rt(e, l.nodePath, l.branchIndex) : null : null, Mt = (e, l) => {
|
|
390
390
|
if (!l) return [];
|
|
391
391
|
const n = [], a = (s) => {
|
|
392
|
-
const f =
|
|
392
|
+
const f = we(e, s);
|
|
393
393
|
f && n.push(f);
|
|
394
394
|
}, r = (s, f) => {
|
|
395
|
-
const
|
|
396
|
-
|
|
395
|
+
const E = rt(e, s, f);
|
|
396
|
+
E && n.push(E);
|
|
397
397
|
}, i = (s) => {
|
|
398
398
|
if (a([]), !Array.isArray(s) || s.length === 0) return;
|
|
399
399
|
let f = [];
|
|
400
|
-
s.forEach((
|
|
401
|
-
if (
|
|
402
|
-
f = [...f,
|
|
400
|
+
s.forEach((E) => {
|
|
401
|
+
if (E === T) {
|
|
402
|
+
f = [...f, E], a(f);
|
|
403
403
|
return;
|
|
404
404
|
}
|
|
405
|
-
const
|
|
406
|
-
|
|
405
|
+
const b = Ce(E);
|
|
406
|
+
b >= 0 && (r(f, b), f = [...f, E], a(f));
|
|
407
407
|
});
|
|
408
408
|
};
|
|
409
409
|
return l.type === "node" ? (i(l.path), n) : (i(l.nodePath), r(l.nodePath, l.branchIndex), n);
|
|
410
|
-
},
|
|
410
|
+
}, Ht = (e, l) => {
|
|
411
411
|
if (!l) return [];
|
|
412
412
|
if (l.type === "node") {
|
|
413
|
-
const a = [], r =
|
|
413
|
+
const a = [], r = we(e, [...l.path, T]);
|
|
414
414
|
r && a.push(r);
|
|
415
415
|
const i = (e || []).filter(
|
|
416
416
|
/** @param {any} [item] @returns {any} */
|
|
417
|
-
(s) => s.kind === "branch" &&
|
|
417
|
+
(s) => s.kind === "branch" && Ae(s.nodePath, l.path)
|
|
418
418
|
).sort(
|
|
419
419
|
/** @param {any} [left] @param {any} [right] @returns {any} */
|
|
420
420
|
(s, f) => s.branchIndex - f.branchIndex
|
|
421
421
|
);
|
|
422
422
|
return [...a, ...i];
|
|
423
423
|
}
|
|
424
|
-
const n =
|
|
424
|
+
const n = we(e, [...l.nodePath, _e(l.branchIndex)]);
|
|
425
425
|
return n ? [n] : [];
|
|
426
426
|
}, q = (e, l = {}) => ({
|
|
427
427
|
border: `1px solid ${e.border}`,
|
|
@@ -457,7 +457,7 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
457
457
|
alignItems: "center",
|
|
458
458
|
gap: "6px",
|
|
459
459
|
marginBottom: "10px"
|
|
460
|
-
}),
|
|
460
|
+
}), ue = (e) => ({
|
|
461
461
|
border: `1px solid ${e.border}`,
|
|
462
462
|
borderRadius: "14px",
|
|
463
463
|
background: e.surfaceBg || e.background || "#fff",
|
|
@@ -465,13 +465,13 @@ const _e = (e) => `${Be}${e}`, Se = (e) => {
|
|
|
465
465
|
display: "flex",
|
|
466
466
|
flexDirection: "column",
|
|
467
467
|
gap: "12px"
|
|
468
|
-
}),
|
|
468
|
+
}), Vt = (e) => ({
|
|
469
469
|
borderTop: `2px solid ${e.textSec || "#334155"}`,
|
|
470
470
|
paddingTop: "14px",
|
|
471
471
|
display: "flex",
|
|
472
472
|
flexDirection: "column",
|
|
473
473
|
gap: "12px"
|
|
474
|
-
}),
|
|
474
|
+
}), at = (e, l, n) => ({
|
|
475
475
|
width: `calc(100% - ${n * 14}px)`,
|
|
476
476
|
marginLeft: `${n * 14}px`,
|
|
477
477
|
border: `1px solid ${l ? e.primary || "#2563EB" : e.border}`,
|
|
@@ -505,7 +505,7 @@ function X({ children: e, theme: l, tone: n = "neutral" }) {
|
|
|
505
505
|
e
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function ne({
|
|
509
509
|
theme: e,
|
|
510
510
|
title: l,
|
|
511
511
|
description: n,
|
|
@@ -514,45 +514,54 @@ function re({
|
|
|
514
514
|
sectionId: i,
|
|
515
515
|
children: s
|
|
516
516
|
}) {
|
|
517
|
-
return /* @__PURE__ */ t.createElement("section", { "data-report-section": i || l, style:
|
|
517
|
+
return /* @__PURE__ */ t.createElement("section", { "data-report-section": i || l, style: Vt(e) }, /* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: "12px" } }, /* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "flex-start", gap: "8px", minWidth: 0 } }, /* @__PURE__ */ t.createElement("div", { style: { color: e.textSec, display: "flex", alignItems: "center", paddingTop: "1px", flexShrink: 0 } }, a), /* @__PURE__ */ t.createElement("div", { style: { minWidth: 0 } }, /* @__PURE__ */ t.createElement("div", { style: { fontSize: "13px", fontWeight: 900, color: e.text } }, l), n && /* @__PURE__ */ t.createElement("div", { style: { fontSize: "11px", color: e.textSec, lineHeight: 1.45, marginTop: "2px" } }, n))), r && /* @__PURE__ */ t.createElement("div", { style: { flexShrink: 0 } }, r)), /* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "10px" } }, s));
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
const [
|
|
521
|
-
|
|
519
|
+
function Pe({ condition: e, allFields: l, getFieldLabel: n = M, onSave: a, onClose: r, theme: i, title: s, description: f }) {
|
|
520
|
+
const [E, b] = H(() => ze(e)), F = q(i), N = B(() => {
|
|
521
|
+
b(
|
|
522
522
|
/** @param {any} [prev] @returns {any} */
|
|
523
|
-
(c) => ({ ...c, clauses: [...c.clauses,
|
|
523
|
+
(c) => ({ ...c, clauses: [...c.clauses, et(l[0] || "")] })
|
|
524
524
|
);
|
|
525
|
-
}, [l]), y = B((c,
|
|
526
|
-
|
|
525
|
+
}, [l]), y = B((c, h) => {
|
|
526
|
+
b(
|
|
527
527
|
/** @param {any} [prev] @returns {any} */
|
|
528
|
-
(
|
|
529
|
-
...
|
|
530
|
-
clauses:
|
|
528
|
+
(v) => ({
|
|
529
|
+
...v,
|
|
530
|
+
clauses: v.clauses.map(
|
|
531
531
|
/** @param {any} [clause] @param {any} [clauseIndex] @returns {any} */
|
|
532
|
-
(u, D) => D === c ? { ...u, ...
|
|
532
|
+
(u, D) => D === c ? { ...u, ...h } : u
|
|
533
533
|
)
|
|
534
534
|
})
|
|
535
535
|
);
|
|
536
|
-
}, []),
|
|
537
|
-
|
|
536
|
+
}, []), C = B((c) => {
|
|
537
|
+
b(
|
|
538
538
|
/** @param {any} [prev] @returns {any} */
|
|
539
|
-
(
|
|
540
|
-
...
|
|
541
|
-
clauses:
|
|
539
|
+
(h) => ({
|
|
540
|
+
...h,
|
|
541
|
+
clauses: h.clauses.filter(
|
|
542
542
|
/** @param {any} [_] @param {any} [clauseIndex] @returns {any} */
|
|
543
|
-
(
|
|
543
|
+
(v, u) => u !== c
|
|
544
544
|
)
|
|
545
545
|
})
|
|
546
546
|
);
|
|
547
547
|
}, []);
|
|
548
|
-
return
|
|
548
|
+
return Ee(() => {
|
|
549
|
+
if (typeof r != "function") return;
|
|
550
|
+
const c = (h) => {
|
|
551
|
+
h.key === "Escape" && !h.defaultPrevented && (h.preventDefault(), r());
|
|
552
|
+
};
|
|
553
|
+
return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
|
|
554
|
+
}, [r]), /* @__PURE__ */ t.createElement(
|
|
549
555
|
"div",
|
|
550
556
|
{
|
|
557
|
+
className: "sp-dialog-backdrop",
|
|
551
558
|
style: {
|
|
552
559
|
position: "fixed",
|
|
553
560
|
inset: 0,
|
|
554
561
|
zIndex: 9999,
|
|
555
|
-
background: "rgba(15, 23, 42, 0.
|
|
562
|
+
background: "rgba(15, 23, 42, 0.38)",
|
|
563
|
+
backdropFilter: "blur(6px)",
|
|
564
|
+
WebkitBackdropFilter: "blur(6px)",
|
|
556
565
|
display: "flex",
|
|
557
566
|
alignItems: "center",
|
|
558
567
|
justifyContent: "center"
|
|
@@ -562,25 +571,28 @@ function Ie({ condition: e, allFields: l, getFieldLabel: n = M, onSave: a, onClo
|
|
|
562
571
|
/* @__PURE__ */ t.createElement(
|
|
563
572
|
"div",
|
|
564
573
|
{
|
|
574
|
+
className: "sp-dialog-surface",
|
|
575
|
+
role: "dialog",
|
|
576
|
+
"aria-modal": "true",
|
|
565
577
|
style: {
|
|
566
|
-
...
|
|
578
|
+
...ue(i),
|
|
567
579
|
width: "520px",
|
|
568
580
|
maxWidth: "95vw",
|
|
569
581
|
maxHeight: "85vh",
|
|
570
582
|
overflowY: "auto",
|
|
571
|
-
boxShadow: "0 24px 64px rgba(15, 23, 42, 0.
|
|
583
|
+
boxShadow: i.shadow || "0 24px 64px rgba(15, 23, 42, 0.26)"
|
|
572
584
|
},
|
|
573
585
|
onClick: (c) => c.stopPropagation()
|
|
574
586
|
},
|
|
575
|
-
/* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: "10px" } }, /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: { fontSize: "14px", fontWeight: 800, color: i.text } }, s || "Edit row override rule"), /* @__PURE__ */ t.createElement("div", { style: { fontSize: "12px", color: i.textSec, marginTop: "2px" } }, f || "Add one or more clauses to decide when this row override should be used.")), /* @__PURE__ */ t.createElement("button", { type: "button", onClick: r, style: { background: "
|
|
576
|
-
|
|
587
|
+
/* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: "10px" } }, /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: { fontSize: "14px", fontWeight: 800, letterSpacing: "-0.01em", color: i.text } }, s || "Edit row override rule"), /* @__PURE__ */ t.createElement("div", { style: { fontSize: "12px", color: i.textSec, marginTop: "2px" } }, f || "Add one or more clauses to decide when this row override should be used.")), /* @__PURE__ */ t.createElement("button", { type: "button", className: "sp-btn sp-btn-ghost", onClick: r, style: { background: "transparent", border: "none", borderRadius: "6px", cursor: "pointer", color: i.textSec, padding: "4px", display: "inline-flex", alignItems: "center" } }, /* @__PURE__ */ t.createElement(m.Close, null))),
|
|
588
|
+
E.clauses.length > 1 && /* @__PURE__ */ t.createElement("div", { style: { display: "flex", gap: "6px", alignItems: "center", flexWrap: "wrap" } }, /* @__PURE__ */ t.createElement("span", { style: { fontSize: "11px", color: i.textSec, fontWeight: 700 } }, "Match:"), ["AND", "OR"].map((c) => /* @__PURE__ */ t.createElement(
|
|
577
589
|
"button",
|
|
578
590
|
{
|
|
579
591
|
key: c,
|
|
580
592
|
type: "button",
|
|
581
|
-
onClick: () =>
|
|
593
|
+
onClick: () => b(
|
|
582
594
|
/** @param {any} [prev] @returns {any} */
|
|
583
|
-
(
|
|
595
|
+
(h) => ({ ...h, op: c })
|
|
584
596
|
),
|
|
585
597
|
style: {
|
|
586
598
|
padding: "5px 12px",
|
|
@@ -589,15 +601,15 @@ function Ie({ condition: e, allFields: l, getFieldLabel: n = M, onSave: a, onClo
|
|
|
589
601
|
fontWeight: 800,
|
|
590
602
|
border: "none",
|
|
591
603
|
cursor: "pointer",
|
|
592
|
-
background:
|
|
593
|
-
color:
|
|
604
|
+
background: E.op === c ? i.primary || "#2563EB" : i.hover || "#F3F4F6",
|
|
605
|
+
color: E.op === c ? "#fff" : i.textSec
|
|
594
606
|
}
|
|
595
607
|
},
|
|
596
608
|
c
|
|
597
609
|
))),
|
|
598
|
-
/* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } },
|
|
610
|
+
/* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, E.clauses.length === 0 && /* @__PURE__ */ t.createElement("div", { style: { fontSize: "12px", color: i.textSec, fontStyle: "italic" } }, "No clauses means this row override matches every row at this level."), E.clauses.map(
|
|
599
611
|
/** @param {any} [clause] @param {any} [index] @returns {any} */
|
|
600
|
-
(c,
|
|
612
|
+
(c, h) => /* @__PURE__ */ t.createElement(
|
|
601
613
|
"div",
|
|
602
614
|
{
|
|
603
615
|
key: c._id,
|
|
@@ -611,25 +623,29 @@ function Ie({ condition: e, allFields: l, getFieldLabel: n = M, onSave: a, onClo
|
|
|
611
623
|
alignItems: "flex-start"
|
|
612
624
|
}
|
|
613
625
|
},
|
|
614
|
-
/* @__PURE__ */ t.createElement("div", { style: { width: "32px", paddingTop: "6px", textAlign: "center", fontSize: "10px", fontWeight: 800, color: i.textSec } },
|
|
626
|
+
/* @__PURE__ */ t.createElement("div", { style: { width: "32px", paddingTop: "6px", textAlign: "center", fontSize: "10px", fontWeight: 800, color: i.textSec } }, h > 0 ? E.op : ""),
|
|
615
627
|
/* @__PURE__ */ t.createElement("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "8px" } }, /* @__PURE__ */ t.createElement("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap" } }, /* @__PURE__ */ t.createElement(
|
|
616
|
-
|
|
628
|
+
U,
|
|
617
629
|
{
|
|
630
|
+
size: "sm",
|
|
631
|
+
"aria-label": "Filter field",
|
|
618
632
|
value: c.field,
|
|
619
|
-
onChange: (
|
|
633
|
+
onChange: (v) => y(h, { field: v.target.value }),
|
|
620
634
|
style: { ...F, flex: 1, minWidth: "140px" }
|
|
621
635
|
},
|
|
622
636
|
l.map(
|
|
623
637
|
/** @param {any} [field] @returns {any} */
|
|
624
|
-
(
|
|
638
|
+
(v) => /* @__PURE__ */ t.createElement("option", { key: v, value: v }, n(v))
|
|
625
639
|
)
|
|
626
640
|
), /* @__PURE__ */ t.createElement(
|
|
627
|
-
|
|
641
|
+
U,
|
|
628
642
|
{
|
|
643
|
+
size: "sm",
|
|
644
|
+
"aria-label": "Filter operator",
|
|
629
645
|
value: c.operator,
|
|
630
|
-
onChange: (
|
|
631
|
-
const u =
|
|
632
|
-
y(
|
|
646
|
+
onChange: (v) => {
|
|
647
|
+
const u = v.target.value, D = pe.has(u), R = pe.has(c.operator);
|
|
648
|
+
y(h, {
|
|
633
649
|
operator: u,
|
|
634
650
|
values: D ? R ? c.values : c.value ? [c.value] : [] : c.values,
|
|
635
651
|
value: D ? c.value : c.values[0] || c.value || ""
|
|
@@ -637,14 +653,14 @@ function Ie({ condition: e, allFields: l, getFieldLabel: n = M, onSave: a, onClo
|
|
|
637
653
|
},
|
|
638
654
|
style: { ...F, width: "160px", flexShrink: 0 }
|
|
639
655
|
},
|
|
640
|
-
|
|
641
|
-
)),
|
|
656
|
+
Qe.map((v) => /* @__PURE__ */ t.createElement("option", { key: v.value, value: v.value }, v.label))
|
|
657
|
+
)), pe.has(c.operator) ? /* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, c.values.length > 0 && /* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "6px" } }, c.values.map(
|
|
642
658
|
/** @param {any} [value] @param {any} [valueIndex] @returns {any} */
|
|
643
|
-
(
|
|
659
|
+
(v, u) => /* @__PURE__ */ t.createElement(X, { key: `${c._id}-${u}`, theme: i, tone: "primary" }, /* @__PURE__ */ t.createElement("span", null, v), /* @__PURE__ */ t.createElement(
|
|
644
660
|
"button",
|
|
645
661
|
{
|
|
646
662
|
type: "button",
|
|
647
|
-
onClick: () => y(
|
|
663
|
+
onClick: () => y(h, {
|
|
648
664
|
values: c.values.filter(
|
|
649
665
|
/** @param {any} [_] @param {any} [currentIndex] @returns {any} */
|
|
650
666
|
(D, R) => R !== u
|
|
@@ -661,9 +677,9 @@ function Ie({ condition: e, allFields: l, getFieldLabel: n = M, onSave: a, onClo
|
|
|
661
677
|
style: F,
|
|
662
678
|
onKeyDown: (
|
|
663
679
|
/** @param {any} event */
|
|
664
|
-
((
|
|
665
|
-
const u =
|
|
666
|
-
|
|
680
|
+
((v) => {
|
|
681
|
+
const u = v.target.value.trim();
|
|
682
|
+
v.key === "Enter" && u && (c.values.includes(u) || y(h, { values: [...c.values, u] }), v.target.value = "", v.preventDefault());
|
|
667
683
|
})
|
|
668
684
|
)
|
|
669
685
|
}
|
|
@@ -671,7 +687,7 @@ function Ie({ condition: e, allFields: l, getFieldLabel: n = M, onSave: a, onClo
|
|
|
671
687
|
"input",
|
|
672
688
|
{
|
|
673
689
|
value: c.value,
|
|
674
|
-
onChange: (
|
|
690
|
+
onChange: (v) => y(h, { value: v.target.value }),
|
|
675
691
|
placeholder: "Value",
|
|
676
692
|
style: F
|
|
677
693
|
}
|
|
@@ -680,10 +696,10 @@ function Ie({ condition: e, allFields: l, getFieldLabel: n = M, onSave: a, onClo
|
|
|
680
696
|
"button",
|
|
681
697
|
{
|
|
682
698
|
type: "button",
|
|
683
|
-
onClick: () =>
|
|
699
|
+
onClick: () => C(h),
|
|
684
700
|
style: { background: "none", border: "none", cursor: "pointer", color: "#B91C1C", padding: "6px" }
|
|
685
701
|
},
|
|
686
|
-
/* @__PURE__ */ t.createElement(
|
|
702
|
+
/* @__PURE__ */ t.createElement(m.Delete, null)
|
|
687
703
|
)
|
|
688
704
|
)
|
|
689
705
|
)),
|
|
@@ -698,7 +714,7 @@ function Ie({ condition: e, allFields: l, getFieldLabel: n = M, onSave: a, onClo
|
|
|
698
714
|
borderStyle: "dashed"
|
|
699
715
|
}
|
|
700
716
|
},
|
|
701
|
-
/* @__PURE__ */ t.createElement(
|
|
717
|
+
/* @__PURE__ */ t.createElement(m.Add, null),
|
|
702
718
|
" Add clause"
|
|
703
719
|
),
|
|
704
720
|
/* @__PURE__ */ t.createElement("div", { style: { display: "flex", justifyContent: "flex-end", gap: "8px", borderTop: `1px solid ${i.border}`, paddingTop: "12px" } }, /* @__PURE__ */ t.createElement("button", { type: "button", onClick: r, style: j(i) }, "Cancel"), /* @__PURE__ */ t.createElement(
|
|
@@ -706,7 +722,7 @@ function Ie({ condition: e, allFields: l, getFieldLabel: n = M, onSave: a, onClo
|
|
|
706
722
|
{
|
|
707
723
|
type: "button",
|
|
708
724
|
onClick: () => {
|
|
709
|
-
a(
|
|
725
|
+
a(E), r();
|
|
710
726
|
},
|
|
711
727
|
style: {
|
|
712
728
|
background: i.primary || "#2563EB",
|
|
@@ -724,11 +740,11 @@ function Ie({ condition: e, allFields: l, getFieldLabel: n = M, onSave: a, onClo
|
|
|
724
740
|
)
|
|
725
741
|
);
|
|
726
742
|
}
|
|
727
|
-
function
|
|
728
|
-
const a =
|
|
729
|
-
return /* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "10px" } }, /* @__PURE__ */ t.createElement("div", { style: L(n) }, "Presentation"), /* @__PURE__ */ t.createElement("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "8px" } }, /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec } }, "Indent px", /* @__PURE__ */ t.createElement("input", { type: "number", min: "0", value: a.indent, onChange: (s) => i({ indent: s.target.value }), placeholder: "Auto", style: r })), /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec } }, "Row color", /* @__PURE__ */ t.createElement("input", { value: a.rowColor, onChange: (s) => i({ rowColor: s.target.value }), placeholder: "#F8FAFC", style: r })), /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec } }, "Label prefix", /* @__PURE__ */ t.createElement("input", { value: a.labelPrefix, onChange: (s) => i({ labelPrefix: s.target.value }), placeholder: "Optional", style: r })), /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec } }, "Label suffix", /* @__PURE__ */ t.createElement("input", { value: a.labelSuffix, onChange: (s) => i({ labelSuffix: s.target.value }), placeholder: "Optional", style: r })), /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec, gridColumn: "1 / -1" } }, "Number format override", /* @__PURE__ */ t.createElement("input", { value: a.numberFormat, onChange: (s) => i({ numberFormat: s.target.value }), placeholder: "fixed:2, percent, currency:$", style: r }))), /* @__PURE__ */ t.createElement("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr 1fr", gap: "8px" } }, /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec } }, "Border", /* @__PURE__ */ t.createElement("
|
|
743
|
+
function ot({ value: e, onChange: l, theme: n }) {
|
|
744
|
+
const a = Se(e), r = q(n), i = (s) => l(Se({ ...a, ...s }));
|
|
745
|
+
return /* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "10px" } }, /* @__PURE__ */ t.createElement("div", { style: L(n) }, "Presentation"), /* @__PURE__ */ t.createElement("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "8px" } }, /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec } }, "Indent px", /* @__PURE__ */ t.createElement("input", { type: "number", min: "0", value: a.indent, onChange: (s) => i({ indent: s.target.value }), placeholder: "Auto", style: r })), /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec } }, "Row color", /* @__PURE__ */ t.createElement("input", { value: a.rowColor, onChange: (s) => i({ rowColor: s.target.value }), placeholder: "#F8FAFC", style: r })), /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec } }, "Label prefix", /* @__PURE__ */ t.createElement("input", { value: a.labelPrefix, onChange: (s) => i({ labelPrefix: s.target.value }), placeholder: "Optional", style: r })), /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec } }, "Label suffix", /* @__PURE__ */ t.createElement("input", { value: a.labelSuffix, onChange: (s) => i({ labelSuffix: s.target.value }), placeholder: "Optional", style: r })), /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec, gridColumn: "1 / -1" } }, "Number format override", /* @__PURE__ */ t.createElement("input", { value: a.numberFormat, onChange: (s) => i({ numberFormat: s.target.value }), placeholder: "fixed:2, percent, currency:$", style: r }))), /* @__PURE__ */ t.createElement("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr 1fr", gap: "8px" } }, /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec } }, "Border", /* @__PURE__ */ t.createElement(U, { size: "sm", "aria-label": "Border", value: a.borderStyle, onChange: (s) => i({ borderStyle: s.target.value }), style: { ...r, width: "100%" } }, Ue.map((s) => /* @__PURE__ */ t.createElement("option", { key: s || "none", value: s }, s || "None")))), /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec } }, "Border color", /* @__PURE__ */ t.createElement("input", { value: a.borderColor, onChange: (s) => i({ borderColor: s.target.value }), placeholder: "#CBD5E1", style: r })), /* @__PURE__ */ t.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "5px", fontSize: "11px", color: n.textSec } }, "Width", /* @__PURE__ */ t.createElement("input", { type: "number", min: "1", value: a.borderWidth, onChange: (s) => i({ borderWidth: s.target.value }), placeholder: "1", style: r }))), /* @__PURE__ */ t.createElement("div", { style: { display: "flex", gap: "14px", flexWrap: "wrap" } }, /* @__PURE__ */ t.createElement("label", { style: { display: "inline-flex", alignItems: "center", gap: "7px", fontSize: "12px", color: n.text, fontWeight: 700 } }, /* @__PURE__ */ t.createElement("input", { type: "checkbox", checked: a.bold, onChange: (s) => i({ bold: s.target.checked }) }), "Bold row"), /* @__PURE__ */ t.createElement("label", { style: { display: "inline-flex", alignItems: "center", gap: "7px", fontSize: "12px", color: n.text, fontWeight: 700 } }, /* @__PURE__ */ t.createElement("input", { type: "checkbox", checked: a.showSubtotal, onChange: (s) => i({ showSubtotal: s.target.checked }) }), "Show subtotal/other rows")));
|
|
730
746
|
}
|
|
731
|
-
function
|
|
747
|
+
function qt({ validation: e, theme: l }) {
|
|
732
748
|
const n = e && Array.isArray(e.errors) ? e.errors : [], a = e && Array.isArray(e.warnings) ? e.warnings : [];
|
|
733
749
|
return n.length === 0 && a.length === 0 ? null : /* @__PURE__ */ t.createElement("div", { "data-report-validation": "true", style: { border: `1px solid ${n.length > 0 ? "#FCA5A5" : "#FDE68A"}`, borderRadius: "12px", padding: "10px 12px", background: n.length > 0 ? "#FEF2F2" : "#FFFBEB", color: n.length > 0 ? "#991B1B" : "#92400E", fontSize: "11px", lineHeight: 1.45, display: "flex", flexDirection: "column", gap: "6px" } }, n.length > 0 && /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: { fontWeight: 900, marginBottom: "4px" } }, "Fix before applying or saving"), n.map(
|
|
734
750
|
/** @param {any} [message] @returns {any} */
|
|
@@ -738,7 +754,7 @@ function Vt({ validation: e, theme: l }) {
|
|
|
738
754
|
(r) => /* @__PURE__ */ t.createElement("div", { key: `warn:${r}` }, r)
|
|
739
755
|
)));
|
|
740
756
|
}
|
|
741
|
-
function
|
|
757
|
+
function Kt({ debug: e, theme: l }) {
|
|
742
758
|
if (!e || typeof e != "object") return null;
|
|
743
759
|
const n = [
|
|
744
760
|
["Matched level", e.matchedLevel || e.levelLabel || ""],
|
|
@@ -752,7 +768,7 @@ function qt({ debug: e, theme: l }) {
|
|
|
752
768
|
([a, r]) => /* @__PURE__ */ t.createElement("div", { key: a, style: { display: "flex", justifyContent: "space-between", gap: "10px", fontSize: "11px" } }, /* @__PURE__ */ t.createElement("span", { style: { color: l.textSec, fontWeight: 800 } }, a), /* @__PURE__ */ t.createElement("span", { style: { color: l.text, textAlign: "right", overflowWrap: "anywhere" } }, r))
|
|
753
769
|
));
|
|
754
770
|
}
|
|
755
|
-
function
|
|
771
|
+
function it({
|
|
756
772
|
title: e,
|
|
757
773
|
summary: l,
|
|
758
774
|
theme: n,
|
|
@@ -794,21 +810,21 @@ function ot({
|
|
|
794
810
|
},
|
|
795
811
|
"aria-expanded": i
|
|
796
812
|
},
|
|
797
|
-
/* @__PURE__ */ t.createElement("span", { style: { display: "inline-flex", color: n.textSec, flexShrink: 0 } }, i ? /* @__PURE__ */ t.createElement(
|
|
813
|
+
/* @__PURE__ */ t.createElement("span", { style: { display: "inline-flex", color: n.textSec, flexShrink: 0 } }, i ? /* @__PURE__ */ t.createElement(m.ChevronDown, null) : /* @__PURE__ */ t.createElement(m.ChevronRight, null)),
|
|
798
814
|
/* @__PURE__ */ t.createElement("span", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ t.createElement("span", { style: { display: "block", fontSize: "12px", fontWeight: 900, color: n.text } }, e), l && /* @__PURE__ */ t.createElement("span", { style: { display: "block", fontSize: "11px", color: n.textSec, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", marginTop: "2px" } }, l))
|
|
799
815
|
),
|
|
800
816
|
i && /* @__PURE__ */ t.createElement("div", { style: { borderTop: `1px solid ${n.border}`, padding: "12px", display: "flex", flexDirection: "column", gap: "12px" } }, r)
|
|
801
817
|
);
|
|
802
818
|
}
|
|
803
819
|
function Jt({ item: e, selected: l, theme: n, sortByOptions: a, getFieldLabel: r = M, onSelect: i }) {
|
|
804
|
-
const s = e.node, f =
|
|
805
|
-
return /* @__PURE__ */ t.createElement("button", { type: "button", onClick: i, style:
|
|
820
|
+
const s = e.node, f = Lt(e), E = s.field ? r(s.field) : "Select field", b = lt(s), F = tt(s.sortBy, a);
|
|
821
|
+
return /* @__PURE__ */ t.createElement("button", { type: "button", onClick: i, style: at(n, l, e.depth) }, /* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: "10px" } }, /* @__PURE__ */ t.createElement("div", { style: { minWidth: 0, display: "flex", flexDirection: "column", gap: "7px" } }, /* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "center", gap: "6px", flexWrap: "wrap" } }, /* @__PURE__ */ t.createElement(X, { theme: n, tone: e.branchBadge ? "primary" : "neutral" }, f), /* @__PURE__ */ t.createElement("span", { style: { fontSize: "12px", fontWeight: 800, color: n.text } }, E)), /* @__PURE__ */ t.createElement("div", { style: { fontSize: "11px", color: n.textSec } }, "Header: ", b), /* @__PURE__ */ t.createElement("div", { style: { display: "flex", gap: "6px", flexWrap: "wrap" } }, /* @__PURE__ */ t.createElement(X, { theme: n }, s.topN ? `Top ${s.topN}` : "All rows"), /* @__PURE__ */ t.createElement(X, { theme: n }, F ? `Sort ${s.sortDir}${s.sortAbs ? " |abs|" : ""} by ${F}` : "Default sort"), s.defaultChild && /* @__PURE__ */ t.createElement(X, { theme: n }, "Has next level"), s.branches.length > 0 && /* @__PURE__ */ t.createElement(X, { theme: n, tone: "primary" }, s.branches.length, " row override", s.branches.length === 1 ? "" : "s"))), /* @__PURE__ */ t.createElement("span", { style: { color: l ? n.primary || "#2563EB" : n.textSec, flexShrink: 0 } }, /* @__PURE__ */ t.createElement(m.ChevronRight, null))));
|
|
806
822
|
}
|
|
807
|
-
function
|
|
823
|
+
function Gt({ item: e, selected: l, theme: n, onSelect: a }) {
|
|
808
824
|
const r = e.branch, i = r.label && r.label.trim() ? r.label.trim() : "Display original label";
|
|
809
|
-
return /* @__PURE__ */ t.createElement("button", { type: "button", onClick: a, style:
|
|
825
|
+
return /* @__PURE__ */ t.createElement("button", { type: "button", onClick: a, style: at(n, l, e.depth) }, /* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: "10px" } }, /* @__PURE__ */ t.createElement("div", { style: { minWidth: 0, display: "flex", flexDirection: "column", gap: "7px" } }, /* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "center", gap: "6px", flexWrap: "wrap" } }, /* @__PURE__ */ t.createElement(X, { theme: n, tone: "primary" }, `Row override ${e.badge}`), /* @__PURE__ */ t.createElement("span", { style: { fontSize: "12px", fontWeight: 800, color: n.text } }, i)), /* @__PURE__ */ t.createElement("div", { style: { fontSize: "11px", color: n.textSec, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, ke(r.condition)), /* @__PURE__ */ t.createElement("div", { style: { display: "flex", gap: "6px", flexWrap: "wrap" } }, /* @__PURE__ */ t.createElement(X, { theme: n }, r.child ? "Custom children" : "Default children"))), /* @__PURE__ */ t.createElement("span", { style: { color: l ? n.primary || "#2563EB" : n.textSec, flexShrink: 0 } }, /* @__PURE__ */ t.createElement(m.ChevronRight, null))));
|
|
810
826
|
}
|
|
811
|
-
function
|
|
827
|
+
function st({
|
|
812
828
|
item: e,
|
|
813
829
|
selected: l,
|
|
814
830
|
theme: n,
|
|
@@ -817,9 +833,9 @@ function it({
|
|
|
817
833
|
onSelect: i,
|
|
818
834
|
onDragStart: s,
|
|
819
835
|
onDragOver: f,
|
|
820
|
-
onDrop:
|
|
836
|
+
onDrop: E
|
|
821
837
|
}) {
|
|
822
|
-
const
|
|
838
|
+
const b = e.node, F = b.field ? r(b.field) : "Select field", N = b.label && b.label.trim() ? b.label.trim() : F, y = tt(b.sortBy, a);
|
|
823
839
|
return /* @__PURE__ */ t.createElement(
|
|
824
840
|
"button",
|
|
825
841
|
{
|
|
@@ -827,7 +843,7 @@ function it({
|
|
|
827
843
|
draggable: !0,
|
|
828
844
|
onDragStart: s,
|
|
829
845
|
onDragOver: f,
|
|
830
|
-
onDrop:
|
|
846
|
+
onDrop: E,
|
|
831
847
|
onClick: i,
|
|
832
848
|
style: {
|
|
833
849
|
width: "100%",
|
|
@@ -842,12 +858,12 @@ function it({
|
|
|
842
858
|
gap: "10px"
|
|
843
859
|
}
|
|
844
860
|
},
|
|
845
|
-
/* @__PURE__ */ t.createElement("span", { style: { cursor: "grab", display: "inline-flex" } }, /* @__PURE__ */ t.createElement(
|
|
846
|
-
/* @__PURE__ */ t.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "center", gap: "7px", minWidth: 0 } }, /* @__PURE__ */ t.createElement("span", { style: { fontSize: "11px", fontWeight: 800, color: n.textSec, flexShrink: 0 } }, "Level ", e.levelNumber), /* @__PURE__ */ t.createElement("span", { style: { fontSize: "12px", fontWeight: 800, color: n.text, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, N)), /* @__PURE__ */ t.createElement("div", { style: { fontSize: "11px", color: n.textSec, marginTop: "3px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, F, y ? ` · ${
|
|
847
|
-
/* @__PURE__ */ t.createElement("span", { style: { color: l ? n.primary || "#2563EB" : n.textSec, flexShrink: 0 } }, /* @__PURE__ */ t.createElement(
|
|
861
|
+
/* @__PURE__ */ t.createElement("span", { style: { cursor: "grab", display: "inline-flex" } }, /* @__PURE__ */ t.createElement(m.DragIndicator, null)),
|
|
862
|
+
/* @__PURE__ */ t.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "center", gap: "7px", minWidth: 0 } }, /* @__PURE__ */ t.createElement("span", { style: { fontSize: "11px", fontWeight: 800, color: n.textSec, flexShrink: 0 } }, "Level ", e.levelNumber), /* @__PURE__ */ t.createElement("span", { style: { fontSize: "12px", fontWeight: 800, color: n.text, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, N)), /* @__PURE__ */ t.createElement("div", { style: { fontSize: "11px", color: n.textSec, marginTop: "3px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, F, y ? ` · ${b.sortDir === "asc" ? "Asc" : "Desc"}${b.sortAbs ? " |abs|" : ""} by ${y}` : "", b.topN ? ` · Top ${b.topN}` : "", b.filters && b.filters.clauses && b.filters.clauses.length > 0 ? ` · ${b.filters.clauses.length} filter${b.filters.clauses.length === 1 ? "" : "s"}` : "")),
|
|
863
|
+
/* @__PURE__ */ t.createElement("span", { style: { color: l ? n.primary || "#2563EB" : n.textSec, flexShrink: 0 } }, /* @__PURE__ */ t.createElement(m.ChevronRight, null))
|
|
848
864
|
);
|
|
849
865
|
}
|
|
850
|
-
function
|
|
866
|
+
function Yt({
|
|
851
867
|
item: e,
|
|
852
868
|
node: l,
|
|
853
869
|
allFields: n,
|
|
@@ -856,18 +872,18 @@ function Gt({
|
|
|
856
872
|
theme: i,
|
|
857
873
|
onUpdate: s,
|
|
858
874
|
onApply: f,
|
|
859
|
-
onRemove:
|
|
860
|
-
onEditFilter:
|
|
875
|
+
onRemove: E,
|
|
876
|
+
onEditFilter: b,
|
|
861
877
|
titleLabel: F = "Title",
|
|
862
878
|
canRemove: N = !0
|
|
863
879
|
}) {
|
|
864
|
-
const y = q(i),
|
|
880
|
+
const y = q(i), C = e && e.levelNumber ? `Level ${e.levelNumber}` : "Level", c = !!(l.filters && l.filters.clauses && l.filters.clauses.length > 0), v = [
|
|
865
881
|
l.field ? a(l.field) : "Select field",
|
|
866
882
|
l.label && l.label.trim() ? `Title: ${l.label.trim()}` : null,
|
|
867
883
|
l.topN ? `Top ${l.topN}` : null,
|
|
868
884
|
c ? `${l.filters.clauses.length} filter${l.filters.clauses.length === 1 ? "" : "s"}` : null
|
|
869
885
|
].filter(Boolean);
|
|
870
|
-
return /* @__PURE__ */ t.createElement("div", { style:
|
|
886
|
+
return /* @__PURE__ */ t.createElement("div", { style: ue(i) }, /* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: "12px" } }, /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: { fontSize: "14px", fontWeight: 800, color: i.text } }, C)), /* @__PURE__ */ t.createElement("div", { style: { display: "flex", gap: "8px", flexShrink: 0 } }, /* @__PURE__ */ t.createElement(
|
|
871
887
|
"button",
|
|
872
888
|
{
|
|
873
889
|
type: "button",
|
|
@@ -884,20 +900,22 @@ function Gt({
|
|
|
884
900
|
}
|
|
885
901
|
},
|
|
886
902
|
"Apply"
|
|
887
|
-
), N && /* @__PURE__ */ t.createElement("button", { type: "button", onClick:
|
|
888
|
-
|
|
903
|
+
), N && /* @__PURE__ */ t.createElement("button", { type: "button", onClick: E, style: j(i, !1, !0) }, /* @__PURE__ */ t.createElement(m.Delete, null), " ", e && e.path && e.path.length === 0 ? "Clear report" : "Remove level"))), /* @__PURE__ */ t.createElement(
|
|
904
|
+
it,
|
|
889
905
|
{
|
|
890
|
-
title: `${
|
|
891
|
-
summary:
|
|
906
|
+
title: `${C} settings`,
|
|
907
|
+
summary: v.join(" · "),
|
|
892
908
|
theme: i,
|
|
893
909
|
defaultOpen: !1
|
|
894
910
|
},
|
|
895
911
|
/* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: L(i) }, "Break Down By"), /* @__PURE__ */ t.createElement(
|
|
896
|
-
|
|
912
|
+
U,
|
|
897
913
|
{
|
|
914
|
+
size: "sm",
|
|
915
|
+
"aria-label": "Break down by",
|
|
898
916
|
value: l.field,
|
|
899
917
|
onChange: (u) => s({ ...l, field: u.target.value }),
|
|
900
|
-
style: y
|
|
918
|
+
style: { ...y, width: "100%" }
|
|
901
919
|
},
|
|
902
920
|
/* @__PURE__ */ t.createElement("option", { value: "" }, "Select field..."),
|
|
903
921
|
n.map(
|
|
@@ -928,11 +946,13 @@ function Gt({
|
|
|
928
946
|
style: { ...y, textAlign: "center" }
|
|
929
947
|
}
|
|
930
948
|
), /* @__PURE__ */ t.createElement(
|
|
931
|
-
|
|
949
|
+
U,
|
|
932
950
|
{
|
|
951
|
+
size: "sm",
|
|
952
|
+
"aria-label": "Sort by",
|
|
933
953
|
value: l.sortBy || "",
|
|
934
954
|
onChange: (u) => s({ ...l, sortBy: u.target.value || null }),
|
|
935
|
-
style: y
|
|
955
|
+
style: { ...y, width: "100%" }
|
|
936
956
|
},
|
|
937
957
|
r.map(
|
|
938
958
|
/** @param {any} [option] @returns {any} */
|
|
@@ -975,13 +995,13 @@ function Gt({
|
|
|
975
995
|
},
|
|
976
996
|
title: l.sortDir === "asc" ? "Ascending" : "Descending"
|
|
977
997
|
},
|
|
978
|
-
l.sortDir === "asc" ? /* @__PURE__ */ t.createElement(
|
|
998
|
+
l.sortDir === "asc" ? /* @__PURE__ */ t.createElement(m.SortAsc, null) : /* @__PURE__ */ t.createElement(m.SortDesc, null)
|
|
979
999
|
))),
|
|
980
1000
|
/* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: L(i) }, "Level Filter"), /* @__PURE__ */ t.createElement("div", { style: { display: "flex", gap: "8px", alignItems: "stretch" } }, /* @__PURE__ */ t.createElement(
|
|
981
1001
|
"button",
|
|
982
1002
|
{
|
|
983
1003
|
type: "button",
|
|
984
|
-
onClick:
|
|
1004
|
+
onClick: b,
|
|
985
1005
|
style: q(i, {
|
|
986
1006
|
flex: 1,
|
|
987
1007
|
display: "flex",
|
|
@@ -993,8 +1013,8 @@ function Gt({
|
|
|
993
1013
|
borderColor: c ? `${i.primary || "#2563EB"}45` : void 0
|
|
994
1014
|
})
|
|
995
1015
|
},
|
|
996
|
-
/* @__PURE__ */ t.createElement(
|
|
997
|
-
/* @__PURE__ */ t.createElement("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 } }, c ?
|
|
1016
|
+
/* @__PURE__ */ t.createElement(m.Filter, null),
|
|
1017
|
+
/* @__PURE__ */ t.createElement("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 } }, c ? ke(l.filters) : "No filter (show all rows)")
|
|
998
1018
|
), c && /* @__PURE__ */ t.createElement(
|
|
999
1019
|
"button",
|
|
1000
1020
|
{
|
|
@@ -1014,10 +1034,10 @@ function Gt({
|
|
|
1014
1034
|
},
|
|
1015
1035
|
title: "Clear filter"
|
|
1016
1036
|
},
|
|
1017
|
-
/* @__PURE__ */ t.createElement(
|
|
1037
|
+
/* @__PURE__ */ t.createElement(m.Close, null)
|
|
1018
1038
|
)), /* @__PURE__ */ t.createElement("div", { style: { fontSize: "11px", color: i.textSec, marginTop: "6px", lineHeight: 1.4 } }, `Rows that don't match the filter are grouped into "Others" to keep totals intact.`)),
|
|
1019
1039
|
/* @__PURE__ */ t.createElement(
|
|
1020
|
-
|
|
1040
|
+
ot,
|
|
1021
1041
|
{
|
|
1022
1042
|
value: l.format,
|
|
1023
1043
|
theme: i,
|
|
@@ -1029,7 +1049,7 @@ function Gt({
|
|
|
1029
1049
|
)
|
|
1030
1050
|
));
|
|
1031
1051
|
}
|
|
1032
|
-
function
|
|
1052
|
+
function Zt({
|
|
1033
1053
|
draft: e,
|
|
1034
1054
|
allFields: l,
|
|
1035
1055
|
getFieldLabel: n = M,
|
|
@@ -1039,42 +1059,42 @@ function Yt({
|
|
|
1039
1059
|
onApply: s,
|
|
1040
1060
|
onCancel: f
|
|
1041
1061
|
}) {
|
|
1042
|
-
const [
|
|
1062
|
+
const [E, b] = H(null), [F, N] = H(!1), y = e && e.child ? e.child : Y(""), C = Array.isArray(e && e.selectedPath) ? e.selectedPath : [], c = ae(y, C) || y, h = !!(c.filters && c.filters.clauses && c.filters.clauses.length > 0), v = We(y, e.childLevelNumber || 2), u = Math.max(0, C.length), D = (e && Number.isFinite(Number(e.childLevelNumber)) ? Number(e.childLevelNumber) : 2) + C.length, R = q(r), x = [
|
|
1043
1063
|
c.field ? n(c.field) : "Select field",
|
|
1044
1064
|
e.title && e.title.trim() ? `Title: ${e.title.trim()}` : null,
|
|
1045
1065
|
c.topN ? `Top ${c.topN}` : null,
|
|
1046
|
-
|
|
1047
|
-
].filter(Boolean),
|
|
1066
|
+
h ? `${c.filters.clauses.length} filter${c.filters.clauses.length === 1 ? "" : "s"}` : null
|
|
1067
|
+
].filter(Boolean), w = (d) => {
|
|
1048
1068
|
i({
|
|
1049
1069
|
...e,
|
|
1050
|
-
child:
|
|
1070
|
+
child: _(y, C, () => d)
|
|
1051
1071
|
});
|
|
1052
|
-
},
|
|
1072
|
+
}, K = (d) => {
|
|
1053
1073
|
i({
|
|
1054
1074
|
...e,
|
|
1055
|
-
selectedPath:
|
|
1075
|
+
selectedPath: Ie(d)
|
|
1056
1076
|
});
|
|
1057
|
-
},
|
|
1058
|
-
const d = [...
|
|
1077
|
+
}, fe = () => {
|
|
1078
|
+
const d = [...C, T];
|
|
1059
1079
|
i({
|
|
1060
1080
|
...e,
|
|
1061
|
-
child:
|
|
1081
|
+
child: _(
|
|
1062
1082
|
y,
|
|
1063
|
-
|
|
1083
|
+
C,
|
|
1064
1084
|
/** @param {any} [node] @returns {any} */
|
|
1065
|
-
(
|
|
1066
|
-
...
|
|
1067
|
-
defaultChild:
|
|
1085
|
+
(A) => ({
|
|
1086
|
+
...A,
|
|
1087
|
+
defaultChild: A.defaultChild || Y("")
|
|
1068
1088
|
})
|
|
1069
1089
|
),
|
|
1070
1090
|
selectedPath: d
|
|
1071
1091
|
});
|
|
1072
|
-
},
|
|
1092
|
+
}, ie = () => {
|
|
1073
1093
|
i({
|
|
1074
1094
|
...e,
|
|
1075
|
-
child:
|
|
1095
|
+
child: _(
|
|
1076
1096
|
y,
|
|
1077
|
-
|
|
1097
|
+
C,
|
|
1078
1098
|
/** @param {any} [node] @returns {any} */
|
|
1079
1099
|
(d) => ({
|
|
1080
1100
|
...d,
|
|
@@ -1082,14 +1102,14 @@ function Yt({
|
|
|
1082
1102
|
})
|
|
1083
1103
|
)
|
|
1084
1104
|
});
|
|
1085
|
-
},
|
|
1086
|
-
d === null || d ===
|
|
1105
|
+
}, ye = (d, A) => {
|
|
1106
|
+
d === null || d === A || (i({
|
|
1087
1107
|
...e,
|
|
1088
|
-
child:
|
|
1089
|
-
selectedPath:
|
|
1090
|
-
}),
|
|
1108
|
+
child: nt(y, d, A),
|
|
1109
|
+
selectedPath: Ie(A)
|
|
1110
|
+
}), b(null));
|
|
1091
1111
|
};
|
|
1092
|
-
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", { style:
|
|
1112
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", { style: ue(r) }, /* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: "12px" } }, /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: { fontSize: "14px", fontWeight: 800, color: r.text } }, e.rowLabel || "Selected row"), /* @__PURE__ */ t.createElement("div", { style: { fontSize: "12px", color: r.textSec, marginTop: "2px" } }, "Override applies to this row only.")), /* @__PURE__ */ t.createElement("div", { style: { display: "flex", gap: "8px", flexShrink: 0 } }, /* @__PURE__ */ t.createElement("button", { type: "button", onClick: f, style: j(r) }, /* @__PURE__ */ t.createElement(m.Close, null), " Close"), /* @__PURE__ */ t.createElement(
|
|
1093
1113
|
"button",
|
|
1094
1114
|
{
|
|
1095
1115
|
type: "button",
|
|
@@ -1106,10 +1126,10 @@ function Yt({
|
|
|
1106
1126
|
}
|
|
1107
1127
|
},
|
|
1108
1128
|
"Apply"
|
|
1109
|
-
))), /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: L(r) }, "Level"), /* @__PURE__ */ t.createElement("div", { style: { fontSize: "12px", fontWeight: 800, color: r.text } }, `Level ${D}`)), /* @__PURE__ */ t.createElement(
|
|
1129
|
+
))), /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: L(r) }, "Level"), /* @__PURE__ */ t.createElement("div", { style: { fontSize: "12px", fontWeight: 800, color: r.text } }, `Level ${D}`)), /* @__PURE__ */ t.createElement(Kt, { debug: e.request && e.request.debug, theme: r }), v.length > 1 && /* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, v.map(
|
|
1110
1130
|
/** @param {any} [item] @returns {any} */
|
|
1111
1131
|
(d) => /* @__PURE__ */ t.createElement(
|
|
1112
|
-
|
|
1132
|
+
st,
|
|
1113
1133
|
{
|
|
1114
1134
|
key: `draft-level:${d.index}:${d.node._id}`,
|
|
1115
1135
|
item: d,
|
|
@@ -1117,27 +1137,27 @@ function Yt({
|
|
|
1117
1137
|
theme: r,
|
|
1118
1138
|
sortByOptions: a,
|
|
1119
1139
|
getFieldLabel: n,
|
|
1120
|
-
onSelect: () =>
|
|
1140
|
+
onSelect: () => K(d.index),
|
|
1121
1141
|
onDragStart: (
|
|
1122
1142
|
/** @param {any} [event] @returns {any} */
|
|
1123
|
-
((
|
|
1124
|
-
|
|
1143
|
+
((A) => {
|
|
1144
|
+
b(d.index), A.dataTransfer.effectAllowed = "move";
|
|
1125
1145
|
})
|
|
1126
1146
|
),
|
|
1127
1147
|
onDragOver: (
|
|
1128
1148
|
/** @param {any} [event] @returns {any} */
|
|
1129
|
-
((
|
|
1149
|
+
((A) => A.preventDefault())
|
|
1130
1150
|
),
|
|
1131
1151
|
onDrop: (
|
|
1132
1152
|
/** @param {any} [event] @returns {any} */
|
|
1133
|
-
((
|
|
1134
|
-
|
|
1153
|
+
((A) => {
|
|
1154
|
+
A.preventDefault(), ye(E, d.index);
|
|
1135
1155
|
})
|
|
1136
1156
|
)
|
|
1137
1157
|
}
|
|
1138
1158
|
)
|
|
1139
1159
|
)), /* @__PURE__ */ t.createElement(
|
|
1140
|
-
|
|
1160
|
+
it,
|
|
1141
1161
|
{
|
|
1142
1162
|
title: `Level ${D} settings`,
|
|
1143
1163
|
summary: x.join(" · "),
|
|
@@ -1154,11 +1174,13 @@ function Yt({
|
|
|
1154
1174
|
}
|
|
1155
1175
|
)),
|
|
1156
1176
|
/* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: L(r) }, "Break Down By"), /* @__PURE__ */ t.createElement(
|
|
1157
|
-
|
|
1177
|
+
U,
|
|
1158
1178
|
{
|
|
1179
|
+
size: "sm",
|
|
1180
|
+
"aria-label": "Break down by",
|
|
1159
1181
|
value: c.field,
|
|
1160
|
-
onChange: (d) =>
|
|
1161
|
-
style: R
|
|
1182
|
+
onChange: (d) => w({ ...c, field: d.target.value }),
|
|
1183
|
+
style: { ...R, width: "100%" }
|
|
1162
1184
|
},
|
|
1163
1185
|
/* @__PURE__ */ t.createElement("option", { value: "" }, "Select field..."),
|
|
1164
1186
|
l.map(
|
|
@@ -1173,18 +1195,20 @@ function Yt({
|
|
|
1173
1195
|
min: "1",
|
|
1174
1196
|
value: c.topN || "",
|
|
1175
1197
|
onChange: (d) => {
|
|
1176
|
-
const
|
|
1177
|
-
|
|
1198
|
+
const A = d.target.value === "" ? null : parseInt(d.target.value, 10);
|
|
1199
|
+
w({ ...c, topN: A && A > 0 ? A : null });
|
|
1178
1200
|
},
|
|
1179
1201
|
placeholder: "All",
|
|
1180
1202
|
style: { ...R, textAlign: "center" }
|
|
1181
1203
|
}
|
|
1182
1204
|
), /* @__PURE__ */ t.createElement(
|
|
1183
|
-
|
|
1205
|
+
U,
|
|
1184
1206
|
{
|
|
1207
|
+
size: "sm",
|
|
1208
|
+
"aria-label": "Sort by",
|
|
1185
1209
|
value: c.sortBy || "",
|
|
1186
|
-
onChange: (d) =>
|
|
1187
|
-
style: R
|
|
1210
|
+
onChange: (d) => w({ ...c, sortBy: d.target.value || null }),
|
|
1211
|
+
style: { ...R, width: "100%" }
|
|
1188
1212
|
},
|
|
1189
1213
|
a.map(
|
|
1190
1214
|
/** @param {any} [option] @returns {any} */
|
|
@@ -1194,7 +1218,7 @@ function Yt({
|
|
|
1194
1218
|
"button",
|
|
1195
1219
|
{
|
|
1196
1220
|
type: "button",
|
|
1197
|
-
onClick: () =>
|
|
1221
|
+
onClick: () => w({ ...c, sortAbs: !c.sortAbs }),
|
|
1198
1222
|
style: {
|
|
1199
1223
|
border: `1px solid ${c.sortAbs ? r.primary || "#2563EB" : r.border}`,
|
|
1200
1224
|
borderRadius: "10px",
|
|
@@ -1214,7 +1238,7 @@ function Yt({
|
|
|
1214
1238
|
"button",
|
|
1215
1239
|
{
|
|
1216
1240
|
type: "button",
|
|
1217
|
-
onClick: () =>
|
|
1241
|
+
onClick: () => w({ ...c, sortDir: c.sortDir === "asc" ? "desc" : "asc" }),
|
|
1218
1242
|
style: {
|
|
1219
1243
|
border: `1px solid ${r.border}`,
|
|
1220
1244
|
borderRadius: "10px",
|
|
@@ -1227,7 +1251,7 @@ function Yt({
|
|
|
1227
1251
|
},
|
|
1228
1252
|
title: c.sortDir === "asc" ? "Ascending" : "Descending"
|
|
1229
1253
|
},
|
|
1230
|
-
c.sortDir === "asc" ? /* @__PURE__ */ t.createElement(
|
|
1254
|
+
c.sortDir === "asc" ? /* @__PURE__ */ t.createElement(m.SortAsc, null) : /* @__PURE__ */ t.createElement(m.SortDesc, null)
|
|
1231
1255
|
))),
|
|
1232
1256
|
/* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: L(r) }, "Filter (this row's children only)"), /* @__PURE__ */ t.createElement("div", { style: { display: "flex", gap: "8px", alignItems: "stretch" } }, /* @__PURE__ */ t.createElement(
|
|
1233
1257
|
"button",
|
|
@@ -1241,17 +1265,17 @@ function Yt({
|
|
|
1241
1265
|
gap: "8px",
|
|
1242
1266
|
textAlign: "left",
|
|
1243
1267
|
cursor: "pointer",
|
|
1244
|
-
background:
|
|
1245
|
-
borderColor:
|
|
1268
|
+
background: h ? `${r.primary || "#2563EB"}08` : r.hover || "#F8FAFC",
|
|
1269
|
+
borderColor: h ? `${r.primary || "#2563EB"}45` : void 0
|
|
1246
1270
|
})
|
|
1247
1271
|
},
|
|
1248
|
-
/* @__PURE__ */ t.createElement(
|
|
1249
|
-
/* @__PURE__ */ t.createElement("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 } },
|
|
1250
|
-
),
|
|
1272
|
+
/* @__PURE__ */ t.createElement(m.Filter, null),
|
|
1273
|
+
/* @__PURE__ */ t.createElement("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", flex: 1 } }, h ? ke(c.filters) : "No filter (show all children)")
|
|
1274
|
+
), h && /* @__PURE__ */ t.createElement(
|
|
1251
1275
|
"button",
|
|
1252
1276
|
{
|
|
1253
1277
|
type: "button",
|
|
1254
|
-
onClick: () =>
|
|
1278
|
+
onClick: () => w({ ...c, filters: null }),
|
|
1255
1279
|
style: {
|
|
1256
1280
|
border: `1px solid ${r.border}`,
|
|
1257
1281
|
borderRadius: "10px",
|
|
@@ -1266,16 +1290,16 @@ function Yt({
|
|
|
1266
1290
|
},
|
|
1267
1291
|
title: "Clear filter"
|
|
1268
1292
|
},
|
|
1269
|
-
/* @__PURE__ */ t.createElement(
|
|
1293
|
+
/* @__PURE__ */ t.createElement(m.Close, null)
|
|
1270
1294
|
)), /* @__PURE__ */ t.createElement("div", { style: { fontSize: "11px", color: r.textSec, marginTop: "6px", lineHeight: 1.4 } }, 'Filtered-out children are grouped into "Others" to keep totals intact.')),
|
|
1271
1295
|
/* @__PURE__ */ t.createElement(
|
|
1272
|
-
|
|
1296
|
+
ot,
|
|
1273
1297
|
{
|
|
1274
1298
|
value: c.format,
|
|
1275
1299
|
theme: r,
|
|
1276
1300
|
onChange: (
|
|
1277
1301
|
/** @param {any} [format] @returns {any} */
|
|
1278
|
-
((d) =>
|
|
1302
|
+
((d) => w({ ...c, format: d }))
|
|
1279
1303
|
)
|
|
1280
1304
|
}
|
|
1281
1305
|
),
|
|
@@ -1283,27 +1307,27 @@ function Yt({
|
|
|
1283
1307
|
"button",
|
|
1284
1308
|
{
|
|
1285
1309
|
type: "button",
|
|
1286
|
-
onClick:
|
|
1310
|
+
onClick: fe,
|
|
1287
1311
|
disabled: !c.field,
|
|
1288
1312
|
style: { ...j(r, !!c.defaultChild), opacity: c.field ? 1 : 0.5 }
|
|
1289
1313
|
},
|
|
1290
|
-
/* @__PURE__ */ t.createElement(
|
|
1314
|
+
/* @__PURE__ */ t.createElement(m.Add, null),
|
|
1291
1315
|
" ",
|
|
1292
1316
|
c.defaultChild ? "Open next level" : "Add next level"
|
|
1293
|
-
), c.defaultChild && /* @__PURE__ */ t.createElement("button", { type: "button", onClick:
|
|
1317
|
+
), c.defaultChild && /* @__PURE__ */ t.createElement("button", { type: "button", onClick: ie, style: j(r, !1, !0) }, /* @__PURE__ */ t.createElement(m.Delete, null), " Remove next level"))
|
|
1294
1318
|
)), F && /* @__PURE__ */ t.createElement(
|
|
1295
|
-
|
|
1319
|
+
Pe,
|
|
1296
1320
|
{
|
|
1297
1321
|
title: `Filter children of "${e.rowLabel || "this row"}"`,
|
|
1298
1322
|
description: "Only children matching this filter are shown. Filtered-out rows are grouped into 'Others' to keep totals intact.",
|
|
1299
|
-
condition: c.filters ||
|
|
1323
|
+
condition: c.filters || Le(),
|
|
1300
1324
|
allFields: l,
|
|
1301
1325
|
getFieldLabel: n,
|
|
1302
1326
|
theme: r,
|
|
1303
1327
|
onSave: (
|
|
1304
1328
|
/** @param {any} [nextCondition] @returns {any} */
|
|
1305
1329
|
((d) => {
|
|
1306
|
-
|
|
1330
|
+
w({
|
|
1307
1331
|
...c,
|
|
1308
1332
|
filters: d.clauses.length > 0 ? d : null
|
|
1309
1333
|
});
|
|
@@ -1313,7 +1337,7 @@ function Yt({
|
|
|
1313
1337
|
}
|
|
1314
1338
|
));
|
|
1315
1339
|
}
|
|
1316
|
-
function
|
|
1340
|
+
function Xt({
|
|
1317
1341
|
item: e,
|
|
1318
1342
|
branch: l,
|
|
1319
1343
|
theme: n,
|
|
@@ -1323,21 +1347,21 @@ function Zt({
|
|
|
1323
1347
|
onRemoveCustomChildren: s,
|
|
1324
1348
|
onRemove: f
|
|
1325
1349
|
}) {
|
|
1326
|
-
const
|
|
1327
|
-
return /* @__PURE__ */ t.createElement("div", { style:
|
|
1350
|
+
const E = q(n), b = ke(l.condition);
|
|
1351
|
+
return /* @__PURE__ */ t.createElement("div", { style: ue(n) }, /* @__PURE__ */ t.createElement("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: "12px" } }, /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: { fontSize: "14px", fontWeight: 800, color: n.text } }, `Row override ${e.badge}`), /* @__PURE__ */ t.createElement("div", { style: { fontSize: "12px", color: n.textSec, marginTop: "2px" } }, "Use a row override when matching rows need a different label or child breakdown.")), /* @__PURE__ */ t.createElement("button", { type: "button", onClick: f, style: j(n, !1, !0) }, /* @__PURE__ */ t.createElement(m.Delete, null), " Remove override")), /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: L(n) }, "Display As"), /* @__PURE__ */ t.createElement(
|
|
1328
1352
|
"input",
|
|
1329
1353
|
{
|
|
1330
1354
|
value: l.label,
|
|
1331
1355
|
onChange: (F) => a({ ...l, label: F.target.value }),
|
|
1332
1356
|
placeholder: "Label to show for matching rows",
|
|
1333
|
-
style:
|
|
1357
|
+
style: E
|
|
1334
1358
|
}
|
|
1335
1359
|
)), /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: L(n) }, "Rule"), /* @__PURE__ */ t.createElement(
|
|
1336
1360
|
"button",
|
|
1337
1361
|
{
|
|
1338
1362
|
type: "button",
|
|
1339
1363
|
onClick: r,
|
|
1340
|
-
title:
|
|
1364
|
+
title: b,
|
|
1341
1365
|
style: {
|
|
1342
1366
|
...q(n),
|
|
1343
1367
|
display: "flex",
|
|
@@ -1348,9 +1372,9 @@ function Zt({
|
|
|
1348
1372
|
background: n.hover || "#F8FAFC"
|
|
1349
1373
|
}
|
|
1350
1374
|
},
|
|
1351
|
-
/* @__PURE__ */ t.createElement(
|
|
1352
|
-
/* @__PURE__ */ t.createElement("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } },
|
|
1353
|
-
)), /* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" } }, /* @__PURE__ */ t.createElement("button", { type: "button", onClick: i, style: j(n, !!l.child) }, /* @__PURE__ */ t.createElement(
|
|
1375
|
+
/* @__PURE__ */ t.createElement(m.Filter, null),
|
|
1376
|
+
/* @__PURE__ */ t.createElement("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, b)
|
|
1377
|
+
)), /* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" } }, /* @__PURE__ */ t.createElement("button", { type: "button", onClick: i, style: j(n, !!l.child) }, /* @__PURE__ */ t.createElement(m.Add, null), " ", l.child ? "Open Custom children" : "Add Custom children"), l.child && /* @__PURE__ */ t.createElement("button", { type: "button", onClick: s, style: j(n, !1, !0) }, /* @__PURE__ */ t.createElement(m.Delete, null), " Remove Custom children")), /* @__PURE__ */ t.createElement(
|
|
1354
1378
|
"div",
|
|
1355
1379
|
{
|
|
1356
1380
|
style: {
|
|
@@ -1365,7 +1389,7 @@ function Zt({
|
|
|
1365
1389
|
"Override applies to this row only. Rows without this override continue with Default children."
|
|
1366
1390
|
));
|
|
1367
1391
|
}
|
|
1368
|
-
function
|
|
1392
|
+
function el({
|
|
1369
1393
|
reportDef: e,
|
|
1370
1394
|
setReportDef: l,
|
|
1371
1395
|
availableFields: n,
|
|
@@ -1374,146 +1398,146 @@ function Ut({
|
|
|
1374
1398
|
data: i = [],
|
|
1375
1399
|
valConfigs: s,
|
|
1376
1400
|
colFields: f,
|
|
1377
|
-
setColFields:
|
|
1378
|
-
setValConfigs:
|
|
1401
|
+
setColFields: E,
|
|
1402
|
+
setValConfigs: b,
|
|
1379
1403
|
savedReports: F,
|
|
1380
1404
|
setSavedReports: N,
|
|
1381
1405
|
activeReportId: y,
|
|
1382
|
-
setActiveReportId:
|
|
1406
|
+
setActiveReportId: C,
|
|
1383
1407
|
showNotification: c,
|
|
1384
|
-
requestedSelection:
|
|
1385
|
-
showReportConfigColumn:
|
|
1408
|
+
requestedSelection: h = null,
|
|
1409
|
+
showReportConfigColumn: v = !0,
|
|
1386
1410
|
setShowReportConfigColumn: u
|
|
1387
1411
|
}) {
|
|
1388
|
-
const [D, R] = H(""), [x,
|
|
1412
|
+
const [D, R] = H(""), [x, w] = H(null), [K, fe] = H(null), [ie, ye] = H(null), [d, A] = H(null), [ct, Te] = H(null), xe = Fe(null), se = Fe(!1), je = Fe(null), g = W(
|
|
1389
1413
|
() => e && e.root ? V(e.root) : null,
|
|
1390
1414
|
[e]
|
|
1391
|
-
),
|
|
1392
|
-
() =>
|
|
1415
|
+
), O = W(
|
|
1416
|
+
() => Rt(n, s),
|
|
1393
1417
|
[n, s]
|
|
1394
|
-
),
|
|
1395
|
-
(o) =>
|
|
1418
|
+
), ee = B(
|
|
1419
|
+
(o) => St(o, a),
|
|
1396
1420
|
[a]
|
|
1397
|
-
),
|
|
1398
|
-
() =>
|
|
1421
|
+
), be = W(
|
|
1422
|
+
() => Nt(s),
|
|
1399
1423
|
[s]
|
|
1400
|
-
),
|
|
1401
|
-
() =>
|
|
1402
|
-
[
|
|
1424
|
+
), J = W(
|
|
1425
|
+
() => Ze(g, { allFields: O, valConfigs: s, data: i }),
|
|
1426
|
+
[g, O, s, i]
|
|
1403
1427
|
), $ = B((o) => {
|
|
1404
1428
|
l(
|
|
1405
1429
|
/** @param {any} [prev] @returns {any} */
|
|
1406
1430
|
(p) => {
|
|
1407
|
-
const S = p && typeof p == "object" ? p : {},
|
|
1431
|
+
const S = p && typeof p == "object" ? p : {}, k = S.root ? V(S.root) : null, P = typeof o == "function" ? o(k) : o;
|
|
1408
1432
|
return { ...S, root: P };
|
|
1409
1433
|
}
|
|
1410
1434
|
);
|
|
1411
|
-
}, [l]),
|
|
1412
|
-
() =>
|
|
1413
|
-
[
|
|
1435
|
+
}, [l]), te = W(() => zt(g), [g]), I = W(() => We(g), [g]), ce = W(
|
|
1436
|
+
() => jt(te, x),
|
|
1437
|
+
[te, x]
|
|
1414
1438
|
);
|
|
1415
|
-
|
|
1416
|
-
() =>
|
|
1417
|
-
[
|
|
1418
|
-
),
|
|
1419
|
-
() =>
|
|
1420
|
-
[
|
|
1439
|
+
W(
|
|
1440
|
+
() => Mt(te, x),
|
|
1441
|
+
[te, x]
|
|
1442
|
+
), W(
|
|
1443
|
+
() => Ht(te, x),
|
|
1444
|
+
[te, x]
|
|
1421
1445
|
);
|
|
1422
|
-
const
|
|
1423
|
-
if (!
|
|
1446
|
+
const le = W(() => {
|
|
1447
|
+
if (!g || !x) return null;
|
|
1424
1448
|
if (x.type === "node") {
|
|
1425
|
-
const o =
|
|
1449
|
+
const o = ae(g, x.path);
|
|
1426
1450
|
return o ? { type: "node", node: o } : null;
|
|
1427
1451
|
}
|
|
1428
1452
|
if (x.type === "branch") {
|
|
1429
|
-
const o =
|
|
1453
|
+
const o = Be(g, x.nodePath, x.branchIndex);
|
|
1430
1454
|
return o ? { type: "branch", branch: o } : null;
|
|
1431
1455
|
}
|
|
1432
1456
|
return null;
|
|
1433
|
-
}, [
|
|
1434
|
-
if (!o || o.type !== "rowPath" || !
|
|
1435
|
-
const p = Array.isArray(o.nodePath) ? o.nodePath : [], S =
|
|
1457
|
+
}, [g, x]), $e = W(() => !K || !g ? null : Be(g, K.nodePath, K.branchIndex), [K, g]), Me = B((o) => {
|
|
1458
|
+
if (!o || o.type !== "rowPath" || !g) return !1;
|
|
1459
|
+
const p = Array.isArray(o.nodePath) ? o.nodePath : [], S = ae(g, p);
|
|
1436
1460
|
if (!S) return !1;
|
|
1437
|
-
const
|
|
1461
|
+
const k = Array.isArray(S.branches) ? S.branches : [], P = k.findIndex(
|
|
1438
1462
|
/** @param {any} [branch] @returns {any} */
|
|
1439
|
-
(
|
|
1440
|
-
),
|
|
1441
|
-
return
|
|
1463
|
+
(de) => Xe(de, o.field, o.value)
|
|
1464
|
+
), z = P >= 0 ? k[P] : null, he = z && z.child ? z.child : S.defaultChild || Y(""), G = Q(o.label || o.value);
|
|
1465
|
+
return A({
|
|
1442
1466
|
request: o,
|
|
1443
1467
|
nodePath: p,
|
|
1444
1468
|
branchIndex: P,
|
|
1445
1469
|
rowLabel: G,
|
|
1446
|
-
title:
|
|
1447
|
-
child: Oe(
|
|
1470
|
+
title: z && z.label ? z.label : G,
|
|
1471
|
+
child: Oe(he) || Y(""),
|
|
1448
1472
|
selectedPath: [],
|
|
1449
1473
|
childLevelNumber: Number.isFinite(Number(o.levelNumber)) ? Number(o.levelNumber) + 1 : 2
|
|
1450
|
-
}),
|
|
1451
|
-
}, [
|
|
1452
|
-
|
|
1453
|
-
if (!
|
|
1454
|
-
x !== null &&
|
|
1474
|
+
}), w({ type: "node", path: p }), !0;
|
|
1475
|
+
}, [g]);
|
|
1476
|
+
Ee(() => {
|
|
1477
|
+
if (!g) {
|
|
1478
|
+
x !== null && w(null);
|
|
1455
1479
|
return;
|
|
1456
1480
|
}
|
|
1457
1481
|
if (x) {
|
|
1458
1482
|
if (x.type === "node") {
|
|
1459
|
-
|
|
1483
|
+
ae(g, x.path) || w({ type: "node", path: [] });
|
|
1460
1484
|
return;
|
|
1461
1485
|
}
|
|
1462
|
-
|
|
1486
|
+
Be(g, x.nodePath, x.branchIndex) || w({ type: "node", path: x.nodePath });
|
|
1463
1487
|
}
|
|
1464
|
-
}, [
|
|
1488
|
+
}, [g, x]);
|
|
1465
1489
|
const ge = B(() => {
|
|
1466
|
-
const o =
|
|
1490
|
+
const o = xe.current;
|
|
1467
1491
|
!o || typeof o.scrollIntoView != "function" || window.requestAnimationFrame(() => {
|
|
1468
1492
|
o.scrollIntoView({ block: "start", behavior: "smooth" });
|
|
1469
1493
|
});
|
|
1470
1494
|
}, []);
|
|
1471
|
-
|
|
1472
|
-
if (
|
|
1473
|
-
if (
|
|
1474
|
-
|
|
1495
|
+
Ee(() => {
|
|
1496
|
+
if (h && je.current !== h) {
|
|
1497
|
+
if (je.current = h, se.current = !0, h.type === "rowPath") {
|
|
1498
|
+
Me(h) || (se.current = !1);
|
|
1475
1499
|
return;
|
|
1476
1500
|
}
|
|
1477
|
-
if (Z(
|
|
1478
|
-
|
|
1501
|
+
if (Z(h) === Z(x)) {
|
|
1502
|
+
se.current = !1, ge();
|
|
1479
1503
|
return;
|
|
1480
1504
|
}
|
|
1481
|
-
|
|
1505
|
+
w(h);
|
|
1482
1506
|
}
|
|
1483
|
-
}, [
|
|
1484
|
-
|
|
1507
|
+
}, [Me, h, ge, x]), Ee(() => {
|
|
1508
|
+
se.current && (se.current = !1, ge());
|
|
1485
1509
|
}, [ge, x]);
|
|
1486
|
-
const
|
|
1510
|
+
const He = B((o, p) => {
|
|
1487
1511
|
$(
|
|
1488
1512
|
/** @param {any} [prevRoot] @returns {any} */
|
|
1489
|
-
(S) =>
|
|
1513
|
+
(S) => _(S, o, () => p)
|
|
1490
1514
|
);
|
|
1491
|
-
}, [$]),
|
|
1515
|
+
}, [$]), Ve = B((o, p, S) => {
|
|
1492
1516
|
$(
|
|
1493
1517
|
/** @param {any} [prevRoot] @returns {any} */
|
|
1494
|
-
(
|
|
1518
|
+
(k) => me(k, o, p, () => S)
|
|
1495
1519
|
);
|
|
1496
|
-
}, [$]),
|
|
1520
|
+
}, [$]), dt = B((o) => {
|
|
1497
1521
|
const p = Y(o);
|
|
1498
|
-
$(p),
|
|
1522
|
+
$(p), A(null), w({ type: "node", path: [] });
|
|
1499
1523
|
}, [$]);
|
|
1500
1524
|
B((o, p) => {
|
|
1501
1525
|
p || $(
|
|
1502
1526
|
/** @param {any} [prevRoot] @returns {any} */
|
|
1503
|
-
(S) =>
|
|
1527
|
+
(S) => _(
|
|
1504
1528
|
S,
|
|
1505
1529
|
o,
|
|
1506
1530
|
/** @param {any} [node] @returns {any} */
|
|
1507
|
-
(
|
|
1508
|
-
...
|
|
1531
|
+
(k) => ({
|
|
1532
|
+
...k,
|
|
1509
1533
|
defaultChild: Y("")
|
|
1510
1534
|
})
|
|
1511
1535
|
)
|
|
1512
|
-
),
|
|
1536
|
+
), w({ type: "node", path: [...o, T] });
|
|
1513
1537
|
}, [$]), B((o) => {
|
|
1514
1538
|
$(
|
|
1515
1539
|
/** @param {any} [prevRoot] @returns {any} */
|
|
1516
|
-
(p) =>
|
|
1540
|
+
(p) => _(
|
|
1517
1541
|
p,
|
|
1518
1542
|
o,
|
|
1519
1543
|
/** @param {any} [node] @returns {any} */
|
|
@@ -1522,163 +1546,163 @@ function Ut({
|
|
|
1522
1546
|
defaultChild: null
|
|
1523
1547
|
})
|
|
1524
1548
|
)
|
|
1525
|
-
),
|
|
1549
|
+
), w({ type: "node", path: o });
|
|
1526
1550
|
}, [$]);
|
|
1527
|
-
const
|
|
1551
|
+
const pt = B((o, p, S) => {
|
|
1528
1552
|
S || $(
|
|
1529
1553
|
/** @param {any} [prevRoot] @returns {any} */
|
|
1530
|
-
(
|
|
1531
|
-
|
|
1554
|
+
(k) => me(
|
|
1555
|
+
k,
|
|
1532
1556
|
o,
|
|
1533
1557
|
p,
|
|
1534
1558
|
/** @param {any} [branch] @returns {any} */
|
|
1535
1559
|
(P) => ({
|
|
1536
1560
|
...P,
|
|
1537
|
-
child: Y(
|
|
1561
|
+
child: Y(O[0] || "")
|
|
1538
1562
|
})
|
|
1539
1563
|
)
|
|
1540
|
-
),
|
|
1541
|
-
}, [
|
|
1564
|
+
), w({ type: "node", path: [...o, _e(p)] });
|
|
1565
|
+
}, [O, $]), ut = B((o, p) => {
|
|
1542
1566
|
$(
|
|
1543
1567
|
/** @param {any} [prevRoot] @returns {any} */
|
|
1544
|
-
(S) =>
|
|
1568
|
+
(S) => me(
|
|
1545
1569
|
S,
|
|
1546
1570
|
o,
|
|
1547
1571
|
p,
|
|
1548
1572
|
/** @param {any} [branch] @returns {any} */
|
|
1549
|
-
(
|
|
1550
|
-
...
|
|
1573
|
+
(k) => ({
|
|
1574
|
+
...k,
|
|
1551
1575
|
child: null
|
|
1552
1576
|
})
|
|
1553
1577
|
)
|
|
1554
|
-
),
|
|
1555
|
-
}, [$]),
|
|
1578
|
+
), w({ type: "branch", nodePath: o, branchIndex: p });
|
|
1579
|
+
}, [$]), ft = B((o) => {
|
|
1556
1580
|
if (o.length === 0) {
|
|
1557
|
-
$(null),
|
|
1581
|
+
$(null), A(null), w(null);
|
|
1558
1582
|
return;
|
|
1559
1583
|
}
|
|
1560
1584
|
const p = o.slice(0, -1), S = o[o.length - 1];
|
|
1561
1585
|
if (S === T) {
|
|
1562
1586
|
$(
|
|
1563
1587
|
/** @param {any} [prevRoot] @returns {any} */
|
|
1564
|
-
(P) =>
|
|
1588
|
+
(P) => _(
|
|
1565
1589
|
P,
|
|
1566
1590
|
p,
|
|
1567
1591
|
/** @param {any} [node] @returns {any} */
|
|
1568
|
-
(
|
|
1569
|
-
...
|
|
1592
|
+
(z) => ({
|
|
1593
|
+
...z,
|
|
1570
1594
|
defaultChild: null
|
|
1571
1595
|
})
|
|
1572
1596
|
)
|
|
1573
|
-
),
|
|
1597
|
+
), w({ type: "node", path: p });
|
|
1574
1598
|
return;
|
|
1575
1599
|
}
|
|
1576
|
-
const
|
|
1577
|
-
|
|
1600
|
+
const k = Ce(S);
|
|
1601
|
+
k >= 0 && ($(
|
|
1578
1602
|
/** @param {any} [prevRoot] @returns {any} */
|
|
1579
|
-
(P) =>
|
|
1603
|
+
(P) => me(
|
|
1580
1604
|
P,
|
|
1581
1605
|
p,
|
|
1582
|
-
|
|
1606
|
+
k,
|
|
1583
1607
|
/** @param {any} [branch] @returns {any} */
|
|
1584
|
-
(
|
|
1585
|
-
...
|
|
1608
|
+
(z) => ({
|
|
1609
|
+
...z,
|
|
1586
1610
|
child: null
|
|
1587
1611
|
})
|
|
1588
1612
|
)
|
|
1589
|
-
),
|
|
1590
|
-
}, [$]),
|
|
1613
|
+
), w({ type: "branch", nodePath: p, branchIndex: k }));
|
|
1614
|
+
}, [$]), yt = B((o, p) => {
|
|
1591
1615
|
$(
|
|
1592
1616
|
/** @param {any} [prevRoot] @returns {any} */
|
|
1593
|
-
(S) =>
|
|
1617
|
+
(S) => _(
|
|
1594
1618
|
S,
|
|
1595
1619
|
o,
|
|
1596
1620
|
/** @param {any} [node] @returns {any} */
|
|
1597
|
-
(
|
|
1598
|
-
...
|
|
1599
|
-
branches:
|
|
1621
|
+
(k) => ({
|
|
1622
|
+
...k,
|
|
1623
|
+
branches: k.branches.filter(
|
|
1600
1624
|
/** @param {any} [_] @param {any} [index] @returns {any} */
|
|
1601
|
-
(P,
|
|
1625
|
+
(P, z) => z !== p
|
|
1602
1626
|
)
|
|
1603
1627
|
})
|
|
1604
1628
|
)
|
|
1605
|
-
),
|
|
1606
|
-
}, [$]),
|
|
1607
|
-
|
|
1608
|
-
}, []),
|
|
1629
|
+
), w({ type: "node", path: o });
|
|
1630
|
+
}, [$]), xt = B((o) => {
|
|
1631
|
+
A(null), w({ type: "node", path: o });
|
|
1632
|
+
}, []), qe = B((o) => {
|
|
1609
1633
|
if (o) {
|
|
1610
|
-
if (
|
|
1611
|
-
|
|
1634
|
+
if (A(null), o.kind === "branch") {
|
|
1635
|
+
w({ type: "branch", nodePath: o.nodePath, branchIndex: o.branchIndex });
|
|
1612
1636
|
return;
|
|
1613
1637
|
}
|
|
1614
|
-
|
|
1638
|
+
w({ type: "node", path: o.nodePath });
|
|
1615
1639
|
}
|
|
1616
|
-
}, []),
|
|
1617
|
-
if (!
|
|
1640
|
+
}, []), bt = B(() => {
|
|
1641
|
+
if (!g || !I.length) return;
|
|
1618
1642
|
const o = I[I.length - 1];
|
|
1619
1643
|
if (!o || !o.node || !o.node.field) return;
|
|
1620
1644
|
const p = [...o.path, T];
|
|
1621
|
-
|
|
1645
|
+
A(null), $(
|
|
1622
1646
|
/** @param {any} [prevRoot] @returns {any} */
|
|
1623
|
-
(S) =>
|
|
1647
|
+
(S) => _(
|
|
1624
1648
|
S,
|
|
1625
1649
|
o.path,
|
|
1626
1650
|
/** @param {any} [node] @returns {any} */
|
|
1627
|
-
(
|
|
1628
|
-
...
|
|
1629
|
-
defaultChild:
|
|
1651
|
+
(k) => ({
|
|
1652
|
+
...k,
|
|
1653
|
+
defaultChild: k.defaultChild || Y("")
|
|
1630
1654
|
})
|
|
1631
1655
|
)
|
|
1632
|
-
),
|
|
1633
|
-
}, [I,
|
|
1656
|
+
), w({ type: "node", path: p });
|
|
1657
|
+
}, [I, g, $]), gt = B((o, p) => {
|
|
1634
1658
|
o === null || o === p || ($(
|
|
1635
1659
|
/** @param {any} [prevRoot] @returns {any} */
|
|
1636
|
-
(S) =>
|
|
1637
|
-
),
|
|
1638
|
-
}, [$]),
|
|
1639
|
-
|
|
1640
|
-
}, []),
|
|
1641
|
-
if (!
|
|
1642
|
-
c && c(
|
|
1660
|
+
(S) => nt(S, o, p)
|
|
1661
|
+
), w({ type: "node", path: Ie(p) }), Te(null));
|
|
1662
|
+
}, [$]), ht = B(() => {
|
|
1663
|
+
A(null), w(null);
|
|
1664
|
+
}, []), vt = B(() => {
|
|
1665
|
+
if (!J.valid) {
|
|
1666
|
+
c && c(J.errors[0] || "Fix report validation errors before applying.", "error");
|
|
1643
1667
|
return;
|
|
1644
1668
|
}
|
|
1645
|
-
|
|
1646
|
-
}, [
|
|
1669
|
+
w(null);
|
|
1670
|
+
}, [J, c]), mt = B(() => {
|
|
1647
1671
|
if (!d || !d.request) return;
|
|
1648
|
-
const o = d.request, p = Array.isArray(d.nodePath) ? d.nodePath : [], S =
|
|
1672
|
+
const o = d.request, p = Array.isArray(d.nodePath) ? d.nodePath : [], S = Tt(d.child), k = {
|
|
1649
1673
|
..._t(o.field, o.value, d.title || d.rowLabel, ""),
|
|
1650
1674
|
label: Q(d.title || d.rowLabel || o.value),
|
|
1651
1675
|
sourceRowPath: Array.isArray(o.pathValues) ? o.pathValues.map(String).filter(Boolean) : [],
|
|
1652
1676
|
sourcePathFields: Array.isArray(o.pathFields) ? o.pathFields.map(String).filter(Boolean) : [],
|
|
1653
1677
|
child: S
|
|
1654
1678
|
}, P = (G) => {
|
|
1655
|
-
const
|
|
1679
|
+
const de = Array.isArray(G.branches) ? G.branches : [], Je = de.findIndex(
|
|
1656
1680
|
/** @param {any} [branch] @returns {any} */
|
|
1657
|
-
(
|
|
1681
|
+
(ve) => Xe(ve, o.field, o.value)
|
|
1658
1682
|
);
|
|
1659
1683
|
return Je >= 0 ? {
|
|
1660
1684
|
...G,
|
|
1661
|
-
branches:
|
|
1685
|
+
branches: de.map(
|
|
1662
1686
|
/** @param {any} [branch] @param {any} [index] @returns {any} */
|
|
1663
|
-
(
|
|
1687
|
+
(ve, Et) => Et === Je ? { ...k, _id: ve._id || k._id } : ve
|
|
1664
1688
|
)
|
|
1665
1689
|
} : {
|
|
1666
1690
|
...G,
|
|
1667
|
-
branches: [...
|
|
1691
|
+
branches: [...de, k]
|
|
1668
1692
|
};
|
|
1669
|
-
},
|
|
1670
|
-
if (!
|
|
1671
|
-
c && c(
|
|
1693
|
+
}, z = _(g, p, P), he = Ze(z, { allFields: O, valConfigs: s, data: i });
|
|
1694
|
+
if (!he.valid) {
|
|
1695
|
+
c && c(he.errors[0] || "Fix report validation errors before applying.", "error");
|
|
1672
1696
|
return;
|
|
1673
1697
|
}
|
|
1674
1698
|
$(
|
|
1675
1699
|
/** @param {any} [prevRoot] @returns {any} */
|
|
1676
|
-
(G) =>
|
|
1677
|
-
),
|
|
1678
|
-
}, [
|
|
1679
|
-
if (!
|
|
1680
|
-
if (!
|
|
1681
|
-
c && c(
|
|
1700
|
+
(G) => _(G, p, P)
|
|
1701
|
+
), A(null), w(null), c && c(`Applied settings for ${d.rowLabel || "row"}`, "info");
|
|
1702
|
+
}, [O, i, g, d, $, c, s]), Ke = B(() => {
|
|
1703
|
+
if (!g || !g.field) return;
|
|
1704
|
+
if (!J.valid) {
|
|
1705
|
+
c && c(J.errors[0] || "Fix report validation errors before saving.", "error");
|
|
1682
1706
|
return;
|
|
1683
1707
|
}
|
|
1684
1708
|
const o = `report-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 6)}`, p = D.trim() || `Report ${(F || []).length + 1}`;
|
|
@@ -1688,19 +1712,19 @@ function Ut({
|
|
|
1688
1712
|
id: o,
|
|
1689
1713
|
name: p,
|
|
1690
1714
|
reportDef: JSON.parse(JSON.stringify(e)),
|
|
1691
|
-
layout:
|
|
1715
|
+
layout: wt(f, s),
|
|
1692
1716
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1693
1717
|
}
|
|
1694
|
-
]),
|
|
1695
|
-
}, [f, s, e, D,
|
|
1696
|
-
return /* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "18px", padding: "2px 0 8px" } }, (F || []).length > 0 && /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: L(r) }, /* @__PURE__ */ t.createElement(
|
|
1718
|
+
]), C(o), R(""), c && c(`Report "${p}" saved`, "info");
|
|
1719
|
+
}, [f, s, e, D, J, g, F, C, N, c]);
|
|
1720
|
+
return /* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "18px", padding: "2px 0 8px" } }, (F || []).length > 0 && /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: L(r) }, /* @__PURE__ */ t.createElement(m.Save, null), " Saved Reports"), /* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "6px" } }, (F || []).map(
|
|
1697
1721
|
/** @param {any} [report] @returns {any} */
|
|
1698
1722
|
(o) => /* @__PURE__ */ t.createElement(
|
|
1699
1723
|
"div",
|
|
1700
1724
|
{
|
|
1701
1725
|
key: o.id,
|
|
1702
1726
|
onClick: () => {
|
|
1703
|
-
Ct(o, { setReportDef: l, setActiveReportId:
|
|
1727
|
+
Ct(o, { setReportDef: l, setActiveReportId: C, setColFields: E, setValConfigs: b }), A(null), w({ type: "node", path: [] });
|
|
1704
1728
|
},
|
|
1705
1729
|
style: {
|
|
1706
1730
|
display: "flex",
|
|
@@ -1713,7 +1737,7 @@ function Ut({
|
|
|
1713
1737
|
border: `1px solid ${o.id === y ? r.primary || "#2563EB" : r.border}`
|
|
1714
1738
|
}
|
|
1715
1739
|
},
|
|
1716
|
-
/* @__PURE__ */ t.createElement(
|
|
1740
|
+
/* @__PURE__ */ t.createElement(m.Report, null),
|
|
1717
1741
|
/* @__PURE__ */ t.createElement("div", { style: { flex: 1, minWidth: 0, fontSize: "12px", fontWeight: 700, color: r.text, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, o.name),
|
|
1718
1742
|
/* @__PURE__ */ t.createElement(
|
|
1719
1743
|
"button",
|
|
@@ -1724,39 +1748,39 @@ function Ut({
|
|
|
1724
1748
|
/** @param {any} [prev] @returns {any} */
|
|
1725
1749
|
(S) => (S || []).filter(
|
|
1726
1750
|
/** @param {any} [current] @returns {any} */
|
|
1727
|
-
(
|
|
1751
|
+
(k) => k.id !== o.id
|
|
1728
1752
|
)
|
|
1729
|
-
), y === o.id &&
|
|
1753
|
+
), y === o.id && C(null);
|
|
1730
1754
|
},
|
|
1731
1755
|
style: { background: "none", border: "none", cursor: "pointer", color: "#B91C1C", padding: "2px", flexShrink: 0 }
|
|
1732
1756
|
},
|
|
1733
|
-
/* @__PURE__ */ t.createElement(
|
|
1757
|
+
/* @__PURE__ */ t.createElement(m.Delete, null)
|
|
1734
1758
|
)
|
|
1735
1759
|
)
|
|
1736
1760
|
))), /* @__PURE__ */ t.createElement(
|
|
1737
|
-
|
|
1761
|
+
ne,
|
|
1738
1762
|
{
|
|
1739
1763
|
theme: r,
|
|
1740
1764
|
sectionId: "report-levels",
|
|
1741
1765
|
title: "Report Levels",
|
|
1742
1766
|
description: "Default hierarchy applied to every row unless a row override changes its children.",
|
|
1743
|
-
icon: /* @__PURE__ */ t.createElement(
|
|
1744
|
-
action:
|
|
1767
|
+
icon: /* @__PURE__ */ t.createElement(m.ReportLevel, null),
|
|
1768
|
+
action: g && /* @__PURE__ */ t.createElement("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap", justifyContent: "flex-end" } }, typeof u == "function" && /* @__PURE__ */ t.createElement(
|
|
1745
1769
|
"button",
|
|
1746
1770
|
{
|
|
1747
1771
|
type: "button",
|
|
1748
1772
|
onClick: () => u((o) => o === !1),
|
|
1749
|
-
style: j(r,
|
|
1750
|
-
title:
|
|
1773
|
+
style: j(r, v !== !1, !1),
|
|
1774
|
+
title: v !== !1 ? "Hide row gear column" : "Show row gear column"
|
|
1751
1775
|
},
|
|
1752
|
-
/* @__PURE__ */ t.createElement(
|
|
1776
|
+
/* @__PURE__ */ t.createElement(m.Settings, null),
|
|
1753
1777
|
" ",
|
|
1754
|
-
|
|
1778
|
+
v !== !1 ? "Hide row gears" : "Show row gears"
|
|
1755
1779
|
), /* @__PURE__ */ t.createElement(
|
|
1756
1780
|
"button",
|
|
1757
1781
|
{
|
|
1758
1782
|
type: "button",
|
|
1759
|
-
onClick:
|
|
1783
|
+
onClick: bt,
|
|
1760
1784
|
disabled: !I.length || !I[I.length - 1].node.field,
|
|
1761
1785
|
style: {
|
|
1762
1786
|
...j(r, !1, !1),
|
|
@@ -1764,26 +1788,26 @@ function Ut({
|
|
|
1764
1788
|
pointerEvents: !I.length || !I[I.length - 1].node.field ? "none" : "auto"
|
|
1765
1789
|
}
|
|
1766
1790
|
},
|
|
1767
|
-
/* @__PURE__ */ t.createElement(
|
|
1791
|
+
/* @__PURE__ */ t.createElement(m.Add, null),
|
|
1768
1792
|
" Add next level"
|
|
1769
1793
|
))
|
|
1770
1794
|
},
|
|
1771
|
-
|
|
1795
|
+
g ? /* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, I.map(
|
|
1772
1796
|
/** @param {any} [item] @returns {any} */
|
|
1773
1797
|
(o) => /* @__PURE__ */ t.createElement(
|
|
1774
|
-
|
|
1798
|
+
st,
|
|
1775
1799
|
{
|
|
1776
1800
|
key: `default-level:${o.index}:${o.node._id}`,
|
|
1777
1801
|
item: o,
|
|
1778
1802
|
selected: !d && Z(x) === Z({ type: "node", path: o.path }),
|
|
1779
1803
|
theme: r,
|
|
1780
|
-
sortByOptions:
|
|
1781
|
-
getFieldLabel:
|
|
1782
|
-
onSelect: () =>
|
|
1804
|
+
sortByOptions: be,
|
|
1805
|
+
getFieldLabel: ee,
|
|
1806
|
+
onSelect: () => xt(o.path),
|
|
1783
1807
|
onDragStart: (
|
|
1784
1808
|
/** @param {any} [event] @returns {any} */
|
|
1785
1809
|
((p) => {
|
|
1786
|
-
|
|
1810
|
+
Te(o.index), p.dataTransfer.effectAllowed = "move";
|
|
1787
1811
|
})
|
|
1788
1812
|
),
|
|
1789
1813
|
onDragOver: (
|
|
@@ -1793,41 +1817,43 @@ function Ut({
|
|
|
1793
1817
|
onDrop: (
|
|
1794
1818
|
/** @param {any} [event] @returns {any} */
|
|
1795
1819
|
((p) => {
|
|
1796
|
-
p.preventDefault(), gt(
|
|
1820
|
+
p.preventDefault(), gt(ct, o.index);
|
|
1797
1821
|
})
|
|
1798
1822
|
)
|
|
1799
1823
|
}
|
|
1800
1824
|
)
|
|
1801
|
-
)) : /* @__PURE__ */ t.createElement("div", { style:
|
|
1802
|
-
|
|
1825
|
+
)) : /* @__PURE__ */ t.createElement("div", { style: ue(r) }, /* @__PURE__ */ t.createElement("div", { style: { fontSize: "14px", fontWeight: 800, color: r.text } }, "Level 1"), /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { style: L(r) }, "Break Down By"), /* @__PURE__ */ t.createElement(
|
|
1826
|
+
U,
|
|
1803
1827
|
{
|
|
1828
|
+
size: "sm",
|
|
1829
|
+
"aria-label": "Level 1 field",
|
|
1804
1830
|
value: "",
|
|
1805
1831
|
onChange: (o) => {
|
|
1806
|
-
o.target.value &&
|
|
1832
|
+
o.target.value && dt(o.target.value);
|
|
1807
1833
|
},
|
|
1808
|
-
style: q(r)
|
|
1834
|
+
style: { ...q(r), width: "100%" }
|
|
1809
1835
|
},
|
|
1810
1836
|
/* @__PURE__ */ t.createElement("option", { value: "" }, "Select field..."),
|
|
1811
|
-
|
|
1837
|
+
O.map(
|
|
1812
1838
|
/** @param {any} [field] @returns {any} */
|
|
1813
|
-
(o) => /* @__PURE__ */ t.createElement("option", { key: o, value: o },
|
|
1839
|
+
(o) => /* @__PURE__ */ t.createElement("option", { key: o, value: o }, ee(o))
|
|
1814
1840
|
)
|
|
1815
1841
|
)))
|
|
1816
|
-
),
|
|
1817
|
-
|
|
1842
|
+
), g && /* @__PURE__ */ t.createElement(
|
|
1843
|
+
ne,
|
|
1818
1844
|
{
|
|
1819
1845
|
theme: r,
|
|
1820
1846
|
sectionId: "report-outline",
|
|
1821
1847
|
title: "Report Outline",
|
|
1822
1848
|
description: "Default levels plus every row override, shown as a separate map of Default children.",
|
|
1823
|
-
icon: /* @__PURE__ */ t.createElement(
|
|
1849
|
+
icon: /* @__PURE__ */ t.createElement(m.Report, null)
|
|
1824
1850
|
},
|
|
1825
|
-
/* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } },
|
|
1851
|
+
/* @__PURE__ */ t.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, te.map(
|
|
1826
1852
|
/** @param {any} [item] @returns {any} */
|
|
1827
1853
|
(o) => o.kind === "branch" ? /* @__PURE__ */ t.createElement(
|
|
1828
|
-
|
|
1854
|
+
Gt,
|
|
1829
1855
|
{
|
|
1830
|
-
key: `outline-branch:${
|
|
1856
|
+
key: `outline-branch:${re(o.nodePath)}:${o.branchIndex}:${o.branch._id}`,
|
|
1831
1857
|
item: o,
|
|
1832
1858
|
selected: !d && Z(x) === Z({
|
|
1833
1859
|
type: "branch",
|
|
@@ -1835,116 +1861,116 @@ function Ut({
|
|
|
1835
1861
|
branchIndex: o.branchIndex
|
|
1836
1862
|
}),
|
|
1837
1863
|
theme: r,
|
|
1838
|
-
onSelect: () =>
|
|
1864
|
+
onSelect: () => qe(o)
|
|
1839
1865
|
}
|
|
1840
1866
|
) : /* @__PURE__ */ t.createElement(
|
|
1841
1867
|
Jt,
|
|
1842
1868
|
{
|
|
1843
|
-
key: `outline-node:${
|
|
1869
|
+
key: `outline-node:${re(o.nodePath)}:${o.node._id}`,
|
|
1844
1870
|
item: o,
|
|
1845
1871
|
selected: !d && Z(x) === Z({ type: "node", path: o.nodePath }),
|
|
1846
1872
|
theme: r,
|
|
1847
|
-
sortByOptions:
|
|
1848
|
-
getFieldLabel:
|
|
1849
|
-
onSelect: () =>
|
|
1873
|
+
sortByOptions: be,
|
|
1874
|
+
getFieldLabel: ee,
|
|
1875
|
+
onSelect: () => qe(o)
|
|
1850
1876
|
}
|
|
1851
1877
|
)
|
|
1852
1878
|
))
|
|
1853
|
-
),
|
|
1854
|
-
|
|
1879
|
+
), g && d && /* @__PURE__ */ t.createElement("div", { ref: xe }, /* @__PURE__ */ t.createElement(
|
|
1880
|
+
ne,
|
|
1855
1881
|
{
|
|
1856
1882
|
theme: r,
|
|
1857
1883
|
sectionId: "selected-row",
|
|
1858
1884
|
title: "Selected Row",
|
|
1859
1885
|
description: "Configure Custom children for the row gear you clicked.",
|
|
1860
|
-
icon: /* @__PURE__ */ t.createElement(
|
|
1886
|
+
icon: /* @__PURE__ */ t.createElement(m.Settings, null)
|
|
1861
1887
|
},
|
|
1862
1888
|
/* @__PURE__ */ t.createElement(
|
|
1863
|
-
|
|
1889
|
+
Zt,
|
|
1864
1890
|
{
|
|
1865
1891
|
draft: d,
|
|
1866
|
-
allFields:
|
|
1867
|
-
getFieldLabel:
|
|
1868
|
-
sortByOptions:
|
|
1892
|
+
allFields: O,
|
|
1893
|
+
getFieldLabel: ee,
|
|
1894
|
+
sortByOptions: be,
|
|
1869
1895
|
theme: r,
|
|
1870
|
-
onChange:
|
|
1871
|
-
onApply:
|
|
1872
|
-
onCancel:
|
|
1896
|
+
onChange: A,
|
|
1897
|
+
onApply: mt,
|
|
1898
|
+
onCancel: ht
|
|
1873
1899
|
}
|
|
1874
1900
|
)
|
|
1875
|
-
)),
|
|
1876
|
-
|
|
1901
|
+
)), g && !d && x && le && le.type === "node" && /* @__PURE__ */ t.createElement("div", { ref: xe }, /* @__PURE__ */ t.createElement(
|
|
1902
|
+
ne,
|
|
1877
1903
|
{
|
|
1878
1904
|
theme: r,
|
|
1879
1905
|
sectionId: "selected-level",
|
|
1880
1906
|
title: "Selected Level",
|
|
1881
1907
|
description: "Edit the selected default level or override child level.",
|
|
1882
|
-
icon: /* @__PURE__ */ t.createElement(
|
|
1908
|
+
icon: /* @__PURE__ */ t.createElement(m.Edit, null)
|
|
1883
1909
|
},
|
|
1884
1910
|
/* @__PURE__ */ t.createElement(
|
|
1885
|
-
|
|
1911
|
+
Yt,
|
|
1886
1912
|
{
|
|
1887
1913
|
item: I.find(
|
|
1888
1914
|
/** @param {any} [item] @returns {any} */
|
|
1889
|
-
(o) =>
|
|
1890
|
-
) || (
|
|
1891
|
-
node:
|
|
1892
|
-
allFields:
|
|
1893
|
-
getFieldLabel:
|
|
1894
|
-
sortByOptions:
|
|
1915
|
+
(o) => Ae(o.path, x.path)
|
|
1916
|
+
) || (ce ? { ...ce, path: ce.nodePath } : { path: x.path, levelNumber: x.path.length + 1 }),
|
|
1917
|
+
node: le.node,
|
|
1918
|
+
allFields: O,
|
|
1919
|
+
getFieldLabel: ee,
|
|
1920
|
+
sortByOptions: be,
|
|
1895
1921
|
theme: r,
|
|
1896
1922
|
onUpdate: (
|
|
1897
1923
|
/** @param {any} [nextNode] @returns {any} */
|
|
1898
|
-
((o) =>
|
|
1924
|
+
((o) => He(x.path, o))
|
|
1899
1925
|
),
|
|
1900
|
-
onApply:
|
|
1901
|
-
onRemove: () =>
|
|
1902
|
-
onEditFilter: () =>
|
|
1926
|
+
onApply: vt,
|
|
1927
|
+
onRemove: () => ft(x.path),
|
|
1928
|
+
onEditFilter: () => ye(x.path),
|
|
1903
1929
|
titleLabel: "Title"
|
|
1904
1930
|
}
|
|
1905
1931
|
)
|
|
1906
|
-
)),
|
|
1907
|
-
|
|
1932
|
+
)), g && !d && x && le && le.type === "branch" && ce && /* @__PURE__ */ t.createElement("div", { ref: xe }, /* @__PURE__ */ t.createElement(
|
|
1933
|
+
ne,
|
|
1908
1934
|
{
|
|
1909
1935
|
theme: r,
|
|
1910
1936
|
sectionId: "row-override",
|
|
1911
1937
|
title: "Row Override",
|
|
1912
1938
|
description: "Override applies to this row only. Configure its rule and Custom children.",
|
|
1913
|
-
icon: /* @__PURE__ */ t.createElement(
|
|
1939
|
+
icon: /* @__PURE__ */ t.createElement(m.Settings, null)
|
|
1914
1940
|
},
|
|
1915
1941
|
/* @__PURE__ */ t.createElement(
|
|
1916
|
-
|
|
1942
|
+
Xt,
|
|
1917
1943
|
{
|
|
1918
|
-
item:
|
|
1919
|
-
branch:
|
|
1944
|
+
item: ce,
|
|
1945
|
+
branch: le.branch,
|
|
1920
1946
|
theme: r,
|
|
1921
1947
|
onUpdate: (
|
|
1922
1948
|
/** @param {any} [nextBranch] @returns {any} */
|
|
1923
|
-
((o) =>
|
|
1949
|
+
((o) => Ve(x.nodePath, x.branchIndex, o))
|
|
1924
1950
|
),
|
|
1925
|
-
onEditCondition: () =>
|
|
1926
|
-
onOpenCustomChildren: () =>
|
|
1927
|
-
onRemoveCustomChildren: () =>
|
|
1928
|
-
onRemove: () =>
|
|
1951
|
+
onEditCondition: () => fe({ nodePath: x.nodePath, branchIndex: x.branchIndex }),
|
|
1952
|
+
onOpenCustomChildren: () => pt(x.nodePath, x.branchIndex, !!le.branch.child),
|
|
1953
|
+
onRemoveCustomChildren: () => ut(x.nodePath, x.branchIndex),
|
|
1954
|
+
onRemove: () => yt(x.nodePath, x.branchIndex)
|
|
1929
1955
|
}
|
|
1930
1956
|
)
|
|
1931
1957
|
)), /* @__PURE__ */ t.createElement(
|
|
1932
|
-
|
|
1958
|
+
ne,
|
|
1933
1959
|
{
|
|
1934
1960
|
theme: r,
|
|
1935
1961
|
sectionId: "save-report",
|
|
1936
1962
|
title: "Save Report",
|
|
1937
1963
|
description: "Store the current report levels and row overrides.",
|
|
1938
|
-
icon: /* @__PURE__ */ t.createElement(
|
|
1964
|
+
icon: /* @__PURE__ */ t.createElement(m.Save, null)
|
|
1939
1965
|
},
|
|
1940
|
-
/* @__PURE__ */ t.createElement(
|
|
1966
|
+
/* @__PURE__ */ t.createElement(qt, { validation: J, theme: r }),
|
|
1941
1967
|
/* @__PURE__ */ t.createElement("div", { style: { display: "flex", gap: "8px" } }, /* @__PURE__ */ t.createElement(
|
|
1942
1968
|
"input",
|
|
1943
1969
|
{
|
|
1944
1970
|
value: D,
|
|
1945
1971
|
onChange: (o) => R(o.target.value),
|
|
1946
1972
|
onKeyDown: (o) => {
|
|
1947
|
-
o.key === "Enter" &&
|
|
1973
|
+
o.key === "Enter" && Ke();
|
|
1948
1974
|
},
|
|
1949
1975
|
placeholder: "Report name...",
|
|
1950
1976
|
style: { ...q(r), flex: 1 }
|
|
@@ -1953,8 +1979,8 @@ function Ut({
|
|
|
1953
1979
|
"button",
|
|
1954
1980
|
{
|
|
1955
1981
|
type: "button",
|
|
1956
|
-
onClick:
|
|
1957
|
-
disabled: !
|
|
1982
|
+
onClick: Ke,
|
|
1983
|
+
disabled: !g || !g.field || !J.valid,
|
|
1958
1984
|
style: {
|
|
1959
1985
|
display: "inline-flex",
|
|
1960
1986
|
alignItems: "center",
|
|
@@ -1967,55 +1993,55 @@ function Ut({
|
|
|
1967
1993
|
fontWeight: 800,
|
|
1968
1994
|
color: "#fff",
|
|
1969
1995
|
cursor: "pointer",
|
|
1970
|
-
opacity: !
|
|
1996
|
+
opacity: !g || !g.field || !J.valid ? 0.5 : 1
|
|
1971
1997
|
}
|
|
1972
1998
|
},
|
|
1973
|
-
/* @__PURE__ */ t.createElement(
|
|
1999
|
+
/* @__PURE__ */ t.createElement(m.Save, null),
|
|
1974
2000
|
" Save"
|
|
1975
2001
|
))
|
|
1976
|
-
),
|
|
1977
|
-
|
|
2002
|
+
), K && $e && /* @__PURE__ */ t.createElement(
|
|
2003
|
+
Pe,
|
|
1978
2004
|
{
|
|
1979
|
-
condition:
|
|
1980
|
-
allFields:
|
|
1981
|
-
getFieldLabel:
|
|
2005
|
+
condition: $e.condition,
|
|
2006
|
+
allFields: O,
|
|
2007
|
+
getFieldLabel: ee,
|
|
1982
2008
|
theme: r,
|
|
1983
2009
|
onSave: (
|
|
1984
2010
|
/** @param {any} [nextCondition] @returns {any} */
|
|
1985
2011
|
((o) => {
|
|
1986
|
-
|
|
1987
|
-
|
|
2012
|
+
Ve(K.nodePath, K.branchIndex, {
|
|
2013
|
+
...$e,
|
|
1988
2014
|
condition: o
|
|
1989
2015
|
});
|
|
1990
2016
|
})
|
|
1991
2017
|
),
|
|
1992
|
-
onClose: () =>
|
|
2018
|
+
onClose: () => fe(null)
|
|
1993
2019
|
}
|
|
1994
|
-
),
|
|
1995
|
-
const o =
|
|
2020
|
+
), ie && (() => {
|
|
2021
|
+
const o = ae(g, ie);
|
|
1996
2022
|
return o ? /* @__PURE__ */ t.createElement(
|
|
1997
|
-
|
|
2023
|
+
Pe,
|
|
1998
2024
|
{
|
|
1999
2025
|
title: "Edit level filter",
|
|
2000
2026
|
description: "Rows that don't match are grouped into 'Others' to keep totals intact. Applies to this level and all its children.",
|
|
2001
|
-
condition: o.filters ||
|
|
2002
|
-
allFields:
|
|
2003
|
-
getFieldLabel:
|
|
2027
|
+
condition: o.filters || Le(),
|
|
2028
|
+
allFields: O,
|
|
2029
|
+
getFieldLabel: ee,
|
|
2004
2030
|
theme: r,
|
|
2005
2031
|
onSave: (
|
|
2006
2032
|
/** @param {any} [nextCondition] @returns {any} */
|
|
2007
2033
|
((p) => {
|
|
2008
|
-
|
|
2034
|
+
He(ie, {
|
|
2009
2035
|
...o,
|
|
2010
2036
|
filters: p.clauses.length > 0 ? p : null
|
|
2011
2037
|
});
|
|
2012
2038
|
})
|
|
2013
2039
|
),
|
|
2014
|
-
onClose: () =>
|
|
2040
|
+
onClose: () => ye(null)
|
|
2015
2041
|
}
|
|
2016
2042
|
) : null;
|
|
2017
2043
|
})());
|
|
2018
2044
|
}
|
|
2019
2045
|
export {
|
|
2020
|
-
|
|
2046
|
+
el as ReportEditor
|
|
2021
2047
|
};
|