@nivaro/react 0.3.49 → 0.3.51
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/components/InlineGridField.js +166 -105
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +38 -4
- package/dist/shared/components/ItemEditForm.js +5258 -5034
- package/dist/shared/components/QueryTable.js +489 -347
- 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 +1230 -1175
- package/dist/shared/components/item-edit/CloneDialog.js +192 -142
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +58 -53
- package/dist/shared/components/item-edit/FieldRenderer.js +249 -244
- package/dist/shared/components/item-edit/FieldRow.js +402 -370
- package/dist/shared/components/item-edit/FilePickerField.js +315 -307
- package/dist/shared/components/item-edit/InlineGridField.js +92 -90
- package/dist/shared/components/item-edit/InlineTableField.js +3119 -2951
- package/dist/shared/components/item-edit/MidairCollisionDialog.js +175 -0
- package/dist/shared/components/item-edit/PlanGrid.js +162 -162
- package/dist/shared/components/item-edit/PolishFields.js +169 -162
- 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 +198 -191
- package/dist/shared/components/item-edit/SummaryPanel.js +282 -259
- package/dist/shared/components/item-edit/UserChip.js +233 -200
- package/dist/shared/components/item-edit/ValidationSummary.js +64 -47
- package/dist/shared/components/item-edit/header-midair.js +51 -0
- package/dist/shared/components/item-edit/helpers.js +181 -155
- package/dist/shared/components/item-edit/line-midair.js +207 -0
- package/dist/shared/components/item-edit/soft-rules.js +27 -0
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/panels/CommentPanel.js +290 -284
- package/dist/shared/components/panels/ItemLockBanner.js +414 -358
- package/dist/shared/components/panels/PipelinePanel.js +1241 -992
- package/dist/shared/components/panels/RecordIntegrityBanner.js +1 -1
- 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 +925 -871
- package/dist/shared/components/queue/column-chooser.js +21 -0
- package/dist/shared/components/queue/live-state-aspect.js +6 -0
- package/dist/shared/components/ui/number-draft-input.js +93 -0
- package/dist/shared/components/widgets/ReviewListWidget.js +191 -166
- package/dist/shared/lib/draft-store.js +48 -34
- package/dist/shared/lib/error-hints.js +1 -0
- package/dist/shared/lib/query-stats.js +60 -60
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ChevronsDownUp as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { evaluateNumeric as
|
|
5
|
-
function
|
|
6
|
-
return `color-mix(in srgb, ${
|
|
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
|
+
import { evaluateNumeric as xt } from "../lib/expression.js";
|
|
5
|
+
function ft(s) {
|
|
6
|
+
return `color-mix(in srgb, ${s} 55%, white)`;
|
|
7
7
|
}
|
|
8
|
-
const
|
|
8
|
+
const Se = {
|
|
9
9
|
// Brand ink for TEXT: the raw brand (cyan on white ≈ 1.6:1) is a fill
|
|
10
10
|
// colour, not a text colour — mix toward black in light mode, raw in dark.
|
|
11
11
|
accent: ["color-mix(in srgb, rgb(var(--nvr-cyan-rgb)) 56%, black)", "rgb(var(--nvr-cyan-rgb))"],
|
|
@@ -19,12 +19,12 @@ const fe = {
|
|
|
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
|
|
23
|
-
var
|
|
24
|
-
const
|
|
25
|
-
return
|
|
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
|
|
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 Ze = /^[-+−]?\$?0(?:\.0+)?%?$/, ke = (i) => i === "—" ? /* @__PURE__ *
|
|
|
37
37
|
"oct",
|
|
38
38
|
"nov",
|
|
39
39
|
"dec"
|
|
40
|
-
],
|
|
40
|
+
], yt = [
|
|
41
41
|
"Jan",
|
|
42
42
|
"Feb",
|
|
43
43
|
"Mar",
|
|
@@ -50,169 +50,190 @@ const Ze = /^[-+−]?\$?0(?:\.0+)?%?$/, ke = (i) => i === "—" ? /* @__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
|
-
|
|
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
|
})),
|
|
100
|
-
...
|
|
106
|
+
...y ? [{ field: "undated", label: "Undated", format: "currency", sum: !0, ...K }] : [],
|
|
107
|
+
...t.total !== !1 ? [
|
|
101
108
|
{
|
|
102
109
|
field: "total",
|
|
103
110
|
label: "Total",
|
|
104
111
|
format: "currency",
|
|
105
112
|
sum: !0,
|
|
106
|
-
...
|
|
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
|
|
133
|
+
function j(s, t) {
|
|
134
|
+
return xt(s, t);
|
|
114
135
|
}
|
|
115
|
-
function
|
|
116
|
-
if (
|
|
117
|
-
const
|
|
118
|
-
if (!Number.isFinite(
|
|
119
|
-
switch (
|
|
136
|
+
function ae(s, t) {
|
|
137
|
+
if (s == null || s === "") return "—";
|
|
138
|
+
const m = Number(s);
|
|
139
|
+
if (!Number.isFinite(m)) return String(s);
|
|
140
|
+
switch (t) {
|
|
120
141
|
case "currency": {
|
|
121
|
-
const
|
|
122
|
-
return
|
|
142
|
+
const c = Number.isInteger(m);
|
|
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
|
}
|
|
129
150
|
case "percent":
|
|
130
|
-
return `${
|
|
151
|
+
return `${m.toLocaleString("en-US", { maximumFractionDigits: 1 })}%`;
|
|
131
152
|
case "number":
|
|
132
|
-
return
|
|
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:
|
|
142
|
-
config:
|
|
143
|
-
onRowClick:
|
|
144
|
-
pivotYear:
|
|
145
|
-
rowActions:
|
|
146
|
-
emptyLabel:
|
|
147
|
-
emptyText:
|
|
161
|
+
function Lt({
|
|
162
|
+
rows: s,
|
|
163
|
+
config: t,
|
|
164
|
+
onRowClick: m,
|
|
165
|
+
pivotYear: c,
|
|
166
|
+
rowActions: u,
|
|
167
|
+
emptyLabel: g,
|
|
168
|
+
emptyText: y
|
|
148
169
|
}) {
|
|
149
|
-
var
|
|
150
|
-
const [
|
|
151
|
-
() => new Set(((
|
|
152
|
-
), [
|
|
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(
|
|
172
|
+
() => new Set(((t == null ? void 0 : t.toggles) ?? []).filter((e) => e.default_on === !1).map((e) => e.label))
|
|
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 =
|
|
161
|
-
|
|
162
|
-
(
|
|
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;
|
|
182
|
+
Xe(
|
|
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
|
-
const
|
|
167
|
-
return
|
|
168
|
-
|
|
187
|
+
const r = new ResizeObserver(e);
|
|
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__ */
|
|
172
|
-
let
|
|
173
|
-
if (
|
|
174
|
-
const e =
|
|
175
|
-
|
|
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") });
|
|
193
|
+
let xe = null;
|
|
194
|
+
if (t != null && t.pivot) {
|
|
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
|
|
178
|
-
if (
|
|
179
|
-
const e =
|
|
180
|
-
for (const a of
|
|
181
|
-
const n = String(a[e] ?? "—"), l =
|
|
198
|
+
let S = s;
|
|
199
|
+
if (t != null && t.group_by) {
|
|
200
|
+
const e = t.group_by, r = /* @__PURE__ */ new Map();
|
|
201
|
+
for (const a of s) {
|
|
202
|
+
const n = String(a[e] ?? "—"), l = r.get(n);
|
|
182
203
|
if (!l) {
|
|
183
|
-
|
|
204
|
+
r.set(n, { ...a, [e]: n });
|
|
184
205
|
continue;
|
|
185
206
|
}
|
|
186
|
-
for (const [
|
|
187
|
-
if (
|
|
188
|
-
const
|
|
189
|
-
Number.isFinite(
|
|
207
|
+
for (const [d, b] of Object.entries(a)) {
|
|
208
|
+
if (d === e) continue;
|
|
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
|
-
const
|
|
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
|
-
...(
|
|
198
|
-
...
|
|
199
|
-
] :
|
|
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 })),
|
|
219
|
+
...xe
|
|
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
|
-
for (const
|
|
203
|
-
|
|
204
|
-
for (const
|
|
205
|
-
const a = !
|
|
206
|
-
if (
|
|
223
|
+
for (const r of Fe)
|
|
224
|
+
r.field && e.push(r.field), r.stack && e.push(r.stack);
|
|
225
|
+
for (const r of (t == null ? void 0 : t.toggles) ?? []) {
|
|
226
|
+
const a = !V.has(r.label);
|
|
227
|
+
if (r.hide_when_on ? a : !a)
|
|
207
228
|
for (const l of e)
|
|
208
|
-
((
|
|
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
|
|
214
|
-
return !(
|
|
215
|
-
}),
|
|
234
|
+
const r = Y.has(e.field), a = e.stack ? Y.has(e.stack) : !0;
|
|
235
|
+
return !(r && a);
|
|
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,75 +246,88 @@ function st({
|
|
|
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
|
-
const a = e.color_negative && typeof
|
|
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
|
-
},
|
|
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
|
-
const [
|
|
235
|
-
return { "--qts":
|
|
236
|
-
},
|
|
255
|
+
const [r, a] = Ce(e.stack_color, e.stack_color_dark);
|
|
256
|
+
return { "--qts": r, "--qtsd": a };
|
|
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
|
-
for (const
|
|
239
|
-
!
|
|
240
|
-
|
|
241
|
-
|
|
259
|
+
for (const r of (t == null ? void 0 : t.columns) ?? [])
|
|
260
|
+
!r.percent_of_total || !r.field || e.set(
|
|
261
|
+
r.field,
|
|
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
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
a
|
|
275
|
-
|
|
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) => {
|
|
288
|
+
const a = e[r];
|
|
289
|
+
return a != null && a !== "" && Number(a) !== 0;
|
|
290
|
+
})
|
|
291
|
+
));
|
|
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);
|
|
297
|
+
})
|
|
298
|
+
));
|
|
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)
|
|
304
|
+
));
|
|
276
305
|
}
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
306
|
+
const rt = (e) => h(
|
|
307
|
+
(r) => !r || r.key !== e ? { key: e, dir: 1 } : r.dir === 1 ? { key: e, dir: -1 } : null
|
|
308
|
+
);
|
|
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;
|
|
313
|
+
const a = e[t.row_format_field];
|
|
314
|
+
return a === "currency" || a === "number" ? a : r.format;
|
|
315
|
+
}, J = (e, r) => t != null && t.zero_dash && Number(e) === 0 ? "—" : ae(e, r), ue = (e, r) => {
|
|
282
316
|
var n;
|
|
283
|
-
if ((n =
|
|
284
|
-
const l =
|
|
285
|
-
(
|
|
317
|
+
if ((n = r.sparkline_fields) != null && n.length) {
|
|
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}`
|
|
286
320
|
).join(" ");
|
|
287
|
-
return /* @__PURE__ */
|
|
321
|
+
return /* @__PURE__ */ o(
|
|
288
322
|
"svg",
|
|
289
323
|
{
|
|
290
324
|
viewBox: "0 0 60 18",
|
|
291
325
|
className: "inline-block h-[18px] w-[60px]",
|
|
292
|
-
"data-tip": l.map((
|
|
293
|
-
children: /* @__PURE__ */
|
|
326
|
+
"data-tip": l.map((i) => ae(i, r.format)).join(" · "),
|
|
327
|
+
children: /* @__PURE__ */ o(
|
|
294
328
|
"polyline",
|
|
295
329
|
{
|
|
296
|
-
points:
|
|
330
|
+
points: D,
|
|
297
331
|
fill: "none",
|
|
298
332
|
stroke: "#00a5cc",
|
|
299
333
|
strokeWidth: "1.5",
|
|
@@ -303,202 +337,202 @@ function st({
|
|
|
303
337
|
}
|
|
304
338
|
);
|
|
305
339
|
}
|
|
306
|
-
if (
|
|
307
|
-
const l = Number(
|
|
340
|
+
if (r.percent_of_total && r.field) {
|
|
341
|
+
const l = Number(T(e, r)), d = et.get(r.field) ?? 0, b = d > 0 && Number.isFinite(l) ? l / d * 100 : null;
|
|
308
342
|
return /* @__PURE__ */ p("span", { className: "inline-flex items-baseline gap-1", children: [
|
|
309
|
-
T(
|
|
343
|
+
J(T(e, r), r.format),
|
|
310
344
|
b != null && /* @__PURE__ */ p("span", { className: "text-[9.5px] text-slate-400", children: [
|
|
311
345
|
b.toLocaleString("en-US", { maximumFractionDigits: 1 }),
|
|
312
346
|
"%"
|
|
313
347
|
] })
|
|
314
348
|
] });
|
|
315
349
|
}
|
|
316
|
-
if (
|
|
317
|
-
if (
|
|
318
|
-
return /* @__PURE__ */ p("span", { className: "inline-flex flex-col items-end leading-[15px]", style:
|
|
319
|
-
|
|
320
|
-
|
|
350
|
+
if (r.display === "progress") return tt(e, r);
|
|
351
|
+
if (r.stack)
|
|
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(
|
|
321
355
|
"span",
|
|
322
356
|
{
|
|
323
|
-
className: `text-[10.5px] ${
|
|
324
|
-
children:
|
|
357
|
+
className: `text-[10.5px] ${r.stack_color ? "text-[color:var(--qts)] dark:text-[color:var(--qtsd)]" : "text-slate-400"}`,
|
|
358
|
+
children: qe(J(e[r.stack], Ne(e, r)))
|
|
325
359
|
}
|
|
326
360
|
)
|
|
327
361
|
] });
|
|
328
|
-
const a =
|
|
329
|
-
return
|
|
330
|
-
},
|
|
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 = [];
|
|
331
365
|
{
|
|
332
|
-
let e = -1,
|
|
333
|
-
for (const a of
|
|
334
|
-
a.group && a.group !==
|
|
366
|
+
let e = -1, r;
|
|
367
|
+
for (const a of f)
|
|
368
|
+
a.group && a.group !== r && e++, ge.push(a.group ? e : -1), r = a.group;
|
|
335
369
|
}
|
|
336
|
-
const
|
|
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) => {
|
|
337
371
|
const l = a === !0 ? 1 : a === !1 ? 0 : a;
|
|
338
372
|
return /* @__PURE__ */ p(
|
|
339
373
|
"tr",
|
|
340
374
|
{
|
|
341
|
-
onClick:
|
|
342
|
-
className: `group/qtr border-b border-slate-100 dark:border-border/50 ${
|
|
375
|
+
onClick: m ? () => m(e) : void 0,
|
|
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"}`,
|
|
343
377
|
children: [
|
|
344
|
-
|
|
378
|
+
f.map((d, b) => /* @__PURE__ */ o(
|
|
345
379
|
"td",
|
|
346
380
|
{
|
|
347
|
-
className: `whitespace-nowrap py-1.5 pr-3 ${
|
|
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")}`,
|
|
348
382
|
style: {
|
|
349
383
|
...l > 0 && b === 0 ? { paddingLeft: 2 + l * 16 } : {},
|
|
350
|
-
...
|
|
351
|
-
...
|
|
384
|
+
...d.max_width ? { maxWidth: d.max_width } : {},
|
|
385
|
+
...X(d, Number(T(e, d))) ?? {}
|
|
352
386
|
},
|
|
353
|
-
title:
|
|
354
|
-
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)
|
|
355
389
|
},
|
|
356
|
-
|
|
390
|
+
d.field ?? d.label ?? b
|
|
357
391
|
)),
|
|
358
|
-
|
|
392
|
+
u && /* @__PURE__ */ o(
|
|
359
393
|
"td",
|
|
360
394
|
{
|
|
361
|
-
className: `py-1 pl-2 pr-3 text-right ${
|
|
395
|
+
className: `py-1 pl-2 pr-3 text-right ${$e(
|
|
362
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"
|
|
363
397
|
)}`,
|
|
364
|
-
children: /* @__PURE__ */
|
|
398
|
+
children: /* @__PURE__ */ o("span", { className: "inline-flex flex-nowrap gap-1", children: u.map((d) => /* @__PURE__ */ o(
|
|
365
399
|
"button",
|
|
366
400
|
{
|
|
367
401
|
type: "button",
|
|
368
402
|
onClick: (b) => {
|
|
369
|
-
b.stopPropagation(),
|
|
403
|
+
b.stopPropagation(), d.onClick(e);
|
|
370
404
|
},
|
|
371
405
|
className: "whitespace-nowrap rounded border border-nvr-cyan/40 bg-nvr-cyan/10 px-1.5 py-0.5 text-[11px] text-slate-700 hover:brightness-105 dark:text-slate-200",
|
|
372
|
-
children:
|
|
406
|
+
children: d.label
|
|
373
407
|
},
|
|
374
|
-
|
|
408
|
+
d.label
|
|
375
409
|
)) })
|
|
376
410
|
}
|
|
377
411
|
)
|
|
378
412
|
]
|
|
379
413
|
},
|
|
380
|
-
|
|
414
|
+
r
|
|
381
415
|
);
|
|
382
416
|
};
|
|
383
|
-
let
|
|
384
|
-
const
|
|
385
|
-
if (
|
|
386
|
-
const e =
|
|
387
|
-
for (const l of
|
|
388
|
-
const
|
|
389
|
-
if (!
|
|
390
|
-
const b = a.get(
|
|
391
|
-
b.push(l), a.set(
|
|
417
|
+
let _e;
|
|
418
|
+
const Q = [];
|
|
419
|
+
if (t != null && t.tree_group_by) {
|
|
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) {
|
|
422
|
+
const d = String(l[e] ?? "").trim();
|
|
423
|
+
if (!d) continue;
|
|
424
|
+
const b = a.get(d) ?? [];
|
|
425
|
+
b.push(l), a.set(d, b);
|
|
392
426
|
}
|
|
393
|
-
const n = [...a.entries()].sort(([l], [
|
|
394
|
-
const b =
|
|
395
|
-
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
const
|
|
399
|
-
return Number.isFinite(
|
|
427
|
+
const n = [...a.entries()].sort(([l], [d]) => l.localeCompare(d)).map(([l, d]) => {
|
|
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;
|
|
400
434
|
}, 0);
|
|
401
435
|
};
|
|
402
|
-
for (const
|
|
403
|
-
|
|
404
|
-
return /* @__PURE__ */
|
|
405
|
-
|
|
436
|
+
for (const i of f)
|
|
437
|
+
i.field && i.field !== e && D(i.field), i.stack && D(i.stack);
|
|
438
|
+
return /* @__PURE__ */ o(
|
|
439
|
+
Qe,
|
|
406
440
|
{
|
|
407
441
|
header: /* @__PURE__ */ p(
|
|
408
442
|
"tr",
|
|
409
443
|
{
|
|
410
444
|
className: "cursor-pointer border-b border-slate-200 bg-slate-100/80 dark:border-border dark:bg-muted",
|
|
411
|
-
onClick: () =>
|
|
412
|
-
const
|
|
413
|
-
return
|
|
445
|
+
onClick: () => L((i) => {
|
|
446
|
+
const N = new Set(i);
|
|
447
|
+
return N.has(l) ? N.delete(l) : N.add(l), N;
|
|
414
448
|
}),
|
|
415
449
|
children: [
|
|
416
|
-
|
|
450
|
+
f.map((i, N) => /* @__PURE__ */ o(
|
|
417
451
|
"td",
|
|
418
452
|
{
|
|
419
|
-
className: `whitespace-nowrap py-1.5 pr-3 ${
|
|
420
|
-
style:
|
|
421
|
-
|
|
422
|
-
Number(
|
|
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(
|
|
455
|
+
i,
|
|
456
|
+
Number(i.formula ? j(i.formula, F) : F[i.field ?? ""])
|
|
423
457
|
),
|
|
424
|
-
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) : ""
|
|
425
459
|
},
|
|
426
|
-
|
|
460
|
+
i.field ?? i.label ?? N
|
|
427
461
|
)),
|
|
428
|
-
|
|
462
|
+
u && /* @__PURE__ */ o("td", { className: $e("bg-slate-100 dark:bg-muted") })
|
|
429
463
|
]
|
|
430
464
|
}
|
|
431
465
|
),
|
|
432
466
|
children: !b && (() => {
|
|
433
|
-
const
|
|
434
|
-
if (!
|
|
435
|
-
return
|
|
436
|
-
var
|
|
437
|
-
let
|
|
438
|
-
if (
|
|
439
|
-
const
|
|
440
|
-
|
|
467
|
+
const i = t.tree_sub_split;
|
|
468
|
+
if (!i)
|
|
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));
|
|
441
475
|
}
|
|
442
|
-
return
|
|
476
|
+
return re(E, `${l}-${U}`, 1, C);
|
|
443
477
|
});
|
|
444
|
-
const
|
|
445
|
-
for (const
|
|
446
|
-
const
|
|
447
|
-
if (
|
|
448
|
-
|
|
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);
|
|
449
483
|
continue;
|
|
450
484
|
}
|
|
451
|
-
const
|
|
452
|
-
|
|
485
|
+
const H = U.slice(0, C), R = P.get(H) ?? [];
|
|
486
|
+
R.push(E), P.set(H, R);
|
|
453
487
|
}
|
|
454
488
|
return [
|
|
455
|
-
...
|
|
456
|
-
...[...
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
key:
|
|
460
|
-
startsCollapsed:
|
|
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,
|
|
494
|
+
startsCollapsed: t.tree_sub_collapsed ?? !0
|
|
461
495
|
});
|
|
462
|
-
const
|
|
463
|
-
|
|
464
|
-
const
|
|
465
|
-
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 : _;
|
|
466
500
|
}, 0);
|
|
467
501
|
};
|
|
468
|
-
for (const
|
|
469
|
-
|
|
470
|
-
return /* @__PURE__ */
|
|
471
|
-
|
|
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,
|
|
472
506
|
{
|
|
473
507
|
header: /* @__PURE__ */ p(
|
|
474
508
|
"tr",
|
|
475
509
|
{
|
|
476
510
|
className: "cursor-pointer border-b border-slate-200/80 bg-slate-100/70 dark:border-border/60 dark:bg-muted/50",
|
|
477
|
-
onClick: () =>
|
|
478
|
-
const
|
|
479
|
-
return
|
|
511
|
+
onClick: () => L((x) => {
|
|
512
|
+
const _ = new Set(x);
|
|
513
|
+
return _.has(C) ? _.delete(C) : _.add(C), _;
|
|
480
514
|
}),
|
|
481
515
|
children: [
|
|
482
|
-
|
|
516
|
+
f.map((x, _) => /* @__PURE__ */ o(
|
|
483
517
|
"td",
|
|
484
518
|
{
|
|
485
|
-
className: `whitespace-nowrap py-1.5 pr-3 ${
|
|
486
|
-
style:
|
|
487
|
-
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) : ""
|
|
488
522
|
},
|
|
489
|
-
|
|
523
|
+
x.field ?? x.label ?? _
|
|
490
524
|
)),
|
|
491
|
-
|
|
525
|
+
u && /* @__PURE__ */ o("td", { className: $e("bg-slate-100 dark:bg-muted") })
|
|
492
526
|
]
|
|
493
527
|
}
|
|
494
528
|
),
|
|
495
|
-
children: !
|
|
496
|
-
var
|
|
497
|
-
const
|
|
498
|
-
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);
|
|
499
533
|
})
|
|
500
534
|
},
|
|
501
|
-
|
|
535
|
+
C
|
|
502
536
|
);
|
|
503
537
|
})
|
|
504
538
|
];
|
|
@@ -507,149 +541,230 @@ function st({
|
|
|
507
541
|
l
|
|
508
542
|
);
|
|
509
543
|
});
|
|
510
|
-
|
|
544
|
+
_e = [...r.map((l, d) => re(l, `flat-${d}`)), ...n];
|
|
511
545
|
} else
|
|
512
|
-
|
|
513
|
-
const
|
|
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(
|
|
514
548
|
new Set(
|
|
515
|
-
|
|
549
|
+
Q.filter((r) => e ? r.startsCollapsed : !r.startsCollapsed).map((r) => r.key)
|
|
516
550
|
)
|
|
517
|
-
),
|
|
551
|
+
), Me = Q.length > 0 ? /* @__PURE__ */ p(
|
|
518
552
|
"button",
|
|
519
553
|
{
|
|
520
554
|
type: "button",
|
|
521
|
-
"data-query-tree-toggle":
|
|
522
|
-
onClick: () =>
|
|
555
|
+
"data-query-tree-toggle": be ? "collapse" : "expand",
|
|
556
|
+
onClick: () => st(!be),
|
|
523
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",
|
|
524
558
|
children: [
|
|
525
|
-
|
|
526
|
-
|
|
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"
|
|
527
561
|
]
|
|
528
562
|
}
|
|
529
|
-
) : null
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
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: [
|
|
564
|
+
(t == null ? void 0 : t.search) && /* @__PURE__ */ p("label", { className: "relative inline-flex items-center", children: [
|
|
565
|
+
/* @__PURE__ */ o(
|
|
566
|
+
dt,
|
|
567
|
+
{
|
|
568
|
+
className: "pointer-events-none absolute left-2 h-3.5 w-3.5 text-slate-400",
|
|
569
|
+
"aria-hidden": !0
|
|
570
|
+
}
|
|
571
|
+
),
|
|
572
|
+
/* @__PURE__ */ o(
|
|
573
|
+
"input",
|
|
574
|
+
{
|
|
575
|
+
type: "search",
|
|
576
|
+
value: A,
|
|
577
|
+
onChange: (e) => w(e.target.value),
|
|
578
|
+
placeholder: "Search rows",
|
|
579
|
+
"aria-label": "Search rows",
|
|
580
|
+
"data-qt-search": "",
|
|
581
|
+
className: "h-7 w-48 rounded-md border border-slate-200 bg-white pl-7 pr-2 text-[12px] text-slate-700 outline-none placeholder:text-slate-400 focus:border-nvr-cyan dark:border-border dark:bg-background dark:text-slate-200"
|
|
582
|
+
}
|
|
583
|
+
)
|
|
584
|
+
] }),
|
|
585
|
+
Z.length > 0 && /* @__PURE__ */ o(
|
|
586
|
+
"button",
|
|
587
|
+
{
|
|
588
|
+
type: "button",
|
|
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"}`,
|
|
593
|
+
children: ((We = t == null ? void 0 : t.hide_empty) == null ? void 0 : We.label) ?? "Hide empty rows"
|
|
594
|
+
}
|
|
595
|
+
),
|
|
596
|
+
(ie || z && Z.length > 0) && /* @__PURE__ */ p(
|
|
597
|
+
"span",
|
|
598
|
+
{
|
|
599
|
+
className: "text-[11.5px] tabular-nums text-slate-500 dark:text-slate-400",
|
|
600
|
+
"data-qt-shown": "",
|
|
601
|
+
children: [
|
|
602
|
+
S.length.toLocaleString("en-US"),
|
|
603
|
+
" of ",
|
|
604
|
+
s.length.toLocaleString("en-US"),
|
|
605
|
+
" rows"
|
|
606
|
+
]
|
|
607
|
+
}
|
|
608
|
+
),
|
|
609
|
+
(t == null ? void 0 : t.export_csv) && /* @__PURE__ */ p(
|
|
610
|
+
"button",
|
|
611
|
+
{
|
|
612
|
+
type: "button",
|
|
613
|
+
"data-qt-csv": "",
|
|
614
|
+
onClick: () => St(
|
|
615
|
+
ot,
|
|
616
|
+
_t(
|
|
617
|
+
f.filter((e) => fe(e) || !e.field),
|
|
618
|
+
S,
|
|
619
|
+
T,
|
|
620
|
+
(e) => e.label ?? le(e.field ?? "")
|
|
621
|
+
)
|
|
622
|
+
),
|
|
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",
|
|
624
|
+
children: [
|
|
625
|
+
/* @__PURE__ */ o(it, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
626
|
+
"CSV"
|
|
627
|
+
]
|
|
628
|
+
}
|
|
629
|
+
)
|
|
630
|
+
] }) : null;
|
|
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(
|
|
535
637
|
"button",
|
|
536
638
|
{
|
|
537
639
|
type: "button",
|
|
538
|
-
"aria-pressed":
|
|
539
|
-
onClick: () =>
|
|
640
|
+
"aria-pressed": r,
|
|
641
|
+
onClick: () => O((a) => {
|
|
540
642
|
const n = new Set(a);
|
|
541
643
|
return n.has(e.label) ? n.delete(e.label) : n.add(e.label), n;
|
|
542
644
|
}),
|
|
543
|
-
className: `whitespace-nowrap rounded px-2.5 py-1 text-[11.5px] font-medium transition-colors ${
|
|
645
|
+
className: `whitespace-nowrap rounded px-2.5 py-1 text-[11.5px] font-medium transition-colors ${r ? "bg-nvr-cyan text-white shadow-sm" : "text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200"}`,
|
|
544
646
|
children: e.label
|
|
545
647
|
},
|
|
546
648
|
e.label
|
|
547
649
|
);
|
|
548
|
-
}) }) : /* @__PURE__ */
|
|
650
|
+
}) }) : /* @__PURE__ */ o("span", {}),
|
|
549
651
|
/* @__PURE__ */ p("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
550
|
-
|
|
551
|
-
((
|
|
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(
|
|
552
654
|
"button",
|
|
553
655
|
{
|
|
554
656
|
type: "button",
|
|
555
|
-
onClick: () =>
|
|
556
|
-
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"}`,
|
|
557
659
|
children: e === "month" ? "Monthly" : "Quarterly"
|
|
558
660
|
},
|
|
559
661
|
e
|
|
560
662
|
)) })
|
|
561
663
|
] })
|
|
562
664
|
] }),
|
|
563
|
-
/* @__PURE__ */ p("div", { className:
|
|
564
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ p("div", { className: $ ? "relative flex min-h-0 flex-1 flex-col" : "relative", children: [
|
|
666
|
+
/* @__PURE__ */ o(
|
|
565
667
|
"div",
|
|
566
668
|
{
|
|
567
|
-
ref:
|
|
568
|
-
className:
|
|
669
|
+
ref: Ye,
|
|
670
|
+
className: $ ? "min-h-0 flex-1 overflow-auto" : "overflow-x-auto",
|
|
569
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: [
|
|
570
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ o("thead", { children: Oe ? /* @__PURE__ */ p(Pe, { children: [
|
|
571
673
|
/* @__PURE__ */ p("tr", { children: [
|
|
572
674
|
(() => {
|
|
573
675
|
const e = [];
|
|
574
|
-
let
|
|
575
|
-
for (;
|
|
576
|
-
const a =
|
|
676
|
+
let r = 0;
|
|
677
|
+
for (; r < f.length; ) {
|
|
678
|
+
const a = f[r];
|
|
577
679
|
if (!a.group) {
|
|
578
680
|
e.push(
|
|
579
|
-
/* @__PURE__ */
|
|
681
|
+
/* @__PURE__ */ o(
|
|
580
682
|
"th",
|
|
581
683
|
{
|
|
582
684
|
rowSpan: 2,
|
|
583
|
-
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 ${
|
|
584
|
-
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 ?? "")
|
|
585
687
|
},
|
|
586
|
-
`u-${a.field ??
|
|
688
|
+
`u-${a.field ?? r}`
|
|
587
689
|
)
|
|
588
|
-
),
|
|
690
|
+
), r++;
|
|
589
691
|
continue;
|
|
590
692
|
}
|
|
591
693
|
let n = 1;
|
|
592
|
-
for (;
|
|
694
|
+
for (; r + n < f.length && f[r + n].group === a.group; )
|
|
593
695
|
n++;
|
|
594
696
|
e.push(
|
|
595
|
-
/* @__PURE__ */
|
|
697
|
+
/* @__PURE__ */ o(
|
|
596
698
|
"th",
|
|
597
699
|
{
|
|
598
700
|
colSpan: n,
|
|
599
|
-
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(),
|
|
600
702
|
children: a.group
|
|
601
703
|
},
|
|
602
|
-
`g-${a.group}-${
|
|
704
|
+
`g-${a.group}-${r}`
|
|
603
705
|
)
|
|
604
|
-
),
|
|
706
|
+
), r += n;
|
|
605
707
|
}
|
|
606
708
|
return e;
|
|
607
709
|
})(),
|
|
608
|
-
|
|
710
|
+
u && /* @__PURE__ */ o(
|
|
609
711
|
"th",
|
|
610
712
|
{
|
|
611
713
|
rowSpan: 2,
|
|
612
714
|
"aria-label": "Actions",
|
|
613
715
|
"data-qt-actions-head": "",
|
|
614
|
-
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` : ""}`
|
|
615
717
|
}
|
|
616
718
|
)
|
|
617
719
|
] }),
|
|
618
|
-
/* @__PURE__ */
|
|
619
|
-
(e,
|
|
720
|
+
/* @__PURE__ */ o("tr", { children: f.map(
|
|
721
|
+
(e, r) => e.group ? /* @__PURE__ */ o(
|
|
620
722
|
"th",
|
|
621
723
|
{
|
|
622
|
-
className: `min-w-[58px] whitespace-nowrap border-b border-slate-200 py-1 pr-3 ${
|
|
623
|
-
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 ?? "")
|
|
624
726
|
},
|
|
625
|
-
e.field ?? e.label ??
|
|
727
|
+
e.field ?? e.label ?? r
|
|
626
728
|
) : null
|
|
627
729
|
) })
|
|
628
730
|
] }) : /* @__PURE__ */ p("tr", { className: "border-b border-slate-200 dark:border-border", children: [
|
|
629
|
-
|
|
731
|
+
f.map((e, r) => /* @__PURE__ */ p(
|
|
630
732
|
"th",
|
|
631
733
|
{
|
|
632
|
-
className: `whitespace-nowrap border-b border-slate-200 py-1.5 pr-3 ${
|
|
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,
|
|
633
736
|
children: [
|
|
634
|
-
|
|
635
|
-
|
|
737
|
+
ve ? /* @__PURE__ */ p(
|
|
738
|
+
"button",
|
|
739
|
+
{
|
|
740
|
+
type: "button",
|
|
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" : ""}`,
|
|
744
|
+
children: [
|
|
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 }))
|
|
747
|
+
]
|
|
748
|
+
}
|
|
749
|
+
) : e.label ?? le(e.field ?? ""),
|
|
750
|
+
e.stack && (t == null ? void 0 : t.stack_legend) && /* @__PURE__ */ p(
|
|
636
751
|
"span",
|
|
637
752
|
{
|
|
638
753
|
className: "flex justify-end gap-1.5 text-[9px] font-medium normal-case tracking-normal",
|
|
639
|
-
style:
|
|
754
|
+
style: ye(e) ? { ...ye(e), ...X(e) ?? {} } : X(e),
|
|
640
755
|
children: [
|
|
641
|
-
|
|
756
|
+
fe(e) && /* @__PURE__ */ o(
|
|
642
757
|
"span",
|
|
643
758
|
{
|
|
644
759
|
className: e.color ? "text-[color:var(--qtc)] dark:text-[color:var(--qtcd)]" : "",
|
|
645
|
-
children:
|
|
760
|
+
children: t.stack_legend[0]
|
|
646
761
|
}
|
|
647
762
|
),
|
|
648
|
-
|
|
763
|
+
Ee(e) && /* @__PURE__ */ o(
|
|
649
764
|
"span",
|
|
650
765
|
{
|
|
651
766
|
className: e.stack_color ? "text-[color:var(--qts)] dark:text-[color:var(--qtsd)]" : "",
|
|
652
|
-
children:
|
|
767
|
+
children: t.stack_legend[1]
|
|
653
768
|
}
|
|
654
769
|
)
|
|
655
770
|
]
|
|
@@ -657,38 +772,38 @@ function st({
|
|
|
657
772
|
)
|
|
658
773
|
]
|
|
659
774
|
},
|
|
660
|
-
e.field ?? e.label ??
|
|
775
|
+
e.field ?? e.label ?? r
|
|
661
776
|
)),
|
|
662
|
-
|
|
777
|
+
u && /* @__PURE__ */ o(
|
|
663
778
|
"th",
|
|
664
779
|
{
|
|
665
780
|
"aria-label": "Actions",
|
|
666
781
|
"data-qt-actions-head": "",
|
|
667
|
-
className:
|
|
782
|
+
className: $ ? `sticky right-0 top-0 z-[3] ${me} bg-white dark:bg-card` : void 0
|
|
668
783
|
}
|
|
669
784
|
)
|
|
670
785
|
] }) }),
|
|
671
|
-
/* @__PURE__ */
|
|
672
|
-
|
|
673
|
-
|
|
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(
|
|
674
789
|
"td",
|
|
675
790
|
{
|
|
676
|
-
className: `whitespace-nowrap py-1.5 pr-3 ${
|
|
677
|
-
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(
|
|
678
793
|
e,
|
|
679
794
|
Number(
|
|
680
|
-
e.formula ?
|
|
795
|
+
e.formula ? j(e.formula, B) : B[e.field ?? ""]
|
|
681
796
|
)
|
|
682
797
|
),
|
|
683
|
-
children:
|
|
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) : ""
|
|
684
799
|
},
|
|
685
|
-
e.field ?? e.label ??
|
|
800
|
+
e.field ?? e.label ?? r
|
|
686
801
|
)),
|
|
687
|
-
|
|
802
|
+
u && /* @__PURE__ */ o(
|
|
688
803
|
"td",
|
|
689
804
|
{
|
|
690
|
-
className: `py-1.5 pr-3 text-right ${
|
|
691
|
-
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(
|
|
692
807
|
"button",
|
|
693
808
|
{
|
|
694
809
|
type: "button",
|
|
@@ -704,30 +819,57 @@ function st({
|
|
|
704
819
|
] })
|
|
705
820
|
}
|
|
706
821
|
),
|
|
707
|
-
|
|
822
|
+
oe.canScrollRight && // More columns to the right: fade the edge so readers know the
|
|
708
823
|
// table scrolls sideways (the native scrollbar is often invisible).
|
|
709
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ o(
|
|
710
825
|
"div",
|
|
711
826
|
{
|
|
712
827
|
"aria-hidden": !0,
|
|
713
828
|
"data-qt-scroll-cue": "",
|
|
714
829
|
className: "pointer-events-none absolute top-0 w-10 bg-gradient-to-r from-transparent to-white dark:to-card",
|
|
715
|
-
style: { right:
|
|
830
|
+
style: { right: oe.cueInset.right, bottom: oe.cueInset.bottom }
|
|
716
831
|
}
|
|
717
832
|
)
|
|
718
833
|
] })
|
|
719
834
|
] });
|
|
720
835
|
}
|
|
721
|
-
function
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
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;
|
|
843
|
+
}
|
|
844
|
+
function _t(s, t, m, c) {
|
|
845
|
+
const u = (y) => {
|
|
846
|
+
if (y == null) 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
|
|
852
|
+
`)}\r
|
|
853
|
+
`;
|
|
854
|
+
}
|
|
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);
|
|
858
|
+
}
|
|
859
|
+
function Qe({ header: s, children: t }) {
|
|
860
|
+
return /* @__PURE__ */ p(Pe, { children: [
|
|
861
|
+
s,
|
|
862
|
+
t
|
|
725
863
|
] });
|
|
726
864
|
}
|
|
727
865
|
export {
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
866
|
+
Se as COLOR_ROLES,
|
|
867
|
+
Lt as QueryTable,
|
|
868
|
+
vt as UNDATED_KEY,
|
|
869
|
+
Ce as colorPair,
|
|
870
|
+
ft as darkVariant,
|
|
871
|
+
Nt as pivotQueryRows,
|
|
872
|
+
_t as queryTableCsv,
|
|
873
|
+
wt as queryTableTotals,
|
|
874
|
+
$t as sortCompare
|
|
733
875
|
};
|