@nivaro/react 0.3.37 → 0.3.39
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e, Fragment as R } from "react/jsx-runtime";
|
|
2
2
|
import { useQueryClient as oe, useQuery as X, useMutation as Y } from "@tanstack/react-query";
|
|
3
|
-
import { FileSpreadsheet as Ne, Download as Z, RotateCcw as ve, Undo2 as ee, Ban as we, ArrowRight as ye, AlertTriangle as Ce, Loader2 as H, Search as
|
|
3
|
+
import { FileSpreadsheet as Ne, Download as Z, RotateCcw as ve, Undo2 as ee, Ban as we, ArrowRight as ye, AlertTriangle as Ce, Loader2 as H, Search as $e, ChevronDown as ie, ChevronRight as ce, Check as ue, Copy as me, ExternalLink as _e } from "lucide-react";
|
|
4
4
|
import { useState as N, useEffect as he, useMemo as pe } from "react";
|
|
5
5
|
import { useNivaroClient as te, useApiFetchConfig as Re, useItemNavigation as Se } from "../../context.js";
|
|
6
6
|
import { useDebounced as Te } from "../../hooks/useDebounced.js";
|
|
@@ -465,7 +465,7 @@ function Ae({
|
|
|
465
465
|
v
|
|
466
466
|
),
|
|
467
467
|
children: [
|
|
468
|
-
/* @__PURE__ */ e(
|
|
468
|
+
/* @__PURE__ */ e(_e, { className: "h-3 w-3" }),
|
|
469
469
|
" Open the record"
|
|
470
470
|
]
|
|
471
471
|
}
|
|
@@ -499,10 +499,10 @@ function Ie({
|
|
|
499
499
|
var O, U, z;
|
|
500
500
|
const p = te(), u = oe(), { download: s, busy: g, error: r } = ke(), [f, x] = N(""), [m, Q] = N(null), [w, L] = N(1), [q, D] = N(null), C = Te(f, 300);
|
|
501
501
|
he(() => L(1), [o, m, C, t]);
|
|
502
|
-
const
|
|
503
|
-
queryKey: ["staged-import-run-items", t,
|
|
502
|
+
const $ = { kind: o ?? "", collection: m ?? "", search: C, page: w, limit: B }, y = X({
|
|
503
|
+
queryKey: ["staged-import-run-items", t, $],
|
|
504
504
|
queryFn: () => p.request(
|
|
505
|
-
xe(`/staged-imports/${t}/items`,
|
|
505
|
+
xe(`/staged-imports/${t}/items`, $)
|
|
506
506
|
),
|
|
507
507
|
placeholderData: (d) => d,
|
|
508
508
|
refetchInterval: c ? fe : !1
|
|
@@ -520,14 +520,14 @@ function Ie({
|
|
|
520
520
|
var k;
|
|
521
521
|
return D(((k = d.response) == null ? void 0 : k.error) ?? d.message);
|
|
522
522
|
}
|
|
523
|
-
}), F = ((O = y.data) == null ? void 0 : O.facets) ?? {}, j = Object.keys(F.collection ?? n.collections ?? {}),
|
|
523
|
+
}), F = ((O = y.data) == null ? void 0 : O.facets) ?? {}, j = Object.keys(F.collection ?? n.collections ?? {}), _ = ((U = y.data) == null ? void 0 : U.total) ?? 0, M = ((z = y.data) == null ? void 0 : z.data) ?? [], V = n.items_stored ?? 0, W = [
|
|
524
524
|
{ key: null, label: "All", n: Object.values(F.kind ?? {}).reduce((d, k) => d + k, 0) },
|
|
525
525
|
...["created", "updated", "removed", "skipped", "failed"].map((d) => {
|
|
526
526
|
var k;
|
|
527
527
|
return { key: d, label: K[d].label, n: ((k = F.kind) == null ? void 0 : k[d]) ?? 0 };
|
|
528
528
|
}).filter((d) => d.n > 0 || d.key === o)
|
|
529
529
|
];
|
|
530
|
-
return V === 0 && !y.isLoading &&
|
|
530
|
+
return V === 0 && !y.isLoading && _ === 0 && !C && !o ? /* @__PURE__ */ a("section", { "data-run-records": !0, children: [
|
|
531
531
|
/* @__PURE__ */ e(T, { children: "Records" }),
|
|
532
532
|
/* @__PURE__ */ e("p", { className: "rounded-md border border-dashed border-slate-200 px-3 py-4 text-[12.5px] text-slate-600 dark:border-border dark:text-muted-foreground", children: "This run changed no records and left no rows out. Every row in the file already matched what is stored." })
|
|
533
533
|
] }) : /* @__PURE__ */ a("section", { "data-run-records": !0, children: [
|
|
@@ -538,7 +538,7 @@ function Ie({
|
|
|
538
538
|
P,
|
|
539
539
|
{
|
|
540
540
|
"data-run-items-download": !0,
|
|
541
|
-
disabled: g != null ||
|
|
541
|
+
disabled: g != null || _ === 0,
|
|
542
542
|
onClick: () => s(
|
|
543
543
|
`/staged-imports/${t}/items.csv?kind=${o ?? ""}&collection=${m ?? ""}&search=${encodeURIComponent(C)}`,
|
|
544
544
|
`import-run-${t}${o ? `-${o}` : ""}.csv`
|
|
@@ -607,7 +607,7 @@ function Ie({
|
|
|
607
607
|
}
|
|
608
608
|
),
|
|
609
609
|
/* @__PURE__ */ a("div", { className: "relative ml-auto w-[220px] max-w-full", children: [
|
|
610
|
-
/* @__PURE__ */ e(
|
|
610
|
+
/* @__PURE__ */ e($e, { className: "pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
|
|
611
611
|
/* @__PURE__ */ e(
|
|
612
612
|
Ke,
|
|
613
613
|
{
|
|
@@ -654,14 +654,14 @@ function Ie({
|
|
|
654
654
|
}) })
|
|
655
655
|
}
|
|
656
656
|
),
|
|
657
|
-
|
|
657
|
+
_ > B && /* @__PURE__ */ a("div", { className: "mt-2 flex items-center justify-between text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
|
|
658
658
|
/* @__PURE__ */ a("span", { className: "tabular-nums", children: [
|
|
659
659
|
h((w - 1) * B + 1),
|
|
660
660
|
"–",
|
|
661
|
-
h(Math.min(w * B,
|
|
661
|
+
h(Math.min(w * B, _)),
|
|
662
662
|
" of",
|
|
663
663
|
" ",
|
|
664
|
-
h(
|
|
664
|
+
h(_)
|
|
665
665
|
] }),
|
|
666
666
|
/* @__PURE__ */ a("span", { className: "flex items-center gap-1", children: [
|
|
667
667
|
/* @__PURE__ */ e(
|
|
@@ -681,7 +681,7 @@ function Ie({
|
|
|
681
681
|
variant: "outline",
|
|
682
682
|
size: "sm",
|
|
683
683
|
className: "h-6 px-2 text-[11.5px]",
|
|
684
|
-
disabled: w * B >=
|
|
684
|
+
disabled: w * B >= _,
|
|
685
685
|
onClick: () => L((d) => d + 1),
|
|
686
686
|
children: "Next"
|
|
687
687
|
}
|
|
@@ -907,12 +907,12 @@ function Nt({
|
|
|
907
907
|
he(() => {
|
|
908
908
|
w(null), q(!1), C(!1);
|
|
909
909
|
}, [n]);
|
|
910
|
-
const
|
|
910
|
+
const $ = Y({
|
|
911
911
|
mutationFn: () => u.request(
|
|
912
912
|
J(`/staged-imports/${n}/report/rebuild`, {})
|
|
913
913
|
),
|
|
914
914
|
onSuccess: () => void s.invalidateQueries({ queryKey: ["staged-import-run", n] })
|
|
915
|
-
}), y = r ? be(r).mode : null, E = (r == null ? void 0 : r.status) === "completed" || (r == null ? void 0 : r.status) === "error", F = l && !!f && E && (f.counts.created > 0 || f.counts.updated > 0), j = !!f,
|
|
915
|
+
}), y = r ? be(r).mode : null, E = (r == null ? void 0 : r.status) === "completed" || (r == null ? void 0 : r.status) === "error", F = l && !!f && E && (f.counts.created > 0 || f.counts.updated > 0), j = !!f, _ = pe(() => r ? /* @__PURE__ */ a("dl", { className: "mt-3 grid grid-cols-2 gap-x-5 gap-y-2 sm:grid-cols-4", children: [
|
|
916
916
|
/* @__PURE__ */ e(I, { label: "Queued by", children: ze(r) ?? "—" }),
|
|
917
917
|
/* @__PURE__ */ e(I, { label: r.finished_at ? "Finished" : r.started_at ? "Started" : "Queued", children: se(r.finished_at ?? r.started_at ?? r.created_at ?? /* @__PURE__ */ new Date()) }),
|
|
918
918
|
/* @__PURE__ */ e(I, { label: "Took", children: /* @__PURE__ */ e("span", { className: "tabular-nums", children: ne(r.duration) }) }),
|
|
@@ -952,7 +952,7 @@ function Nt({
|
|
|
952
952
|
o,
|
|
953
953
|
x != null && ` · ${ne(x)} elapsed`
|
|
954
954
|
] }),
|
|
955
|
-
|
|
955
|
+
_
|
|
956
956
|
] }),
|
|
957
957
|
/* @__PURE__ */ a("div", { className: "min-h-0 flex-1 space-y-6 overflow-y-auto px-5 py-4", children: [
|
|
958
958
|
f ? /* @__PURE__ */ a(R, { children: [
|
|
@@ -995,18 +995,18 @@ function Nt({
|
|
|
995
995
|
{
|
|
996
996
|
type: "button",
|
|
997
997
|
"data-run-rebuild": !0,
|
|
998
|
-
disabled:
|
|
999
|
-
onClick: () =>
|
|
998
|
+
disabled: $.isPending,
|
|
999
|
+
onClick: () => $.mutate(),
|
|
1000
1000
|
className: b(
|
|
1001
1001
|
"font-medium text-[#0369a1] underline-offset-2 hover:underline disabled:opacity-60 dark:text-[#7dd3fc]",
|
|
1002
1002
|
v
|
|
1003
1003
|
),
|
|
1004
|
-
children:
|
|
1004
|
+
children: $.isPending ? "Reading…" : "Read it back from recorded changes"
|
|
1005
1005
|
}
|
|
1006
1006
|
)
|
|
1007
1007
|
] })
|
|
1008
1008
|
] }),
|
|
1009
|
-
|
|
1009
|
+
$.isError && /* @__PURE__ */ e("p", { className: "mt-1.5 max-w-[64ch] text-[12px] text-slate-700 dark:text-foreground", children: ((z = $.error.response) == null ? void 0 : z.error) ?? $.error.message })
|
|
1010
1010
|
] }),
|
|
1011
1011
|
/* @__PURE__ */ a("section", { "data-run-file": !0, children: [
|
|
1012
1012
|
/* @__PURE__ */ e(T, { children: "File" }),
|
|
@@ -1019,9 +1019,10 @@ function Nt({
|
|
|
1019
1019
|
m && /* @__PURE__ */ e(
|
|
1020
1020
|
"a",
|
|
1021
1021
|
{
|
|
1022
|
-
href: m
|
|
1023
|
-
|
|
1022
|
+
href: `${m}${m.includes("?") ? "&" : "?"}download=1`,
|
|
1023
|
+
download: r.file_name ?? !0,
|
|
1024
1024
|
rel: "noreferrer",
|
|
1025
|
+
"data-run-file-download": !0,
|
|
1025
1026
|
className: b(
|
|
1026
1027
|
"rounded p-1 text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-800 dark:hover:bg-muted",
|
|
1027
1028
|
v
|
|
@@ -1,86 +1,92 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useQueryClient as D, useQuery as
|
|
3
|
-
import { Loader2 as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { toast as
|
|
2
|
+
import { useQueryClient as D, useQuery as L, useMutation as F } from "@tanstack/react-query";
|
|
3
|
+
import { Loader2 as j, EyeOff as I, CalendarClock as Q, ChevronsUpDown as R, Check as B } from "lucide-react";
|
|
4
|
+
import { useState as m, useId as K, useMemo as M } from "react";
|
|
5
|
+
import { toast as g } from "sonner";
|
|
6
6
|
import { useNivaroClient as $ } from "../../context.js";
|
|
7
7
|
import { get as V, post as q } from "../../lib/commands.js";
|
|
8
8
|
import { titleCase as W, cn as z } from "../../lib/utils.js";
|
|
9
9
|
import { Button as w } from "../ui/button.js";
|
|
10
10
|
import { Command as A, CommandInput as H, CommandList as U, CommandEmpty as G, CommandItem as J } from "../ui/command.js";
|
|
11
11
|
import { Input as S } from "../ui/input.js";
|
|
12
|
-
import { Popover as
|
|
12
|
+
import { Popover as E, PopoverTrigger as P, PopoverContent as _ } from "../ui/popover.js";
|
|
13
13
|
function O(l, r) {
|
|
14
14
|
return l instanceof Error && l.message ? l.message : r;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}) {
|
|
21
|
-
const u = $(), x = D(), m = ["picker-exclusion", l, r], { data: s } = j({
|
|
22
|
-
queryKey: m,
|
|
23
|
-
queryFn: () => u.request(
|
|
16
|
+
function X(l, r, i = {}) {
|
|
17
|
+
const s = $(), c = D(), h = ["picker-exclusion", l, r], { data: o, isLoading: p } = L({
|
|
18
|
+
queryKey: h,
|
|
19
|
+
queryFn: () => s.request(
|
|
24
20
|
V(`/picker-exclusions/status/${l}/${r}`)
|
|
25
21
|
).then((a) => a.data),
|
|
22
|
+
enabled: i.enabled ?? !0,
|
|
26
23
|
staleTime: 6e4
|
|
27
|
-
}),
|
|
24
|
+
}), d = (o == null ? void 0 : o.excluded) ?? !1, u = F({
|
|
28
25
|
mutationFn: () => {
|
|
29
|
-
const a = { collection: l, item_id: r, layout:
|
|
30
|
-
return
|
|
31
|
-
|
|
26
|
+
const a = { collection: l, item_id: r, layout: i.layoutSlug ?? null };
|
|
27
|
+
return s.request(
|
|
28
|
+
d ? { _method: "DELETE", _path: "/picker-exclusions", _body: a } : q("/picker-exclusions", a)
|
|
32
29
|
);
|
|
33
30
|
},
|
|
34
31
|
onSuccess: () => {
|
|
35
|
-
|
|
32
|
+
var a;
|
|
33
|
+
c.invalidateQueries({ queryKey: h }), g.success(d ? "Record re-enabled in pickers" : "Record excluded from pickers"), (a = i.onDone) == null || a.call(i);
|
|
36
34
|
},
|
|
37
|
-
onError: (a) =>
|
|
35
|
+
onError: (a) => g.error(O(a, "Could not change picker visibility"))
|
|
38
36
|
});
|
|
37
|
+
return { excluded: d, isLoading: p, toggle: u };
|
|
38
|
+
}
|
|
39
|
+
function de({
|
|
40
|
+
collection: l,
|
|
41
|
+
itemId: r,
|
|
42
|
+
layoutSlug: i
|
|
43
|
+
}) {
|
|
44
|
+
const { excluded: s, toggle: c } = X(l, r, { layoutSlug: i });
|
|
39
45
|
return /* @__PURE__ */ n(
|
|
40
46
|
"button",
|
|
41
47
|
{
|
|
42
48
|
type: "button",
|
|
43
49
|
"data-record-picker-exclusion": !0,
|
|
44
|
-
"data-excluded":
|
|
45
|
-
disabled:
|
|
46
|
-
onClick: () =>
|
|
47
|
-
"data-tip":
|
|
50
|
+
"data-excluded": s ? "true" : "false",
|
|
51
|
+
disabled: c.isPending,
|
|
52
|
+
onClick: () => c.mutate(),
|
|
53
|
+
"data-tip": s ? "This record is hidden from pickers — click to offer it again" : "Hide this record from every picker that would offer it",
|
|
48
54
|
className: "inline-flex items-center",
|
|
49
55
|
children: [
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
c.isPending ? /* @__PURE__ */ t(j, { className: "animate-spin" }) : /* @__PURE__ */ t(I, {}),
|
|
57
|
+
s ? "Re-enable in pickers" : "Disable in pickers"
|
|
52
58
|
]
|
|
53
59
|
}
|
|
54
60
|
);
|
|
55
61
|
}
|
|
56
|
-
function
|
|
62
|
+
function ue({
|
|
57
63
|
collection: l,
|
|
58
64
|
itemId: r,
|
|
59
|
-
fields:
|
|
60
|
-
layoutSlug:
|
|
65
|
+
fields: i,
|
|
66
|
+
layoutSlug: s
|
|
61
67
|
}) {
|
|
62
|
-
const
|
|
63
|
-
() =>
|
|
64
|
-
[
|
|
65
|
-
),
|
|
66
|
-
mutationFn: () =>
|
|
68
|
+
const c = $(), [h, o] = m(!1), [p, d] = m(!1), [u, a] = m(""), [b, v] = m(""), [f, k] = m(""), x = K(), C = M(
|
|
69
|
+
() => i.filter((e) => !e.field.startsWith("__") && !e.field.includes(".")).map((e) => ({ field: e.field, label: e.label || W(e.field) })),
|
|
70
|
+
[i]
|
|
71
|
+
), y = C.find((e) => e.field === u), N = F({
|
|
72
|
+
mutationFn: () => c.request(
|
|
67
73
|
q("/scheduled-changes", {
|
|
68
74
|
collection: l,
|
|
69
75
|
item_id: r,
|
|
70
76
|
change_type: "field_update",
|
|
71
|
-
changes: { [
|
|
77
|
+
changes: { [u]: b },
|
|
72
78
|
// datetime-local is the viewer's local time; the API stores UTC.
|
|
73
|
-
scheduled_at: new Date(
|
|
74
|
-
layout:
|
|
79
|
+
scheduled_at: new Date(f).toISOString(),
|
|
80
|
+
layout: s ?? null
|
|
75
81
|
})
|
|
76
82
|
),
|
|
77
83
|
onSuccess: () => {
|
|
78
|
-
|
|
84
|
+
o(!1), a(""), v(""), k(""), g.success("Change scheduled");
|
|
79
85
|
},
|
|
80
|
-
onError: (e) =>
|
|
81
|
-
}), T =
|
|
82
|
-
return /* @__PURE__ */ n(
|
|
83
|
-
/* @__PURE__ */ t(
|
|
86
|
+
onError: (e) => g.error(O(e, "Could not schedule the change"))
|
|
87
|
+
}), T = f !== "" && !Number.isNaN(new Date(f).getTime());
|
|
88
|
+
return /* @__PURE__ */ n(E, { open: h, onOpenChange: o, children: [
|
|
89
|
+
/* @__PURE__ */ t(P, { asChild: !0, children: /* @__PURE__ */ n(
|
|
84
90
|
"button",
|
|
85
91
|
{
|
|
86
92
|
type: "button",
|
|
@@ -93,37 +99,37 @@ function de({
|
|
|
93
99
|
]
|
|
94
100
|
}
|
|
95
101
|
) }),
|
|
96
|
-
/* @__PURE__ */ n(
|
|
102
|
+
/* @__PURE__ */ n(_, { side: "left", align: "start", className: "w-80 p-4", "data-schedule-change-panel": !0, children: [
|
|
97
103
|
/* @__PURE__ */ t("p", { className: "mb-3 text-[13px] font-medium", children: "Schedule a field change" }),
|
|
98
104
|
/* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
99
105
|
/* @__PURE__ */ n("div", { children: [
|
|
100
106
|
/* @__PURE__ */ t("span", { className: "mb-1 block text-[11px] font-medium text-muted-foreground", children: "Field" }),
|
|
101
|
-
/* @__PURE__ */ n(
|
|
102
|
-
/* @__PURE__ */ t(
|
|
107
|
+
/* @__PURE__ */ n(E, { open: p, onOpenChange: d, children: [
|
|
108
|
+
/* @__PURE__ */ t(P, { asChild: !0, children: /* @__PURE__ */ n(
|
|
103
109
|
w,
|
|
104
110
|
{
|
|
105
111
|
type: "button",
|
|
106
112
|
variant: "outline",
|
|
107
113
|
role: "combobox",
|
|
108
|
-
"aria-expanded":
|
|
114
|
+
"aria-expanded": p,
|
|
109
115
|
"aria-label": "Field",
|
|
110
116
|
className: "h-8 w-full justify-between text-[12px] font-normal",
|
|
111
117
|
children: [
|
|
112
|
-
/* @__PURE__ */ t("span", { className: "truncate", children: (
|
|
118
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: (y == null ? void 0 : y.label) ?? "Select a field…" }),
|
|
113
119
|
/* @__PURE__ */ t(R, { className: "ml-1 h-3 w-3 shrink-0 opacity-50" })
|
|
114
120
|
]
|
|
115
121
|
}
|
|
116
122
|
) }),
|
|
117
|
-
/* @__PURE__ */ t(
|
|
123
|
+
/* @__PURE__ */ t(_, { className: "w-[--radix-popover-trigger-width] p-0", align: "start", children: /* @__PURE__ */ n(A, { children: [
|
|
118
124
|
/* @__PURE__ */ t(H, { placeholder: "Search fields…", className: "h-8 text-[12px]" }),
|
|
119
125
|
/* @__PURE__ */ n(U, { children: [
|
|
120
126
|
/* @__PURE__ */ t(G, { className: "py-3 text-center text-[12px] text-muted-foreground", children: "No field matches" }),
|
|
121
|
-
|
|
127
|
+
C.map((e) => /* @__PURE__ */ n(
|
|
122
128
|
J,
|
|
123
129
|
{
|
|
124
130
|
value: `${e.label} ${e.field}`,
|
|
125
131
|
onSelect: () => {
|
|
126
|
-
|
|
132
|
+
a(e.field), d(!1);
|
|
127
133
|
},
|
|
128
134
|
className: "text-[12px]",
|
|
129
135
|
children: [
|
|
@@ -132,7 +138,7 @@ function de({
|
|
|
132
138
|
{
|
|
133
139
|
className: z(
|
|
134
140
|
"mr-2 h-3.5 w-3.5",
|
|
135
|
-
|
|
141
|
+
u === e.field ? "opacity-100" : "opacity-0"
|
|
136
142
|
)
|
|
137
143
|
}
|
|
138
144
|
),
|
|
@@ -150,7 +156,7 @@ function de({
|
|
|
150
156
|
/* @__PURE__ */ t(
|
|
151
157
|
"label",
|
|
152
158
|
{
|
|
153
|
-
htmlFor: `${
|
|
159
|
+
htmlFor: `${x}-value`,
|
|
154
160
|
className: "mb-1 block text-[11px] font-medium text-muted-foreground",
|
|
155
161
|
children: "New value"
|
|
156
162
|
}
|
|
@@ -158,8 +164,8 @@ function de({
|
|
|
158
164
|
/* @__PURE__ */ t(
|
|
159
165
|
S,
|
|
160
166
|
{
|
|
161
|
-
id: `${
|
|
162
|
-
value:
|
|
167
|
+
id: `${x}-value`,
|
|
168
|
+
value: b,
|
|
163
169
|
onChange: (e) => v(e.target.value),
|
|
164
170
|
className: "h-8 text-[12px]"
|
|
165
171
|
}
|
|
@@ -169,7 +175,7 @@ function de({
|
|
|
169
175
|
/* @__PURE__ */ t(
|
|
170
176
|
"label",
|
|
171
177
|
{
|
|
172
|
-
htmlFor: `${
|
|
178
|
+
htmlFor: `${x}-at`,
|
|
173
179
|
className: "mb-1 block text-[11px] font-medium text-muted-foreground",
|
|
174
180
|
children: "When"
|
|
175
181
|
}
|
|
@@ -177,10 +183,10 @@ function de({
|
|
|
177
183
|
/* @__PURE__ */ t(
|
|
178
184
|
S,
|
|
179
185
|
{
|
|
180
|
-
id: `${
|
|
186
|
+
id: `${x}-at`,
|
|
181
187
|
type: "datetime-local",
|
|
182
|
-
value:
|
|
183
|
-
onChange: (e) =>
|
|
188
|
+
value: f,
|
|
189
|
+
onChange: (e) => k(e.target.value),
|
|
184
190
|
className: "h-8 text-[12px]"
|
|
185
191
|
}
|
|
186
192
|
)
|
|
@@ -191,9 +197,9 @@ function de({
|
|
|
191
197
|
type: "button",
|
|
192
198
|
size: "sm",
|
|
193
199
|
className: "h-8 w-full bg-nvr-cyan text-[12px] text-white hover:bg-nvr-cyan/90",
|
|
194
|
-
disabled: !
|
|
195
|
-
onClick: () =>
|
|
196
|
-
children:
|
|
200
|
+
disabled: !u || !b || !T || N.isPending,
|
|
201
|
+
onClick: () => N.mutate(),
|
|
202
|
+
children: N.isPending ? "Scheduling…" : "Schedule change"
|
|
197
203
|
}
|
|
198
204
|
)
|
|
199
205
|
] })
|
|
@@ -201,6 +207,7 @@ function de({
|
|
|
201
207
|
] });
|
|
202
208
|
}
|
|
203
209
|
export {
|
|
204
|
-
|
|
205
|
-
|
|
210
|
+
de as PickerExclusionToggle,
|
|
211
|
+
ue as ScheduleChangeButton,
|
|
212
|
+
X as usePickerExclusion
|
|
206
213
|
};
|