@nivaro/react 0.3.10 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/full.css +1 -1
- package/dist/hooks/useNivaroForm.js +1 -1
- package/dist/hooks/useSessionRecorder.js +109 -102
- package/dist/index.d.ts +34 -3
- package/dist/shared/components/CollectionBrowserView.js +1546 -1477
- package/dist/shared/components/ItemEditForm.js +4332 -4195
- package/dist/shared/components/PageRenderer.js +512 -465
- package/dist/shared/components/ProfileView.js +115 -109
- package/dist/shared/components/QueryStatStrip.js +74 -70
- package/dist/shared/components/ReportView.js +818 -827
- package/dist/shared/components/SheetHeaderBody.js +16 -14
- package/dist/shared/components/chat/ChatPanel.js +492 -472
- package/dist/shared/components/item-edit/CatalogPickerField.js +1029 -933
- package/dist/shared/components/item-edit/FieldRenderer.js +161 -156
- package/dist/shared/components/item-edit/FieldRow.js +20 -19
- package/dist/shared/components/item-edit/FilePickerField.js +52 -40
- package/dist/shared/components/item-edit/GroupSection.js +221 -221
- package/dist/shared/components/item-edit/InlineGridField.js +41 -41
- package/dist/shared/components/item-edit/InlineTableField.js +2249 -2238
- package/dist/shared/components/item-edit/M2MCombobox.js +46 -44
- package/dist/shared/components/item-edit/NestedRelationEditor.js +11 -11
- package/dist/shared/components/item-edit/QuickPicker.js +263 -216
- package/dist/shared/components/item-edit/RelationCombobox.js +285 -245
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +42 -32
- package/dist/shared/components/item-edit/RowHistorySheet.js +130 -134
- package/dist/shared/components/item-edit/SummaryPanel.js +305 -279
- package/dist/shared/components/item-edit/UserChip.js +301 -233
- package/dist/shared/components/item-edit/helpers.js +133 -134
- package/dist/shared/components/item-edit/line-qty.js +57 -0
- package/dist/shared/components/item-edit/option-disambiguate.js +53 -0
- package/dist/shared/components/panels/AddendumLinesDiff.js +87 -90
- package/dist/shared/components/panels/CommentPanel.js +350 -315
- package/dist/shared/components/panels/ItemLockBanner.js +297 -230
- package/dist/shared/components/panels/PipelinePanel.js +719 -701
- package/dist/shared/components/profile/PersonAdminTools.js +168 -144
- package/dist/shared/components/profile/PersonProfile.js +42 -41
- package/dist/shared/components/profile/session-actions.js +52 -0
- package/dist/shared/components/queue/QueueQuickFilters.js +43 -41
- package/dist/shared/components/queue/QueueWorklist.js +1005 -935
- package/dist/shared/components/widgets/ReviewListWidget.js +99 -93
- package/dist/shared/lib/obligation-banner.js +14 -13
- package/dist/shared/lib/obligation-reason-text.js +13 -0
- package/dist/shared/lib/query-filter-seed.js +34 -11
- package/dist/shared/lib/replay-checkout.js +20 -0
- package/dist/shared/lib/sanitize-html.js +24 -15
- package/dist/shared/lib/sheet-def.js +38 -22
- package/dist/shared/lib/unique-options.js +10 -0
- package/dist/shared/lib/utils.js +57 -43
- package/dist/shared/lib/validation-rules.js +58 -34
- package/package.json +1 -1
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { jsx as t, jsxs as p, Fragment as
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { useNivaroClient as
|
|
6
|
-
import { get as
|
|
7
|
-
import { initialFilterSelection as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
1
|
+
import { jsx as t, jsxs as p, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as Q, useQueryClient as Ae } from "@tanstack/react-query";
|
|
3
|
+
import { useState as q, useEffect as ee, useRef as te, useMemo as Pe, useCallback as Fe } from "react";
|
|
4
|
+
import { createPortal as Be } from "react-dom";
|
|
5
|
+
import { useNivaroClient as D, useDrilldown as ke, useOverlayState as Ee, DrilldownContext as Le, useItemNavigation as Ie } from "../context.js";
|
|
6
|
+
import { get as we, post as U } from "../lib/commands.js";
|
|
7
|
+
import { explicitAllUrlParams as Qe, initialFilterSelection as De, filterSelectionToSearch as ze } from "../lib/query-filter-seed.js";
|
|
8
|
+
import { uniqueByValue as Ke } from "../lib/unique-options.js";
|
|
9
|
+
import { userErrorMessage as Ne } from "../lib/safe-error.js";
|
|
10
|
+
import { resolveSheetDef as Ve } from "../lib/sheet-def.js";
|
|
11
|
+
import { useMyScopes as Ge, matchScopeDimension as ge, effectiveScopeSeedIds as Ue, translateScopeValues as He } from "../lib/use-my-scopes.js";
|
|
12
|
+
import { titleCase as L, formatRelative as Ye, formatNumber as Je } from "../lib/utils.js";
|
|
13
|
+
import { CacheStamp as Xe } from "./CacheStamp.js";
|
|
14
|
+
import { RelationCombobox as Ze } from "./item-edit/RelationCombobox.js";
|
|
15
|
+
import { MatrixEditor as re } from "./MatrixEditor.js";
|
|
16
|
+
import { QueryStatStrip as et } from "./QueryStatStrip.js";
|
|
17
|
+
import { QueryTable as tt } from "./QueryTable.js";
|
|
18
|
+
import { RecordDrilldownSheet as rt } from "./RecordDrilldownSheet.js";
|
|
19
|
+
import { RecordGridEditor as ye } from "./RecordGridEditor.js";
|
|
20
|
+
import { SheetHeaderBody as at } from "./SheetHeaderBody.js";
|
|
21
|
+
const X = 76;
|
|
21
22
|
function H() {
|
|
22
23
|
return /* @__PURE__ */ t("div", { className: "space-y-1.5 p-3", children: [1, 2, 3].map((e) => /* @__PURE__ */ t(
|
|
23
24
|
"div",
|
|
@@ -27,155 +28,155 @@ function H() {
|
|
|
27
28
|
e
|
|
28
29
|
)) });
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
-
const r =
|
|
31
|
+
function Y({ error: e }) {
|
|
32
|
+
const r = Ne(e, "Failed to load widget data");
|
|
32
33
|
return /* @__PURE__ */ t("div", { className: "flex h-full items-center justify-center p-3 text-[12px] text-amber-600 dark:text-amber-500", children: r });
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function lt(e) {
|
|
35
36
|
if (e == null) return "—";
|
|
36
37
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
37
38
|
const r = String(e);
|
|
38
39
|
return r.length > 80 ? `${r.slice(0, 80)}…` : r;
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
return e.split(n).forEach((
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
else if (
|
|
48
|
-
|
|
49
|
-
else if (
|
|
50
|
-
|
|
41
|
+
function Z(e, r) {
|
|
42
|
+
const a = [], n = /(\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`|\[[^\]]+\]\([^)]+\))/g;
|
|
43
|
+
return e.split(n).forEach((i, m) => {
|
|
44
|
+
const s = `${r}-${m}`;
|
|
45
|
+
if (i)
|
|
46
|
+
if (i.startsWith("**") && i.endsWith("**"))
|
|
47
|
+
a.push(/* @__PURE__ */ t("strong", { children: i.slice(2, -2) }, s));
|
|
48
|
+
else if (i.startsWith("*") && i.endsWith("*") && i.length > 2)
|
|
49
|
+
a.push(/* @__PURE__ */ t("em", { children: i.slice(1, -1) }, s));
|
|
50
|
+
else if (i.startsWith("`") && i.endsWith("`"))
|
|
51
|
+
a.push(
|
|
51
52
|
/* @__PURE__ */ t(
|
|
52
53
|
"code",
|
|
53
54
|
{
|
|
54
55
|
className: "rounded bg-slate-100 px-1 py-0.5 font-mono text-[0.9em] dark:bg-muted",
|
|
55
|
-
children:
|
|
56
|
+
children: i.slice(1, -1)
|
|
56
57
|
},
|
|
57
|
-
|
|
58
|
+
s
|
|
58
59
|
)
|
|
59
60
|
);
|
|
60
61
|
else {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
/* @__PURE__ */ t("a", { href:
|
|
64
|
-
) :
|
|
62
|
+
const l = i.match(/^\[([^\]]+)\]\(([^)]+)\)$/);
|
|
63
|
+
l && (/^https?:\/\//i.test(l[2]) || l[2].startsWith("/")) ? a.push(
|
|
64
|
+
/* @__PURE__ */ t("a", { href: l[2], className: "text-nvr-cyan underline-offset-2 hover:underline", children: l[1] }, s)
|
|
65
|
+
) : a.push(i);
|
|
65
66
|
}
|
|
66
|
-
}),
|
|
67
|
+
}), a;
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
+
function nt({ content: e }) {
|
|
69
70
|
const r = [];
|
|
70
|
-
let
|
|
71
|
-
const m = (
|
|
72
|
-
|
|
73
|
-
/* @__PURE__ */ t("p", { className: "leading-relaxed", children:
|
|
74
|
-
),
|
|
75
|
-
},
|
|
71
|
+
let a = [], n = [], i = !1;
|
|
72
|
+
const m = (l) => {
|
|
73
|
+
a.length && (r.push(
|
|
74
|
+
/* @__PURE__ */ t("p", { className: "leading-relaxed", children: Z(a.join(" "), l) }, l)
|
|
75
|
+
), a = []);
|
|
76
|
+
}, s = (l) => {
|
|
76
77
|
if (!n.length) return;
|
|
77
|
-
const
|
|
78
|
+
const o = n.map((u, x) => /* @__PURE__ */ t("li", { children: Z(u, `${l}-${x}`) }, `${l}-${x}`));
|
|
78
79
|
r.push(
|
|
79
|
-
|
|
80
|
+
i ? /* @__PURE__ */ t("ol", { className: "list-decimal space-y-0.5 pl-5", children: o }, l) : /* @__PURE__ */ t("ul", { className: "list-disc space-y-0.5 pl-5", children: o }, l)
|
|
80
81
|
), n = [];
|
|
81
82
|
};
|
|
82
83
|
return e.split(`
|
|
83
|
-
`).forEach((
|
|
84
|
-
const u = `md-${
|
|
84
|
+
`).forEach((l, o) => {
|
|
85
|
+
const u = `md-${o}`, x = l.match(/^(#{1,3})\s+(.*)$/), b = l.match(/^[-*]\s+(.*)$/), N = l.match(/^\d+\.\s+(.*)$/);
|
|
85
86
|
if (x) {
|
|
86
|
-
|
|
87
|
-
const
|
|
87
|
+
s(`${u}-fl`), m(`${u}-fp`);
|
|
88
|
+
const S = x[1].length, W = S === 1 ? "text-[17px] font-semibold" : S === 2 ? "text-[15px] font-semibold" : "text-[13.5px] font-semibold";
|
|
88
89
|
r.push(
|
|
89
|
-
/* @__PURE__ */ t("div", { className: `${
|
|
90
|
+
/* @__PURE__ */ t("div", { className: `${W} text-slate-900 dark:text-slate-100`, children: Z(x[2], `${u}-h`) }, u)
|
|
90
91
|
);
|
|
91
|
-
} else if (
|
|
92
|
+
} else if (b || N) {
|
|
92
93
|
m(`${u}-fp`);
|
|
93
|
-
const
|
|
94
|
-
n.length &&
|
|
95
|
-
} else
|
|
96
|
-
}),
|
|
94
|
+
const S = !!N;
|
|
95
|
+
n.length && i !== S && s(`${u}-fl`), i = S, n.push((b == null ? void 0 : b[1]) ?? (N == null ? void 0 : N[1]));
|
|
96
|
+
} else l.trim() === "" ? (s(`${u}-fl`), m(`${u}-fp`)) : (s(`${u}-fl`), a.push(l.trim()));
|
|
97
|
+
}), s("md-end-l"), m("md-end-p"), /* @__PURE__ */ t("div", { className: "space-y-2 p-4 text-[13px] text-slate-700 dark:text-slate-300", children: r });
|
|
97
98
|
}
|
|
98
|
-
function
|
|
99
|
-
const n =
|
|
100
|
-
return
|
|
99
|
+
function ae(e, r, a) {
|
|
100
|
+
const n = D();
|
|
101
|
+
return Q({
|
|
101
102
|
queryKey: ["page-renderer-widget-data", e, r.id],
|
|
102
|
-
queryFn: () => n.request(
|
|
103
|
-
enabled:
|
|
103
|
+
queryFn: () => n.request(U(`/pages/${e}/widget-data`, { widget_id: r.id })).then((i) => i.data),
|
|
104
|
+
enabled: a,
|
|
104
105
|
retry: !1,
|
|
105
106
|
staleTime: 3e4
|
|
106
107
|
});
|
|
107
108
|
}
|
|
108
|
-
function
|
|
109
|
+
function st({ slug: e, widget: r }) {
|
|
109
110
|
var u;
|
|
110
|
-
const
|
|
111
|
-
if (!
|
|
111
|
+
const a = r.config ?? {}, { data: n, isLoading: i, error: m } = ae(e, r, !!a.collection), s = Ie();
|
|
112
|
+
if (!a.collection)
|
|
112
113
|
return /* @__PURE__ */ t("div", { className: "p-3 text-[12px] text-slate-400", children: "Select a collection" });
|
|
113
|
-
if (
|
|
114
|
-
if (m) return /* @__PURE__ */ t(
|
|
115
|
-
const
|
|
116
|
-
if (!
|
|
117
|
-
const
|
|
118
|
-
const
|
|
119
|
-
return
|
|
114
|
+
if (i) return /* @__PURE__ */ t(H, {});
|
|
115
|
+
if (m) return /* @__PURE__ */ t(Y, { error: m });
|
|
116
|
+
const l = (n == null ? void 0 : n.rows) ?? [];
|
|
117
|
+
if (!l.length) return /* @__PURE__ */ t("div", { className: "p-3 text-[12px] text-slate-400", children: "No records" });
|
|
118
|
+
const o = (u = a.columns) != null && u.length ? a.columns : Object.keys(l[0]).filter((x) => {
|
|
119
|
+
const b = l[0][x];
|
|
120
|
+
return b === null || ["string", "number", "boolean"].includes(typeof b);
|
|
120
121
|
}).slice(0, 5);
|
|
121
122
|
return /* @__PURE__ */ t("div", { className: "h-full overflow-auto", children: /* @__PURE__ */ p("table", { className: "w-full text-[12px]", children: [
|
|
122
|
-
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { className: "border-b border-slate-100 dark:border-border", children:
|
|
123
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { className: "border-b border-slate-100 dark:border-border", children: o.map((x) => /* @__PURE__ */ t(
|
|
123
124
|
"th",
|
|
124
125
|
{
|
|
125
126
|
className: "whitespace-nowrap px-3 py-1.5 text-left font-medium text-slate-400",
|
|
126
|
-
children:
|
|
127
|
+
children: L(x)
|
|
127
128
|
},
|
|
128
129
|
x
|
|
129
130
|
)) }) }),
|
|
130
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
131
|
+
/* @__PURE__ */ t("tbody", { children: l.map((x, b) => /* @__PURE__ */ t(
|
|
131
132
|
"tr",
|
|
132
133
|
{
|
|
133
|
-
onClick: x.id != null ? () =>
|
|
134
|
+
onClick: x.id != null ? () => s.open({ collection: a.collection, itemId: String(x.id) }) : void 0,
|
|
134
135
|
className: `border-b border-slate-50 last:border-0 dark:border-border/50 ${x.id != null ? "cursor-pointer hover:bg-slate-50 dark:hover:bg-muted/40" : ""}`,
|
|
135
|
-
children:
|
|
136
|
+
children: o.map((N) => /* @__PURE__ */ t(
|
|
136
137
|
"td",
|
|
137
138
|
{
|
|
138
139
|
className: "whitespace-nowrap px-3 py-1.5 text-slate-700 dark:text-slate-300",
|
|
139
|
-
children:
|
|
140
|
+
children: lt(x[N])
|
|
140
141
|
},
|
|
141
|
-
|
|
142
|
+
N
|
|
142
143
|
))
|
|
143
144
|
},
|
|
144
|
-
x.id != null ? `${x.id}-${
|
|
145
|
+
x.id != null ? `${x.id}-${b}` : b
|
|
145
146
|
)) })
|
|
146
147
|
] }) });
|
|
147
148
|
}
|
|
148
|
-
function
|
|
149
|
-
const
|
|
150
|
-
return
|
|
151
|
-
|
|
152
|
-
/* @__PURE__ */ t("span", { className: "mt-1.5 text-[12px] text-slate-400", children:
|
|
149
|
+
function it({ slug: e, widget: r }) {
|
|
150
|
+
const a = r.config ?? {}, { data: n, isLoading: i, error: m } = ae(e, r, !!a.collection);
|
|
151
|
+
return a.collection ? m ? /* @__PURE__ */ t(Y, { error: m }) : /* @__PURE__ */ p("div", { className: "flex h-full flex-col items-start justify-center px-4", children: [
|
|
152
|
+
i ? /* @__PURE__ */ t("div", { className: "h-9 w-24 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }) : /* @__PURE__ */ t("span", { className: "text-[32px] font-semibold leading-none tracking-tight text-slate-900 dark:text-slate-100", children: (n == null ? void 0 : n.value) != null ? Je(Number(n.value)) : "—" }),
|
|
153
|
+
/* @__PURE__ */ t("span", { className: "mt-1.5 text-[12px] text-slate-400", children: a.label || `${a.aggregate ?? "count"} of ${a.collection}` })
|
|
153
154
|
] }) : /* @__PURE__ */ t("div", { className: "p-3 text-[12px] text-slate-400", children: "Select a collection" });
|
|
154
155
|
}
|
|
155
|
-
function
|
|
156
|
-
const { data:
|
|
156
|
+
function ot({ slug: e, widget: r }) {
|
|
157
|
+
const { data: a, isLoading: n, error: i } = ae(e, r, !0);
|
|
157
158
|
if (n) return /* @__PURE__ */ t(H, {});
|
|
158
|
-
if (
|
|
159
|
-
const m = (
|
|
160
|
-
return m.length ? /* @__PURE__ */ t("div", { className: "h-full overflow-auto px-3 py-1.5", children: m.map((
|
|
159
|
+
if (i) return /* @__PURE__ */ t(Y, { error: i });
|
|
160
|
+
const m = (a == null ? void 0 : a.rows) ?? [];
|
|
161
|
+
return m.length ? /* @__PURE__ */ t("div", { className: "h-full overflow-auto px-3 py-1.5", children: m.map((s) => /* @__PURE__ */ p(
|
|
161
162
|
"div",
|
|
162
163
|
{
|
|
163
164
|
className: "flex items-center gap-2 border-b border-slate-50 py-1.5 text-[12px] last:border-0 dark:border-border/50",
|
|
164
165
|
children: [
|
|
165
|
-
/* @__PURE__ */ t("span", { className: "font-medium text-slate-700 dark:text-slate-300", children:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
/* @__PURE__ */ t("span", { className: "font-medium text-slate-700 dark:text-slate-300", children: s.action }),
|
|
167
|
+
s.collection && /* @__PURE__ */ p("span", { className: "truncate font-mono text-[11px] text-slate-400", children: [
|
|
168
|
+
s.collection,
|
|
169
|
+
s.item ? ` · ${s.item}` : ""
|
|
169
170
|
] }),
|
|
170
|
-
/* @__PURE__ */ t("span", { className: "ml-auto shrink-0 text-[11px] text-slate-400", children:
|
|
171
|
+
/* @__PURE__ */ t("span", { className: "ml-auto shrink-0 text-[11px] text-slate-400", children: Ye(s.timestamp) })
|
|
171
172
|
]
|
|
172
173
|
},
|
|
173
|
-
|
|
174
|
+
s.id
|
|
174
175
|
)) }) : /* @__PURE__ */ t("div", { className: "p-3 text-[12px] text-slate-400", children: "No activity" });
|
|
175
176
|
}
|
|
176
|
-
function
|
|
177
|
-
var
|
|
178
|
-
const r = String(((
|
|
177
|
+
function dt({ widget: e }) {
|
|
178
|
+
var a;
|
|
179
|
+
const r = String(((a = e.config) == null ? void 0 : a.url) ?? "");
|
|
179
180
|
return r ? /^https?:\/\//i.test(r) ? /* @__PURE__ */ t(
|
|
180
181
|
"iframe",
|
|
181
182
|
{
|
|
@@ -186,20 +187,20 @@ function lt({ widget: e }) {
|
|
|
186
187
|
}
|
|
187
188
|
) : /* @__PURE__ */ t("div", { className: "p-3 text-[12px] text-amber-600", children: "URL must start with http(s)://" }) : /* @__PURE__ */ t("div", { className: "p-3 text-[12px] text-slate-400", children: "Set an iframe URL" });
|
|
188
189
|
}
|
|
189
|
-
function
|
|
190
|
+
function $e({
|
|
190
191
|
config: e,
|
|
191
192
|
initialScope: r,
|
|
192
|
-
width:
|
|
193
|
+
width: a,
|
|
193
194
|
title: n,
|
|
194
|
-
onClose:
|
|
195
|
+
onClose: i
|
|
195
196
|
}) {
|
|
196
|
-
const m = typeof
|
|
197
|
-
return /* @__PURE__ */ t("div", { className: "fixed inset-0 z-50 flex justify-end bg-black/30", onClick:
|
|
197
|
+
const m = typeof a == "number" ? `${a}px` : a ?? "85%";
|
|
198
|
+
return /* @__PURE__ */ t("div", { className: "fixed inset-0 z-50 flex justify-end bg-black/30", onClick: i, children: /* @__PURE__ */ p(
|
|
198
199
|
"div",
|
|
199
200
|
{
|
|
200
201
|
className: "flex h-full flex-col border-l border-slate-200 bg-white shadow-2xl dark:border-border dark:bg-background",
|
|
201
202
|
style: { width: m, maxWidth: "96%" },
|
|
202
|
-
onClick: (
|
|
203
|
+
onClick: (s) => s.stopPropagation(),
|
|
203
204
|
children: [
|
|
204
205
|
/* @__PURE__ */ p("div", { className: "flex shrink-0 items-center justify-between border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
|
|
205
206
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-semibold text-slate-700 dark:text-slate-200", children: n ?? e.title ?? "Manage" }),
|
|
@@ -207,19 +208,19 @@ function Ne({
|
|
|
207
208
|
"button",
|
|
208
209
|
{
|
|
209
210
|
type: "button",
|
|
210
|
-
onClick:
|
|
211
|
+
onClick: i,
|
|
211
212
|
className: "rounded px-2 py-1 text-[12px] text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted",
|
|
212
213
|
children: "Close"
|
|
213
214
|
}
|
|
214
215
|
)
|
|
215
216
|
] }),
|
|
216
|
-
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: /* @__PURE__ */ t(
|
|
217
|
+
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: /* @__PURE__ */ t(re, { config: e, initialScope: r }) })
|
|
217
218
|
]
|
|
218
219
|
}
|
|
219
220
|
) });
|
|
220
221
|
}
|
|
221
|
-
function
|
|
222
|
-
const r = e.config ?? {}, [
|
|
222
|
+
function ct({ widget: e }) {
|
|
223
|
+
const r = e.config ?? {}, [a, n] = q(!1);
|
|
223
224
|
return !r.target_collection || !r.option_collection || !r.key_field || !r.value_field ? /* @__PURE__ */ t("div", { className: "p-3 text-[12px] text-slate-400", children: "Matrix editor not configured" }) : r.display === "drawer" ? /* @__PURE__ */ p("div", { className: "flex h-full items-center", children: [
|
|
224
225
|
/* @__PURE__ */ t(
|
|
225
226
|
"button",
|
|
@@ -230,53 +231,54 @@ function at({ widget: e }) {
|
|
|
230
231
|
children: r.button_label ?? r.title ?? "Manage"
|
|
231
232
|
}
|
|
232
233
|
),
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
a && /* @__PURE__ */ t(
|
|
235
|
+
$e,
|
|
235
236
|
{
|
|
236
237
|
config: r,
|
|
237
238
|
width: r.sheet_width,
|
|
238
239
|
onClose: () => n(!1)
|
|
239
240
|
}
|
|
240
241
|
)
|
|
241
|
-
] }) : /* @__PURE__ */ t(
|
|
242
|
+
] }) : /* @__PURE__ */ t(re, { config: r });
|
|
242
243
|
}
|
|
243
|
-
function
|
|
244
|
-
return
|
|
244
|
+
function mt(e) {
|
|
245
|
+
return De(
|
|
245
246
|
e,
|
|
246
247
|
typeof window > "u" ? "" : window.location.search
|
|
247
248
|
);
|
|
248
249
|
}
|
|
249
|
-
function
|
|
250
|
+
function Se(e, r, a, n, i, m) {
|
|
250
251
|
if (typeof e != "string") return e;
|
|
251
252
|
if (e.startsWith("$row.")) return r == null ? void 0 : r[e.slice(5)];
|
|
252
253
|
if (e.startsWith("$rows.")) {
|
|
253
|
-
const
|
|
254
|
-
return
|
|
254
|
+
const s = e.slice(6), l = [...new Set(a.map((o) => o[s]).filter((o) => o != null && o !== ""))];
|
|
255
|
+
return l.length ? l.join(",") : void 0;
|
|
255
256
|
}
|
|
256
257
|
if (e.startsWith("$param.")) return n[e.slice(7)];
|
|
257
258
|
if (e.startsWith("$filters.")) {
|
|
258
|
-
const
|
|
259
|
-
return
|
|
259
|
+
const s = e.slice(9), l = m == null ? void 0 : m.find((u) => u.param === s), o = i[s] ?? [];
|
|
260
|
+
return o.length ? o.map((u) => String(u[(l == null ? void 0 : l.value_field) ?? "id"] ?? "")).join(",") : void 0;
|
|
260
261
|
}
|
|
261
262
|
return e;
|
|
262
263
|
}
|
|
263
|
-
function
|
|
264
|
-
const
|
|
265
|
-
for (const [
|
|
266
|
-
const u =
|
|
267
|
-
u !== void 0 && (
|
|
264
|
+
function ut(e, r, a, n, i, m) {
|
|
265
|
+
const s = {};
|
|
266
|
+
for (const [l, o] of Object.entries(e.params ?? {})) {
|
|
267
|
+
const u = Se(o, r, a, n, i, m);
|
|
268
|
+
u !== void 0 && (s[l] = u);
|
|
268
269
|
}
|
|
269
|
-
return { ...e, params:
|
|
270
|
+
return { ...e, params: s };
|
|
270
271
|
}
|
|
271
|
-
function
|
|
272
|
+
function pt({
|
|
272
273
|
config: e,
|
|
273
274
|
stats: r,
|
|
274
|
-
asOf:
|
|
275
|
+
asOf: a,
|
|
276
|
+
note: n
|
|
275
277
|
}) {
|
|
276
|
-
const
|
|
277
|
-
queryKey: ["page-renderer-query", e.query_slug, JSON.stringify(
|
|
278
|
-
queryFn: () =>
|
|
279
|
-
|
|
278
|
+
const i = D(), m = e.params ?? {}, { data: s, isPending: l, isError: o } = Q({
|
|
279
|
+
queryKey: ["page-renderer-query", e.query_slug, JSON.stringify(m)],
|
|
280
|
+
queryFn: () => i.request(
|
|
281
|
+
U(`/custom-queries/${e.query_slug}/execute`, { params: m })
|
|
280
282
|
),
|
|
281
283
|
enabled: !!e.query_slug,
|
|
282
284
|
staleTime: 6e4
|
|
@@ -287,151 +289,173 @@ function it({
|
|
|
287
289
|
className: "shrink-0 border-b border-slate-200 bg-white px-4 py-3 dark:border-border dark:bg-card",
|
|
288
290
|
"data-sheet-header": !0,
|
|
289
291
|
children: /* @__PURE__ */ t(
|
|
290
|
-
|
|
292
|
+
at,
|
|
291
293
|
{
|
|
292
294
|
stats: r,
|
|
293
|
-
rows: (
|
|
294
|
-
params:
|
|
295
|
-
loading:
|
|
296
|
-
error:
|
|
297
|
-
asOf:
|
|
295
|
+
rows: (s == null ? void 0 : s.data) ?? [],
|
|
296
|
+
params: m,
|
|
297
|
+
loading: l && !o,
|
|
298
|
+
error: o,
|
|
299
|
+
asOf: a,
|
|
300
|
+
note: n
|
|
298
301
|
}
|
|
299
302
|
)
|
|
300
303
|
}
|
|
301
304
|
);
|
|
302
305
|
}
|
|
303
|
-
function
|
|
306
|
+
function ht({
|
|
304
307
|
def: e,
|
|
305
308
|
row: r,
|
|
306
|
-
onClose:
|
|
309
|
+
onClose: a
|
|
307
310
|
}) {
|
|
308
|
-
const [n,
|
|
311
|
+
const [n, i] = q(e.initialTab ?? 0), m = e.title ? e.title.replace(/\{\{\s*([\w.]+)\s*\}\}/g, (o, u) => {
|
|
309
312
|
const x = r == null ? void 0 : r[u];
|
|
310
313
|
return x == null ? "" : String(x);
|
|
311
|
-
}) : "Details",
|
|
312
|
-
return /* @__PURE__ */ t("div", { className: "fixed inset-0 z-50 flex justify-end bg-black/30", onClick:
|
|
314
|
+
}) : "Details", s = typeof e.width == "number" ? `${e.width}px` : e.width ?? "90%", l = e.resolvedTabs[n];
|
|
315
|
+
return /* @__PURE__ */ t("div", { className: "fixed inset-0 z-50 flex justify-end bg-black/30", onClick: a, children: /* @__PURE__ */ p(
|
|
313
316
|
"div",
|
|
314
317
|
{
|
|
315
318
|
className: "flex h-full flex-col border-l border-slate-200 bg-slate-50 shadow-2xl dark:border-border dark:bg-background",
|
|
316
|
-
style: { width:
|
|
317
|
-
onClick: (
|
|
319
|
+
style: { width: s, maxWidth: "96%" },
|
|
320
|
+
onClick: (o) => o.stopPropagation(),
|
|
318
321
|
children: [
|
|
319
322
|
/* @__PURE__ */ p("div", { className: "flex shrink-0 items-center justify-between border-b border-slate-200 bg-white px-4 py-2.5 dark:border-border dark:bg-card", children: [
|
|
320
323
|
/* @__PURE__ */ p("div", { className: "flex items-center gap-3", children: [
|
|
321
324
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-semibold text-slate-700 dark:text-slate-200", children: m }),
|
|
322
|
-
e.resolvedTabs.length > 1 && /* @__PURE__ */ t("div", { className: "flex gap-1", children: e.resolvedTabs.map((
|
|
325
|
+
e.resolvedTabs.length > 1 && /* @__PURE__ */ t("div", { className: "flex gap-1", children: e.resolvedTabs.map((o, u) => /* @__PURE__ */ t(
|
|
323
326
|
"button",
|
|
324
327
|
{
|
|
325
328
|
type: "button",
|
|
326
|
-
onClick: () =>
|
|
329
|
+
onClick: () => i(u),
|
|
327
330
|
className: `rounded-md px-2.5 py-1 text-[12px] font-medium transition-colors ${u === n ? "bg-nvr-cyan/10 text-slate-800 dark:text-slate-100" : "text-slate-500 hover:text-slate-700 dark:hover:text-slate-300"}`,
|
|
328
|
-
children:
|
|
331
|
+
children: o.label
|
|
329
332
|
},
|
|
330
|
-
|
|
333
|
+
o.label
|
|
331
334
|
)) })
|
|
332
335
|
] }),
|
|
333
336
|
/* @__PURE__ */ t(
|
|
334
337
|
"button",
|
|
335
338
|
{
|
|
336
339
|
type: "button",
|
|
337
|
-
onClick:
|
|
340
|
+
onClick: a,
|
|
338
341
|
className: "rounded px-2 py-1 text-[12px] text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted",
|
|
339
342
|
children: "Close"
|
|
340
343
|
}
|
|
341
344
|
)
|
|
342
345
|
] }),
|
|
343
|
-
e.header && /* @__PURE__ */ t(
|
|
344
|
-
|
|
345
|
-
|
|
346
|
+
e.header && /* @__PURE__ */ t(
|
|
347
|
+
pt,
|
|
348
|
+
{
|
|
349
|
+
config: e.header.config,
|
|
350
|
+
stats: e.header.stats,
|
|
351
|
+
asOf: e.header.asOf,
|
|
352
|
+
note: e.header.note
|
|
353
|
+
}
|
|
354
|
+
),
|
|
355
|
+
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: l != null && l.matrix ? /* @__PURE__ */ t(
|
|
356
|
+
re,
|
|
346
357
|
{
|
|
347
|
-
config:
|
|
348
|
-
initialScope:
|
|
358
|
+
config: l.matrix.config,
|
|
359
|
+
initialScope: l.matrix.initialScope,
|
|
349
360
|
lockScope: !0
|
|
350
361
|
},
|
|
351
362
|
n
|
|
352
|
-
) :
|
|
363
|
+
) : l != null && l.config ? /* @__PURE__ */ p(E, { children: [
|
|
364
|
+
l.note && /* @__PURE__ */ t(
|
|
365
|
+
"p",
|
|
366
|
+
{
|
|
367
|
+
className: "border-b border-slate-200 bg-white px-4 py-1.5 text-[11.5px] text-slate-500 dark:border-border dark:bg-card dark:text-slate-400",
|
|
368
|
+
"data-sheet-tab-note": !0,
|
|
369
|
+
children: l.note
|
|
370
|
+
}
|
|
371
|
+
),
|
|
372
|
+
/* @__PURE__ */ t(_e, { config: l.config }, n)
|
|
373
|
+
] }) : /* @__PURE__ */ t("p", { className: "p-4 text-[12px] text-slate-400", children: "Sheet not configured" }) })
|
|
353
374
|
]
|
|
354
375
|
}
|
|
355
376
|
) });
|
|
356
377
|
}
|
|
357
|
-
function
|
|
378
|
+
function xt(e, r, a, n) {
|
|
358
379
|
if (!e) return;
|
|
359
|
-
const
|
|
360
|
-
const u = /^\$filters\.(\w+)(?:\.(\w+))?$/.exec(
|
|
380
|
+
const i = (o) => {
|
|
381
|
+
const u = /^\$filters\.(\w+)(?:\.(\w+))?$/.exec(o);
|
|
361
382
|
if (!u) return;
|
|
362
|
-
const x = n == null ? void 0 : n.find((
|
|
363
|
-
if (
|
|
364
|
-
const
|
|
365
|
-
return
|
|
366
|
-
}, m = (
|
|
367
|
-
Object.entries(
|
|
368
|
-
) :
|
|
369
|
-
return Array.isArray(
|
|
383
|
+
const x = n == null ? void 0 : n.find((S) => S.param === u[1]), b = (a == null ? void 0 : a[u[1]]) ?? [];
|
|
384
|
+
if (b.length === 0) return;
|
|
385
|
+
const N = u[2] ?? (x == null ? void 0 : x.value_field) ?? "id";
|
|
386
|
+
return b.map((S) => S[N]);
|
|
387
|
+
}, m = (o) => typeof o == "string" && o.startsWith("$row.") ? r[o.slice(5)] : typeof o == "string" && o.startsWith("$filters.") ? i(o) : Array.isArray(o) ? o.map(m) : o && typeof o == "object" ? Object.fromEntries(
|
|
388
|
+
Object.entries(o).map(([u, x]) => [u, m(x)])
|
|
389
|
+
) : o, s = (o) => o === void 0 ? !0 : Array.isArray(o) ? o.some(s) : o && typeof o == "object" ? Object.values(o).some(s) : !1, l = m(e);
|
|
390
|
+
return Array.isArray(l._and) && (l._and = l._and.filter((o) => !s(o))), s(l) ? void 0 : l;
|
|
370
391
|
}
|
|
371
|
-
function
|
|
392
|
+
function ft({
|
|
372
393
|
filter: e,
|
|
373
394
|
selected: r,
|
|
374
|
-
onChange:
|
|
395
|
+
onChange: a,
|
|
375
396
|
allowedIds: n,
|
|
376
|
-
scopeDefault:
|
|
397
|
+
scopeDefault: i
|
|
377
398
|
}) {
|
|
378
|
-
const m =
|
|
379
|
-
queryKey: ["page-renderer-filter", e.collection,
|
|
399
|
+
const m = D(), [s, l] = q(!1), [o, u] = q(""), x = te(null), b = e.value_field ?? "id", N = e.label_field ?? b, { data: S = [] } = Q({
|
|
400
|
+
queryKey: ["page-renderer-filter", e.collection, b, N, e.sort],
|
|
380
401
|
queryFn: () => m.request(
|
|
381
|
-
|
|
382
|
-
fields: [.../* @__PURE__ */ new Set(["id",
|
|
402
|
+
we(`/items/${e.collection}`, {
|
|
403
|
+
fields: [.../* @__PURE__ */ new Set(["id", b, N])].join(","),
|
|
383
404
|
limit: e.limit ?? 500,
|
|
384
405
|
...e.sort ? { sort: e.sort } : {}
|
|
385
406
|
})
|
|
386
|
-
).then((
|
|
407
|
+
).then((w) => w.data ?? []),
|
|
387
408
|
staleTime: 6e4
|
|
388
409
|
});
|
|
389
|
-
|
|
390
|
-
if (!
|
|
391
|
-
const
|
|
392
|
-
x.current && !x.current.contains(
|
|
410
|
+
ee(() => {
|
|
411
|
+
if (!s) return;
|
|
412
|
+
const w = ($) => {
|
|
413
|
+
x.current && !x.current.contains($.target) && l(!1);
|
|
393
414
|
};
|
|
394
|
-
return window.addEventListener("mousedown",
|
|
395
|
-
}, [
|
|
396
|
-
const
|
|
397
|
-
(
|
|
398
|
-
|
|
415
|
+
return window.addEventListener("mousedown", w), () => window.removeEventListener("mousedown", w);
|
|
416
|
+
}, [s]);
|
|
417
|
+
const W = e.label ?? L(e.param), j = Ke(
|
|
418
|
+
n != null && n.length ? S.filter((w) => n.some(($) => String($) === String(w.id))) : S,
|
|
419
|
+
(w) => String(w[b] ?? "")
|
|
420
|
+
).filter(
|
|
421
|
+
(w) => o ? String(w[N] ?? "").toLowerCase().includes(o.toLowerCase()) : !0
|
|
422
|
+
), R = n != null && n.length ? {
|
|
399
423
|
label: "restricted",
|
|
400
424
|
cls: "bg-amber-500/15 text-amber-700 dark:text-amber-300",
|
|
401
|
-
title: `Options limited to your restricted ${
|
|
402
|
-
} :
|
|
403
|
-
label: "default",
|
|
425
|
+
title: `Options limited to your restricted ${W} scope${i ? "; selection seeded from your defaults" : ""}`
|
|
426
|
+
} : i && r.length > 0 ? {
|
|
427
|
+
label: "your default",
|
|
404
428
|
cls: "bg-nvr-cyan/[0.12] text-[#0284a8] dark:text-nvr-cyan",
|
|
405
|
-
title: `Pre-selected from your default ${
|
|
429
|
+
title: `Pre-selected from your default ${W} scope — adjust freely`
|
|
406
430
|
} : null;
|
|
407
431
|
return /* @__PURE__ */ p("div", { ref: x, className: "relative", children: [
|
|
408
432
|
/* @__PURE__ */ p(
|
|
409
433
|
"button",
|
|
410
434
|
{
|
|
411
435
|
type: "button",
|
|
412
|
-
onClick: () =>
|
|
436
|
+
onClick: () => l((w) => !w),
|
|
413
437
|
className: `inline-flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] transition-colors ${r.length > 0 ? "border-nvr-cyan bg-nvr-cyan/10 text-slate-700 dark:text-slate-200" : "border-slate-200 bg-white text-slate-600 hover:border-slate-400 dark:border-border dark:bg-card dark:text-slate-300"}`,
|
|
414
438
|
children: [
|
|
415
|
-
/* @__PURE__ */ t("span", { className: "font-medium", children:
|
|
416
|
-
|
|
439
|
+
/* @__PURE__ */ t("span", { className: "font-medium", children: W }),
|
|
440
|
+
R && /* @__PURE__ */ t(
|
|
417
441
|
"span",
|
|
418
442
|
{
|
|
419
|
-
title:
|
|
420
|
-
className: `rounded px-1 py-px text-[9px] font-semibold uppercase tracking-wide ${
|
|
421
|
-
children:
|
|
443
|
+
title: R.title,
|
|
444
|
+
className: `rounded px-1 py-px text-[9px] font-semibold uppercase tracking-wide ${R.cls}`,
|
|
445
|
+
children: R.label
|
|
422
446
|
}
|
|
423
447
|
),
|
|
424
|
-
/* @__PURE__ */ t("span", { className: "text-slate-400", children: r.length === 0 ? "All" : r.length === 1 ? String(r[0][
|
|
448
|
+
/* @__PURE__ */ t("span", { className: "text-slate-400", children: r.length === 0 ? "All" : r.length === 1 ? String(r[0][N] ?? r[0][b] ?? "") : `${r.length} selected` }),
|
|
425
449
|
/* @__PURE__ */ t("span", { className: "text-slate-400", children: "⌃" })
|
|
426
450
|
]
|
|
427
451
|
}
|
|
428
452
|
),
|
|
429
|
-
|
|
453
|
+
s && /* @__PURE__ */ p("div", { className: "absolute left-0 top-9 z-40 w-56 rounded-md border border-slate-200 bg-white p-1 shadow-md dark:border-border dark:bg-popover", children: [
|
|
430
454
|
/* @__PURE__ */ t(
|
|
431
455
|
"input",
|
|
432
456
|
{
|
|
433
|
-
value:
|
|
434
|
-
onChange: (
|
|
457
|
+
value: o,
|
|
458
|
+
onChange: (w) => u(w.target.value),
|
|
435
459
|
placeholder: "Search…",
|
|
436
460
|
className: "mb-1 h-7 w-full rounded border border-slate-200 bg-white px-2 text-[12px] outline-none dark:border-border dark:bg-background"
|
|
437
461
|
}
|
|
@@ -441,39 +465,45 @@ function ct({
|
|
|
441
465
|
"button",
|
|
442
466
|
{
|
|
443
467
|
type: "button",
|
|
444
|
-
onClick: () =>
|
|
468
|
+
onClick: () => a([]),
|
|
445
469
|
className: "flex w-full items-center rounded px-2 py-1 text-left text-[12px] text-slate-500 hover:bg-slate-100 dark:hover:bg-muted",
|
|
446
470
|
children: "Clear selection"
|
|
447
471
|
}
|
|
448
472
|
),
|
|
449
|
-
|
|
450
|
-
const
|
|
473
|
+
j.map((w) => {
|
|
474
|
+
const $ = String(w[b] ?? ""), O = r.some((d) => String(d[b] ?? "") === $);
|
|
451
475
|
return /* @__PURE__ */ p(
|
|
452
476
|
"button",
|
|
453
477
|
{
|
|
454
478
|
type: "button",
|
|
455
|
-
onClick: () =>
|
|
456
|
-
|
|
457
|
-
|
|
479
|
+
onClick: () => {
|
|
480
|
+
if (e.single) {
|
|
481
|
+
a(O ? [] : [w]), l(!1);
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
484
|
+
a(
|
|
485
|
+
O ? r.filter((d) => String(d[b] ?? "") !== $) : [...r, w]
|
|
486
|
+
);
|
|
487
|
+
},
|
|
458
488
|
className: "flex w-full items-center gap-2 rounded px-2 py-1 text-left text-[12px] text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-muted",
|
|
459
489
|
children: [
|
|
460
|
-
/* @__PURE__ */ t("span", { className: `w-3.5 shrink-0 text-nvr-cyan ${
|
|
461
|
-
/* @__PURE__ */ t("span", { className: "truncate", children: String(
|
|
490
|
+
/* @__PURE__ */ t("span", { className: `w-3.5 shrink-0 text-nvr-cyan ${O ? "" : "invisible"}`, children: "✓" }),
|
|
491
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: String(w[N] ?? $) })
|
|
462
492
|
]
|
|
463
493
|
},
|
|
464
|
-
|
|
494
|
+
$
|
|
465
495
|
);
|
|
466
496
|
}),
|
|
467
|
-
|
|
497
|
+
j.length === 0 && /* @__PURE__ */ t("p", { className: "px-2 py-1.5 text-[12px] text-slate-400", children: "No options" })
|
|
468
498
|
] })
|
|
469
499
|
] })
|
|
470
500
|
] });
|
|
471
501
|
}
|
|
472
|
-
function
|
|
473
|
-
return /* @__PURE__ */ t(
|
|
502
|
+
function bt({ widget: e }) {
|
|
503
|
+
return /* @__PURE__ */ t(_e, { config: e.config ?? {} });
|
|
474
504
|
}
|
|
475
|
-
function
|
|
476
|
-
const r = e.config ?? {}, [
|
|
505
|
+
function gt({ widget: e }) {
|
|
506
|
+
const r = e.config ?? {}, [a, n] = q(!1);
|
|
477
507
|
return r.collection ? r.display === "drawer" ? /* @__PURE__ */ p("div", { className: "flex h-full items-center", children: [
|
|
478
508
|
/* @__PURE__ */ t(
|
|
479
509
|
"button",
|
|
@@ -484,7 +514,7 @@ function ut({ widget: e }) {
|
|
|
484
514
|
children: r.button_label ?? r.title ?? "Manage"
|
|
485
515
|
}
|
|
486
516
|
),
|
|
487
|
-
|
|
517
|
+
a && /* @__PURE__ */ t(
|
|
488
518
|
"div",
|
|
489
519
|
{
|
|
490
520
|
className: "fixed inset-0 z-50 flex justify-end bg-black/30",
|
|
@@ -497,7 +527,7 @@ function ut({ widget: e }) {
|
|
|
497
527
|
width: typeof r.sheet_width == "number" ? `${r.sheet_width}px` : r.sheet_width ?? "92%",
|
|
498
528
|
maxWidth: "96%"
|
|
499
529
|
},
|
|
500
|
-
onClick: (
|
|
530
|
+
onClick: (i) => i.stopPropagation(),
|
|
501
531
|
children: [
|
|
502
532
|
/* @__PURE__ */ p("div", { className: "flex shrink-0 items-center justify-between border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
|
|
503
533
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-semibold text-slate-700 dark:text-slate-200", children: r.button_label ?? r.title ?? "Manage" }),
|
|
@@ -511,24 +541,24 @@ function ut({ widget: e }) {
|
|
|
511
541
|
}
|
|
512
542
|
)
|
|
513
543
|
] }),
|
|
514
|
-
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: /* @__PURE__ */ t(
|
|
544
|
+
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: /* @__PURE__ */ t(ye, { config: r }) })
|
|
515
545
|
]
|
|
516
546
|
}
|
|
517
547
|
)
|
|
518
548
|
}
|
|
519
549
|
)
|
|
520
|
-
] }) : /* @__PURE__ */ t(
|
|
550
|
+
] }) : /* @__PURE__ */ t(ye, { config: r }) : /* @__PURE__ */ t("div", { className: "p-3 text-[12px] text-slate-400", children: "Configure the record grid (collection)" });
|
|
521
551
|
}
|
|
522
|
-
function
|
|
552
|
+
function yt({
|
|
523
553
|
cfg: e
|
|
524
554
|
}) {
|
|
525
|
-
const [r,
|
|
555
|
+
const [r, a] = q(!1), n = { ...e };
|
|
526
556
|
return delete n.display, /* @__PURE__ */ p("div", { className: "flex h-full items-center", children: [
|
|
527
557
|
/* @__PURE__ */ t(
|
|
528
558
|
"button",
|
|
529
559
|
{
|
|
530
560
|
type: "button",
|
|
531
|
-
onClick: () =>
|
|
561
|
+
onClick: () => a(!0),
|
|
532
562
|
className: "inline-flex h-8 items-center gap-1.5 whitespace-nowrap rounded-md border border-slate-200 bg-white px-3 text-[12.5px] font-medium text-slate-700 shadow-sm transition-colors hover:border-nvr-cyan hover:text-nvr-navy dark:border-border dark:bg-card dark:text-slate-200 dark:hover:text-nvr-cyan",
|
|
533
563
|
children: e.button_label ?? e.label ?? "View"
|
|
534
564
|
}
|
|
@@ -537,7 +567,7 @@ function pt({
|
|
|
537
567
|
"div",
|
|
538
568
|
{
|
|
539
569
|
className: "fixed inset-0 z-50 flex justify-end bg-black/30",
|
|
540
|
-
onClick: () =>
|
|
570
|
+
onClick: () => a(!1),
|
|
541
571
|
children: /* @__PURE__ */ p(
|
|
542
572
|
"div",
|
|
543
573
|
{
|
|
@@ -546,7 +576,7 @@ function pt({
|
|
|
546
576
|
width: typeof e.sheet_width == "number" ? `${e.sheet_width}px` : e.sheet_width ?? "90%",
|
|
547
577
|
maxWidth: "96%"
|
|
548
578
|
},
|
|
549
|
-
onClick: (
|
|
579
|
+
onClick: (i) => i.stopPropagation(),
|
|
550
580
|
children: [
|
|
551
581
|
/* @__PURE__ */ p("div", { className: "flex shrink-0 items-center justify-between border-b border-slate-200 bg-white px-4 py-2.5 dark:border-border dark:bg-card", children: [
|
|
552
582
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-semibold text-slate-700 dark:text-slate-200", children: e.button_label ?? e.label ?? "View" }),
|
|
@@ -554,13 +584,13 @@ function pt({
|
|
|
554
584
|
"button",
|
|
555
585
|
{
|
|
556
586
|
type: "button",
|
|
557
|
-
onClick: () =>
|
|
587
|
+
onClick: () => a(!1),
|
|
558
588
|
className: "rounded px-2 py-1 text-[12px] text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted",
|
|
559
589
|
children: "Close"
|
|
560
590
|
}
|
|
561
591
|
)
|
|
562
592
|
] }),
|
|
563
|
-
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: /* @__PURE__ */ t(
|
|
593
|
+
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: /* @__PURE__ */ t(Ce, { config: n }) })
|
|
564
594
|
]
|
|
565
595
|
}
|
|
566
596
|
)
|
|
@@ -568,152 +598,168 @@ function pt({
|
|
|
568
598
|
)
|
|
569
599
|
] });
|
|
570
600
|
}
|
|
571
|
-
function
|
|
572
|
-
return e.display === "drawer" ? /* @__PURE__ */ t(
|
|
601
|
+
function _e({ config: e }) {
|
|
602
|
+
return e.display === "drawer" ? /* @__PURE__ */ t(yt, { cfg: e }) : /* @__PURE__ */ t(Ce, { config: e });
|
|
573
603
|
}
|
|
574
|
-
function
|
|
575
|
-
var
|
|
576
|
-
const r =
|
|
577
|
-
() =>
|
|
578
|
-
), [
|
|
579
|
-
|
|
580
|
-
|
|
604
|
+
function Ce({ config: e }) {
|
|
605
|
+
var me, ue, pe, he, xe, fe, be;
|
|
606
|
+
const r = D(), a = ke(), [n, i] = q(null), [m, s] = q(null), [l, o] = q(null), [u, x] = q(
|
|
607
|
+
() => mt(e.filters)
|
|
608
|
+
), [b] = q(
|
|
609
|
+
() => Qe(e.filters, typeof window > "u" ? "" : window.location.search)
|
|
610
|
+
), N = (c, h) => {
|
|
611
|
+
const g = { ...u, [c]: h };
|
|
612
|
+
if (x(g), typeof window > "u" || !(e.filters ?? []).some((k) => k.url_param)) return;
|
|
613
|
+
const f = ze(e.filters, g, window.location.search);
|
|
614
|
+
f !== window.location.search && window.history.replaceState(
|
|
615
|
+
window.history.state,
|
|
616
|
+
"",
|
|
617
|
+
`${window.location.pathname}${f}${window.location.hash}`
|
|
618
|
+
);
|
|
619
|
+
}, [S, W] = q(null), [C, j] = q(null), R = (C == null ? void 0 : C.phase) === "running", w = Ae();
|
|
620
|
+
ee(() => {
|
|
621
|
+
if ((C == null ? void 0 : C.phase) !== "running") return;
|
|
581
622
|
const c = window.setInterval(() => {
|
|
582
|
-
|
|
623
|
+
j(
|
|
583
624
|
(h) => (h == null ? void 0 : h.phase) === "running" ? { ...h, elapsedMs: Date.now() - h.startedAt } : h
|
|
584
625
|
);
|
|
585
626
|
}, 250);
|
|
586
627
|
return () => window.clearInterval(c);
|
|
587
|
-
}, [
|
|
588
|
-
const { scopes:
|
|
589
|
-
|
|
590
|
-
if (
|
|
591
|
-
|
|
592
|
-
const c = (e.filters ?? []).filter(
|
|
593
|
-
|
|
594
|
-
|
|
628
|
+
}, [C == null ? void 0 : C.phase]);
|
|
629
|
+
const { scopes: $, ready: O } = Ge(), d = te(!1), [y, F] = q(!1), [z, K] = q(/* @__PURE__ */ new Set());
|
|
630
|
+
ee(() => {
|
|
631
|
+
if (d.current || !O) return;
|
|
632
|
+
d.current = !0;
|
|
633
|
+
const c = (e.filters ?? []).filter(
|
|
634
|
+
(h) => !(u[h.param] ?? []).length && !b.has(h.param)
|
|
635
|
+
);
|
|
636
|
+
if (!$ || !c.length) {
|
|
637
|
+
F(!0);
|
|
595
638
|
return;
|
|
596
639
|
}
|
|
597
640
|
(async () => {
|
|
598
641
|
try {
|
|
599
642
|
const h = {};
|
|
600
|
-
for (const
|
|
601
|
-
const
|
|
602
|
-
if (!
|
|
603
|
-
const
|
|
604
|
-
if (!
|
|
605
|
-
const
|
|
643
|
+
for (const g of c) {
|
|
644
|
+
const f = ge($, { key: g.param, collection: g.collection });
|
|
645
|
+
if (!f) continue;
|
|
646
|
+
const k = Ue($, f.name);
|
|
647
|
+
if (!k.length) continue;
|
|
648
|
+
const _ = g.value_field ?? "id", M = await He(
|
|
606
649
|
r,
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
650
|
+
f,
|
|
651
|
+
k,
|
|
652
|
+
_
|
|
610
653
|
);
|
|
611
|
-
|
|
654
|
+
if (M.length) {
|
|
655
|
+
const P = M.map((I, Me) => ({ [_]: I, id: k[Me] }));
|
|
656
|
+
h[g.param] = g.single ? P.slice(0, 1) : P;
|
|
657
|
+
}
|
|
612
658
|
}
|
|
613
|
-
Object.keys(h).length && (x((
|
|
614
|
-
const
|
|
615
|
-
for (const [
|
|
616
|
-
(
|
|
617
|
-
return
|
|
618
|
-
}),
|
|
659
|
+
Object.keys(h).length && (x((g) => {
|
|
660
|
+
const f = { ...g };
|
|
661
|
+
for (const [k, _] of Object.entries(h))
|
|
662
|
+
(f[k] ?? []).length || (f[k] = _);
|
|
663
|
+
return f;
|
|
664
|
+
}), K(new Set(Object.keys(h))));
|
|
619
665
|
} finally {
|
|
620
|
-
|
|
666
|
+
F(!0);
|
|
621
667
|
}
|
|
622
668
|
})();
|
|
623
|
-
}, [$,
|
|
624
|
-
const
|
|
669
|
+
}, [O, $, e.filters, u, r, b]);
|
|
670
|
+
const T = Pe(() => {
|
|
625
671
|
const c = { ...e.params ?? {} };
|
|
626
672
|
for (const h of e.filters ?? []) {
|
|
627
|
-
const
|
|
628
|
-
|
|
673
|
+
const g = u[h.param] ?? [];
|
|
674
|
+
g.length > 0 && (c[h.param] = g.map((f) => String(f[h.value_field ?? "id"] ?? "")).join(","));
|
|
629
675
|
}
|
|
630
676
|
return c;
|
|
631
|
-
}, [e.params, e.filters, u]),
|
|
632
|
-
data:
|
|
633
|
-
isPending:
|
|
634
|
-
error:
|
|
635
|
-
refetch:
|
|
636
|
-
isFetching:
|
|
637
|
-
} =
|
|
638
|
-
queryKey: ["page-renderer-query", e.query_slug, JSON.stringify(
|
|
677
|
+
}, [e.params, e.filters, u]), B = te(!1), {
|
|
678
|
+
data: A,
|
|
679
|
+
isPending: le,
|
|
680
|
+
error: ne,
|
|
681
|
+
refetch: se,
|
|
682
|
+
isFetching: qe
|
|
683
|
+
} = Q({
|
|
684
|
+
queryKey: ["page-renderer-query", e.query_slug, JSON.stringify(T)],
|
|
639
685
|
queryFn: () => {
|
|
640
|
-
const c =
|
|
641
|
-
return
|
|
642
|
-
|
|
643
|
-
params:
|
|
686
|
+
const c = B.current;
|
|
687
|
+
return B.current = !1, r.request(
|
|
688
|
+
U(`/custom-queries/${e.query_slug}/execute`, {
|
|
689
|
+
params: T,
|
|
644
690
|
...c ? { refresh: !0 } : {}
|
|
645
691
|
})
|
|
646
692
|
);
|
|
647
693
|
},
|
|
648
|
-
enabled: !!e.query_slug &&
|
|
694
|
+
enabled: !!e.query_slug && y,
|
|
649
695
|
staleTime: 6e4
|
|
650
|
-
}),
|
|
651
|
-
|
|
652
|
-
}, [
|
|
696
|
+
}), V = A == null ? void 0 : A.data, je = Fe(() => {
|
|
697
|
+
B.current = !0, se();
|
|
698
|
+
}, [se]), ie = le;
|
|
653
699
|
if (!e.query_slug) return /* @__PURE__ */ t("div", { className: "p-3 text-[12px] text-slate-400", children: "Set a query slug" });
|
|
654
|
-
const
|
|
655
|
-
var
|
|
700
|
+
const Re = (c) => {
|
|
701
|
+
var k;
|
|
656
702
|
const h = {};
|
|
657
|
-
for (const [
|
|
658
|
-
const
|
|
659
|
-
if (
|
|
660
|
-
|
|
703
|
+
for (const [_, M] of Object.entries(c.params ?? {})) {
|
|
704
|
+
const P = Se(M, null, V ?? [], T, u, e.filters);
|
|
705
|
+
if (P === void 0) {
|
|
706
|
+
W(`Select a value for "${_}" first`);
|
|
661
707
|
return;
|
|
662
708
|
}
|
|
663
|
-
h[
|
|
709
|
+
h[_] = P;
|
|
664
710
|
}
|
|
665
|
-
const
|
|
711
|
+
const g = (k = c.confirm) == null ? void 0 : k.replace(/\{(\w+)\}/g, (_, M) => String(h[M] ?? "")), f = {
|
|
666
712
|
action: c,
|
|
667
713
|
params: h,
|
|
668
|
-
phase:
|
|
669
|
-
confirmText:
|
|
714
|
+
phase: g ? "confirm" : "running",
|
|
715
|
+
confirmText: g ?? null,
|
|
670
716
|
startedAt: Date.now(),
|
|
671
717
|
elapsedMs: 0
|
|
672
718
|
};
|
|
673
|
-
|
|
674
|
-
},
|
|
719
|
+
j(f), g || oe(f);
|
|
720
|
+
}, oe = async (c) => {
|
|
675
721
|
const h = Date.now();
|
|
676
|
-
|
|
722
|
+
j({ ...c, phase: "running", startedAt: h, elapsedMs: 0 });
|
|
677
723
|
try {
|
|
678
|
-
const
|
|
679
|
-
|
|
680
|
-
),
|
|
681
|
-
|
|
682
|
-
(
|
|
683
|
-
...
|
|
724
|
+
const g = await r.request(
|
|
725
|
+
U(`/custom-queries/${c.action.query_slug}/execute`, { params: c.params })
|
|
726
|
+
), f = Array.isArray(g == null ? void 0 : g.data) ? g.data : [];
|
|
727
|
+
j(
|
|
728
|
+
(k) => k && k.action === c.action ? {
|
|
729
|
+
...k,
|
|
684
730
|
phase: "done",
|
|
685
731
|
elapsedMs: Date.now() - h,
|
|
686
|
-
resultRows:
|
|
687
|
-
resultSample:
|
|
688
|
-
} :
|
|
689
|
-
),
|
|
732
|
+
resultRows: f.length,
|
|
733
|
+
resultSample: f[0] ?? null
|
|
734
|
+
} : k
|
|
735
|
+
), W(
|
|
690
736
|
`${c.action.success_message ?? `${c.action.label} completed`} · ${G(Date.now() - h)}`
|
|
691
|
-
),
|
|
692
|
-
} catch (
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
(
|
|
696
|
-
),
|
|
737
|
+
), w.invalidateQueries({ queryKey: ["page-renderer-query", e.query_slug] });
|
|
738
|
+
} catch (g) {
|
|
739
|
+
const f = Ne(g, "unknown error");
|
|
740
|
+
j(
|
|
741
|
+
(k) => k && k.action === c.action ? { ...k, phase: "error", elapsedMs: Date.now() - h, error: f } : k
|
|
742
|
+
), W(`${c.action.label} failed: ${f}`);
|
|
697
743
|
}
|
|
698
|
-
},
|
|
699
|
-
|
|
744
|
+
}, We = /* @__PURE__ */ t(
|
|
745
|
+
Xe,
|
|
700
746
|
{
|
|
701
|
-
envelope:
|
|
702
|
-
onRefresh:
|
|
703
|
-
refreshing:
|
|
747
|
+
envelope: A,
|
|
748
|
+
onRefresh: je,
|
|
749
|
+
refreshing: qe && !le,
|
|
704
750
|
className: "ml-auto"
|
|
705
751
|
}
|
|
706
|
-
),
|
|
752
|
+
), J = e.filters && e.filters.length > 0 || (me = e.actions) != null && me.length || A != null && A.cache_ttl ? /* @__PURE__ */ p("div", { className: "flex flex-wrap items-center gap-2 pb-2", children: [
|
|
707
753
|
(e.filters ?? []).map((c) => {
|
|
708
|
-
const h =
|
|
754
|
+
const h = ge($, { key: c.param, collection: c.collection }), g = h ? ($ == null ? void 0 : $.restricted[h.name]) ?? [] : [];
|
|
709
755
|
return /* @__PURE__ */ t(
|
|
710
|
-
|
|
756
|
+
ft,
|
|
711
757
|
{
|
|
712
758
|
filter: c,
|
|
713
759
|
selected: u[c.param] ?? [],
|
|
714
|
-
allowedIds:
|
|
715
|
-
scopeDefault:
|
|
716
|
-
onChange: (
|
|
760
|
+
allowedIds: g.length > 0 ? g : void 0,
|
|
761
|
+
scopeDefault: z.has(c.param),
|
|
762
|
+
onChange: (f) => N(c.param, f)
|
|
717
763
|
},
|
|
718
764
|
c.param
|
|
719
765
|
);
|
|
@@ -722,112 +768,113 @@ function Se({ config: e }) {
|
|
|
722
768
|
"button",
|
|
723
769
|
{
|
|
724
770
|
type: "button",
|
|
725
|
-
disabled:
|
|
726
|
-
onClick: () => void
|
|
771
|
+
disabled: R,
|
|
772
|
+
onClick: () => void Re(c),
|
|
727
773
|
className: "ml-auto inline-flex h-8 items-center rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white hover:opacity-90 disabled:opacity-50",
|
|
728
|
-
children:
|
|
774
|
+
children: R ? "Running…" : c.label
|
|
729
775
|
},
|
|
730
776
|
c.label
|
|
731
777
|
)),
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
] }) : null,
|
|
735
|
-
|
|
778
|
+
S && /* @__PURE__ */ t("span", { className: "text-[12px] text-slate-500", children: S }),
|
|
779
|
+
We
|
|
780
|
+
] }) : null, de = (ue = e.stats) != null && ue.length ? /* @__PURE__ */ t(
|
|
781
|
+
et,
|
|
736
782
|
{
|
|
737
783
|
stats: e.stats,
|
|
738
|
-
rows:
|
|
739
|
-
effectiveParams:
|
|
740
|
-
loading:
|
|
784
|
+
rows: V ?? [],
|
|
785
|
+
effectiveParams: T,
|
|
786
|
+
loading: ie
|
|
741
787
|
}
|
|
742
788
|
) : null;
|
|
743
|
-
if (
|
|
789
|
+
if (ie)
|
|
744
790
|
return /* @__PURE__ */ p("div", { className: "p-3", children: [
|
|
745
|
-
|
|
746
|
-
|
|
791
|
+
J,
|
|
792
|
+
de,
|
|
747
793
|
/* @__PURE__ */ t(H, {})
|
|
748
794
|
] });
|
|
749
|
-
if (
|
|
795
|
+
if (ne)
|
|
750
796
|
return /* @__PURE__ */ p("div", { className: "p-3", children: [
|
|
751
|
-
|
|
752
|
-
/* @__PURE__ */ t(
|
|
797
|
+
J,
|
|
798
|
+
/* @__PURE__ */ t(Y, { error: ne })
|
|
753
799
|
] });
|
|
754
|
-
const v = e.row_click,
|
|
755
|
-
const
|
|
756
|
-
|
|
800
|
+
const v = e.row_click, ce = (c, h) => {
|
|
801
|
+
const f = Ve(c, (_) => ut(
|
|
802
|
+
_,
|
|
757
803
|
h,
|
|
758
|
-
|
|
759
|
-
|
|
804
|
+
V ?? [],
|
|
805
|
+
T,
|
|
760
806
|
u,
|
|
761
807
|
e.filters
|
|
762
|
-
)),
|
|
763
|
-
if ("matrix" in
|
|
764
|
-
const
|
|
765
|
-
for (const [
|
|
766
|
-
|
|
808
|
+
)), k = f.resolvedTabs.map((_) => {
|
|
809
|
+
if ("matrix" in _) {
|
|
810
|
+
const M = {};
|
|
811
|
+
for (const [P, I] of Object.entries(_.matrix.scope))
|
|
812
|
+
M[P] = I.startsWith("$row.") ? h == null ? void 0 : h[I.slice(5)] : I;
|
|
767
813
|
return {
|
|
768
|
-
label:
|
|
769
|
-
matrix: { config:
|
|
814
|
+
label: _.label,
|
|
815
|
+
matrix: { config: _.matrix.config, initialScope: M }
|
|
770
816
|
};
|
|
771
817
|
}
|
|
772
|
-
return { label:
|
|
818
|
+
return { label: _.label, note: _.note, config: _.config };
|
|
773
819
|
});
|
|
774
|
-
|
|
820
|
+
o({
|
|
775
821
|
def: {
|
|
776
822
|
...c,
|
|
777
|
-
resolvedTabs:
|
|
778
|
-
header:
|
|
779
|
-
config:
|
|
780
|
-
stats:
|
|
781
|
-
asOf:
|
|
823
|
+
resolvedTabs: k,
|
|
824
|
+
header: f.header ? {
|
|
825
|
+
config: f.header.config,
|
|
826
|
+
stats: f.header.stats,
|
|
827
|
+
asOf: f.header.asOf,
|
|
828
|
+
note: f.header.note
|
|
782
829
|
} : null,
|
|
783
|
-
initialTab:
|
|
830
|
+
initialTab: f.initialTab
|
|
784
831
|
},
|
|
785
832
|
row: h
|
|
786
833
|
});
|
|
787
|
-
},
|
|
788
|
-
v.picker ?
|
|
834
|
+
}, Te = v ? (c) => {
|
|
835
|
+
v.picker ? i(c) : v.sheet ? ce(v.sheet, c) : v.matrix && c.id != null ? s(c.id) : v.drill && c.id != null && (a == null || a.open({
|
|
789
836
|
collection: v.drill.collection ?? "",
|
|
790
837
|
itemId: String(c.id),
|
|
791
838
|
layoutId: v.drill.layout_id,
|
|
792
839
|
width: v.drill.width
|
|
793
840
|
}));
|
|
794
|
-
} : void 0,
|
|
841
|
+
} : void 0, Oe = (pe = e.row_actions) != null && pe.length ? e.row_actions.map((c) => ({
|
|
795
842
|
label: c.label,
|
|
796
|
-
onClick: (h) =>
|
|
843
|
+
onClick: (h) => ce(c.sheet, h)
|
|
797
844
|
})) : void 0;
|
|
798
845
|
return /* @__PURE__ */ p(
|
|
799
846
|
"div",
|
|
800
847
|
{
|
|
801
|
-
className: (
|
|
848
|
+
className: (he = e.table) != null && he.sticky ? (
|
|
802
849
|
// Sticky grids own their scroll: filters/stats stay pinned above a
|
|
803
850
|
// scrolling table region (header/first-column/totals pin inside it).
|
|
804
851
|
"flex h-full min-h-0 flex-col overflow-hidden p-3"
|
|
805
852
|
) : "h-full overflow-auto p-3",
|
|
806
853
|
children: [
|
|
807
|
-
|
|
808
|
-
|
|
854
|
+
J,
|
|
855
|
+
de,
|
|
809
856
|
/* @__PURE__ */ t(
|
|
810
|
-
|
|
857
|
+
tt,
|
|
811
858
|
{
|
|
812
|
-
rows:
|
|
859
|
+
rows: V ?? [],
|
|
813
860
|
config: (
|
|
814
861
|
// Current-month highlight only applies when the selected year param
|
|
815
862
|
// IS the current year — otherwise strip it.
|
|
816
|
-
(
|
|
817
|
-
String(
|
|
863
|
+
(xe = e.table) != null && xe.highlight_group && e.table.highlight_year_param ? Number(
|
|
864
|
+
String(T[e.table.highlight_year_param] ?? "").split(",")[0]
|
|
818
865
|
) === (/* @__PURE__ */ new Date()).getFullYear() ? e.table : { ...e.table, highlight_group: void 0 } : e.table
|
|
819
866
|
),
|
|
820
|
-
onRowClick:
|
|
821
|
-
rowActions:
|
|
867
|
+
onRowClick: Te,
|
|
868
|
+
rowActions: Oe,
|
|
822
869
|
emptyText: e.empty_label,
|
|
823
|
-
pivotYear: (
|
|
870
|
+
pivotYear: (be = (fe = e.table) == null ? void 0 : fe.pivot) != null && be.year_param && Number(String(T[e.table.pivot.year_param] ?? "").split(",")[0]) || void 0
|
|
824
871
|
}
|
|
825
872
|
),
|
|
826
873
|
(v == null ? void 0 : v.picker) && n && /* @__PURE__ */ t(
|
|
827
874
|
"div",
|
|
828
875
|
{
|
|
829
876
|
className: "fixed inset-0 z-50 flex items-start justify-center bg-black/30 pt-32",
|
|
830
|
-
onClick: () =>
|
|
877
|
+
onClick: () => i(null),
|
|
831
878
|
children: /* @__PURE__ */ p(
|
|
832
879
|
"div",
|
|
833
880
|
{
|
|
@@ -836,26 +883,26 @@ function Se({ config: e }) {
|
|
|
836
883
|
children: [
|
|
837
884
|
/* @__PURE__ */ t("p", { className: "mb-2 text-[13px] font-semibold text-slate-700 dark:text-slate-200", children: v.picker.title ?? "Choose a record" }),
|
|
838
885
|
/* @__PURE__ */ t(
|
|
839
|
-
|
|
886
|
+
Ze,
|
|
840
887
|
{
|
|
841
888
|
collection: v.picker.collection,
|
|
842
889
|
value: null,
|
|
843
890
|
onChange: (c) => {
|
|
844
|
-
var h,
|
|
845
|
-
if (
|
|
891
|
+
var h, g, f, k;
|
|
892
|
+
if (i(null), c != null) {
|
|
846
893
|
if (v.matrix) {
|
|
847
|
-
|
|
894
|
+
s(c);
|
|
848
895
|
return;
|
|
849
896
|
}
|
|
850
|
-
|
|
851
|
-
collection: ((h = v.drill) == null ? void 0 : h.collection) ?? ((
|
|
897
|
+
a == null || a.open({
|
|
898
|
+
collection: ((h = v.drill) == null ? void 0 : h.collection) ?? ((g = v.picker) == null ? void 0 : g.collection) ?? "",
|
|
852
899
|
itemId: String(c),
|
|
853
|
-
layoutId: (
|
|
854
|
-
width: (
|
|
900
|
+
layoutId: (f = v.drill) == null ? void 0 : f.layout_id,
|
|
901
|
+
width: (k = v.drill) == null ? void 0 : k.width
|
|
855
902
|
});
|
|
856
903
|
}
|
|
857
904
|
},
|
|
858
|
-
extraFilter:
|
|
905
|
+
extraFilter: xt(v.picker.filter, n, u, e.filters),
|
|
859
906
|
placeholder: "Search…"
|
|
860
907
|
}
|
|
861
908
|
),
|
|
@@ -863,7 +910,7 @@ function Se({ config: e }) {
|
|
|
863
910
|
"button",
|
|
864
911
|
{
|
|
865
912
|
type: "button",
|
|
866
|
-
onClick: () =>
|
|
913
|
+
onClick: () => i(null),
|
|
867
914
|
className: "mt-3 h-7 rounded px-2 text-[12px] text-slate-500 hover:text-slate-700",
|
|
868
915
|
children: "Cancel"
|
|
869
916
|
}
|
|
@@ -874,23 +921,23 @@ function Se({ config: e }) {
|
|
|
874
921
|
}
|
|
875
922
|
),
|
|
876
923
|
(v == null ? void 0 : v.matrix) && m != null && /* @__PURE__ */ t(
|
|
877
|
-
|
|
924
|
+
$e,
|
|
878
925
|
{
|
|
879
926
|
config: v.matrix.config,
|
|
880
927
|
initialScope: { [v.matrix.scope_field]: m },
|
|
881
928
|
width: v.matrix.width,
|
|
882
929
|
title: v.matrix.title,
|
|
883
|
-
onClose: () =>
|
|
930
|
+
onClose: () => s(null)
|
|
884
931
|
}
|
|
885
932
|
),
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
933
|
+
l && /* @__PURE__ */ t(ht, { def: l.def, row: l.row, onClose: () => o(null) }),
|
|
934
|
+
C && /* @__PURE__ */ t(
|
|
935
|
+
vt,
|
|
889
936
|
{
|
|
890
|
-
run:
|
|
891
|
-
onConfirm: () => void
|
|
937
|
+
run: C,
|
|
938
|
+
onConfirm: () => void oe(C),
|
|
892
939
|
onClose: () => {
|
|
893
|
-
|
|
940
|
+
j(null);
|
|
894
941
|
}
|
|
895
942
|
}
|
|
896
943
|
)
|
|
@@ -899,20 +946,20 @@ function Se({ config: e }) {
|
|
|
899
946
|
);
|
|
900
947
|
}
|
|
901
948
|
const G = (e) => e < 6e4 ? `${(e / 1e3).toFixed(e < 1e4 ? 1 : 0)}s` : `${Math.floor(e / 6e4)}m ${Math.round(e % 6e4 / 1e3)}s`;
|
|
902
|
-
function
|
|
949
|
+
function vt({
|
|
903
950
|
run: e,
|
|
904
951
|
onConfirm: r,
|
|
905
|
-
onClose:
|
|
952
|
+
onClose: a
|
|
906
953
|
}) {
|
|
907
954
|
const n = Object.entries(e.params);
|
|
908
|
-
return
|
|
909
|
-
/* @__PURE__ */ p(
|
|
955
|
+
return Be(
|
|
956
|
+
/* @__PURE__ */ p(E, { children: [
|
|
910
957
|
/* @__PURE__ */ t(
|
|
911
958
|
"div",
|
|
912
959
|
{
|
|
913
960
|
role: "presentation",
|
|
914
961
|
className: "fixed inset-0 z-40 bg-slate-950/40",
|
|
915
|
-
onClick: e.phase === "running" ? void 0 :
|
|
962
|
+
onClick: e.phase === "running" ? void 0 : a
|
|
916
963
|
}
|
|
917
964
|
),
|
|
918
965
|
/* @__PURE__ */ p(
|
|
@@ -924,11 +971,11 @@ function ht({
|
|
|
924
971
|
className: "fixed left-1/2 top-[24vh] z-50 w-[min(400px,92vw)] -translate-x-1/2 rounded-xl border border-slate-200 bg-white p-4 shadow-2xl dark:border-border dark:bg-card",
|
|
925
972
|
children: [
|
|
926
973
|
/* @__PURE__ */ t("p", { className: "text-[13.5px] font-semibold text-slate-900 dark:text-foreground", children: e.action.label }),
|
|
927
|
-
n.length > 0 && /* @__PURE__ */ t("dl", { className: "mt-2 space-y-0.5 rounded-lg bg-slate-50 px-2.5 py-1.5 text-[11.5px] dark:bg-muted", children: n.map(([
|
|
928
|
-
/* @__PURE__ */ t("dt", { className: "text-slate-500 dark:text-slate-400", children:
|
|
974
|
+
n.length > 0 && /* @__PURE__ */ t("dl", { className: "mt-2 space-y-0.5 rounded-lg bg-slate-50 px-2.5 py-1.5 text-[11.5px] dark:bg-muted", children: n.map(([i, m]) => /* @__PURE__ */ p("div", { className: "flex gap-2", children: [
|
|
975
|
+
/* @__PURE__ */ t("dt", { className: "text-slate-500 dark:text-slate-400", children: L(i) }),
|
|
929
976
|
/* @__PURE__ */ t("dd", { className: "ml-auto font-medium tabular-nums text-slate-800 dark:text-slate-100", children: String(m) })
|
|
930
|
-
] },
|
|
931
|
-
e.phase === "confirm" && /* @__PURE__ */ p(
|
|
977
|
+
] }, i)) }),
|
|
978
|
+
e.phase === "confirm" && /* @__PURE__ */ p(E, { children: [
|
|
932
979
|
/* @__PURE__ */ t("p", { className: "mt-2 text-[12.5px] text-slate-600 dark:text-slate-300", children: e.confirmText }),
|
|
933
980
|
/* @__PURE__ */ p("div", { className: "mt-3 flex gap-2", children: [
|
|
934
981
|
/* @__PURE__ */ t(
|
|
@@ -944,7 +991,7 @@ function ht({
|
|
|
944
991
|
"button",
|
|
945
992
|
{
|
|
946
993
|
type: "button",
|
|
947
|
-
onClick:
|
|
994
|
+
onClick: a,
|
|
948
995
|
className: "h-8 rounded-md border border-slate-200 px-3 text-[12.5px] font-medium text-slate-600 dark:border-border dark:text-slate-300",
|
|
949
996
|
children: "Cancel"
|
|
950
997
|
}
|
|
@@ -956,17 +1003,17 @@ function ht({
|
|
|
956
1003
|
"Running… ",
|
|
957
1004
|
/* @__PURE__ */ t("span", { className: "tabular-nums", children: G(e.elapsedMs) })
|
|
958
1005
|
] }),
|
|
959
|
-
e.phase === "done" && /* @__PURE__ */ p(
|
|
1006
|
+
e.phase === "done" && /* @__PURE__ */ p(E, { children: [
|
|
960
1007
|
/* @__PURE__ */ p("p", { className: "mt-2 text-[12.5px] font-medium text-emerald-600 dark:text-emerald-400", children: [
|
|
961
1008
|
e.action.success_message ?? "Completed",
|
|
962
1009
|
" · ",
|
|
963
1010
|
G(e.elapsedMs)
|
|
964
1011
|
] }),
|
|
965
1012
|
e.resultRows != null && e.resultRows > 0 && e.resultSample && /* @__PURE__ */ p("dl", { className: "mt-2 max-h-40 space-y-0.5 overflow-y-auto rounded-lg bg-slate-50 px-2.5 py-1.5 text-[11.5px] dark:bg-muted", children: [
|
|
966
|
-
Object.entries(e.resultSample).slice(0, 8).map(([
|
|
967
|
-
/* @__PURE__ */ t("dt", { className: "text-slate-500 dark:text-slate-400", children:
|
|
1013
|
+
Object.entries(e.resultSample).slice(0, 8).map(([i, m]) => /* @__PURE__ */ p("div", { className: "flex gap-2", children: [
|
|
1014
|
+
/* @__PURE__ */ t("dt", { className: "text-slate-500 dark:text-slate-400", children: L(i) }),
|
|
968
1015
|
/* @__PURE__ */ t("dd", { className: "ml-auto font-medium tabular-nums text-slate-800 dark:text-slate-100", children: String(m ?? "—") })
|
|
969
|
-
] },
|
|
1016
|
+
] }, i)),
|
|
970
1017
|
e.resultRows > 1 && /* @__PURE__ */ p("p", { className: "pt-0.5 text-slate-400", children: [
|
|
971
1018
|
"…",
|
|
972
1019
|
e.resultRows,
|
|
@@ -977,13 +1024,13 @@ function ht({
|
|
|
977
1024
|
"button",
|
|
978
1025
|
{
|
|
979
1026
|
type: "button",
|
|
980
|
-
onClick:
|
|
1027
|
+
onClick: a,
|
|
981
1028
|
className: "mt-3 h-8 w-full rounded-md border border-slate-200 text-[12.5px] font-medium text-slate-600 dark:border-border dark:text-slate-300",
|
|
982
1029
|
children: "Close"
|
|
983
1030
|
}
|
|
984
1031
|
)
|
|
985
1032
|
] }),
|
|
986
|
-
e.phase === "error" && /* @__PURE__ */ p(
|
|
1033
|
+
e.phase === "error" && /* @__PURE__ */ p(E, { children: [
|
|
987
1034
|
/* @__PURE__ */ p("p", { className: "mt-2 text-[12.5px] font-medium text-red-600 dark:text-red-400", children: [
|
|
988
1035
|
"Failed after ",
|
|
989
1036
|
G(e.elapsedMs),
|
|
@@ -1004,7 +1051,7 @@ function ht({
|
|
|
1004
1051
|
"button",
|
|
1005
1052
|
{
|
|
1006
1053
|
type: "button",
|
|
1007
|
-
onClick:
|
|
1054
|
+
onClick: a,
|
|
1008
1055
|
className: "h-8 rounded-md border border-slate-200 px-3 text-[12.5px] font-medium text-slate-600 dark:border-border dark:text-slate-300",
|
|
1009
1056
|
children: "Close"
|
|
1010
1057
|
}
|
|
@@ -1018,124 +1065,124 @@ function ht({
|
|
|
1018
1065
|
document.body
|
|
1019
1066
|
);
|
|
1020
1067
|
}
|
|
1021
|
-
function
|
|
1022
|
-
var
|
|
1068
|
+
function ve({ slug: e, widget: r }) {
|
|
1069
|
+
var a;
|
|
1023
1070
|
switch (r.type) {
|
|
1024
1071
|
case "table":
|
|
1025
|
-
return /* @__PURE__ */ t(
|
|
1072
|
+
return /* @__PURE__ */ t(st, { slug: e, widget: r });
|
|
1026
1073
|
case "kpi":
|
|
1027
|
-
return /* @__PURE__ */ t(
|
|
1074
|
+
return /* @__PURE__ */ t(it, { slug: e, widget: r });
|
|
1028
1075
|
case "markdown":
|
|
1029
|
-
return /* @__PURE__ */ t(
|
|
1076
|
+
return /* @__PURE__ */ t(nt, { content: String(((a = r.config) == null ? void 0 : a.content) ?? "") });
|
|
1030
1077
|
case "iframe":
|
|
1031
|
-
return /* @__PURE__ */ t(
|
|
1078
|
+
return /* @__PURE__ */ t(dt, { widget: r });
|
|
1032
1079
|
case "query":
|
|
1033
|
-
return /* @__PURE__ */ t(
|
|
1080
|
+
return /* @__PURE__ */ t(bt, { widget: r });
|
|
1034
1081
|
case "matrix":
|
|
1035
|
-
return /* @__PURE__ */ t(
|
|
1082
|
+
return /* @__PURE__ */ t(ct, { widget: r });
|
|
1036
1083
|
case "record-grid":
|
|
1037
|
-
return /* @__PURE__ */ t(
|
|
1084
|
+
return /* @__PURE__ */ t(gt, { widget: r });
|
|
1038
1085
|
case "recent-activity":
|
|
1039
|
-
return /* @__PURE__ */ t(
|
|
1086
|
+
return /* @__PURE__ */ t(ot, { slug: e, widget: r });
|
|
1040
1087
|
default:
|
|
1041
1088
|
return /* @__PURE__ */ t("div", { className: "p-3 text-[12px] text-slate-400", children: "Unknown widget" });
|
|
1042
1089
|
}
|
|
1043
1090
|
}
|
|
1044
|
-
function
|
|
1045
|
-
var
|
|
1046
|
-
const n =
|
|
1047
|
-
data:
|
|
1048
|
-
isLoading:
|
|
1091
|
+
function It({ slug: e, hideHeader: r, className: a }) {
|
|
1092
|
+
var $, O;
|
|
1093
|
+
const n = D(), i = ke(), m = Ee("drill.page"), s = m.value, {
|
|
1094
|
+
data: l,
|
|
1095
|
+
isLoading: o,
|
|
1049
1096
|
error: u
|
|
1050
|
-
} =
|
|
1097
|
+
} = Q({
|
|
1051
1098
|
queryKey: ["page-renderer", e],
|
|
1052
|
-
queryFn: () => n.request(
|
|
1099
|
+
queryFn: () => n.request(we(`/pages/${e}`)).then((d) => d.data),
|
|
1053
1100
|
enabled: !!e,
|
|
1054
1101
|
retry: !1
|
|
1055
1102
|
});
|
|
1056
|
-
if (
|
|
1057
|
-
return /* @__PURE__ */ t("div", { className:
|
|
1058
|
-
if (u || !
|
|
1103
|
+
if (o)
|
|
1104
|
+
return /* @__PURE__ */ t("div", { className: a ?? "p-6", children: /* @__PURE__ */ t(H, {}) });
|
|
1105
|
+
if (u || !l)
|
|
1059
1106
|
return /* @__PURE__ */ p(
|
|
1060
1107
|
"div",
|
|
1061
1108
|
{
|
|
1062
|
-
className: `flex flex-col items-center justify-center p-10 text-center ${
|
|
1109
|
+
className: `flex flex-col items-center justify-center p-10 text-center ${a ?? ""}`,
|
|
1063
1110
|
children: [
|
|
1064
1111
|
/* @__PURE__ */ t("p", { className: "text-sm font-medium text-slate-600 dark:text-slate-300", children: "Page not found" }),
|
|
1065
1112
|
/* @__PURE__ */ t("p", { className: "mt-1 text-xs text-slate-400", children: "This page does not exist or you do not have access to it." })
|
|
1066
1113
|
]
|
|
1067
1114
|
}
|
|
1068
1115
|
);
|
|
1069
|
-
const x = ((
|
|
1116
|
+
const x = (($ = l.layout) == null ? void 0 : $.columns) ?? 12, b = ((O = l.layout) == null ? void 0 : O.widgets) ?? [], N = (d) => {
|
|
1070
1117
|
var y;
|
|
1071
|
-
return (
|
|
1072
|
-
},
|
|
1073
|
-
y:
|
|
1074
|
-
items:
|
|
1075
|
-
})),
|
|
1118
|
+
return (d.type === "matrix" || d.type === "query" || d.type === "record-grid") && ((y = d.config) == null ? void 0 : y.display) === "drawer";
|
|
1119
|
+
}, S = [...new Set(b.filter(N).map((d) => d.y))].filter((d) => b.every((y) => N(y) || d < y.y || d >= y.y + Math.max(y.h, 1))).sort((d, y) => d - y), W = S.map((d) => ({
|
|
1120
|
+
y: d,
|
|
1121
|
+
items: b.filter((y) => y.y === d && N(y)).sort((y, F) => y.x - F.x)
|
|
1122
|
+
})), C = b.filter((d) => !(N(d) && S.includes(d.y))), j = (d) => d - S.filter((y) => y < d).length, R = C.find((d) => {
|
|
1076
1123
|
var y;
|
|
1077
|
-
return (y =
|
|
1078
|
-
}),
|
|
1079
|
-
!r && /* @__PURE__ */ t("div", { className: "shrink-0 pb-4", children: /* @__PURE__ */ t("h1", { className: "text-lg font-semibold text-slate-900 dark:text-slate-100", children:
|
|
1080
|
-
/* @__PURE__ */ t("div", { className: `min-h-0 flex-1 overflow-y-auto ${
|
|
1081
|
-
|
|
1124
|
+
return (y = d.config) == null ? void 0 : y.full_height;
|
|
1125
|
+
}), w = /* @__PURE__ */ p("div", { className: `flex h-full min-h-0 flex-col ${a ?? ""}`, children: [
|
|
1126
|
+
!r && /* @__PURE__ */ t("div", { className: "shrink-0 pb-4", children: /* @__PURE__ */ t("h1", { className: "text-lg font-semibold text-slate-900 dark:text-slate-100", children: l.name }) }),
|
|
1127
|
+
/* @__PURE__ */ t("div", { className: `min-h-0 flex-1 overflow-y-auto ${R ? "flex flex-col" : ""}`, children: b.length === 0 ? /* @__PURE__ */ t("p", { className: "p-6 text-center text-[13px] text-slate-400", children: "This page has no widgets yet." }) : /* @__PURE__ */ p(E, { children: [
|
|
1128
|
+
W.map((d) => /* @__PURE__ */ t("div", { className: "mb-3 flex shrink-0 flex-wrap items-center gap-2", children: d.items.map((y) => /* @__PURE__ */ t(ve, { slug: l.slug, widget: y }, y.id)) }, d.y)),
|
|
1082
1129
|
/* @__PURE__ */ t(
|
|
1083
1130
|
"div",
|
|
1084
1131
|
{
|
|
1085
|
-
className:
|
|
1132
|
+
className: R ? "grid min-h-0 flex-1 gap-4" : "grid gap-4",
|
|
1086
1133
|
style: {
|
|
1087
1134
|
gridTemplateColumns: `repeat(${x}, minmax(0, 1fr))`,
|
|
1088
1135
|
// repeat(0, …) is INVALID CSS (count must be ≥1) and drops the
|
|
1089
1136
|
// whole declaration — a fill widget in the first row band emits
|
|
1090
1137
|
// just the stretching track.
|
|
1091
|
-
...
|
|
1092
|
-
gridTemplateRows: `${
|
|
1138
|
+
...R ? {
|
|
1139
|
+
gridTemplateRows: `${j(R.y) > 0 ? `repeat(${j(R.y)}, ${X}px) ` : ""}minmax(${X * 3}px, 1fr)`
|
|
1093
1140
|
} : {},
|
|
1094
|
-
gridAutoRows: `${
|
|
1141
|
+
gridAutoRows: `${X}px`
|
|
1095
1142
|
},
|
|
1096
|
-
children:
|
|
1097
|
-
var
|
|
1098
|
-
const y = (
|
|
1143
|
+
children: C.map((d) => {
|
|
1144
|
+
var z, K, T, B;
|
|
1145
|
+
const y = (d.type === "matrix" || d.type === "query" || d.type === "record-grid") && ((z = d.config) == null ? void 0 : z.display) === "drawer", F = d === R;
|
|
1099
1146
|
return /* @__PURE__ */ p(
|
|
1100
1147
|
"div",
|
|
1101
1148
|
{
|
|
1102
1149
|
className: y ? "flex min-h-0 flex-col" : "flex min-h-0 flex-col overflow-hidden rounded-xl border border-slate-200 bg-white shadow-sm dark:border-border dark:bg-card",
|
|
1103
1150
|
style: {
|
|
1104
|
-
gridColumn: `${Math.min(
|
|
1105
|
-
gridRow:
|
|
1151
|
+
gridColumn: `${Math.min(d.x, x - 1) + 1} / span ${Math.min(d.w, x)}`,
|
|
1152
|
+
gridRow: F ? `${j(d.y) + 1} / -1` : `${j(d.y) + 1} / span ${Math.max(d.h, 1)}`
|
|
1106
1153
|
},
|
|
1107
1154
|
children: [
|
|
1108
|
-
!y &&
|
|
1109
|
-
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ t(
|
|
1155
|
+
!y && d.type !== "kpi" && d.type !== "markdown" && ((K = d.config) == null ? void 0 : K.hide_label) !== !0 && /* @__PURE__ */ t("div", { className: "shrink-0 border-b border-slate-100 px-3 py-1.5 text-[11px] font-medium uppercase tracking-wide text-slate-400 dark:border-border", children: String(((T = d.config) == null ? void 0 : T.label) ?? "") || (typeof ((B = d.config) == null ? void 0 : B.collection) == "string" ? L(String(d.config.collection)) : L(d.type)) }),
|
|
1156
|
+
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ t(ve, { slug: l.slug, widget: d }) })
|
|
1110
1157
|
]
|
|
1111
1158
|
},
|
|
1112
|
-
|
|
1159
|
+
d.id
|
|
1113
1160
|
);
|
|
1114
1161
|
})
|
|
1115
1162
|
}
|
|
1116
1163
|
)
|
|
1117
1164
|
] }) })
|
|
1118
1165
|
] });
|
|
1119
|
-
return
|
|
1120
|
-
|
|
1121
|
-
|
|
1166
|
+
return i ? w : /* @__PURE__ */ p(Le.Provider, { value: { open: (d) => m.push([d]) }, children: [
|
|
1167
|
+
s != null && s.length ? /* @__PURE__ */ t(
|
|
1168
|
+
rt,
|
|
1122
1169
|
{
|
|
1123
|
-
collection:
|
|
1124
|
-
itemId:
|
|
1125
|
-
layoutId:
|
|
1126
|
-
width:
|
|
1127
|
-
title:
|
|
1128
|
-
stack:
|
|
1129
|
-
onPush: (
|
|
1170
|
+
collection: s[0].collection,
|
|
1171
|
+
itemId: s[0].itemId,
|
|
1172
|
+
layoutId: s[0].layoutId,
|
|
1173
|
+
width: s[0].width,
|
|
1174
|
+
title: s[0].title,
|
|
1175
|
+
stack: s,
|
|
1176
|
+
onPush: (d) => m.push([...s, d]),
|
|
1130
1177
|
onPop: () => m.back(),
|
|
1131
|
-
onClose: () => m.back(
|
|
1178
|
+
onClose: () => m.back(s.length)
|
|
1132
1179
|
}
|
|
1133
1180
|
) : null,
|
|
1134
|
-
|
|
1181
|
+
w
|
|
1135
1182
|
] });
|
|
1136
1183
|
}
|
|
1137
1184
|
export {
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1185
|
+
It as PageRenderer,
|
|
1186
|
+
_e as QueryWidgetView,
|
|
1187
|
+
gt as RecordGridWidgetBody
|
|
1141
1188
|
};
|