@nivaro/react 0.3.63 → 0.3.65
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/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +54 -5
- package/dist/shared/components/CollectionBrowserView.js +3029 -2947
- package/dist/shared/components/ConformanceView.js +235 -221
- package/dist/shared/components/DataTable.js +478 -459
- package/dist/shared/components/ItemEditForm.js +4469 -4266
- package/dist/shared/components/PageRenderer.js +146 -138
- package/dist/shared/components/RecordDrilldownSheet.js +73 -65
- package/dist/shared/components/bulk/BulkActionButtons.js +72 -72
- package/dist/shared/components/bulk/BulkFieldUpdate.js +114 -103
- package/dist/shared/components/bulk/BulkFieldUpdateButton.js +73 -0
- package/dist/shared/components/bulk/bulk-field-options.js +29 -23
- package/dist/shared/components/integrations/IntegrationObligationsView.js +191 -173
- package/dist/shared/components/integrations/IntegrationStatusLines.js +101 -85
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +11 -9
- package/dist/shared/components/integrations/SendCurrentData.js +126 -0
- package/dist/shared/components/item-edit/CatalogPickerField.js +1530 -1437
- package/dist/shared/components/item-edit/FieldRenderer.js +49 -45
- package/dist/shared/components/item-edit/FieldRow.js +413 -403
- package/dist/shared/components/item-edit/InlineTableField.js +2903 -2816
- package/dist/shared/components/item-edit/M2MCombobox.js +172 -168
- package/dist/shared/components/item-edit/MidairCollisionDialog.js +341 -114
- package/dist/shared/components/item-edit/NestedRelationEditor.js +171 -163
- package/dist/shared/components/item-edit/PlanGrid.js +783 -724
- package/dist/shared/components/item-edit/QuickCreateButton.js +291 -224
- package/dist/shared/components/item-edit/RecordInsights.js +113 -111
- package/dist/shared/components/item-edit/RecordLiveSync.js +4 -1
- package/dist/shared/components/item-edit/RelationCombobox.js +332 -314
- package/dist/shared/components/item-edit/cascade-clear-notice.js +52 -0
- package/dist/shared/components/item-edit/collision-format.js +37 -0
- package/dist/shared/components/item-edit/field-a11y.js +25 -0
- package/dist/shared/components/item-edit/line-merge.js +58 -0
- package/dist/shared/components/item-edit/line-midair.js +94 -87
- package/dist/shared/components/item-edit/move-guard.js +17 -0
- package/dist/shared/components/item-edit/picker-search.js +22 -15
- package/dist/shared/components/item-edit/rail-width.js +8 -0
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +322 -291
- package/dist/shared/components/panels/AccessDeniedPanel.js +96 -55
- package/dist/shared/components/panels/CommentPanel.js +142 -136
- package/dist/shared/components/panels/ItemLockBanner.js +246 -240
- package/dist/shared/components/panels/PipelinePanel.js +1366 -1194
- package/dist/shared/components/panels/RevisionsPanel.js +106 -102
- package/dist/shared/components/panels/SlaBreachBanner.js +16 -20
- package/dist/shared/components/panels/SlaClock.js +90 -68
- package/dist/shared/components/queue/QueueItemSheet.js +94 -87
- package/dist/shared/components/queue/QueueWorklist.js +1502 -1354
- package/dist/shared/components/queue/worklist-csv.js +75 -0
- package/dist/shared/components/queue/worklist-helpers.js +20 -0
- package/dist/shared/components/widgets/ReviewListWidget.js +226 -207
- package/dist/shared/lib/bulk-copy.js +17 -0
- package/dist/shared/lib/cbv-export.js +122 -0
- package/dist/shared/lib/delete-offer.js +13 -0
- package/dist/shared/lib/error-hints.js +1 -0
- package/dist/shared/lib/leave-guard.js +41 -26
- package/dist/shared/lib/list-link.js +72 -56
- package/dist/shared/lib/live-queries.js +32 -30
- package/dist/shared/lib/moved-notice.js +25 -0
- package/dist/shared/lib/notification-target.js +56 -54
- package/dist/shared/lib/obligation-banner.js +11 -8
- package/dist/shared/lib/obligation-reason-text.js +6 -6
- package/dist/shared/lib/sort-cycle.js +6 -0
- package/dist/shared/lib/summary-mode.js +59 -41
- package/package.json +1 -1
|
@@ -1,163 +1,163 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Search as
|
|
3
|
-
import
|
|
4
|
-
import { parseDateFilter as
|
|
5
|
-
import { parseNumberFilter as
|
|
6
|
-
import { fitPins as
|
|
7
|
-
import { cn as h, formatNumber as
|
|
8
|
-
import { CellCopyLayer as
|
|
9
|
-
import { EmptyState as
|
|
10
|
-
import { HScrollProxy as
|
|
11
|
-
import { TableSkeletonRows as
|
|
12
|
-
import { Button as
|
|
13
|
-
import { Checkbox as
|
|
14
|
-
import { Command as
|
|
15
|
-
import { Input as
|
|
16
|
-
import { Popover as
|
|
17
|
-
import { Select as
|
|
18
|
-
import { Table as
|
|
19
|
-
const
|
|
20
|
-
function
|
|
1
|
+
import { jsxs as i, Fragment as Q, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Search as nt, Pin as st, ChevronDown as it, Inbox as dt, ChevronsUpDown as re, ChevronUp as ct, X as ae, Check as ot, CalendarDays as bt } from "lucide-react";
|
|
3
|
+
import pt, { useMemo as je, useRef as te, useState as $, useEffect as K, useLayoutEffect as ht } from "react";
|
|
4
|
+
import { parseDateFilter as Ve, describeDateFilter as mt, DATE_FILTER_OPS as ut, formatDateFilter as ft } from "../lib/date-filter.js";
|
|
5
|
+
import { parseNumberFilter as Ae, describeNumberFilter as xt, NUMBER_FILTER_OPS as yt, formatNumberFilter as gt } from "../lib/number-filter.js";
|
|
6
|
+
import { fitPins as vt } from "../lib/table-pins.js";
|
|
7
|
+
import { cn as h, formatNumber as xe } from "../lib/utils.js";
|
|
8
|
+
import { CellCopyLayer as kt } from "./CellCopyLayer.js";
|
|
9
|
+
import { EmptyState as Nt } from "./EmptyState.js";
|
|
10
|
+
import { HScrollProxy as wt } from "./HScrollProxy.js";
|
|
11
|
+
import { TableSkeletonRows as _t } from "./Skeletons.js";
|
|
12
|
+
import { Button as We } from "./ui/button.js";
|
|
13
|
+
import { Checkbox as Le } from "./ui/checkbox.js";
|
|
14
|
+
import { Command as Ot, CommandInput as St, CommandList as $t, CommandEmpty as Ct, CommandItem as zt } from "./ui/command.js";
|
|
15
|
+
import { Input as L } from "./ui/input.js";
|
|
16
|
+
import { Popover as le, PopoverTrigger as ne, PopoverContent as se } from "./ui/popover.js";
|
|
17
|
+
import { Select as Tt, SelectTrigger as Et, SelectValue as Mt, SelectContent as jt, SelectItem as Fe } from "./ui/select.js";
|
|
18
|
+
import { Table as qe, TableHeader as Be, TableRow as H, TableHead as X, TableBody as Ue, TableCell as ee } from "./ui/table.js";
|
|
19
|
+
const Vt = [1, 2, 3, 4, 5, 6, 7, 8];
|
|
20
|
+
function ge(r) {
|
|
21
21
|
var s;
|
|
22
|
-
return r == null || typeof r == "boolean" ? "" : typeof r == "string" || typeof r == "number" ? String(r) : Array.isArray(r) ? r.map(
|
|
22
|
+
return r == null || typeof r == "boolean" ? "" : typeof r == "string" || typeof r == "number" ? String(r) : Array.isArray(r) ? r.map(ge).join("") : typeof r == "object" && "props" in r ? ge((s = r.props) == null ? void 0 : s.children) : "";
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const s =
|
|
24
|
+
function At(r) {
|
|
25
|
+
const s = ge(r.header).replace(/\s+/g, " ").trim();
|
|
26
26
|
if (s) return s;
|
|
27
|
-
const
|
|
28
|
-
return
|
|
27
|
+
const c = (r.key.split(".").pop() ?? r.key).replace(/_/g, " ").trim();
|
|
28
|
+
return c ? c[0].toUpperCase() + c.slice(1) : r.key;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function ve(r) {
|
|
31
31
|
return r.startsWith("-") ? r.slice(1) : r;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function ke(r) {
|
|
34
34
|
return r ? r.startsWith("-") ? "desc" : "asc" : null;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const o =
|
|
38
|
-
return o !== s || !r ? s :
|
|
36
|
+
function Wt(r, s) {
|
|
37
|
+
const o = ve(r), c = ke(r);
|
|
38
|
+
return o !== s || !r ? s : c === "asc" ? `-${s}` : "";
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Lt(r, s) {
|
|
41
41
|
const o = s.trim().toLowerCase().split(/\s+/).filter(Boolean);
|
|
42
42
|
if (o.length === 0) return 1;
|
|
43
|
-
const
|
|
44
|
-
return o.every((m) =>
|
|
43
|
+
const c = r.toLowerCase();
|
|
44
|
+
return o.every((m) => c.includes(m)) ? 1 : 0;
|
|
45
45
|
}
|
|
46
46
|
function Ft(r, s) {
|
|
47
|
-
return !r ||
|
|
47
|
+
return !r || ve(r) !== s ? "none" : ke(r) === "desc" ? "descending" : "ascending";
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function ye(r) {
|
|
50
50
|
return typeof r == "string" || typeof r == "number";
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
const o =
|
|
54
|
-
return o !== r || !s ? /* @__PURE__ */ t(
|
|
55
|
-
|
|
52
|
+
function De({ field: r, sort: s }) {
|
|
53
|
+
const o = ve(s), c = ke(s);
|
|
54
|
+
return o !== r || !s ? /* @__PURE__ */ t(re, { className: "ml-1 inline h-3 w-3 shrink-0 text-slate-300" }) : /* @__PURE__ */ t(
|
|
55
|
+
ct,
|
|
56
56
|
{
|
|
57
57
|
className: h(
|
|
58
58
|
"ml-1 inline h-3 w-3 shrink-0 text-nvr-cyan transition-transform duration-200",
|
|
59
|
-
|
|
59
|
+
c === "desc" && "rotate-180"
|
|
60
60
|
)
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function qt({
|
|
65
65
|
def: r,
|
|
66
66
|
value: s,
|
|
67
67
|
onChange: o
|
|
68
68
|
}) {
|
|
69
|
-
const [
|
|
70
|
-
|
|
71
|
-
if (!
|
|
72
|
-
const
|
|
69
|
+
const [c, m] = $(!1), [l, b] = $(""), [y, g] = $([]), [v, u] = $(!1), [p, _] = $({}), a = te(0), C = !!r.loadOptions, N = Array.isArray(s) ? s : s === "" ? [] : [s];
|
|
70
|
+
K(() => {
|
|
71
|
+
if (!C || !c) return;
|
|
72
|
+
const f = ++a.current;
|
|
73
73
|
u(!0);
|
|
74
|
-
const
|
|
74
|
+
const z = setTimeout(
|
|
75
75
|
() => {
|
|
76
|
-
var
|
|
77
|
-
(
|
|
78
|
-
a.current ===
|
|
76
|
+
var M;
|
|
77
|
+
(M = r.loadOptions) == null || M.call(r, l).then((V) => {
|
|
78
|
+
a.current === f && g(V);
|
|
79
79
|
}).catch(() => {
|
|
80
|
-
a.current ===
|
|
80
|
+
a.current === f && g([]);
|
|
81
81
|
}).finally(() => {
|
|
82
|
-
a.current ===
|
|
82
|
+
a.current === f && u(!1);
|
|
83
83
|
});
|
|
84
84
|
},
|
|
85
85
|
l ? 250 : 0
|
|
86
86
|
);
|
|
87
|
-
return () => clearTimeout(
|
|
88
|
-
}, [l,
|
|
89
|
-
const
|
|
90
|
-
var
|
|
91
|
-
return ((
|
|
92
|
-
},
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
-
|
|
87
|
+
return () => clearTimeout(z);
|
|
88
|
+
}, [l, c, C]);
|
|
89
|
+
const Y = C ? y : r.options ?? [], P = (f) => {
|
|
90
|
+
var z, M;
|
|
91
|
+
return ((z = Y.find((V) => V.value === f)) == null ? void 0 : z.label) ?? ((M = (r.options ?? []).find((V) => V.value === f)) == null ? void 0 : M.label) ?? p[f] ?? f;
|
|
92
|
+
}, E = N.length === 0 ? null : N.length === 1 ? P(N[0]) : `${P(N[0])} +${N.length - 1}`;
|
|
93
|
+
return /* @__PURE__ */ i(
|
|
94
|
+
le,
|
|
95
95
|
{
|
|
96
|
-
open:
|
|
97
|
-
onOpenChange: (
|
|
98
|
-
m(
|
|
96
|
+
open: c,
|
|
97
|
+
onOpenChange: (f) => {
|
|
98
|
+
m(f), f || b("");
|
|
99
99
|
},
|
|
100
100
|
children: [
|
|
101
|
-
/* @__PURE__ */ t(
|
|
101
|
+
/* @__PURE__ */ t(ne, { asChild: !0, children: /* @__PURE__ */ i(
|
|
102
102
|
"button",
|
|
103
103
|
{
|
|
104
104
|
type: "button",
|
|
105
105
|
className: h(
|
|
106
106
|
"flex h-8 w-40 items-center justify-between rounded-md border border-slate-200 bg-slate-50 px-2.5 text-[13px] dark:border-border dark:bg-muted/40",
|
|
107
|
-
|
|
107
|
+
E ? "text-slate-800 dark:text-foreground" : "text-slate-500"
|
|
108
108
|
),
|
|
109
109
|
children: [
|
|
110
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
|
|
110
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: E ?? r.placeholder }),
|
|
111
|
+
/* @__PURE__ */ i("span", { className: "ml-1 flex shrink-0 items-center gap-0.5", children: [
|
|
112
|
+
N.length > 0 && // biome-ignore lint/a11y/useKeyWithClickEvents: auxiliary clear affordance; Esc + reselect cover keyboard
|
|
113
113
|
/* @__PURE__ */ t(
|
|
114
114
|
"span",
|
|
115
115
|
{
|
|
116
116
|
role: "button",
|
|
117
117
|
tabIndex: -1,
|
|
118
118
|
"aria-label": "Clear filter",
|
|
119
|
-
onClick: (
|
|
120
|
-
|
|
119
|
+
onClick: (f) => {
|
|
120
|
+
f.stopPropagation(), o(r.multi ? [] : "");
|
|
121
121
|
},
|
|
122
122
|
className: "rounded p-0.5 text-slate-400 hover:text-slate-600",
|
|
123
|
-
children: /* @__PURE__ */ t(
|
|
123
|
+
children: /* @__PURE__ */ t(ae, { className: "h-3 w-3" })
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
|
-
/* @__PURE__ */ t(
|
|
126
|
+
/* @__PURE__ */ t(re, { className: "h-3 w-3 text-slate-400" })
|
|
127
127
|
] })
|
|
128
128
|
]
|
|
129
129
|
}
|
|
130
130
|
) }),
|
|
131
|
-
/* @__PURE__ */ t(
|
|
131
|
+
/* @__PURE__ */ t(se, { className: "w-[240px] p-0", align: "start", children: /* @__PURE__ */ i(Ot, { shouldFilter: !C, filter: Lt, children: [
|
|
132
132
|
/* @__PURE__ */ t(
|
|
133
|
-
|
|
133
|
+
St,
|
|
134
134
|
{
|
|
135
135
|
placeholder: "Search…",
|
|
136
136
|
className: "h-8 text-[12px]",
|
|
137
137
|
value: l,
|
|
138
|
-
onValueChange:
|
|
138
|
+
onValueChange: b
|
|
139
139
|
}
|
|
140
140
|
),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */ t(
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
return /* @__PURE__ */
|
|
146
|
-
|
|
141
|
+
/* @__PURE__ */ i($t, { children: [
|
|
142
|
+
/* @__PURE__ */ t(Ct, { className: "py-3 text-center text-[12px] text-slate-400", children: v ? "Searching…" : "No results" }),
|
|
143
|
+
Y.map((f) => {
|
|
144
|
+
const z = N.includes(f.value);
|
|
145
|
+
return /* @__PURE__ */ i(
|
|
146
|
+
zt,
|
|
147
147
|
{
|
|
148
|
-
value:
|
|
148
|
+
value: C ? f.value : f.label,
|
|
149
149
|
onSelect: () => {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
) : (o(
|
|
150
|
+
_((M) => ({ ...M, [f.value]: f.label })), r.multi ? o(
|
|
151
|
+
z ? N.filter((M) => M !== f.value) : [...N, f.value]
|
|
152
|
+
) : (o(z ? "" : f.value), m(!1));
|
|
153
153
|
},
|
|
154
154
|
className: "text-[12px]",
|
|
155
155
|
children: [
|
|
156
|
-
/* @__PURE__ */ t(
|
|
157
|
-
|
|
156
|
+
/* @__PURE__ */ t(ot, { className: h("mr-2 h-3 w-3", z ? "opacity-100" : "opacity-0") }),
|
|
157
|
+
f.label
|
|
158
158
|
]
|
|
159
159
|
},
|
|
160
|
-
|
|
160
|
+
f.value
|
|
161
161
|
);
|
|
162
162
|
})
|
|
163
163
|
] })
|
|
@@ -166,72 +166,72 @@ function jt({
|
|
|
166
166
|
}
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Bt({
|
|
170
170
|
value: r,
|
|
171
171
|
placeholder: s,
|
|
172
172
|
onChange: o
|
|
173
173
|
}) {
|
|
174
|
-
const [
|
|
175
|
-
|
|
176
|
-
if (!
|
|
177
|
-
const a =
|
|
178
|
-
y((a == null ? void 0 : a.op) ?? "on"),
|
|
179
|
-
}, [
|
|
180
|
-
const
|
|
181
|
-
|
|
174
|
+
const [c, m] = $(!1), l = Ve(r), [b, y] = $((l == null ? void 0 : l.op) ?? "on"), [g, v] = $((l == null ? void 0 : l.from) ?? ""), [u, p] = $((l == null ? void 0 : l.to) ?? "");
|
|
175
|
+
K(() => {
|
|
176
|
+
if (!c) return;
|
|
177
|
+
const a = Ve(r);
|
|
178
|
+
y((a == null ? void 0 : a.op) ?? "on"), v((a == null ? void 0 : a.from) ?? ""), p((a == null ? void 0 : a.to) ?? "");
|
|
179
|
+
}, [c, r]);
|
|
180
|
+
const _ = (a, C, N) => {
|
|
181
|
+
C && (o(ft({ op: a, from: C, to: N || C })), (a !== "between" || N) && m(!1));
|
|
182
182
|
};
|
|
183
|
-
return /* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */ t(
|
|
183
|
+
return /* @__PURE__ */ i(le, { open: c, onOpenChange: m, children: [
|
|
184
|
+
/* @__PURE__ */ t(ne, { asChild: !0, children: /* @__PURE__ */ i(
|
|
185
185
|
"button",
|
|
186
186
|
{
|
|
187
187
|
type: "button",
|
|
188
188
|
"data-date-filter": !0,
|
|
189
189
|
className: "flex h-8 w-full items-center justify-between gap-1 rounded-md border border-slate-200 bg-slate-50 px-2 text-left text-[12px] dark:border-border dark:bg-muted",
|
|
190
190
|
children: [
|
|
191
|
-
/* @__PURE__ */ t("span", { className: h("truncate", !l && "text-slate-500 dark:text-muted-foreground"), children: l ?
|
|
191
|
+
/* @__PURE__ */ t("span", { className: h("truncate", !l && "text-slate-500 dark:text-muted-foreground"), children: l ? mt(l) : s }),
|
|
192
192
|
l ? /* @__PURE__ */ t(
|
|
193
|
-
|
|
193
|
+
ae,
|
|
194
194
|
{
|
|
195
195
|
className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
|
|
196
196
|
onClick: (a) => {
|
|
197
197
|
a.stopPropagation(), o(null);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
) : /* @__PURE__ */ t(
|
|
200
|
+
) : /* @__PURE__ */ t(bt, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
|
|
201
201
|
]
|
|
202
202
|
}
|
|
203
203
|
) }),
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-1", children:
|
|
204
|
+
/* @__PURE__ */ i(se, { align: "start", className: "w-[248px] space-y-2 p-2", children: [
|
|
205
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-1", children: ut.map((a) => /* @__PURE__ */ t(
|
|
206
206
|
"button",
|
|
207
207
|
{
|
|
208
208
|
type: "button",
|
|
209
209
|
"data-date-op": a.op,
|
|
210
|
-
"aria-pressed":
|
|
210
|
+
"aria-pressed": b === a.op,
|
|
211
211
|
onClick: () => {
|
|
212
|
-
y(a.op), g &&
|
|
212
|
+
y(a.op), g && _(a.op, g, u);
|
|
213
213
|
},
|
|
214
214
|
className: h(
|
|
215
215
|
"rounded border px-1 py-1 text-[11px] leading-tight transition-colors",
|
|
216
|
-
|
|
216
|
+
b === a.op ? "border-nvr-cyan/40 bg-nvr-cyan/10 font-medium" : "border-slate-200 text-slate-600 hover:bg-muted dark:border-border dark:text-muted-foreground"
|
|
217
217
|
),
|
|
218
218
|
children: a.label
|
|
219
219
|
},
|
|
220
220
|
a.op
|
|
221
221
|
)) }),
|
|
222
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
223
223
|
/* @__PURE__ */ t(
|
|
224
224
|
"input",
|
|
225
225
|
{
|
|
226
226
|
type: "date",
|
|
227
227
|
value: g,
|
|
228
228
|
onChange: (a) => {
|
|
229
|
-
|
|
229
|
+
v(a.target.value), b !== "between" && _(b, a.target.value, "");
|
|
230
230
|
},
|
|
231
231
|
className: "h-7 flex-1 rounded border border-slate-200 bg-background px-1 text-[12px] dark:border-border"
|
|
232
232
|
}
|
|
233
233
|
),
|
|
234
|
-
|
|
234
|
+
b === "between" && /* @__PURE__ */ i(Q, { children: [
|
|
235
235
|
/* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", children: "to" }),
|
|
236
236
|
/* @__PURE__ */ t(
|
|
237
237
|
"input",
|
|
@@ -239,7 +239,7 @@ function At({
|
|
|
239
239
|
type: "date",
|
|
240
240
|
value: u,
|
|
241
241
|
onChange: (a) => {
|
|
242
|
-
|
|
242
|
+
p(a.target.value), _("between", g, a.target.value);
|
|
243
243
|
},
|
|
244
244
|
className: "h-7 flex-1 rounded border border-slate-200 bg-background px-1 text-[12px] dark:border-border"
|
|
245
245
|
}
|
|
@@ -249,15 +249,15 @@ function At({
|
|
|
249
249
|
] })
|
|
250
250
|
] });
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function Ut({
|
|
253
253
|
value: r,
|
|
254
254
|
placeholder: s,
|
|
255
255
|
unit: o,
|
|
256
|
-
onChange:
|
|
256
|
+
onChange: c
|
|
257
257
|
}) {
|
|
258
|
-
const [m, l] =
|
|
259
|
-
return /* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */ t(
|
|
258
|
+
const [m, l] = $(!1), [b, y] = r.split(":"), g = o ?? "", v = b && y ? `${b}–${y}${g}` : b ? `${b}${g}+` : y ? `≤ ${y}${g}` : s, u = (p, _) => c(p === "" && _ === "" ? null : `${p}:${_}`);
|
|
259
|
+
return /* @__PURE__ */ i(le, { open: m, onOpenChange: l, children: [
|
|
260
|
+
/* @__PURE__ */ t(ne, { asChild: !0, children: /* @__PURE__ */ i(
|
|
261
261
|
"button",
|
|
262
262
|
{
|
|
263
263
|
type: "button",
|
|
@@ -267,45 +267,45 @@ function Lt({
|
|
|
267
267
|
/* @__PURE__ */ t(
|
|
268
268
|
"span",
|
|
269
269
|
{
|
|
270
|
-
className: h("truncate", !
|
|
271
|
-
children:
|
|
270
|
+
className: h("truncate", !b && !y && "text-slate-500 dark:text-muted-foreground"),
|
|
271
|
+
children: v
|
|
272
272
|
}
|
|
273
273
|
),
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
b || y ? /* @__PURE__ */ t(
|
|
275
|
+
ae,
|
|
276
276
|
{
|
|
277
277
|
className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
|
|
278
|
-
onClick: (
|
|
279
|
-
|
|
278
|
+
onClick: (p) => {
|
|
279
|
+
p.stopPropagation(), c(null);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
) : /* @__PURE__ */ t(
|
|
282
|
+
) : /* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
|
|
283
283
|
]
|
|
284
284
|
}
|
|
285
285
|
) }),
|
|
286
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ i(se, { align: "start", className: "w-[200px] p-2", children: [
|
|
287
287
|
/* @__PURE__ */ t("p", { className: "pb-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: s }),
|
|
288
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
289
289
|
/* @__PURE__ */ t(
|
|
290
|
-
|
|
290
|
+
L,
|
|
291
291
|
{
|
|
292
292
|
type: "number",
|
|
293
293
|
"aria-label": `Minimum ${s}`,
|
|
294
294
|
placeholder: "Min",
|
|
295
|
-
value:
|
|
296
|
-
onChange: (
|
|
295
|
+
value: b ?? "",
|
|
296
|
+
onChange: (p) => u(p.target.value, y ?? ""),
|
|
297
297
|
className: "h-7 text-[12px]"
|
|
298
298
|
}
|
|
299
299
|
),
|
|
300
300
|
/* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", children: "–" }),
|
|
301
301
|
/* @__PURE__ */ t(
|
|
302
|
-
|
|
302
|
+
L,
|
|
303
303
|
{
|
|
304
304
|
type: "number",
|
|
305
305
|
"aria-label": `Maximum ${s}`,
|
|
306
306
|
placeholder: "Max",
|
|
307
307
|
value: y ?? "",
|
|
308
|
-
onChange: (
|
|
308
|
+
onChange: (p) => u(b ?? "", p.target.value),
|
|
309
309
|
className: "h-7 text-[12px]"
|
|
310
310
|
}
|
|
311
311
|
)
|
|
@@ -313,80 +313,80 @@ function Lt({
|
|
|
313
313
|
] })
|
|
314
314
|
] });
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Dt({
|
|
317
317
|
value: r,
|
|
318
318
|
placeholder: s,
|
|
319
319
|
onChange: o
|
|
320
320
|
}) {
|
|
321
|
-
const [
|
|
322
|
-
|
|
323
|
-
if (!
|
|
324
|
-
const a =
|
|
325
|
-
y((a == null ? void 0 : a.op) ?? "eq"),
|
|
326
|
-
}, [
|
|
327
|
-
const
|
|
328
|
-
|
|
321
|
+
const [c, m] = $(!1), l = Ae(r), [b, y] = $((l == null ? void 0 : l.op) ?? "eq"), [g, v] = $(l ? String(l.a) : ""), [u, p] = $((l == null ? void 0 : l.b) != null ? String(l.b) : "");
|
|
322
|
+
K(() => {
|
|
323
|
+
if (!c) return;
|
|
324
|
+
const a = Ae(r);
|
|
325
|
+
y((a == null ? void 0 : a.op) ?? "eq"), v(a ? String(a.a) : ""), p((a == null ? void 0 : a.b) != null ? String(a.b) : "");
|
|
326
|
+
}, [c, r]);
|
|
327
|
+
const _ = (a, C, N) => {
|
|
328
|
+
C === "" || Number.isNaN(Number(C)) || a === "between" && (N === "" || Number.isNaN(Number(N))) || o(gt({ op: a, a: Number(C), b: N === "" ? void 0 : Number(N) }));
|
|
329
329
|
};
|
|
330
|
-
return /* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */ t(
|
|
330
|
+
return /* @__PURE__ */ i(le, { open: c, onOpenChange: m, children: [
|
|
331
|
+
/* @__PURE__ */ t(ne, { asChild: !0, children: /* @__PURE__ */ i(
|
|
332
332
|
"button",
|
|
333
333
|
{
|
|
334
334
|
type: "button",
|
|
335
335
|
"data-number-filter": !0,
|
|
336
336
|
className: "flex h-8 w-full items-center justify-between gap-1 rounded-md border border-slate-200 bg-slate-50 px-2 text-left text-[12px] dark:border-border dark:bg-muted",
|
|
337
337
|
children: [
|
|
338
|
-
/* @__PURE__ */ t("span", { className: h("truncate", !l && "text-slate-500 dark:text-muted-foreground"), children: l ?
|
|
338
|
+
/* @__PURE__ */ t("span", { className: h("truncate", !l && "text-slate-500 dark:text-muted-foreground"), children: l ? xt(l) : s }),
|
|
339
339
|
l ? /* @__PURE__ */ t(
|
|
340
|
-
|
|
340
|
+
ae,
|
|
341
341
|
{
|
|
342
342
|
className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
|
|
343
343
|
onClick: (a) => {
|
|
344
344
|
a.stopPropagation(), o(null);
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
) : /* @__PURE__ */ t(
|
|
347
|
+
) : /* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
|
|
348
348
|
]
|
|
349
349
|
}
|
|
350
350
|
) }),
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-1", children:
|
|
351
|
+
/* @__PURE__ */ i(se, { align: "start", className: "w-[220px] space-y-2 p-2", children: [
|
|
352
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-1", children: yt.map((a) => /* @__PURE__ */ t(
|
|
353
353
|
"button",
|
|
354
354
|
{
|
|
355
355
|
type: "button",
|
|
356
356
|
"data-number-op": a.op,
|
|
357
|
-
"aria-pressed":
|
|
357
|
+
"aria-pressed": b === a.op,
|
|
358
358
|
onClick: () => {
|
|
359
|
-
y(a.op),
|
|
359
|
+
y(a.op), _(a.op, g, u);
|
|
360
360
|
},
|
|
361
361
|
className: h(
|
|
362
362
|
"rounded border px-1 py-1 text-[11px] transition-colors",
|
|
363
|
-
|
|
363
|
+
b === a.op ? "border-nvr-cyan/40 bg-nvr-cyan/10 font-medium" : "border-slate-200 text-slate-600 hover:bg-muted dark:border-border dark:text-muted-foreground"
|
|
364
364
|
),
|
|
365
365
|
children: a.symbol
|
|
366
366
|
},
|
|
367
367
|
a.op
|
|
368
368
|
)) }),
|
|
369
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
370
370
|
/* @__PURE__ */ t(
|
|
371
|
-
|
|
371
|
+
L,
|
|
372
372
|
{
|
|
373
373
|
type: "number",
|
|
374
374
|
value: g,
|
|
375
375
|
onChange: (a) => {
|
|
376
|
-
|
|
376
|
+
v(a.target.value), _(b, a.target.value, u);
|
|
377
377
|
},
|
|
378
378
|
className: "h-7 text-[12px]"
|
|
379
379
|
}
|
|
380
380
|
),
|
|
381
|
-
|
|
381
|
+
b === "between" && /* @__PURE__ */ i(Q, { children: [
|
|
382
382
|
/* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", children: "–" }),
|
|
383
383
|
/* @__PURE__ */ t(
|
|
384
|
-
|
|
384
|
+
L,
|
|
385
385
|
{
|
|
386
386
|
type: "number",
|
|
387
387
|
value: u,
|
|
388
388
|
onChange: (a) => {
|
|
389
|
-
|
|
389
|
+
p(a.target.value), _(b, g, a.target.value);
|
|
390
390
|
},
|
|
391
391
|
className: "h-7 text-[12px]"
|
|
392
392
|
}
|
|
@@ -396,68 +396,68 @@ function Vt({
|
|
|
396
396
|
] })
|
|
397
397
|
] });
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function Je({
|
|
400
400
|
def: r,
|
|
401
401
|
value: s,
|
|
402
402
|
onChange: o,
|
|
403
|
-
layout:
|
|
403
|
+
layout: c = "inline"
|
|
404
404
|
}) {
|
|
405
|
-
const m =
|
|
406
|
-
let
|
|
405
|
+
const m = c === "stacked", l = c === "cell", b = typeof s == "string" ? s : "", y = m || l ? "w-full" : "w-40", g = l ? "h-7 text-[12px]" : "text-[13px]";
|
|
406
|
+
let v;
|
|
407
407
|
if (r.type === "text")
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
v = /* @__PURE__ */ t(
|
|
409
|
+
L,
|
|
410
410
|
{
|
|
411
411
|
className: h("h-8 border-slate-200 bg-slate-50", g, y),
|
|
412
412
|
placeholder: r.placeholder,
|
|
413
|
-
value:
|
|
413
|
+
value: b,
|
|
414
414
|
onChange: (u) => o(u.target.value)
|
|
415
415
|
}
|
|
416
416
|
);
|
|
417
417
|
else if (r.type === "combobox")
|
|
418
|
-
|
|
418
|
+
v = /* @__PURE__ */ t(
|
|
419
419
|
"div",
|
|
420
420
|
{
|
|
421
421
|
className: h(
|
|
422
422
|
(m || l) && "[&>button]:w-full",
|
|
423
423
|
l && "[&>button]:h-7 [&>button]:min-w-[88px] [&>button]:px-1.5 [&>button]:text-[12px]"
|
|
424
424
|
),
|
|
425
|
-
children: /* @__PURE__ */ t(
|
|
425
|
+
children: /* @__PURE__ */ t(qt, { def: r, value: s, onChange: o })
|
|
426
426
|
}
|
|
427
427
|
);
|
|
428
428
|
else if (r.type === "date")
|
|
429
|
-
|
|
430
|
-
|
|
429
|
+
v = /* @__PURE__ */ t("div", { className: h(l && "[&>div>button]:h-7 [&>div>button]:text-[12px]", y), children: /* @__PURE__ */ t(
|
|
430
|
+
Bt,
|
|
431
431
|
{
|
|
432
|
-
value:
|
|
432
|
+
value: b,
|
|
433
433
|
placeholder: r.placeholder,
|
|
434
434
|
onChange: (u) => o(u ?? "")
|
|
435
435
|
}
|
|
436
436
|
) });
|
|
437
437
|
else if (r.type === "number")
|
|
438
|
-
|
|
439
|
-
|
|
438
|
+
v = /* @__PURE__ */ t("div", { className: h(l && "[&>div>button]:h-7 [&>div>button]:text-[12px]", y), children: /* @__PURE__ */ t(
|
|
439
|
+
Dt,
|
|
440
440
|
{
|
|
441
|
-
value:
|
|
441
|
+
value: b,
|
|
442
442
|
placeholder: r.placeholder,
|
|
443
443
|
onChange: (u) => o(u ?? "")
|
|
444
444
|
}
|
|
445
445
|
) });
|
|
446
446
|
else if (r.type === "range" && l)
|
|
447
|
-
|
|
448
|
-
|
|
447
|
+
v = /* @__PURE__ */ t("div", { className: "[&>div>button]:h-7 [&>div>button]:text-[12px] w-full", children: /* @__PURE__ */ t(
|
|
448
|
+
Ut,
|
|
449
449
|
{
|
|
450
|
-
value:
|
|
450
|
+
value: b,
|
|
451
451
|
placeholder: r.placeholder,
|
|
452
452
|
unit: r.range_unit,
|
|
453
453
|
onChange: (u) => o(u ?? "")
|
|
454
454
|
}
|
|
455
455
|
) });
|
|
456
456
|
else if (r.type === "range") {
|
|
457
|
-
const [u,
|
|
458
|
-
|
|
457
|
+
const [u, p] = b.split(":");
|
|
458
|
+
v = /* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
459
459
|
/* @__PURE__ */ t(
|
|
460
|
-
|
|
460
|
+
L,
|
|
461
461
|
{
|
|
462
462
|
type: "number",
|
|
463
463
|
className: h(
|
|
@@ -467,12 +467,12 @@ function qe({
|
|
|
467
467
|
),
|
|
468
468
|
placeholder: "Min",
|
|
469
469
|
value: u ?? "",
|
|
470
|
-
onChange: (
|
|
470
|
+
onChange: (_) => o(`${_.target.value}:${p ?? ""}`)
|
|
471
471
|
}
|
|
472
472
|
),
|
|
473
473
|
/* @__PURE__ */ t("span", { className: "text-[12px] text-slate-400", children: "–" }),
|
|
474
474
|
/* @__PURE__ */ t(
|
|
475
|
-
|
|
475
|
+
L,
|
|
476
476
|
{
|
|
477
477
|
type: "number",
|
|
478
478
|
className: h(
|
|
@@ -481,22 +481,22 @@ function qe({
|
|
|
481
481
|
m || l ? "w-full min-w-[48px]" : "w-20"
|
|
482
482
|
),
|
|
483
483
|
placeholder: "Max",
|
|
484
|
-
value:
|
|
485
|
-
onChange: (
|
|
484
|
+
value: p ?? "",
|
|
485
|
+
onChange: (_) => o(`${u ?? ""}:${_.target.value}`)
|
|
486
486
|
}
|
|
487
487
|
)
|
|
488
488
|
] });
|
|
489
489
|
} else
|
|
490
|
-
|
|
491
|
-
/* @__PURE__ */ t(
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
-
/* @__PURE__ */ t(
|
|
494
|
-
(r.options ?? []).filter((
|
|
490
|
+
v = /* @__PURE__ */ i(Tt, { value: b === "" ? "__all__" : b, onValueChange: (p) => o(p === "__all__" ? "" : p), children: [
|
|
491
|
+
/* @__PURE__ */ t(Et, { className: h("h-8 border-slate-200 bg-slate-50", g, y), children: /* @__PURE__ */ t(Mt, { placeholder: r.placeholder }) }),
|
|
492
|
+
/* @__PURE__ */ i(jt, { children: [
|
|
493
|
+
/* @__PURE__ */ t(Fe, { value: "__all__", children: r.placeholder }),
|
|
494
|
+
(r.options ?? []).filter((p) => p.value !== "").map((p) => /* @__PURE__ */ t(Fe, { value: p.value, children: p.label }, p.value))
|
|
495
495
|
] })
|
|
496
496
|
] });
|
|
497
|
-
return m ? /* @__PURE__ */
|
|
498
|
-
/* @__PURE__ */
|
|
499
|
-
|
|
497
|
+
return m ? /* @__PURE__ */ i("div", { className: "space-y-1", children: [
|
|
498
|
+
/* @__PURE__ */ i("span", { className: "flex items-center gap-1.5 text-[11px] font-medium text-slate-500 dark:text-muted-foreground", children: [
|
|
499
|
+
Jt(r),
|
|
500
500
|
r.restricted && /* @__PURE__ */ t(
|
|
501
501
|
"span",
|
|
502
502
|
{
|
|
@@ -506,229 +506,248 @@ function qe({
|
|
|
506
506
|
}
|
|
507
507
|
)
|
|
508
508
|
] }),
|
|
509
|
-
|
|
509
|
+
v
|
|
510
510
|
] }) : r.restricted ? /* @__PURE__ */ t(
|
|
511
511
|
"div",
|
|
512
512
|
{
|
|
513
513
|
title: "Options limited to your restricted scope",
|
|
514
514
|
className: "[&_button]:!border-amber-400 [&_input]:!border-amber-400 dark:[&_button]:!border-amber-500/60 dark:[&_input]:!border-amber-500/60",
|
|
515
|
-
children:
|
|
515
|
+
children: v
|
|
516
516
|
}
|
|
517
|
-
) : /* @__PURE__ */ t(
|
|
517
|
+
) : /* @__PURE__ */ t(Q, { children: v });
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function Jt(r) {
|
|
520
520
|
return r.placeholder.replace(/^Search\s+/i, "").replace(/[…]|\.{3}$/g, "");
|
|
521
521
|
}
|
|
522
|
-
function
|
|
523
|
-
const o = (
|
|
522
|
+
function dr(r, s) {
|
|
523
|
+
const o = (c) => {
|
|
524
524
|
var m, l;
|
|
525
|
-
return ((l = (m = r.options) == null ? void 0 : m.find((
|
|
525
|
+
return ((l = (m = r.options) == null ? void 0 : m.find((b) => b.value === c)) == null ? void 0 : l.label) ?? c;
|
|
526
526
|
};
|
|
527
527
|
if (Array.isArray(s)) {
|
|
528
|
-
const
|
|
529
|
-
return
|
|
528
|
+
const c = s.map(o);
|
|
529
|
+
return c.slice(0, 2).join(", ") + (c.length > 2 ? ` +${c.length - 2}` : "");
|
|
530
530
|
}
|
|
531
531
|
if (r.type === "range") {
|
|
532
|
-
const [
|
|
533
|
-
return [
|
|
532
|
+
const [c, m] = s.split(":");
|
|
533
|
+
return [c && `≥${c}`, m && `≤${m}`].filter(Boolean).join(" ");
|
|
534
534
|
}
|
|
535
535
|
return o(s);
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function cr({
|
|
538
538
|
columns: r,
|
|
539
539
|
rows: s,
|
|
540
540
|
rowKey: o,
|
|
541
|
-
total:
|
|
541
|
+
total: c,
|
|
542
542
|
page: m,
|
|
543
543
|
limit: l = 25,
|
|
544
|
-
isLoading:
|
|
544
|
+
isLoading: b,
|
|
545
545
|
isError: y,
|
|
546
546
|
errorMessage: g,
|
|
547
|
-
onRetry:
|
|
547
|
+
onRetry: v,
|
|
548
548
|
sort: u = "",
|
|
549
|
-
onSortChange:
|
|
550
|
-
onPageChange:
|
|
549
|
+
onSortChange: p,
|
|
550
|
+
onPageChange: _,
|
|
551
551
|
onRowClick: a,
|
|
552
|
-
onRowContextMenu:
|
|
553
|
-
searchValue:
|
|
554
|
-
onSearchChange:
|
|
555
|
-
searchPlaceholder:
|
|
556
|
-
filterDefs:
|
|
557
|
-
filterValues:
|
|
558
|
-
onFilterChange:
|
|
559
|
-
toolbarRight:
|
|
560
|
-
emptyMessage:
|
|
561
|
-
minBodyHeight:
|
|
562
|
-
fillHeight:
|
|
563
|
-
footer:
|
|
564
|
-
hideFilterRow:
|
|
565
|
-
nowrapCells:
|
|
566
|
-
density:
|
|
567
|
-
pinFirstColumn:
|
|
568
|
-
columnPins:
|
|
569
|
-
onColumnPinChange:
|
|
570
|
-
columnFilterRow:
|
|
571
|
-
hScrollProxy:
|
|
572
|
-
selectedIds:
|
|
573
|
-
onSelectionChange:
|
|
574
|
-
rowClassName:
|
|
575
|
-
rowDragProps:
|
|
576
|
-
rowTitle:
|
|
577
|
-
enterKey:
|
|
578
|
-
rowGroups:
|
|
579
|
-
collapsedGroups:
|
|
580
|
-
onToggleGroup:
|
|
552
|
+
onRowContextMenu: C,
|
|
553
|
+
searchValue: N,
|
|
554
|
+
onSearchChange: Y,
|
|
555
|
+
searchPlaceholder: P = "Search…",
|
|
556
|
+
filterDefs: E,
|
|
557
|
+
filterValues: f = {},
|
|
558
|
+
onFilterChange: z,
|
|
559
|
+
toolbarRight: M,
|
|
560
|
+
emptyMessage: V = "No records found.",
|
|
561
|
+
minBodyHeight: U,
|
|
562
|
+
fillHeight: ie = !1,
|
|
563
|
+
footer: Re,
|
|
564
|
+
hideFilterRow: He = !1,
|
|
565
|
+
nowrapCells: Xe = !1,
|
|
566
|
+
density: de = "comfortable",
|
|
567
|
+
pinFirstColumn: W = !1,
|
|
568
|
+
columnPins: x,
|
|
569
|
+
onColumnPinChange: ce,
|
|
570
|
+
columnFilterRow: Qe = !1,
|
|
571
|
+
hScrollProxy: Ne = !1,
|
|
572
|
+
selectedIds: j,
|
|
573
|
+
onSelectionChange: T,
|
|
574
|
+
rowClassName: oe,
|
|
575
|
+
rowDragProps: be,
|
|
576
|
+
rowTitle: pe,
|
|
577
|
+
enterKey: Ye,
|
|
578
|
+
rowGroups: A,
|
|
579
|
+
collapsedGroups: D,
|
|
580
|
+
onToggleGroup: he,
|
|
581
|
+
onRowFocus: J,
|
|
582
|
+
activeRowKey: G,
|
|
583
|
+
rowAriaLabel: me
|
|
581
584
|
}) {
|
|
582
|
-
const
|
|
583
|
-
!e.sortable || !
|
|
584
|
-
},
|
|
585
|
-
if (!
|
|
586
|
-
const e = r.filter((
|
|
587
|
-
return [...e, ...
|
|
588
|
-
}, [r,
|
|
589
|
-
|
|
590
|
-
const e =
|
|
591
|
-
if (!
|
|
592
|
-
const
|
|
593
|
-
if (
|
|
594
|
-
const
|
|
595
|
-
return
|
|
596
|
-
}, [
|
|
597
|
-
const [
|
|
598
|
-
|
|
599
|
-
const e =
|
|
600
|
-
if (!
|
|
601
|
-
const
|
|
602
|
-
return
|
|
603
|
-
}, [
|
|
604
|
-
var
|
|
605
|
-
if (!
|
|
606
|
-
const e = (
|
|
607
|
-
var
|
|
608
|
-
return ((
|
|
609
|
-
},
|
|
610
|
-
|
|
611
|
-
|
|
585
|
+
const we = Math.ceil(c / l), Ze = (m - 1) * l + 1, Ie = Math.min(m * l, c), _e = !He && E && E.length > 0, Ke = N !== void 0 || _e || M !== void 0, Oe = (e) => {
|
|
586
|
+
!e.sortable || !p || p(Wt(u, e.key));
|
|
587
|
+
}, S = x !== void 0, F = je(() => {
|
|
588
|
+
if (!S || !x) return r;
|
|
589
|
+
const e = r.filter((O) => x[O.key] === "left"), n = r.filter((O) => x[O.key] === "right"), d = r.filter((O) => !x[O.key]);
|
|
590
|
+
return [...e, ...d, ...n];
|
|
591
|
+
}, [r, x, S]), Se = te({}), Z = te(null), $e = te(null), Ce = !b && (A ? A.length === 0 : s.length === 0), [ze, Pe] = $(null);
|
|
592
|
+
K(() => {
|
|
593
|
+
const e = Z.current;
|
|
594
|
+
if (!Ce || !e) return;
|
|
595
|
+
const n = () => Pe(e.clientWidth);
|
|
596
|
+
if (n(), typeof ResizeObserver > "u") return;
|
|
597
|
+
const d = new ResizeObserver(n);
|
|
598
|
+
return d.observe(e), () => d.disconnect();
|
|
599
|
+
}, [Ce]);
|
|
600
|
+
const [Te, Ge] = $({}), [, et] = $(0);
|
|
601
|
+
K(() => {
|
|
602
|
+
const e = Z.current;
|
|
603
|
+
if (!S || !e || typeof ResizeObserver > "u") return;
|
|
604
|
+
const n = new ResizeObserver(() => et(e.clientWidth));
|
|
605
|
+
return n.observe(e), () => n.disconnect();
|
|
606
|
+
}, [S, b]), ht(() => {
|
|
607
|
+
var R, Me;
|
|
608
|
+
if (!S || !x) return;
|
|
609
|
+
const e = (w) => {
|
|
610
|
+
var B;
|
|
611
|
+
return ((B = Se.current[w]) == null ? void 0 : B.getBoundingClientRect().width) ?? 120;
|
|
612
|
+
}, n = T ? ((R = $e.current) == null ? void 0 : R.getBoundingClientRect().width) ?? 40 : 0, { left: d, right: O } = vt(
|
|
613
|
+
F.filter((w) => x[w.key] === "left").map((w) => w.key),
|
|
614
|
+
F.filter((w) => x[w.key] === "right").map((w) => w.key),
|
|
612
615
|
e,
|
|
613
|
-
|
|
614
|
-
((
|
|
615
|
-
),
|
|
616
|
-
let
|
|
617
|
-
|
|
618
|
-
|
|
616
|
+
n,
|
|
617
|
+
((Me = Z.current) == null ? void 0 : Me.clientWidth) ?? 0
|
|
618
|
+
), q = {};
|
|
619
|
+
let I = n;
|
|
620
|
+
d.forEach((w, B) => {
|
|
621
|
+
q[w] = { side: "left", offset: Math.floor(I), seam: B === d.length - 1 }, I += e(w);
|
|
619
622
|
});
|
|
620
|
-
let
|
|
621
|
-
for (let
|
|
622
|
-
const
|
|
623
|
-
|
|
623
|
+
let k = 0;
|
|
624
|
+
for (let w = O.length - 1; w >= 0; w--) {
|
|
625
|
+
const B = O[w];
|
|
626
|
+
q[B] = { side: "right", offset: Math.floor(k), seam: w === 0 }, k += e(B);
|
|
624
627
|
}
|
|
625
|
-
|
|
628
|
+
Ge((w) => JSON.stringify(w) === JSON.stringify(q) ? w : q);
|
|
626
629
|
});
|
|
627
|
-
const
|
|
628
|
-
const
|
|
629
|
-
if (!(!
|
|
630
|
-
return
|
|
631
|
-
},
|
|
632
|
-
const
|
|
633
|
-
if (!(!
|
|
630
|
+
const ue = (e) => {
|
|
631
|
+
const n = Te[e];
|
|
632
|
+
if (!(!S || !n))
|
|
633
|
+
return n.side === "left" ? { left: n.offset } : { right: n.offset };
|
|
634
|
+
}, fe = (e, n) => {
|
|
635
|
+
const d = Te[e];
|
|
636
|
+
if (!(!S || !d))
|
|
634
637
|
return h(
|
|
635
638
|
// dt-pinned: pinned headers offset via inline style (not left-0), so the
|
|
636
639
|
// fillHeight wrapper's z variants need a CLASS to elevate them above the
|
|
637
640
|
// other header cells — same-z siblings paint in DOM order and a later
|
|
638
641
|
// header scrolls OVER the pinned one otherwise.
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
+
n ? "dt-pinned sticky z-[2]" : "sticky z-[1] bg-inherit",
|
|
643
|
+
d.side === "left" && d.seam && "border-r border-slate-200 dark:border-border",
|
|
644
|
+
d.side === "right" && d.seam && "border-l border-slate-200 dark:border-border"
|
|
642
645
|
);
|
|
643
|
-
},
|
|
644
|
-
if (!
|
|
645
|
-
const
|
|
646
|
-
|
|
647
|
-
},
|
|
646
|
+
}, tt = (e) => {
|
|
647
|
+
if (!ce) return;
|
|
648
|
+
const n = (x == null ? void 0 : x[e]) ?? null;
|
|
649
|
+
ce(e, n === null ? "left" : n === "left" ? "right" : null);
|
|
650
|
+
}, rt = je(() => {
|
|
648
651
|
const e = /* @__PURE__ */ new Map();
|
|
649
|
-
for (const
|
|
652
|
+
for (const n of E ?? []) e.set(n.key, n);
|
|
650
653
|
return e;
|
|
651
|
-
}, [
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
654
|
+
}, [E]), at = Qe && ((E == null ? void 0 : E.length) ?? 0) > 0, lt = (() => {
|
|
655
|
+
if (!J) return null;
|
|
656
|
+
const e = A ? A.flatMap((d) => D != null && D.has(d.key) ? [] : d.rows) : s, n = (d, O) => o ? o(d, O) : String(O);
|
|
657
|
+
return G && e.some((d, O) => n(d, O) === G) ? G : e.length > 0 ? n(e[0], 0) : null;
|
|
658
|
+
})(), Ee = (e, n) => {
|
|
659
|
+
const d = o ? o(e, n) : String(n), O = (j == null ? void 0 : j.includes(d)) ?? !1, q = !!J, I = q && d === lt;
|
|
660
|
+
return /* @__PURE__ */ i(
|
|
661
|
+
H,
|
|
655
662
|
{
|
|
656
|
-
...
|
|
663
|
+
...be == null ? void 0 : be(e),
|
|
657
664
|
className: h(
|
|
658
665
|
// NAMED group: queue cells already use bare `group-hover:` against
|
|
659
666
|
// their own local group, and claiming the unnamed one here would
|
|
660
667
|
// make those reveal on row hover instead.
|
|
661
668
|
"group/row nvr-row-enter border-slate-100 transition-colors duration-150",
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
669
|
+
J && "focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-nvr-cyan",
|
|
670
|
+
(W || S) && "bg-white dark:bg-card",
|
|
671
|
+
a && (W || S ? "cursor-pointer hover:bg-slate-50 dark:hover:bg-muted" : "cursor-pointer hover:bg-slate-50/80"),
|
|
672
|
+
oe == null ? void 0 : oe(e),
|
|
665
673
|
// Pinned sticky cells use bg-inherit, so a selected row's bg must be
|
|
666
674
|
// OPAQUE or horizontally-scrolled content bleeds through the pinned
|
|
667
675
|
// column. bg-nvr-cyan/5 is semi-transparent — use an opaque equivalent
|
|
668
676
|
// (5% nvr-cyan #00ceff over white / card) when pinning.
|
|
669
|
-
|
|
677
|
+
O && (W || S ? "bg-[#f2fdff] dark:bg-[#20303a]" : "bg-nvr-cyan/5")
|
|
670
678
|
),
|
|
671
|
-
style: { animationDelay: `${Math.min(
|
|
672
|
-
"data-row-key":
|
|
673
|
-
title:
|
|
679
|
+
style: { animationDelay: `${Math.min(n, 14) * 16}ms` },
|
|
680
|
+
"data-row-key": d,
|
|
681
|
+
title: pe == null ? void 0 : pe(e),
|
|
674
682
|
onClick: () => a == null ? void 0 : a(e),
|
|
675
|
-
onContextMenu:
|
|
683
|
+
onContextMenu: C ? (k) => C(e, k) : void 0,
|
|
684
|
+
...q ? {
|
|
685
|
+
tabIndex: I ? 0 : -1,
|
|
686
|
+
"aria-current": I && G === d ? "true" : void 0,
|
|
687
|
+
"aria-label": me == null ? void 0 : me(e),
|
|
688
|
+
onFocus: (k) => {
|
|
689
|
+
k.target === k.currentTarget && (J == null || J(e));
|
|
690
|
+
},
|
|
691
|
+
onKeyDown: (k) => {
|
|
692
|
+
k.key !== "Enter" || k.target !== k.currentTarget || !a || (k.preventDefault(), a(e));
|
|
693
|
+
}
|
|
694
|
+
} : {},
|
|
676
695
|
children: [
|
|
677
|
-
|
|
678
|
-
|
|
696
|
+
T && /* @__PURE__ */ t(
|
|
697
|
+
ee,
|
|
679
698
|
{
|
|
680
699
|
className: h(
|
|
681
700
|
"w-9 px-3",
|
|
682
|
-
|
|
683
|
-
(
|
|
701
|
+
de === "compact" ? "py-1" : "py-2",
|
|
702
|
+
(W || S) && "sticky left-0 z-[1] min-w-[40px] bg-inherit"
|
|
684
703
|
),
|
|
685
|
-
onClick: (
|
|
686
|
-
|
|
704
|
+
onClick: (k) => {
|
|
705
|
+
k.stopPropagation(), T(O ? (j == null ? void 0 : j.filter((R) => R !== d)) ?? [] : [...j ?? [], d]);
|
|
687
706
|
},
|
|
688
|
-
children: /* @__PURE__ */ t(
|
|
707
|
+
children: /* @__PURE__ */ t(Le, { checked: O, "aria-label": "Select row" })
|
|
689
708
|
}
|
|
690
709
|
),
|
|
691
|
-
|
|
692
|
-
|
|
710
|
+
F.map((k, R) => /* @__PURE__ */ t(
|
|
711
|
+
ee,
|
|
693
712
|
{
|
|
694
|
-
style:
|
|
713
|
+
style: ue(k.key),
|
|
695
714
|
className: h(
|
|
696
715
|
"px-3",
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
!
|
|
716
|
+
de === "compact" ? "py-1" : "py-2",
|
|
717
|
+
Xe && "whitespace-nowrap",
|
|
718
|
+
!S && W && R === 0 && h(
|
|
700
719
|
"sticky z-[1] border-r border-slate-100 bg-inherit dark:border-border",
|
|
701
|
-
|
|
720
|
+
T ? "left-[39px]" : "left-0"
|
|
702
721
|
),
|
|
703
|
-
|
|
704
|
-
|
|
722
|
+
fe(k.key, !1),
|
|
723
|
+
k.className
|
|
705
724
|
),
|
|
706
|
-
children:
|
|
725
|
+
children: k.render ? k.render(e, n) : String(e[k.key] ?? "—")
|
|
707
726
|
},
|
|
708
|
-
|
|
727
|
+
k.key
|
|
709
728
|
))
|
|
710
729
|
]
|
|
711
730
|
},
|
|
712
|
-
|
|
731
|
+
d
|
|
713
732
|
);
|
|
714
733
|
};
|
|
715
|
-
return /* @__PURE__ */
|
|
716
|
-
/* @__PURE__ */ t(
|
|
717
|
-
y && g && /* @__PURE__ */
|
|
734
|
+
return /* @__PURE__ */ i(Q, { children: [
|
|
735
|
+
/* @__PURE__ */ t(kt, {}),
|
|
736
|
+
y && g && /* @__PURE__ */ i(
|
|
718
737
|
"div",
|
|
719
738
|
{
|
|
720
739
|
role: "alert",
|
|
721
740
|
className: "mb-4 flex flex-wrap items-center gap-x-3 gap-y-1 rounded-md border border-red-200 bg-red-50 px-4 py-2.5 text-[13px] text-red-700 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-300",
|
|
722
741
|
children: [
|
|
723
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ i("span", { children: [
|
|
724
743
|
g,
|
|
725
744
|
s.length > 0 && " Showing the last list that loaded."
|
|
726
745
|
] }),
|
|
727
|
-
|
|
746
|
+
v && /* @__PURE__ */ t(
|
|
728
747
|
"button",
|
|
729
748
|
{
|
|
730
749
|
type: "button",
|
|
731
|
-
onClick:
|
|
750
|
+
onClick: v,
|
|
732
751
|
className: "font-medium underline underline-offset-2 hover:text-red-900 dark:hover:text-red-200",
|
|
733
752
|
children: "Try again"
|
|
734
753
|
}
|
|
@@ -736,40 +755,40 @@ function nr({
|
|
|
736
755
|
]
|
|
737
756
|
}
|
|
738
757
|
),
|
|
739
|
-
/* @__PURE__ */
|
|
758
|
+
/* @__PURE__ */ i(
|
|
740
759
|
"div",
|
|
741
760
|
{
|
|
742
761
|
className: h(
|
|
743
762
|
"overflow-hidden rounded-lg border border-slate-200 bg-white",
|
|
744
|
-
|
|
763
|
+
ie && "flex h-full min-h-0 flex-col"
|
|
745
764
|
),
|
|
746
765
|
children: [
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
/* @__PURE__ */ t(
|
|
766
|
+
Ke && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2 border-b border-slate-100 px-3 py-2.5", children: [
|
|
767
|
+
Y !== void 0 && /* @__PURE__ */ i("div", { className: "relative min-w-0 max-w-full", children: [
|
|
768
|
+
/* @__PURE__ */ t(nt, { className: "absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
|
|
750
769
|
/* @__PURE__ */ t(
|
|
751
|
-
|
|
770
|
+
L,
|
|
752
771
|
{
|
|
753
772
|
className: "h-8 w-56 max-w-full border-slate-200 bg-slate-50 pl-8 text-[13px]",
|
|
754
|
-
placeholder:
|
|
755
|
-
value:
|
|
756
|
-
onChange: (e) =>
|
|
773
|
+
placeholder: P,
|
|
774
|
+
value: N ?? "",
|
|
775
|
+
onChange: (e) => Y(e.target.value)
|
|
757
776
|
}
|
|
758
777
|
)
|
|
759
778
|
] }),
|
|
760
|
-
|
|
761
|
-
|
|
779
|
+
_e && (E == null ? void 0 : E.map((e) => /* @__PURE__ */ t(
|
|
780
|
+
Je,
|
|
762
781
|
{
|
|
763
782
|
def: e,
|
|
764
|
-
value:
|
|
765
|
-
onChange: (
|
|
783
|
+
value: f[e.key] ?? "",
|
|
784
|
+
onChange: (n) => z == null ? void 0 : z(e.key, n)
|
|
766
785
|
},
|
|
767
786
|
e.key
|
|
768
787
|
))),
|
|
769
788
|
/* @__PURE__ */ t("div", { className: "flex-1" }),
|
|
770
|
-
|
|
789
|
+
M
|
|
771
790
|
] }),
|
|
772
|
-
|
|
791
|
+
b ? (
|
|
773
792
|
// #3229 — the real header (same labels, h-9) over rows with the real cell padding
|
|
774
793
|
// and line height for this density, in the body's real minimum height: the table
|
|
775
794
|
// keeps its shape when the rows land.
|
|
@@ -778,13 +797,13 @@ function nr({
|
|
|
778
797
|
{
|
|
779
798
|
"data-skeleton": "table",
|
|
780
799
|
"aria-busy": "true",
|
|
781
|
-
className: h(
|
|
782
|
-
style:
|
|
783
|
-
children: /* @__PURE__ */
|
|
784
|
-
/* @__PURE__ */ t(
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
800
|
+
className: h(ie && "min-h-0 flex-1 overflow-hidden"),
|
|
801
|
+
style: U ? { minHeight: U } : void 0,
|
|
802
|
+
children: /* @__PURE__ */ i(qe, { className: "border-separate border-spacing-0", children: [
|
|
803
|
+
/* @__PURE__ */ t(Be, { children: /* @__PURE__ */ i(H, { className: "border-b border-slate-200 hover:bg-transparent", children: [
|
|
804
|
+
T && /* @__PURE__ */ t(X, { className: "h-9 w-9 border-b border-slate-200 bg-slate-50 px-3 py-0 dark:border-border dark:bg-muted" }),
|
|
805
|
+
F.map((e) => /* @__PURE__ */ t(
|
|
806
|
+
X,
|
|
788
807
|
{
|
|
789
808
|
className: h(
|
|
790
809
|
"h-9 whitespace-nowrap border-b border-slate-200 bg-slate-50 px-3 py-0 text-[11px] font-medium text-slate-500 dark:border-border dark:bg-muted",
|
|
@@ -795,59 +814,59 @@ function nr({
|
|
|
795
814
|
e.key
|
|
796
815
|
))
|
|
797
816
|
] }) }),
|
|
798
|
-
/* @__PURE__ */ t(
|
|
799
|
-
|
|
817
|
+
/* @__PURE__ */ t(Ue, { children: /* @__PURE__ */ t(
|
|
818
|
+
_t,
|
|
800
819
|
{
|
|
801
|
-
columns:
|
|
802
|
-
rows: Math.min(Math.max(l ??
|
|
820
|
+
columns: F.map((e) => ({ key: e.key })),
|
|
821
|
+
rows: Math.min(Math.max(l ?? Vt.length, 1), 15),
|
|
803
822
|
rowClassName: "",
|
|
804
|
-
cellClassName: h("px-3",
|
|
805
|
-
leadingCells:
|
|
823
|
+
cellClassName: h("px-3", de === "compact" ? "py-1" : "py-2"),
|
|
824
|
+
leadingCells: T ? 1 : 0
|
|
806
825
|
}
|
|
807
826
|
) })
|
|
808
827
|
] })
|
|
809
828
|
}
|
|
810
829
|
)
|
|
811
|
-
) : /* @__PURE__ */
|
|
830
|
+
) : /* @__PURE__ */ i(Q, { children: [
|
|
812
831
|
/* @__PURE__ */ t(
|
|
813
832
|
"div",
|
|
814
833
|
{
|
|
815
|
-
ref:
|
|
834
|
+
ref: Z,
|
|
816
835
|
className: h(
|
|
817
|
-
|
|
836
|
+
Ne && "overflow-x-hidden [&>div]:overflow-visible",
|
|
818
837
|
// Bounded mode: rows scroll here under a sticky header. Header
|
|
819
838
|
// cells sit above pinned body cells (z-[1/2]); the pinned
|
|
820
839
|
// header corner (left-0) tops the other header cells so
|
|
821
840
|
// horizontal scroll cannot bleed through it.
|
|
822
|
-
|
|
841
|
+
ie && "min-h-0 flex-1 overflow-y-auto [&_thead_th]:sticky [&_thead_th]:top-0 [&_thead_th]:z-[5] [&_thead_th.left-0]:z-[6] [&_thead_th.dt-pinned]:z-[6]"
|
|
823
842
|
),
|
|
824
|
-
style:
|
|
825
|
-
children: /* @__PURE__ */
|
|
826
|
-
|
|
843
|
+
style: U ? { minHeight: U } : void 0,
|
|
844
|
+
children: /* @__PURE__ */ i(
|
|
845
|
+
qe,
|
|
827
846
|
{
|
|
828
847
|
"data-copy-cells": "",
|
|
829
848
|
className: "border-separate border-spacing-0 [&>tbody>tr.border-b:not(:last-child)>td]:border-b [&>tbody>tr.border-b:not(:last-child)>td]:[border-bottom-color:inherit] [&>thead>tr.border-b>th]:border-b [&>thead>tr.border-b>th]:[border-bottom-color:inherit]",
|
|
830
849
|
children: [
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
833
|
-
|
|
834
|
-
|
|
850
|
+
/* @__PURE__ */ i(Be, { children: [
|
|
851
|
+
/* @__PURE__ */ i(H, { className: "border-b border-slate-200 hover:bg-transparent", children: [
|
|
852
|
+
T && /* @__PURE__ */ t(
|
|
853
|
+
X,
|
|
835
854
|
{
|
|
836
|
-
ref:
|
|
855
|
+
ref: $e,
|
|
837
856
|
className: h(
|
|
838
857
|
"h-9 w-9 bg-slate-50 px-3 py-0",
|
|
839
|
-
(
|
|
858
|
+
(W || S) && "sticky left-0 z-[2] min-w-[40px]"
|
|
840
859
|
),
|
|
841
860
|
children: /* @__PURE__ */ t(
|
|
842
|
-
|
|
861
|
+
Le,
|
|
843
862
|
{
|
|
844
|
-
checked: s.length > 0 && s.every((e,
|
|
845
|
-
const
|
|
846
|
-
return
|
|
863
|
+
checked: s.length > 0 && s.every((e, n) => {
|
|
864
|
+
const d = o ? o(e, n) : String(n);
|
|
865
|
+
return j == null ? void 0 : j.includes(d);
|
|
847
866
|
}),
|
|
848
867
|
onCheckedChange: (e) => {
|
|
849
|
-
|
|
850
|
-
e ? s.map((
|
|
868
|
+
T(
|
|
869
|
+
e ? s.map((n, d) => o ? o(n, d) : String(d)) : []
|
|
851
870
|
);
|
|
852
871
|
},
|
|
853
872
|
"aria-label": "Select all"
|
|
@@ -855,32 +874,32 @@ function nr({
|
|
|
855
874
|
)
|
|
856
875
|
}
|
|
857
876
|
),
|
|
858
|
-
|
|
859
|
-
|
|
877
|
+
F.map((e, n) => /* @__PURE__ */ t(
|
|
878
|
+
X,
|
|
860
879
|
{
|
|
861
|
-
ref: (
|
|
862
|
-
|
|
880
|
+
ref: (d) => {
|
|
881
|
+
Se.current[e.key] = d;
|
|
863
882
|
},
|
|
864
|
-
style:
|
|
883
|
+
style: ue(e.key),
|
|
865
884
|
className: h(
|
|
866
885
|
"group/th h-9 whitespace-nowrap bg-slate-50 px-3 py-0 text-[11px] font-medium text-slate-500",
|
|
867
|
-
e.sortable &&
|
|
868
|
-
!
|
|
886
|
+
e.sortable && p && "cursor-pointer select-none hover:text-slate-600",
|
|
887
|
+
!S && W && n === 0 && h(
|
|
869
888
|
"sticky z-[2] border-r border-slate-200 dark:border-border",
|
|
870
|
-
|
|
889
|
+
T ? "left-[39px]" : "left-0"
|
|
871
890
|
),
|
|
872
|
-
|
|
873
|
-
|
|
891
|
+
S && "bg-slate-50 dark:bg-muted",
|
|
892
|
+
fe(e.key, !0),
|
|
874
893
|
e.headerClassName
|
|
875
894
|
),
|
|
876
|
-
onClick: () =>
|
|
877
|
-
"aria-sort": e.sortable &&
|
|
878
|
-
tabIndex: e.sortable &&
|
|
879
|
-
onKeyDown: e.sortable &&
|
|
880
|
-
|
|
895
|
+
onClick: () => Oe(e),
|
|
896
|
+
"aria-sort": e.sortable && p ? Ft(u, e.key) : void 0,
|
|
897
|
+
tabIndex: e.sortable && p && !ye(e.header) ? 0 : void 0,
|
|
898
|
+
onKeyDown: e.sortable && p && !ye(e.header) ? (d) => {
|
|
899
|
+
d.target === d.currentTarget && (d.key === "Enter" || d.key === " ") && (d.preventDefault(), Oe(e));
|
|
881
900
|
} : void 0,
|
|
882
|
-
children: /* @__PURE__ */
|
|
883
|
-
e.sortable &&
|
|
901
|
+
children: /* @__PURE__ */ i("span", { className: "inline-flex items-center", children: [
|
|
902
|
+
e.sortable && p && ye(e.header) ? /* @__PURE__ */ i(
|
|
884
903
|
"button",
|
|
885
904
|
{
|
|
886
905
|
type: "button",
|
|
@@ -888,32 +907,32 @@ function nr({
|
|
|
888
907
|
"data-dt-sort": e.key,
|
|
889
908
|
children: [
|
|
890
909
|
e.header,
|
|
891
|
-
/* @__PURE__ */ t(
|
|
910
|
+
/* @__PURE__ */ t(De, { field: e.key, sort: u })
|
|
892
911
|
]
|
|
893
912
|
}
|
|
894
|
-
) : /* @__PURE__ */
|
|
913
|
+
) : /* @__PURE__ */ i(Q, { children: [
|
|
895
914
|
e.header,
|
|
896
|
-
e.sortable &&
|
|
915
|
+
e.sortable && p && /* @__PURE__ */ t(De, { field: e.key, sort: u })
|
|
897
916
|
] }),
|
|
898
|
-
|
|
917
|
+
S && ce && e.key !== "claim" && /* @__PURE__ */ t(
|
|
899
918
|
"button",
|
|
900
919
|
{
|
|
901
920
|
type: "button",
|
|
902
|
-
onClick: (
|
|
903
|
-
|
|
921
|
+
onClick: (d) => {
|
|
922
|
+
d.stopPropagation(), tt(e.key);
|
|
904
923
|
},
|
|
905
|
-
"aria-label": `Pin column ${
|
|
906
|
-
title: (
|
|
924
|
+
"aria-label": `Pin column ${At(e)}`,
|
|
925
|
+
title: (x == null ? void 0 : x[e.key]) === "left" ? "Pinned left — click to pin right" : (x == null ? void 0 : x[e.key]) === "right" ? "Pinned right — click to unpin" : "Pin column",
|
|
907
926
|
className: h(
|
|
908
927
|
"ml-1 rounded p-0.5 transition-opacity",
|
|
909
|
-
|
|
928
|
+
x != null && x[e.key] ? "text-nvr-cyan opacity-100" : "text-slate-300 opacity-0 hover:text-slate-500 group-hover/th:opacity-100"
|
|
910
929
|
),
|
|
911
930
|
children: /* @__PURE__ */ t(
|
|
912
|
-
|
|
931
|
+
st,
|
|
913
932
|
{
|
|
914
933
|
className: h(
|
|
915
934
|
"h-3 w-3",
|
|
916
|
-
(
|
|
935
|
+
(x == null ? void 0 : x[e.key]) === "right" && "rotate-90"
|
|
917
936
|
)
|
|
918
937
|
}
|
|
919
938
|
)
|
|
@@ -924,33 +943,33 @@ function nr({
|
|
|
924
943
|
e.key
|
|
925
944
|
))
|
|
926
945
|
] }),
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
946
|
+
at && /* @__PURE__ */ i(H, { className: "border-b border-slate-200 hover:bg-transparent", children: [
|
|
947
|
+
T && /* @__PURE__ */ t(
|
|
948
|
+
X,
|
|
930
949
|
{
|
|
931
950
|
className: h(
|
|
932
951
|
"h-9 w-9 bg-slate-50 px-3 py-1",
|
|
933
|
-
(
|
|
952
|
+
(W || S) && "sticky left-0 z-[2] min-w-[40px]"
|
|
934
953
|
)
|
|
935
954
|
}
|
|
936
955
|
),
|
|
937
|
-
|
|
938
|
-
const
|
|
956
|
+
F.map((e) => {
|
|
957
|
+
const n = rt.get(e.key);
|
|
939
958
|
return /* @__PURE__ */ t(
|
|
940
|
-
|
|
959
|
+
X,
|
|
941
960
|
{
|
|
942
|
-
style:
|
|
961
|
+
style: ue(e.key),
|
|
943
962
|
className: h(
|
|
944
963
|
"h-9 bg-slate-50 px-1.5 py-1 align-middle",
|
|
945
|
-
|
|
946
|
-
|
|
964
|
+
S && "bg-slate-50 dark:bg-muted",
|
|
965
|
+
fe(e.key, !0)
|
|
947
966
|
),
|
|
948
|
-
children:
|
|
949
|
-
|
|
967
|
+
children: n && z ? /* @__PURE__ */ t(
|
|
968
|
+
Je,
|
|
950
969
|
{
|
|
951
|
-
def:
|
|
952
|
-
value:
|
|
953
|
-
onChange: (
|
|
970
|
+
def: n,
|
|
971
|
+
value: f[n.key] ?? "",
|
|
972
|
+
onChange: (d) => z(n.key, d),
|
|
954
973
|
layout: "cell"
|
|
955
974
|
}
|
|
956
975
|
) : null
|
|
@@ -960,27 +979,27 @@ function nr({
|
|
|
960
979
|
})
|
|
961
980
|
] })
|
|
962
981
|
] }),
|
|
963
|
-
/* @__PURE__ */
|
|
964
|
-
|
|
965
|
-
const
|
|
966
|
-
return /* @__PURE__ */
|
|
982
|
+
/* @__PURE__ */ i(Ue, { className: "tabular-nums", children: [
|
|
983
|
+
A ? A.map((e) => {
|
|
984
|
+
const n = (D == null ? void 0 : D.has(e.key)) ?? !1;
|
|
985
|
+
return /* @__PURE__ */ i(pt.Fragment, { children: [
|
|
967
986
|
/* @__PURE__ */ t(
|
|
968
|
-
|
|
987
|
+
H,
|
|
969
988
|
{
|
|
970
989
|
className: "nvr-row-enter cursor-pointer border-slate-200 bg-slate-50/80 transition-colors hover:bg-slate-100/80 dark:bg-muted/40",
|
|
971
|
-
onClick: () =>
|
|
990
|
+
onClick: () => he == null ? void 0 : he(e.key),
|
|
972
991
|
children: /* @__PURE__ */ t(
|
|
973
|
-
|
|
992
|
+
ee,
|
|
974
993
|
{
|
|
975
|
-
colSpan: r.length + (
|
|
994
|
+
colSpan: r.length + (T ? 1 : 0),
|
|
976
995
|
className: "px-3 py-1.5",
|
|
977
|
-
children: /* @__PURE__ */
|
|
996
|
+
children: /* @__PURE__ */ i("span", { className: "flex items-center gap-1.5 text-[12px] font-medium text-slate-600 dark:text-foreground", children: [
|
|
978
997
|
/* @__PURE__ */ t(
|
|
979
|
-
|
|
998
|
+
it,
|
|
980
999
|
{
|
|
981
1000
|
className: h(
|
|
982
1001
|
"h-3.5 w-3.5 text-slate-400 transition-transform duration-200",
|
|
983
|
-
|
|
1002
|
+
n && "-rotate-90"
|
|
984
1003
|
)
|
|
985
1004
|
}
|
|
986
1005
|
),
|
|
@@ -990,68 +1009,68 @@ function nr({
|
|
|
990
1009
|
)
|
|
991
1010
|
}
|
|
992
1011
|
),
|
|
993
|
-
!
|
|
1012
|
+
!n && e.rows.map((d, O) => Ee(d, O))
|
|
994
1013
|
] }, e.key);
|
|
995
|
-
}) : s.map((e,
|
|
996
|
-
(
|
|
997
|
-
|
|
1014
|
+
}) : s.map((e, n) => Ee(e, n)),
|
|
1015
|
+
(A ? A.length === 0 : s.length === 0) && /* @__PURE__ */ t(H, { children: /* @__PURE__ */ t(
|
|
1016
|
+
ee,
|
|
998
1017
|
{
|
|
999
|
-
colSpan: r.length + (
|
|
1018
|
+
colSpan: r.length + (T ? 1 : 0),
|
|
1000
1019
|
className: "nvr-fade-in p-0 text-center align-middle text-[13px] text-slate-400",
|
|
1001
|
-
style:
|
|
1020
|
+
style: U ? { height: Math.max(96, U - 56) } : void 0,
|
|
1002
1021
|
children: /* @__PURE__ */ t(
|
|
1003
1022
|
"div",
|
|
1004
1023
|
{
|
|
1005
1024
|
className: "sticky left-0 py-12",
|
|
1006
|
-
style:
|
|
1025
|
+
style: ze ? { width: ze } : void 0,
|
|
1007
1026
|
"data-table-empty": !0,
|
|
1008
|
-
children: typeof
|
|
1027
|
+
children: typeof V == "string" ? /* @__PURE__ */ t(Nt, { icon: dt, title: V }) : V
|
|
1009
1028
|
}
|
|
1010
1029
|
)
|
|
1011
1030
|
}
|
|
1012
1031
|
) })
|
|
1013
|
-
] },
|
|
1032
|
+
] }, Ye)
|
|
1014
1033
|
]
|
|
1015
1034
|
}
|
|
1016
1035
|
)
|
|
1017
1036
|
}
|
|
1018
1037
|
),
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
!
|
|
1022
|
-
/* @__PURE__ */
|
|
1023
|
-
|
|
1038
|
+
Ne && /* @__PURE__ */ t(wt, { scrollerRef: Z }),
|
|
1039
|
+
Re,
|
|
1040
|
+
!A && c > l && /* @__PURE__ */ i("div", { className: "flex items-center justify-between border-t border-slate-100 px-4 py-2.5", children: [
|
|
1041
|
+
/* @__PURE__ */ i("p", { className: "text-[12px] text-slate-400", children: [
|
|
1042
|
+
xe(Ze),
|
|
1024
1043
|
"–",
|
|
1025
|
-
|
|
1044
|
+
xe(Ie),
|
|
1026
1045
|
" of ",
|
|
1027
|
-
|
|
1046
|
+
xe(c),
|
|
1028
1047
|
" records"
|
|
1029
1048
|
] }),
|
|
1030
|
-
/* @__PURE__ */
|
|
1049
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
1031
1050
|
/* @__PURE__ */ t(
|
|
1032
|
-
|
|
1051
|
+
We,
|
|
1033
1052
|
{
|
|
1034
1053
|
variant: "ghost",
|
|
1035
1054
|
size: "sm",
|
|
1036
1055
|
className: "h-7 px-2.5 text-[12px] text-slate-600",
|
|
1037
1056
|
disabled: m <= 1,
|
|
1038
|
-
onClick: () =>
|
|
1057
|
+
onClick: () => _(m - 1),
|
|
1039
1058
|
children: "← Prev"
|
|
1040
1059
|
}
|
|
1041
1060
|
),
|
|
1042
|
-
/* @__PURE__ */
|
|
1061
|
+
/* @__PURE__ */ i("span", { className: "px-2 text-[12px] text-slate-400", children: [
|
|
1043
1062
|
m,
|
|
1044
1063
|
" / ",
|
|
1045
|
-
|
|
1064
|
+
we
|
|
1046
1065
|
] }),
|
|
1047
1066
|
/* @__PURE__ */ t(
|
|
1048
|
-
|
|
1067
|
+
We,
|
|
1049
1068
|
{
|
|
1050
1069
|
variant: "ghost",
|
|
1051
1070
|
size: "sm",
|
|
1052
1071
|
className: "h-7 px-2.5 text-[12px] text-slate-600",
|
|
1053
|
-
disabled: m >=
|
|
1054
|
-
onClick: () =>
|
|
1072
|
+
disabled: m >= we,
|
|
1073
|
+
onClick: () => _(m + 1),
|
|
1055
1074
|
children: "Next →"
|
|
1056
1075
|
}
|
|
1057
1076
|
)
|
|
@@ -1064,11 +1083,11 @@ function nr({
|
|
|
1064
1083
|
] });
|
|
1065
1084
|
}
|
|
1066
1085
|
export {
|
|
1067
|
-
|
|
1068
|
-
|
|
1086
|
+
cr as DataTable,
|
|
1087
|
+
Je as FilterControl,
|
|
1069
1088
|
Ft as ariaSortFor,
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1089
|
+
Lt as containsFilter,
|
|
1090
|
+
Jt as filterDefLabel,
|
|
1091
|
+
dr as filterValueDisplay,
|
|
1092
|
+
At as pinColumnName
|
|
1074
1093
|
};
|