@nivaro/react 0.3.10 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/full.css +1 -1
- package/dist/hooks/useNivaroForm.js +1 -1
- package/dist/hooks/useSessionRecorder.js +109 -102
- package/dist/index.d.ts +34 -3
- package/dist/shared/components/CollectionBrowserView.js +1546 -1477
- package/dist/shared/components/ItemEditForm.js +4332 -4195
- package/dist/shared/components/PageRenderer.js +512 -465
- package/dist/shared/components/ProfileView.js +115 -109
- package/dist/shared/components/QueryStatStrip.js +74 -70
- package/dist/shared/components/ReportView.js +818 -827
- package/dist/shared/components/SheetHeaderBody.js +16 -14
- package/dist/shared/components/chat/ChatPanel.js +492 -472
- package/dist/shared/components/item-edit/CatalogPickerField.js +1029 -933
- package/dist/shared/components/item-edit/FieldRenderer.js +161 -156
- package/dist/shared/components/item-edit/FieldRow.js +20 -19
- package/dist/shared/components/item-edit/FilePickerField.js +52 -40
- package/dist/shared/components/item-edit/GroupSection.js +221 -221
- package/dist/shared/components/item-edit/InlineGridField.js +41 -41
- package/dist/shared/components/item-edit/InlineTableField.js +2249 -2238
- package/dist/shared/components/item-edit/M2MCombobox.js +46 -44
- package/dist/shared/components/item-edit/NestedRelationEditor.js +11 -11
- package/dist/shared/components/item-edit/QuickPicker.js +263 -216
- package/dist/shared/components/item-edit/RelationCombobox.js +285 -245
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +42 -32
- package/dist/shared/components/item-edit/RowHistorySheet.js +130 -134
- package/dist/shared/components/item-edit/SummaryPanel.js +305 -279
- package/dist/shared/components/item-edit/UserChip.js +301 -233
- package/dist/shared/components/item-edit/helpers.js +133 -134
- package/dist/shared/components/item-edit/line-qty.js +57 -0
- package/dist/shared/components/item-edit/option-disambiguate.js +53 -0
- package/dist/shared/components/panels/AddendumLinesDiff.js +87 -90
- package/dist/shared/components/panels/CommentPanel.js +350 -315
- package/dist/shared/components/panels/ItemLockBanner.js +297 -230
- package/dist/shared/components/panels/PipelinePanel.js +719 -701
- package/dist/shared/components/profile/PersonAdminTools.js +168 -144
- package/dist/shared/components/profile/PersonProfile.js +42 -41
- package/dist/shared/components/profile/session-actions.js +52 -0
- package/dist/shared/components/queue/QueueQuickFilters.js +43 -41
- package/dist/shared/components/queue/QueueWorklist.js +1005 -935
- package/dist/shared/components/widgets/ReviewListWidget.js +99 -93
- package/dist/shared/lib/obligation-banner.js +14 -13
- package/dist/shared/lib/obligation-reason-text.js +13 -0
- package/dist/shared/lib/query-filter-seed.js +34 -11
- package/dist/shared/lib/replay-checkout.js +20 -0
- package/dist/shared/lib/sanitize-html.js +24 -15
- package/dist/shared/lib/sheet-def.js +38 -22
- package/dist/shared/lib/unique-options.js +10 -0
- package/dist/shared/lib/utils.js +57 -43
- package/dist/shared/lib/validation-rules.js +58 -34
- package/package.json +1 -1
|
@@ -5,25 +5,25 @@ import { cn as l } from "../../lib/utils.js";
|
|
|
5
5
|
import { Tabs as A, TabsList as I, TabsTrigger as S, TabsContent as o } from "../ui/tabs.js";
|
|
6
6
|
import { DayTimelineCard as T } from "./DayTimeline.js";
|
|
7
7
|
import { DelegationCard as P } from "./DelegationCard.js";
|
|
8
|
-
import { SuspensionBanner as U, AccessCard as D, UserScopesCard as F, UserDirectoryCard as
|
|
9
|
-
import { AccessSummaryCard as
|
|
10
|
-
import { StatsCard as
|
|
11
|
-
import { ForceReloadCard as B,
|
|
12
|
-
import { PersonAiMemoryCard as
|
|
13
|
-
import { CompareAccessCard as
|
|
14
|
-
import { WorkingOnCard as
|
|
15
|
-
import { PersonHeader as
|
|
16
|
-
import { AboutCard as
|
|
17
|
-
import { PersonWeekCard as
|
|
18
|
-
import { usePersonProfile as
|
|
19
|
-
function
|
|
8
|
+
import { SuspensionBanner as U, AccessCard as D, UserScopesCard as F, UserDirectoryCard as O, SessionsCard as j, ApiTokenCard as E } from "./PersonAccess.js";
|
|
9
|
+
import { AccessSummaryCard as L } from "./PersonAccessSummary.js";
|
|
10
|
+
import { StatsCard as M, ActivityFeedCard as R, SignInsCard as V, JourneyCard as W } from "./PersonActivity.js";
|
|
11
|
+
import { ForceReloadCard as B, SignOutEverywhereCard as H, MergeCard as J, OffboardingCard as q } from "./PersonAdminTools.js";
|
|
12
|
+
import { PersonAiMemoryCard as z } from "./PersonAiMemory.js";
|
|
13
|
+
import { CompareAccessCard as G } from "./PersonCompare.js";
|
|
14
|
+
import { WorkingOnCard as K, TeamLoadCard as Q, WhyCard as X } from "./PersonExtras.js";
|
|
15
|
+
import { PersonHeader as Y } from "./PersonHeader.js";
|
|
16
|
+
import { AboutCard as Z, PeopleCard as $, AvailabilityCard as ee, ResponsibilitiesCard as re } from "./PersonOverview.js";
|
|
17
|
+
import { PersonWeekCard as ae } from "./PersonWeek.js";
|
|
18
|
+
import { usePersonProfile as de, useInvalidatePerson as se } from "./types.js";
|
|
19
|
+
function we({
|
|
20
20
|
userId: i,
|
|
21
21
|
className: n,
|
|
22
22
|
initialTab: f = "overview"
|
|
23
23
|
}) {
|
|
24
|
-
var
|
|
25
|
-
const t = _(), s = !!(t != null && t.isAdmin), { data: e, isLoading: h, isError: x } =
|
|
26
|
-
if (h || !e && !x) return /* @__PURE__ */ r(
|
|
24
|
+
var p, u, g;
|
|
25
|
+
const t = _(), s = !!(t != null && t.isAdmin), { data: e, isLoading: h, isError: x } = de(i), y = se(i), [N, C] = b(f), [c, k] = b("feed");
|
|
26
|
+
if (h || !e && !x) return /* @__PURE__ */ r(te, { className: n });
|
|
27
27
|
if (!e)
|
|
28
28
|
return /* @__PURE__ */ a(
|
|
29
29
|
"div",
|
|
@@ -39,19 +39,19 @@ function ke({
|
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
|
-
const w = !!(t != null && t.userId) && !!((
|
|
42
|
+
const w = !!(t != null && t.userId) && !!((p = e.manager) != null && p.id) && String(e.manager.id).toUpperCase() === String(t.userId).toUpperCase(), v = /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
43
43
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
44
|
-
/* @__PURE__ */ r(
|
|
45
|
-
/* @__PURE__ */ r(
|
|
44
|
+
/* @__PURE__ */ r(Z, { profile: e, isAdmin: s }),
|
|
45
|
+
/* @__PURE__ */ r(K, { profile: e }),
|
|
46
46
|
e.direct_reports.length > 0 && /* @__PURE__ */ r(
|
|
47
|
-
|
|
47
|
+
Q,
|
|
48
48
|
{
|
|
49
49
|
userId: e.id,
|
|
50
50
|
firstName: e.first_name ?? e.name,
|
|
51
51
|
expectedRows: e.direct_reports.length
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
/* @__PURE__ */ r(
|
|
54
|
+
/* @__PURE__ */ r($, { profile: e })
|
|
55
55
|
] }),
|
|
56
56
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
57
57
|
s ? /* @__PURE__ */ r(
|
|
@@ -74,13 +74,13 @@ function ke({
|
|
|
74
74
|
coversFor: e.covers_for,
|
|
75
75
|
onSaved: y
|
|
76
76
|
}
|
|
77
|
-
) : /* @__PURE__ */ r(
|
|
78
|
-
/* @__PURE__ */ r(
|
|
79
|
-
(s || w) && /* @__PURE__ */ r(
|
|
77
|
+
) : /* @__PURE__ */ r(ee, { profile: e }),
|
|
78
|
+
/* @__PURE__ */ r(re, { profile: e, isAdmin: s }),
|
|
79
|
+
(s || w) && /* @__PURE__ */ r(ae, { profile: e })
|
|
80
80
|
] })
|
|
81
81
|
] });
|
|
82
82
|
return /* @__PURE__ */ a("div", { className: l("flex flex-col gap-4", n), "data-nvr-person": e.id, children: [
|
|
83
|
-
/* @__PURE__ */ r(
|
|
83
|
+
/* @__PURE__ */ r(Y, { profile: e, isAdmin: s }),
|
|
84
84
|
s && /* @__PURE__ */ r(U, { profile: e }),
|
|
85
85
|
s ? /* @__PURE__ */ a(A, { value: N, onValueChange: (d) => C(d), children: [
|
|
86
86
|
/* @__PURE__ */ r(
|
|
@@ -105,19 +105,19 @@ function ke({
|
|
|
105
105
|
))
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
|
-
/* @__PURE__ */ r(o, { value: "overview", className: "mt-4 focus-visible:outline-none", children:
|
|
108
|
+
/* @__PURE__ */ r(o, { value: "overview", className: "mt-4 focus-visible:outline-none", children: v }),
|
|
109
109
|
/* @__PURE__ */ r(o, { value: "access", className: "mt-4 focus-visible:outline-none", children: /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
110
110
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
111
111
|
/* @__PURE__ */ r(D, { profile: e }),
|
|
112
|
-
/* @__PURE__ */ r(
|
|
112
|
+
/* @__PURE__ */ r(L, { userId: e.id }),
|
|
113
113
|
/* @__PURE__ */ r(F, { userId: e.id }),
|
|
114
|
-
/* @__PURE__ */ r(
|
|
115
|
-
/* @__PURE__ */ r(
|
|
114
|
+
/* @__PURE__ */ r(X, { profile: e }),
|
|
115
|
+
/* @__PURE__ */ r(G, { profile: e })
|
|
116
116
|
] }),
|
|
117
117
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
118
|
-
/* @__PURE__ */ r(
|
|
119
|
-
/* @__PURE__ */ r(
|
|
120
|
-
/* @__PURE__ */ r(
|
|
118
|
+
/* @__PURE__ */ r(O, { profile: e }),
|
|
119
|
+
/* @__PURE__ */ r(j, { userId: e.id }),
|
|
120
|
+
/* @__PURE__ */ r(E, { profile: e })
|
|
121
121
|
] })
|
|
122
122
|
] }) }),
|
|
123
123
|
/* @__PURE__ */ a(o, { value: "activity", className: "mt-4 focus-visible:outline-none", children: [
|
|
@@ -151,29 +151,30 @@ function ke({
|
|
|
151
151
|
),
|
|
152
152
|
c === "day" && s ? /* @__PURE__ */ r(T, { userId: e.id }) : /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
153
153
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
154
|
-
/* @__PURE__ */ r(
|
|
155
|
-
/* @__PURE__ */ r(
|
|
154
|
+
/* @__PURE__ */ r(M, { userId: e.id }),
|
|
155
|
+
/* @__PURE__ */ r(R, { userId: e.id })
|
|
156
156
|
] }),
|
|
157
157
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
158
|
-
/* @__PURE__ */ r(
|
|
159
|
-
/* @__PURE__ */ r(
|
|
158
|
+
/* @__PURE__ */ r(V, { profile: e }),
|
|
159
|
+
/* @__PURE__ */ r(W, { userId: e.id })
|
|
160
160
|
] })
|
|
161
161
|
] })
|
|
162
162
|
] }),
|
|
163
163
|
/* @__PURE__ */ r(o, { value: "tools", className: "mt-4 focus-visible:outline-none", children: /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
164
164
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
165
165
|
/* @__PURE__ */ r(B, { profile: e }),
|
|
166
|
-
/* @__PURE__ */ r(H, { profile: e })
|
|
166
|
+
/* @__PURE__ */ r(H, { profile: e }),
|
|
167
|
+
/* @__PURE__ */ r(J, { profile: e })
|
|
167
168
|
] }),
|
|
168
169
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
169
|
-
/* @__PURE__ */ r(
|
|
170
|
-
/* @__PURE__ */ r(
|
|
170
|
+
/* @__PURE__ */ r(q, { profile: e }),
|
|
171
|
+
/* @__PURE__ */ r(z, { profile: e })
|
|
171
172
|
] })
|
|
172
173
|
] }) })
|
|
173
|
-
] }) :
|
|
174
|
+
] }) : v
|
|
174
175
|
] });
|
|
175
176
|
}
|
|
176
|
-
function
|
|
177
|
+
function te({ className: i }) {
|
|
177
178
|
return /* @__PURE__ */ a("div", { className: l("flex animate-pulse flex-col gap-4", i), "aria-busy": "true", children: [
|
|
178
179
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-5 rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: [
|
|
179
180
|
/* @__PURE__ */ r("div", { className: "h-[76px] w-[76px] rounded-full bg-slate-100 dark:bg-muted" }),
|
|
@@ -190,5 +191,5 @@ function se({ className: i }) {
|
|
|
190
191
|
] });
|
|
191
192
|
}
|
|
192
193
|
export {
|
|
193
|
-
|
|
194
|
+
we as PersonProfile
|
|
194
195
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useMutation as i } from "@tanstack/react-query";
|
|
2
|
+
import { toast as s } from "sonner";
|
|
3
|
+
import { useOptionalNivaroClient as u } from "../../context.js";
|
|
4
|
+
import { post as c } from "../../lib/commands.js";
|
|
5
|
+
import { errorText as d } from "./types.js";
|
|
6
|
+
function h(e) {
|
|
7
|
+
const o = e.remembered ? ` Tabs that connect in the next ${e.remember_hours ?? 24} h reload too.` : "";
|
|
8
|
+
return (e.sockets > 0 ? `Reload pushed to ${e.sockets} open tab${e.sockets === 1 ? "" : "s"}${e.partial ? " (another server did not answer — there may be more)" : ""}.` : e.partial ? "Reload sent — another server did not answer, so their open tabs could not be counted." : e.nodes != null ? "Reload sent — they have no tab open right now." : "Reload sent to every tab they have open (tabs on other servers are not counted).") + o;
|
|
9
|
+
}
|
|
10
|
+
function l(e, o) {
|
|
11
|
+
return o > 0 ? `${e} is signed out of ${o} session${o === 1 ? "" : "s"} — every open tab goes back to sign-in.` : `${e} had no session open.`;
|
|
12
|
+
}
|
|
13
|
+
function $(e, o = {}) {
|
|
14
|
+
const r = u();
|
|
15
|
+
return i({
|
|
16
|
+
mutationFn: (n = {}) => {
|
|
17
|
+
if (!r) throw new Error("Not connected");
|
|
18
|
+
return r.request(
|
|
19
|
+
c("/realtime/force-refresh", {
|
|
20
|
+
user_ids: [e],
|
|
21
|
+
seconds: n.seconds ?? 15,
|
|
22
|
+
message: n.message ?? ""
|
|
23
|
+
})
|
|
24
|
+
).then((t) => t.data);
|
|
25
|
+
},
|
|
26
|
+
onSuccess: (n) => {
|
|
27
|
+
var t;
|
|
28
|
+
s.success(h(n)), (t = o.onDone) == null || t.call(o);
|
|
29
|
+
},
|
|
30
|
+
onError: (n) => s.error(d(n, "Failed to push the reload"))
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function w(e, o, r = {}) {
|
|
34
|
+
const n = u();
|
|
35
|
+
return i({
|
|
36
|
+
mutationFn: () => {
|
|
37
|
+
if (!n) throw new Error("Not connected");
|
|
38
|
+
return n.request(c(`/security/users/${e}/sign-out`)).then((t) => t.data);
|
|
39
|
+
},
|
|
40
|
+
onSuccess: (t) => {
|
|
41
|
+
var a;
|
|
42
|
+
s.success(l(o, t.revoked)), (a = r.onDone) == null || a.call(r);
|
|
43
|
+
},
|
|
44
|
+
onError: (t) => s.error(d(t, "Could not sign them out"))
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
h as reloadPushedText,
|
|
49
|
+
l as signedOutText,
|
|
50
|
+
$ as useReloadTheirTabs,
|
|
51
|
+
w as useSignOutEverywhere
|
|
52
|
+
};
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { jsxs as g, jsx as s, Fragment as
|
|
1
|
+
import { jsxs as g, jsx as s, Fragment as f } from "react/jsx-runtime";
|
|
2
2
|
import { useQuery as S } from "@tanstack/react-query";
|
|
3
|
-
import { useState as
|
|
3
|
+
import { useState as d, useEffect as C, useMemo as N } from "react";
|
|
4
4
|
import { MultiPick as x } from "../CollectionBrowserView.js";
|
|
5
|
-
const
|
|
6
|
-
function
|
|
5
|
+
const b = (t) => Array.isArray(t) ? t : t ? [t] : [];
|
|
6
|
+
function O({
|
|
7
7
|
def: t,
|
|
8
|
-
selected:
|
|
9
|
-
onChange:
|
|
10
|
-
badge:
|
|
8
|
+
selected: a,
|
|
9
|
+
onChange: k,
|
|
10
|
+
badge: p
|
|
11
11
|
}) {
|
|
12
|
-
const [
|
|
13
|
-
queryKey: ["queue-quick-facet", t.key,
|
|
14
|
-
queryFn: () => l ? l(
|
|
15
|
-
enabled: !!l && (
|
|
12
|
+
const [h, i] = d(!1), [y, c] = d(""), l = t.loadOptions, { data: u = [], isLoading: e } = S({
|
|
13
|
+
queryKey: ["queue-quick-facet", t.key, y],
|
|
14
|
+
queryFn: () => l ? l(y) : Promise.resolve([]),
|
|
15
|
+
enabled: !!l && (h || a.length > 0),
|
|
16
16
|
staleTime: 6e4
|
|
17
|
-
}), r =
|
|
18
|
-
const
|
|
19
|
-
return [...u, ...
|
|
20
|
-
}, [u,
|
|
17
|
+
}), r = N(() => {
|
|
18
|
+
const o = new Set(u.map((n) => n.value));
|
|
19
|
+
return [...u, ...a.filter((n) => !o.has(n)).map((n) => ({ label: n, value: n }))];
|
|
20
|
+
}, [u, a]);
|
|
21
21
|
return /* @__PURE__ */ s(
|
|
22
22
|
x,
|
|
23
23
|
{
|
|
24
24
|
label: t.placeholder,
|
|
25
25
|
options: r,
|
|
26
|
-
selected:
|
|
27
|
-
onChange: (
|
|
26
|
+
selected: a,
|
|
27
|
+
onChange: (o) => k(o.map(String)),
|
|
28
28
|
loading: e,
|
|
29
|
-
badge:
|
|
29
|
+
badge: p,
|
|
30
30
|
onSearch: c,
|
|
31
|
-
onOpenChange: (
|
|
32
|
-
|
|
31
|
+
onOpenChange: (o) => {
|
|
32
|
+
o && i(!0);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
function Q({
|
|
38
38
|
defs: t,
|
|
39
|
-
values:
|
|
40
|
-
seededKeys:
|
|
41
|
-
onApply:
|
|
42
|
-
onClear:
|
|
39
|
+
values: a,
|
|
40
|
+
seededKeys: k,
|
|
41
|
+
onApply: p,
|
|
42
|
+
onClear: h,
|
|
43
43
|
right: i
|
|
44
44
|
}) {
|
|
45
|
-
const
|
|
46
|
-
|
|
45
|
+
const y = JSON.stringify(t.map((e) => [e.key, b(a[e.key])])), [c, l] = d({});
|
|
46
|
+
C(() => {
|
|
47
47
|
const e = {};
|
|
48
|
-
for (const r of t) e[r.key] =
|
|
48
|
+
for (const r of t) e[r.key] = b(a[r.key]);
|
|
49
49
|
l(e);
|
|
50
|
-
}, [
|
|
50
|
+
}, [y]);
|
|
51
51
|
const u = t.some(
|
|
52
|
-
(e) => JSON.stringify(c[e.key] ?? []) !== JSON.stringify(
|
|
52
|
+
(e) => JSON.stringify(c[e.key] ?? []) !== JSON.stringify(b(a[e.key]))
|
|
53
53
|
);
|
|
54
54
|
return t.length === 0 && !i ? null : /* @__PURE__ */ g(
|
|
55
55
|
"div",
|
|
@@ -58,28 +58,30 @@ function Q({
|
|
|
58
58
|
"data-queue-quick-filters": !0,
|
|
59
59
|
children: [
|
|
60
60
|
t.map((e) => {
|
|
61
|
-
const r = c[e.key] ?? [],
|
|
61
|
+
const r = c[e.key] ?? [], o = e.restricted ? {
|
|
62
62
|
label: "restricted",
|
|
63
63
|
cls: "bg-amber-500/15 text-amber-700 dark:text-amber-300",
|
|
64
64
|
title: `Options limited to your restricted ${e.placeholder} scope`
|
|
65
|
-
} :
|
|
66
|
-
label: "default",
|
|
65
|
+
} : k.has(e.key) && r.length > 0 ? {
|
|
66
|
+
label: "your default",
|
|
67
67
|
cls: "bg-nvr-cyan/[0.12] text-[#0284a8] dark:text-nvr-cyan",
|
|
68
68
|
title: `Pre-selected from your default ${e.placeholder} scope — adjust freely`
|
|
69
|
-
} : null, n = (
|
|
70
|
-
|
|
69
|
+
} : null, n = (m) => {
|
|
70
|
+
l((q) => ({ ...q, [e.key]: m })), m.length === 0 && b(a[e.key]).length > 0 && p({ [e.key]: e.multi || e.type === "combobox" ? [] : "" });
|
|
71
|
+
};
|
|
72
|
+
return e.loadOptions ? /* @__PURE__ */ s(O, { def: e, selected: r, onChange: n, badge: o }, e.key) : /* @__PURE__ */ s(
|
|
71
73
|
x,
|
|
72
74
|
{
|
|
73
75
|
label: e.placeholder,
|
|
74
76
|
options: e.options ?? [],
|
|
75
77
|
selected: r,
|
|
76
|
-
onChange: (
|
|
77
|
-
badge:
|
|
78
|
+
onChange: (m) => n(m.map(String)),
|
|
79
|
+
badge: o
|
|
78
80
|
},
|
|
79
81
|
e.key
|
|
80
82
|
);
|
|
81
83
|
}),
|
|
82
|
-
t.length > 0 && /* @__PURE__ */ g(
|
|
84
|
+
t.length > 0 && /* @__PURE__ */ g(f, { children: [
|
|
83
85
|
/* @__PURE__ */ s(
|
|
84
86
|
"button",
|
|
85
87
|
{
|
|
@@ -87,10 +89,10 @@ function Q({
|
|
|
87
89
|
onClick: () => {
|
|
88
90
|
const e = {};
|
|
89
91
|
for (const r of t) {
|
|
90
|
-
const
|
|
91
|
-
e[r.key] = r.multi || r.type === "combobox" ?
|
|
92
|
+
const o = c[r.key] ?? [];
|
|
93
|
+
e[r.key] = r.multi || r.type === "combobox" ? o : o[0] ?? "";
|
|
92
94
|
}
|
|
93
|
-
|
|
95
|
+
p(e);
|
|
94
96
|
},
|
|
95
97
|
className: `h-6 rounded px-2.5 text-[11px] font-semibold text-white transition-[filter] hover:brightness-110 ${u ? "bg-nvr-cyan" : "bg-nvr-cyan opacity-60"}`,
|
|
96
98
|
"data-queue-quick-apply": !0,
|
|
@@ -101,7 +103,7 @@ function Q({
|
|
|
101
103
|
"button",
|
|
102
104
|
{
|
|
103
105
|
type: "button",
|
|
104
|
-
onClick:
|
|
106
|
+
onClick: h,
|
|
105
107
|
className: "h-6 rounded border border-slate-200 px-2 text-[11px] text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400 dark:hover:text-slate-200",
|
|
106
108
|
"data-queue-quick-clear": !0,
|
|
107
109
|
children: "Clear"
|