@nivaro/react 0.3.50 → 0.3.52
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/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +13 -3
- package/dist/shared/components/ItemEditForm.js +4801 -4666
- package/dist/shared/components/QueryTable.js +337 -324
- package/dist/shared/components/ReportView.js +105 -99
- package/dist/shared/components/alerts/AlertManagerView.js +327 -301
- package/dist/shared/components/item-edit/CatalogPickerField.js +1149 -1111
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +58 -53
- package/dist/shared/components/item-edit/FieldRenderer.js +227 -223
- package/dist/shared/components/item-edit/FieldRow.js +287 -265
- package/dist/shared/components/item-edit/FilePickerField.js +315 -307
- package/dist/shared/components/item-edit/InlineTableField.js +491 -466
- package/dist/shared/components/item-edit/RecordHeaderActions.js +76 -75
- package/dist/shared/components/item-edit/RecordLiveSync.js +93 -91
- package/dist/shared/components/item-edit/RelationCombobox.js +62 -60
- package/dist/shared/components/item-edit/SummaryPanel.js +287 -277
- package/dist/shared/components/item-edit/UserChip.js +233 -200
- package/dist/shared/components/item-edit/header-midair.js +51 -0
- package/dist/shared/components/item-edit/line-midair.js +76 -70
- package/dist/shared/components/panels/CommentPanel.js +290 -284
- package/dist/shared/components/panels/ItemLockBanner.js +30 -30
- package/dist/shared/components/panels/PipelinePanel.js +956 -901
- package/dist/shared/components/panels/TaskPanel.js +71 -61
- package/dist/shared/components/panels/TransitionRequirementsDialog.js +569 -439
- package/dist/shared/components/panels/requirement-side-effects.js +40 -0
- package/dist/shared/components/queue/QueueWorklist.js +141 -130
- package/dist/shared/lib/draft-store.js +48 -34
- package/dist/shared/lib/query-stats.js +60 -60
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Search as dt, Download as it, ArrowUp as ut, ArrowDown as
|
|
3
|
-
import { useState as
|
|
1
|
+
import { jsx as o, jsxs as p, Fragment as Pe } from "react/jsx-runtime";
|
|
2
|
+
import { Search as dt, Download as it, ArrowUp as ut, ArrowDown as mt, ChevronsDownUp as bt, ChevronsUpDown as ct } from "lucide-react";
|
|
3
|
+
import { useState as W, useEffect as pt, useMemo as ht } from "react";
|
|
4
4
|
import { evaluateNumeric as xt } from "../lib/expression.js";
|
|
5
|
-
function ft(
|
|
6
|
-
return `color-mix(in srgb, ${
|
|
5
|
+
function ft(s) {
|
|
6
|
+
return `color-mix(in srgb, ${s} 55%, white)`;
|
|
7
7
|
}
|
|
8
8
|
const Se = {
|
|
9
9
|
// Brand ink for TEXT: the raw brand (cyan on white ≈ 1.6:1) is a fill
|
|
@@ -19,12 +19,12 @@ const Se = {
|
|
|
19
19
|
warning: ["var(--nvr-role-warning, #b45309)", "var(--nvr-role-warning-dark, #d4936a)"],
|
|
20
20
|
info: ["var(--nvr-role-info, #4f46e5)", "var(--nvr-role-info-dark, #8fa6c9)"]
|
|
21
21
|
};
|
|
22
|
-
function Ce(
|
|
23
|
-
var
|
|
24
|
-
const m = Se[
|
|
25
|
-
return m ? [m[0], t ? ((
|
|
22
|
+
function Ce(s, t) {
|
|
23
|
+
var c, u;
|
|
24
|
+
const m = Se[s.trim().toLowerCase()];
|
|
25
|
+
return m ? [m[0], t ? ((c = Se[t]) == null ? void 0 : c[1]) ?? t : m[1]] : [s, t ? ((u = Se[t]) == null ? void 0 : u[1]) ?? t : ft(s)];
|
|
26
26
|
}
|
|
27
|
-
const kt = /^[-+−]?\$?0(?:\.0+)?%?$/, qe = (
|
|
27
|
+
const kt = /^[-+−]?\$?0(?:\.0+)?%?$/, qe = (s) => s === "—" ? /* @__PURE__ */ o("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : kt.test(s) ? /* @__PURE__ */ o("span", { className: "text-slate-500 dark:text-slate-400", children: s }) : s, Ge = [
|
|
28
28
|
"jan",
|
|
29
29
|
"feb",
|
|
30
30
|
"mar",
|
|
@@ -37,7 +37,7 @@ const kt = /^[-+−]?\$?0(?:\.0+)?%?$/, qe = (o) => o === "—" ? /* @__PURE__ *
|
|
|
37
37
|
"oct",
|
|
38
38
|
"nov",
|
|
39
39
|
"dec"
|
|
40
|
-
],
|
|
40
|
+
], yt = [
|
|
41
41
|
"Jan",
|
|
42
42
|
"Feb",
|
|
43
43
|
"Mar",
|
|
@@ -50,79 +50,100 @@ const kt = /^[-+−]?\$?0(?:\.0+)?%?$/, qe = (o) => o === "—" ? /* @__PURE__ *
|
|
|
50
50
|
"Oct",
|
|
51
51
|
"Nov",
|
|
52
52
|
"Dec"
|
|
53
|
-
];
|
|
54
|
-
function
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
], vt = "Undated";
|
|
54
|
+
function Nt(s, t, m, c = "month") {
|
|
55
|
+
const u = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Set();
|
|
56
|
+
let y = !1;
|
|
57
|
+
for (const h of s) {
|
|
58
|
+
const A = t.key_fields.map((O) => String(h[O] ?? "")).join("|");
|
|
59
|
+
let w = u.get(A);
|
|
60
|
+
if (!w) {
|
|
61
|
+
w = {};
|
|
62
|
+
for (const O of t.key_fields) w[O] = h[O];
|
|
63
|
+
u.set(A, w);
|
|
63
64
|
}
|
|
64
|
-
const
|
|
65
|
-
if (!
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
const z = String(h[t.date_field] ?? ""), I = /^(\d{4})-(\d{2})/.exec(z);
|
|
66
|
+
if (!I) {
|
|
67
|
+
if (z !== vt) continue;
|
|
68
|
+
const O = Number(h[t.value_field]) || 0;
|
|
69
|
+
y = !0, w.undated = (Number(w.undated) || 0) + O, t.total !== !1 && (w.total = (Number(w.total) || 0) + O);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
const V = Number(h[t.value_field]) || 0;
|
|
73
|
+
if (Number(I[1]) === m) {
|
|
74
|
+
const O = Number(I[2]) - 1, k = c === "quarter" ? `q${Math.floor(O / 3) + 1}` : Ge[O];
|
|
75
|
+
k && (w[k] = (Number(w[k]) || 0) + V);
|
|
70
76
|
} else
|
|
71
|
-
|
|
72
|
-
t.total !== !1 && (
|
|
77
|
+
g.add(I[1]), w[`y${I[1]}`] = (Number(w[`y${I[1]}`]) || 0) + V;
|
|
78
|
+
t.total !== !1 && (w.total = (Number(w.total) || 0) + V);
|
|
73
79
|
}
|
|
74
|
-
const
|
|
75
|
-
field: `q${
|
|
76
|
-
label: `Q${
|
|
80
|
+
const v = [...g].filter((h) => Number(h) < m).sort(), L = [...g].filter((h) => Number(h) > m).sort(), se = c === "quarter" ? [1, 2, 3, 4].map((h) => ({
|
|
81
|
+
field: `q${h}`,
|
|
82
|
+
label: `Q${h}`,
|
|
77
83
|
format: "currency",
|
|
78
84
|
sum: !0
|
|
79
|
-
})) :
|
|
80
|
-
field:
|
|
81
|
-
label:
|
|
85
|
+
})) : Ge.map((h, A) => ({
|
|
86
|
+
field: h,
|
|
87
|
+
label: yt[A],
|
|
82
88
|
format: "currency",
|
|
83
89
|
sum: !0
|
|
84
|
-
})),
|
|
85
|
-
...
|
|
86
|
-
field: `y${
|
|
87
|
-
label:
|
|
90
|
+
})), K = t.color ? { color: t.color, color_negative: t.color_negative } : {}, q = [
|
|
91
|
+
...v.map((h) => ({
|
|
92
|
+
field: `y${h}`,
|
|
93
|
+
label: h,
|
|
88
94
|
format: "currency",
|
|
89
95
|
sum: !0,
|
|
90
|
-
...
|
|
96
|
+
...K
|
|
91
97
|
})),
|
|
92
|
-
...
|
|
93
|
-
...
|
|
94
|
-
field: `y${
|
|
95
|
-
label:
|
|
98
|
+
...se.map((h) => ({ ...h, ...K })),
|
|
99
|
+
...L.map((h) => ({
|
|
100
|
+
field: `y${h}`,
|
|
101
|
+
label: h,
|
|
96
102
|
format: "currency",
|
|
97
103
|
sum: !0,
|
|
98
|
-
...
|
|
104
|
+
...K
|
|
99
105
|
})),
|
|
106
|
+
...y ? [{ field: "undated", label: "Undated", format: "currency", sum: !0, ...K }] : [],
|
|
100
107
|
...t.total !== !1 ? [
|
|
101
108
|
{
|
|
102
109
|
field: "total",
|
|
103
110
|
label: "Total",
|
|
104
111
|
format: "currency",
|
|
105
112
|
sum: !0,
|
|
106
|
-
...t.total_color ? { color: t.total_color, color_negative: t.color_negative } :
|
|
113
|
+
...t.total_color ? { color: t.total_color, color_negative: t.color_negative } : K
|
|
107
114
|
}
|
|
108
115
|
] : []
|
|
109
116
|
];
|
|
110
|
-
return { rows: [...
|
|
117
|
+
return { rows: [...u.values()], columns: q };
|
|
118
|
+
}
|
|
119
|
+
const gt = (s) => s != null && s !== "" && Number.isFinite(Number(s));
|
|
120
|
+
function wt(s, t) {
|
|
121
|
+
const m = {}, c = (u, g) => {
|
|
122
|
+
let y = !1, v = 0;
|
|
123
|
+
for (const L of s)
|
|
124
|
+
gt(L[u]) && (y = !0, v += Number(L[u]));
|
|
125
|
+
m[u] = y || !g || m[u] === 0 ? v : null;
|
|
126
|
+
};
|
|
127
|
+
for (const u of t) {
|
|
128
|
+
const g = u.null_when_empty ?? u.format === "currency";
|
|
129
|
+
u.field && c(u.field, g), u.stack && c(u.stack, g);
|
|
130
|
+
}
|
|
131
|
+
return m;
|
|
111
132
|
}
|
|
112
|
-
function
|
|
113
|
-
return xt(
|
|
133
|
+
function j(s, t) {
|
|
134
|
+
return xt(s, t);
|
|
114
135
|
}
|
|
115
|
-
function
|
|
116
|
-
if (
|
|
117
|
-
const m = Number(
|
|
118
|
-
if (!Number.isFinite(m)) return String(
|
|
136
|
+
function ae(s, t) {
|
|
137
|
+
if (s == null || s === "") return "—";
|
|
138
|
+
const m = Number(s);
|
|
139
|
+
if (!Number.isFinite(m)) return String(s);
|
|
119
140
|
switch (t) {
|
|
120
141
|
case "currency": {
|
|
121
|
-
const
|
|
142
|
+
const c = Number.isInteger(m);
|
|
122
143
|
return m.toLocaleString("en-US", {
|
|
123
144
|
style: "currency",
|
|
124
145
|
currency: "USD",
|
|
125
|
-
minimumFractionDigits:
|
|
146
|
+
minimumFractionDigits: c ? 0 : 2,
|
|
126
147
|
maximumFractionDigits: 2
|
|
127
148
|
});
|
|
128
149
|
}
|
|
@@ -131,53 +152,53 @@ function re(o, t) {
|
|
|
131
152
|
case "number":
|
|
132
153
|
return m.toLocaleString("en-US", { maximumFractionDigits: 2 });
|
|
133
154
|
default:
|
|
134
|
-
return String(
|
|
155
|
+
return String(s);
|
|
135
156
|
}
|
|
136
157
|
}
|
|
137
|
-
function
|
|
138
|
-
return
|
|
158
|
+
function le(s) {
|
|
159
|
+
return s.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase());
|
|
139
160
|
}
|
|
140
|
-
function
|
|
141
|
-
rows:
|
|
161
|
+
function Lt({
|
|
162
|
+
rows: s,
|
|
142
163
|
config: t,
|
|
143
164
|
onRowClick: m,
|
|
144
|
-
pivotYear:
|
|
145
|
-
rowActions:
|
|
146
|
-
emptyLabel:
|
|
165
|
+
pivotYear: c,
|
|
166
|
+
rowActions: u,
|
|
167
|
+
emptyLabel: g,
|
|
147
168
|
emptyText: y
|
|
148
169
|
}) {
|
|
149
|
-
var
|
|
150
|
-
const [
|
|
170
|
+
var De, Re, ze, Ie, He, We, Ke, Ae, Je, je;
|
|
171
|
+
const [v, L] = W(() => /* @__PURE__ */ new Set()), [se, K] = W("month"), [q, h] = W(null), [A, w] = W(""), [z, I] = W(!!((De = t == null ? void 0 : t.hide_empty) != null && De.default_on)), [V, O] = W(
|
|
151
172
|
() => new Set(((t == null ? void 0 : t.toggles) ?? []).filter((e) => e.default_on === !1).map((e) => e.label))
|
|
152
|
-
), [
|
|
173
|
+
), [k, Ye] = W(null), [oe, Xe] = W({
|
|
153
174
|
overflows: !1,
|
|
154
175
|
canScrollRight: !1,
|
|
155
176
|
cueInset: { right: 0, bottom: 0 }
|
|
156
177
|
});
|
|
157
|
-
if (
|
|
158
|
-
if (!
|
|
178
|
+
if (pt(() => {
|
|
179
|
+
if (!k) return;
|
|
159
180
|
const e = () => {
|
|
160
|
-
const a =
|
|
181
|
+
const a = k.scrollWidth > k.clientWidth + 1, n = k.scrollWidth > k.clientWidth + k.scrollLeft + 1, l = k.querySelector("[data-qt-actions-head]"), d = t != null && t.sticky && l ? l.offsetWidth : 0, b = k.offsetWidth - k.clientWidth + d, F = k.offsetHeight - k.clientHeight;
|
|
161
182
|
Xe(
|
|
162
|
-
(D) => D.overflows === a && D.canScrollRight === n && D.cueInset.right === b && D.cueInset.bottom ===
|
|
183
|
+
(D) => D.overflows === a && D.canScrollRight === n && D.cueInset.right === b && D.cueInset.bottom === F ? D : { overflows: a, canScrollRight: n, cueInset: { right: b, bottom: F } }
|
|
163
184
|
);
|
|
164
185
|
};
|
|
165
186
|
e();
|
|
166
187
|
const r = new ResizeObserver(e);
|
|
167
|
-
return r.observe(
|
|
168
|
-
r.disconnect(),
|
|
188
|
+
return r.observe(k), k.firstElementChild && r.observe(k.firstElementChild), k.addEventListener("scroll", e, { passive: !0 }), () => {
|
|
189
|
+
r.disconnect(), k.removeEventListener("scroll", e);
|
|
169
190
|
};
|
|
170
|
-
}, [
|
|
171
|
-
return /* @__PURE__ */
|
|
191
|
+
}, [k, t == null ? void 0 : t.sticky]), !s || s.length === 0)
|
|
192
|
+
return /* @__PURE__ */ o("p", { className: "px-1 py-2 text-[12px] italic text-slate-400", children: y || (g ? `No ${g.toLowerCase()} yet` : "No data") });
|
|
172
193
|
let xe = null;
|
|
173
194
|
if (t != null && t.pivot) {
|
|
174
|
-
const e =
|
|
175
|
-
|
|
195
|
+
const e = c ?? t.pivot.year ?? (/* @__PURE__ */ new Date()).getFullYear(), r = Nt(s, t.pivot, e, se);
|
|
196
|
+
s = r.rows, xe = r.columns;
|
|
176
197
|
}
|
|
177
|
-
let
|
|
198
|
+
let S = s;
|
|
178
199
|
if (t != null && t.group_by) {
|
|
179
200
|
const e = t.group_by, r = /* @__PURE__ */ new Map();
|
|
180
|
-
for (const a of
|
|
201
|
+
for (const a of s) {
|
|
181
202
|
const n = String(a[e] ?? "—"), l = r.get(n);
|
|
182
203
|
if (!l) {
|
|
183
204
|
r.set(n, { ...a, [e]: n });
|
|
@@ -185,34 +206,34 @@ function qt({
|
|
|
185
206
|
}
|
|
186
207
|
for (const [d, b] of Object.entries(a)) {
|
|
187
208
|
if (d === e) continue;
|
|
188
|
-
const
|
|
189
|
-
Number.isFinite(
|
|
209
|
+
const F = Number(b);
|
|
210
|
+
Number.isFinite(F) && typeof b != "boolean" && (l[d] = (Number(l[d]) || 0) + F);
|
|
190
211
|
}
|
|
191
212
|
}
|
|
192
|
-
|
|
213
|
+
S = [...r.entries()].sort(([a], [n]) => a.localeCompare(n)).map(([, a]) => a);
|
|
193
214
|
}
|
|
194
215
|
const Fe = xe ? [
|
|
195
216
|
// Key columns first (configured, else the pivot's key fields), then
|
|
196
217
|
// the generated year/month/total columns.
|
|
197
|
-
...(
|
|
218
|
+
...(Re = t == null ? void 0 : t.columns) != null && Re.length ? t.columns : (((ze = t == null ? void 0 : t.pivot) == null ? void 0 : ze.key_fields) ?? []).map((e) => ({ field: e })),
|
|
198
219
|
...xe
|
|
199
|
-
] : t != null && t.columns && t.columns.length > 0 ? t.columns : Object.keys(
|
|
220
|
+
] : t != null && t.columns && t.columns.length > 0 ? t.columns : Object.keys(S[0]).map((e) => ({ field: e })), Y = /* @__PURE__ */ new Set();
|
|
200
221
|
{
|
|
201
222
|
const e = [];
|
|
202
223
|
for (const r of Fe)
|
|
203
224
|
r.field && e.push(r.field), r.stack && e.push(r.stack);
|
|
204
225
|
for (const r of (t == null ? void 0 : t.toggles) ?? []) {
|
|
205
|
-
const a = !
|
|
226
|
+
const a = !V.has(r.label);
|
|
206
227
|
if (r.hide_when_on ? a : !a)
|
|
207
228
|
for (const l of e)
|
|
208
|
-
((Ie = r.fields) != null && Ie.includes(l) || r.suffix && l.endsWith(r.suffix)) &&
|
|
229
|
+
((Ie = r.fields) != null && Ie.includes(l) || r.suffix && l.endsWith(r.suffix)) && Y.add(l);
|
|
209
230
|
}
|
|
210
231
|
}
|
|
211
|
-
const
|
|
232
|
+
const f = Fe.filter((e) => {
|
|
212
233
|
if (!e.field) return !0;
|
|
213
|
-
const r =
|
|
234
|
+
const r = Y.has(e.field), a = e.stack ? Y.has(e.stack) : !0;
|
|
214
235
|
return !(r && a);
|
|
215
|
-
}), fe = (e) => !!e.field && !
|
|
236
|
+
}), fe = (e) => !!e.field && !Y.has(e.field), Ee = (e) => !!e.stack && !Y.has(e.stack), Ze = [
|
|
216
237
|
"Jan",
|
|
217
238
|
"Feb",
|
|
218
239
|
"Mar",
|
|
@@ -225,95 +246,85 @@ function qt({
|
|
|
225
246
|
"Oct",
|
|
226
247
|
"Nov",
|
|
227
248
|
"Dec"
|
|
228
|
-
],
|
|
249
|
+
], ne = (t == null ? void 0 : t.highlight_group) === "$current_month" ? Ze[(/* @__PURE__ */ new Date()).getMonth()] : (t == null ? void 0 : t.highlight_group) ?? null, Le = (e) => !!ne && (e.group === ne || !e.group && e.label === ne), de = (e) => Le(e) ? "bg-[#6366f10f] dark:bg-[#a5b4fc12]" : "", X = (e, r) => {
|
|
229
250
|
if (!e.color) return;
|
|
230
251
|
const a = e.color_negative && typeof r == "number" && r < 0, [n, l] = a ? Ce(e.color_negative) : Ce(e.color, e.color_dark);
|
|
231
252
|
return { "--qtc": n, "--qtcd": l };
|
|
232
|
-
}, ke = (e, r) => e.color ? "text-[color:var(--qtc)] dark:text-[color:var(--qtcd)]" : r,
|
|
253
|
+
}, ke = (e, r) => e.color ? "text-[color:var(--qtc)] dark:text-[color:var(--qtcd)]" : r, ye = (e) => {
|
|
233
254
|
if (!e.stack_color) return;
|
|
234
255
|
const [r, a] = Ce(e.stack_color, e.stack_color_dark);
|
|
235
256
|
return { "--qts": r, "--qtsd": a };
|
|
236
|
-
},
|
|
257
|
+
}, T = (e, r) => r.formula ? j(r.formula, e) : r.field ? e[r.field] : null, et = ht(() => {
|
|
237
258
|
const e = /* @__PURE__ */ new Map();
|
|
238
259
|
for (const r of (t == null ? void 0 : t.columns) ?? [])
|
|
239
260
|
!r.percent_of_total || !r.field || e.set(
|
|
240
261
|
r.field,
|
|
241
|
-
|
|
262
|
+
s.reduce((a, n) => a + (Number(n[r.field]) || 0), 0)
|
|
242
263
|
);
|
|
243
264
|
return e;
|
|
244
|
-
}, [
|
|
245
|
-
const a = Number(
|
|
265
|
+
}, [s, t]), tt = (e, r) => {
|
|
266
|
+
const a = Number(T(e, r)), n = r.progress_max ? r.progress_max.includes("{{") ? j(r.progress_max, e) : Number(e[r.progress_max]) : null, l = n && Number.isFinite(n) && n > 0 && Number.isFinite(a) ? a / n * 100 : null;
|
|
246
267
|
return /* @__PURE__ */ p(
|
|
247
268
|
"div",
|
|
248
269
|
{
|
|
249
270
|
className: "flex min-w-[130px] items-center justify-end gap-1.5",
|
|
250
|
-
title: l === null ? void 0 : `${l.toLocaleString("en-US", { maximumFractionDigits: 1 })}% of ${
|
|
271
|
+
title: l === null ? void 0 : `${l.toLocaleString("en-US", { maximumFractionDigits: 1 })}% of ${ae(n, r.format)}`,
|
|
251
272
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ o("span", { children: ae(T(e, r), r.format) }),
|
|
274
|
+
/* @__PURE__ */ o("div", { className: "h-1 w-10 shrink-0 overflow-hidden rounded-full bg-slate-100 dark:bg-muted", children: /* @__PURE__ */ o(
|
|
254
275
|
"div",
|
|
255
276
|
{
|
|
256
277
|
className: `h-full rounded-full ${l !== null && l > 100 ? "bg-red-500" : "bg-nvr-cyan"}`,
|
|
257
278
|
style: { width: `${l === null ? 0 : Math.min(l, 100)}%` }
|
|
258
279
|
}
|
|
259
280
|
) }),
|
|
260
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ o("span", { className: "w-9 shrink-0 text-right text-[10px] tabular-nums text-slate-400", children: l === null ? "—" : `${l.toLocaleString("en-US", { maximumFractionDigits: 0 })}%` })
|
|
261
282
|
]
|
|
262
283
|
}
|
|
263
284
|
);
|
|
264
|
-
},
|
|
265
|
-
|
|
266
|
-
(e) =>
|
|
285
|
+
}, Z = ((He = t == null ? void 0 : t.hide_empty) == null ? void 0 : He.fields) ?? [];
|
|
286
|
+
Z.length > 0 && z && (S = S.filter(
|
|
287
|
+
(e) => Z.some((r) => {
|
|
267
288
|
const a = e[r];
|
|
268
289
|
return a != null && a !== "" && Number(a) !== 0;
|
|
269
290
|
})
|
|
270
291
|
));
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
(e) =>
|
|
274
|
-
const a =
|
|
275
|
-
return a == null || a === "" ? !1 : String(a).toLowerCase().includes(
|
|
292
|
+
const ie = t != null && t.search ? A.trim().toLowerCase() : "";
|
|
293
|
+
ie && (S = S.filter(
|
|
294
|
+
(e) => f.some((r) => {
|
|
295
|
+
const a = T(e, r);
|
|
296
|
+
return a == null || a === "" ? !1 : String(a).toLowerCase().includes(ie) || ae(a, r.format).toLowerCase().includes(ie);
|
|
276
297
|
})
|
|
277
298
|
));
|
|
278
|
-
const
|
|
279
|
-
if (
|
|
280
|
-
const e =
|
|
281
|
-
r && (
|
|
282
|
-
(a, n) =>
|
|
299
|
+
const ve = !!(t != null && t.sortable) && !(t != null && t.tree_group_by), ee = (e, r) => e.field ?? e.label ?? String(r);
|
|
300
|
+
if (ve && q) {
|
|
301
|
+
const e = f.findIndex((a, n) => ee(a, n) === q.key), r = e >= 0 ? f[e] : null;
|
|
302
|
+
r && (S = [...S].sort(
|
|
303
|
+
(a, n) => $t(T(a, r), T(n, r), q.dir)
|
|
283
304
|
));
|
|
284
305
|
}
|
|
285
|
-
const rt = (e) =>
|
|
306
|
+
const rt = (e) => h(
|
|
286
307
|
(r) => !r || r.key !== e ? { key: e, dir: 1 } : r.dir === 1 ? { key: e, dir: -1 } : null
|
|
287
308
|
);
|
|
288
|
-
let
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
const d = Number(l[a]);
|
|
293
|
-
return Number.isFinite(d) ? n + d : n;
|
|
294
|
-
}, 0);
|
|
295
|
-
};
|
|
296
|
-
for (const a of x)
|
|
297
|
-
a.field && r(a.field), a.stack && r(a.stack);
|
|
298
|
-
j = e;
|
|
299
|
-
}
|
|
300
|
-
const O = (e) => e.format && e.format !== "text", ge = (e, r) => {
|
|
301
|
-
if (!(t != null && t.row_format_field) || !O(r)) return r.format;
|
|
309
|
+
let B = null;
|
|
310
|
+
t != null && t.totals && (B = wt(S, f));
|
|
311
|
+
const M = (e) => e.format && e.format !== "text", Ne = (e, r) => {
|
|
312
|
+
if (!(t != null && t.row_format_field) || !M(r)) return r.format;
|
|
302
313
|
const a = e[t.row_format_field];
|
|
303
314
|
return a === "currency" || a === "number" ? a : r.format;
|
|
304
|
-
},
|
|
315
|
+
}, J = (e, r) => t != null && t.zero_dash && Number(e) === 0 ? "—" : ae(e, r), ue = (e, r) => {
|
|
305
316
|
var n;
|
|
306
317
|
if ((n = r.sparkline_fields) != null && n.length) {
|
|
307
|
-
const l = r.sparkline_fields.map((i) => Number(e[i]) || 0), d = Math.max(...l, 1), b = Math.min(...l, 0),
|
|
308
|
-
(i,
|
|
318
|
+
const l = r.sparkline_fields.map((i) => Number(e[i]) || 0), d = Math.max(...l, 1), b = Math.min(...l, 0), F = Math.max(d - b, 1), D = l.map(
|
|
319
|
+
(i, N) => `${N / Math.max(l.length - 1, 1) * 60},${17 - (i - b) / F * 15}`
|
|
309
320
|
).join(" ");
|
|
310
|
-
return /* @__PURE__ */
|
|
321
|
+
return /* @__PURE__ */ o(
|
|
311
322
|
"svg",
|
|
312
323
|
{
|
|
313
324
|
viewBox: "0 0 60 18",
|
|
314
325
|
className: "inline-block h-[18px] w-[60px]",
|
|
315
|
-
"data-tip": l.map((i) =>
|
|
316
|
-
children: /* @__PURE__ */
|
|
326
|
+
"data-tip": l.map((i) => ae(i, r.format)).join(" · "),
|
|
327
|
+
children: /* @__PURE__ */ o(
|
|
317
328
|
"polyline",
|
|
318
329
|
{
|
|
319
330
|
points: D,
|
|
@@ -327,9 +338,9 @@ function qt({
|
|
|
327
338
|
);
|
|
328
339
|
}
|
|
329
340
|
if (r.percent_of_total && r.field) {
|
|
330
|
-
const l = Number(
|
|
341
|
+
const l = Number(T(e, r)), d = et.get(r.field) ?? 0, b = d > 0 && Number.isFinite(l) ? l / d * 100 : null;
|
|
331
342
|
return /* @__PURE__ */ p("span", { className: "inline-flex items-baseline gap-1", children: [
|
|
332
|
-
|
|
343
|
+
J(T(e, r), r.format),
|
|
333
344
|
b != null && /* @__PURE__ */ p("span", { className: "text-[9.5px] text-slate-400", children: [
|
|
334
345
|
b.toLocaleString("en-US", { maximumFractionDigits: 1 }),
|
|
335
346
|
"%"
|
|
@@ -338,25 +349,25 @@ function qt({
|
|
|
338
349
|
}
|
|
339
350
|
if (r.display === "progress") return tt(e, r);
|
|
340
351
|
if (r.stack)
|
|
341
|
-
return /* @__PURE__ */ p("span", { className: "inline-flex flex-col items-end leading-[15px]", style:
|
|
342
|
-
fe(r) && /* @__PURE__ */
|
|
343
|
-
|
|
352
|
+
return /* @__PURE__ */ p("span", { className: "inline-flex flex-col items-end leading-[15px]", style: ye(r), children: [
|
|
353
|
+
fe(r) && /* @__PURE__ */ o("span", { children: qe(J(T(e, r), Ne(e, r))) }),
|
|
354
|
+
Ee(r) && /* @__PURE__ */ o(
|
|
344
355
|
"span",
|
|
345
356
|
{
|
|
346
357
|
className: `text-[10.5px] ${r.stack_color ? "text-[color:var(--qts)] dark:text-[color:var(--qtsd)]" : "text-slate-400"}`,
|
|
347
|
-
children: qe(
|
|
358
|
+
children: qe(J(e[r.stack], Ne(e, r)))
|
|
348
359
|
}
|
|
349
360
|
)
|
|
350
361
|
] });
|
|
351
|
-
const a =
|
|
352
|
-
return r.empty_label !== void 0 && (a == null || a === "") ? r.empty_label ? /* @__PURE__ */
|
|
353
|
-
}, Oe =
|
|
362
|
+
const a = T(e, r);
|
|
363
|
+
return r.empty_label !== void 0 && (a == null || a === "") ? r.empty_label ? /* @__PURE__ */ o("span", { className: "text-slate-500 dark:text-slate-400", children: r.empty_label }) : null : qe(J(a, Ne(e, r)));
|
|
364
|
+
}, Oe = f.some((e) => e.group), ge = [];
|
|
354
365
|
{
|
|
355
366
|
let e = -1, r;
|
|
356
|
-
for (const a of
|
|
357
|
-
a.group && a.group !== r && e++,
|
|
367
|
+
for (const a of f)
|
|
368
|
+
a.group && a.group !== r && e++, ge.push(a.group ? e : -1), r = a.group;
|
|
358
369
|
}
|
|
359
|
-
const we = (e) => Oe &&
|
|
370
|
+
const we = (e) => Oe && ge[e] >= 0 && ge[e] % 2 === 1 ? "bg-slate-50/70 dark:bg-muted/20" : "", $ = !!(t != null && t.sticky), te = "border-r border-slate-200 dark:border-border", at = (e, r) => $ && e === 0 ? `sticky left-0 z-[1] ${te} ${r}` : "", Te = (e) => $ ? e === 0 ? `sticky left-0 top-0 z-[3] ${te} bg-slate-50 dark:bg-muted` : "sticky top-0 z-[2] bg-white dark:bg-card" : "", G = (e) => $ && (e === 0 || e === 1) ? "pl-3" : "", me = oe.overflows ? "border-l border-slate-200 dark:border-border" : "", $e = (e) => $ ? `sticky right-0 z-[2] ${me} ${e}` : "", re = (e, r, a = 0, n) => {
|
|
360
371
|
const l = a === !0 ? 1 : a === !1 ? 0 : a;
|
|
361
372
|
return /* @__PURE__ */ p(
|
|
362
373
|
"tr",
|
|
@@ -364,27 +375,27 @@ function qt({
|
|
|
364
375
|
onClick: m ? () => m(e) : void 0,
|
|
365
376
|
className: `group/qtr border-b border-slate-100 dark:border-border/50 ${m ? "cursor-pointer" : ""} ${l >= 2 ? "bg-sky-50/70 hover:bg-sky-100/60 dark:bg-sky-500/10 dark:hover:bg-sky-500/15" : "hover:bg-slate-50 dark:hover:bg-muted/40"}`,
|
|
366
377
|
children: [
|
|
367
|
-
|
|
378
|
+
f.map((d, b) => /* @__PURE__ */ o(
|
|
368
379
|
"td",
|
|
369
380
|
{
|
|
370
|
-
className: `whitespace-nowrap py-1.5 pr-3 ${d.max_width ? "overflow-hidden text-ellipsis" : ""} ${
|
|
381
|
+
className: `whitespace-nowrap py-1.5 pr-3 ${d.max_width ? "overflow-hidden text-ellipsis" : ""} ${G(b)} ${ke(d, "text-slate-700 dark:text-slate-200")} ${M(d) ? "text-right tabular-nums" : ""} ${d.group ? "min-w-[58px]" : ""} ${de(d) || we(b)} ${at(b, "bg-slate-50 group-hover/qtr:bg-slate-100 dark:bg-muted dark:group-hover/qtr:bg-muted")}`,
|
|
371
382
|
style: {
|
|
372
383
|
...l > 0 && b === 0 ? { paddingLeft: 2 + l * 16 } : {},
|
|
373
384
|
...d.max_width ? { maxWidth: d.max_width } : {},
|
|
374
|
-
...
|
|
385
|
+
...X(d, Number(T(e, d))) ?? {}
|
|
375
386
|
},
|
|
376
|
-
title: d.max_width ? String(
|
|
377
|
-
children: b === 0 && n !== void 0 ? n :
|
|
387
|
+
title: d.max_width ? String(T(e, d) ?? "") : void 0,
|
|
388
|
+
children: b === 0 && n !== void 0 ? n : ue(e, d)
|
|
378
389
|
},
|
|
379
390
|
d.field ?? d.label ?? b
|
|
380
391
|
)),
|
|
381
|
-
|
|
392
|
+
u && /* @__PURE__ */ o(
|
|
382
393
|
"td",
|
|
383
394
|
{
|
|
384
395
|
className: `py-1 pl-2 pr-3 text-right ${$e(
|
|
385
396
|
l >= 2 ? "bg-[#f3f9fe] group-hover/qtr:bg-[#e7f3fd] dark:bg-card dark:group-hover/qtr:bg-muted" : "bg-white group-hover/qtr:bg-slate-50 dark:bg-card dark:group-hover/qtr:bg-muted"
|
|
386
397
|
)}`,
|
|
387
|
-
children: /* @__PURE__ */
|
|
398
|
+
children: /* @__PURE__ */ o("span", { className: "inline-flex flex-nowrap gap-1", children: u.map((d) => /* @__PURE__ */ o(
|
|
388
399
|
"button",
|
|
389
400
|
{
|
|
390
401
|
type: "button",
|
|
@@ -404,124 +415,124 @@ function qt({
|
|
|
404
415
|
);
|
|
405
416
|
};
|
|
406
417
|
let _e;
|
|
407
|
-
const
|
|
418
|
+
const Q = [];
|
|
408
419
|
if (t != null && t.tree_group_by) {
|
|
409
|
-
const e = t.tree_group_by, r =
|
|
410
|
-
for (const l of
|
|
420
|
+
const e = t.tree_group_by, r = S.filter((l) => !String(l[e] ?? "").trim()), a = /* @__PURE__ */ new Map();
|
|
421
|
+
for (const l of S) {
|
|
411
422
|
const d = String(l[e] ?? "").trim();
|
|
412
423
|
if (!d) continue;
|
|
413
424
|
const b = a.get(d) ?? [];
|
|
414
425
|
b.push(l), a.set(d, b);
|
|
415
426
|
}
|
|
416
427
|
const n = [...a.entries()].sort(([l], [d]) => l.localeCompare(d)).map(([l, d]) => {
|
|
417
|
-
const b = t.tree_collapsed ? !
|
|
418
|
-
|
|
419
|
-
const
|
|
420
|
-
|
|
421
|
-
const
|
|
422
|
-
return Number.isFinite(
|
|
428
|
+
const b = t.tree_collapsed ? !v.has(l) : v.has(l);
|
|
429
|
+
Q.push({ key: l, startsCollapsed: !!t.tree_collapsed });
|
|
430
|
+
const F = { [e]: l }, D = (i) => {
|
|
431
|
+
F[i] = d.reduce((N, ce) => {
|
|
432
|
+
const P = Number(ce[i]);
|
|
433
|
+
return Number.isFinite(P) ? N + P : N;
|
|
423
434
|
}, 0);
|
|
424
435
|
};
|
|
425
|
-
for (const i of
|
|
436
|
+
for (const i of f)
|
|
426
437
|
i.field && i.field !== e && D(i.field), i.stack && D(i.stack);
|
|
427
|
-
return /* @__PURE__ */
|
|
428
|
-
|
|
438
|
+
return /* @__PURE__ */ o(
|
|
439
|
+
Qe,
|
|
429
440
|
{
|
|
430
441
|
header: /* @__PURE__ */ p(
|
|
431
442
|
"tr",
|
|
432
443
|
{
|
|
433
444
|
className: "cursor-pointer border-b border-slate-200 bg-slate-100/80 dark:border-border dark:bg-muted",
|
|
434
|
-
onClick: () =>
|
|
435
|
-
const
|
|
436
|
-
return
|
|
445
|
+
onClick: () => L((i) => {
|
|
446
|
+
const N = new Set(i);
|
|
447
|
+
return N.has(l) ? N.delete(l) : N.add(l), N;
|
|
437
448
|
}),
|
|
438
449
|
children: [
|
|
439
|
-
|
|
450
|
+
f.map((i, N) => /* @__PURE__ */ o(
|
|
440
451
|
"td",
|
|
441
452
|
{
|
|
442
|
-
className: `whitespace-nowrap py-1.5 pr-3 ${
|
|
443
|
-
style:
|
|
453
|
+
className: `whitespace-nowrap py-1.5 pr-3 ${G(N)} text-[11.5px] font-semibold ${ke(i, "text-slate-600 dark:text-slate-300")} ${M(i) ? "text-right tabular-nums" : ""} ${de(i)} ${$ && N === 0 ? `sticky left-0 z-[1] ${te} bg-slate-100 dark:bg-muted` : ""}`,
|
|
454
|
+
style: X(
|
|
444
455
|
i,
|
|
445
|
-
Number(i.formula ?
|
|
456
|
+
Number(i.formula ? j(i.formula, F) : F[i.field ?? ""])
|
|
446
457
|
),
|
|
447
|
-
children:
|
|
458
|
+
children: N === 0 ? `${b ? "▸" : "▾"} ${l}` : i.formula ? J(j(i.formula, F), i.format) : i.field && i.field !== e && M(i) ? ue(F, i) : ""
|
|
448
459
|
},
|
|
449
|
-
i.field ?? i.label ??
|
|
460
|
+
i.field ?? i.label ?? N
|
|
450
461
|
)),
|
|
451
|
-
|
|
462
|
+
u && /* @__PURE__ */ o("td", { className: $e("bg-slate-100 dark:bg-muted") })
|
|
452
463
|
]
|
|
453
464
|
}
|
|
454
465
|
),
|
|
455
466
|
children: !b && (() => {
|
|
456
467
|
const i = t.tree_sub_split;
|
|
457
468
|
if (!i)
|
|
458
|
-
return d.map((
|
|
459
|
-
var
|
|
460
|
-
let
|
|
461
|
-
if (t.tree_strip_section_prefix && ((
|
|
462
|
-
const
|
|
463
|
-
|
|
469
|
+
return d.map((E, U) => {
|
|
470
|
+
var H;
|
|
471
|
+
let C;
|
|
472
|
+
if (t.tree_strip_section_prefix && ((H = f[0]) != null && H.field)) {
|
|
473
|
+
const R = String(E[f[0].field] ?? "");
|
|
474
|
+
R.startsWith(`${l} - `) && (C = R.slice(l.length + 3));
|
|
464
475
|
}
|
|
465
|
-
return
|
|
476
|
+
return re(E, `${l}-${U}`, 1, C);
|
|
466
477
|
});
|
|
467
|
-
const
|
|
468
|
-
for (const
|
|
469
|
-
const
|
|
470
|
-
if (
|
|
471
|
-
|
|
478
|
+
const N = i.separator ?? " - ", ce = [], P = /* @__PURE__ */ new Map();
|
|
479
|
+
for (const E of d) {
|
|
480
|
+
const U = String(E[i.field] ?? ""), C = U.lastIndexOf(N);
|
|
481
|
+
if (C <= 0) {
|
|
482
|
+
ce.push(E);
|
|
472
483
|
continue;
|
|
473
484
|
}
|
|
474
|
-
const
|
|
475
|
-
|
|
485
|
+
const H = U.slice(0, C), R = P.get(H) ?? [];
|
|
486
|
+
R.push(E), P.set(H, R);
|
|
476
487
|
}
|
|
477
488
|
return [
|
|
478
|
-
...
|
|
479
|
-
...[...
|
|
480
|
-
const
|
|
481
|
-
|
|
482
|
-
key:
|
|
489
|
+
...ce.map((E, U) => re(E, `${l}-flat-${U}`, 1)),
|
|
490
|
+
...[...P.entries()].sort(([E], [U]) => E.localeCompare(U)).map(([E, U]) => {
|
|
491
|
+
const C = `s:${l}|${E}`;
|
|
492
|
+
Q.push({
|
|
493
|
+
key: C,
|
|
483
494
|
startsCollapsed: t.tree_sub_collapsed ?? !0
|
|
484
495
|
});
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
const
|
|
488
|
-
return Number.isFinite(
|
|
496
|
+
const H = t.tree_sub_collapsed ?? !0 ? !v.has(C) : v.has(C), R = {}, Ve = (x) => {
|
|
497
|
+
R[x] = U.reduce((_, pe) => {
|
|
498
|
+
const he = Number(pe[x]);
|
|
499
|
+
return Number.isFinite(he) ? _ + he : _;
|
|
489
500
|
}, 0);
|
|
490
501
|
};
|
|
491
|
-
for (const
|
|
492
|
-
|
|
493
|
-
return /* @__PURE__ */
|
|
494
|
-
|
|
502
|
+
for (const x of f)
|
|
503
|
+
x.field && x.field !== e && Ve(x.field), x.stack && Ve(x.stack);
|
|
504
|
+
return /* @__PURE__ */ o(
|
|
505
|
+
Qe,
|
|
495
506
|
{
|
|
496
507
|
header: /* @__PURE__ */ p(
|
|
497
508
|
"tr",
|
|
498
509
|
{
|
|
499
510
|
className: "cursor-pointer border-b border-slate-200/80 bg-slate-100/70 dark:border-border/60 dark:bg-muted/50",
|
|
500
|
-
onClick: () =>
|
|
501
|
-
const
|
|
502
|
-
return
|
|
511
|
+
onClick: () => L((x) => {
|
|
512
|
+
const _ = new Set(x);
|
|
513
|
+
return _.has(C) ? _.delete(C) : _.add(C), _;
|
|
503
514
|
}),
|
|
504
515
|
children: [
|
|
505
|
-
|
|
516
|
+
f.map((x, _) => /* @__PURE__ */ o(
|
|
506
517
|
"td",
|
|
507
518
|
{
|
|
508
|
-
className: `whitespace-nowrap py-1.5 pr-3 ${
|
|
509
|
-
style:
|
|
510
|
-
children:
|
|
519
|
+
className: `whitespace-nowrap py-1.5 pr-3 ${G(_)} text-[11.5px] font-medium text-slate-600 dark:text-slate-300 ${M(x) ? "text-right tabular-nums" : ""} ${$ && _ === 0 ? `sticky left-0 z-[1] ${te} bg-slate-100/80 dark:bg-muted` : ""}`,
|
|
520
|
+
style: _ === 0 ? { paddingLeft: 18 } : void 0,
|
|
521
|
+
children: _ === 0 ? `${H ? "▸" : "▾"} ${E}` : x.formula ? J(j(x.formula, R), x.format) : x.field && x.field !== e && M(x) ? ue(R, x) : ""
|
|
511
522
|
},
|
|
512
|
-
|
|
523
|
+
x.field ?? x.label ?? _
|
|
513
524
|
)),
|
|
514
|
-
|
|
525
|
+
u && /* @__PURE__ */ o("td", { className: $e("bg-slate-100 dark:bg-muted") })
|
|
515
526
|
]
|
|
516
527
|
}
|
|
517
528
|
),
|
|
518
|
-
children: !
|
|
519
|
-
var
|
|
520
|
-
const
|
|
521
|
-
return
|
|
529
|
+
children: !H && U.map((x, _) => {
|
|
530
|
+
var Be;
|
|
531
|
+
const pe = String(x[i.field] ?? ""), he = pe.slice(pe.lastIndexOf(N) + N.length), nt = ((Be = f[0]) == null ? void 0 : Be.field) === i.field ? he : void 0;
|
|
532
|
+
return re(x, `${C}-${_}`, 2, nt);
|
|
522
533
|
})
|
|
523
534
|
},
|
|
524
|
-
|
|
535
|
+
C
|
|
525
536
|
);
|
|
526
537
|
})
|
|
527
538
|
];
|
|
@@ -530,40 +541,40 @@ function qt({
|
|
|
530
541
|
l
|
|
531
542
|
);
|
|
532
543
|
});
|
|
533
|
-
_e = [...r.map((l, d) =>
|
|
544
|
+
_e = [...r.map((l, d) => re(l, `flat-${d}`)), ...n];
|
|
534
545
|
} else
|
|
535
|
-
_e =
|
|
536
|
-
const lt = (e) => e.startsCollapsed ?
|
|
546
|
+
_e = S.map((e, r) => re(e, String(r)));
|
|
547
|
+
const lt = (e) => e.startsCollapsed ? v.has(e.key) : !v.has(e.key), be = Q.length > 0 && Q.every(lt), st = (e) => L(
|
|
537
548
|
new Set(
|
|
538
|
-
|
|
549
|
+
Q.filter((r) => e ? r.startsCollapsed : !r.startsCollapsed).map((r) => r.key)
|
|
539
550
|
)
|
|
540
|
-
),
|
|
551
|
+
), Me = Q.length > 0 ? /* @__PURE__ */ p(
|
|
541
552
|
"button",
|
|
542
553
|
{
|
|
543
554
|
type: "button",
|
|
544
|
-
"data-query-tree-toggle":
|
|
545
|
-
onClick: () => st(!
|
|
555
|
+
"data-query-tree-toggle": be ? "collapse" : "expand",
|
|
556
|
+
onClick: () => st(!be),
|
|
546
557
|
className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-slate-200 px-2 text-[11.5px] font-medium text-slate-600 transition-colors hover:bg-slate-50 hover:text-slate-800 dark:border-border dark:text-slate-300 dark:hover:bg-muted dark:hover:text-slate-100",
|
|
547
558
|
children: [
|
|
548
|
-
|
|
549
|
-
|
|
559
|
+
be ? /* @__PURE__ */ o(bt, { className: "h-3.5 w-3.5", "aria-hidden": !0 }) : /* @__PURE__ */ o(ct, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
560
|
+
be ? "Collapse all" : "Expand all"
|
|
550
561
|
]
|
|
551
562
|
}
|
|
552
|
-
) : null, ot = typeof (t == null ? void 0 : t.export_csv) == "object" && t.export_csv.filename ? t.export_csv.filename : "export.csv",
|
|
563
|
+
) : null, ot = typeof (t == null ? void 0 : t.export_csv) == "object" && t.export_csv.filename ? t.export_csv.filename : "export.csv", Ue = t != null && t.search || t != null && t.export_csv || Z.length > 0 ? /* @__PURE__ */ p("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
553
564
|
(t == null ? void 0 : t.search) && /* @__PURE__ */ p("label", { className: "relative inline-flex items-center", children: [
|
|
554
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ o(
|
|
555
566
|
dt,
|
|
556
567
|
{
|
|
557
568
|
className: "pointer-events-none absolute left-2 h-3.5 w-3.5 text-slate-400",
|
|
558
569
|
"aria-hidden": !0
|
|
559
570
|
}
|
|
560
571
|
),
|
|
561
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ o(
|
|
562
573
|
"input",
|
|
563
574
|
{
|
|
564
575
|
type: "search",
|
|
565
|
-
value:
|
|
566
|
-
onChange: (e) =>
|
|
576
|
+
value: A,
|
|
577
|
+
onChange: (e) => w(e.target.value),
|
|
567
578
|
placeholder: "Search rows",
|
|
568
579
|
"aria-label": "Search rows",
|
|
569
580
|
"data-qt-search": "",
|
|
@@ -571,26 +582,26 @@ function qt({
|
|
|
571
582
|
}
|
|
572
583
|
)
|
|
573
584
|
] }),
|
|
574
|
-
|
|
585
|
+
Z.length > 0 && /* @__PURE__ */ o(
|
|
575
586
|
"button",
|
|
576
587
|
{
|
|
577
588
|
type: "button",
|
|
578
|
-
"aria-pressed":
|
|
579
|
-
"data-qt-hide-empty":
|
|
580
|
-
onClick: () =>
|
|
581
|
-
className: `h-7 whitespace-nowrap rounded-md border px-2.5 text-[11.5px] font-medium transition-colors ${
|
|
589
|
+
"aria-pressed": z,
|
|
590
|
+
"data-qt-hide-empty": z ? "on" : "off",
|
|
591
|
+
onClick: () => I((e) => !e),
|
|
592
|
+
className: `h-7 whitespace-nowrap rounded-md border px-2.5 text-[11.5px] font-medium transition-colors ${z ? "border-nvr-cyan bg-nvr-cyan text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-border dark:text-slate-300 dark:hover:bg-muted"}`,
|
|
582
593
|
children: ((We = t == null ? void 0 : t.hide_empty) == null ? void 0 : We.label) ?? "Hide empty rows"
|
|
583
594
|
}
|
|
584
595
|
),
|
|
585
|
-
(
|
|
596
|
+
(ie || z && Z.length > 0) && /* @__PURE__ */ p(
|
|
586
597
|
"span",
|
|
587
598
|
{
|
|
588
599
|
className: "text-[11.5px] tabular-nums text-slate-500 dark:text-slate-400",
|
|
589
600
|
"data-qt-shown": "",
|
|
590
601
|
children: [
|
|
591
|
-
|
|
602
|
+
S.length.toLocaleString("en-US"),
|
|
592
603
|
" of ",
|
|
593
|
-
|
|
604
|
+
s.length.toLocaleString("en-US"),
|
|
594
605
|
" rows"
|
|
595
606
|
]
|
|
596
607
|
}
|
|
@@ -600,34 +611,34 @@ function qt({
|
|
|
600
611
|
{
|
|
601
612
|
type: "button",
|
|
602
613
|
"data-qt-csv": "",
|
|
603
|
-
onClick: () =>
|
|
614
|
+
onClick: () => St(
|
|
604
615
|
ot,
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
(e) => e.label ??
|
|
616
|
+
_t(
|
|
617
|
+
f.filter((e) => fe(e) || !e.field),
|
|
618
|
+
S,
|
|
619
|
+
T,
|
|
620
|
+
(e) => e.label ?? le(e.field ?? "")
|
|
610
621
|
)
|
|
611
622
|
),
|
|
612
623
|
className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-slate-200 px-2 text-[11.5px] font-medium text-slate-600 transition-colors hover:bg-slate-50 hover:text-slate-800 dark:border-border dark:text-slate-300 dark:hover:bg-muted dark:hover:text-slate-100",
|
|
613
624
|
children: [
|
|
614
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ o(it, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
615
626
|
"CSV"
|
|
616
627
|
]
|
|
617
628
|
}
|
|
618
629
|
)
|
|
619
630
|
] }) : null;
|
|
620
|
-
return /* @__PURE__ */ p("div", { className:
|
|
621
|
-
|
|
622
|
-
(((
|
|
623
|
-
(((
|
|
624
|
-
const r = !
|
|
625
|
-
return /* @__PURE__ */
|
|
631
|
+
return /* @__PURE__ */ p("div", { className: $ ? "flex min-h-0 flex-1 flex-col" : void 0, children: [
|
|
632
|
+
Ue && /* @__PURE__ */ o("div", { className: "shrink-0 pb-2", children: Ue }),
|
|
633
|
+
(((Ke = t == null ? void 0 : t.pivot) == null ? void 0 : Ke.quarter_toggle) || (((Ae = t == null ? void 0 : t.toggles) == null ? void 0 : Ae.length) ?? 0) > 0 || Me) && /* @__PURE__ */ p("div", { className: "flex shrink-0 flex-wrap items-center justify-between gap-2 pb-2", children: [
|
|
634
|
+
(((Je = t == null ? void 0 : t.toggles) == null ? void 0 : Je.length) ?? 0) > 0 ? /* @__PURE__ */ o("div", { className: "inline-flex gap-0.5 rounded-md border border-slate-200 bg-slate-50 p-0.5 dark:border-border dark:bg-muted/40", children: t.toggles.map((e) => {
|
|
635
|
+
const r = !V.has(e.label);
|
|
636
|
+
return /* @__PURE__ */ o(
|
|
626
637
|
"button",
|
|
627
638
|
{
|
|
628
639
|
type: "button",
|
|
629
640
|
"aria-pressed": r,
|
|
630
|
-
onClick: () =>
|
|
641
|
+
onClick: () => O((a) => {
|
|
631
642
|
const n = new Set(a);
|
|
632
643
|
return n.has(e.label) ? n.delete(e.label) : n.add(e.label), n;
|
|
633
644
|
}),
|
|
@@ -636,43 +647,43 @@ function qt({
|
|
|
636
647
|
},
|
|
637
648
|
e.label
|
|
638
649
|
);
|
|
639
|
-
}) }) : /* @__PURE__ */
|
|
650
|
+
}) }) : /* @__PURE__ */ o("span", {}),
|
|
640
651
|
/* @__PURE__ */ p("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
641
|
-
|
|
642
|
-
((
|
|
652
|
+
Me,
|
|
653
|
+
((je = t == null ? void 0 : t.pivot) == null ? void 0 : je.quarter_toggle) && /* @__PURE__ */ o("div", { className: "inline-flex gap-0.5 rounded-md border border-slate-200 p-0.5 dark:border-border", children: ["month", "quarter"].map((e) => /* @__PURE__ */ o(
|
|
643
654
|
"button",
|
|
644
655
|
{
|
|
645
656
|
type: "button",
|
|
646
|
-
onClick: () =>
|
|
647
|
-
className: `rounded px-2 py-0.5 text-[11px] font-medium transition-colors ${
|
|
657
|
+
onClick: () => K(e),
|
|
658
|
+
className: `rounded px-2 py-0.5 text-[11px] font-medium transition-colors ${se === e ? "bg-nvr-cyan/10 text-slate-800 dark:text-slate-100" : "text-slate-500 hover:text-slate-700 dark:hover:text-slate-300"}`,
|
|
648
659
|
children: e === "month" ? "Monthly" : "Quarterly"
|
|
649
660
|
},
|
|
650
661
|
e
|
|
651
662
|
)) })
|
|
652
663
|
] })
|
|
653
664
|
] }),
|
|
654
|
-
/* @__PURE__ */ p("div", { className:
|
|
655
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ p("div", { className: $ ? "relative flex min-h-0 flex-1 flex-col" : "relative", children: [
|
|
666
|
+
/* @__PURE__ */ o(
|
|
656
667
|
"div",
|
|
657
668
|
{
|
|
658
669
|
ref: Ye,
|
|
659
|
-
className:
|
|
670
|
+
className: $ ? "min-h-0 flex-1 overflow-auto" : "overflow-x-auto",
|
|
660
671
|
children: /* @__PURE__ */ p("table", { className: "w-full border-separate border-spacing-0 text-[12px] [&>tbody>tr.border-b>td]:border-b [&>tbody>tr.border-b>td]:[border-bottom-color:inherit] [&>tbody:has(+tfoot)>tr:last-child>td]:border-b-0 [&>tfoot>tr.border-t>td]:border-t [&>tfoot>tr.border-t>td]:[border-top-color:inherit]", children: [
|
|
661
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ o("thead", { children: Oe ? /* @__PURE__ */ p(Pe, { children: [
|
|
662
673
|
/* @__PURE__ */ p("tr", { children: [
|
|
663
674
|
(() => {
|
|
664
675
|
const e = [];
|
|
665
676
|
let r = 0;
|
|
666
|
-
for (; r <
|
|
667
|
-
const a =
|
|
677
|
+
for (; r < f.length; ) {
|
|
678
|
+
const a = f[r];
|
|
668
679
|
if (!a.group) {
|
|
669
680
|
e.push(
|
|
670
|
-
/* @__PURE__ */
|
|
681
|
+
/* @__PURE__ */ o(
|
|
671
682
|
"th",
|
|
672
683
|
{
|
|
673
684
|
rowSpan: 2,
|
|
674
|
-
className: `whitespace-nowrap border-b border-slate-200 py-1.5 pr-3 align-bottom text-[10.5px] font-semibold uppercase tracking-wider text-slate-500 dark:border-border dark:text-slate-400 ${
|
|
675
|
-
children: a.label ??
|
|
685
|
+
className: `whitespace-nowrap border-b border-slate-200 py-1.5 pr-3 align-bottom text-[10.5px] font-semibold uppercase tracking-wider text-slate-500 dark:border-border dark:text-slate-400 ${M(a) ? "text-right" : "text-left"} ${Te(r)}`,
|
|
686
|
+
children: a.label ?? le(a.field ?? "")
|
|
676
687
|
},
|
|
677
688
|
`u-${a.field ?? r}`
|
|
678
689
|
)
|
|
@@ -680,14 +691,14 @@ function qt({
|
|
|
680
691
|
continue;
|
|
681
692
|
}
|
|
682
693
|
let n = 1;
|
|
683
|
-
for (; r + n <
|
|
694
|
+
for (; r + n < f.length && f[r + n].group === a.group; )
|
|
684
695
|
n++;
|
|
685
696
|
e.push(
|
|
686
|
-
/* @__PURE__ */
|
|
697
|
+
/* @__PURE__ */ o(
|
|
687
698
|
"th",
|
|
688
699
|
{
|
|
689
700
|
colSpan: n,
|
|
690
|
-
className: `whitespace-nowrap border-b border-slate-100 py-1 pr-3 text-center text-[11px] font-semibold dark:border-border/60 ${a.group ===
|
|
701
|
+
className: `whitespace-nowrap border-b border-slate-100 py-1 pr-3 text-center text-[11px] font-semibold dark:border-border/60 ${a.group === ne ? "border-t-2 border-t-[#6366f1] bg-[#6366f10f] text-[#4f46e5] dark:border-t-[#a5b4fc] dark:bg-[#a5b4fc12] dark:text-[#a5b4fc]" : `text-slate-600 dark:text-slate-300 ${we(r)}`} ${$ ? "sticky top-0 z-[2] bg-white dark:bg-card" : ""}`.trim(),
|
|
691
702
|
children: a.group
|
|
692
703
|
},
|
|
693
704
|
`g-${a.group}-${r}`
|
|
@@ -696,60 +707,60 @@ function qt({
|
|
|
696
707
|
}
|
|
697
708
|
return e;
|
|
698
709
|
})(),
|
|
699
|
-
|
|
710
|
+
u && /* @__PURE__ */ o(
|
|
700
711
|
"th",
|
|
701
712
|
{
|
|
702
713
|
rowSpan: 2,
|
|
703
714
|
"aria-label": "Actions",
|
|
704
715
|
"data-qt-actions-head": "",
|
|
705
|
-
className: `border-b border-slate-200 dark:border-border ${
|
|
716
|
+
className: `border-b border-slate-200 dark:border-border ${$ ? `sticky right-0 top-0 z-[3] ${me} bg-white dark:bg-card` : ""}`
|
|
706
717
|
}
|
|
707
718
|
)
|
|
708
719
|
] }),
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
-
(e, r) => e.group ? /* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ o("tr", { children: f.map(
|
|
721
|
+
(e, r) => e.group ? /* @__PURE__ */ o(
|
|
711
722
|
"th",
|
|
712
723
|
{
|
|
713
|
-
className: `min-w-[58px] whitespace-nowrap border-b border-slate-200 py-1 pr-3 ${
|
|
714
|
-
children: e.label ??
|
|
724
|
+
className: `min-w-[58px] whitespace-nowrap border-b border-slate-200 py-1 pr-3 ${G(r)} text-[11px] font-medium text-slate-500 dark:border-border dark:text-slate-400 ${M(e) ? "text-right" : "text-left"} ${de(e) || we(r)} ${$ ? "sticky top-[26px] z-[2] bg-white dark:bg-card" : ""}`,
|
|
725
|
+
children: e.label ?? le(e.field ?? "")
|
|
715
726
|
},
|
|
716
727
|
e.field ?? e.label ?? r
|
|
717
728
|
) : null
|
|
718
729
|
) })
|
|
719
730
|
] }) : /* @__PURE__ */ p("tr", { className: "border-b border-slate-200 dark:border-border", children: [
|
|
720
|
-
|
|
731
|
+
f.map((e, r) => /* @__PURE__ */ p(
|
|
721
732
|
"th",
|
|
722
733
|
{
|
|
723
|
-
className: `whitespace-nowrap border-b border-slate-200 py-1.5 pr-3 ${
|
|
724
|
-
"aria-sort":
|
|
734
|
+
className: `whitespace-nowrap border-b border-slate-200 py-1.5 pr-3 ${G(r)} text-[10.5px] font-semibold uppercase tracking-wider dark:border-border ${Le(e) ? "border-t-2 border-t-[#6366f1] bg-[#6366f10f] text-[#4f46e5] dark:border-t-[#a5b4fc] dark:bg-[#a5b4fc12] dark:text-[#a5b4fc]" : "text-slate-500 dark:text-slate-400"} ${e.stack ? "min-w-[64px]" : ""} ${M(e) ? "text-right" : "text-left"} ${Te(r)}`,
|
|
735
|
+
"aria-sort": ve && (q == null ? void 0 : q.key) === ee(e, r) ? q.dir === 1 ? "ascending" : "descending" : void 0,
|
|
725
736
|
children: [
|
|
726
|
-
|
|
737
|
+
ve ? /* @__PURE__ */ p(
|
|
727
738
|
"button",
|
|
728
739
|
{
|
|
729
740
|
type: "button",
|
|
730
|
-
"data-qt-sort":
|
|
731
|
-
onClick: () => rt(
|
|
732
|
-
className: `inline-flex items-center gap-0.5 font-semibold uppercase tracking-wider hover:text-slate-800 dark:hover:text-slate-100 ${
|
|
741
|
+
"data-qt-sort": ee(e, r),
|
|
742
|
+
onClick: () => rt(ee(e, r)),
|
|
743
|
+
className: `inline-flex items-center gap-0.5 font-semibold uppercase tracking-wider hover:text-slate-800 dark:hover:text-slate-100 ${M(e) ? "flex-row-reverse" : ""}`,
|
|
733
744
|
children: [
|
|
734
|
-
e.label ??
|
|
735
|
-
(
|
|
745
|
+
e.label ?? le(e.field ?? ""),
|
|
746
|
+
(q == null ? void 0 : q.key) === ee(e, r) && (q.dir === 1 ? /* @__PURE__ */ o(ut, { className: "h-3 w-3", "aria-hidden": !0 }) : /* @__PURE__ */ o(mt, { className: "h-3 w-3", "aria-hidden": !0 }))
|
|
736
747
|
]
|
|
737
748
|
}
|
|
738
|
-
) : e.label ??
|
|
749
|
+
) : e.label ?? le(e.field ?? ""),
|
|
739
750
|
e.stack && (t == null ? void 0 : t.stack_legend) && /* @__PURE__ */ p(
|
|
740
751
|
"span",
|
|
741
752
|
{
|
|
742
753
|
className: "flex justify-end gap-1.5 text-[9px] font-medium normal-case tracking-normal",
|
|
743
|
-
style:
|
|
754
|
+
style: ye(e) ? { ...ye(e), ...X(e) ?? {} } : X(e),
|
|
744
755
|
children: [
|
|
745
|
-
fe(e) && /* @__PURE__ */
|
|
756
|
+
fe(e) && /* @__PURE__ */ o(
|
|
746
757
|
"span",
|
|
747
758
|
{
|
|
748
759
|
className: e.color ? "text-[color:var(--qtc)] dark:text-[color:var(--qtcd)]" : "",
|
|
749
760
|
children: t.stack_legend[0]
|
|
750
761
|
}
|
|
751
762
|
),
|
|
752
|
-
|
|
763
|
+
Ee(e) && /* @__PURE__ */ o(
|
|
753
764
|
"span",
|
|
754
765
|
{
|
|
755
766
|
className: e.stack_color ? "text-[color:var(--qts)] dark:text-[color:var(--qtsd)]" : "",
|
|
@@ -763,36 +774,36 @@ function qt({
|
|
|
763
774
|
},
|
|
764
775
|
e.field ?? e.label ?? r
|
|
765
776
|
)),
|
|
766
|
-
|
|
777
|
+
u && /* @__PURE__ */ o(
|
|
767
778
|
"th",
|
|
768
779
|
{
|
|
769
780
|
"aria-label": "Actions",
|
|
770
781
|
"data-qt-actions-head": "",
|
|
771
|
-
className:
|
|
782
|
+
className: $ ? `sticky right-0 top-0 z-[3] ${me} bg-white dark:bg-card` : void 0
|
|
772
783
|
}
|
|
773
784
|
)
|
|
774
785
|
] }) }),
|
|
775
|
-
/* @__PURE__ */
|
|
776
|
-
|
|
777
|
-
|
|
786
|
+
/* @__PURE__ */ o("tbody", { children: _e }),
|
|
787
|
+
B && /* @__PURE__ */ o("tfoot", { children: /* @__PURE__ */ p("tr", { className: "border-t border-slate-300 font-semibold dark:border-border", children: [
|
|
788
|
+
f.map((e, r) => /* @__PURE__ */ o(
|
|
778
789
|
"td",
|
|
779
790
|
{
|
|
780
|
-
className: `whitespace-nowrap py-1.5 pr-3 ${
|
|
781
|
-
style:
|
|
791
|
+
className: `whitespace-nowrap py-1.5 pr-3 ${G(r)} ${ke(e, "")} ${M(e) ? "text-right tabular-nums" : ""} ${de(e)} ${$ ? `sticky bottom-0 border-t border-slate-300 dark:border-border ${r === 0 ? `left-0 z-[3] ${te} bg-slate-50 dark:bg-muted` : "z-[2] bg-white dark:bg-card"}` : ""}`,
|
|
792
|
+
style: X(
|
|
782
793
|
e,
|
|
783
794
|
Number(
|
|
784
|
-
e.formula ?
|
|
795
|
+
e.formula ? j(e.formula, B) : B[e.field ?? ""]
|
|
785
796
|
)
|
|
786
797
|
),
|
|
787
|
-
children: r === 0 && !e.sum && !e.formula ? "Total" : e.sum || e.formula ? e.formula ?
|
|
798
|
+
children: r === 0 && !e.sum && !e.formula ? "Total" : e.sum || e.formula ? e.formula ? J(j(e.formula, B), e.format) : ue(B, e) : ""
|
|
788
799
|
},
|
|
789
800
|
e.field ?? e.label ?? r
|
|
790
801
|
)),
|
|
791
|
-
|
|
802
|
+
u && /* @__PURE__ */ o(
|
|
792
803
|
"td",
|
|
793
804
|
{
|
|
794
|
-
className: `py-1.5 pr-3 text-right ${
|
|
795
|
-
children: /* @__PURE__ */
|
|
805
|
+
className: `py-1.5 pr-3 text-right ${$ ? `sticky bottom-0 right-0 z-[3] border-t border-slate-300 ${me} bg-white dark:border-border dark:bg-card` : ""}`,
|
|
806
|
+
children: /* @__PURE__ */ o("span", { className: "inline-flex flex-nowrap gap-1.5", children: u.map((e) => /* @__PURE__ */ o(
|
|
796
807
|
"button",
|
|
797
808
|
{
|
|
798
809
|
type: "button",
|
|
@@ -808,55 +819,57 @@ function qt({
|
|
|
808
819
|
] })
|
|
809
820
|
}
|
|
810
821
|
),
|
|
811
|
-
|
|
822
|
+
oe.canScrollRight && // More columns to the right: fade the edge so readers know the
|
|
812
823
|
// table scrolls sideways (the native scrollbar is often invisible).
|
|
813
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ o(
|
|
814
825
|
"div",
|
|
815
826
|
{
|
|
816
827
|
"aria-hidden": !0,
|
|
817
828
|
"data-qt-scroll-cue": "",
|
|
818
829
|
className: "pointer-events-none absolute top-0 w-10 bg-gradient-to-r from-transparent to-white dark:to-card",
|
|
819
|
-
style: { right:
|
|
830
|
+
style: { right: oe.cueInset.right, bottom: oe.cueInset.bottom }
|
|
820
831
|
}
|
|
821
832
|
)
|
|
822
833
|
] })
|
|
823
834
|
] });
|
|
824
835
|
}
|
|
825
|
-
function
|
|
826
|
-
const
|
|
827
|
-
if (
|
|
828
|
-
if (
|
|
829
|
-
if (
|
|
830
|
-
const
|
|
831
|
-
return Number.isFinite(
|
|
836
|
+
function $t(s, t, m = 1) {
|
|
837
|
+
const c = (y) => y == null || y === "";
|
|
838
|
+
if (c(s) && c(t)) return 0;
|
|
839
|
+
if (c(s)) return 1;
|
|
840
|
+
if (c(t)) return -1;
|
|
841
|
+
const u = typeof s == "number" ? s : Number(s), g = typeof t == "number" ? t : Number(t);
|
|
842
|
+
return Number.isFinite(u) && Number.isFinite(g) ? (u - g) * m : String(s).localeCompare(String(t), void 0, { numeric: !0, sensitivity: "base" }) * m;
|
|
832
843
|
}
|
|
833
|
-
function
|
|
834
|
-
const
|
|
844
|
+
function _t(s, t, m, c) {
|
|
845
|
+
const u = (y) => {
|
|
835
846
|
if (y == null) return "";
|
|
836
|
-
const
|
|
837
|
-
return /[",\r\n]/.test(
|
|
838
|
-
},
|
|
839
|
-
for (const y of t)
|
|
840
|
-
return `${
|
|
847
|
+
const v = typeof y == "object" ? JSON.stringify(y) : String(y), L = /^[=+\-@]/.test(v) && !/^-?\d/.test(v) ? `'${v}` : v;
|
|
848
|
+
return /[",\r\n]/.test(L) ? `"${L.replace(/"/g, '""')}"` : L;
|
|
849
|
+
}, g = [s.map((y) => u(c(y))).join(",")];
|
|
850
|
+
for (const y of t) g.push(s.map((v) => u(m(y, v))).join(","));
|
|
851
|
+
return `${g.join(`\r
|
|
841
852
|
`)}\r
|
|
842
853
|
`;
|
|
843
854
|
}
|
|
844
|
-
function
|
|
845
|
-
const m = URL.createObjectURL(new Blob([`\uFEFF${t}`], { type: "text/csv;charset=utf-8" })),
|
|
846
|
-
|
|
855
|
+
function St(s, t) {
|
|
856
|
+
const m = URL.createObjectURL(new Blob([`\uFEFF${t}`], { type: "text/csv;charset=utf-8" })), c = document.createElement("a");
|
|
857
|
+
c.href = m, c.download = s, document.body.appendChild(c), c.click(), c.remove(), setTimeout(() => URL.revokeObjectURL(m), 0);
|
|
847
858
|
}
|
|
848
|
-
function
|
|
859
|
+
function Qe({ header: s, children: t }) {
|
|
849
860
|
return /* @__PURE__ */ p(Pe, { children: [
|
|
850
|
-
|
|
861
|
+
s,
|
|
851
862
|
t
|
|
852
863
|
] });
|
|
853
864
|
}
|
|
854
865
|
export {
|
|
855
866
|
Se as COLOR_ROLES,
|
|
856
|
-
|
|
867
|
+
Lt as QueryTable,
|
|
868
|
+
vt as UNDATED_KEY,
|
|
857
869
|
Ce as colorPair,
|
|
858
870
|
ft as darkVariant,
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
871
|
+
Nt as pivotQueryRows,
|
|
872
|
+
_t as queryTableCsv,
|
|
873
|
+
wt as queryTableTotals,
|
|
874
|
+
$t as sortCompare
|
|
862
875
|
};
|