@nivaro/react 0.3.40 → 0.3.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/LayoutForm.js +100 -98
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +645 -16
- package/dist/index.js +814 -775
- package/dist/shared/components/ActivityEntry.js +154 -0
- package/dist/shared/components/AudienceConfirmPanel.js +98 -0
- package/dist/shared/components/BackgroundRunOffer.js +43 -31
- package/dist/shared/components/BroadcastView.js +225 -204
- package/dist/shared/components/CollectionBrowserView.js +3924 -3584
- package/dist/shared/components/ConfigHistory.js +153 -0
- package/dist/shared/components/ConfigReadBack.js +65 -0
- package/dist/shared/components/DataTable.js +379 -346
- package/dist/shared/components/ForceReloadBanner.js +47 -40
- package/dist/shared/components/IdleReloadWatcher.js +69 -0
- package/dist/shared/components/ItemEditForm.js +4041 -3853
- package/dist/shared/components/MyWorkView.js +278 -213
- package/dist/shared/components/NotificationBell.js +130 -121
- package/dist/shared/components/PickerExcludedRows.js +3 -3
- package/dist/shared/components/ProfileView.js +776 -1003
- package/dist/shared/components/RecentRecordsRail.js +34 -16
- package/dist/shared/components/RecordReadView.js +500 -477
- package/dist/shared/components/Skeletons.js +199 -0
- package/dist/shared/components/SlowNotice.js +63 -0
- package/dist/shared/components/Term.js +23 -0
- package/dist/shared/components/WidgetSlot.js +350 -353
- package/dist/shared/components/access/PermissionSummary.js +106 -0
- package/dist/shared/components/bulk/BulkActionButtons.js +76 -73
- package/dist/shared/components/chat/ChatPanel.js +902 -886
- package/dist/shared/components/chat/MemberPaging.js +70 -0
- package/dist/shared/components/chat/RoomParts.js +147 -117
- package/dist/shared/components/chat/ScreenClip.js +73 -69
- package/dist/shared/components/chat/chat-core.js +449 -396
- package/dist/shared/components/chat/huddle/huddle-store.js +48 -43
- package/dist/shared/components/help-videos/api.js +2 -5
- package/dist/shared/components/help-videos/viewer/HelpVideoMatchChip.js +79 -0
- package/dist/shared/components/help-videos/viewer/matchChip.js +50 -0
- package/dist/shared/components/imports/CollectionImportPanel.js +139 -133
- package/dist/shared/components/imports/RunDetailSheet.js +222 -227
- package/dist/shared/components/integrations/console/ErrorExplanation.js +121 -0
- package/dist/shared/components/integrations/console/PartnerDetail.js +175 -174
- package/dist/shared/components/integrations/console/SubmissionRow.js +36 -34
- package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +50 -48
- package/dist/shared/components/item-edit/FieldComments.js +212 -0
- package/dist/shared/components/item-edit/FieldRow.js +340 -336
- package/dist/shared/components/item-edit/RecordGrantTools.js +28 -28
- package/dist/shared/components/item-edit/RecordHeaderActions.js +23 -22
- package/dist/shared/components/item-edit/RelationCombobox.js +231 -222
- package/dist/shared/components/item-edit/RuleHiddenNotes.js +55 -0
- package/dist/shared/components/item-edit/field-comments-context.js +6 -0
- package/dist/shared/components/item-edit/field-sources.js +33 -0
- package/dist/shared/components/item-edit/rule-hidden.js +30 -0
- package/dist/shared/components/layout-editor/HistoryPanel.js +113 -96
- package/dist/shared/components/layout-editor/editors/cascade-filters.js +170 -145
- package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +22 -18
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +177 -159
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +35 -34
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +124 -111
- package/dist/shared/components/layout-editor/inspector/kit.js +292 -277
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/settings-registry.js +1 -1
- package/dist/shared/components/list/CopyListLinkButton.js +41 -0
- package/dist/shared/components/list/InlineEdit.js +363 -0
- package/dist/shared/components/notifications/NotificationCenterView.js +213 -181
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -82
- package/dist/shared/components/notifications/NotificationRulesEditor.js +515 -0
- package/dist/shared/components/notifications/TestMyRules.js +137 -0
- package/dist/shared/components/notifications/changes-lines.js +24 -0
- package/dist/shared/components/notifications/why-lines.js +64 -0
- package/dist/shared/components/panels/CommentPanel.js +316 -281
- package/dist/shared/components/panels/LegalHoldBanner.js +38 -0
- package/dist/shared/components/panels/PipelinePanel.js +201 -196
- package/dist/shared/components/panels/RevisionsPanel.js +496 -479
- package/dist/shared/components/pipeline/PipelineEditorView.js +1587 -1560
- package/dist/shared/components/pipeline/PipelineStateOwners.js +116 -103
- package/dist/shared/components/profile/PersonDidPanel.js +188 -0
- package/dist/shared/components/profile/PersonProfile.js +57 -52
- package/dist/shared/components/queue/QueueWorklist.js +1526 -1365
- package/dist/shared/hooks/useSlowReason.js +39 -0
- package/dist/shared/lib/activity-sentence.js +670 -0
- package/dist/shared/lib/config-sentences.js +418 -0
- package/dist/shared/lib/core-glossary.js +229 -0
- package/dist/shared/lib/error-hints.js +159 -0
- package/dist/shared/lib/error-message.js +105 -0
- package/dist/shared/lib/error-toast.js +22 -0
- package/dist/shared/lib/field-comments.js +25 -0
- package/dist/shared/lib/filter-sentence.js +261 -0
- package/dist/shared/lib/glossary.js +55 -48
- package/dist/shared/lib/idle-reload.js +138 -0
- package/dist/shared/lib/layout-resolve.js +42 -29
- package/dist/shared/lib/list-inline-edit.js +190 -0
- package/dist/shared/lib/list-link.js +147 -0
- package/dist/shared/lib/prefetch.js +259 -106
- package/dist/shared/lib/record-ref.js +72 -0
- package/dist/shared/lib/reload-holds.js +25 -0
- package/dist/shared/lib/safe-error.js +52 -24
- package/dist/shared/lib/skeleton-shapes.js +72 -0
- package/dist/shared/lib/slow-reason.js +63 -0
- package/package.json +1 -1
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsxs as s, Fragment as
|
|
2
|
-
import { Search as
|
|
3
|
-
import
|
|
4
|
-
import { parseDateFilter as Oe, describeDateFilter as
|
|
5
|
-
import { parseNumberFilter as Se, describeNumberFilter as
|
|
6
|
-
import { fitPins as
|
|
7
|
-
import { cn as b, formatNumber as
|
|
8
|
-
import { CellCopyLayer as
|
|
9
|
-
import { EmptyState as
|
|
10
|
-
import { HScrollProxy as
|
|
1
|
+
import { jsxs as s, Fragment as H, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Search as Ie, Pin as Ge, ChevronDown as Pe, Inbox as et, ChevronsUpDown as K, ChevronUp as tt, X as I, Check as rt, CalendarDays as at } from "lucide-react";
|
|
3
|
+
import lt, { useMemo as _e, useRef as D, useState as O, useEffect as Q, useLayoutEffect as nt } from "react";
|
|
4
|
+
import { parseDateFilter as Oe, describeDateFilter as st, DATE_FILTER_OPS as it, formatDateFilter as dt } from "../lib/date-filter.js";
|
|
5
|
+
import { parseNumberFilter as Se, describeNumberFilter as ot, NUMBER_FILTER_OPS as ct, formatNumberFilter as bt } from "../lib/number-filter.js";
|
|
6
|
+
import { fitPins as pt } from "../lib/table-pins.js";
|
|
7
|
+
import { cn as b, formatNumber as be } from "../lib/utils.js";
|
|
8
|
+
import { CellCopyLayer as ht } from "./CellCopyLayer.js";
|
|
9
|
+
import { EmptyState as mt } from "./EmptyState.js";
|
|
10
|
+
import { HScrollProxy as ut } from "./HScrollProxy.js";
|
|
11
|
+
import { TableSkeletonRows as xt } from "./Skeletons.js";
|
|
11
12
|
import { Button as $e } from "./ui/button.js";
|
|
12
13
|
import { Checkbox as Ce } from "./ui/checkbox.js";
|
|
13
|
-
import { Command as
|
|
14
|
-
import { Input as
|
|
14
|
+
import { Command as ft, CommandInput as yt, CommandList as gt, CommandEmpty as kt, CommandItem as vt } from "./ui/command.js";
|
|
15
|
+
import { Input as j } from "./ui/input.js";
|
|
15
16
|
import { Popover as G, PopoverTrigger as P, PopoverContent as ee } from "./ui/popover.js";
|
|
16
|
-
import { Select as
|
|
17
|
-
import {
|
|
18
|
-
import { Table as wt, TableHeader as _t, TableRow as H, TableHead as Y, TableBody as Ot, TableCell as Z } from "./ui/table.js";
|
|
17
|
+
import { Select as Nt, SelectTrigger as wt, SelectValue as _t, SelectContent as Ot, SelectItem as ze } from "./ui/select.js";
|
|
18
|
+
import { Table as Re, TableHeader as Me, TableRow as B, TableHead as U, TableBody as Ee, TableCell as Z } from "./ui/table.js";
|
|
19
19
|
const St = [1, 2, 3, 4, 5, 6, 7, 8];
|
|
20
|
-
function
|
|
21
|
-
return
|
|
20
|
+
function Te(a) {
|
|
21
|
+
return a.startsWith("-") ? a.slice(1) : a;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
23
|
+
function Ve(a) {
|
|
24
|
+
return a ? a.startsWith("-") ? "desc" : "asc" : null;
|
|
25
25
|
}
|
|
26
|
-
function $t(
|
|
27
|
-
const
|
|
28
|
-
return
|
|
26
|
+
function $t(a, i) {
|
|
27
|
+
const c = Te(a), o = Ve(a);
|
|
28
|
+
return c !== i || !a ? i : o === "asc" ? `-${i}` : "";
|
|
29
29
|
}
|
|
30
|
-
function Ct({ field:
|
|
31
|
-
const
|
|
32
|
-
return
|
|
33
|
-
|
|
30
|
+
function Ct({ field: a, sort: i }) {
|
|
31
|
+
const c = Te(i), o = Ve(i);
|
|
32
|
+
return c !== a || !i ? /* @__PURE__ */ e(K, { className: "ml-1 inline h-3 w-3 shrink-0 text-slate-300" }) : /* @__PURE__ */ e(
|
|
33
|
+
tt,
|
|
34
34
|
{
|
|
35
35
|
className: b(
|
|
36
36
|
"ml-1 inline h-3 w-3 shrink-0 text-nvr-cyan transition-transform duration-200",
|
|
@@ -40,40 +40,40 @@ function Ct({ field: r, sort: i }) {
|
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
function zt({
|
|
43
|
-
def:
|
|
43
|
+
def: a,
|
|
44
44
|
value: i,
|
|
45
|
-
onChange:
|
|
45
|
+
onChange: c
|
|
46
46
|
}) {
|
|
47
|
-
const [o, u] = O(!1), [l,
|
|
48
|
-
|
|
47
|
+
const [o, u] = O(!1), [l, d] = O(""), [y, g] = O([]), [k, x] = O(!1), [h, v] = O({}), r = D(0), S = !!a.loadOptions, N = Array.isArray(i) ? i : i === "" ? [] : [i];
|
|
48
|
+
Q(() => {
|
|
49
49
|
if (!S || !o) return;
|
|
50
|
-
const m = ++
|
|
50
|
+
const m = ++r.current;
|
|
51
51
|
x(!0);
|
|
52
|
-
const
|
|
52
|
+
const F = setTimeout(
|
|
53
53
|
() => {
|
|
54
|
-
var
|
|
55
|
-
(
|
|
56
|
-
|
|
54
|
+
var M;
|
|
55
|
+
(M = a.loadOptions) == null || M.call(a, l).then((E) => {
|
|
56
|
+
r.current === m && g(E);
|
|
57
57
|
}).catch(() => {
|
|
58
|
-
|
|
58
|
+
r.current === m && g([]);
|
|
59
59
|
}).finally(() => {
|
|
60
|
-
|
|
60
|
+
r.current === m && x(!1);
|
|
61
61
|
});
|
|
62
62
|
},
|
|
63
63
|
l ? 250 : 0
|
|
64
64
|
);
|
|
65
|
-
return () => clearTimeout(
|
|
65
|
+
return () => clearTimeout(F);
|
|
66
66
|
}, [l, o, S]);
|
|
67
|
-
const
|
|
68
|
-
var
|
|
69
|
-
return ((
|
|
70
|
-
},
|
|
67
|
+
const Y = S ? y : a.options ?? [], R = (m) => {
|
|
68
|
+
var F, M;
|
|
69
|
+
return ((F = Y.find((E) => E.value === m)) == null ? void 0 : F.label) ?? ((M = (a.options ?? []).find((E) => E.value === m)) == null ? void 0 : M.label) ?? h[m] ?? m;
|
|
70
|
+
}, J = N.length === 0 ? null : N.length === 1 ? R(N[0]) : `${R(N[0])} +${N.length - 1}`;
|
|
71
71
|
return /* @__PURE__ */ s(
|
|
72
72
|
G,
|
|
73
73
|
{
|
|
74
74
|
open: o,
|
|
75
75
|
onOpenChange: (m) => {
|
|
76
|
-
u(m), m ||
|
|
76
|
+
u(m), m || d("");
|
|
77
77
|
},
|
|
78
78
|
children: [
|
|
79
79
|
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ s(
|
|
@@ -82,12 +82,12 @@ function zt({
|
|
|
82
82
|
type: "button",
|
|
83
83
|
className: b(
|
|
84
84
|
"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",
|
|
85
|
-
|
|
85
|
+
J ? "text-slate-800 dark:text-foreground" : "text-slate-500"
|
|
86
86
|
),
|
|
87
87
|
children: [
|
|
88
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
88
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: J ?? a.placeholder }),
|
|
89
89
|
/* @__PURE__ */ s("span", { className: "ml-1 flex shrink-0 items-center gap-0.5", children: [
|
|
90
|
-
|
|
90
|
+
N.length > 0 && // biome-ignore lint/a11y/useKeyWithClickEvents: auxiliary clear affordance; Esc + reselect cover keyboard
|
|
91
91
|
/* @__PURE__ */ e(
|
|
92
92
|
"span",
|
|
93
93
|
{
|
|
@@ -95,7 +95,7 @@ function zt({
|
|
|
95
95
|
tabIndex: -1,
|
|
96
96
|
"aria-label": "Clear filter",
|
|
97
97
|
onClick: (m) => {
|
|
98
|
-
m.stopPropagation(),
|
|
98
|
+
m.stopPropagation(), c(a.multi ? [] : "");
|
|
99
99
|
},
|
|
100
100
|
className: "rounded p-0.5 text-slate-400 hover:text-slate-600",
|
|
101
101
|
children: /* @__PURE__ */ e(I, { className: "h-3 w-3" })
|
|
@@ -106,32 +106,32 @@ function zt({
|
|
|
106
106
|
]
|
|
107
107
|
}
|
|
108
108
|
) }),
|
|
109
|
-
/* @__PURE__ */ e(ee, { className: "w-[240px] p-0", align: "start", children: /* @__PURE__ */ s(
|
|
109
|
+
/* @__PURE__ */ e(ee, { className: "w-[240px] p-0", align: "start", children: /* @__PURE__ */ s(ft, { shouldFilter: !S, children: [
|
|
110
110
|
/* @__PURE__ */ e(
|
|
111
|
-
|
|
111
|
+
yt,
|
|
112
112
|
{
|
|
113
113
|
placeholder: "Search…",
|
|
114
114
|
className: "h-8 text-[12px]",
|
|
115
115
|
value: l,
|
|
116
|
-
onValueChange:
|
|
116
|
+
onValueChange: d
|
|
117
117
|
}
|
|
118
118
|
),
|
|
119
|
-
/* @__PURE__ */ s(
|
|
120
|
-
/* @__PURE__ */ e(
|
|
121
|
-
|
|
122
|
-
const
|
|
119
|
+
/* @__PURE__ */ s(gt, { children: [
|
|
120
|
+
/* @__PURE__ */ e(kt, { className: "py-3 text-center text-[12px] text-slate-400", children: k ? "Searching…" : "No results" }),
|
|
121
|
+
Y.map((m) => {
|
|
122
|
+
const F = N.includes(m.value);
|
|
123
123
|
return /* @__PURE__ */ s(
|
|
124
|
-
|
|
124
|
+
vt,
|
|
125
125
|
{
|
|
126
126
|
value: S ? m.value : m.label,
|
|
127
127
|
onSelect: () => {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
) : (
|
|
128
|
+
v((M) => ({ ...M, [m.value]: m.label })), a.multi ? c(
|
|
129
|
+
F ? N.filter((M) => M !== m.value) : [...N, m.value]
|
|
130
|
+
) : (c(F ? "" : m.value), u(!1));
|
|
131
131
|
},
|
|
132
132
|
className: "text-[12px]",
|
|
133
133
|
children: [
|
|
134
|
-
/* @__PURE__ */ e(
|
|
134
|
+
/* @__PURE__ */ e(rt, { className: b("mr-2 h-3 w-3", F ? "opacity-100" : "opacity-0") }),
|
|
135
135
|
m.label
|
|
136
136
|
]
|
|
137
137
|
},
|
|
@@ -145,18 +145,18 @@ function zt({
|
|
|
145
145
|
);
|
|
146
146
|
}
|
|
147
147
|
function Rt({
|
|
148
|
-
value:
|
|
148
|
+
value: a,
|
|
149
149
|
placeholder: i,
|
|
150
|
-
onChange:
|
|
150
|
+
onChange: c
|
|
151
151
|
}) {
|
|
152
|
-
const [o, u] = O(!1), l = Oe(
|
|
153
|
-
|
|
152
|
+
const [o, u] = O(!1), l = Oe(a), [d, y] = O((l == null ? void 0 : l.op) ?? "on"), [g, k] = O((l == null ? void 0 : l.from) ?? ""), [x, h] = O((l == null ? void 0 : l.to) ?? "");
|
|
153
|
+
Q(() => {
|
|
154
154
|
if (!o) return;
|
|
155
|
-
const
|
|
156
|
-
y((
|
|
157
|
-
}, [o,
|
|
158
|
-
const
|
|
159
|
-
S && (
|
|
155
|
+
const r = Oe(a);
|
|
156
|
+
y((r == null ? void 0 : r.op) ?? "on"), k((r == null ? void 0 : r.from) ?? ""), h((r == null ? void 0 : r.to) ?? "");
|
|
157
|
+
}, [o, a]);
|
|
158
|
+
const v = (r, S, N) => {
|
|
159
|
+
S && (c(dt({ op: r, from: S, to: N || S })), (r !== "between" || N) && u(!1));
|
|
160
160
|
};
|
|
161
161
|
return /* @__PURE__ */ s(G, { open: o, onOpenChange: u, children: [
|
|
162
162
|
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ s(
|
|
@@ -166,36 +166,36 @@ function Rt({
|
|
|
166
166
|
"data-date-filter": !0,
|
|
167
167
|
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",
|
|
168
168
|
children: [
|
|
169
|
-
/* @__PURE__ */ e("span", { className: b("truncate", !l && "text-slate-500 dark:text-muted-foreground"), children: l ?
|
|
169
|
+
/* @__PURE__ */ e("span", { className: b("truncate", !l && "text-slate-500 dark:text-muted-foreground"), children: l ? st(l) : i }),
|
|
170
170
|
l ? /* @__PURE__ */ e(
|
|
171
171
|
I,
|
|
172
172
|
{
|
|
173
173
|
className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
|
|
174
|
-
onClick: (
|
|
175
|
-
|
|
174
|
+
onClick: (r) => {
|
|
175
|
+
r.stopPropagation(), c(null);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
) : /* @__PURE__ */ e(
|
|
178
|
+
) : /* @__PURE__ */ e(at, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
|
|
179
179
|
]
|
|
180
180
|
}
|
|
181
181
|
) }),
|
|
182
182
|
/* @__PURE__ */ s(ee, { align: "start", className: "w-[248px] space-y-2 p-2", children: [
|
|
183
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1", children:
|
|
183
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1", children: it.map((r) => /* @__PURE__ */ e(
|
|
184
184
|
"button",
|
|
185
185
|
{
|
|
186
186
|
type: "button",
|
|
187
|
-
"data-date-op":
|
|
188
|
-
"aria-pressed":
|
|
187
|
+
"data-date-op": r.op,
|
|
188
|
+
"aria-pressed": d === r.op,
|
|
189
189
|
onClick: () => {
|
|
190
|
-
y(
|
|
190
|
+
y(r.op), g && v(r.op, g, x);
|
|
191
191
|
},
|
|
192
192
|
className: b(
|
|
193
193
|
"rounded border px-1 py-1 text-[11px] leading-tight transition-colors",
|
|
194
|
-
|
|
194
|
+
d === r.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"
|
|
195
195
|
),
|
|
196
|
-
children:
|
|
196
|
+
children: r.label
|
|
197
197
|
},
|
|
198
|
-
|
|
198
|
+
r.op
|
|
199
199
|
)) }),
|
|
200
200
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
201
201
|
/* @__PURE__ */ e(
|
|
@@ -203,21 +203,21 @@ function Rt({
|
|
|
203
203
|
{
|
|
204
204
|
type: "date",
|
|
205
205
|
value: g,
|
|
206
|
-
onChange: (
|
|
207
|
-
|
|
206
|
+
onChange: (r) => {
|
|
207
|
+
k(r.target.value), d !== "between" && v(d, r.target.value, "");
|
|
208
208
|
},
|
|
209
209
|
className: "h-7 flex-1 rounded border border-slate-200 bg-background px-1 text-[12px] dark:border-border"
|
|
210
210
|
}
|
|
211
211
|
),
|
|
212
|
-
|
|
212
|
+
d === "between" && /* @__PURE__ */ s(H, { children: [
|
|
213
213
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "to" }),
|
|
214
214
|
/* @__PURE__ */ e(
|
|
215
215
|
"input",
|
|
216
216
|
{
|
|
217
217
|
type: "date",
|
|
218
218
|
value: x,
|
|
219
|
-
onChange: (
|
|
220
|
-
h(
|
|
219
|
+
onChange: (r) => {
|
|
220
|
+
h(r.target.value), v("between", g, r.target.value);
|
|
221
221
|
},
|
|
222
222
|
className: "h-7 flex-1 rounded border border-slate-200 bg-background px-1 text-[12px] dark:border-border"
|
|
223
223
|
}
|
|
@@ -227,13 +227,13 @@ function Rt({
|
|
|
227
227
|
] })
|
|
228
228
|
] });
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
value:
|
|
230
|
+
function Mt({
|
|
231
|
+
value: a,
|
|
232
232
|
placeholder: i,
|
|
233
|
-
unit:
|
|
233
|
+
unit: c,
|
|
234
234
|
onChange: o
|
|
235
235
|
}) {
|
|
236
|
-
const [u, l] = O(!1), [
|
|
236
|
+
const [u, l] = O(!1), [d, y] = a.split(":"), g = c ?? "", k = d && y ? `${d}–${y}${g}` : d ? `${d}${g}+` : y ? `≤ ${y}${g}` : i, x = (h, v) => o(h === "" && v === "" ? null : `${h}:${v}`);
|
|
237
237
|
return /* @__PURE__ */ s(G, { open: u, onOpenChange: l, children: [
|
|
238
238
|
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ s(
|
|
239
239
|
"button",
|
|
@@ -245,11 +245,11 @@ function Et({
|
|
|
245
245
|
/* @__PURE__ */ e(
|
|
246
246
|
"span",
|
|
247
247
|
{
|
|
248
|
-
className: b("truncate", !
|
|
249
|
-
children:
|
|
248
|
+
className: b("truncate", !d && !y && "text-slate-500 dark:text-muted-foreground"),
|
|
249
|
+
children: k
|
|
250
250
|
}
|
|
251
251
|
),
|
|
252
|
-
|
|
252
|
+
d || y ? /* @__PURE__ */ e(
|
|
253
253
|
I,
|
|
254
254
|
{
|
|
255
255
|
className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
|
|
@@ -265,25 +265,25 @@ function Et({
|
|
|
265
265
|
/* @__PURE__ */ e("p", { className: "pb-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: i }),
|
|
266
266
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
267
267
|
/* @__PURE__ */ e(
|
|
268
|
-
|
|
268
|
+
j,
|
|
269
269
|
{
|
|
270
270
|
type: "number",
|
|
271
271
|
"aria-label": `Minimum ${i}`,
|
|
272
272
|
placeholder: "Min",
|
|
273
|
-
value:
|
|
273
|
+
value: d ?? "",
|
|
274
274
|
onChange: (h) => x(h.target.value, y ?? ""),
|
|
275
275
|
className: "h-7 text-[12px]"
|
|
276
276
|
}
|
|
277
277
|
),
|
|
278
278
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "–" }),
|
|
279
279
|
/* @__PURE__ */ e(
|
|
280
|
-
|
|
280
|
+
j,
|
|
281
281
|
{
|
|
282
282
|
type: "number",
|
|
283
283
|
"aria-label": `Maximum ${i}`,
|
|
284
284
|
placeholder: "Max",
|
|
285
285
|
value: y ?? "",
|
|
286
|
-
onChange: (h) => x(
|
|
286
|
+
onChange: (h) => x(d ?? "", h.target.value),
|
|
287
287
|
className: "h-7 text-[12px]"
|
|
288
288
|
}
|
|
289
289
|
)
|
|
@@ -291,19 +291,19 @@ function Et({
|
|
|
291
291
|
] })
|
|
292
292
|
] });
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
value:
|
|
294
|
+
function Et({
|
|
295
|
+
value: a,
|
|
296
296
|
placeholder: i,
|
|
297
|
-
onChange:
|
|
297
|
+
onChange: c
|
|
298
298
|
}) {
|
|
299
|
-
const [o, u] = O(!1), l = Se(
|
|
300
|
-
|
|
299
|
+
const [o, u] = O(!1), l = Se(a), [d, y] = O((l == null ? void 0 : l.op) ?? "eq"), [g, k] = O(l ? String(l.a) : ""), [x, h] = O((l == null ? void 0 : l.b) != null ? String(l.b) : "");
|
|
300
|
+
Q(() => {
|
|
301
301
|
if (!o) return;
|
|
302
|
-
const
|
|
303
|
-
y((
|
|
304
|
-
}, [o,
|
|
305
|
-
const
|
|
306
|
-
S === "" || Number.isNaN(Number(S)) ||
|
|
302
|
+
const r = Se(a);
|
|
303
|
+
y((r == null ? void 0 : r.op) ?? "eq"), k(r ? String(r.a) : ""), h((r == null ? void 0 : r.b) != null ? String(r.b) : "");
|
|
304
|
+
}, [o, a]);
|
|
305
|
+
const v = (r, S, N) => {
|
|
306
|
+
S === "" || Number.isNaN(Number(S)) || r === "between" && (N === "" || Number.isNaN(Number(N))) || c(bt({ op: r, a: Number(S), b: N === "" ? void 0 : Number(N) }));
|
|
307
307
|
};
|
|
308
308
|
return /* @__PURE__ */ s(G, { open: o, onOpenChange: u, children: [
|
|
309
309
|
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ s(
|
|
@@ -313,13 +313,13 @@ function Mt({
|
|
|
313
313
|
"data-number-filter": !0,
|
|
314
314
|
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",
|
|
315
315
|
children: [
|
|
316
|
-
/* @__PURE__ */ e("span", { className: b("truncate", !l && "text-slate-500 dark:text-muted-foreground"), children: l ?
|
|
316
|
+
/* @__PURE__ */ e("span", { className: b("truncate", !l && "text-slate-500 dark:text-muted-foreground"), children: l ? ot(l) : i }),
|
|
317
317
|
l ? /* @__PURE__ */ e(
|
|
318
318
|
I,
|
|
319
319
|
{
|
|
320
320
|
className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
|
|
321
|
-
onClick: (
|
|
322
|
-
|
|
321
|
+
onClick: (r) => {
|
|
322
|
+
r.stopPropagation(), c(null);
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
) : /* @__PURE__ */ e(K, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
|
|
@@ -327,44 +327,44 @@ function Mt({
|
|
|
327
327
|
}
|
|
328
328
|
) }),
|
|
329
329
|
/* @__PURE__ */ s(ee, { align: "start", className: "w-[220px] space-y-2 p-2", children: [
|
|
330
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-4 gap-1", children:
|
|
330
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-4 gap-1", children: ct.map((r) => /* @__PURE__ */ e(
|
|
331
331
|
"button",
|
|
332
332
|
{
|
|
333
333
|
type: "button",
|
|
334
|
-
"data-number-op":
|
|
335
|
-
"aria-pressed":
|
|
334
|
+
"data-number-op": r.op,
|
|
335
|
+
"aria-pressed": d === r.op,
|
|
336
336
|
onClick: () => {
|
|
337
|
-
y(
|
|
337
|
+
y(r.op), v(r.op, g, x);
|
|
338
338
|
},
|
|
339
339
|
className: b(
|
|
340
340
|
"rounded border px-1 py-1 text-[11px] transition-colors",
|
|
341
|
-
|
|
341
|
+
d === r.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"
|
|
342
342
|
),
|
|
343
|
-
children:
|
|
343
|
+
children: r.symbol
|
|
344
344
|
},
|
|
345
|
-
|
|
345
|
+
r.op
|
|
346
346
|
)) }),
|
|
347
347
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
348
348
|
/* @__PURE__ */ e(
|
|
349
|
-
|
|
349
|
+
j,
|
|
350
350
|
{
|
|
351
351
|
type: "number",
|
|
352
352
|
value: g,
|
|
353
|
-
onChange: (
|
|
354
|
-
|
|
353
|
+
onChange: (r) => {
|
|
354
|
+
k(r.target.value), v(d, r.target.value, x);
|
|
355
355
|
},
|
|
356
356
|
className: "h-7 text-[12px]"
|
|
357
357
|
}
|
|
358
358
|
),
|
|
359
|
-
|
|
359
|
+
d === "between" && /* @__PURE__ */ s(H, { children: [
|
|
360
360
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "–" }),
|
|
361
361
|
/* @__PURE__ */ e(
|
|
362
|
-
|
|
362
|
+
j,
|
|
363
363
|
{
|
|
364
364
|
type: "number",
|
|
365
365
|
value: x,
|
|
366
|
-
onChange: (
|
|
367
|
-
h(
|
|
366
|
+
onChange: (r) => {
|
|
367
|
+
h(r.target.value), v(d, g, r.target.value);
|
|
368
368
|
},
|
|
369
369
|
className: "h-7 text-[12px]"
|
|
370
370
|
}
|
|
@@ -374,68 +374,68 @@ function Mt({
|
|
|
374
374
|
] })
|
|
375
375
|
] });
|
|
376
376
|
}
|
|
377
|
-
function
|
|
378
|
-
def:
|
|
377
|
+
function Fe({
|
|
378
|
+
def: a,
|
|
379
379
|
value: i,
|
|
380
|
-
onChange:
|
|
380
|
+
onChange: c,
|
|
381
381
|
layout: o = "inline"
|
|
382
382
|
}) {
|
|
383
|
-
const u = o === "stacked", l = o === "cell",
|
|
384
|
-
let
|
|
385
|
-
if (
|
|
386
|
-
|
|
387
|
-
|
|
383
|
+
const u = o === "stacked", l = o === "cell", d = typeof i == "string" ? i : "", y = u || l ? "w-full" : "w-40", g = l ? "h-7 text-[12px]" : "text-[13px]";
|
|
384
|
+
let k;
|
|
385
|
+
if (a.type === "text")
|
|
386
|
+
k = /* @__PURE__ */ e(
|
|
387
|
+
j,
|
|
388
388
|
{
|
|
389
389
|
className: b("h-8 border-slate-200 bg-slate-50", g, y),
|
|
390
|
-
placeholder:
|
|
391
|
-
value:
|
|
392
|
-
onChange: (x) =>
|
|
390
|
+
placeholder: a.placeholder,
|
|
391
|
+
value: d,
|
|
392
|
+
onChange: (x) => c(x.target.value)
|
|
393
393
|
}
|
|
394
394
|
);
|
|
395
|
-
else if (
|
|
396
|
-
|
|
395
|
+
else if (a.type === "combobox")
|
|
396
|
+
k = /* @__PURE__ */ e(
|
|
397
397
|
"div",
|
|
398
398
|
{
|
|
399
399
|
className: b(
|
|
400
400
|
(u || l) && "[&>button]:w-full",
|
|
401
401
|
l && "[&>button]:h-7 [&>button]:min-w-[88px] [&>button]:px-1.5 [&>button]:text-[12px]"
|
|
402
402
|
),
|
|
403
|
-
children: /* @__PURE__ */ e(zt, { def:
|
|
403
|
+
children: /* @__PURE__ */ e(zt, { def: a, value: i, onChange: c })
|
|
404
404
|
}
|
|
405
405
|
);
|
|
406
|
-
else if (
|
|
407
|
-
|
|
406
|
+
else if (a.type === "date")
|
|
407
|
+
k = /* @__PURE__ */ e("div", { className: b(l && "[&>div>button]:h-7 [&>div>button]:text-[12px]", y), children: /* @__PURE__ */ e(
|
|
408
408
|
Rt,
|
|
409
409
|
{
|
|
410
|
-
value:
|
|
411
|
-
placeholder:
|
|
412
|
-
onChange: (x) =>
|
|
410
|
+
value: d,
|
|
411
|
+
placeholder: a.placeholder,
|
|
412
|
+
onChange: (x) => c(x ?? "")
|
|
413
413
|
}
|
|
414
414
|
) });
|
|
415
|
-
else if (
|
|
416
|
-
|
|
417
|
-
|
|
415
|
+
else if (a.type === "number")
|
|
416
|
+
k = /* @__PURE__ */ e("div", { className: b(l && "[&>div>button]:h-7 [&>div>button]:text-[12px]", y), children: /* @__PURE__ */ e(
|
|
417
|
+
Et,
|
|
418
418
|
{
|
|
419
|
-
value:
|
|
420
|
-
placeholder:
|
|
421
|
-
onChange: (x) =>
|
|
419
|
+
value: d,
|
|
420
|
+
placeholder: a.placeholder,
|
|
421
|
+
onChange: (x) => c(x ?? "")
|
|
422
422
|
}
|
|
423
423
|
) });
|
|
424
|
-
else if (
|
|
425
|
-
|
|
426
|
-
|
|
424
|
+
else if (a.type === "range" && l)
|
|
425
|
+
k = /* @__PURE__ */ e("div", { className: "[&>div>button]:h-7 [&>div>button]:text-[12px] w-full", children: /* @__PURE__ */ e(
|
|
426
|
+
Mt,
|
|
427
427
|
{
|
|
428
|
-
value:
|
|
429
|
-
placeholder:
|
|
430
|
-
unit:
|
|
431
|
-
onChange: (x) =>
|
|
428
|
+
value: d,
|
|
429
|
+
placeholder: a.placeholder,
|
|
430
|
+
unit: a.range_unit,
|
|
431
|
+
onChange: (x) => c(x ?? "")
|
|
432
432
|
}
|
|
433
433
|
) });
|
|
434
|
-
else if (
|
|
435
|
-
const [x, h] =
|
|
436
|
-
|
|
434
|
+
else if (a.type === "range") {
|
|
435
|
+
const [x, h] = d.split(":");
|
|
436
|
+
k = /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
437
437
|
/* @__PURE__ */ e(
|
|
438
|
-
|
|
438
|
+
j,
|
|
439
439
|
{
|
|
440
440
|
type: "number",
|
|
441
441
|
className: b(
|
|
@@ -445,12 +445,12 @@ function Re({
|
|
|
445
445
|
),
|
|
446
446
|
placeholder: "Min",
|
|
447
447
|
value: x ?? "",
|
|
448
|
-
onChange: (
|
|
448
|
+
onChange: (v) => c(`${v.target.value}:${h ?? ""}`)
|
|
449
449
|
}
|
|
450
450
|
),
|
|
451
451
|
/* @__PURE__ */ e("span", { className: "text-[12px] text-slate-400", children: "–" }),
|
|
452
452
|
/* @__PURE__ */ e(
|
|
453
|
-
|
|
453
|
+
j,
|
|
454
454
|
{
|
|
455
455
|
type: "number",
|
|
456
456
|
className: b(
|
|
@@ -460,22 +460,22 @@ function Re({
|
|
|
460
460
|
),
|
|
461
461
|
placeholder: "Max",
|
|
462
462
|
value: h ?? "",
|
|
463
|
-
onChange: (
|
|
463
|
+
onChange: (v) => c(`${x ?? ""}:${v.target.value}`)
|
|
464
464
|
}
|
|
465
465
|
)
|
|
466
466
|
] });
|
|
467
467
|
} else
|
|
468
|
-
|
|
469
|
-
/* @__PURE__ */ e(
|
|
470
|
-
/* @__PURE__ */ s(
|
|
471
|
-
/* @__PURE__ */ e(ze, { value: "__all__", children:
|
|
472
|
-
(
|
|
468
|
+
k = /* @__PURE__ */ s(Nt, { value: d === "" ? "__all__" : d, onValueChange: (h) => c(h === "__all__" ? "" : h), children: [
|
|
469
|
+
/* @__PURE__ */ e(wt, { className: b("h-8 border-slate-200 bg-slate-50", g, y), children: /* @__PURE__ */ e(_t, { placeholder: a.placeholder }) }),
|
|
470
|
+
/* @__PURE__ */ s(Ot, { children: [
|
|
471
|
+
/* @__PURE__ */ e(ze, { value: "__all__", children: a.placeholder }),
|
|
472
|
+
(a.options ?? []).filter((h) => h.value !== "").map((h) => /* @__PURE__ */ e(ze, { value: h.value, children: h.label }, h.value))
|
|
473
473
|
] })
|
|
474
474
|
] });
|
|
475
475
|
return u ? /* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
476
476
|
/* @__PURE__ */ s("span", { className: "flex items-center gap-1.5 text-[11px] font-medium text-slate-500 dark:text-muted-foreground", children: [
|
|
477
|
-
Ft(
|
|
478
|
-
|
|
477
|
+
Ft(a),
|
|
478
|
+
a.restricted && /* @__PURE__ */ e(
|
|
479
479
|
"span",
|
|
480
480
|
{
|
|
481
481
|
title: "Options limited to your restricted scope",
|
|
@@ -484,124 +484,124 @@ function Re({
|
|
|
484
484
|
}
|
|
485
485
|
)
|
|
486
486
|
] }),
|
|
487
|
-
|
|
488
|
-
] }) :
|
|
487
|
+
k
|
|
488
|
+
] }) : a.restricted ? /* @__PURE__ */ e(
|
|
489
489
|
"div",
|
|
490
490
|
{
|
|
491
491
|
title: "Options limited to your restricted scope",
|
|
492
492
|
className: "[&_button]:!border-amber-400 [&_input]:!border-amber-400 dark:[&_button]:!border-amber-500/60 dark:[&_input]:!border-amber-500/60",
|
|
493
|
-
children:
|
|
493
|
+
children: k
|
|
494
494
|
}
|
|
495
|
-
) : /* @__PURE__ */ e(
|
|
495
|
+
) : /* @__PURE__ */ e(H, { children: k });
|
|
496
496
|
}
|
|
497
|
-
function Ft(
|
|
498
|
-
return
|
|
497
|
+
function Ft(a) {
|
|
498
|
+
return a.placeholder.replace(/^Search\s+/i, "").replace(/[…]|\.{3}$/g, "");
|
|
499
499
|
}
|
|
500
|
-
function Gt(
|
|
501
|
-
const
|
|
500
|
+
function Gt(a, i) {
|
|
501
|
+
const c = (o) => {
|
|
502
502
|
var u, l;
|
|
503
|
-
return ((l = (u =
|
|
503
|
+
return ((l = (u = a.options) == null ? void 0 : u.find((d) => d.value === o)) == null ? void 0 : l.label) ?? o;
|
|
504
504
|
};
|
|
505
505
|
if (Array.isArray(i)) {
|
|
506
|
-
const o = i.map(
|
|
506
|
+
const o = i.map(c);
|
|
507
507
|
return o.slice(0, 2).join(", ") + (o.length > 2 ? ` +${o.length - 2}` : "");
|
|
508
508
|
}
|
|
509
|
-
if (
|
|
509
|
+
if (a.type === "range") {
|
|
510
510
|
const [o, u] = i.split(":");
|
|
511
511
|
return [o && `≥${o}`, u && `≤${u}`].filter(Boolean).join(" ");
|
|
512
512
|
}
|
|
513
|
-
return
|
|
513
|
+
return c(i);
|
|
514
514
|
}
|
|
515
515
|
function Pt({
|
|
516
|
-
columns:
|
|
516
|
+
columns: a,
|
|
517
517
|
rows: i,
|
|
518
|
-
rowKey:
|
|
518
|
+
rowKey: c,
|
|
519
519
|
total: o,
|
|
520
520
|
page: u,
|
|
521
521
|
limit: l = 25,
|
|
522
|
-
isLoading:
|
|
522
|
+
isLoading: d,
|
|
523
523
|
isError: y,
|
|
524
524
|
errorMessage: g,
|
|
525
|
-
sort:
|
|
525
|
+
sort: k = "",
|
|
526
526
|
onSortChange: x,
|
|
527
527
|
onPageChange: h,
|
|
528
|
-
onRowClick:
|
|
529
|
-
onRowContextMenu:
|
|
528
|
+
onRowClick: v,
|
|
529
|
+
onRowContextMenu: r,
|
|
530
530
|
searchValue: S,
|
|
531
|
-
onSearchChange:
|
|
532
|
-
searchPlaceholder:
|
|
533
|
-
filterDefs:
|
|
534
|
-
filterValues:
|
|
531
|
+
onSearchChange: N,
|
|
532
|
+
searchPlaceholder: Y = "Search…",
|
|
533
|
+
filterDefs: R,
|
|
534
|
+
filterValues: J = {},
|
|
535
535
|
onFilterChange: m,
|
|
536
|
-
toolbarRight:
|
|
537
|
-
emptyMessage:
|
|
538
|
-
minBodyHeight:
|
|
539
|
-
fillHeight:
|
|
540
|
-
footer:
|
|
541
|
-
hideFilterRow:
|
|
542
|
-
nowrapCells:
|
|
543
|
-
density:
|
|
544
|
-
pinFirstColumn:
|
|
536
|
+
toolbarRight: F,
|
|
537
|
+
emptyMessage: M = "No records found.",
|
|
538
|
+
minBodyHeight: E,
|
|
539
|
+
fillHeight: te = !1,
|
|
540
|
+
footer: je,
|
|
541
|
+
hideFilterRow: Ae = !1,
|
|
542
|
+
nowrapCells: Le = !1,
|
|
543
|
+
density: re = "comfortable",
|
|
544
|
+
pinFirstColumn: V = !1,
|
|
545
545
|
columnPins: f,
|
|
546
|
-
onColumnPinChange:
|
|
547
|
-
columnFilterRow:
|
|
548
|
-
hScrollProxy:
|
|
549
|
-
selectedIds:
|
|
550
|
-
onSelectionChange:
|
|
551
|
-
rowClassName:
|
|
552
|
-
rowDragProps:
|
|
553
|
-
rowTitle:
|
|
554
|
-
enterKey:
|
|
555
|
-
rowGroups:
|
|
556
|
-
collapsedGroups:
|
|
557
|
-
onToggleGroup:
|
|
546
|
+
onColumnPinChange: ae,
|
|
547
|
+
columnFilterRow: We = !1,
|
|
548
|
+
hScrollProxy: pe = !1,
|
|
549
|
+
selectedIds: T,
|
|
550
|
+
onSelectionChange: C,
|
|
551
|
+
rowClassName: le,
|
|
552
|
+
rowDragProps: ne,
|
|
553
|
+
rowTitle: se,
|
|
554
|
+
enterKey: qe,
|
|
555
|
+
rowGroups: A,
|
|
556
|
+
collapsedGroups: ie,
|
|
557
|
+
onToggleGroup: de
|
|
558
558
|
}) {
|
|
559
|
-
const
|
|
560
|
-
!t.sortable || !x || x($t(
|
|
561
|
-
}, _ = f !== void 0,
|
|
562
|
-
if (!_ || !f) return
|
|
563
|
-
const t =
|
|
559
|
+
const he = Math.ceil(o / l), Be = (u - 1) * l + 1, Ue = Math.min(u * l, o), me = !Ae && R && R.length > 0, Je = S !== void 0 || me || F !== void 0, Xe = (t) => {
|
|
560
|
+
!t.sortable || !x || x($t(k, t.key));
|
|
561
|
+
}, _ = f !== void 0, L = _e(() => {
|
|
562
|
+
if (!_ || !f) return a;
|
|
563
|
+
const t = a.filter((z) => f[z.key] === "left"), n = a.filter((z) => f[z.key] === "right"), p = a.filter((z) => !f[z.key]);
|
|
564
564
|
return [...t, ...p, ...n];
|
|
565
|
-
}, [
|
|
566
|
-
|
|
567
|
-
const t =
|
|
565
|
+
}, [a, f, _]), ue = D({}), X = D(null), xe = D(null), fe = !d && (A ? A.length === 0 : i.length === 0), [ye, He] = O(null);
|
|
566
|
+
Q(() => {
|
|
567
|
+
const t = X.current;
|
|
568
568
|
if (!fe || !t) return;
|
|
569
|
-
const n = () =>
|
|
569
|
+
const n = () => He(t.clientWidth);
|
|
570
570
|
if (n(), typeof ResizeObserver > "u") return;
|
|
571
571
|
const p = new ResizeObserver(n);
|
|
572
572
|
return p.observe(t), () => p.disconnect();
|
|
573
573
|
}, [fe]);
|
|
574
|
-
const [ge,
|
|
575
|
-
|
|
576
|
-
const t =
|
|
574
|
+
const [ge, Qe] = O({}), [, Ye] = O(0);
|
|
575
|
+
Q(() => {
|
|
576
|
+
const t = X.current;
|
|
577
577
|
if (!_ || !t || typeof ResizeObserver > "u") return;
|
|
578
|
-
const n = new ResizeObserver(() =>
|
|
578
|
+
const n = new ResizeObserver(() => Ye(t.clientWidth));
|
|
579
579
|
return n.observe(t), () => n.disconnect();
|
|
580
|
-
}, [_,
|
|
581
|
-
var
|
|
580
|
+
}, [_, d]), nt(() => {
|
|
581
|
+
var Ne, we;
|
|
582
582
|
if (!_ || !f) return;
|
|
583
583
|
const t = (w) => {
|
|
584
|
-
var
|
|
585
|
-
return ((
|
|
586
|
-
}, n =
|
|
587
|
-
|
|
588
|
-
|
|
584
|
+
var W;
|
|
585
|
+
return ((W = ue.current[w]) == null ? void 0 : W.getBoundingClientRect().width) ?? 120;
|
|
586
|
+
}, n = C ? ((Ne = xe.current) == null ? void 0 : Ne.getBoundingClientRect().width) ?? 40 : 0, { left: p, right: z } = pt(
|
|
587
|
+
L.filter((w) => f[w.key] === "left").map((w) => w.key),
|
|
588
|
+
L.filter((w) => f[w.key] === "right").map((w) => w.key),
|
|
589
589
|
t,
|
|
590
590
|
n,
|
|
591
|
-
((we =
|
|
591
|
+
((we = X.current) == null ? void 0 : we.clientWidth) ?? 0
|
|
592
592
|
), $ = {};
|
|
593
|
-
let
|
|
594
|
-
p.forEach((w,
|
|
595
|
-
$[w] = { side: "left", offset: Math.floor(
|
|
593
|
+
let q = n;
|
|
594
|
+
p.forEach((w, W) => {
|
|
595
|
+
$[w] = { side: "left", offset: Math.floor(q), seam: W === p.length - 1 }, q += t(w);
|
|
596
596
|
});
|
|
597
|
-
let
|
|
598
|
-
for (let w =
|
|
599
|
-
const
|
|
600
|
-
$[
|
|
597
|
+
let ve = 0;
|
|
598
|
+
for (let w = z.length - 1; w >= 0; w--) {
|
|
599
|
+
const W = z[w];
|
|
600
|
+
$[W] = { side: "right", offset: Math.floor(ve), seam: w === 0 }, ve += t(W);
|
|
601
601
|
}
|
|
602
|
-
|
|
602
|
+
Qe((w) => JSON.stringify(w) === JSON.stringify($) ? w : $);
|
|
603
603
|
});
|
|
604
|
-
const
|
|
604
|
+
const oe = (t) => {
|
|
605
605
|
const n = ge[t];
|
|
606
606
|
if (!(!_ || !n))
|
|
607
607
|
return n.side === "left" ? { left: n.offset } : { right: n.offset };
|
|
@@ -617,65 +617,65 @@ function Pt({
|
|
|
617
617
|
p.side === "left" && p.seam && "border-r border-slate-200 dark:border-border",
|
|
618
618
|
p.side === "right" && p.seam && "border-l border-slate-200 dark:border-border"
|
|
619
619
|
);
|
|
620
|
-
},
|
|
621
|
-
if (!
|
|
620
|
+
}, Ze = (t) => {
|
|
621
|
+
if (!ae) return;
|
|
622
622
|
const n = (f == null ? void 0 : f[t]) ?? null;
|
|
623
|
-
|
|
624
|
-
},
|
|
623
|
+
ae(t, n === null ? "left" : n === "left" ? "right" : null);
|
|
624
|
+
}, De = _e(() => {
|
|
625
625
|
const t = /* @__PURE__ */ new Map();
|
|
626
|
-
for (const n of
|
|
626
|
+
for (const n of R ?? []) t.set(n.key, n);
|
|
627
627
|
return t;
|
|
628
|
-
}, [
|
|
629
|
-
const p =
|
|
628
|
+
}, [R]), Ke = We && ((R == null ? void 0 : R.length) ?? 0) > 0, ke = (t, n) => {
|
|
629
|
+
const p = c ? c(t, n) : String(n), z = (T == null ? void 0 : T.includes(p)) ?? !1;
|
|
630
630
|
return /* @__PURE__ */ s(
|
|
631
|
-
|
|
631
|
+
B,
|
|
632
632
|
{
|
|
633
|
-
...
|
|
633
|
+
...ne == null ? void 0 : ne(t),
|
|
634
634
|
className: b(
|
|
635
635
|
// NAMED group: queue cells already use bare `group-hover:` against
|
|
636
636
|
// their own local group, and claiming the unnamed one here would
|
|
637
637
|
// make those reveal on row hover instead.
|
|
638
638
|
"group/row nvr-row-enter border-slate-100 transition-colors duration-150",
|
|
639
|
-
(
|
|
640
|
-
|
|
641
|
-
|
|
639
|
+
(V || _) && "bg-white dark:bg-card",
|
|
640
|
+
v && (V || _ ? "cursor-pointer hover:bg-slate-50 dark:hover:bg-muted" : "cursor-pointer hover:bg-slate-50/80"),
|
|
641
|
+
le == null ? void 0 : le(t),
|
|
642
642
|
// Pinned sticky cells use bg-inherit, so a selected row's bg must be
|
|
643
643
|
// OPAQUE or horizontally-scrolled content bleeds through the pinned
|
|
644
644
|
// column. bg-nvr-cyan/5 is semi-transparent — use an opaque equivalent
|
|
645
645
|
// (5% nvr-cyan #00ceff over white / card) when pinning.
|
|
646
|
-
|
|
646
|
+
z && (V || _ ? "bg-[#f2fdff] dark:bg-[#20303a]" : "bg-nvr-cyan/5")
|
|
647
647
|
),
|
|
648
648
|
style: { animationDelay: `${Math.min(n, 14) * 16}ms` },
|
|
649
649
|
"data-row-key": p,
|
|
650
|
-
title:
|
|
651
|
-
onClick: () =>
|
|
652
|
-
onContextMenu:
|
|
650
|
+
title: se == null ? void 0 : se(t),
|
|
651
|
+
onClick: () => v == null ? void 0 : v(t),
|
|
652
|
+
onContextMenu: r ? ($) => r(t, $) : void 0,
|
|
653
653
|
children: [
|
|
654
|
-
|
|
654
|
+
C && /* @__PURE__ */ e(
|
|
655
655
|
Z,
|
|
656
656
|
{
|
|
657
657
|
className: b(
|
|
658
658
|
"w-9 px-3",
|
|
659
|
-
|
|
660
|
-
(
|
|
659
|
+
re === "compact" ? "py-1" : "py-2",
|
|
660
|
+
(V || _) && "sticky left-0 z-[1] min-w-[40px] bg-inherit"
|
|
661
661
|
),
|
|
662
662
|
onClick: ($) => {
|
|
663
|
-
$.stopPropagation(),
|
|
663
|
+
$.stopPropagation(), C(z ? (T == null ? void 0 : T.filter((q) => q !== p)) ?? [] : [...T ?? [], p]);
|
|
664
664
|
},
|
|
665
|
-
children: /* @__PURE__ */ e(Ce, { checked:
|
|
665
|
+
children: /* @__PURE__ */ e(Ce, { checked: z, "aria-label": "Select row" })
|
|
666
666
|
}
|
|
667
667
|
),
|
|
668
|
-
|
|
668
|
+
L.map(($, q) => /* @__PURE__ */ e(
|
|
669
669
|
Z,
|
|
670
670
|
{
|
|
671
|
-
style:
|
|
671
|
+
style: oe($.key),
|
|
672
672
|
className: b(
|
|
673
673
|
"px-3",
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
!_ &&
|
|
674
|
+
re === "compact" ? "py-1" : "py-2",
|
|
675
|
+
Le && "whitespace-nowrap",
|
|
676
|
+
!_ && V && q === 0 && b(
|
|
677
677
|
"sticky z-[1] border-r border-slate-100 bg-inherit dark:border-border",
|
|
678
|
-
|
|
678
|
+
C ? "left-[39px]" : "left-0"
|
|
679
679
|
),
|
|
680
680
|
ce($.key, !1),
|
|
681
681
|
$.className
|
|
@@ -689,88 +689,121 @@ function Pt({
|
|
|
689
689
|
p
|
|
690
690
|
);
|
|
691
691
|
};
|
|
692
|
-
return /* @__PURE__ */ s(
|
|
693
|
-
/* @__PURE__ */ e(
|
|
692
|
+
return /* @__PURE__ */ s(H, { children: [
|
|
693
|
+
/* @__PURE__ */ e(ht, {}),
|
|
694
694
|
y && g && /* @__PURE__ */ e("div", { className: "mb-4 rounded-md border border-red-200 bg-red-50 px-4 py-2.5 text-[13px] text-red-700", children: g }),
|
|
695
695
|
/* @__PURE__ */ s(
|
|
696
696
|
"div",
|
|
697
697
|
{
|
|
698
698
|
className: b(
|
|
699
699
|
"overflow-hidden rounded-lg border border-slate-200 bg-white",
|
|
700
|
-
|
|
700
|
+
te && "flex h-full min-h-0 flex-col"
|
|
701
701
|
),
|
|
702
702
|
children: [
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
/* @__PURE__ */ e(
|
|
703
|
+
Je && /* @__PURE__ */ s("div", { className: "flex items-center gap-2 border-b border-slate-100 px-3 py-2.5", children: [
|
|
704
|
+
N !== void 0 && /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
705
|
+
/* @__PURE__ */ e(Ie, { className: "absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
|
|
706
706
|
/* @__PURE__ */ e(
|
|
707
|
-
|
|
707
|
+
j,
|
|
708
708
|
{
|
|
709
709
|
className: "h-8 w-56 border-slate-200 bg-slate-50 pl-8 text-[13px]",
|
|
710
|
-
placeholder:
|
|
710
|
+
placeholder: Y,
|
|
711
711
|
value: S ?? "",
|
|
712
|
-
onChange: (t) =>
|
|
712
|
+
onChange: (t) => N(t.target.value)
|
|
713
713
|
}
|
|
714
714
|
)
|
|
715
715
|
] }),
|
|
716
|
-
me && (
|
|
717
|
-
|
|
716
|
+
me && (R == null ? void 0 : R.map((t) => /* @__PURE__ */ e(
|
|
717
|
+
Fe,
|
|
718
718
|
{
|
|
719
719
|
def: t,
|
|
720
|
-
value:
|
|
720
|
+
value: J[t.key] ?? "",
|
|
721
721
|
onChange: (n) => m == null ? void 0 : m(t.key, n)
|
|
722
722
|
},
|
|
723
723
|
t.key
|
|
724
724
|
))),
|
|
725
725
|
/* @__PURE__ */ e("div", { className: "flex-1" }),
|
|
726
|
-
|
|
726
|
+
F
|
|
727
727
|
] }),
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
728
|
+
d ? (
|
|
729
|
+
// #3229 — the real header (same labels, h-9) over rows with the real cell padding
|
|
730
|
+
// and line height for this density, in the body's real minimum height: the table
|
|
731
|
+
// keeps its shape when the rows land.
|
|
732
|
+
/* @__PURE__ */ e(
|
|
733
|
+
"div",
|
|
734
|
+
{
|
|
735
|
+
"data-skeleton": "table",
|
|
736
|
+
"aria-busy": "true",
|
|
737
|
+
className: b(te && "min-h-0 flex-1 overflow-hidden"),
|
|
738
|
+
style: E ? { minHeight: E } : void 0,
|
|
739
|
+
children: /* @__PURE__ */ s(Re, { className: "border-separate border-spacing-0", children: [
|
|
740
|
+
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ s(B, { className: "border-b border-slate-200 hover:bg-transparent", children: [
|
|
741
|
+
C && /* @__PURE__ */ e(U, { className: "h-9 w-9 border-b border-slate-200 bg-slate-50 px-3 py-0 dark:border-border dark:bg-muted" }),
|
|
742
|
+
L.map((t) => /* @__PURE__ */ e(
|
|
743
|
+
U,
|
|
744
|
+
{
|
|
745
|
+
className: b(
|
|
746
|
+
"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",
|
|
747
|
+
t.headerClassName
|
|
748
|
+
),
|
|
749
|
+
children: t.header
|
|
750
|
+
},
|
|
751
|
+
t.key
|
|
752
|
+
))
|
|
753
|
+
] }) }),
|
|
754
|
+
/* @__PURE__ */ e(Ee, { children: /* @__PURE__ */ e(
|
|
755
|
+
xt,
|
|
756
|
+
{
|
|
757
|
+
columns: L.map((t) => ({ key: t.key })),
|
|
758
|
+
rows: Math.min(Math.max(l ?? St.length, 1), 15),
|
|
759
|
+
rowClassName: "",
|
|
760
|
+
cellClassName: b("px-3", re === "compact" ? "py-1" : "py-2"),
|
|
761
|
+
leadingCells: C ? 1 : 0
|
|
762
|
+
}
|
|
763
|
+
) })
|
|
764
|
+
] })
|
|
765
|
+
}
|
|
766
|
+
)
|
|
767
|
+
) : /* @__PURE__ */ s(H, { children: [
|
|
735
768
|
/* @__PURE__ */ e(
|
|
736
769
|
"div",
|
|
737
770
|
{
|
|
738
|
-
ref:
|
|
771
|
+
ref: X,
|
|
739
772
|
className: b(
|
|
740
|
-
|
|
773
|
+
pe && "overflow-x-hidden [&>div]:overflow-visible",
|
|
741
774
|
// Bounded mode: rows scroll here under a sticky header. Header
|
|
742
775
|
// cells sit above pinned body cells (z-[1/2]); the pinned
|
|
743
776
|
// header corner (left-0) tops the other header cells so
|
|
744
777
|
// horizontal scroll cannot bleed through it.
|
|
745
|
-
|
|
778
|
+
te && "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]"
|
|
746
779
|
),
|
|
747
|
-
style:
|
|
780
|
+
style: E ? { minHeight: E } : void 0,
|
|
748
781
|
children: /* @__PURE__ */ s(
|
|
749
|
-
|
|
782
|
+
Re,
|
|
750
783
|
{
|
|
751
784
|
"data-copy-cells": "",
|
|
752
785
|
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]",
|
|
753
786
|
children: [
|
|
754
|
-
/* @__PURE__ */ s(
|
|
755
|
-
/* @__PURE__ */ s(
|
|
756
|
-
|
|
757
|
-
|
|
787
|
+
/* @__PURE__ */ s(Me, { children: [
|
|
788
|
+
/* @__PURE__ */ s(B, { className: "border-b border-slate-200 hover:bg-transparent", children: [
|
|
789
|
+
C && /* @__PURE__ */ e(
|
|
790
|
+
U,
|
|
758
791
|
{
|
|
759
792
|
ref: xe,
|
|
760
793
|
className: b(
|
|
761
794
|
"h-9 w-9 bg-slate-50 px-3 py-0",
|
|
762
|
-
(
|
|
795
|
+
(V || _) && "sticky left-0 z-[2] min-w-[40px]"
|
|
763
796
|
),
|
|
764
797
|
children: /* @__PURE__ */ e(
|
|
765
798
|
Ce,
|
|
766
799
|
{
|
|
767
800
|
checked: i.length > 0 && i.every((t, n) => {
|
|
768
|
-
const p =
|
|
769
|
-
return
|
|
801
|
+
const p = c ? c(t, n) : String(n);
|
|
802
|
+
return T == null ? void 0 : T.includes(p);
|
|
770
803
|
}),
|
|
771
804
|
onCheckedChange: (t) => {
|
|
772
|
-
|
|
773
|
-
t ? i.map((n, p) =>
|
|
805
|
+
C(
|
|
806
|
+
t ? i.map((n, p) => c ? c(n, p) : String(p)) : []
|
|
774
807
|
);
|
|
775
808
|
},
|
|
776
809
|
"aria-label": "Select all"
|
|
@@ -778,34 +811,34 @@ function Pt({
|
|
|
778
811
|
)
|
|
779
812
|
}
|
|
780
813
|
),
|
|
781
|
-
|
|
782
|
-
|
|
814
|
+
L.map((t, n) => /* @__PURE__ */ e(
|
|
815
|
+
U,
|
|
783
816
|
{
|
|
784
817
|
ref: (p) => {
|
|
785
818
|
ue.current[t.key] = p;
|
|
786
819
|
},
|
|
787
|
-
style:
|
|
820
|
+
style: oe(t.key),
|
|
788
821
|
className: b(
|
|
789
822
|
"group/th h-9 whitespace-nowrap bg-slate-50 px-3 py-0 text-[11px] font-medium text-slate-500",
|
|
790
823
|
t.sortable && x && "cursor-pointer select-none hover:text-slate-600",
|
|
791
|
-
!_ &&
|
|
824
|
+
!_ && V && n === 0 && b(
|
|
792
825
|
"sticky z-[2] border-r border-slate-200 dark:border-border",
|
|
793
|
-
|
|
826
|
+
C ? "left-[39px]" : "left-0"
|
|
794
827
|
),
|
|
795
828
|
_ && "bg-slate-50 dark:bg-muted",
|
|
796
829
|
ce(t.key, !0),
|
|
797
830
|
t.headerClassName
|
|
798
831
|
),
|
|
799
|
-
onClick: () =>
|
|
832
|
+
onClick: () => Xe(t),
|
|
800
833
|
children: /* @__PURE__ */ s("span", { className: "inline-flex items-center", children: [
|
|
801
834
|
t.header,
|
|
802
|
-
t.sortable && x && /* @__PURE__ */ e(Ct, { field: t.key, sort:
|
|
803
|
-
_ &&
|
|
835
|
+
t.sortable && x && /* @__PURE__ */ e(Ct, { field: t.key, sort: k }),
|
|
836
|
+
_ && ae && t.key !== "claim" && /* @__PURE__ */ e(
|
|
804
837
|
"button",
|
|
805
838
|
{
|
|
806
839
|
type: "button",
|
|
807
840
|
onClick: (p) => {
|
|
808
|
-
p.stopPropagation(),
|
|
841
|
+
p.stopPropagation(), Ze(t.key);
|
|
809
842
|
},
|
|
810
843
|
"aria-label": `Pin column ${t.key}`,
|
|
811
844
|
title: (f == null ? void 0 : f[t.key]) === "left" ? "Pinned left — click to pin right" : (f == null ? void 0 : f[t.key]) === "right" ? "Pinned right — click to unpin" : "Pin column",
|
|
@@ -814,7 +847,7 @@ function Pt({
|
|
|
814
847
|
f != null && f[t.key] ? "text-nvr-cyan opacity-100" : "text-slate-300 opacity-0 hover:text-slate-500 group-hover/th:opacity-100"
|
|
815
848
|
),
|
|
816
849
|
children: /* @__PURE__ */ e(
|
|
817
|
-
|
|
850
|
+
Ge,
|
|
818
851
|
{
|
|
819
852
|
className: b(
|
|
820
853
|
"h-3 w-3",
|
|
@@ -829,32 +862,32 @@ function Pt({
|
|
|
829
862
|
t.key
|
|
830
863
|
))
|
|
831
864
|
] }),
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
865
|
+
Ke && /* @__PURE__ */ s(B, { className: "border-b border-slate-200 hover:bg-transparent", children: [
|
|
866
|
+
C && /* @__PURE__ */ e(
|
|
867
|
+
U,
|
|
835
868
|
{
|
|
836
869
|
className: b(
|
|
837
870
|
"h-9 w-9 bg-slate-50 px-3 py-1",
|
|
838
|
-
(
|
|
871
|
+
(V || _) && "sticky left-0 z-[2] min-w-[40px]"
|
|
839
872
|
)
|
|
840
873
|
}
|
|
841
874
|
),
|
|
842
|
-
|
|
843
|
-
const n =
|
|
875
|
+
L.map((t) => {
|
|
876
|
+
const n = De.get(t.key);
|
|
844
877
|
return /* @__PURE__ */ e(
|
|
845
|
-
|
|
878
|
+
U,
|
|
846
879
|
{
|
|
847
|
-
style:
|
|
880
|
+
style: oe(t.key),
|
|
848
881
|
className: b(
|
|
849
882
|
"h-9 bg-slate-50 px-1.5 py-1 align-middle",
|
|
850
883
|
_ && "bg-slate-50 dark:bg-muted",
|
|
851
884
|
ce(t.key, !0)
|
|
852
885
|
),
|
|
853
886
|
children: n && m ? /* @__PURE__ */ e(
|
|
854
|
-
|
|
887
|
+
Fe,
|
|
855
888
|
{
|
|
856
889
|
def: n,
|
|
857
|
-
value:
|
|
890
|
+
value: J[n.key] ?? "",
|
|
858
891
|
onChange: (p) => m(n.key, p),
|
|
859
892
|
layout: "cell"
|
|
860
893
|
}
|
|
@@ -865,23 +898,23 @@ function Pt({
|
|
|
865
898
|
})
|
|
866
899
|
] })
|
|
867
900
|
] }),
|
|
868
|
-
/* @__PURE__ */ s(
|
|
869
|
-
|
|
870
|
-
const n = (
|
|
871
|
-
return /* @__PURE__ */ s(
|
|
901
|
+
/* @__PURE__ */ s(Ee, { className: "tabular-nums", children: [
|
|
902
|
+
A ? A.map((t) => {
|
|
903
|
+
const n = (ie == null ? void 0 : ie.has(t.key)) ?? !1;
|
|
904
|
+
return /* @__PURE__ */ s(lt.Fragment, { children: [
|
|
872
905
|
/* @__PURE__ */ e(
|
|
873
|
-
|
|
906
|
+
B,
|
|
874
907
|
{
|
|
875
908
|
className: "nvr-row-enter cursor-pointer border-slate-200 bg-slate-50/80 transition-colors hover:bg-slate-100/80 dark:bg-muted/40",
|
|
876
|
-
onClick: () =>
|
|
909
|
+
onClick: () => de == null ? void 0 : de(t.key),
|
|
877
910
|
children: /* @__PURE__ */ e(
|
|
878
911
|
Z,
|
|
879
912
|
{
|
|
880
|
-
colSpan:
|
|
913
|
+
colSpan: a.length + (C ? 1 : 0),
|
|
881
914
|
className: "px-3 py-1.5",
|
|
882
915
|
children: /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5 text-[12px] font-medium text-slate-600 dark:text-foreground", children: [
|
|
883
916
|
/* @__PURE__ */ e(
|
|
884
|
-
|
|
917
|
+
Pe,
|
|
885
918
|
{
|
|
886
919
|
className: b(
|
|
887
920
|
"h-3.5 w-3.5 text-slate-400 transition-transform duration-200",
|
|
@@ -895,41 +928,41 @@ function Pt({
|
|
|
895
928
|
)
|
|
896
929
|
}
|
|
897
930
|
),
|
|
898
|
-
!n && t.rows.map((p,
|
|
931
|
+
!n && t.rows.map((p, z) => ke(p, z))
|
|
899
932
|
] }, t.key);
|
|
900
|
-
}) : i.map((t, n) =>
|
|
901
|
-
(
|
|
933
|
+
}) : i.map((t, n) => ke(t, n)),
|
|
934
|
+
(A ? A.length === 0 : i.length === 0) && /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(
|
|
902
935
|
Z,
|
|
903
936
|
{
|
|
904
|
-
colSpan:
|
|
937
|
+
colSpan: a.length + (C ? 1 : 0),
|
|
905
938
|
className: "nvr-fade-in p-0 text-center align-middle text-[13px] text-slate-400",
|
|
906
|
-
style:
|
|
939
|
+
style: E ? { height: Math.max(96, E - 56) } : void 0,
|
|
907
940
|
children: /* @__PURE__ */ e(
|
|
908
941
|
"div",
|
|
909
942
|
{
|
|
910
943
|
className: "sticky left-0 py-12",
|
|
911
944
|
style: ye ? { width: ye } : void 0,
|
|
912
945
|
"data-table-empty": !0,
|
|
913
|
-
children: typeof
|
|
946
|
+
children: typeof M == "string" ? /* @__PURE__ */ e(mt, { icon: et, title: M }) : M
|
|
914
947
|
}
|
|
915
948
|
)
|
|
916
949
|
}
|
|
917
950
|
) })
|
|
918
|
-
] },
|
|
951
|
+
] }, qe)
|
|
919
952
|
]
|
|
920
953
|
}
|
|
921
954
|
)
|
|
922
955
|
}
|
|
923
956
|
),
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
!
|
|
957
|
+
pe && /* @__PURE__ */ e(ut, { scrollerRef: X }),
|
|
958
|
+
je,
|
|
959
|
+
!A && o > l && /* @__PURE__ */ s("div", { className: "flex items-center justify-between border-t border-slate-100 px-4 py-2.5", children: [
|
|
927
960
|
/* @__PURE__ */ s("p", { className: "text-[12px] text-slate-400", children: [
|
|
928
|
-
|
|
961
|
+
be(Be),
|
|
929
962
|
"–",
|
|
930
|
-
|
|
963
|
+
be(Ue),
|
|
931
964
|
" of ",
|
|
932
|
-
|
|
965
|
+
be(o),
|
|
933
966
|
" records"
|
|
934
967
|
] }),
|
|
935
968
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
@@ -947,7 +980,7 @@ function Pt({
|
|
|
947
980
|
/* @__PURE__ */ s("span", { className: "px-2 text-[12px] text-slate-400", children: [
|
|
948
981
|
u,
|
|
949
982
|
" / ",
|
|
950
|
-
|
|
983
|
+
he
|
|
951
984
|
] }),
|
|
952
985
|
/* @__PURE__ */ e(
|
|
953
986
|
$e,
|
|
@@ -955,7 +988,7 @@ function Pt({
|
|
|
955
988
|
variant: "ghost",
|
|
956
989
|
size: "sm",
|
|
957
990
|
className: "h-7 px-2.5 text-[12px] text-slate-600",
|
|
958
|
-
disabled: u >=
|
|
991
|
+
disabled: u >= he,
|
|
959
992
|
onClick: () => h(u + 1),
|
|
960
993
|
children: "Next →"
|
|
961
994
|
}
|
|
@@ -970,7 +1003,7 @@ function Pt({
|
|
|
970
1003
|
}
|
|
971
1004
|
export {
|
|
972
1005
|
Pt as DataTable,
|
|
973
|
-
|
|
1006
|
+
Fe as FilterControl,
|
|
974
1007
|
Ft as filterDefLabel,
|
|
975
1008
|
Gt as filterValueDisplay
|
|
976
1009
|
};
|