@object-ui/plugin-report 4.3.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/index.js +605 -620
- package/dist/index.umd.cjs +17 -17
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -2,57 +2,57 @@ import { ComponentRegistry as e } from "@object-ui/core";
|
|
|
2
2
|
import * as t from "react";
|
|
3
3
|
import n, { useCallback as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
4
4
|
import { isJoinedSpecReport as c, isSpecReport as l } from "@object-ui/types";
|
|
5
|
-
import { Badge as u, Button as d, Card as f, CardContent as p, CardDescription as m, CardHeader as h, CardTitle as g, Checkbox as _, ConfigPanelRenderer as v, Dialog as y, DialogContent as b, DialogDescription as x, DialogFooter as S, DialogHeader as C, DialogTitle as w, DialogTrigger as T, Input as E, Label as D, Skeleton as O, Tabs as k, TabsContent as A, TabsList as j, TabsTrigger as M, useConfigDraft as ee } from "@object-ui/components";
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { useTranslation as
|
|
8
|
-
import { ObjectGrid as
|
|
9
|
-
import { useSafeFieldLabel as
|
|
10
|
-
import { SchemaRenderer as
|
|
11
|
-
import { AlertTriangle as
|
|
5
|
+
import { Badge as u, Button as d, Card as f, CardContent as p, CardDescription as m, CardHeader as h, CardTitle as g, Checkbox as _, ConfigPanelRenderer as v, Dialog as y, DialogContent as b, DialogDescription as x, DialogFooter as S, DialogHeader as C, DialogTitle as w, DialogTrigger as T, Input as E, Label as D, Skeleton as O, Tabs as k, TabsContent as A, TabsList as j, TabsTrigger as M, cn as N, useConfigDraft as ee } from "@object-ui/components";
|
|
6
|
+
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
7
|
+
import { useTranslation as L } from "react-i18next";
|
|
8
|
+
import { ObjectGrid as R } from "@object-ui/plugin-grid";
|
|
9
|
+
import { useSafeFieldLabel as z } from "@object-ui/i18n";
|
|
10
|
+
import { SchemaRenderer as B } from "@object-ui/react";
|
|
11
|
+
import { AlertTriangle as V, ArrowDown as H, ArrowUp as U, Calendar as te, ChevronDown as ne, ChevronRight as re, Clock as ie, Download as ae, Filter as oe, Layers as se, Mail as ce, Plus as W, Printer as le, RefreshCw as ue, Save as de, Search as fe, Settings as pe, Trash2 as G } from "lucide-react";
|
|
12
12
|
import { getCellRenderer as me, resolveCellRendererType as he } from "@object-ui/fields";
|
|
13
13
|
//#region src/LegacyReportRenderer.tsx
|
|
14
14
|
var ge = ({ schema: t }) => {
|
|
15
15
|
let { title: n, description: r, data: i, columns: a } = t;
|
|
16
16
|
t.chart?.type;
|
|
17
17
|
let o = !!t.chart;
|
|
18
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ I(f, {
|
|
19
19
|
className: `h-full flex flex-col ${t.className || ""}`,
|
|
20
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ I(h, { children: [n && /* @__PURE__ */ F(g, { children: n }), r && /* @__PURE__ */ F(m, { children: r })] }), /* @__PURE__ */ I(p, {
|
|
21
21
|
className: "flex-1 overflow-auto space-y-4",
|
|
22
22
|
children: [o && (() => {
|
|
23
23
|
let n = t.chart?.type, r = n ? e.get(n) : null;
|
|
24
|
-
return r ||= e.get("chart"), r ? /* @__PURE__ */
|
|
24
|
+
return r ||= e.get("chart"), r ? /* @__PURE__ */ F("div", {
|
|
25
25
|
className: "min-h-[300px] border rounded-lg p-4 bg-background/50",
|
|
26
|
-
children: /* @__PURE__ */
|
|
26
|
+
children: /* @__PURE__ */ F(r, { schema: {
|
|
27
27
|
...t.chart,
|
|
28
28
|
data: t.chart.data || i
|
|
29
29
|
} })
|
|
30
|
-
}) : /* @__PURE__ */
|
|
30
|
+
}) : /* @__PURE__ */ I("div", {
|
|
31
31
|
className: "min-h-[100px] border rounded-md p-4 bg-muted/20 text-muted-foreground flex items-center justify-center",
|
|
32
32
|
children: ["Unknown component type: ", n || "chart"]
|
|
33
33
|
});
|
|
34
|
-
})(), i && i.length > 0 && /* @__PURE__ */
|
|
34
|
+
})(), i && i.length > 0 && /* @__PURE__ */ F("div", {
|
|
35
35
|
className: "border rounded-lg",
|
|
36
36
|
children: (() => {
|
|
37
37
|
let t = e.get("aggrid") || e.get("table");
|
|
38
|
-
return t ? /* @__PURE__ */
|
|
38
|
+
return t ? /* @__PURE__ */ F(t, { schema: {
|
|
39
39
|
type: "aggrid",
|
|
40
40
|
rowData: i,
|
|
41
41
|
columnDefs: a,
|
|
42
42
|
domLayout: "autoHeight"
|
|
43
|
-
} }) : /* @__PURE__ */
|
|
43
|
+
} }) : /* @__PURE__ */ F("div", {
|
|
44
44
|
className: "overflow-x-auto",
|
|
45
|
-
children: /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ I("table", {
|
|
46
46
|
className: "w-full text-sm text-left",
|
|
47
|
-
children: [/* @__PURE__ */
|
|
47
|
+
children: [/* @__PURE__ */ F("thead", {
|
|
48
48
|
className: "text-xs uppercase bg-muted",
|
|
49
|
-
children: /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ F("tr", { children: a?.map((e) => /* @__PURE__ */ F("th", {
|
|
50
50
|
className: "px-6 py-3",
|
|
51
51
|
children: e.headerName || e.label || e.field
|
|
52
52
|
}, e.field)) })
|
|
53
|
-
}), /* @__PURE__ */
|
|
53
|
+
}), /* @__PURE__ */ F("tbody", { children: i.map((e, t) => /* @__PURE__ */ F("tr", {
|
|
54
54
|
className: "bg-background border-b",
|
|
55
|
-
children: a?.map((t) => /* @__PURE__ */
|
|
55
|
+
children: a?.map((t) => /* @__PURE__ */ F("td", {
|
|
56
56
|
className: "px-6 py-4",
|
|
57
57
|
children: e[t.field]
|
|
58
58
|
}, t.field))
|
|
@@ -66,7 +66,7 @@ var ge = ({ schema: t }) => {
|
|
|
66
66
|
};
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/hooks/useReportData.ts
|
|
69
|
-
function
|
|
69
|
+
function K(e) {
|
|
70
70
|
return e.aggregate ? `${e.field}__${e.aggregate}` : e.field;
|
|
71
71
|
}
|
|
72
72
|
function _e(e, t) {
|
|
@@ -88,33 +88,33 @@ function _e(e, t) {
|
|
|
88
88
|
default: return String(e);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function q(e, t) {
|
|
92
92
|
let n = e[t.field];
|
|
93
93
|
return t.dateGranularity ? _e(n, t.dateGranularity) ?? "(empty)" : n == null || n === "" ? "(empty)" : String(n);
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function J(e, t) {
|
|
96
96
|
let n = {};
|
|
97
97
|
for (let r of t) {
|
|
98
98
|
if (!r.aggregate) {
|
|
99
99
|
let t = e.find((e) => e[r.field] != null);
|
|
100
|
-
n[
|
|
100
|
+
n[K(r)] = t ? t[r.field] : null;
|
|
101
101
|
continue;
|
|
102
102
|
}
|
|
103
103
|
let t = e.map((e) => e[r.field]);
|
|
104
104
|
switch (r.aggregate) {
|
|
105
105
|
case "count":
|
|
106
|
-
n[
|
|
106
|
+
n[K(r)] = t.length;
|
|
107
107
|
break;
|
|
108
108
|
case "unique": {
|
|
109
109
|
let e = /* @__PURE__ */ new Set();
|
|
110
110
|
for (let n of t) n != null && e.add(n);
|
|
111
|
-
n[
|
|
111
|
+
n[K(r)] = e.size;
|
|
112
112
|
break;
|
|
113
113
|
}
|
|
114
114
|
case "sum": {
|
|
115
115
|
let e = 0;
|
|
116
116
|
for (let n of t) e += Number(n) || 0;
|
|
117
|
-
n[
|
|
117
|
+
n[K(r)] = e;
|
|
118
118
|
break;
|
|
119
119
|
}
|
|
120
120
|
case "avg": {
|
|
@@ -124,7 +124,7 @@ function q(e, t) {
|
|
|
124
124
|
let t = Number(n);
|
|
125
125
|
Number.isNaN(t) || (e += t, i += 1);
|
|
126
126
|
}
|
|
127
|
-
n[
|
|
127
|
+
n[K(r)] = i === 0 ? null : e / i;
|
|
128
128
|
break;
|
|
129
129
|
}
|
|
130
130
|
case "min": {
|
|
@@ -134,7 +134,7 @@ function q(e, t) {
|
|
|
134
134
|
let t = Number(n);
|
|
135
135
|
Number.isNaN(t) || (e === null || t < e) && (e = t);
|
|
136
136
|
}
|
|
137
|
-
n[
|
|
137
|
+
n[K(r)] = e;
|
|
138
138
|
break;
|
|
139
139
|
}
|
|
140
140
|
case "max": {
|
|
@@ -144,10 +144,10 @@ function q(e, t) {
|
|
|
144
144
|
let t = Number(n);
|
|
145
145
|
Number.isNaN(t) || (e === null || t > e) && (e = t);
|
|
146
146
|
}
|
|
147
|
-
n[
|
|
147
|
+
n[K(r)] = e;
|
|
148
148
|
break;
|
|
149
149
|
}
|
|
150
|
-
default: n[
|
|
150
|
+
default: n[K(r)] = null;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
return n;
|
|
@@ -156,7 +156,7 @@ function ve(e, t, n, r = {}, i = []) {
|
|
|
156
156
|
if (t.length === 0) return [];
|
|
157
157
|
let [a, ...o] = t, s = /* @__PURE__ */ new Map();
|
|
158
158
|
for (let t of e) {
|
|
159
|
-
let e =
|
|
159
|
+
let e = q(t, a), n = s.get(e);
|
|
160
160
|
n || (n = [], s.set(e, n)), n.push(t);
|
|
161
161
|
}
|
|
162
162
|
let c = [];
|
|
@@ -164,7 +164,7 @@ function ve(e, t, n, r = {}, i = []) {
|
|
|
164
164
|
let s = {
|
|
165
165
|
...r,
|
|
166
166
|
[a.field]: e
|
|
167
|
-
}, l = [...i, e], u =
|
|
167
|
+
}, l = [...i, e], u = J(t, n), d = o.length > 0 ? ve(t, o, n, s, l) : void 0;
|
|
168
168
|
c.push({
|
|
169
169
|
groupKey: s,
|
|
170
170
|
groupPath: l,
|
|
@@ -184,15 +184,15 @@ function ye(e, t, n, r) {
|
|
|
184
184
|
for (let c of i) {
|
|
185
185
|
o[c.id] = {};
|
|
186
186
|
let i = xe(e, c.key, n);
|
|
187
|
-
s[c.id] =
|
|
187
|
+
s[c.id] = J(i, t);
|
|
188
188
|
for (let e of a) {
|
|
189
189
|
let n = xe(i, e.key, r);
|
|
190
|
-
n.length !== 0 && (o[c.id][e.id] =
|
|
190
|
+
n.length !== 0 && (o[c.id][e.id] = J(n, t));
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
for (let n of a) {
|
|
194
194
|
let i = xe(e, n.key, r);
|
|
195
|
-
c[n.id] =
|
|
195
|
+
c[n.id] = J(i, t);
|
|
196
196
|
}
|
|
197
197
|
return {
|
|
198
198
|
rowHeaders: i,
|
|
@@ -200,7 +200,7 @@ function ye(e, t, n, r) {
|
|
|
200
200
|
cells: o,
|
|
201
201
|
rowTotals: s,
|
|
202
202
|
colTotals: c,
|
|
203
|
-
grandTotal:
|
|
203
|
+
grandTotal: J(e, t),
|
|
204
204
|
columns: t,
|
|
205
205
|
downGroupings: n,
|
|
206
206
|
acrossGroupings: r
|
|
@@ -216,7 +216,7 @@ function be(e, t) {
|
|
|
216
216
|
for (let r of e) {
|
|
217
217
|
let e = [], i = {};
|
|
218
218
|
for (let n of t) {
|
|
219
|
-
let t =
|
|
219
|
+
let t = q(r, n);
|
|
220
220
|
e.push(t), i[n.field] = t;
|
|
221
221
|
}
|
|
222
222
|
let a = e.join("");
|
|
@@ -250,16 +250,16 @@ function xe(e, t, n) {
|
|
|
250
250
|
return e.filter((e) => {
|
|
251
251
|
for (let [t, n] of r) {
|
|
252
252
|
let r = i.get(t);
|
|
253
|
-
if ((r ?
|
|
253
|
+
if ((r ? q(e, r) : e[t] == null ? "(null)" : String(e[t])) !== String(n)) return !1;
|
|
254
254
|
}
|
|
255
255
|
return !0;
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function Y(e, t) {
|
|
259
259
|
let n = {};
|
|
260
260
|
for (let r of t) {
|
|
261
261
|
if (!r.aggregate) continue;
|
|
262
|
-
let t =
|
|
262
|
+
let t = K(r), i = 0, a = 0, o = null, s = null;
|
|
263
263
|
for (let n of e) {
|
|
264
264
|
let e = n[t];
|
|
265
265
|
typeof e == "number" && (i += e, a += 1, (o == null || e < o) && (o = e), (s == null || e > s) && (s = e));
|
|
@@ -273,14 +273,14 @@ function Se(e, t, n, r) {
|
|
|
273
273
|
for (let n of i) {
|
|
274
274
|
o[n.id] = {};
|
|
275
275
|
let r = e.filter((e) => we(e, n.key));
|
|
276
|
-
s[n.id] =
|
|
276
|
+
s[n.id] = Y(r, t);
|
|
277
277
|
for (let e of a) {
|
|
278
278
|
let i = r.filter((t) => we(t, e.key));
|
|
279
279
|
if (i.length === 0) continue;
|
|
280
280
|
let a = {};
|
|
281
281
|
for (let e of t) {
|
|
282
282
|
if (!e.aggregate) continue;
|
|
283
|
-
let t =
|
|
283
|
+
let t = K(e);
|
|
284
284
|
a[t] = i[0][t];
|
|
285
285
|
}
|
|
286
286
|
o[n.id][e.id] = a;
|
|
@@ -288,7 +288,7 @@ function Se(e, t, n, r) {
|
|
|
288
288
|
}
|
|
289
289
|
for (let n of a) {
|
|
290
290
|
let r = e.filter((e) => we(e, n.key));
|
|
291
|
-
c[n.id] =
|
|
291
|
+
c[n.id] = Y(r, t);
|
|
292
292
|
}
|
|
293
293
|
return {
|
|
294
294
|
rowHeaders: i,
|
|
@@ -296,7 +296,7 @@ function Se(e, t, n, r) {
|
|
|
296
296
|
cells: o,
|
|
297
297
|
rowTotals: s,
|
|
298
298
|
colTotals: c,
|
|
299
|
-
grandTotal:
|
|
299
|
+
grandTotal: Y(e, t),
|
|
300
300
|
columns: t,
|
|
301
301
|
downGroupings: n,
|
|
302
302
|
acrossGroupings: r
|
|
@@ -335,7 +335,7 @@ function we(e, t) {
|
|
|
335
335
|
for (let [n, r] of Object.entries(t)) if ((e[n] == null ? "(null)" : String(e[n])) !== String(r)) return !1;
|
|
336
336
|
return !0;
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function X(e, t) {
|
|
339
339
|
let n = e && Object.keys(e).length > 0, r = t && Object.keys(t).length > 0;
|
|
340
340
|
if (n && r) return { $and: [e, t] };
|
|
341
341
|
if (n) return e;
|
|
@@ -358,8 +358,8 @@ function Ee(e, t, n) {
|
|
|
358
358
|
} : e.field), o = i.map((e) => ({
|
|
359
359
|
function: e.aggregate === "unique" ? "count_distinct" : e.aggregate,
|
|
360
360
|
field: e.field,
|
|
361
|
-
alias:
|
|
362
|
-
})), s =
|
|
361
|
+
alias: K(e)
|
|
362
|
+
})), s = X(e.filter, t), c = {
|
|
363
363
|
object: e.objectName,
|
|
364
364
|
limit: n
|
|
365
365
|
};
|
|
@@ -368,20 +368,20 @@ function Ee(e, t, n) {
|
|
|
368
368
|
function De(e, t, n) {
|
|
369
369
|
for (let [r, i] of Object.entries(t)) {
|
|
370
370
|
let t = n.find((e) => e.field === r);
|
|
371
|
-
if ((t ?
|
|
371
|
+
if ((t ? q(e, t) : String(e[r] ?? "(empty)")) !== String(i)) return !1;
|
|
372
372
|
}
|
|
373
373
|
return !0;
|
|
374
374
|
}
|
|
375
|
-
var
|
|
375
|
+
var Z = [];
|
|
376
376
|
function Oe(e, t = {}) {
|
|
377
|
-
let { dataSource: n, runtimeFilter: c, maxRows: l = 5e3, enabled: u = !0, rows: d, preferServerAggregation: f = !0 } = t, [p, m] = s(d ??
|
|
377
|
+
let { dataSource: n, runtimeFilter: c, maxRows: l = 5e3, enabled: u = !0, rows: d, preferServerAggregation: f = !0 } = t, [p, m] = s(d ?? Z), [h, g] = s(!1), [_, v] = s(!1), [y, b] = s(null), x = o(0), S = r(async () => {
|
|
378
378
|
if (!e || !u) return;
|
|
379
379
|
if (d) {
|
|
380
380
|
m(d), g(!1);
|
|
381
381
|
return;
|
|
382
382
|
}
|
|
383
383
|
if (!n) {
|
|
384
|
-
m(
|
|
384
|
+
m(Z);
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
387
387
|
let t = ++x.current;
|
|
@@ -397,17 +397,17 @@ function Oe(e, t = {}) {
|
|
|
397
397
|
typeof console < "u" && console.warn && console.warn("[useReportData] dataSource.aggregate() failed, falling back to find():", e);
|
|
398
398
|
}
|
|
399
399
|
if (typeof n.find != "function") {
|
|
400
|
-
m(
|
|
400
|
+
m(Z), g(!1);
|
|
401
401
|
return;
|
|
402
402
|
}
|
|
403
|
-
let i =
|
|
403
|
+
let i = X(e.filter, c), a = Te(e), o = { $top: l };
|
|
404
404
|
i && (o.$filter = i), a.length > 0 && (o.$select = a), e.sort && e.sort.length > 0 && (o.$orderBy = e.sort.map((e) => `${e.field} ${e.direction ?? "asc"}`).join(","));
|
|
405
405
|
let s = ke(await n.find(e.objectName, o));
|
|
406
406
|
if (t !== x.current) return;
|
|
407
407
|
m(s), g(!1);
|
|
408
408
|
} catch (e) {
|
|
409
409
|
if (t !== x.current) return;
|
|
410
|
-
b(e instanceof Error ? e : Error(String(e))), m(
|
|
410
|
+
b(e instanceof Error ? e : Error(String(e))), m(Z), g(!1);
|
|
411
411
|
} finally {
|
|
412
412
|
t === x.current && v(!1);
|
|
413
413
|
}
|
|
@@ -445,7 +445,7 @@ function Oe(e, t = {}) {
|
|
|
445
445
|
values: i,
|
|
446
446
|
count: 1
|
|
447
447
|
};
|
|
448
|
-
}), o =
|
|
448
|
+
}), o = Y(p, r), s = i ? Se(p, r, t, n) : null;
|
|
449
449
|
return {
|
|
450
450
|
rows: i && s ? s.rowHeaders.map((e) => ({
|
|
451
451
|
groupKey: e.key,
|
|
@@ -462,10 +462,10 @@ function Oe(e, t = {}) {
|
|
|
462
462
|
rows: a.length > 0 ? ve(p, a, r) : p.map((e) => ({
|
|
463
463
|
groupKey: {},
|
|
464
464
|
groupPath: [],
|
|
465
|
-
values: r.length > 0 ?
|
|
465
|
+
values: r.length > 0 ? J([e], r) : { ...e },
|
|
466
466
|
count: 1
|
|
467
467
|
})),
|
|
468
|
-
totals:
|
|
468
|
+
totals: J(p, r),
|
|
469
469
|
pivot: i ? ye(p, r, t, n) : null
|
|
470
470
|
};
|
|
471
471
|
}, [
|
|
@@ -498,7 +498,7 @@ function ke(e) {
|
|
|
498
498
|
if (Array.isArray(t.results)) return t.results;
|
|
499
499
|
if (Array.isArray(t.value)) return t.value;
|
|
500
500
|
}
|
|
501
|
-
return
|
|
501
|
+
return Z;
|
|
502
502
|
}
|
|
503
503
|
//#endregion
|
|
504
504
|
//#region src/buildChartData.ts
|
|
@@ -559,7 +559,7 @@ function Me({ report: e, rows: t, labels: n }) {
|
|
|
559
559
|
//#endregion
|
|
560
560
|
//#region src/drill.ts
|
|
561
561
|
function Ne(e, t, n = {}) {
|
|
562
|
-
let r =
|
|
562
|
+
let r = X(X(e.filter, n.runtimeFilter), Object.keys(t).length > 0 ? t : void 0);
|
|
563
563
|
return {
|
|
564
564
|
type: "drill",
|
|
565
565
|
name: `drill-${e.name}`,
|
|
@@ -623,7 +623,7 @@ var Be = {
|
|
|
623
623
|
color: "rgb(100 116 139)",
|
|
624
624
|
fontSize: 14
|
|
625
625
|
}, Ve = ({ report: e, dataSource: n, rows: r, runtimeFilter: i, onDrillDown: a, actionRunner: o, drillView: s, drillOpenIn: c, className: l }) => {
|
|
626
|
-
let u = e.type ?? "tabular", { t: d } =
|
|
626
|
+
let u = e.type ?? "tabular", { t: d } = L(), { fieldLabel: f, translateOptions: p } = z(), [m, h] = t.useState(null);
|
|
627
627
|
t.useEffect(() => {
|
|
628
628
|
let t = n;
|
|
629
629
|
if (!t || typeof t.getObjectSchema != "function" || !e.objectName) return;
|
|
@@ -658,12 +658,12 @@ var Be = {
|
|
|
658
658
|
rows: r,
|
|
659
659
|
runtimeFilter: i
|
|
660
660
|
});
|
|
661
|
-
if (u === "matrix" || u === "joined") return /* @__PURE__ */
|
|
661
|
+
if (u === "matrix" || u === "joined") return /* @__PURE__ */ I("div", {
|
|
662
662
|
className: l,
|
|
663
663
|
style: Be,
|
|
664
664
|
children: [
|
|
665
665
|
"Report type ",
|
|
666
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ F("code", { children: u }),
|
|
667
667
|
" is not yet supported by SpecReportGrid. It will be rendered by a dedicated component in M2 (matrix) / M3 (joined)."
|
|
668
668
|
]
|
|
669
669
|
});
|
|
@@ -673,7 +673,7 @@ var Be = {
|
|
|
673
673
|
field: e.field,
|
|
674
674
|
label: e.field.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase())
|
|
675
675
|
})), n = (e.columns ?? []).filter((e) => e.aggregate).map((e) => ({
|
|
676
|
-
field:
|
|
676
|
+
field: K(e),
|
|
677
677
|
label: `${(typeof e.label == "string" ? e.label : null) ?? e.field} (${e.aggregate})`,
|
|
678
678
|
...e.format ? { format: e.format } : {}
|
|
679
679
|
}));
|
|
@@ -742,12 +742,12 @@ var Be = {
|
|
|
742
742
|
f,
|
|
743
743
|
d
|
|
744
744
|
]);
|
|
745
|
-
return /* @__PURE__ */
|
|
745
|
+
return /* @__PURE__ */ I("div", {
|
|
746
746
|
className: l,
|
|
747
747
|
"data-testid": "spec-report-grid",
|
|
748
748
|
"aria-busy": S || void 0,
|
|
749
749
|
children: [
|
|
750
|
-
C ? /* @__PURE__ */
|
|
750
|
+
C ? /* @__PURE__ */ F("div", {
|
|
751
751
|
role: "alert",
|
|
752
752
|
style: {
|
|
753
753
|
...Be,
|
|
@@ -755,33 +755,33 @@ var Be = {
|
|
|
755
755
|
},
|
|
756
756
|
children: C.message
|
|
757
757
|
}) : null,
|
|
758
|
-
A ? /* @__PURE__ */
|
|
758
|
+
A ? /* @__PURE__ */ I("div", {
|
|
759
759
|
"data-testid": "spec-report-totals",
|
|
760
760
|
className: "mb-3 flex flex-wrap items-baseline gap-x-6 gap-y-1 rounded-md border bg-muted/40 px-3 py-2 text-sm",
|
|
761
|
-
children: [/* @__PURE__ */
|
|
761
|
+
children: [/* @__PURE__ */ F("span", {
|
|
762
762
|
className: "text-xs font-medium uppercase tracking-wide text-muted-foreground",
|
|
763
763
|
children: d("report.totals", "Totals")
|
|
764
764
|
}), k.map((e) => {
|
|
765
|
-
let t =
|
|
766
|
-
return /* @__PURE__ */
|
|
765
|
+
let t = K(e), n = b[t], r = g(e), i = typeof n == "number" ? n.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(n ?? "—");
|
|
766
|
+
return /* @__PURE__ */ I("span", {
|
|
767
767
|
"data-testid": `spec-report-total-${t}`,
|
|
768
768
|
className: "inline-flex items-baseline gap-1.5",
|
|
769
|
-
children: [/* @__PURE__ */
|
|
769
|
+
children: [/* @__PURE__ */ I("span", {
|
|
770
770
|
className: "text-muted-foreground",
|
|
771
771
|
children: [r, ":"]
|
|
772
|
-
}), /* @__PURE__ */
|
|
772
|
+
}), /* @__PURE__ */ F("span", {
|
|
773
773
|
className: "font-mono font-medium tabular-nums",
|
|
774
774
|
children: i
|
|
775
775
|
})]
|
|
776
776
|
}, t);
|
|
777
777
|
})]
|
|
778
778
|
}) : null,
|
|
779
|
-
j ? /* @__PURE__ */
|
|
779
|
+
j ? /* @__PURE__ */ F("div", {
|
|
780
780
|
className: "mb-4",
|
|
781
781
|
"data-testid": "spec-report-chart",
|
|
782
|
-
children: /* @__PURE__ */
|
|
782
|
+
children: /* @__PURE__ */ F(B, { schema: j })
|
|
783
783
|
}) : null,
|
|
784
|
-
/* @__PURE__ */
|
|
784
|
+
/* @__PURE__ */ F(R, {
|
|
785
785
|
schema: T,
|
|
786
786
|
data: E,
|
|
787
787
|
dataSource: n,
|
|
@@ -807,7 +807,7 @@ function We(e, t, n) {
|
|
|
807
807
|
return e;
|
|
808
808
|
}
|
|
809
809
|
function Ge({ header: e, groupings: t, metaByField: n, fallback: r, emptyLabel: i }) {
|
|
810
|
-
return e.path.length === 0 ? /* @__PURE__ */ P
|
|
810
|
+
return e.path.length === 0 ? /* @__PURE__ */ F(P, { children: r }) : /* @__PURE__ */ F(P, { children: e.path.map((e, r) => {
|
|
811
811
|
let a = t[r]?.field;
|
|
812
812
|
return We(e, a ? n.get(a) : void 0, i);
|
|
813
813
|
}).join(" / ") });
|
|
@@ -817,7 +817,7 @@ var Ke = ({ report: e, dataSource: n, rows: r, runtimeFilter: i, onCellClick: a,
|
|
|
817
817
|
dataSource: n,
|
|
818
818
|
rows: r,
|
|
819
819
|
runtimeFilter: i
|
|
820
|
-
}), m = e.columns ?? [], h = m.length > 1, { fieldLabel: g, translateOptions: _ } =
|
|
820
|
+
}), m = e.columns ?? [], h = m.length > 1, { fieldLabel: g, translateOptions: _ } = z(), { t: v } = L(), y = v("report.emptyLabel", "(Empty)"), b = v("report.allLabel", "(All)"), [x, S] = t.useState(null);
|
|
821
821
|
t.useEffect(() => {
|
|
822
822
|
let t = n;
|
|
823
823
|
if (!t || typeof t.getObjectSchema != "function" || !e.objectName) return;
|
|
@@ -853,7 +853,7 @@ var Ke = ({ report: e, dataSource: n, rows: r, runtimeFilter: i, onCellClick: a,
|
|
|
853
853
|
]), E = t.useMemo(() => {
|
|
854
854
|
let t = /* @__PURE__ */ new Map(), n = x?.fields ?? {};
|
|
855
855
|
for (let r of m) {
|
|
856
|
-
let i =
|
|
856
|
+
let i = K(r);
|
|
857
857
|
if (r.label) {
|
|
858
858
|
t.set(i, String(r.label));
|
|
859
859
|
continue;
|
|
@@ -898,50 +898,60 @@ var Ke = ({ report: e, dataSource: n, rows: r, runtimeFilter: i, onCellClick: a,
|
|
|
898
898
|
e,
|
|
899
899
|
i
|
|
900
900
|
]);
|
|
901
|
-
if (p) return /* @__PURE__ */
|
|
902
|
-
className: l,
|
|
901
|
+
if (p) return /* @__PURE__ */ F("div", {
|
|
902
|
+
className: N("rounded-md border border-destructive/30 bg-destructive/5 px-4 py-3 text-sm text-destructive", l),
|
|
903
903
|
role: "alert",
|
|
904
904
|
"data-testid": "matrix-error",
|
|
905
905
|
children: v("report.failedToLoad", "Failed to load matrix: {{message}}", { message: p.message })
|
|
906
906
|
});
|
|
907
|
-
if (!d) return /* @__PURE__ */
|
|
908
|
-
className: l,
|
|
907
|
+
if (!d) return /* @__PURE__ */ F("div", {
|
|
908
|
+
className: N("rounded-md border border-dashed border-border bg-muted/30 px-4 py-6 text-center text-sm text-muted-foreground", l),
|
|
909
909
|
"aria-busy": f || void 0,
|
|
910
910
|
"data-testid": "matrix-empty",
|
|
911
911
|
children: f ? v("report.loading", "Loading…") : v("report.needsAcross", "Matrix report requires at least one `groupingsAcross` field.")
|
|
912
912
|
});
|
|
913
|
-
let O = !!a || !!o, k = C.map((e) => T.get(e.field)?.fieldLabel ?? e.field).join(" / ") || v("report.rowsLabel", "Row"), A = w.map((e) => T.get(e.field)?.fieldLabel ?? e.field).join(" / ") || v("report.columnsLabel", "Column");
|
|
914
|
-
|
|
915
|
-
|
|
913
|
+
let O = !!a || !!o, k = C.map((e) => T.get(e.field)?.fieldLabel ?? e.field).join(" / ") || v("report.rowsLabel", "Row"), A = w.map((e) => T.get(e.field)?.fieldLabel ?? e.field).join(" / ") || v("report.columnsLabel", "Column"), j = m.length > 0 ? K(m[0]) : null, M = 0;
|
|
914
|
+
if (j) for (let e of d.rowHeaders) for (let t of d.colHeaders) {
|
|
915
|
+
let n = d.cells[e.id]?.[t.id]?.[j];
|
|
916
|
+
typeof n == "number" && n > M && (M = n);
|
|
917
|
+
}
|
|
918
|
+
let ee = (e) => {
|
|
919
|
+
if (!j || M <= 0 || !e) return 0;
|
|
920
|
+
let t = e[j];
|
|
921
|
+
return typeof t != "number" || t <= 0 ? 0 : Math.min(1, t / M);
|
|
922
|
+
};
|
|
923
|
+
return /* @__PURE__ */ F("div", {
|
|
924
|
+
className: N("overflow-auto rounded-lg border border-border bg-card shadow-sm", l),
|
|
916
925
|
"data-testid": "matrix-renderer",
|
|
917
926
|
"aria-busy": f || void 0,
|
|
918
|
-
|
|
919
|
-
children: /* @__PURE__ */ F("table", {
|
|
927
|
+
children: /* @__PURE__ */ I("table", {
|
|
920
928
|
role: "table",
|
|
921
|
-
|
|
922
|
-
borderCollapse: "collapse",
|
|
923
|
-
minWidth: "100%",
|
|
924
|
-
fontSize: 13
|
|
925
|
-
},
|
|
929
|
+
className: "w-full border-separate border-spacing-0 text-sm",
|
|
926
930
|
children: [
|
|
927
|
-
/* @__PURE__ */
|
|
928
|
-
/* @__PURE__ */
|
|
931
|
+
/* @__PURE__ */ F("thead", { children: /* @__PURE__ */ I("tr", { children: [
|
|
932
|
+
/* @__PURE__ */ I("th", {
|
|
929
933
|
scope: "col",
|
|
930
|
-
|
|
931
|
-
header: !0,
|
|
932
|
-
bold: !0
|
|
933
|
-
}),
|
|
934
|
+
className: N("sticky left-0 top-0 z-30 border-b border-r border-border bg-muted/60", "px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted-foreground"),
|
|
934
935
|
"aria-label": `${k} \u2192 ${A}`,
|
|
935
936
|
children: [
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
937
|
+
/* @__PURE__ */ F("span", {
|
|
938
|
+
className: "text-muted-foreground/70",
|
|
939
|
+
children: k
|
|
940
|
+
}),
|
|
941
|
+
/* @__PURE__ */ F("span", {
|
|
942
|
+
className: "mx-1 text-muted-foreground/40",
|
|
943
|
+
children: "\\"
|
|
944
|
+
}),
|
|
945
|
+
/* @__PURE__ */ F("span", {
|
|
946
|
+
className: "text-foreground/80",
|
|
947
|
+
children: A
|
|
948
|
+
})
|
|
939
949
|
]
|
|
940
950
|
}),
|
|
941
|
-
d.colHeaders.map((e) => /* @__PURE__ */
|
|
951
|
+
d.colHeaders.map((e) => /* @__PURE__ */ F("th", {
|
|
942
952
|
scope: "col",
|
|
943
|
-
|
|
944
|
-
children: /* @__PURE__ */
|
|
953
|
+
className: "sticky top-0 z-20 whitespace-nowrap border-b border-border bg-muted/60 px-3 py-2 text-right text-xs font-semibold text-foreground",
|
|
954
|
+
children: /* @__PURE__ */ F(Ge, {
|
|
945
955
|
header: e,
|
|
946
956
|
groupings: w,
|
|
947
957
|
metaByField: T,
|
|
@@ -949,63 +959,55 @@ var Ke = ({ report: e, dataSource: n, rows: r, runtimeFilter: i, onCellClick: a,
|
|
|
949
959
|
emptyLabel: y
|
|
950
960
|
})
|
|
951
961
|
}, `col-${e.id}`)),
|
|
952
|
-
/* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ F("th", {
|
|
953
963
|
scope: "col",
|
|
954
|
-
|
|
955
|
-
header: !0,
|
|
956
|
-
total: !0
|
|
957
|
-
}),
|
|
964
|
+
className: "sticky top-0 z-20 whitespace-nowrap border-b border-l border-border bg-muted px-3 py-2 text-right text-xs font-semibold uppercase tracking-wide text-foreground",
|
|
958
965
|
children: v("report.rowTotal", "Row Total")
|
|
959
966
|
})
|
|
960
967
|
] }) }),
|
|
961
|
-
/* @__PURE__ */
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
968
|
+
/* @__PURE__ */ F("tbody", { children: d.rowHeaders.map((e, t) => /* @__PURE__ */ I("tr", {
|
|
969
|
+
className: "group",
|
|
970
|
+
children: [
|
|
971
|
+
/* @__PURE__ */ F("th", {
|
|
972
|
+
scope: "row",
|
|
973
|
+
className: N("sticky left-0 z-10 whitespace-nowrap border-b border-r border-border bg-card px-3 py-2 text-left text-sm font-medium text-foreground", "group-hover:bg-muted/50", t === 0 && "border-t-0"),
|
|
974
|
+
children: /* @__PURE__ */ F(Ge, {
|
|
975
|
+
header: e,
|
|
976
|
+
groupings: C,
|
|
977
|
+
metaByField: T,
|
|
978
|
+
fallback: b,
|
|
979
|
+
emptyLabel: y
|
|
980
|
+
})
|
|
981
|
+
}),
|
|
982
|
+
d.colHeaders.map((t) => {
|
|
983
|
+
let n = d.cells[e.id]?.[t.id], r = !n, i = ee(n);
|
|
984
|
+
return /* @__PURE__ */ F("td", {
|
|
985
|
+
className: N("border-b border-border px-3 py-2 text-right tabular-nums transition-colors", r ? "text-muted-foreground/40" : "text-foreground", O && !r && "cursor-pointer hover:outline hover:outline-2 hover:-outline-offset-2 hover:outline-primary/50", "group-hover:bg-muted/30"),
|
|
986
|
+
style: i > 0 ? { backgroundColor: `rgba(59, 130, 246, ${.06 + i * .28})` } : void 0,
|
|
987
|
+
onClick: O && !r ? () => D(e, t, n) : void 0,
|
|
988
|
+
"data-row": e.id,
|
|
989
|
+
"data-col": t.id,
|
|
990
|
+
children: r ? u : qe(m, n, h, E)
|
|
991
|
+
}, `cell-${e.id}-${t.id}`);
|
|
992
|
+
}),
|
|
993
|
+
/* @__PURE__ */ F("td", {
|
|
994
|
+
className: N("border-b border-l border-border bg-muted/40 px-3 py-2 text-right text-sm font-semibold tabular-nums text-foreground", "group-hover:bg-muted/60"),
|
|
995
|
+
children: qe(m, d.rowTotals[e.id] ?? {}, h, E)
|
|
971
996
|
})
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
style: Z({
|
|
977
|
-
interactive: O && !r,
|
|
978
|
-
empty: r
|
|
979
|
-
}),
|
|
980
|
-
onClick: O && !r ? () => D(e, t, n) : void 0,
|
|
981
|
-
"data-row": e.id,
|
|
982
|
-
"data-col": t.id,
|
|
983
|
-
children: r ? u : qe(m, n, h, E)
|
|
984
|
-
}, `cell-${e.id}-${t.id}`);
|
|
985
|
-
}),
|
|
986
|
-
/* @__PURE__ */ P("td", {
|
|
987
|
-
style: Z({ total: !0 }),
|
|
988
|
-
children: qe(m, d.rowTotals[e.id] ?? {}, h, E)
|
|
989
|
-
})
|
|
990
|
-
] }, `row-${e.id}`)) }),
|
|
991
|
-
/* @__PURE__ */ P("tfoot", { children: /* @__PURE__ */ F("tr", { children: [
|
|
992
|
-
/* @__PURE__ */ P("th", {
|
|
997
|
+
]
|
|
998
|
+
}, `row-${e.id}`)) }),
|
|
999
|
+
/* @__PURE__ */ F("tfoot", { children: /* @__PURE__ */ I("tr", { children: [
|
|
1000
|
+
/* @__PURE__ */ F("th", {
|
|
993
1001
|
scope: "row",
|
|
994
|
-
|
|
995
|
-
header: !0,
|
|
996
|
-
total: !0
|
|
997
|
-
}),
|
|
1002
|
+
className: "sticky left-0 z-10 whitespace-nowrap border-t-2 border-r border-border bg-muted px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-foreground",
|
|
998
1003
|
children: v("report.columnTotal", "Column Total")
|
|
999
1004
|
}),
|
|
1000
|
-
d.colHeaders.map((e) => /* @__PURE__ */
|
|
1001
|
-
|
|
1005
|
+
d.colHeaders.map((e) => /* @__PURE__ */ F("td", {
|
|
1006
|
+
className: "border-t-2 border-border bg-muted/40 px-3 py-2 text-right text-sm font-semibold tabular-nums text-foreground",
|
|
1002
1007
|
children: qe(m, d.colTotals[e.id] ?? {}, h, E)
|
|
1003
1008
|
}, `coltotal-${e.id}`)),
|
|
1004
|
-
/* @__PURE__ */
|
|
1005
|
-
|
|
1006
|
-
total: !0,
|
|
1007
|
-
grand: !0
|
|
1008
|
-
}),
|
|
1009
|
+
/* @__PURE__ */ F("td", {
|
|
1010
|
+
className: "border-l border-t-2 border-border bg-primary/10 px-3 py-2 text-right text-sm font-bold tabular-nums text-foreground",
|
|
1009
1011
|
children: qe(m, d.grandTotal, h, E)
|
|
1010
1012
|
})
|
|
1011
1013
|
] }) })
|
|
@@ -1014,39 +1016,22 @@ var Ke = ({ report: e, dataSource: n, rows: r, runtimeFilter: i, onCellClick: a,
|
|
|
1014
1016
|
});
|
|
1015
1017
|
};
|
|
1016
1018
|
function qe(e, t, n, r) {
|
|
1017
|
-
return e.length ? n ? /* @__PURE__ */
|
|
1018
|
-
|
|
1019
|
-
display: "flex",
|
|
1020
|
-
flexDirection: "column",
|
|
1021
|
-
gap: 2
|
|
1022
|
-
},
|
|
1019
|
+
return e.length ? n ? /* @__PURE__ */ F("div", {
|
|
1020
|
+
className: "flex flex-col gap-0.5",
|
|
1023
1021
|
children: e.map((e) => {
|
|
1024
|
-
let n =
|
|
1025
|
-
return /* @__PURE__ */
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
gap: 8
|
|
1030
|
-
},
|
|
1031
|
-
children: [/* @__PURE__ */ P("span", {
|
|
1032
|
-
style: { color: "var(--color-muted-foreground, #71717a)" },
|
|
1022
|
+
let n = K(e);
|
|
1023
|
+
return /* @__PURE__ */ I("div", {
|
|
1024
|
+
className: "flex items-baseline justify-between gap-2",
|
|
1025
|
+
children: [/* @__PURE__ */ F("span", {
|
|
1026
|
+
className: "text-xs text-muted-foreground",
|
|
1033
1027
|
children: r?.get(n) ?? e.label ?? n
|
|
1034
|
-
}), /* @__PURE__ */
|
|
1028
|
+
}), /* @__PURE__ */ F("span", {
|
|
1029
|
+
className: "tabular-nums",
|
|
1030
|
+
children: Ue(t[n])
|
|
1031
|
+
})]
|
|
1035
1032
|
}, n);
|
|
1036
1033
|
})
|
|
1037
|
-
}) : Ue(t[
|
|
1038
|
-
}
|
|
1039
|
-
function Z(e) {
|
|
1040
|
-
return {
|
|
1041
|
-
border: "1px solid var(--color-border, #e4e4e7)",
|
|
1042
|
-
padding: "6px 10px",
|
|
1043
|
-
textAlign: e.header ? "left" : "right",
|
|
1044
|
-
fontWeight: e.bold || e.grand ? 700 : e.header || e.total ? 600 : 400,
|
|
1045
|
-
background: e.grand ? "var(--color-muted, #f4f4f5)" : e.total ? "var(--color-muted, #fafafa)" : e.header ? "var(--color-muted, #f9fafb)" : e.empty ? "transparent" : "var(--color-background, #ffffff)",
|
|
1046
|
-
color: e.empty ? "var(--color-muted-foreground, #a1a1aa)" : void 0,
|
|
1047
|
-
cursor: e.interactive ? "pointer" : void 0,
|
|
1048
|
-
whiteSpace: "nowrap"
|
|
1049
|
-
};
|
|
1034
|
+
}) : Ue(t[K(e[0])]) : He;
|
|
1050
1035
|
}
|
|
1051
1036
|
//#endregion
|
|
1052
1037
|
//#region src/JoinedReportRenderer.tsx
|
|
@@ -1055,14 +1040,14 @@ function Je(e, t) {
|
|
|
1055
1040
|
}
|
|
1056
1041
|
function Ye(e, t) {
|
|
1057
1042
|
if (!t || Object.keys(t).length === 0) return e;
|
|
1058
|
-
let n =
|
|
1043
|
+
let n = X(t, e.filter);
|
|
1059
1044
|
return {
|
|
1060
1045
|
...e,
|
|
1061
1046
|
filter: n
|
|
1062
1047
|
};
|
|
1063
1048
|
}
|
|
1064
1049
|
var Xe = ({ report: e, dataSource: t, runtimeFilter: n, actionRunner: r, drillView: i, drillOpenIn: a, className: o, renderBlock: s }) => {
|
|
1065
|
-
if (!c(e)) return /* @__PURE__ */
|
|
1050
|
+
if (!c(e)) return /* @__PURE__ */ I("div", {
|
|
1066
1051
|
className: o,
|
|
1067
1052
|
"data-testid": "joined-report-invalid",
|
|
1068
1053
|
style: {
|
|
@@ -1072,14 +1057,14 @@ var Xe = ({ report: e, dataSource: t, runtimeFilter: n, actionRunner: r, drillVi
|
|
|
1072
1057
|
},
|
|
1073
1058
|
children: [
|
|
1074
1059
|
"JoinedReportRenderer requires a report with ",
|
|
1075
|
-
/* @__PURE__ */
|
|
1060
|
+
/* @__PURE__ */ F("code", { children: "type: 'joined'" }),
|
|
1076
1061
|
" and a ",
|
|
1077
|
-
/* @__PURE__ */
|
|
1062
|
+
/* @__PURE__ */ F("code", { children: "blocks" }),
|
|
1078
1063
|
" array."
|
|
1079
1064
|
]
|
|
1080
1065
|
});
|
|
1081
1066
|
let l = e.blocks ?? [], u = e.filter, d = e.objectName;
|
|
1082
|
-
return /* @__PURE__ */
|
|
1067
|
+
return /* @__PURE__ */ F("div", {
|
|
1083
1068
|
className: o,
|
|
1084
1069
|
"data-testid": "joined-report",
|
|
1085
1070
|
"data-report-name": e.name,
|
|
@@ -1094,7 +1079,7 @@ var Xe = ({ report: e, dataSource: t, runtimeFilter: n, actionRunner: r, drillVi
|
|
|
1094
1079
|
objectName: c,
|
|
1095
1080
|
type: e.type ?? "tabular",
|
|
1096
1081
|
columns: e.columns ?? []
|
|
1097
|
-
}, u), f = Je(e.label, e.name), p = e.description ? Je(e.description, "") : "", m = e.name ?? `block-${o}`, h = /* @__PURE__ */
|
|
1082
|
+
}, u), f = Je(e.label, e.name), p = e.description ? Je(e.description, "") : "", m = e.name ?? `block-${o}`, h = /* @__PURE__ */ I("section", {
|
|
1098
1083
|
"data-testid": "joined-report-block",
|
|
1099
1084
|
"data-block-id": m,
|
|
1100
1085
|
style: {
|
|
@@ -1106,20 +1091,20 @@ var Xe = ({ report: e, dataSource: t, runtimeFilter: n, actionRunner: r, drillVi
|
|
|
1106
1091
|
padding: 16,
|
|
1107
1092
|
background: "var(--color-card, #ffffff)"
|
|
1108
1093
|
},
|
|
1109
|
-
children: [/* @__PURE__ */
|
|
1094
|
+
children: [/* @__PURE__ */ I("header", {
|
|
1110
1095
|
style: {
|
|
1111
1096
|
display: "flex",
|
|
1112
1097
|
flexDirection: "column",
|
|
1113
1098
|
gap: 2
|
|
1114
1099
|
},
|
|
1115
|
-
children: [/* @__PURE__ */
|
|
1100
|
+
children: [/* @__PURE__ */ F("h3", {
|
|
1116
1101
|
style: {
|
|
1117
1102
|
margin: 0,
|
|
1118
1103
|
fontSize: 16,
|
|
1119
1104
|
fontWeight: 600
|
|
1120
1105
|
},
|
|
1121
1106
|
children: f
|
|
1122
|
-
}), p ? /* @__PURE__ */
|
|
1107
|
+
}), p ? /* @__PURE__ */ F("p", {
|
|
1123
1108
|
style: {
|
|
1124
1109
|
margin: 0,
|
|
1125
1110
|
fontSize: 13,
|
|
@@ -1127,7 +1112,7 @@ var Xe = ({ report: e, dataSource: t, runtimeFilter: n, actionRunner: r, drillVi
|
|
|
1127
1112
|
},
|
|
1128
1113
|
children: p
|
|
1129
1114
|
}) : null]
|
|
1130
|
-
}), /* @__PURE__ */
|
|
1115
|
+
}), /* @__PURE__ */ F(Qe, {
|
|
1131
1116
|
schema: l,
|
|
1132
1117
|
dataSource: t,
|
|
1133
1118
|
runtimeFilter: n,
|
|
@@ -1150,7 +1135,7 @@ var Xe = ({ report: e, dataSource: t, runtimeFilter: n, actionRunner: r, drillVi
|
|
|
1150
1135
|
let { dataSource: t, rows: n, runtimeFilter: r, actionRunner: i, drillView: a, drillOpenIn: o, className: s } = e, u = e.schema;
|
|
1151
1136
|
if (u && typeof u == "object" && u.type === "spec-report" && u.report && typeof u.report == "object" && (u = u.report), l(u)) {
|
|
1152
1137
|
let e = u.type ?? "tabular";
|
|
1153
|
-
return e === "matrix" ? /* @__PURE__ */
|
|
1138
|
+
return e === "matrix" ? /* @__PURE__ */ F(Ke, {
|
|
1154
1139
|
report: u,
|
|
1155
1140
|
dataSource: t,
|
|
1156
1141
|
rows: n,
|
|
@@ -1159,7 +1144,7 @@ var Xe = ({ report: e, dataSource: t, runtimeFilter: n, actionRunner: r, drillVi
|
|
|
1159
1144
|
drillView: a,
|
|
1160
1145
|
drillOpenIn: o,
|
|
1161
1146
|
className: s
|
|
1162
|
-
}) : e === "joined" ? c(u) ? /* @__PURE__ */
|
|
1147
|
+
}) : e === "joined" ? c(u) ? /* @__PURE__ */ F(Xe, {
|
|
1163
1148
|
report: u,
|
|
1164
1149
|
dataSource: t,
|
|
1165
1150
|
runtimeFilter: r,
|
|
@@ -1167,18 +1152,18 @@ var Xe = ({ report: e, dataSource: t, runtimeFilter: n, actionRunner: r, drillVi
|
|
|
1167
1152
|
drillView: a,
|
|
1168
1153
|
drillOpenIn: o,
|
|
1169
1154
|
className: s
|
|
1170
|
-
}) : /* @__PURE__ */
|
|
1155
|
+
}) : /* @__PURE__ */ I("div", {
|
|
1171
1156
|
className: s,
|
|
1172
1157
|
style: Ze,
|
|
1173
1158
|
"data-testid": "report-joined-placeholder",
|
|
1174
1159
|
children: [
|
|
1175
1160
|
"Joined report (",
|
|
1176
|
-
/* @__PURE__ */
|
|
1161
|
+
/* @__PURE__ */ F("code", { children: u.name }),
|
|
1177
1162
|
") is missing a ",
|
|
1178
|
-
/* @__PURE__ */
|
|
1163
|
+
/* @__PURE__ */ F("code", { children: "blocks" }),
|
|
1179
1164
|
" array."
|
|
1180
1165
|
]
|
|
1181
|
-
}) : /* @__PURE__ */
|
|
1166
|
+
}) : /* @__PURE__ */ F(Ve, {
|
|
1182
1167
|
report: u,
|
|
1183
1168
|
dataSource: t,
|
|
1184
1169
|
rows: n,
|
|
@@ -1189,7 +1174,7 @@ var Xe = ({ report: e, dataSource: t, runtimeFilter: n, actionRunner: r, drillVi
|
|
|
1189
1174
|
className: s
|
|
1190
1175
|
});
|
|
1191
1176
|
}
|
|
1192
|
-
return /* @__PURE__ */
|
|
1177
|
+
return /* @__PURE__ */ F(ge, { schema: u });
|
|
1193
1178
|
};
|
|
1194
1179
|
//#endregion
|
|
1195
1180
|
//#region src/ReportExportEngine.ts
|
|
@@ -1433,7 +1418,7 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1433
1418
|
}
|
|
1434
1419
|
}, S = (e, t) => {
|
|
1435
1420
|
if (e == null || e === "") return "";
|
|
1436
|
-
if (t.renderAs === "badge" && (!t.type || t.type === "string" || t.type === "text")) return /* @__PURE__ */
|
|
1421
|
+
if (t.renderAs === "badge" && (!t.type || t.type === "string" || t.type === "text")) return /* @__PURE__ */ F(u, {
|
|
1437
1422
|
className: t.colorMap?.[String(e)] || "",
|
|
1438
1423
|
children: String(e)
|
|
1439
1424
|
});
|
|
@@ -1444,114 +1429,114 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1444
1429
|
value: e,
|
|
1445
1430
|
label: e,
|
|
1446
1431
|
color: t
|
|
1447
|
-
}))), /* @__PURE__ */
|
|
1432
|
+
}))), /* @__PURE__ */ F(me(he(n)), {
|
|
1448
1433
|
value: e,
|
|
1449
1434
|
field: n
|
|
1450
1435
|
});
|
|
1451
1436
|
}
|
|
1452
1437
|
return lt(e, t);
|
|
1453
1438
|
};
|
|
1454
|
-
return i ? /* @__PURE__ */
|
|
1439
|
+
return i ? /* @__PURE__ */ I("div", {
|
|
1455
1440
|
className: "space-y-4",
|
|
1456
|
-
children: [o && /* @__PURE__ */
|
|
1441
|
+
children: [o && /* @__PURE__ */ I("div", {
|
|
1457
1442
|
className: "flex items-center justify-between gap-2 p-4 bg-card rounded-lg border",
|
|
1458
|
-
children: [/* @__PURE__ */
|
|
1443
|
+
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("h2", {
|
|
1459
1444
|
className: "text-lg font-semibold",
|
|
1460
1445
|
children: i.title
|
|
1461
|
-
}), i.description && /* @__PURE__ */
|
|
1446
|
+
}), i.description && /* @__PURE__ */ F("p", {
|
|
1462
1447
|
className: "text-sm text-muted-foreground",
|
|
1463
1448
|
children: i.description
|
|
1464
|
-
})] }), /* @__PURE__ */
|
|
1449
|
+
})] }), /* @__PURE__ */ I("div", {
|
|
1465
1450
|
className: "flex items-center gap-2",
|
|
1466
1451
|
children: [
|
|
1467
|
-
i.refreshInterval && /* @__PURE__ */
|
|
1452
|
+
i.refreshInterval && /* @__PURE__ */ I(d, {
|
|
1468
1453
|
variant: "outline",
|
|
1469
1454
|
size: "sm",
|
|
1470
1455
|
onClick: y,
|
|
1471
|
-
children: [/* @__PURE__ */
|
|
1456
|
+
children: [/* @__PURE__ */ F(ue, { className: "h-4 w-4 mr-2" }), "Refresh"]
|
|
1472
1457
|
}),
|
|
1473
|
-
c && /* @__PURE__ */
|
|
1458
|
+
c && /* @__PURE__ */ I(d, {
|
|
1474
1459
|
variant: "outline",
|
|
1475
1460
|
size: "sm",
|
|
1476
1461
|
onClick: v,
|
|
1477
|
-
children: [/* @__PURE__ */
|
|
1462
|
+
children: [/* @__PURE__ */ F(le, { className: "h-4 w-4 mr-2" }), "Print"]
|
|
1478
1463
|
}),
|
|
1479
|
-
s && i.showExportButtons && /* @__PURE__ */
|
|
1464
|
+
s && i.showExportButtons && /* @__PURE__ */ I("div", {
|
|
1480
1465
|
className: "flex items-center gap-1",
|
|
1481
1466
|
children: [
|
|
1482
|
-
/* @__PURE__ */
|
|
1467
|
+
/* @__PURE__ */ I(d, {
|
|
1483
1468
|
variant: "outline",
|
|
1484
1469
|
size: "sm",
|
|
1485
1470
|
onClick: () => _("pdf"),
|
|
1486
|
-
children: [/* @__PURE__ */
|
|
1471
|
+
children: [/* @__PURE__ */ F(ae, { className: "h-4 w-4 mr-2" }), "PDF"]
|
|
1487
1472
|
}),
|
|
1488
|
-
/* @__PURE__ */
|
|
1473
|
+
/* @__PURE__ */ I(d, {
|
|
1489
1474
|
variant: "outline",
|
|
1490
1475
|
size: "sm",
|
|
1491
1476
|
onClick: () => _("excel"),
|
|
1492
|
-
children: [/* @__PURE__ */
|
|
1477
|
+
children: [/* @__PURE__ */ F(ae, { className: "h-4 w-4 mr-2" }), "Excel"]
|
|
1493
1478
|
}),
|
|
1494
|
-
/* @__PURE__ */
|
|
1479
|
+
/* @__PURE__ */ I(d, {
|
|
1495
1480
|
variant: "outline",
|
|
1496
1481
|
size: "sm",
|
|
1497
1482
|
onClick: () => _("csv"),
|
|
1498
|
-
children: [/* @__PURE__ */
|
|
1483
|
+
children: [/* @__PURE__ */ F(ae, { className: "h-4 w-4 mr-2" }), "CSV"]
|
|
1499
1484
|
})
|
|
1500
1485
|
]
|
|
1501
1486
|
})
|
|
1502
1487
|
]
|
|
1503
1488
|
})]
|
|
1504
|
-
}), /* @__PURE__ */
|
|
1489
|
+
}), /* @__PURE__ */ I(f, { children: [/* @__PURE__ */ I(h, { children: [!o && i.title && /* @__PURE__ */ F(g, { children: i.title }), !o && i.description && /* @__PURE__ */ F(m, { children: i.description })] }), /* @__PURE__ */ I(p, {
|
|
1505
1490
|
className: "space-y-6",
|
|
1506
1491
|
children: [
|
|
1507
|
-
l && /* @__PURE__ */
|
|
1492
|
+
l && /* @__PURE__ */ I("div", {
|
|
1508
1493
|
className: "space-y-6",
|
|
1509
|
-
children: [/* @__PURE__ */
|
|
1494
|
+
children: [/* @__PURE__ */ F("div", {
|
|
1510
1495
|
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
1511
1496
|
children: [
|
|
1512
1497
|
1,
|
|
1513
1498
|
2,
|
|
1514
1499
|
3
|
|
1515
|
-
].map((e) => /* @__PURE__ */
|
|
1500
|
+
].map((e) => /* @__PURE__ */ F(f, { children: /* @__PURE__ */ I(p, {
|
|
1516
1501
|
className: "p-4 space-y-2",
|
|
1517
|
-
children: [/* @__PURE__ */
|
|
1502
|
+
children: [/* @__PURE__ */ F(O, { className: "h-4 w-20" }), /* @__PURE__ */ F(O, { className: "h-8 w-28" })]
|
|
1518
1503
|
}) }, e))
|
|
1519
|
-
}), /* @__PURE__ */
|
|
1504
|
+
}), /* @__PURE__ */ I("div", {
|
|
1520
1505
|
className: "space-y-2",
|
|
1521
|
-
children: [/* @__PURE__ */
|
|
1506
|
+
children: [/* @__PURE__ */ F(O, { className: "h-10 w-full" }), [
|
|
1522
1507
|
1,
|
|
1523
1508
|
2,
|
|
1524
1509
|
3,
|
|
1525
1510
|
4,
|
|
1526
1511
|
5
|
|
1527
|
-
].map((e) => /* @__PURE__ */
|
|
1512
|
+
].map((e) => /* @__PURE__ */ F(O, { className: "h-8 w-full" }, e))]
|
|
1528
1513
|
})]
|
|
1529
1514
|
}),
|
|
1530
|
-
!l && i.sections?.map((t, r) => t.visible === !1 ? null : /* @__PURE__ */
|
|
1515
|
+
!l && i.sections?.map((t, r) => t.visible === !1 ? null : /* @__PURE__ */ I("div", {
|
|
1531
1516
|
className: "space-y-2",
|
|
1532
1517
|
children: [
|
|
1533
|
-
t.title && t.type !== "header" && /* @__PURE__ */
|
|
1518
|
+
t.title && t.type !== "header" && /* @__PURE__ */ F("h3", {
|
|
1534
1519
|
className: "text-lg font-semibold border-b pb-2",
|
|
1535
1520
|
children: t.title
|
|
1536
1521
|
}),
|
|
1537
|
-
t.type === "header" && t.title && /* @__PURE__ */
|
|
1522
|
+
t.type === "header" && t.title && /* @__PURE__ */ F("div", {
|
|
1538
1523
|
className: "text-2xl font-bold py-4",
|
|
1539
1524
|
children: t.title
|
|
1540
1525
|
}),
|
|
1541
|
-
t.type === "summary" && /* @__PURE__ */
|
|
1526
|
+
t.type === "summary" && /* @__PURE__ */ F("div", {
|
|
1542
1527
|
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
1543
|
-
children: i.fields?.filter((e) => e.showInSummary).map((e, t) => /* @__PURE__ */
|
|
1528
|
+
children: i.fields?.filter((e) => e.showInSummary).map((e, t) => /* @__PURE__ */ F(f, { children: /* @__PURE__ */ I(p, {
|
|
1544
1529
|
className: "p-4",
|
|
1545
|
-
children: [/* @__PURE__ */
|
|
1530
|
+
children: [/* @__PURE__ */ F("div", {
|
|
1546
1531
|
className: "text-sm text-muted-foreground",
|
|
1547
1532
|
children: e.label || e.name
|
|
1548
|
-
}), /* @__PURE__ */
|
|
1533
|
+
}), /* @__PURE__ */ F("div", {
|
|
1549
1534
|
className: "text-2xl font-bold",
|
|
1550
1535
|
children: lt(b(e.name, e.aggregation), e)
|
|
1551
1536
|
})]
|
|
1552
1537
|
}) }, t))
|
|
1553
1538
|
}),
|
|
1554
|
-
t.type === "chart" && t.chart && /* @__PURE__ */
|
|
1539
|
+
t.type === "chart" && t.chart && /* @__PURE__ */ F("div", {
|
|
1555
1540
|
className: "min-h-[300px]",
|
|
1556
1541
|
children: (() => {
|
|
1557
1542
|
let n = t.chart.type, r = !!t.chart.chartType;
|
|
@@ -1561,7 +1546,7 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1561
1546
|
series: t.chart.series || (t.chart.yAxisFields ? t.chart.yAxisFields.map((e) => ({ dataKey: e })) : []),
|
|
1562
1547
|
chartType: t.chart.chartType || "bar"
|
|
1563
1548
|
} : {};
|
|
1564
|
-
return /* @__PURE__ */
|
|
1549
|
+
return /* @__PURE__ */ F(B, { schema: {
|
|
1565
1550
|
...t.chart,
|
|
1566
1551
|
type: n,
|
|
1567
1552
|
...i,
|
|
@@ -1570,21 +1555,21 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1570
1555
|
} });
|
|
1571
1556
|
})()
|
|
1572
1557
|
}),
|
|
1573
|
-
t.type === "table" && /* @__PURE__ */
|
|
1558
|
+
t.type === "table" && /* @__PURE__ */ F("div", {
|
|
1574
1559
|
className: "border rounded-lg overflow-x-auto",
|
|
1575
|
-
children: /* @__PURE__ */
|
|
1560
|
+
children: /* @__PURE__ */ I("table", {
|
|
1576
1561
|
className: "w-full text-sm min-w-[600px]",
|
|
1577
|
-
children: [/* @__PURE__ */
|
|
1562
|
+
children: [/* @__PURE__ */ F("thead", {
|
|
1578
1563
|
className: "bg-muted",
|
|
1579
|
-
children: /* @__PURE__ */
|
|
1564
|
+
children: /* @__PURE__ */ F("tr", { children: t.columns?.map((e, t) => /* @__PURE__ */ F("th", {
|
|
1580
1565
|
className: `px-4 py-2 font-medium ${e.type === "number" ? "text-right" : "text-left"}`,
|
|
1581
1566
|
children: e.label || e.name
|
|
1582
1567
|
}, t)) })
|
|
1583
|
-
}), /* @__PURE__ */
|
|
1568
|
+
}), /* @__PURE__ */ F("tbody", { children: (() => {
|
|
1584
1569
|
let e = ft(a || [], i.groupBy || []);
|
|
1585
|
-
return e ? e.map((e) => /* @__PURE__ */
|
|
1570
|
+
return e ? e.map((e) => /* @__PURE__ */ I(n.Fragment, { children: [/* @__PURE__ */ F("tr", {
|
|
1586
1571
|
className: "bg-muted/60",
|
|
1587
|
-
children: /* @__PURE__ */
|
|
1572
|
+
children: /* @__PURE__ */ I("td", {
|
|
1588
1573
|
colSpan: t.columns?.length || 1,
|
|
1589
1574
|
className: "px-4 py-2 font-semibold text-sm",
|
|
1590
1575
|
children: [
|
|
@@ -1594,16 +1579,16 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1594
1579
|
")"
|
|
1595
1580
|
]
|
|
1596
1581
|
})
|
|
1597
|
-
}), e.rows.map((e, n) => /* @__PURE__ */
|
|
1582
|
+
}), e.rows.map((e, n) => /* @__PURE__ */ F("tr", {
|
|
1598
1583
|
className: "border-t hover:bg-muted/50 even:bg-muted/20",
|
|
1599
|
-
children: t.columns?.map((t, n) => /* @__PURE__ */
|
|
1584
|
+
children: t.columns?.map((t, n) => /* @__PURE__ */ F("td", {
|
|
1600
1585
|
className: `px-4 py-2 ${t.type === "number" ? "text-right tabular-nums" : ""}`,
|
|
1601
1586
|
style: x(t.name, e[t.name]),
|
|
1602
1587
|
children: S(e[t.name], t)
|
|
1603
1588
|
}, n))
|
|
1604
|
-
}, n))] }, e.key)) : a?.map((e, n) => /* @__PURE__ */
|
|
1589
|
+
}, n))] }, e.key)) : a?.map((e, n) => /* @__PURE__ */ F("tr", {
|
|
1605
1590
|
className: "border-t hover:bg-muted/50 even:bg-muted/20",
|
|
1606
|
-
children: t.columns?.map((t, n) => /* @__PURE__ */
|
|
1591
|
+
children: t.columns?.map((t, n) => /* @__PURE__ */ F("td", {
|
|
1607
1592
|
className: `px-4 py-2 ${t.type === "number" ? "text-right tabular-nums" : ""}`,
|
|
1608
1593
|
style: x(t.name, e[t.name]),
|
|
1609
1594
|
children: S(e[t.name], t)
|
|
@@ -1612,27 +1597,27 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1612
1597
|
})() })]
|
|
1613
1598
|
})
|
|
1614
1599
|
}),
|
|
1615
|
-
t.type === "text" && t.text && /* @__PURE__ */
|
|
1600
|
+
t.type === "text" && t.text && /* @__PURE__ */ F("div", {
|
|
1616
1601
|
className: "prose max-w-none",
|
|
1617
|
-
children: /* @__PURE__ */
|
|
1602
|
+
children: /* @__PURE__ */ F("p", { children: t.text })
|
|
1618
1603
|
}),
|
|
1619
|
-
t.type === "page-break" && /* @__PURE__ */
|
|
1620
|
-
t.content && /* @__PURE__ */
|
|
1604
|
+
t.type === "page-break" && /* @__PURE__ */ F("div", { className: "border-t-2 border-dashed my-8 print:page-break-after-always" }),
|
|
1605
|
+
t.content && /* @__PURE__ */ F(B, { schema: t.content })
|
|
1621
1606
|
]
|
|
1622
1607
|
}, r)),
|
|
1623
|
-
!i.sections && a && a.length > 0 && /* @__PURE__ */
|
|
1608
|
+
!i.sections && a && a.length > 0 && /* @__PURE__ */ F("div", {
|
|
1624
1609
|
className: "border rounded-lg overflow-x-auto",
|
|
1625
|
-
children: /* @__PURE__ */
|
|
1610
|
+
children: /* @__PURE__ */ I("table", {
|
|
1626
1611
|
className: "w-full text-sm min-w-[600px]",
|
|
1627
|
-
children: [/* @__PURE__ */
|
|
1612
|
+
children: [/* @__PURE__ */ F("thead", {
|
|
1628
1613
|
className: "bg-muted",
|
|
1629
|
-
children: /* @__PURE__ */
|
|
1614
|
+
children: /* @__PURE__ */ F("tr", { children: i.fields?.map((e, t) => /* @__PURE__ */ F("th", {
|
|
1630
1615
|
className: `px-4 py-2 font-medium ${e.type === "number" ? "text-right" : "text-left"}`,
|
|
1631
1616
|
children: e.label || e.name
|
|
1632
1617
|
}, t)) })
|
|
1633
|
-
}), /* @__PURE__ */
|
|
1618
|
+
}), /* @__PURE__ */ F("tbody", { children: a.map((e, t) => /* @__PURE__ */ F("tr", {
|
|
1634
1619
|
className: "border-t hover:bg-muted/50 even:bg-muted/20",
|
|
1635
|
-
children: i.fields?.map((t, n) => /* @__PURE__ */
|
|
1620
|
+
children: i.fields?.map((t, n) => /* @__PURE__ */ F("td", {
|
|
1636
1621
|
className: `px-4 py-2 ${t.type === "number" ? "text-right tabular-nums" : ""}`,
|
|
1637
1622
|
style: x(t.name, e[t.name]),
|
|
1638
1623
|
children: S(e[t.name], t)
|
|
@@ -1642,7 +1627,7 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1642
1627
|
})
|
|
1643
1628
|
]
|
|
1644
1629
|
})] })]
|
|
1645
|
-
}) : /* @__PURE__ */
|
|
1630
|
+
}) : /* @__PURE__ */ F(f, { children: /* @__PURE__ */ F(p, {
|
|
1646
1631
|
className: "p-8 text-center text-muted-foreground",
|
|
1647
1632
|
children: "No report to display"
|
|
1648
1633
|
}) });
|
|
@@ -1661,27 +1646,27 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1661
1646
|
};
|
|
1662
1647
|
r(i), t?.(i);
|
|
1663
1648
|
};
|
|
1664
|
-
return /* @__PURE__ */
|
|
1649
|
+
return /* @__PURE__ */ I(f, { children: [/* @__PURE__ */ F(h, { children: /* @__PURE__ */ I(g, {
|
|
1665
1650
|
className: "flex items-center gap-2",
|
|
1666
|
-
children: [/* @__PURE__ */
|
|
1667
|
-
}) }), /* @__PURE__ */
|
|
1651
|
+
children: [/* @__PURE__ */ F(te, { className: "h-5 w-5" }), "Schedule Configuration"]
|
|
1652
|
+
}) }), /* @__PURE__ */ I(p, {
|
|
1668
1653
|
className: "space-y-4",
|
|
1669
|
-
children: [/* @__PURE__ */
|
|
1654
|
+
children: [/* @__PURE__ */ I("div", {
|
|
1670
1655
|
className: "flex items-center gap-2",
|
|
1671
|
-
children: [/* @__PURE__ */
|
|
1656
|
+
children: [/* @__PURE__ */ F("input", {
|
|
1672
1657
|
type: "checkbox",
|
|
1673
1658
|
id: "schedule-enabled",
|
|
1674
1659
|
checked: n.enabled || !1,
|
|
1675
1660
|
onChange: (e) => i({ enabled: e.target.checked }),
|
|
1676
1661
|
className: "rounded"
|
|
1677
|
-
}), /* @__PURE__ */
|
|
1662
|
+
}), /* @__PURE__ */ F(D, {
|
|
1678
1663
|
htmlFor: "schedule-enabled",
|
|
1679
1664
|
children: "Enable Scheduled Report"
|
|
1680
1665
|
})]
|
|
1681
|
-
}), n.enabled && /* @__PURE__ */
|
|
1682
|
-
/* @__PURE__ */
|
|
1666
|
+
}), n.enabled && /* @__PURE__ */ I(P, { children: [
|
|
1667
|
+
/* @__PURE__ */ I("div", {
|
|
1683
1668
|
className: "space-y-2",
|
|
1684
|
-
children: [/* @__PURE__ */
|
|
1669
|
+
children: [/* @__PURE__ */ F(D, { children: "Frequency" }), /* @__PURE__ */ F("select", {
|
|
1685
1670
|
className: "w-full border rounded-md p-2 bg-background",
|
|
1686
1671
|
value: n.frequency || "weekly",
|
|
1687
1672
|
onChange: (e) => i({ frequency: e.target.value }),
|
|
@@ -1710,15 +1695,15 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1710
1695
|
value: "yearly",
|
|
1711
1696
|
label: "Yearly"
|
|
1712
1697
|
}
|
|
1713
|
-
].map((e) => /* @__PURE__ */
|
|
1698
|
+
].map((e) => /* @__PURE__ */ F("option", {
|
|
1714
1699
|
value: e.value,
|
|
1715
1700
|
children: e.label
|
|
1716
1701
|
}, e.value))
|
|
1717
1702
|
})]
|
|
1718
1703
|
}),
|
|
1719
|
-
n.frequency === "weekly" && /* @__PURE__ */
|
|
1704
|
+
n.frequency === "weekly" && /* @__PURE__ */ I("div", {
|
|
1720
1705
|
className: "space-y-2",
|
|
1721
|
-
children: [/* @__PURE__ */
|
|
1706
|
+
children: [/* @__PURE__ */ F(D, { children: "Day of Week" }), /* @__PURE__ */ F("select", {
|
|
1722
1707
|
className: "w-full border rounded-md p-2 bg-background",
|
|
1723
1708
|
value: n.dayOfWeek ?? 1,
|
|
1724
1709
|
onChange: (e) => i({ dayOfWeek: Number(e.target.value) }),
|
|
@@ -1751,15 +1736,15 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1751
1736
|
value: 6,
|
|
1752
1737
|
label: "Saturday"
|
|
1753
1738
|
}
|
|
1754
|
-
].map((e) => /* @__PURE__ */
|
|
1739
|
+
].map((e) => /* @__PURE__ */ F("option", {
|
|
1755
1740
|
value: e.value,
|
|
1756
1741
|
children: e.label
|
|
1757
1742
|
}, e.value))
|
|
1758
1743
|
})]
|
|
1759
1744
|
}),
|
|
1760
|
-
n.frequency === "monthly" && /* @__PURE__ */
|
|
1745
|
+
n.frequency === "monthly" && /* @__PURE__ */ I("div", {
|
|
1761
1746
|
className: "space-y-2",
|
|
1762
|
-
children: [/* @__PURE__ */
|
|
1747
|
+
children: [/* @__PURE__ */ F(D, { children: "Day of Month" }), /* @__PURE__ */ F(E, {
|
|
1763
1748
|
type: "number",
|
|
1764
1749
|
min: 1,
|
|
1765
1750
|
max: 31,
|
|
@@ -1767,28 +1752,28 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1767
1752
|
onChange: (e) => i({ dayOfMonth: Number(e.target.value) })
|
|
1768
1753
|
})]
|
|
1769
1754
|
}),
|
|
1770
|
-
/* @__PURE__ */
|
|
1755
|
+
/* @__PURE__ */ I("div", {
|
|
1771
1756
|
className: "space-y-2",
|
|
1772
|
-
children: [/* @__PURE__ */
|
|
1757
|
+
children: [/* @__PURE__ */ I(D, {
|
|
1773
1758
|
className: "flex items-center gap-2",
|
|
1774
|
-
children: [/* @__PURE__ */
|
|
1775
|
-
}), /* @__PURE__ */
|
|
1759
|
+
children: [/* @__PURE__ */ F(ie, { className: "h-4 w-4" }), "Time"]
|
|
1760
|
+
}), /* @__PURE__ */ F(E, {
|
|
1776
1761
|
type: "time",
|
|
1777
1762
|
value: n.time || "09:00",
|
|
1778
1763
|
onChange: (e) => i({ time: e.target.value })
|
|
1779
1764
|
})]
|
|
1780
1765
|
}),
|
|
1781
|
-
/* @__PURE__ */
|
|
1766
|
+
/* @__PURE__ */ I("div", {
|
|
1782
1767
|
className: "space-y-2",
|
|
1783
|
-
children: [/* @__PURE__ */
|
|
1768
|
+
children: [/* @__PURE__ */ F(D, { children: "Timezone" }), /* @__PURE__ */ F(E, {
|
|
1784
1769
|
value: n.timezone || "",
|
|
1785
1770
|
onChange: (e) => i({ timezone: e.target.value }),
|
|
1786
1771
|
placeholder: "e.g. America/New_York"
|
|
1787
1772
|
})]
|
|
1788
1773
|
}),
|
|
1789
|
-
/* @__PURE__ */
|
|
1774
|
+
/* @__PURE__ */ I("div", {
|
|
1790
1775
|
className: "space-y-2",
|
|
1791
|
-
children: [/* @__PURE__ */
|
|
1776
|
+
children: [/* @__PURE__ */ F(D, { children: "Export Formats" }), /* @__PURE__ */ F("div", {
|
|
1792
1777
|
className: "flex flex-wrap gap-2",
|
|
1793
1778
|
children: [
|
|
1794
1779
|
{
|
|
@@ -1807,9 +1792,9 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1807
1792
|
value: "html",
|
|
1808
1793
|
label: "HTML"
|
|
1809
1794
|
}
|
|
1810
|
-
].map((e) => /* @__PURE__ */
|
|
1795
|
+
].map((e) => /* @__PURE__ */ I("label", {
|
|
1811
1796
|
className: "flex items-center gap-1.5 px-3 py-1.5 border rounded-md cursor-pointer hover:bg-muted/50",
|
|
1812
|
-
children: [/* @__PURE__ */
|
|
1797
|
+
children: [/* @__PURE__ */ F("input", {
|
|
1813
1798
|
type: "checkbox",
|
|
1814
1799
|
checked: n.formats?.includes(e.value) || !1,
|
|
1815
1800
|
onChange: (t) => {
|
|
@@ -1817,27 +1802,27 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1817
1802
|
i({ formats: t.target.checked ? [...r, e.value] : r.filter((t) => t !== e.value) });
|
|
1818
1803
|
},
|
|
1819
1804
|
className: "rounded"
|
|
1820
|
-
}), /* @__PURE__ */
|
|
1805
|
+
}), /* @__PURE__ */ F("span", {
|
|
1821
1806
|
className: "text-sm",
|
|
1822
1807
|
children: e.label
|
|
1823
1808
|
})]
|
|
1824
1809
|
}, e.value))
|
|
1825
1810
|
})]
|
|
1826
1811
|
}),
|
|
1827
|
-
/* @__PURE__ */
|
|
1812
|
+
/* @__PURE__ */ I("div", {
|
|
1828
1813
|
className: "space-y-2",
|
|
1829
|
-
children: [/* @__PURE__ */
|
|
1814
|
+
children: [/* @__PURE__ */ I(D, {
|
|
1830
1815
|
className: "flex items-center gap-2",
|
|
1831
|
-
children: [/* @__PURE__ */
|
|
1832
|
-
}), /* @__PURE__ */
|
|
1816
|
+
children: [/* @__PURE__ */ F(ce, { className: "h-4 w-4" }), "Email Recipients"]
|
|
1817
|
+
}), /* @__PURE__ */ F(E, {
|
|
1833
1818
|
placeholder: "email1@example.com, email2@example.com",
|
|
1834
1819
|
value: n.recipients?.join(", ") || "",
|
|
1835
1820
|
onChange: (e) => i({ recipients: e.target.value.split(",").map((e) => e.trim()).filter(Boolean) })
|
|
1836
1821
|
})]
|
|
1837
1822
|
}),
|
|
1838
|
-
/* @__PURE__ */
|
|
1823
|
+
/* @__PURE__ */ I("div", {
|
|
1839
1824
|
className: "space-y-2",
|
|
1840
|
-
children: [/* @__PURE__ */
|
|
1825
|
+
children: [/* @__PURE__ */ F(D, { children: "Email Subject" }), /* @__PURE__ */ F(E, {
|
|
1841
1826
|
value: n.subject || "",
|
|
1842
1827
|
onChange: (e) => i({ subject: e.target.value }),
|
|
1843
1828
|
placeholder: "Scheduled Report: {report_title}"
|
|
@@ -1878,7 +1863,7 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1878
1863
|
...c,
|
|
1879
1864
|
fields: n
|
|
1880
1865
|
});
|
|
1881
|
-
},
|
|
1866
|
+
}, N = () => {
|
|
1882
1867
|
let e = {
|
|
1883
1868
|
field: r[0]?.name || "",
|
|
1884
1869
|
operator: "equals",
|
|
@@ -1888,7 +1873,7 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1888
1873
|
...c,
|
|
1889
1874
|
filters: t
|
|
1890
1875
|
});
|
|
1891
|
-
},
|
|
1876
|
+
}, ee = (e) => {
|
|
1892
1877
|
let t = v.filter((t, n) => n !== e);
|
|
1893
1878
|
y(t), l({
|
|
1894
1879
|
...c,
|
|
@@ -1930,66 +1915,66 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1930
1915
|
...c,
|
|
1931
1916
|
sections: n
|
|
1932
1917
|
});
|
|
1933
|
-
},
|
|
1918
|
+
}, H = (e) => {
|
|
1934
1919
|
let t = S.filter((t, n) => n !== e);
|
|
1935
1920
|
C(t), l({
|
|
1936
1921
|
...c,
|
|
1937
1922
|
sections: t
|
|
1938
1923
|
});
|
|
1939
|
-
},
|
|
1924
|
+
}, U = (e, t) => {
|
|
1940
1925
|
let n = [...S];
|
|
1941
1926
|
n[e] = t, C(n), l({
|
|
1942
1927
|
...c,
|
|
1943
1928
|
sections: n
|
|
1944
1929
|
});
|
|
1945
1930
|
};
|
|
1946
|
-
return /* @__PURE__ */
|
|
1931
|
+
return /* @__PURE__ */ I("div", {
|
|
1947
1932
|
className: "space-y-4",
|
|
1948
|
-
children: [/* @__PURE__ */
|
|
1933
|
+
children: [/* @__PURE__ */ I(f, { children: [/* @__PURE__ */ I(h, { children: [/* @__PURE__ */ F(g, { children: "Report Builder" }), /* @__PURE__ */ F(m, { children: "Configure your report settings, fields, filters, and sections" })] }), /* @__PURE__ */ I(p, { children: [/* @__PURE__ */ I(k, {
|
|
1949
1934
|
defaultValue: "basic",
|
|
1950
1935
|
className: "w-full",
|
|
1951
1936
|
children: [
|
|
1952
|
-
/* @__PURE__ */
|
|
1937
|
+
/* @__PURE__ */ I(j, {
|
|
1953
1938
|
className: "grid w-full grid-cols-6",
|
|
1954
1939
|
children: [
|
|
1955
|
-
/* @__PURE__ */
|
|
1940
|
+
/* @__PURE__ */ I(M, {
|
|
1956
1941
|
value: "basic",
|
|
1957
|
-
children: [/* @__PURE__ */
|
|
1942
|
+
children: [/* @__PURE__ */ F(pe, { className: "h-4 w-4 mr-2" }), "Basic"]
|
|
1958
1943
|
}),
|
|
1959
|
-
/* @__PURE__ */
|
|
1944
|
+
/* @__PURE__ */ I(M, {
|
|
1960
1945
|
value: "fields",
|
|
1961
|
-
children: [/* @__PURE__ */
|
|
1946
|
+
children: [/* @__PURE__ */ F(se, { className: "h-4 w-4 mr-2" }), "Fields"]
|
|
1962
1947
|
}),
|
|
1963
|
-
/* @__PURE__ */
|
|
1948
|
+
/* @__PURE__ */ I(M, {
|
|
1964
1949
|
value: "filters",
|
|
1965
|
-
children: [/* @__PURE__ */
|
|
1950
|
+
children: [/* @__PURE__ */ F(oe, { className: "h-4 w-4 mr-2" }), "Filters"]
|
|
1966
1951
|
}),
|
|
1967
|
-
/* @__PURE__ */
|
|
1952
|
+
/* @__PURE__ */ I(M, {
|
|
1968
1953
|
value: "grouping",
|
|
1969
|
-
children: [/* @__PURE__ */
|
|
1954
|
+
children: [/* @__PURE__ */ F(se, { className: "h-4 w-4 mr-2" }), "Group By"]
|
|
1970
1955
|
}),
|
|
1971
|
-
/* @__PURE__ */
|
|
1956
|
+
/* @__PURE__ */ I(M, {
|
|
1972
1957
|
value: "sections",
|
|
1973
|
-
children: [/* @__PURE__ */
|
|
1958
|
+
children: [/* @__PURE__ */ F(se, { className: "h-4 w-4 mr-2" }), "Sections"]
|
|
1974
1959
|
}),
|
|
1975
|
-
/* @__PURE__ */
|
|
1960
|
+
/* @__PURE__ */ I(M, {
|
|
1976
1961
|
value: "schedule",
|
|
1977
|
-
children: [/* @__PURE__ */
|
|
1962
|
+
children: [/* @__PURE__ */ F(te, { className: "h-4 w-4 mr-2" }), "Schedule"]
|
|
1978
1963
|
})
|
|
1979
1964
|
]
|
|
1980
1965
|
}),
|
|
1981
|
-
/* @__PURE__ */
|
|
1966
|
+
/* @__PURE__ */ F(A, {
|
|
1982
1967
|
value: "basic",
|
|
1983
1968
|
className: "space-y-4 mt-4",
|
|
1984
|
-
children: /* @__PURE__ */
|
|
1969
|
+
children: /* @__PURE__ */ I("div", {
|
|
1985
1970
|
className: "space-y-4",
|
|
1986
1971
|
children: [
|
|
1987
|
-
/* @__PURE__ */
|
|
1972
|
+
/* @__PURE__ */ I("div", {
|
|
1988
1973
|
className: "space-y-2",
|
|
1989
|
-
children: [/* @__PURE__ */
|
|
1974
|
+
children: [/* @__PURE__ */ F(D, {
|
|
1990
1975
|
htmlFor: "report-title",
|
|
1991
1976
|
children: "Report Title"
|
|
1992
|
-
}), /* @__PURE__ */
|
|
1977
|
+
}), /* @__PURE__ */ F(E, {
|
|
1993
1978
|
id: "report-title",
|
|
1994
1979
|
value: c.title || "",
|
|
1995
1980
|
onChange: (e) => l({
|
|
@@ -1999,12 +1984,12 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
1999
1984
|
placeholder: "Enter report title"
|
|
2000
1985
|
})]
|
|
2001
1986
|
}),
|
|
2002
|
-
/* @__PURE__ */
|
|
1987
|
+
/* @__PURE__ */ I("div", {
|
|
2003
1988
|
className: "space-y-2",
|
|
2004
|
-
children: [/* @__PURE__ */
|
|
1989
|
+
children: [/* @__PURE__ */ F(D, {
|
|
2005
1990
|
htmlFor: "report-description",
|
|
2006
1991
|
children: "Description"
|
|
2007
|
-
}), /* @__PURE__ */
|
|
1992
|
+
}), /* @__PURE__ */ F(E, {
|
|
2008
1993
|
id: "report-description",
|
|
2009
1994
|
value: c.description || "",
|
|
2010
1995
|
onChange: (e) => l({
|
|
@@ -2014,58 +1999,58 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
2014
1999
|
placeholder: "Enter report description"
|
|
2015
2000
|
})]
|
|
2016
2001
|
}),
|
|
2017
|
-
n.length > 0 && /* @__PURE__ */
|
|
2002
|
+
n.length > 0 && /* @__PURE__ */ I("div", {
|
|
2018
2003
|
className: "space-y-2",
|
|
2019
|
-
children: [/* @__PURE__ */
|
|
2004
|
+
children: [/* @__PURE__ */ F(D, { children: "Data Source" }), /* @__PURE__ */ I("select", {
|
|
2020
2005
|
className: "w-full border rounded-md p-2",
|
|
2021
|
-
children: [/* @__PURE__ */
|
|
2006
|
+
children: [/* @__PURE__ */ F("option", {
|
|
2022
2007
|
value: "",
|
|
2023
2008
|
children: "Select a data source"
|
|
2024
|
-
}), n.map((e, t) => /* @__PURE__ */
|
|
2009
|
+
}), n.map((e, t) => /* @__PURE__ */ I("option", {
|
|
2025
2010
|
value: t,
|
|
2026
2011
|
children: ["Data Source ", t + 1]
|
|
2027
2012
|
}, t))]
|
|
2028
2013
|
})]
|
|
2029
2014
|
}),
|
|
2030
|
-
/* @__PURE__ */
|
|
2015
|
+
/* @__PURE__ */ I("div", {
|
|
2031
2016
|
className: "space-y-2",
|
|
2032
|
-
children: [/* @__PURE__ */
|
|
2017
|
+
children: [/* @__PURE__ */ F(D, { children: "Export Options" }), /* @__PURE__ */ I("div", {
|
|
2033
2018
|
className: "flex items-center gap-4",
|
|
2034
|
-
children: [/* @__PURE__ */
|
|
2019
|
+
children: [/* @__PURE__ */ I("label", {
|
|
2035
2020
|
className: "flex items-center gap-2",
|
|
2036
|
-
children: [/* @__PURE__ */
|
|
2021
|
+
children: [/* @__PURE__ */ F("input", {
|
|
2037
2022
|
type: "checkbox",
|
|
2038
2023
|
checked: c.showExportButtons || !1,
|
|
2039
2024
|
onChange: (e) => l({
|
|
2040
2025
|
...c,
|
|
2041
2026
|
showExportButtons: e.target.checked
|
|
2042
2027
|
})
|
|
2043
|
-
}), /* @__PURE__ */
|
|
2028
|
+
}), /* @__PURE__ */ F("span", {
|
|
2044
2029
|
className: "text-sm",
|
|
2045
2030
|
children: "Show Export Buttons"
|
|
2046
2031
|
})]
|
|
2047
|
-
}), /* @__PURE__ */
|
|
2032
|
+
}), /* @__PURE__ */ I("label", {
|
|
2048
2033
|
className: "flex items-center gap-2",
|
|
2049
|
-
children: [/* @__PURE__ */
|
|
2034
|
+
children: [/* @__PURE__ */ F("input", {
|
|
2050
2035
|
type: "checkbox",
|
|
2051
2036
|
checked: c.showPrintButton || !1,
|
|
2052
2037
|
onChange: (e) => l({
|
|
2053
2038
|
...c,
|
|
2054
2039
|
showPrintButton: e.target.checked
|
|
2055
2040
|
})
|
|
2056
|
-
}), /* @__PURE__ */
|
|
2041
|
+
}), /* @__PURE__ */ F("span", {
|
|
2057
2042
|
className: "text-sm",
|
|
2058
2043
|
children: "Show Print Button"
|
|
2059
2044
|
})]
|
|
2060
2045
|
})]
|
|
2061
2046
|
})]
|
|
2062
2047
|
}),
|
|
2063
|
-
/* @__PURE__ */
|
|
2048
|
+
/* @__PURE__ */ I("div", {
|
|
2064
2049
|
className: "space-y-2",
|
|
2065
|
-
children: [/* @__PURE__ */
|
|
2050
|
+
children: [/* @__PURE__ */ F(D, {
|
|
2066
2051
|
htmlFor: "export-format",
|
|
2067
2052
|
children: "Default Export Format"
|
|
2068
|
-
}), /* @__PURE__ */
|
|
2053
|
+
}), /* @__PURE__ */ I("select", {
|
|
2069
2054
|
id: "export-format",
|
|
2070
2055
|
className: "w-full border rounded-md p-2",
|
|
2071
2056
|
value: c.defaultExportFormat || "pdf",
|
|
@@ -2074,23 +2059,23 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
2074
2059
|
defaultExportFormat: e.target.value
|
|
2075
2060
|
}),
|
|
2076
2061
|
children: [
|
|
2077
|
-
/* @__PURE__ */
|
|
2062
|
+
/* @__PURE__ */ F("option", {
|
|
2078
2063
|
value: "pdf",
|
|
2079
2064
|
children: "PDF"
|
|
2080
2065
|
}),
|
|
2081
|
-
/* @__PURE__ */
|
|
2066
|
+
/* @__PURE__ */ F("option", {
|
|
2082
2067
|
value: "excel",
|
|
2083
2068
|
children: "Excel"
|
|
2084
2069
|
}),
|
|
2085
|
-
/* @__PURE__ */
|
|
2070
|
+
/* @__PURE__ */ F("option", {
|
|
2086
2071
|
value: "csv",
|
|
2087
2072
|
children: "CSV"
|
|
2088
2073
|
}),
|
|
2089
|
-
/* @__PURE__ */
|
|
2074
|
+
/* @__PURE__ */ F("option", {
|
|
2090
2075
|
value: "json",
|
|
2091
2076
|
children: "JSON"
|
|
2092
2077
|
}),
|
|
2093
|
-
/* @__PURE__ */
|
|
2078
|
+
/* @__PURE__ */ F("option", {
|
|
2094
2079
|
value: "html",
|
|
2095
2080
|
children: "HTML"
|
|
2096
2081
|
})
|
|
@@ -2100,36 +2085,36 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
2100
2085
|
]
|
|
2101
2086
|
})
|
|
2102
2087
|
}),
|
|
2103
|
-
/* @__PURE__ */
|
|
2088
|
+
/* @__PURE__ */ I(A, {
|
|
2104
2089
|
value: "fields",
|
|
2105
2090
|
className: "space-y-4 mt-4",
|
|
2106
|
-
children: [/* @__PURE__ */
|
|
2091
|
+
children: [/* @__PURE__ */ I("div", {
|
|
2107
2092
|
className: "flex items-center justify-between",
|
|
2108
|
-
children: [/* @__PURE__ */
|
|
2093
|
+
children: [/* @__PURE__ */ F(D, { children: "Report Fields" }), /* @__PURE__ */ I(d, {
|
|
2109
2094
|
size: "sm",
|
|
2110
2095
|
variant: "outline",
|
|
2111
2096
|
onClick: w,
|
|
2112
2097
|
disabled: u.length >= r.length,
|
|
2113
|
-
children: [/* @__PURE__ */
|
|
2098
|
+
children: [/* @__PURE__ */ F(W, { className: "h-4 w-4 mr-2" }), "Add Field"]
|
|
2114
2099
|
})]
|
|
2115
|
-
}), /* @__PURE__ */
|
|
2100
|
+
}), /* @__PURE__ */ I("div", {
|
|
2116
2101
|
className: "space-y-2",
|
|
2117
|
-
children: [u.map((e, t) => /* @__PURE__ */
|
|
2102
|
+
children: [u.map((e, t) => /* @__PURE__ */ F("div", {
|
|
2118
2103
|
className: "flex items-center gap-2 p-3 border rounded-lg",
|
|
2119
|
-
children: /* @__PURE__ */
|
|
2104
|
+
children: /* @__PURE__ */ I("div", {
|
|
2120
2105
|
className: "flex-1 grid grid-cols-4 gap-2",
|
|
2121
2106
|
children: [
|
|
2122
|
-
/* @__PURE__ */
|
|
2107
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(D, {
|
|
2123
2108
|
className: "text-xs",
|
|
2124
2109
|
children: "Field Name"
|
|
2125
|
-
}), /* @__PURE__ */
|
|
2110
|
+
}), /* @__PURE__ */ F("div", {
|
|
2126
2111
|
className: "text-sm font-medium",
|
|
2127
2112
|
children: e.name
|
|
2128
2113
|
})] }),
|
|
2129
|
-
/* @__PURE__ */
|
|
2114
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(D, {
|
|
2130
2115
|
className: "text-xs",
|
|
2131
2116
|
children: "Label"
|
|
2132
|
-
}), /* @__PURE__ */
|
|
2117
|
+
}), /* @__PURE__ */ F(E, {
|
|
2133
2118
|
className: "h-8 text-sm",
|
|
2134
2119
|
value: e.label || e.name,
|
|
2135
2120
|
onChange: (n) => O(t, {
|
|
@@ -2137,10 +2122,10 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
2137
2122
|
label: n.target.value
|
|
2138
2123
|
})
|
|
2139
2124
|
})] }),
|
|
2140
|
-
/* @__PURE__ */
|
|
2125
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(D, {
|
|
2141
2126
|
className: "text-xs",
|
|
2142
2127
|
children: "Aggregation"
|
|
2143
|
-
}), /* @__PURE__ */
|
|
2128
|
+
}), /* @__PURE__ */ I("select", {
|
|
2144
2129
|
className: "w-full border rounded-md h-8 text-sm px-2",
|
|
2145
2130
|
value: e.aggregation || "",
|
|
2146
2131
|
onChange: (n) => O(t, {
|
|
@@ -2148,87 +2133,87 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
2148
2133
|
aggregation: n.target.value
|
|
2149
2134
|
}),
|
|
2150
2135
|
children: [
|
|
2151
|
-
/* @__PURE__ */
|
|
2136
|
+
/* @__PURE__ */ F("option", {
|
|
2152
2137
|
value: "",
|
|
2153
2138
|
children: "None"
|
|
2154
2139
|
}),
|
|
2155
|
-
/* @__PURE__ */
|
|
2140
|
+
/* @__PURE__ */ F("option", {
|
|
2156
2141
|
value: "sum",
|
|
2157
2142
|
children: "Sum"
|
|
2158
2143
|
}),
|
|
2159
|
-
/* @__PURE__ */
|
|
2144
|
+
/* @__PURE__ */ F("option", {
|
|
2160
2145
|
value: "count",
|
|
2161
2146
|
children: "Count"
|
|
2162
2147
|
}),
|
|
2163
|
-
/* @__PURE__ */
|
|
2148
|
+
/* @__PURE__ */ F("option", {
|
|
2164
2149
|
value: "avg",
|
|
2165
2150
|
children: "Average"
|
|
2166
2151
|
}),
|
|
2167
|
-
/* @__PURE__ */
|
|
2152
|
+
/* @__PURE__ */ F("option", {
|
|
2168
2153
|
value: "min",
|
|
2169
2154
|
children: "Min"
|
|
2170
2155
|
}),
|
|
2171
|
-
/* @__PURE__ */
|
|
2156
|
+
/* @__PURE__ */ F("option", {
|
|
2172
2157
|
value: "max",
|
|
2173
2158
|
children: "Max"
|
|
2174
2159
|
})
|
|
2175
2160
|
]
|
|
2176
2161
|
})] }),
|
|
2177
|
-
/* @__PURE__ */
|
|
2162
|
+
/* @__PURE__ */ F("div", {
|
|
2178
2163
|
className: "flex items-end justify-end",
|
|
2179
|
-
children: /* @__PURE__ */
|
|
2164
|
+
children: /* @__PURE__ */ F(d, {
|
|
2180
2165
|
size: "sm",
|
|
2181
2166
|
variant: "ghost",
|
|
2182
2167
|
className: "text-red-500 hover:text-red-700 hover:bg-red-50",
|
|
2183
2168
|
onClick: () => T(t),
|
|
2184
|
-
children: /* @__PURE__ */
|
|
2169
|
+
children: /* @__PURE__ */ F(G, { className: "h-4 w-4" })
|
|
2185
2170
|
})
|
|
2186
2171
|
})
|
|
2187
2172
|
]
|
|
2188
2173
|
})
|
|
2189
|
-
}, t)), u.length === 0 && /* @__PURE__ */
|
|
2174
|
+
}, t)), u.length === 0 && /* @__PURE__ */ F("div", {
|
|
2190
2175
|
className: "text-center py-8 text-muted-foreground border-2 border-dashed rounded-lg",
|
|
2191
2176
|
children: "No fields selected. Click \"Add Field\" to begin."
|
|
2192
2177
|
})]
|
|
2193
2178
|
})]
|
|
2194
2179
|
}),
|
|
2195
|
-
/* @__PURE__ */
|
|
2180
|
+
/* @__PURE__ */ I(A, {
|
|
2196
2181
|
value: "filters",
|
|
2197
2182
|
className: "space-y-4 mt-4",
|
|
2198
|
-
children: [/* @__PURE__ */
|
|
2183
|
+
children: [/* @__PURE__ */ I("div", {
|
|
2199
2184
|
className: "flex items-center justify-between",
|
|
2200
|
-
children: [/* @__PURE__ */
|
|
2185
|
+
children: [/* @__PURE__ */ F(D, { children: "Report Filters" }), /* @__PURE__ */ I(d, {
|
|
2201
2186
|
size: "sm",
|
|
2202
2187
|
variant: "outline",
|
|
2203
|
-
onClick:
|
|
2204
|
-
children: [/* @__PURE__ */
|
|
2188
|
+
onClick: N,
|
|
2189
|
+
children: [/* @__PURE__ */ F(W, { className: "h-4 w-4 mr-2" }), "Add Filter"]
|
|
2205
2190
|
})]
|
|
2206
|
-
}), /* @__PURE__ */
|
|
2191
|
+
}), /* @__PURE__ */ I("div", {
|
|
2207
2192
|
className: "space-y-2",
|
|
2208
|
-
children: [v.map((e, t) => /* @__PURE__ */
|
|
2193
|
+
children: [v.map((e, t) => /* @__PURE__ */ I("div", {
|
|
2209
2194
|
className: "flex items-center gap-2 p-3 border rounded-lg",
|
|
2210
|
-
children: [/* @__PURE__ */
|
|
2195
|
+
children: [/* @__PURE__ */ I("div", {
|
|
2211
2196
|
className: "flex-1 grid grid-cols-3 gap-2",
|
|
2212
2197
|
children: [
|
|
2213
|
-
/* @__PURE__ */
|
|
2198
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(D, {
|
|
2214
2199
|
className: "text-xs",
|
|
2215
2200
|
children: "Field"
|
|
2216
|
-
}), /* @__PURE__ */
|
|
2201
|
+
}), /* @__PURE__ */ F("select", {
|
|
2217
2202
|
className: "w-full border rounded-md h-8 text-sm px-2",
|
|
2218
2203
|
value: e.field,
|
|
2219
2204
|
onChange: (n) => L(t, {
|
|
2220
2205
|
...e,
|
|
2221
2206
|
field: n.target.value
|
|
2222
2207
|
}),
|
|
2223
|
-
children: r.map((e, t) => /* @__PURE__ */
|
|
2208
|
+
children: r.map((e, t) => /* @__PURE__ */ F("option", {
|
|
2224
2209
|
value: e.name,
|
|
2225
2210
|
children: e.label || e.name
|
|
2226
2211
|
}, t))
|
|
2227
2212
|
})] }),
|
|
2228
|
-
/* @__PURE__ */
|
|
2213
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(D, {
|
|
2229
2214
|
className: "text-xs",
|
|
2230
2215
|
children: "Operator"
|
|
2231
|
-
}), /* @__PURE__ */
|
|
2216
|
+
}), /* @__PURE__ */ I("select", {
|
|
2232
2217
|
className: "w-full border rounded-md h-8 text-sm px-2",
|
|
2233
2218
|
value: e.operator,
|
|
2234
2219
|
onChange: (n) => L(t, {
|
|
@@ -2236,32 +2221,32 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
2236
2221
|
operator: n.target.value
|
|
2237
2222
|
}),
|
|
2238
2223
|
children: [
|
|
2239
|
-
/* @__PURE__ */
|
|
2224
|
+
/* @__PURE__ */ F("option", {
|
|
2240
2225
|
value: "equals",
|
|
2241
2226
|
children: "Equals"
|
|
2242
2227
|
}),
|
|
2243
|
-
/* @__PURE__ */
|
|
2228
|
+
/* @__PURE__ */ F("option", {
|
|
2244
2229
|
value: "contains",
|
|
2245
2230
|
children: "Contains"
|
|
2246
2231
|
}),
|
|
2247
|
-
/* @__PURE__ */
|
|
2232
|
+
/* @__PURE__ */ F("option", {
|
|
2248
2233
|
value: "gt",
|
|
2249
2234
|
children: "Greater Than"
|
|
2250
2235
|
}),
|
|
2251
|
-
/* @__PURE__ */
|
|
2236
|
+
/* @__PURE__ */ F("option", {
|
|
2252
2237
|
value: "lt",
|
|
2253
2238
|
children: "Less Than"
|
|
2254
2239
|
}),
|
|
2255
|
-
/* @__PURE__ */
|
|
2240
|
+
/* @__PURE__ */ F("option", {
|
|
2256
2241
|
value: "between",
|
|
2257
2242
|
children: "Between"
|
|
2258
2243
|
})
|
|
2259
2244
|
]
|
|
2260
2245
|
})] }),
|
|
2261
|
-
/* @__PURE__ */
|
|
2246
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(D, {
|
|
2262
2247
|
className: "text-xs",
|
|
2263
2248
|
children: "Value"
|
|
2264
|
-
}), /* @__PURE__ */
|
|
2249
|
+
}), /* @__PURE__ */ F(E, {
|
|
2265
2250
|
className: "h-8 text-sm",
|
|
2266
2251
|
value: String(e.value),
|
|
2267
2252
|
onChange: (n) => L(t, {
|
|
@@ -2270,173 +2255,173 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
2270
2255
|
})
|
|
2271
2256
|
})] })
|
|
2272
2257
|
]
|
|
2273
|
-
}), /* @__PURE__ */
|
|
2258
|
+
}), /* @__PURE__ */ F(d, {
|
|
2274
2259
|
size: "sm",
|
|
2275
2260
|
variant: "ghost",
|
|
2276
2261
|
className: "text-red-500 hover:text-red-700 hover:bg-red-50 self-end",
|
|
2277
|
-
onClick: () =>
|
|
2278
|
-
children: /* @__PURE__ */
|
|
2262
|
+
onClick: () => ee(t),
|
|
2263
|
+
children: /* @__PURE__ */ F(G, { className: "h-4 w-4" })
|
|
2279
2264
|
})]
|
|
2280
|
-
}, t)), v.length === 0 && /* @__PURE__ */
|
|
2265
|
+
}, t)), v.length === 0 && /* @__PURE__ */ F("div", {
|
|
2281
2266
|
className: "text-center py-8 text-muted-foreground border-2 border-dashed rounded-lg",
|
|
2282
2267
|
children: "No filters defined."
|
|
2283
2268
|
})]
|
|
2284
2269
|
})]
|
|
2285
2270
|
}),
|
|
2286
|
-
/* @__PURE__ */
|
|
2271
|
+
/* @__PURE__ */ I(A, {
|
|
2287
2272
|
value: "grouping",
|
|
2288
2273
|
className: "space-y-4 mt-4",
|
|
2289
|
-
children: [/* @__PURE__ */
|
|
2274
|
+
children: [/* @__PURE__ */ I("div", {
|
|
2290
2275
|
className: "flex items-center justify-between",
|
|
2291
|
-
children: [/* @__PURE__ */
|
|
2276
|
+
children: [/* @__PURE__ */ F(D, { children: "Grouping Rules" }), /* @__PURE__ */ I(d, {
|
|
2292
2277
|
size: "sm",
|
|
2293
2278
|
variant: "outline",
|
|
2294
2279
|
onClick: R,
|
|
2295
|
-
children: [/* @__PURE__ */
|
|
2280
|
+
children: [/* @__PURE__ */ F(W, { className: "h-4 w-4 mr-2" }), "Add Group"]
|
|
2296
2281
|
})]
|
|
2297
|
-
}), /* @__PURE__ */
|
|
2282
|
+
}), /* @__PURE__ */ I("div", {
|
|
2298
2283
|
className: "space-y-2",
|
|
2299
|
-
children: [b.map((e, t) => /* @__PURE__ */
|
|
2284
|
+
children: [b.map((e, t) => /* @__PURE__ */ I("div", {
|
|
2300
2285
|
className: "flex items-center gap-2 p-3 border rounded-lg",
|
|
2301
|
-
children: [/* @__PURE__ */
|
|
2286
|
+
children: [/* @__PURE__ */ I("div", {
|
|
2302
2287
|
className: "flex-1 grid grid-cols-2 gap-2",
|
|
2303
|
-
children: [/* @__PURE__ */
|
|
2288
|
+
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(D, {
|
|
2304
2289
|
className: "text-xs",
|
|
2305
2290
|
children: "Field"
|
|
2306
|
-
}), /* @__PURE__ */
|
|
2291
|
+
}), /* @__PURE__ */ F("select", {
|
|
2307
2292
|
className: "w-full border rounded-md h-8 text-sm px-2",
|
|
2308
2293
|
value: e.field,
|
|
2309
2294
|
onChange: (n) => B(t, {
|
|
2310
2295
|
...e,
|
|
2311
2296
|
field: n.target.value
|
|
2312
2297
|
}),
|
|
2313
|
-
children: r.map((e, t) => /* @__PURE__ */
|
|
2298
|
+
children: r.map((e, t) => /* @__PURE__ */ F("option", {
|
|
2314
2299
|
value: e.name,
|
|
2315
2300
|
children: e.label || e.name
|
|
2316
2301
|
}, t))
|
|
2317
|
-
})] }), /* @__PURE__ */
|
|
2302
|
+
})] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(D, {
|
|
2318
2303
|
className: "text-xs",
|
|
2319
2304
|
children: "Sort Order"
|
|
2320
|
-
}), /* @__PURE__ */
|
|
2305
|
+
}), /* @__PURE__ */ I("select", {
|
|
2321
2306
|
className: "w-full border rounded-md h-8 text-sm px-2",
|
|
2322
2307
|
value: e.sort || "asc",
|
|
2323
2308
|
onChange: (n) => B(t, {
|
|
2324
2309
|
...e,
|
|
2325
2310
|
sort: n.target.value
|
|
2326
2311
|
}),
|
|
2327
|
-
children: [/* @__PURE__ */
|
|
2312
|
+
children: [/* @__PURE__ */ F("option", {
|
|
2328
2313
|
value: "asc",
|
|
2329
2314
|
children: "Ascending"
|
|
2330
|
-
}), /* @__PURE__ */
|
|
2315
|
+
}), /* @__PURE__ */ F("option", {
|
|
2331
2316
|
value: "desc",
|
|
2332
2317
|
children: "Descending"
|
|
2333
2318
|
})]
|
|
2334
2319
|
})] })]
|
|
2335
|
-
}), /* @__PURE__ */
|
|
2320
|
+
}), /* @__PURE__ */ F(d, {
|
|
2336
2321
|
size: "sm",
|
|
2337
2322
|
variant: "ghost",
|
|
2338
2323
|
className: "text-red-500 hover:text-red-700 hover:bg-red-50 self-end",
|
|
2339
2324
|
onClick: () => z(t),
|
|
2340
|
-
children: /* @__PURE__ */
|
|
2325
|
+
children: /* @__PURE__ */ F(G, { className: "h-4 w-4" })
|
|
2341
2326
|
})]
|
|
2342
|
-
}, t)), b.length === 0 && /* @__PURE__ */
|
|
2327
|
+
}, t)), b.length === 0 && /* @__PURE__ */ F("div", {
|
|
2343
2328
|
className: "text-center py-8 text-muted-foreground border-2 border-dashed rounded-lg",
|
|
2344
2329
|
children: "No grouping rules applied."
|
|
2345
2330
|
})]
|
|
2346
2331
|
})]
|
|
2347
2332
|
}),
|
|
2348
|
-
/* @__PURE__ */
|
|
2333
|
+
/* @__PURE__ */ I(A, {
|
|
2349
2334
|
value: "sections",
|
|
2350
2335
|
className: "space-y-4 mt-4",
|
|
2351
|
-
children: [/* @__PURE__ */
|
|
2336
|
+
children: [/* @__PURE__ */ I("div", {
|
|
2352
2337
|
className: "flex items-center justify-between",
|
|
2353
|
-
children: [/* @__PURE__ */
|
|
2338
|
+
children: [/* @__PURE__ */ F(D, { children: "Report Sections" }), /* @__PURE__ */ I("div", {
|
|
2354
2339
|
className: "flex gap-2",
|
|
2355
2340
|
children: [
|
|
2356
|
-
/* @__PURE__ */
|
|
2341
|
+
/* @__PURE__ */ I(d, {
|
|
2357
2342
|
size: "sm",
|
|
2358
2343
|
variant: "outline",
|
|
2359
2344
|
onClick: () => V("header"),
|
|
2360
|
-
children: [/* @__PURE__ */
|
|
2345
|
+
children: [/* @__PURE__ */ F(W, { className: "h-4 w-4 mr-2" }), "Header"]
|
|
2361
2346
|
}),
|
|
2362
|
-
/* @__PURE__ */
|
|
2347
|
+
/* @__PURE__ */ I(d, {
|
|
2363
2348
|
size: "sm",
|
|
2364
2349
|
variant: "outline",
|
|
2365
2350
|
onClick: () => V("chart"),
|
|
2366
|
-
children: [/* @__PURE__ */
|
|
2351
|
+
children: [/* @__PURE__ */ F(W, { className: "h-4 w-4 mr-2" }), "Chart"]
|
|
2367
2352
|
}),
|
|
2368
|
-
/* @__PURE__ */
|
|
2353
|
+
/* @__PURE__ */ I(d, {
|
|
2369
2354
|
size: "sm",
|
|
2370
2355
|
variant: "outline",
|
|
2371
2356
|
onClick: () => V("table"),
|
|
2372
|
-
children: [/* @__PURE__ */
|
|
2357
|
+
children: [/* @__PURE__ */ F(W, { className: "h-4 w-4 mr-2" }), "Table"]
|
|
2373
2358
|
})
|
|
2374
2359
|
]
|
|
2375
2360
|
})]
|
|
2376
|
-
}), /* @__PURE__ */
|
|
2361
|
+
}), /* @__PURE__ */ I("div", {
|
|
2377
2362
|
className: "space-y-2",
|
|
2378
|
-
children: [S.map((e, t) => /* @__PURE__ */
|
|
2363
|
+
children: [S.map((e, t) => /* @__PURE__ */ I("div", {
|
|
2379
2364
|
className: "p-3 border rounded-lg space-y-2",
|
|
2380
|
-
children: [/* @__PURE__ */
|
|
2365
|
+
children: [/* @__PURE__ */ I("div", {
|
|
2381
2366
|
className: "flex items-center justify-between",
|
|
2382
|
-
children: [/* @__PURE__ */
|
|
2367
|
+
children: [/* @__PURE__ */ I("div", {
|
|
2383
2368
|
className: "font-medium flex items-center gap-2",
|
|
2384
|
-
children: [/* @__PURE__ */
|
|
2369
|
+
children: [/* @__PURE__ */ F("div", {
|
|
2385
2370
|
className: "text-xs bg-muted px-2 py-0.5 rounded uppercase",
|
|
2386
2371
|
children: e.type
|
|
2387
2372
|
}), e.title]
|
|
2388
|
-
}), /* @__PURE__ */
|
|
2373
|
+
}), /* @__PURE__ */ F(d, {
|
|
2389
2374
|
size: "sm",
|
|
2390
2375
|
variant: "ghost",
|
|
2391
2376
|
className: "text-red-500 hover:text-red-700 hover:bg-red-50",
|
|
2392
|
-
onClick: () =>
|
|
2393
|
-
children: /* @__PURE__ */
|
|
2377
|
+
onClick: () => H(t),
|
|
2378
|
+
children: /* @__PURE__ */ F(G, { className: "h-4 w-4" })
|
|
2394
2379
|
})]
|
|
2395
|
-
}), /* @__PURE__ */
|
|
2380
|
+
}), /* @__PURE__ */ I("div", {
|
|
2396
2381
|
className: "grid grid-cols-2 gap-2",
|
|
2397
2382
|
children: [
|
|
2398
|
-
/* @__PURE__ */
|
|
2383
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(D, {
|
|
2399
2384
|
className: "text-xs",
|
|
2400
2385
|
children: "Title"
|
|
2401
|
-
}), /* @__PURE__ */
|
|
2386
|
+
}), /* @__PURE__ */ F(E, {
|
|
2402
2387
|
className: "h-8 text-sm",
|
|
2403
2388
|
value: e.title || "",
|
|
2404
|
-
onChange: (n) =>
|
|
2389
|
+
onChange: (n) => U(t, {
|
|
2405
2390
|
...e,
|
|
2406
2391
|
title: n.target.value
|
|
2407
2392
|
})
|
|
2408
2393
|
})] }),
|
|
2409
|
-
e.type === "text" && /* @__PURE__ */
|
|
2394
|
+
e.type === "text" && /* @__PURE__ */ I("div", {
|
|
2410
2395
|
className: "col-span-2",
|
|
2411
|
-
children: [/* @__PURE__ */
|
|
2396
|
+
children: [/* @__PURE__ */ F(D, {
|
|
2412
2397
|
className: "text-xs",
|
|
2413
2398
|
children: "Content"
|
|
2414
|
-
}), /* @__PURE__ */
|
|
2399
|
+
}), /* @__PURE__ */ F(E, {
|
|
2415
2400
|
className: "h-8 text-sm",
|
|
2416
2401
|
value: e.text || "",
|
|
2417
|
-
onChange: (n) =>
|
|
2402
|
+
onChange: (n) => U(t, {
|
|
2418
2403
|
...e,
|
|
2419
2404
|
text: n.target.value
|
|
2420
2405
|
})
|
|
2421
2406
|
})]
|
|
2422
2407
|
}),
|
|
2423
|
-
e.type === "chart" && /* @__PURE__ */
|
|
2408
|
+
e.type === "chart" && /* @__PURE__ */ I("div", {
|
|
2424
2409
|
className: "col-span-2 grid grid-cols-2 gap-2 mt-2 p-2 bg-muted/20 rounded",
|
|
2425
2410
|
children: [
|
|
2426
|
-
/* @__PURE__ */
|
|
2411
|
+
/* @__PURE__ */ F("div", {
|
|
2427
2412
|
className: "col-span-2",
|
|
2428
|
-
children: /* @__PURE__ */
|
|
2413
|
+
children: /* @__PURE__ */ F(D, {
|
|
2429
2414
|
className: "text-xs font-semibold",
|
|
2430
2415
|
children: "Chart Configuration"
|
|
2431
2416
|
})
|
|
2432
2417
|
}),
|
|
2433
|
-
/* @__PURE__ */
|
|
2418
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(D, {
|
|
2434
2419
|
className: "text-xs",
|
|
2435
2420
|
children: "Chart Type"
|
|
2436
|
-
}), /* @__PURE__ */
|
|
2421
|
+
}), /* @__PURE__ */ I("select", {
|
|
2437
2422
|
className: "flex h-8 w-full rounded-md border border-input bg-background px-3 py-1 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
2438
2423
|
value: e.chart?.chartType || "bar",
|
|
2439
|
-
onChange: (n) =>
|
|
2424
|
+
onChange: (n) => U(t, {
|
|
2440
2425
|
...e,
|
|
2441
2426
|
chart: {
|
|
2442
2427
|
...e.chart,
|
|
@@ -2445,31 +2430,31 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
2445
2430
|
}
|
|
2446
2431
|
}),
|
|
2447
2432
|
children: [
|
|
2448
|
-
/* @__PURE__ */
|
|
2433
|
+
/* @__PURE__ */ F("option", {
|
|
2449
2434
|
value: "bar",
|
|
2450
2435
|
children: "Bar"
|
|
2451
2436
|
}),
|
|
2452
|
-
/* @__PURE__ */
|
|
2437
|
+
/* @__PURE__ */ F("option", {
|
|
2453
2438
|
value: "line",
|
|
2454
2439
|
children: "Line"
|
|
2455
2440
|
}),
|
|
2456
|
-
/* @__PURE__ */
|
|
2441
|
+
/* @__PURE__ */ F("option", {
|
|
2457
2442
|
value: "area",
|
|
2458
2443
|
children: "Area"
|
|
2459
2444
|
}),
|
|
2460
|
-
/* @__PURE__ */
|
|
2445
|
+
/* @__PURE__ */ F("option", {
|
|
2461
2446
|
value: "pie",
|
|
2462
2447
|
children: "Pie"
|
|
2463
2448
|
})
|
|
2464
2449
|
]
|
|
2465
2450
|
})] }),
|
|
2466
|
-
/* @__PURE__ */
|
|
2451
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(D, {
|
|
2467
2452
|
className: "text-xs",
|
|
2468
2453
|
children: "X-Axis Field"
|
|
2469
|
-
}), /* @__PURE__ */
|
|
2454
|
+
}), /* @__PURE__ */ I("select", {
|
|
2470
2455
|
className: "flex h-8 w-full rounded-md border border-input bg-background px-3 py-1 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
2471
2456
|
value: e.chart?.xAxisField || "",
|
|
2472
|
-
onChange: (n) =>
|
|
2457
|
+
onChange: (n) => U(t, {
|
|
2473
2458
|
...e,
|
|
2474
2459
|
chart: {
|
|
2475
2460
|
...e.chart,
|
|
@@ -2478,33 +2463,33 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
2478
2463
|
}
|
|
2479
2464
|
}),
|
|
2480
2465
|
children: [
|
|
2481
|
-
/* @__PURE__ */
|
|
2466
|
+
/* @__PURE__ */ F("option", {
|
|
2482
2467
|
value: "",
|
|
2483
2468
|
children: "Select Field..."
|
|
2484
2469
|
}),
|
|
2485
|
-
r.map((e) => /* @__PURE__ */
|
|
2470
|
+
r.map((e) => /* @__PURE__ */ F("option", {
|
|
2486
2471
|
value: e.name,
|
|
2487
2472
|
children: e.label || e.name
|
|
2488
2473
|
}, e.name)),
|
|
2489
|
-
r.length === 0 && /* @__PURE__ */
|
|
2474
|
+
r.length === 0 && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("option", {
|
|
2490
2475
|
value: "name",
|
|
2491
2476
|
children: "Name"
|
|
2492
|
-
}), /* @__PURE__ */
|
|
2477
|
+
}), /* @__PURE__ */ F("option", {
|
|
2493
2478
|
value: "month",
|
|
2494
2479
|
children: "Month"
|
|
2495
2480
|
})] })
|
|
2496
2481
|
]
|
|
2497
2482
|
})] }),
|
|
2498
|
-
/* @__PURE__ */
|
|
2483
|
+
/* @__PURE__ */ I("div", {
|
|
2499
2484
|
className: "col-span-2",
|
|
2500
|
-
children: [/* @__PURE__ */
|
|
2485
|
+
children: [/* @__PURE__ */ F(D, {
|
|
2501
2486
|
className: "text-xs",
|
|
2502
2487
|
children: "Y-Axis Fields (comma separated)"
|
|
2503
|
-
}), /* @__PURE__ */
|
|
2488
|
+
}), /* @__PURE__ */ F(E, {
|
|
2504
2489
|
className: "h-8 text-sm",
|
|
2505
2490
|
placeholder: "e.g. value, count",
|
|
2506
2491
|
value: e.chart?.yAxisFields?.join(", ") || "",
|
|
2507
|
-
onChange: (n) =>
|
|
2492
|
+
onChange: (n) => U(t, {
|
|
2508
2493
|
...e,
|
|
2509
2494
|
chart: {
|
|
2510
2495
|
...e.chart,
|
|
@@ -2518,16 +2503,16 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
2518
2503
|
})
|
|
2519
2504
|
]
|
|
2520
2505
|
})]
|
|
2521
|
-
}, t)), S.length === 0 && /* @__PURE__ */
|
|
2506
|
+
}, t)), S.length === 0 && /* @__PURE__ */ F("div", {
|
|
2522
2507
|
className: "text-center py-8 text-muted-foreground border-2 border-dashed rounded-lg",
|
|
2523
2508
|
children: "No customized sections. The default report layout will be used."
|
|
2524
2509
|
})]
|
|
2525
2510
|
})]
|
|
2526
2511
|
}),
|
|
2527
|
-
/* @__PURE__ */
|
|
2512
|
+
/* @__PURE__ */ F(A, {
|
|
2528
2513
|
value: "schedule",
|
|
2529
2514
|
className: "space-y-4 mt-4",
|
|
2530
|
-
children: /* @__PURE__ */
|
|
2515
|
+
children: /* @__PURE__ */ F(mt, {
|
|
2531
2516
|
schedule: c.schedule,
|
|
2532
2517
|
onChange: (e) => l({
|
|
2533
2518
|
...c,
|
|
@@ -2536,31 +2521,31 @@ var pt = ({ schema: t, onRefresh: r }) => {
|
|
|
2536
2521
|
})
|
|
2537
2522
|
})
|
|
2538
2523
|
]
|
|
2539
|
-
}), /* @__PURE__ */
|
|
2524
|
+
}), /* @__PURE__ */ I("div", {
|
|
2540
2525
|
className: "flex items-center justify-end gap-2 mt-6 pt-4 border-t",
|
|
2541
|
-
children: [/* @__PURE__ */
|
|
2526
|
+
children: [/* @__PURE__ */ F(d, {
|
|
2542
2527
|
variant: "outline",
|
|
2543
2528
|
onClick: () => {
|
|
2544
2529
|
o && console.log("Report cancelled:", o);
|
|
2545
2530
|
},
|
|
2546
2531
|
children: "Cancel"
|
|
2547
|
-
}), /* @__PURE__ */
|
|
2532
|
+
}), /* @__PURE__ */ I(d, {
|
|
2548
2533
|
onClick: () => {
|
|
2549
2534
|
console.log("Saving report:", c), a && alert("Report saved! (Handler: " + a + ")");
|
|
2550
2535
|
},
|
|
2551
|
-
children: [/* @__PURE__ */
|
|
2536
|
+
children: [/* @__PURE__ */ F(de, { className: "h-4 w-4 mr-2" }), "Save Report"]
|
|
2552
2537
|
})]
|
|
2553
|
-
})] })] }), i && /* @__PURE__ */
|
|
2538
|
+
})] })] }), i && /* @__PURE__ */ I(f, {
|
|
2554
2539
|
className: "mt-8 border-2 border-blue-100",
|
|
2555
|
-
children: [/* @__PURE__ */
|
|
2540
|
+
children: [/* @__PURE__ */ F(h, {
|
|
2556
2541
|
className: "bg-blue-50/50",
|
|
2557
|
-
children: /* @__PURE__ */
|
|
2542
|
+
children: /* @__PURE__ */ F(g, {
|
|
2558
2543
|
className: "text-blue-900 text-sm uppercase tracking-wide",
|
|
2559
2544
|
children: "Live Preview"
|
|
2560
2545
|
})
|
|
2561
|
-
}), /* @__PURE__ */
|
|
2546
|
+
}), /* @__PURE__ */ F(p, {
|
|
2562
2547
|
className: "pt-6",
|
|
2563
|
-
children: /* @__PURE__ */
|
|
2548
|
+
children: /* @__PURE__ */ F(pt, { schema: {
|
|
2564
2549
|
type: "report-viewer",
|
|
2565
2550
|
report: {
|
|
2566
2551
|
...c,
|
|
@@ -2618,14 +2603,14 @@ function bt({ block: e, index: n, total: r, availableFields: i, t: a, duplicateN
|
|
|
2618
2603
|
...e,
|
|
2619
2604
|
...t
|
|
2620
2605
|
});
|
|
2621
|
-
return /* @__PURE__ */
|
|
2606
|
+
return /* @__PURE__ */ I("div", {
|
|
2622
2607
|
className: "border rounded-md bg-card text-card-foreground",
|
|
2623
2608
|
"data-testid": `joined-block-${n}`,
|
|
2624
2609
|
children: [
|
|
2625
|
-
/* @__PURE__ */
|
|
2610
|
+
/* @__PURE__ */ I("div", {
|
|
2626
2611
|
className: "flex items-center gap-1 p-1.5 border-b bg-muted/30",
|
|
2627
2612
|
children: [
|
|
2628
|
-
/* @__PURE__ */
|
|
2613
|
+
/* @__PURE__ */ F(d, {
|
|
2629
2614
|
type: "button",
|
|
2630
2615
|
size: "sm",
|
|
2631
2616
|
variant: "ghost",
|
|
@@ -2634,9 +2619,9 @@ function bt({ block: e, index: n, total: r, availableFields: i, t: a, duplicateN
|
|
|
2634
2619
|
"aria-label": u ? "Collapse block" : "Expand block",
|
|
2635
2620
|
"aria-expanded": u,
|
|
2636
2621
|
"data-testid": `joined-block-toggle-${n}`,
|
|
2637
|
-
children:
|
|
2622
|
+
children: F(u ? ne : re, { className: "h-3.5 w-3.5" })
|
|
2638
2623
|
}),
|
|
2639
|
-
/* @__PURE__ */
|
|
2624
|
+
/* @__PURE__ */ F("input", {
|
|
2640
2625
|
type: "text",
|
|
2641
2626
|
className: `h-6 text-xs border rounded px-1.5 bg-background flex-1 min-w-0 ${v ? "border-destructive" : ""}`,
|
|
2642
2627
|
value: e.name ?? "",
|
|
@@ -2646,36 +2631,36 @@ function bt({ block: e, index: n, total: r, availableFields: i, t: a, duplicateN
|
|
|
2646
2631
|
"aria-invalid": v,
|
|
2647
2632
|
"data-testid": `joined-block-name-${n}`
|
|
2648
2633
|
}),
|
|
2649
|
-
/* @__PURE__ */
|
|
2634
|
+
/* @__PURE__ */ F("select", {
|
|
2650
2635
|
className: "h-6 text-xs border rounded px-1 bg-background shrink-0",
|
|
2651
2636
|
value: p,
|
|
2652
2637
|
onChange: (e) => y({ type: e.target.value }),
|
|
2653
2638
|
"aria-label": a("report.editor.type"),
|
|
2654
2639
|
"data-testid": `joined-block-type-${n}`,
|
|
2655
|
-
children: gt.map((e) => /* @__PURE__ */
|
|
2640
|
+
children: gt.map((e) => /* @__PURE__ */ F("option", {
|
|
2656
2641
|
value: e,
|
|
2657
2642
|
children: a(`report.editor.type${e.charAt(0).toUpperCase()}${e.slice(1)}`)
|
|
2658
2643
|
}, e))
|
|
2659
2644
|
}),
|
|
2660
|
-
/* @__PURE__ */
|
|
2645
|
+
/* @__PURE__ */ I("div", {
|
|
2661
2646
|
className: "flex flex-col gap-0.5 shrink-0",
|
|
2662
|
-
children: [/* @__PURE__ */
|
|
2647
|
+
children: [/* @__PURE__ */ F("button", {
|
|
2663
2648
|
type: "button",
|
|
2664
2649
|
className: "text-muted-foreground hover:text-foreground disabled:opacity-30",
|
|
2665
2650
|
disabled: n === 0,
|
|
2666
2651
|
onClick: () => l(-1),
|
|
2667
2652
|
"aria-label": "Move block up",
|
|
2668
|
-
children: /* @__PURE__ */
|
|
2669
|
-
}), /* @__PURE__ */
|
|
2653
|
+
children: /* @__PURE__ */ F(U, { className: "h-2.5 w-2.5" })
|
|
2654
|
+
}), /* @__PURE__ */ F("button", {
|
|
2670
2655
|
type: "button",
|
|
2671
2656
|
className: "text-muted-foreground hover:text-foreground disabled:opacity-30",
|
|
2672
2657
|
disabled: n === r - 1,
|
|
2673
2658
|
onClick: () => l(1),
|
|
2674
2659
|
"aria-label": "Move block down",
|
|
2675
|
-
children: /* @__PURE__ */
|
|
2660
|
+
children: /* @__PURE__ */ F(H, { className: "h-2.5 w-2.5" })
|
|
2676
2661
|
})]
|
|
2677
2662
|
}),
|
|
2678
|
-
/* @__PURE__ */
|
|
2663
|
+
/* @__PURE__ */ F(d, {
|
|
2679
2664
|
type: "button",
|
|
2680
2665
|
size: "sm",
|
|
2681
2666
|
variant: "ghost",
|
|
@@ -2683,25 +2668,25 @@ function bt({ block: e, index: n, total: r, availableFields: i, t: a, duplicateN
|
|
|
2683
2668
|
onClick: c,
|
|
2684
2669
|
"aria-label": a("report.editor.removeBlock"),
|
|
2685
2670
|
"data-testid": `joined-block-remove-${n}`,
|
|
2686
|
-
children: /* @__PURE__ */
|
|
2671
|
+
children: /* @__PURE__ */ F(G, { className: "h-3 w-3" })
|
|
2687
2672
|
})
|
|
2688
2673
|
]
|
|
2689
2674
|
}),
|
|
2690
|
-
v && /* @__PURE__ */
|
|
2675
|
+
v && /* @__PURE__ */ I("div", {
|
|
2691
2676
|
className: "flex items-center gap-1 px-2 py-1 text-[10px] text-destructive bg-destructive/5 border-b",
|
|
2692
|
-
children: [/* @__PURE__ */
|
|
2677
|
+
children: [/* @__PURE__ */ F(V, { className: "h-3 w-3" }), a(_ ? "report.editor.validationBlockNameRequired" : "report.editor.validationBlockNameDuplicate")]
|
|
2693
2678
|
}),
|
|
2694
|
-
u && /* @__PURE__ */
|
|
2679
|
+
u && /* @__PURE__ */ I("div", {
|
|
2695
2680
|
className: "p-2 space-y-2 text-xs",
|
|
2696
2681
|
children: [
|
|
2697
|
-
/* @__PURE__ */
|
|
2682
|
+
/* @__PURE__ */ I("div", {
|
|
2698
2683
|
className: "grid grid-cols-2 gap-2",
|
|
2699
|
-
children: [/* @__PURE__ */
|
|
2684
|
+
children: [/* @__PURE__ */ I("label", {
|
|
2700
2685
|
className: "flex flex-col gap-0.5",
|
|
2701
|
-
children: [/* @__PURE__ */
|
|
2686
|
+
children: [/* @__PURE__ */ F("span", {
|
|
2702
2687
|
className: "text-[10px] text-muted-foreground",
|
|
2703
2688
|
children: a("report.editor.blockLabel")
|
|
2704
|
-
}), /* @__PURE__ */
|
|
2689
|
+
}), /* @__PURE__ */ F("input", {
|
|
2705
2690
|
type: "text",
|
|
2706
2691
|
className: "h-6 text-xs border rounded px-1.5 bg-background",
|
|
2707
2692
|
value: vt(e),
|
|
@@ -2709,12 +2694,12 @@ function bt({ block: e, index: n, total: r, availableFields: i, t: a, duplicateN
|
|
|
2709
2694
|
placeholder: a("report.editor.blockLabelPlaceholder"),
|
|
2710
2695
|
"data-testid": `joined-block-label-${n}`
|
|
2711
2696
|
})]
|
|
2712
|
-
}), /* @__PURE__ */
|
|
2697
|
+
}), /* @__PURE__ */ I("label", {
|
|
2713
2698
|
className: "flex flex-col gap-0.5",
|
|
2714
|
-
children: [/* @__PURE__ */
|
|
2699
|
+
children: [/* @__PURE__ */ F("span", {
|
|
2715
2700
|
className: "text-[10px] text-muted-foreground",
|
|
2716
2701
|
children: a("report.editor.objectName")
|
|
2717
|
-
}), /* @__PURE__ */
|
|
2702
|
+
}), /* @__PURE__ */ F("input", {
|
|
2718
2703
|
type: "text",
|
|
2719
2704
|
className: "h-6 text-xs border rounded px-1.5 bg-background",
|
|
2720
2705
|
value: e.objectName ?? "",
|
|
@@ -2724,12 +2709,12 @@ function bt({ block: e, index: n, total: r, availableFields: i, t: a, duplicateN
|
|
|
2724
2709
|
})]
|
|
2725
2710
|
})]
|
|
2726
2711
|
}),
|
|
2727
|
-
/* @__PURE__ */
|
|
2712
|
+
/* @__PURE__ */ I("label", {
|
|
2728
2713
|
className: "flex flex-col gap-0.5",
|
|
2729
|
-
children: [/* @__PURE__ */
|
|
2714
|
+
children: [/* @__PURE__ */ F("span", {
|
|
2730
2715
|
className: "text-[10px] text-muted-foreground",
|
|
2731
2716
|
children: a("report.editor.blockDescription")
|
|
2732
|
-
}), /* @__PURE__ */
|
|
2717
|
+
}), /* @__PURE__ */ F("textarea", {
|
|
2733
2718
|
className: "text-xs border rounded px-1.5 py-1 bg-background resize-y min-h-[2rem]",
|
|
2734
2719
|
rows: 2,
|
|
2735
2720
|
value: yt(e),
|
|
@@ -2738,46 +2723,46 @@ function bt({ block: e, index: n, total: r, availableFields: i, t: a, duplicateN
|
|
|
2738
2723
|
"data-testid": `joined-block-description-${n}`
|
|
2739
2724
|
})]
|
|
2740
2725
|
}),
|
|
2741
|
-
/* @__PURE__ */
|
|
2726
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("div", {
|
|
2742
2727
|
className: "text-[10px] text-muted-foreground mb-0.5",
|
|
2743
2728
|
children: a("report.editor.columns")
|
|
2744
|
-
}), /* @__PURE__ */
|
|
2729
|
+
}), /* @__PURE__ */ F(zt, {
|
|
2745
2730
|
availableFields: i,
|
|
2746
2731
|
value: e.columns,
|
|
2747
2732
|
onChange: (e) => y({ columns: e }),
|
|
2748
2733
|
t: a
|
|
2749
2734
|
})] }),
|
|
2750
|
-
(m || h) && /* @__PURE__ */
|
|
2735
|
+
(m || h) && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("div", {
|
|
2751
2736
|
className: "text-[10px] text-muted-foreground mb-0.5",
|
|
2752
2737
|
children: a("report.editor.rows")
|
|
2753
|
-
}), /* @__PURE__ */
|
|
2738
|
+
}), /* @__PURE__ */ F(Bt, {
|
|
2754
2739
|
availableFields: i,
|
|
2755
2740
|
value: e.groupingsDown,
|
|
2756
2741
|
onChange: (e) => y({ groupingsDown: e }),
|
|
2757
2742
|
t: a
|
|
2758
2743
|
})] }),
|
|
2759
|
-
h && /* @__PURE__ */
|
|
2744
|
+
h && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("div", {
|
|
2760
2745
|
className: "text-[10px] text-muted-foreground mb-0.5",
|
|
2761
2746
|
children: a("report.editor.columnsAxis")
|
|
2762
|
-
}), /* @__PURE__ */
|
|
2747
|
+
}), /* @__PURE__ */ F(Bt, {
|
|
2763
2748
|
availableFields: i,
|
|
2764
2749
|
value: e.groupingsAcross,
|
|
2765
2750
|
onChange: (e) => y({ groupingsAcross: e }),
|
|
2766
2751
|
t: a
|
|
2767
2752
|
})] }),
|
|
2768
|
-
/* @__PURE__ */
|
|
2753
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("div", {
|
|
2769
2754
|
className: "text-[10px] text-muted-foreground mb-0.5",
|
|
2770
2755
|
children: a("report.editor.filters")
|
|
2771
|
-
}), /* @__PURE__ */
|
|
2756
|
+
}), /* @__PURE__ */ F(Mt, {
|
|
2772
2757
|
availableFields: i,
|
|
2773
2758
|
value: e.filter,
|
|
2774
2759
|
onChange: (e) => y({ filter: e }),
|
|
2775
2760
|
t: a
|
|
2776
2761
|
})] }),
|
|
2777
|
-
g && /* @__PURE__ */
|
|
2762
|
+
g && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("div", {
|
|
2778
2763
|
className: "text-[10px] text-muted-foreground mb-0.5",
|
|
2779
2764
|
children: a("report.editor.chart")
|
|
2780
|
-
}), /* @__PURE__ */
|
|
2765
|
+
}), /* @__PURE__ */ F(Vt, {
|
|
2781
2766
|
availableFields: i,
|
|
2782
2767
|
columns: Rt(e.columns),
|
|
2783
2768
|
value: e.chart,
|
|
@@ -2813,15 +2798,15 @@ function St({ value: e, onChange: t, availableFields: n, getFieldsForObject: r,
|
|
|
2813
2798
|
let i = [...o];
|
|
2814
2799
|
[i[e], i[r]] = [i[r], i[e]], t(i);
|
|
2815
2800
|
};
|
|
2816
|
-
return /* @__PURE__ */
|
|
2801
|
+
return /* @__PURE__ */ I("div", {
|
|
2817
2802
|
className: "space-y-2",
|
|
2818
2803
|
"data-testid": "joined-blocks-editor",
|
|
2819
2804
|
children: [
|
|
2820
|
-
o.length === 0 && /* @__PURE__ */
|
|
2805
|
+
o.length === 0 && /* @__PURE__ */ F("div", {
|
|
2821
2806
|
className: "text-[10px] text-muted-foreground italic px-1",
|
|
2822
2807
|
children: a("report.editor.validationJoinedNeedsBlocks")
|
|
2823
2808
|
}),
|
|
2824
|
-
o.map((e, t) => /* @__PURE__ */
|
|
2809
|
+
o.map((e, t) => /* @__PURE__ */ F(bt, {
|
|
2825
2810
|
block: e,
|
|
2826
2811
|
index: t,
|
|
2827
2812
|
total: o.length,
|
|
@@ -2832,7 +2817,7 @@ function St({ value: e, onChange: t, availableFields: n, getFieldsForObject: r,
|
|
|
2832
2817
|
onRemove: () => u(t),
|
|
2833
2818
|
onMove: (e) => f(t, e)
|
|
2834
2819
|
}, t)),
|
|
2835
|
-
/* @__PURE__ */
|
|
2820
|
+
/* @__PURE__ */ I(d, {
|
|
2836
2821
|
type: "button",
|
|
2837
2822
|
size: "sm",
|
|
2838
2823
|
variant: "outline",
|
|
@@ -2841,7 +2826,7 @@ function St({ value: e, onChange: t, availableFields: n, getFieldsForObject: r,
|
|
|
2841
2826
|
t([...o, _t(o)]);
|
|
2842
2827
|
},
|
|
2843
2828
|
"data-testid": "joined-block-add",
|
|
2844
|
-
children: [/* @__PURE__ */
|
|
2829
|
+
children: [/* @__PURE__ */ F(W, { className: "h-3 w-3 mr-1" }), a("report.editor.addBlock")]
|
|
2845
2830
|
})
|
|
2846
2831
|
]
|
|
2847
2832
|
});
|
|
@@ -3016,9 +3001,9 @@ function Mt({ availableFields: e, value: n, onChange: r, t: i }) {
|
|
|
3016
3001
|
let t = At(e);
|
|
3017
3002
|
l.current = JSON.stringify(t ?? null), r(t);
|
|
3018
3003
|
};
|
|
3019
|
-
if (o.complex) return /* @__PURE__ */
|
|
3004
|
+
if (o.complex) return /* @__PURE__ */ I("div", {
|
|
3020
3005
|
className: "flex items-start gap-2 p-2 rounded border border-amber-300 bg-amber-50 text-amber-900 text-[11px]",
|
|
3021
|
-
children: [/* @__PURE__ */
|
|
3006
|
+
children: [/* @__PURE__ */ F(V, { className: "h-3.5 w-3.5 mt-0.5 shrink-0" }), /* @__PURE__ */ F("span", { children: i("report.editor.filtersComplex") })]
|
|
3022
3007
|
});
|
|
3023
3008
|
let f = () => {
|
|
3024
3009
|
u({
|
|
@@ -3089,13 +3074,13 @@ function Mt({ availableFields: e, value: n, onChange: r, t: i }) {
|
|
|
3089
3074
|
label: i("report.editor.opIsNotEmpty", "is not empty")
|
|
3090
3075
|
}
|
|
3091
3076
|
];
|
|
3092
|
-
return /* @__PURE__ */
|
|
3077
|
+
return /* @__PURE__ */ I("div", {
|
|
3093
3078
|
className: "space-y-1.5 py-1",
|
|
3094
3079
|
"data-testid": "spec-filter-adapter",
|
|
3095
3080
|
children: [
|
|
3096
|
-
s.conditions.length > 1 && /* @__PURE__ */
|
|
3081
|
+
s.conditions.length > 1 && /* @__PURE__ */ I("div", {
|
|
3097
3082
|
className: "flex items-center gap-2 text-[10px] text-muted-foreground",
|
|
3098
|
-
children: [/* @__PURE__ */
|
|
3083
|
+
children: [/* @__PURE__ */ F("span", { children: i("report.editor.combineLogic", "Combine with") }), /* @__PURE__ */ I("select", {
|
|
3099
3084
|
className: "h-5 text-[10px] border rounded px-1 bg-background",
|
|
3100
3085
|
value: s.logic,
|
|
3101
3086
|
onChange: (e) => u({
|
|
@@ -3103,39 +3088,39 @@ function Mt({ availableFields: e, value: n, onChange: r, t: i }) {
|
|
|
3103
3088
|
logic: e.target.value
|
|
3104
3089
|
}),
|
|
3105
3090
|
"data-testid": "filter-logic-select",
|
|
3106
|
-
children: [/* @__PURE__ */
|
|
3091
|
+
children: [/* @__PURE__ */ F("option", {
|
|
3107
3092
|
value: "and",
|
|
3108
3093
|
children: "AND"
|
|
3109
|
-
}), /* @__PURE__ */
|
|
3094
|
+
}), /* @__PURE__ */ F("option", {
|
|
3110
3095
|
value: "or",
|
|
3111
3096
|
children: "OR"
|
|
3112
3097
|
})]
|
|
3113
3098
|
})]
|
|
3114
3099
|
}),
|
|
3115
|
-
s.conditions.map((t) => /* @__PURE__ */
|
|
3100
|
+
s.conditions.map((t) => /* @__PURE__ */ I("div", {
|
|
3116
3101
|
className: "flex items-center gap-1 text-[10px] p-1 border rounded bg-muted/20",
|
|
3117
3102
|
children: [
|
|
3118
|
-
/* @__PURE__ */
|
|
3103
|
+
/* @__PURE__ */ F("select", {
|
|
3119
3104
|
className: "h-5 text-[10px] border rounded px-1 bg-background flex-1 min-w-0",
|
|
3120
3105
|
value: t.field,
|
|
3121
3106
|
onChange: (e) => m(t.id, { field: e.target.value }),
|
|
3122
3107
|
"data-testid": `filter-field-${t.id}`,
|
|
3123
|
-
children: e.map((e) => /* @__PURE__ */
|
|
3108
|
+
children: e.map((e) => /* @__PURE__ */ F("option", {
|
|
3124
3109
|
value: e.value,
|
|
3125
3110
|
children: e.label
|
|
3126
3111
|
}, e.value))
|
|
3127
3112
|
}),
|
|
3128
|
-
/* @__PURE__ */
|
|
3113
|
+
/* @__PURE__ */ F("select", {
|
|
3129
3114
|
className: "h-5 text-[10px] border rounded px-1 bg-background w-20 shrink-0",
|
|
3130
3115
|
value: t.operator,
|
|
3131
3116
|
onChange: (e) => m(t.id, { operator: e.target.value }),
|
|
3132
3117
|
"data-testid": `filter-op-${t.id}`,
|
|
3133
|
-
children: h.map((e) => /* @__PURE__ */
|
|
3118
|
+
children: h.map((e) => /* @__PURE__ */ F("option", {
|
|
3134
3119
|
value: e.value,
|
|
3135
3120
|
children: e.label
|
|
3136
3121
|
}, e.value))
|
|
3137
3122
|
}),
|
|
3138
|
-
t.operator !== "isEmpty" && t.operator !== "isNotEmpty" && /* @__PURE__ */
|
|
3123
|
+
t.operator !== "isEmpty" && t.operator !== "isNotEmpty" && /* @__PURE__ */ F("input", {
|
|
3139
3124
|
className: "h-5 text-[10px] border rounded px-1 bg-background w-24 shrink-0",
|
|
3140
3125
|
value: Array.isArray(t.value) ? t.value.join(",") : (t.value ?? "").toString(),
|
|
3141
3126
|
placeholder: "value",
|
|
@@ -3145,18 +3130,18 @@ function Mt({ availableFields: e, value: n, onChange: r, t: i }) {
|
|
|
3145
3130
|
},
|
|
3146
3131
|
"data-testid": `filter-value-${t.id}`
|
|
3147
3132
|
}),
|
|
3148
|
-
/* @__PURE__ */
|
|
3133
|
+
/* @__PURE__ */ F(d, {
|
|
3149
3134
|
type: "button",
|
|
3150
3135
|
size: "sm",
|
|
3151
3136
|
variant: "ghost",
|
|
3152
3137
|
className: "h-5 w-5 p-0 shrink-0",
|
|
3153
3138
|
onClick: () => p(t.id),
|
|
3154
3139
|
"data-testid": `filter-remove-${t.id}`,
|
|
3155
|
-
children: /* @__PURE__ */
|
|
3140
|
+
children: /* @__PURE__ */ F(G, { className: "h-3 w-3" })
|
|
3156
3141
|
})
|
|
3157
3142
|
]
|
|
3158
3143
|
}, t.id)),
|
|
3159
|
-
/* @__PURE__ */
|
|
3144
|
+
/* @__PURE__ */ I(d, {
|
|
3160
3145
|
type: "button",
|
|
3161
3146
|
size: "sm",
|
|
3162
3147
|
variant: "outline",
|
|
@@ -3164,7 +3149,7 @@ function Mt({ availableFields: e, value: n, onChange: r, t: i }) {
|
|
|
3164
3149
|
onClick: f,
|
|
3165
3150
|
disabled: e.length === 0,
|
|
3166
3151
|
"data-testid": "filter-add",
|
|
3167
|
-
children: [/* @__PURE__ */
|
|
3152
|
+
children: [/* @__PURE__ */ F(W, { className: "h-3 w-3 mr-1" }), i("report.editor.addCondition", "Add condition")]
|
|
3168
3153
|
})
|
|
3169
3154
|
]
|
|
3170
3155
|
});
|
|
@@ -3189,7 +3174,7 @@ function Ft({ availableFields: e, selectedValues: n, onAdd: r, t: i, triggerLabe
|
|
|
3189
3174
|
t.useEffect(() => {
|
|
3190
3175
|
h && (E(""), O(/* @__PURE__ */ new Set()));
|
|
3191
3176
|
}, [h]);
|
|
3192
|
-
let A = v.trim().toLowerCase(), j = e.filter((e) => !k.has(e.value)), M = A ? j.filter((e) => e.label.toLowerCase().includes(A) || e.value.toLowerCase().includes(A)) : j,
|
|
3177
|
+
let A = v.trim().toLowerCase(), j = e.filter((e) => !k.has(e.value)), M = A ? j.filter((e) => e.label.toLowerCase().includes(A) || e.value.toLowerCase().includes(A)) : j, N = (e) => {
|
|
3193
3178
|
if (l && u) {
|
|
3194
3179
|
r([e]), g(!1);
|
|
3195
3180
|
return;
|
|
@@ -3198,37 +3183,37 @@ function Ft({ availableFields: e, selectedValues: n, onAdd: r, t: i, triggerLabe
|
|
|
3198
3183
|
let n = new Set(l ? [] : t);
|
|
3199
3184
|
return t.has(e) ? n.delete(e) : n.add(e), n;
|
|
3200
3185
|
});
|
|
3201
|
-
},
|
|
3186
|
+
}, ee = () => {
|
|
3202
3187
|
if (D.size === 0) {
|
|
3203
3188
|
g(!1);
|
|
3204
3189
|
return;
|
|
3205
3190
|
}
|
|
3206
3191
|
r(j.map((e) => e.value).filter((e) => D.has(e))), g(!1);
|
|
3207
|
-
},
|
|
3192
|
+
}, P = () => {
|
|
3208
3193
|
g(!1);
|
|
3209
3194
|
}, L = e.length === 0, R = !L && j.length === 0, z = a ?? i("report.editor.addColumns", "Add fields"), B = o ?? i("report.editor.fieldPickerTitle", "Select fields"), V = s ?? i("report.editor.fieldPickerDescription", "Pick one or more fields to add. Use the search box to narrow the list.");
|
|
3210
|
-
return /* @__PURE__ */
|
|
3195
|
+
return /* @__PURE__ */ I(y, {
|
|
3211
3196
|
open: h,
|
|
3212
3197
|
onOpenChange: g,
|
|
3213
|
-
children: [/* @__PURE__ */
|
|
3198
|
+
children: [/* @__PURE__ */ F(T, {
|
|
3214
3199
|
asChild: !0,
|
|
3215
|
-
children: m ?? /* @__PURE__ */
|
|
3200
|
+
children: m ?? /* @__PURE__ */ I(d, {
|
|
3216
3201
|
type: "button",
|
|
3217
3202
|
variant: "outline",
|
|
3218
3203
|
size: "sm",
|
|
3219
3204
|
className: p ?? "h-8 gap-1.5",
|
|
3220
3205
|
disabled: f || L || R,
|
|
3221
3206
|
"data-testid": `${c}-trigger`,
|
|
3222
|
-
children: [/* @__PURE__ */
|
|
3207
|
+
children: [/* @__PURE__ */ F(W, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ F("span", { children: z })]
|
|
3223
3208
|
})
|
|
3224
|
-
}), /* @__PURE__ */
|
|
3209
|
+
}), /* @__PURE__ */ I(b, {
|
|
3225
3210
|
className: "sm:max-w-md max-w-[92vw] gap-3",
|
|
3226
3211
|
"data-testid": `${c}-dialog`,
|
|
3227
3212
|
children: [
|
|
3228
|
-
/* @__PURE__ */
|
|
3229
|
-
/* @__PURE__ */
|
|
3213
|
+
/* @__PURE__ */ I(C, { children: [/* @__PURE__ */ F(w, { children: B }), /* @__PURE__ */ F(x, { children: V })] }),
|
|
3214
|
+
/* @__PURE__ */ I("div", {
|
|
3230
3215
|
className: "relative",
|
|
3231
|
-
children: [/* @__PURE__ */
|
|
3216
|
+
children: [/* @__PURE__ */ F(fe, { className: "pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground" }), /* @__PURE__ */ F("input", {
|
|
3232
3217
|
type: "text",
|
|
3233
3218
|
className: "h-9 w-full text-sm border rounded pl-7 pr-2 bg-background",
|
|
3234
3219
|
placeholder: i("report.editor.searchFields", "Search fields…"),
|
|
@@ -3238,14 +3223,14 @@ function Ft({ availableFields: e, selectedValues: n, onAdd: r, t: i, triggerLabe
|
|
|
3238
3223
|
autoFocus: !0
|
|
3239
3224
|
})]
|
|
3240
3225
|
}),
|
|
3241
|
-
/* @__PURE__ */
|
|
3226
|
+
/* @__PURE__ */ I("div", {
|
|
3242
3227
|
className: "text-[11px] text-muted-foreground flex items-center justify-between",
|
|
3243
|
-
children: [/* @__PURE__ */
|
|
3228
|
+
children: [/* @__PURE__ */ I("span", { children: [
|
|
3244
3229
|
M.length,
|
|
3245
3230
|
"/",
|
|
3246
3231
|
j.length,
|
|
3247
3232
|
D.size > 0 ? ` · ${i("report.editor.fieldPickerSelected", "{n} selected").replace("{n}", String(D.size))}` : ""
|
|
3248
|
-
] }), D.size > 0 && /* @__PURE__ */
|
|
3233
|
+
] }), D.size > 0 && /* @__PURE__ */ F("button", {
|
|
3249
3234
|
type: "button",
|
|
3250
3235
|
className: "text-[11px] underline-offset-2 hover:underline text-muted-foreground",
|
|
3251
3236
|
onClick: () => O(/* @__PURE__ */ new Set()),
|
|
@@ -3253,35 +3238,35 @@ function Ft({ availableFields: e, selectedValues: n, onAdd: r, t: i, triggerLabe
|
|
|
3253
3238
|
children: i("report.editor.fieldPickerClear", "Clear selection")
|
|
3254
3239
|
})]
|
|
3255
3240
|
}),
|
|
3256
|
-
/* @__PURE__ */
|
|
3241
|
+
/* @__PURE__ */ F("div", {
|
|
3257
3242
|
className: "max-h-72 overflow-auto border rounded bg-background/40 p-1 space-y-0.5",
|
|
3258
3243
|
"data-testid": `${c}-list`,
|
|
3259
|
-
children: L ? /* @__PURE__ */
|
|
3244
|
+
children: L ? /* @__PURE__ */ F("div", {
|
|
3260
3245
|
className: "text-xs text-muted-foreground px-2 py-3 text-center",
|
|
3261
3246
|
children: i("report.editor.noFields", "No fields available — pick a data source first.")
|
|
3262
|
-
}) : R ? /* @__PURE__ */
|
|
3247
|
+
}) : R ? /* @__PURE__ */ F("div", {
|
|
3263
3248
|
className: "text-xs text-muted-foreground px-2 py-3 text-center",
|
|
3264
3249
|
children: i("report.editor.noFieldsAvailable", "All fields already added.")
|
|
3265
|
-
}) : M.length === 0 ? /* @__PURE__ */
|
|
3250
|
+
}) : M.length === 0 ? /* @__PURE__ */ F("div", {
|
|
3266
3251
|
className: "text-xs text-muted-foreground px-2 py-3 text-center",
|
|
3267
3252
|
children: i("report.editor.noMatchingFields", "No fields match your search.")
|
|
3268
3253
|
}) : M.map((e) => {
|
|
3269
3254
|
let t = D.has(e.value);
|
|
3270
|
-
return /* @__PURE__ */
|
|
3255
|
+
return /* @__PURE__ */ I("label", {
|
|
3271
3256
|
className: "flex items-center gap-2 px-2 py-1.5 rounded hover:bg-muted/50 text-sm cursor-pointer",
|
|
3272
3257
|
"data-testid": `${c}-row-${e.value}`,
|
|
3273
3258
|
children: [
|
|
3274
|
-
/* @__PURE__ */
|
|
3259
|
+
/* @__PURE__ */ F(_, {
|
|
3275
3260
|
checked: t,
|
|
3276
|
-
onCheckedChange: () =>
|
|
3261
|
+
onCheckedChange: () => N(e.value),
|
|
3277
3262
|
"data-testid": `${c}-toggle-${e.value}`
|
|
3278
3263
|
}),
|
|
3279
|
-
/* @__PURE__ */
|
|
3264
|
+
/* @__PURE__ */ F("span", {
|
|
3280
3265
|
className: "flex-1 truncate",
|
|
3281
3266
|
title: e.label,
|
|
3282
3267
|
children: e.label
|
|
3283
3268
|
}),
|
|
3284
|
-
e.type && /* @__PURE__ */
|
|
3269
|
+
e.type && /* @__PURE__ */ F("span", {
|
|
3285
3270
|
className: "text-[10px] text-muted-foreground shrink-0",
|
|
3286
3271
|
children: e.type
|
|
3287
3272
|
})
|
|
@@ -3289,19 +3274,19 @@ function Ft({ availableFields: e, selectedValues: n, onAdd: r, t: i, triggerLabe
|
|
|
3289
3274
|
}, e.value);
|
|
3290
3275
|
})
|
|
3291
3276
|
}),
|
|
3292
|
-
!(l && u) && /* @__PURE__ */
|
|
3277
|
+
!(l && u) && /* @__PURE__ */ I(S, {
|
|
3293
3278
|
className: "gap-2 sm:gap-2",
|
|
3294
|
-
children: [/* @__PURE__ */
|
|
3279
|
+
children: [/* @__PURE__ */ F(d, {
|
|
3295
3280
|
type: "button",
|
|
3296
3281
|
variant: "ghost",
|
|
3297
3282
|
size: "sm",
|
|
3298
|
-
onClick:
|
|
3283
|
+
onClick: P,
|
|
3299
3284
|
"data-testid": `${c}-cancel`,
|
|
3300
3285
|
children: i("common.cancel", "Cancel")
|
|
3301
|
-
}), /* @__PURE__ */
|
|
3286
|
+
}), /* @__PURE__ */ F(d, {
|
|
3302
3287
|
type: "button",
|
|
3303
3288
|
size: "sm",
|
|
3304
|
-
onClick:
|
|
3289
|
+
onClick: ee,
|
|
3305
3290
|
disabled: D.size === 0,
|
|
3306
3291
|
"data-testid": `${c}-confirm`,
|
|
3307
3292
|
children: D.size > 0 ? i("report.editor.fieldPickerAddN", "Add {n}").replace("{n}", String(D.size)) : i("report.editor.fieldPickerAdd", "Add")
|
|
@@ -3409,43 +3394,43 @@ function zt({ availableFields: e, value: t, onChange: n, t: r }) {
|
|
|
3409
3394
|
let r = [...i], a = e + t;
|
|
3410
3395
|
a < 0 || a >= r.length || ([r[e], r[a]] = [r[a], r[e]], n(r));
|
|
3411
3396
|
};
|
|
3412
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
3397
|
+
return e.length === 0 ? /* @__PURE__ */ F("div", {
|
|
3413
3398
|
className: "text-xs text-muted-foreground py-2",
|
|
3414
3399
|
"data-testid": "columns-editor-empty",
|
|
3415
3400
|
children: r("report.editor.noFields", "No fields available — pick a data source first.")
|
|
3416
|
-
}) : /* @__PURE__ */
|
|
3401
|
+
}) : /* @__PURE__ */ I("div", {
|
|
3417
3402
|
className: "space-y-2 py-1",
|
|
3418
3403
|
"data-testid": "columns-editor",
|
|
3419
|
-
children: [i.length > 0 && /* @__PURE__ */
|
|
3404
|
+
children: [i.length > 0 && /* @__PURE__ */ F("div", {
|
|
3420
3405
|
className: "space-y-1.5",
|
|
3421
3406
|
"data-testid": "columns-selected",
|
|
3422
3407
|
children: i.map((t, n) => {
|
|
3423
3408
|
let a = e.find((e) => e.value === t.field);
|
|
3424
|
-
return /* @__PURE__ */
|
|
3409
|
+
return /* @__PURE__ */ I("div", {
|
|
3425
3410
|
className: "grid grid-cols-[auto_1fr_auto] gap-1.5 p-1.5 border rounded bg-muted/30 text-xs",
|
|
3426
3411
|
"data-testid": `column-row-${t.field}`,
|
|
3427
3412
|
children: [
|
|
3428
|
-
/* @__PURE__ */
|
|
3413
|
+
/* @__PURE__ */ I("div", {
|
|
3429
3414
|
className: "row-span-2 flex flex-col items-center justify-center gap-0.5",
|
|
3430
|
-
children: [/* @__PURE__ */
|
|
3415
|
+
children: [/* @__PURE__ */ F("button", {
|
|
3431
3416
|
type: "button",
|
|
3432
3417
|
className: "text-muted-foreground hover:text-foreground disabled:opacity-30",
|
|
3433
3418
|
disabled: n === 0,
|
|
3434
3419
|
onClick: () => f(n, -1),
|
|
3435
3420
|
"aria-label": "Move up",
|
|
3436
3421
|
"data-testid": `column-up-${t.field}`,
|
|
3437
|
-
children: /* @__PURE__ */
|
|
3438
|
-
}), /* @__PURE__ */
|
|
3422
|
+
children: /* @__PURE__ */ F(U, { className: "h-3 w-3" })
|
|
3423
|
+
}), /* @__PURE__ */ F("button", {
|
|
3439
3424
|
type: "button",
|
|
3440
3425
|
className: "text-muted-foreground hover:text-foreground disabled:opacity-30",
|
|
3441
3426
|
disabled: n === i.length - 1,
|
|
3442
3427
|
onClick: () => f(n, 1),
|
|
3443
3428
|
"aria-label": "Move down",
|
|
3444
3429
|
"data-testid": `column-down-${t.field}`,
|
|
3445
|
-
children: /* @__PURE__ */
|
|
3430
|
+
children: /* @__PURE__ */ F(H, { className: "h-3 w-3" })
|
|
3446
3431
|
})]
|
|
3447
3432
|
}),
|
|
3448
|
-
/* @__PURE__ */
|
|
3433
|
+
/* @__PURE__ */ F("input", {
|
|
3449
3434
|
className: "h-7 text-xs border rounded px-2 bg-background min-w-0 w-full",
|
|
3450
3435
|
value: t.label ?? "",
|
|
3451
3436
|
placeholder: a?.label ?? t.field,
|
|
@@ -3453,7 +3438,7 @@ function zt({ availableFields: e, value: t, onChange: n, t: r }) {
|
|
|
3453
3438
|
"data-testid": `column-label-${t.field}`,
|
|
3454
3439
|
title: a?.label ?? t.field
|
|
3455
3440
|
}),
|
|
3456
|
-
/* @__PURE__ */
|
|
3441
|
+
/* @__PURE__ */ F(d, {
|
|
3457
3442
|
type: "button",
|
|
3458
3443
|
size: "sm",
|
|
3459
3444
|
variant: "ghost",
|
|
@@ -3461,36 +3446,36 @@ function zt({ availableFields: e, value: t, onChange: n, t: r }) {
|
|
|
3461
3446
|
onClick: () => l(t.field),
|
|
3462
3447
|
"data-testid": `column-remove-${t.field}`,
|
|
3463
3448
|
"aria-label": "Remove column",
|
|
3464
|
-
children: /* @__PURE__ */
|
|
3449
|
+
children: /* @__PURE__ */ F(G, { className: "h-3.5 w-3.5" })
|
|
3465
3450
|
}),
|
|
3466
|
-
/* @__PURE__ */
|
|
3451
|
+
/* @__PURE__ */ I("div", {
|
|
3467
3452
|
className: "grid grid-cols-2 gap-1.5",
|
|
3468
|
-
children: [/* @__PURE__ */
|
|
3453
|
+
children: [/* @__PURE__ */ I("label", {
|
|
3469
3454
|
className: "flex flex-col gap-0.5 min-w-0",
|
|
3470
|
-
children: [/* @__PURE__ */
|
|
3455
|
+
children: [/* @__PURE__ */ F("span", {
|
|
3471
3456
|
className: "text-[10px] text-muted-foreground uppercase tracking-wide",
|
|
3472
3457
|
children: r("report.editor.aggregateColumn", "Aggregate")
|
|
3473
|
-
}), /* @__PURE__ */
|
|
3458
|
+
}), /* @__PURE__ */ F("select", {
|
|
3474
3459
|
className: "h-7 text-xs border rounded px-1 bg-background w-full min-w-0",
|
|
3475
3460
|
value: t.aggregate ?? "",
|
|
3476
3461
|
onChange: (e) => u(t.field, { aggregate: e.target.value === "" ? void 0 : e.target.value }),
|
|
3477
3462
|
"data-testid": `column-agg-${t.field}`,
|
|
3478
|
-
children: o.map((e) => /* @__PURE__ */
|
|
3463
|
+
children: o.map((e) => /* @__PURE__ */ F("option", {
|
|
3479
3464
|
value: e.value,
|
|
3480
3465
|
children: e.label
|
|
3481
3466
|
}, e.value))
|
|
3482
3467
|
})]
|
|
3483
|
-
}), /* @__PURE__ */
|
|
3468
|
+
}), /* @__PURE__ */ I("label", {
|
|
3484
3469
|
className: "flex flex-col gap-0.5 min-w-0",
|
|
3485
|
-
children: [/* @__PURE__ */
|
|
3470
|
+
children: [/* @__PURE__ */ F("span", {
|
|
3486
3471
|
className: "text-[10px] text-muted-foreground uppercase tracking-wide",
|
|
3487
3472
|
children: r("report.editor.formatColumn", "Format")
|
|
3488
|
-
}), /* @__PURE__ */
|
|
3473
|
+
}), /* @__PURE__ */ F("select", {
|
|
3489
3474
|
className: "h-7 text-xs border rounded px-1 bg-background w-full min-w-0",
|
|
3490
3475
|
value: t.format ?? "",
|
|
3491
3476
|
onChange: (e) => u(t.field, { format: e.target.value === "" ? void 0 : e.target.value }),
|
|
3492
3477
|
"data-testid": `column-fmt-${t.field}`,
|
|
3493
|
-
children: s.map((e) => /* @__PURE__ */
|
|
3478
|
+
children: s.map((e) => /* @__PURE__ */ F("option", {
|
|
3494
3479
|
value: e.value,
|
|
3495
3480
|
children: e.label
|
|
3496
3481
|
}, e.value))
|
|
@@ -3500,12 +3485,12 @@ function zt({ availableFields: e, value: t, onChange: n, t: r }) {
|
|
|
3500
3485
|
]
|
|
3501
3486
|
}, t.field);
|
|
3502
3487
|
})
|
|
3503
|
-
}), /* @__PURE__ */
|
|
3488
|
+
}), /* @__PURE__ */ I("div", {
|
|
3504
3489
|
className: "flex items-center justify-between gap-2 pt-1",
|
|
3505
|
-
children: [/* @__PURE__ */
|
|
3490
|
+
children: [/* @__PURE__ */ F("div", {
|
|
3506
3491
|
className: "text-xs text-muted-foreground",
|
|
3507
3492
|
children: i.length > 0 ? r("report.editor.columnsCount", "{n} column(s) selected").replace("{n}", String(i.length)) : r("report.editor.columnsEmpty", "No columns selected yet.")
|
|
3508
|
-
}), /* @__PURE__ */
|
|
3493
|
+
}), /* @__PURE__ */ F(Ft, {
|
|
3509
3494
|
availableFields: e,
|
|
3510
3495
|
selectedValues: i.map((e) => e.field),
|
|
3511
3496
|
onAdd: c,
|
|
@@ -3574,36 +3559,36 @@ function Bt({ availableFields: e, value: t, onChange: n, t: r, testIdPrefix: i =
|
|
|
3574
3559
|
dateGranularity: i && Nt.has(i.type ?? "") ? a[t]?.dateGranularity : void 0
|
|
3575
3560
|
});
|
|
3576
3561
|
};
|
|
3577
|
-
return /* @__PURE__ */
|
|
3562
|
+
return /* @__PURE__ */ I("div", {
|
|
3578
3563
|
className: "space-y-1.5 py-1",
|
|
3579
3564
|
"data-testid": `${i}s-builder`,
|
|
3580
3565
|
children: [a.map((t, n) => {
|
|
3581
3566
|
let f = e.find((e) => e.value === t.field), m = f && Nt.has(f.type ?? ""), h = f?.label ?? t.field ?? r("report.editor.fieldPickerEmpty", "(pick field)");
|
|
3582
|
-
return /* @__PURE__ */
|
|
3567
|
+
return /* @__PURE__ */ I("div", {
|
|
3583
3568
|
className: "flex items-center gap-1.5 p-1.5 border rounded bg-muted/20 text-xs",
|
|
3584
3569
|
"data-testid": `${i}-row-${n}`,
|
|
3585
3570
|
children: [
|
|
3586
|
-
/* @__PURE__ */
|
|
3571
|
+
/* @__PURE__ */ I("div", {
|
|
3587
3572
|
className: "flex flex-col gap-0.5 shrink-0",
|
|
3588
|
-
children: [/* @__PURE__ */
|
|
3573
|
+
children: [/* @__PURE__ */ F("button", {
|
|
3589
3574
|
type: "button",
|
|
3590
3575
|
className: "text-muted-foreground hover:text-foreground disabled:opacity-30",
|
|
3591
3576
|
disabled: n === 0,
|
|
3592
3577
|
onClick: () => u(n, -1),
|
|
3593
3578
|
"aria-label": "Move up",
|
|
3594
3579
|
"data-testid": `${i}-up-${n}`,
|
|
3595
|
-
children: /* @__PURE__ */
|
|
3596
|
-
}), /* @__PURE__ */
|
|
3580
|
+
children: /* @__PURE__ */ F(U, { className: "h-3 w-3" })
|
|
3581
|
+
}), /* @__PURE__ */ F("button", {
|
|
3597
3582
|
type: "button",
|
|
3598
3583
|
className: "text-muted-foreground hover:text-foreground disabled:opacity-30",
|
|
3599
3584
|
disabled: n === a.length - 1,
|
|
3600
3585
|
onClick: () => u(n, 1),
|
|
3601
3586
|
"aria-label": "Move down",
|
|
3602
3587
|
"data-testid": `${i}-down-${n}`,
|
|
3603
|
-
children: /* @__PURE__ */
|
|
3588
|
+
children: /* @__PURE__ */ F(H, { className: "h-3 w-3" })
|
|
3604
3589
|
})]
|
|
3605
3590
|
}),
|
|
3606
|
-
/* @__PURE__ */
|
|
3591
|
+
/* @__PURE__ */ F(Ft, {
|
|
3607
3592
|
availableFields: e,
|
|
3608
3593
|
selectedValues: s.filter((e) => e !== t.field),
|
|
3609
3594
|
onAdd: (e) => p(n, e),
|
|
@@ -3612,41 +3597,41 @@ function Bt({ availableFields: e, value: t, onChange: n, t: r, testIdPrefix: i =
|
|
|
3612
3597
|
commitOnSelect: !0,
|
|
3613
3598
|
testIdPrefix: `${i}-field-picker-${n}`,
|
|
3614
3599
|
title: r("report.editor.fieldPickerChangeTitle", "Change field"),
|
|
3615
|
-
trigger: /* @__PURE__ */
|
|
3600
|
+
trigger: /* @__PURE__ */ I("button", {
|
|
3616
3601
|
type: "button",
|
|
3617
3602
|
className: "h-7 flex-1 min-w-0 text-left text-xs border rounded px-2 bg-background hover:bg-muted/40 inline-flex items-center justify-between gap-1.5",
|
|
3618
3603
|
"data-testid": `${i}-field-${n}`,
|
|
3619
3604
|
title: h,
|
|
3620
|
-
children: [/* @__PURE__ */
|
|
3605
|
+
children: [/* @__PURE__ */ F("span", {
|
|
3621
3606
|
className: "truncate",
|
|
3622
3607
|
children: h
|
|
3623
|
-
}), /* @__PURE__ */
|
|
3608
|
+
}), /* @__PURE__ */ F(ne, { className: "h-3 w-3 text-muted-foreground shrink-0" })]
|
|
3624
3609
|
})
|
|
3625
3610
|
}),
|
|
3626
|
-
/* @__PURE__ */
|
|
3611
|
+
/* @__PURE__ */ I("select", {
|
|
3627
3612
|
className: "h-7 text-xs border rounded px-1.5 bg-background w-20 shrink-0",
|
|
3628
3613
|
value: t.sortOrder ?? "asc",
|
|
3629
3614
|
onChange: (e) => l(n, { sortOrder: e.target.value }),
|
|
3630
3615
|
"data-testid": `${i}-sort-${n}`,
|
|
3631
|
-
children: [/* @__PURE__ */
|
|
3616
|
+
children: [/* @__PURE__ */ F("option", {
|
|
3632
3617
|
value: "asc",
|
|
3633
3618
|
children: r("report.editor.sortAsc")
|
|
3634
|
-
}), /* @__PURE__ */
|
|
3619
|
+
}), /* @__PURE__ */ F("option", {
|
|
3635
3620
|
value: "desc",
|
|
3636
3621
|
children: r("report.editor.sortDesc")
|
|
3637
3622
|
})]
|
|
3638
3623
|
}),
|
|
3639
|
-
m && /* @__PURE__ */
|
|
3624
|
+
m && /* @__PURE__ */ F("select", {
|
|
3640
3625
|
className: "h-7 text-xs border rounded px-1.5 bg-background w-24 shrink-0",
|
|
3641
3626
|
value: t.dateGranularity ?? "",
|
|
3642
3627
|
onChange: (e) => l(n, { dateGranularity: e.target.value || void 0 }),
|
|
3643
3628
|
"data-testid": `${i}-granularity-${n}`,
|
|
3644
|
-
children: o.map((e) => /* @__PURE__ */
|
|
3629
|
+
children: o.map((e) => /* @__PURE__ */ F("option", {
|
|
3645
3630
|
value: e.value,
|
|
3646
3631
|
children: e.label
|
|
3647
3632
|
}, e.value))
|
|
3648
3633
|
}),
|
|
3649
|
-
/* @__PURE__ */
|
|
3634
|
+
/* @__PURE__ */ F(d, {
|
|
3650
3635
|
type: "button",
|
|
3651
3636
|
size: "sm",
|
|
3652
3637
|
variant: "ghost",
|
|
@@ -3654,11 +3639,11 @@ function Bt({ availableFields: e, value: t, onChange: n, t: r, testIdPrefix: i =
|
|
|
3654
3639
|
onClick: () => c(n),
|
|
3655
3640
|
"aria-label": "Remove grouping",
|
|
3656
3641
|
"data-testid": `${i}-remove-${n}`,
|
|
3657
|
-
children: /* @__PURE__ */
|
|
3642
|
+
children: /* @__PURE__ */ F(G, { className: "h-3.5 w-3.5" })
|
|
3658
3643
|
})
|
|
3659
3644
|
]
|
|
3660
3645
|
}, n);
|
|
3661
|
-
}), /* @__PURE__ */
|
|
3646
|
+
}), /* @__PURE__ */ F(Ft, {
|
|
3662
3647
|
availableFields: e,
|
|
3663
3648
|
selectedValues: s,
|
|
3664
3649
|
onAdd: f,
|
|
@@ -3712,13 +3697,13 @@ function Vt({ availableFields: e, columns: t, value: n, onChange: r, t: i }) {
|
|
|
3712
3697
|
label: i("report.editor.chartFunnel")
|
|
3713
3698
|
}
|
|
3714
3699
|
], f = t.filter((e) => e.aggregate).map((e) => e.field), p = e.filter((e) => Pt.has(e.type ?? "")).map((e) => e.value), m = new Set([...f, ...p]), h = e.filter((e) => m.has(e.value));
|
|
3715
|
-
return /* @__PURE__ */
|
|
3700
|
+
return /* @__PURE__ */ I("div", {
|
|
3716
3701
|
className: "space-y-2 py-1",
|
|
3717
3702
|
"data-testid": "chart-config",
|
|
3718
|
-
children: [/* @__PURE__ */
|
|
3703
|
+
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
3719
3704
|
className: "text-[10px] text-muted-foreground",
|
|
3720
3705
|
children: i("report.editor.chartType")
|
|
3721
|
-
}), /* @__PURE__ */
|
|
3706
|
+
}), /* @__PURE__ */ F("select", {
|
|
3722
3707
|
className: "w-full h-7 text-xs border rounded px-2 bg-background",
|
|
3723
3708
|
value: o,
|
|
3724
3709
|
onChange: (e) => {
|
|
@@ -3726,68 +3711,68 @@ function Vt({ availableFields: e, columns: t, value: n, onChange: r, t: i }) {
|
|
|
3726
3711
|
t ? l({ type: t }) : u();
|
|
3727
3712
|
},
|
|
3728
3713
|
"data-testid": "chart-type-select",
|
|
3729
|
-
children: d.map((e) => /* @__PURE__ */
|
|
3714
|
+
children: d.map((e) => /* @__PURE__ */ F("option", {
|
|
3730
3715
|
value: e.value,
|
|
3731
3716
|
children: e.label
|
|
3732
3717
|
}, e.value))
|
|
3733
|
-
})] }), o && /* @__PURE__ */
|
|
3734
|
-
/* @__PURE__ */
|
|
3718
|
+
})] }), o && /* @__PURE__ */ I(P, { children: [
|
|
3719
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
3735
3720
|
className: "text-[10px] text-muted-foreground",
|
|
3736
3721
|
children: i("report.editor.chartTitle")
|
|
3737
|
-
}), /* @__PURE__ */
|
|
3722
|
+
}), /* @__PURE__ */ F("input", {
|
|
3738
3723
|
className: "w-full h-7 text-xs border rounded px-2 bg-background",
|
|
3739
3724
|
value: a.title ?? "",
|
|
3740
3725
|
placeholder: i("report.editor.chartTitlePlaceholder"),
|
|
3741
3726
|
onChange: (e) => l({ title: e.target.value || void 0 }),
|
|
3742
3727
|
"data-testid": "chart-title"
|
|
3743
3728
|
})] }),
|
|
3744
|
-
/* @__PURE__ */
|
|
3729
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
3745
3730
|
className: "text-[10px] text-muted-foreground",
|
|
3746
3731
|
children: i("report.editor.chartXAxis")
|
|
3747
|
-
}), /* @__PURE__ */
|
|
3732
|
+
}), /* @__PURE__ */ I("select", {
|
|
3748
3733
|
className: "w-full h-7 text-xs border rounded px-2 bg-background",
|
|
3749
3734
|
value: s,
|
|
3750
3735
|
onChange: (e) => l({ xAxis: e.target.value || void 0 }),
|
|
3751
3736
|
"data-testid": "chart-x-field",
|
|
3752
|
-
children: [/* @__PURE__ */
|
|
3737
|
+
children: [/* @__PURE__ */ F("option", {
|
|
3753
3738
|
value: "",
|
|
3754
3739
|
children: "—"
|
|
3755
|
-
}), e.map((e) => /* @__PURE__ */
|
|
3740
|
+
}), e.map((e) => /* @__PURE__ */ F("option", {
|
|
3756
3741
|
value: e.value,
|
|
3757
3742
|
children: e.label
|
|
3758
3743
|
}, e.value))]
|
|
3759
3744
|
})] }),
|
|
3760
|
-
/* @__PURE__ */
|
|
3745
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
3761
3746
|
className: "text-[10px] text-muted-foreground",
|
|
3762
3747
|
children: i("report.editor.chartYAxis")
|
|
3763
|
-
}), /* @__PURE__ */
|
|
3748
|
+
}), /* @__PURE__ */ I("select", {
|
|
3764
3749
|
className: "w-full h-7 text-xs border rounded px-2 bg-background",
|
|
3765
3750
|
value: c,
|
|
3766
3751
|
onChange: (e) => l({ yAxis: e.target.value || void 0 }),
|
|
3767
3752
|
"data-testid": "chart-y-field",
|
|
3768
|
-
children: [/* @__PURE__ */
|
|
3753
|
+
children: [/* @__PURE__ */ F("option", {
|
|
3769
3754
|
value: "",
|
|
3770
3755
|
children: "—"
|
|
3771
|
-
}), (h.length > 0 ? h : e).map((e) => /* @__PURE__ */
|
|
3756
|
+
}), (h.length > 0 ? h : e).map((e) => /* @__PURE__ */ F("option", {
|
|
3772
3757
|
value: e.value,
|
|
3773
3758
|
children: e.label
|
|
3774
3759
|
}, e.value))]
|
|
3775
3760
|
})] }),
|
|
3776
|
-
/* @__PURE__ */
|
|
3761
|
+
/* @__PURE__ */ I("label", {
|
|
3777
3762
|
className: "flex items-center gap-2 text-[10px]",
|
|
3778
|
-
children: [/* @__PURE__ */
|
|
3763
|
+
children: [/* @__PURE__ */ F(_, {
|
|
3779
3764
|
checked: a.showLegend !== !1,
|
|
3780
3765
|
onCheckedChange: (e) => l({ showLegend: e === !0 }),
|
|
3781
3766
|
"data-testid": "chart-show-legend"
|
|
3782
|
-
}), /* @__PURE__ */
|
|
3767
|
+
}), /* @__PURE__ */ F("span", { children: i("report.editor.chartShowLegend") })]
|
|
3783
3768
|
}),
|
|
3784
|
-
/* @__PURE__ */
|
|
3769
|
+
/* @__PURE__ */ I("label", {
|
|
3785
3770
|
className: "flex items-center gap-2 text-[10px]",
|
|
3786
|
-
children: [/* @__PURE__ */
|
|
3771
|
+
children: [/* @__PURE__ */ F(_, {
|
|
3787
3772
|
checked: !!a.showDataLabels,
|
|
3788
3773
|
onCheckedChange: (e) => l({ showDataLabels: e === !0 }),
|
|
3789
3774
|
"data-testid": "chart-show-data-labels"
|
|
3790
|
-
}), /* @__PURE__ */
|
|
3775
|
+
}), /* @__PURE__ */ F("span", { children: i("report.editor.chartShowDataLabels") })]
|
|
3791
3776
|
})
|
|
3792
3777
|
] })]
|
|
3793
3778
|
});
|
|
@@ -3866,7 +3851,7 @@ function Ht(e, t, n) {
|
|
|
3866
3851
|
key: "groupingsDown",
|
|
3867
3852
|
label: t("report.editor.grouping"),
|
|
3868
3853
|
type: "custom",
|
|
3869
|
-
render: (n, r) => /* @__PURE__ */
|
|
3854
|
+
render: (n, r) => /* @__PURE__ */ F(Bt, {
|
|
3870
3855
|
availableFields: e,
|
|
3871
3856
|
value: n,
|
|
3872
3857
|
onChange: r,
|
|
@@ -3885,7 +3870,7 @@ function Ht(e, t, n) {
|
|
|
3885
3870
|
key: "groupingsAcross",
|
|
3886
3871
|
label: t("report.editor.grouping"),
|
|
3887
3872
|
type: "custom",
|
|
3888
|
-
render: (n, r) => /* @__PURE__ */
|
|
3873
|
+
render: (n, r) => /* @__PURE__ */ F(Bt, {
|
|
3889
3874
|
availableFields: e,
|
|
3890
3875
|
value: n,
|
|
3891
3876
|
onChange: r,
|
|
@@ -3904,7 +3889,7 @@ function Ht(e, t, n) {
|
|
|
3904
3889
|
key: "columns",
|
|
3905
3890
|
label: t("report.editor.columns"),
|
|
3906
3891
|
type: "custom",
|
|
3907
|
-
render: (n, r) => /* @__PURE__ */
|
|
3892
|
+
render: (n, r) => /* @__PURE__ */ F(zt, {
|
|
3908
3893
|
availableFields: e,
|
|
3909
3894
|
value: n,
|
|
3910
3895
|
onChange: r,
|
|
@@ -3922,7 +3907,7 @@ function Ht(e, t, n) {
|
|
|
3922
3907
|
key: "columns",
|
|
3923
3908
|
label: t("report.editor.values"),
|
|
3924
3909
|
type: "custom",
|
|
3925
|
-
render: (n, r) => /* @__PURE__ */
|
|
3910
|
+
render: (n, r) => /* @__PURE__ */ F(zt, {
|
|
3926
3911
|
availableFields: e,
|
|
3927
3912
|
value: n,
|
|
3928
3913
|
onChange: r,
|
|
@@ -3940,7 +3925,7 @@ function Ht(e, t, n) {
|
|
|
3940
3925
|
key: "filter",
|
|
3941
3926
|
label: t("report.editor.filters"),
|
|
3942
3927
|
type: "custom",
|
|
3943
|
-
render: (n, r) => /* @__PURE__ */
|
|
3928
|
+
render: (n, r) => /* @__PURE__ */ F(Mt, {
|
|
3944
3929
|
availableFields: e,
|
|
3945
3930
|
value: n,
|
|
3946
3931
|
onChange: r,
|
|
@@ -3958,7 +3943,7 @@ function Ht(e, t, n) {
|
|
|
3958
3943
|
key: "blocks",
|
|
3959
3944
|
label: t("report.editor.blocks"),
|
|
3960
3945
|
type: "custom",
|
|
3961
|
-
render: (r, i, a) => /* @__PURE__ */
|
|
3946
|
+
render: (r, i, a) => /* @__PURE__ */ F(St, {
|
|
3962
3947
|
value: r,
|
|
3963
3948
|
onChange: i,
|
|
3964
3949
|
availableFields: e,
|
|
@@ -3979,7 +3964,7 @@ function Ht(e, t, n) {
|
|
|
3979
3964
|
key: "chart",
|
|
3980
3965
|
label: t("report.editor.chart"),
|
|
3981
3966
|
type: "custom",
|
|
3982
|
-
render: (n, r, i) => /* @__PURE__ */
|
|
3967
|
+
render: (n, r, i) => /* @__PURE__ */ F(Vt, {
|
|
3983
3968
|
availableFields: e,
|
|
3984
3969
|
columns: Rt(i.columns),
|
|
3985
3970
|
value: n,
|
|
@@ -4012,17 +3997,17 @@ function Ut(e, t) {
|
|
|
4012
3997
|
return n;
|
|
4013
3998
|
}
|
|
4014
3999
|
function Wt({ problems: e }) {
|
|
4015
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
4000
|
+
return e.length === 0 ? null : /* @__PURE__ */ F("div", {
|
|
4016
4001
|
className: "space-y-1 p-2 border-b",
|
|
4017
4002
|
"data-testid": "report-validation-banner",
|
|
4018
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
4003
|
+
children: e.map((e, t) => /* @__PURE__ */ I("div", {
|
|
4019
4004
|
className: "flex items-start gap-2 text-[11px] rounded px-2 py-1 " + (e.level === "error" ? "bg-red-50 border border-red-200 text-red-900" : "bg-amber-50 border border-amber-200 text-amber-900"),
|
|
4020
|
-
children: [/* @__PURE__ */
|
|
4005
|
+
children: [/* @__PURE__ */ F(V, { className: "h-3.5 w-3.5 mt-0.5 shrink-0" }), /* @__PURE__ */ F("span", { children: e.message })]
|
|
4021
4006
|
}, t))
|
|
4022
4007
|
});
|
|
4023
4008
|
}
|
|
4024
4009
|
function Gt({ open: e, onClose: n, config: r, onSave: i, onFieldChange: a, availableFields: o, getFieldsForObject: s }) {
|
|
4025
|
-
let { t: c } =
|
|
4010
|
+
let { t: c } = L(), l = t.useCallback((e, t, n) => t === void 0 ? c(e, n) : c(e, {
|
|
4026
4011
|
defaultValue: t,
|
|
4027
4012
|
...n || {}
|
|
4028
4013
|
}), [c]), u = o ?? [], d = t.useMemo(() => Ht(u, l, s), [
|
|
@@ -4045,7 +4030,7 @@ function Gt({ open: e, onClose: n, config: r, onSave: i, onFieldChange: a, avail
|
|
|
4045
4030
|
i,
|
|
4046
4031
|
n
|
|
4047
4032
|
]), y = t.useMemo(() => Ut(f, l), [f, l]);
|
|
4048
|
-
return e ? /* @__PURE__ */
|
|
4033
|
+
return e ? /* @__PURE__ */ F(v, {
|
|
4049
4034
|
open: e,
|
|
4050
4035
|
onClose: n,
|
|
4051
4036
|
schema: d,
|
|
@@ -4054,7 +4039,7 @@ function Gt({ open: e, onClose: n, config: r, onSave: i, onFieldChange: a, avail
|
|
|
4054
4039
|
onFieldChange: g,
|
|
4055
4040
|
onSave: _,
|
|
4056
4041
|
onDiscard: h,
|
|
4057
|
-
headerExtra: /* @__PURE__ */
|
|
4042
|
+
headerExtra: /* @__PURE__ */ F(Wt, { problems: y }),
|
|
4058
4043
|
style: { "--config-panel-width": "440px" }
|
|
4059
4044
|
}) : null;
|
|
4060
4045
|
}
|
|
@@ -4218,4 +4203,4 @@ e.register("report", Qe, {
|
|
|
4218
4203
|
}]
|
|
4219
4204
|
});
|
|
4220
4205
|
//#endregion
|
|
4221
|
-
export { St as JoinedBlocksEditor, Xe as JoinedReportRenderer, ge as LegacyReportRenderer, Ke as MatrixRenderer, ht as ReportBuilder, Gt as ReportConfigPanel, Qe as ReportRenderer, pt as ReportViewer, mt as ScheduleConfig, Ve as SpecReportGrid,
|
|
4206
|
+
export { St as JoinedBlocksEditor, Xe as JoinedReportRenderer, ge as LegacyReportRenderer, Ke as MatrixRenderer, ht as ReportBuilder, Gt as ReportConfigPanel, Qe as ReportRenderer, pt as ReportViewer, mt as ScheduleConfig, Ve as SpecReportGrid, J as aggregateRows, _e as bucketDate, Ee as buildAggregateQuery, Ne as buildDrillAction, Te as collectFields, K as columnKey, Fe as createDrillHandler, Jt as createScheduleTrigger, $e as exportAsCSV, rt as exportAsExcel, tt as exportAsHTML, et as exportAsJSON, nt as exportAsPDF, qt as exportExcelWithFormulas, it as exportReport, Kt as exportWithLiveData, lt as formatValue, ve as groupAndAggregate, q as groupingValue, Pe as isDrillAction, X as mergeFilters, ye as pivotRows, Ie as registerDrillHandler, Oe as useReportData, Ct as validateJoinedBlocks };
|