@nivaro/react 0.3.14 → 0.3.16

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.
Files changed (34) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +127 -6
  4. package/dist/index.js +736 -734
  5. package/dist/shared/components/CollectionBrowserView.js +2316 -2281
  6. package/dist/shared/components/ItemEditForm.js +3773 -3604
  7. package/dist/shared/components/RecordGridEditor.js +319 -282
  8. package/dist/shared/components/RecordReadView.js +202 -200
  9. package/dist/shared/components/cbv/unknown-fields.js +18 -8
  10. package/dist/shared/components/import/DocumentAutofillButton.js +148 -142
  11. package/dist/shared/components/item-edit/CatalogPickerField.js +264 -276
  12. package/dist/shared/components/item-edit/FieldRenderer.js +136 -133
  13. package/dist/shared/components/item-edit/FieldRow.js +198 -184
  14. package/dist/shared/components/item-edit/HeaderTools.js +107 -99
  15. package/dist/shared/components/item-edit/InlineTableField.js +138 -136
  16. package/dist/shared/components/item-edit/RecordLiveSync.js +1 -0
  17. package/dist/shared/components/item-edit/RelationCombobox.js +30 -23
  18. package/dist/shared/components/item-edit/SummaryPanel.js +334 -294
  19. package/dist/shared/components/item-edit/column-length.js +12 -0
  20. package/dist/shared/components/panels/AccessDeniedPanel.js +47 -37
  21. package/dist/shared/components/panels/ItemLockBanner.js +307 -285
  22. package/dist/shared/components/panels/PipelinePanel.js +486 -465
  23. package/dist/shared/components/panels/RevisionsPanel.js +210 -204
  24. package/dist/shared/components/profile/DelegationCard.js +178 -121
  25. package/dist/shared/components/profile/PersonActivity.js +152 -139
  26. package/dist/shared/components/queue/QueueWorklist.js +668 -659
  27. package/dist/shared/components/queue/transition-note.js +90 -0
  28. package/dist/shared/components/support/SupportRequestDialog.js +100 -89
  29. package/dist/shared/components/support/TicketDetailSheet.js +104 -91
  30. package/dist/shared/lib/autofill-runs.js +33 -26
  31. package/dist/shared/lib/draft-store.js +40 -24
  32. package/dist/shared/lib/live-queries.js +10 -9
  33. package/dist/shared/lib/restore-skipped.js +10 -0
  34. package/package.json +1 -1
@@ -1,107 +1,114 @@
1
- import { jsxs as a, jsx as t, Fragment as O } from "react/jsx-runtime";
2
- import { setMyDelegate as R } from "@nivaro/sdk";
3
- import { useQuery as W, useMutation as L } from "@tanstack/react-query";
4
- import { Undo2 as j, Loader2 as A, Check as F, UserRound as M } from "lucide-react";
5
- import { useState as c, useEffect as K } from "react";
6
- import { useNivaroClient as Q } from "../../context.js";
7
- import { get as q, post as Y, patch as z } from "../../lib/commands.js";
8
- import { cn as B } from "../../lib/utils.js";
9
- import { RelationCombobox as G } from "../item-edit/RelationCombobox.js";
10
- import { SectionCard as H, Toggle as J, Field as y, PersonChip as V } from "./primitives.js";
11
- function se({
1
+ import { jsxs as o, jsx as e, Fragment as T } from "react/jsx-runtime";
2
+ import { setMyDelegate as Y } from "@nivaro/sdk";
3
+ import { useQuery as F, useMutation as M } from "@tanstack/react-query";
4
+ import { Undo2 as G, Loader2 as K, Check as Q, UserRound as z } from "lucide-react";
5
+ import { useState as m, useEffect as P } from "react";
6
+ import { useNivaroClient as B } from "../../context.js";
7
+ import { get as I, post as L, patch as H } from "../../lib/commands.js";
8
+ import { cn as J } from "../../lib/utils.js";
9
+ import { RelationCombobox as V } from "../item-edit/RelationCombobox.js";
10
+ import { SectionCard as X, Toggle as Z, Field as k, PersonChip as U } from "./primitives.js";
11
+ function ce({
12
12
  user: n,
13
- onSaved: I,
14
- forUser: s,
15
- coversFor: h
13
+ onSaved: R,
14
+ forUser: c,
15
+ coversFor: w
16
16
  }) {
17
- const o = (s == null ? void 0 : s.firstName) ?? null, p = Q(), [i, v] = c(!!n.is_out_of_office), [r, N] = c(null), [d, k] = c(n.delegate_id ?? null), [m, S] = c(
17
+ const a = (c == null ? void 0 : c.firstName) ?? null, u = B(), [p, N] = m(!!n.is_out_of_office), [i, S] = m(null), [l, C] = m(n.delegate_id ?? null), [g, $] = m(
18
18
  n.delegate_expires_at ? String(n.delegate_expires_at).slice(0, 10) : ""
19
- ), l = n, [u, $] = c(l.ooo_start ? String(l.ooo_start).slice(0, 10) : ""), [g, C] = c(l.ooo_end ? String(l.ooo_end).slice(0, 10) : ""), P = i !== !!n.is_out_of_office || (d ?? null) !== (n.delegate_id ?? null) || m !== (n.delegate_expires_at ? String(n.delegate_expires_at).slice(0, 10) : "") || u !== (l.ooo_start ? String(l.ooo_start).slice(0, 10) : "") || g !== (l.ooo_end ? String(l.ooo_end).slice(0, 10) : ""), b = (i || !!u && !!g) && !d;
20
- K(() => {
21
- if (!b) {
22
- N(null);
19
+ ), d = n, [h, D] = m(d.ooo_start ? String(d.ooo_start).slice(0, 10) : ""), [b, E] = m(d.ooo_end ? String(d.ooo_end).slice(0, 10) : ""), W = p !== !!n.is_out_of_office || (l ?? null) !== (n.delegate_id ?? null) || g !== (n.delegate_expires_at ? String(n.delegate_expires_at).slice(0, 10) : "") || h !== (d.ooo_start ? String(d.ooo_start).slice(0, 10) : "") || b !== (d.ooo_end ? String(d.ooo_end).slice(0, 10) : ""), y = (p || !!h && !!b) && !l;
20
+ P(() => {
21
+ if (!y) {
22
+ S(null);
23
23
  return;
24
24
  }
25
- let e = !1;
26
- return p.request(
27
- q(s ? `/users/${s.id}/ooo-exposure` : "/users/me/ooo-exposure")
28
- ).then((_) => {
29
- e || N(_.data);
25
+ let t = !1;
26
+ return u.request(
27
+ I(c ? `/users/${c.id}/ooo-exposure` : "/users/me/ooo-exposure")
28
+ ).then((r) => {
29
+ t || S(r.data);
30
30
  }).catch(() => {
31
31
  }), () => {
32
- e = !0;
32
+ t = !0;
33
33
  };
34
- }, [b, p, s]);
35
- const { data: x } = W({
36
- queryKey: ["delegate-preview"],
37
- queryFn: () => p.request(
38
- q("/users/me/delegate-preview")
39
- ).then((e) => e.data),
40
- enabled: !s && !!d && (i || !!u && !!g),
34
+ }, [y, u, c]);
35
+ const { data: s } = F({
36
+ queryKey: ["delegate-preview", l],
37
+ queryFn: () => u.request(
38
+ I("/users/me/delegate-preview", l ? { delegate_id: l } : void 0)
39
+ ).then((t) => t.data),
40
+ enabled: !c && !!l && (p || !!h && !!b),
41
41
  staleTime: 6e4
42
- }), [f, T] = c([]), w = L({
43
- mutationFn: async () => {
44
- const e = {
45
- is_out_of_office: i,
46
- delegate_id: d,
47
- delegate_expires_at: m ? (/* @__PURE__ */ new Date(`${m}T23:59:59`)).toISOString() : null,
42
+ }), [v, A] = m([]), [O, f] = m(null);
43
+ P(() => f(null), [l]);
44
+ const _ = M({
45
+ mutationFn: async ({ acknowledge: t = !1 } = {}) => {
46
+ const r = {
47
+ is_out_of_office: p,
48
+ delegate_id: l,
49
+ delegate_expires_at: g ? (/* @__PURE__ */ new Date(`${g}T23:59:59`)).toISOString() : null,
48
50
  // Scheduled window — the ooo-schedule cron flips the toggle on
49
51
  // entry and clears it (and the window) when it passes.
50
- ooo_start: u ? (/* @__PURE__ */ new Date(`${u}T00:00:00`)).toISOString() : null,
51
- ooo_end: g ? (/* @__PURE__ */ new Date(`${g}T23:59:59`)).toISOString() : null
52
+ ooo_start: h ? (/* @__PURE__ */ new Date(`${h}T00:00:00`)).toISOString() : null,
53
+ ooo_end: b ? (/* @__PURE__ */ new Date(`${b}T23:59:59`)).toISOString() : null
52
54
  };
53
- if (!s) return p.request(R(e));
54
- const _ = await p.request(
55
- Y(`/delegation/${s.id}/delegate`, {
56
- is_out_of_office: e.is_out_of_office,
57
- delegate_id: e.delegate_id,
58
- delegate_expires_at: e.delegate_expires_at
55
+ if (!c)
56
+ return t ? u.request(L("/users/me/delegate", { ...r, acknowledge_unreachable: !0 })) : u.request(Y(r));
57
+ const x = await u.request(
58
+ L(`/delegation/${c.id}/delegate`, {
59
+ is_out_of_office: r.is_out_of_office,
60
+ delegate_id: r.delegate_id,
61
+ delegate_expires_at: r.delegate_expires_at
59
62
  })
60
63
  );
61
- return await p.request(
62
- z(`/users/${s.id}`, { ooo_start: e.ooo_start, ooo_end: e.ooo_end })
63
- ), _;
64
+ return await u.request(
65
+ H(`/users/${c.id}`, { ooo_start: r.ooo_start, ooo_end: r.ooo_end })
66
+ ), x;
64
67
  },
65
- onSuccess: (e) => {
66
- const _ = (e == null ? void 0 : e.warnings) ?? [];
67
- T(_), I();
68
+ onSuccess: (t) => {
69
+ const r = (t == null ? void 0 : t.warnings) ?? [];
70
+ A(r), f(null), R();
71
+ },
72
+ onError: (t) => {
73
+ const r = t.response, x = (r == null ? void 0 : r.data) ?? r;
74
+ (x == null ? void 0 : x.code) === "DELEGATE_CANNOT_SEE" && f(x.error || "Your delegate cannot open the records you own approvals on.");
68
75
  }
69
- }), E = () => {
70
- v(!!n.is_out_of_office), k(n.delegate_id ?? null), S(n.delegate_expires_at ? String(n.delegate_expires_at).slice(0, 10) : ""), $(l.ooo_start ? String(l.ooo_start).slice(0, 10) : ""), C(l.ooo_end ? String(l.ooo_end).slice(0, 10) : "");
71
- }, D = m ? (/* @__PURE__ */ new Date(`${m}T12:00:00`)).toLocaleDateString(void 0, {
76
+ }), j = () => {
77
+ N(!!n.is_out_of_office), C(n.delegate_id ?? null), $(n.delegate_expires_at ? String(n.delegate_expires_at).slice(0, 10) : ""), D(d.ooo_start ? String(d.ooo_start).slice(0, 10) : ""), E(d.ooo_end ? String(d.ooo_end).slice(0, 10) : "");
78
+ }, q = g ? (/* @__PURE__ */ new Date(`${g}T12:00:00`)).toLocaleDateString(void 0, {
72
79
  month: "long",
73
80
  day: "numeric"
74
81
  }) : null;
75
- return /* @__PURE__ */ a(
76
- H,
82
+ return /* @__PURE__ */ o(
83
+ X,
77
84
  {
78
85
  testId: "delegation",
79
- icon: /* @__PURE__ */ t(M, { className: "h-4 w-4" }),
86
+ icon: /* @__PURE__ */ e(z, { className: "h-4 w-4" }),
80
87
  title: "Out of office",
81
- hint: o ? `Route ${o}'s approvals to a delegate while they are away` : "Route your approvals to a delegate while you are away",
82
- actions: P && /* @__PURE__ */ a("span", { className: "flex items-center gap-1.5", children: [
83
- /* @__PURE__ */ a(
88
+ hint: a ? `Route ${a}'s approvals to a delegate while they are away` : "Route your approvals to a delegate while you are away",
89
+ actions: W && /* @__PURE__ */ o("span", { className: "flex items-center gap-1.5", children: [
90
+ /* @__PURE__ */ o(
84
91
  "button",
85
92
  {
86
93
  type: "button",
87
94
  title: "Discard changes",
88
- onClick: E,
95
+ onClick: j,
89
96
  className: "inline-flex h-7 items-center gap-1 rounded-md px-2 text-[11.5px] font-medium text-slate-400 transition-colors hover:text-slate-600 dark:hover:text-slate-200",
90
97
  children: [
91
- /* @__PURE__ */ t(j, { className: "h-3 w-3" }),
98
+ /* @__PURE__ */ e(G, { className: "h-3 w-3" }),
92
99
  " Reset"
93
100
  ]
94
101
  }
95
102
  ),
96
- /* @__PURE__ */ a(
103
+ /* @__PURE__ */ o(
97
104
  "button",
98
105
  {
99
106
  type: "button",
100
- disabled: w.isPending,
101
- onClick: () => w.mutate(),
107
+ disabled: _.isPending,
108
+ onClick: () => _.mutate({}),
102
109
  className: "inline-flex h-7 items-center gap-1 rounded-md bg-nvr-cyan px-2.5 text-[11.5px] font-semibold text-white transition-opacity disabled:opacity-50",
103
110
  children: [
104
- w.isPending ? /* @__PURE__ */ t(A, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(F, { className: "h-3 w-3" }),
111
+ _.isPending ? /* @__PURE__ */ e(K, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(Q, { className: "h-3 w-3" }),
105
112
  " ",
106
113
  "Save"
107
114
  ]
@@ -109,124 +116,174 @@ function se({
109
116
  )
110
117
  ] }),
111
118
  children: [
112
- /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3", children: [
113
- /* @__PURE__ */ t("span", { className: "text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children: o ? `${o} is out of office` : "I'm out of office" }),
114
- /* @__PURE__ */ t(
115
- J,
119
+ /* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-3", children: [
120
+ /* @__PURE__ */ e("span", { className: "text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children: a ? `${a} is out of office` : "I'm out of office" }),
121
+ /* @__PURE__ */ e(
122
+ Z,
116
123
  {
117
- on: i,
118
- onChange: () => v((e) => !e),
119
- label: o ? `${o} is out of office` : "I'm out of office",
124
+ on: p,
125
+ onChange: () => N((t) => !t),
126
+ label: a ? `${a} is out of office` : "I'm out of office",
120
127
  tone: "amber"
121
128
  }
122
129
  )
123
130
  ] }),
124
- b && r && r.owned_open_records + r.sla_escalations > 0 && /* @__PURE__ */ a("div", { className: "mt-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-[12px] text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300", children: [
125
- /* @__PURE__ */ t("span", { className: "font-semibold", children: "No delegate is set." }),
131
+ y && i && i.owned_open_records + i.sla_escalations > 0 && /* @__PURE__ */ o("div", { className: "mt-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-[12px] text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300", children: [
132
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: "No delegate is set." }),
126
133
  " While",
127
134
  " ",
128
- o ? `${o} is` : "you're",
135
+ a ? `${a} is` : "you're",
129
136
  " out,",
130
137
  " ",
131
- r.owned_open_records > 0 && /* @__PURE__ */ a(O, { children: [
132
- /* @__PURE__ */ t("span", { className: "font-semibold", children: r.owned_open_records }),
138
+ i.owned_open_records > 0 && /* @__PURE__ */ o(T, { children: [
139
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: i.owned_open_records }),
133
140
  " open record",
134
- r.owned_open_records === 1 ? "" : "s",
141
+ i.owned_open_records === 1 ? "" : "s",
135
142
  " ",
136
- o ? "they own" : "you own"
143
+ a ? "they own" : "you own"
137
144
  ] }),
138
- r.owned_open_records > 0 && r.sla_escalations > 0 && " and ",
139
- r.sla_escalations > 0 && /* @__PURE__ */ a(O, { children: [
140
- /* @__PURE__ */ t("span", { className: "font-semibold", children: r.sla_escalations }),
145
+ i.owned_open_records > 0 && i.sla_escalations > 0 && " and ",
146
+ i.sla_escalations > 0 && /* @__PURE__ */ o(T, { children: [
147
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: i.sla_escalations }),
141
148
  " SLA escalation rule",
142
- r.sla_escalations === 1 ? "" : "s",
149
+ i.sla_escalations === 1 ? "" : "s",
143
150
  " that page ",
144
- o ? "them" : "you"
151
+ a ? "them" : "you"
145
152
  ] }),
146
153
  " ",
147
154
  "will have nobody covering them.",
148
155
  " ",
149
- o ? "Assign a delegate below." : "Pick a delegate below."
156
+ a ? "Assign a delegate below." : "Pick a delegate below."
150
157
  ] }),
151
- d && x && /* @__PURE__ */ a("div", { className: "mt-2 rounded-md border border-slate-200 bg-slate-50 px-3 py-2 text-[12px] text-slate-600 dark:border-border dark:bg-muted/40 dark:text-slate-300", children: [
158
+ l && s && /* @__PURE__ */ o("div", { className: "mt-2 rounded-md border border-slate-200 bg-slate-50 px-3 py-2 text-[12px] text-slate-600 dark:border-border dark:bg-muted/40 dark:text-slate-300", children: [
152
159
  "Your delegate would inherit",
153
160
  " ",
154
- /* @__PURE__ */ t("b", { className: "tabular-nums", children: x.approx_open_approvals }),
161
+ /* @__PURE__ */ e("b", { className: "tabular-nums", children: s.approx_open_approvals }),
155
162
  " open approval",
156
- x.approx_open_approvals === 1 ? "" : "s",
163
+ s.approx_open_approvals === 1 ? "" : "s",
157
164
  " while you're out."
158
165
  ] }),
159
- f.length > 0 && /* @__PURE__ */ a("div", { className: "mt-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-[12px] text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300", children: [
160
- /* @__PURE__ */ a("p", { className: "font-semibold", children: [
166
+ l && (s == null ? void 0 : s.delegate_reach) && s.delegate_reach.hidden > 0 && /* @__PURE__ */ o(
167
+ "div",
168
+ {
169
+ className: "mt-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-[12px] text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300",
170
+ "data-delegate-reach": !0,
171
+ children: [
172
+ "Your delegate cannot open",
173
+ " ",
174
+ /* @__PURE__ */ e("b", { className: "tabular-nums", children: s.delegate_reach.hidden === s.delegate_reach.owned ? "any" : s.delegate_reach.hidden }),
175
+ " ",
176
+ "of the ",
177
+ s.delegate_reach.owned,
178
+ " record",
179
+ s.delegate_reach.owned === 1 ? "" : "s",
180
+ " you own approvals on — those would wait for you. Pick someone who can see them."
181
+ ]
182
+ }
183
+ ),
184
+ O && /* @__PURE__ */ o(
185
+ "div",
186
+ {
187
+ className: "mt-2 rounded-md border border-red-300 bg-red-50 px-3 py-2 text-[12px] text-red-700 dark:border-red-500/40 dark:bg-red-500/10 dark:text-red-300",
188
+ role: "alert",
189
+ "data-delegate-unreachable": !0,
190
+ children: [
191
+ /* @__PURE__ */ e("p", { children: O }),
192
+ /* @__PURE__ */ o("div", { className: "mt-1.5 flex gap-1.5", children: [
193
+ /* @__PURE__ */ e(
194
+ "button",
195
+ {
196
+ type: "button",
197
+ disabled: _.isPending,
198
+ onClick: () => _.mutate({ acknowledge: !0 }),
199
+ className: "h-7 rounded-md border border-red-300 px-2.5 text-[11.5px] font-medium hover:bg-red-100 disabled:opacity-50 dark:border-red-500/40 dark:hover:bg-red-500/15",
200
+ children: "Save anyway"
201
+ }
202
+ ),
203
+ /* @__PURE__ */ e(
204
+ "button",
205
+ {
206
+ type: "button",
207
+ onClick: () => f(null),
208
+ className: "h-7 rounded-md px-2.5 text-[11.5px] text-red-600 hover:underline dark:text-red-300",
209
+ children: "Pick someone else"
210
+ }
211
+ )
212
+ ] })
213
+ ]
214
+ }
215
+ ),
216
+ v.length > 0 && /* @__PURE__ */ o("div", { className: "mt-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-[12px] text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300", children: [
217
+ /* @__PURE__ */ o("p", { className: "font-semibold", children: [
161
218
  "Coverage warning",
162
- f.length === 1 ? "" : "s",
219
+ v.length === 1 ? "" : "s",
163
220
  ":"
164
221
  ] }),
165
- /* @__PURE__ */ t("ul", { className: "mt-0.5 list-disc pl-4", children: f.map((e) => /* @__PURE__ */ t("li", { children: e }, e)) })
222
+ /* @__PURE__ */ e("ul", { className: "mt-0.5 list-disc pl-4", children: v.map((t) => /* @__PURE__ */ e("li", { children: t }, t)) })
166
223
  ] }),
167
- /* @__PURE__ */ a("div", { className: "mt-3 grid gap-3 border-t border-slate-100 pt-3 dark:border-border/60 sm:grid-cols-2", children: [
168
- /* @__PURE__ */ a("div", { children: [
169
- /* @__PURE__ */ t("span", { className: "mb-1 block text-[11px] font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Delegate" }),
170
- /* @__PURE__ */ t(
171
- G,
224
+ /* @__PURE__ */ o("div", { className: "mt-3 grid gap-3 border-t border-slate-100 pt-3 dark:border-border/60 sm:grid-cols-2", children: [
225
+ /* @__PURE__ */ o("div", { children: [
226
+ /* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Delegate" }),
227
+ /* @__PURE__ */ e(
228
+ V,
172
229
  {
173
230
  collection: "nivaro_users",
174
- value: d,
175
- onChange: (e) => k(e == null ? null : String(e)),
231
+ value: l,
232
+ onChange: (t) => C(t == null ? null : String(t)),
176
233
  placeholder: "Pick a delegate…"
177
234
  }
178
235
  )
179
236
  ] }),
180
- /* @__PURE__ */ t(
181
- y,
237
+ /* @__PURE__ */ e(
238
+ k,
182
239
  {
183
240
  label: "Out from",
184
241
  hint: "schedule ahead",
185
242
  type: "date",
186
- value: u,
187
- onChange: $
243
+ value: h,
244
+ onChange: D
188
245
  }
189
246
  ),
190
- /* @__PURE__ */ t(
191
- y,
247
+ /* @__PURE__ */ e(
248
+ k,
192
249
  {
193
250
  label: "Out until",
194
251
  hint: "auto-clears after",
195
252
  type: "date",
196
- value: g,
197
- onChange: C
253
+ value: b,
254
+ onChange: E
198
255
  }
199
256
  ),
200
- /* @__PURE__ */ t(
201
- y,
257
+ /* @__PURE__ */ e(
258
+ k,
202
259
  {
203
260
  label: "Until",
204
261
  hint: "optional",
205
262
  type: "date",
206
- value: m,
207
- onChange: S,
263
+ value: g,
264
+ onChange: $,
208
265
  inputClassName: "h-9"
209
266
  }
210
267
  )
211
268
  ] }),
212
- /* @__PURE__ */ t(
269
+ /* @__PURE__ */ e(
213
270
  "p",
214
271
  {
215
- className: B(
272
+ className: J(
216
273
  "mt-3 text-[11.5px] leading-relaxed",
217
- i && !d ? "rounded-md bg-amber-50 px-2.5 py-1.5 text-amber-700 dark:bg-amber-500/10 dark:text-amber-400" : "text-slate-400 dark:text-slate-500"
274
+ p && !l ? "rounded-md bg-amber-50 px-2.5 py-1.5 text-amber-700 dark:bg-amber-500/10 dark:text-amber-400" : "text-slate-400 dark:text-slate-500"
218
275
  ),
219
- children: i && !d ? o ? `No delegate picked — approvals will wait for ${o} until they return.` : "No delegate picked — approvals will wait for you until you return." : i ? `Workflow ownership and approvals route to ${o ? `${o}'s` : "your"} delegate${D ? ` through ${D}` : ` until ${o ? "this is" : "you turn this"} off`}.` : `When enabled, workflow ownership and approvals resolve to ${o ? `${o}'s` : "your"} delegate.`
276
+ children: p && !l ? a ? `No delegate picked — approvals will wait for ${a} until they return.` : "No delegate picked — approvals will wait for you until you return." : p ? `Workflow ownership and approvals route to ${a ? `${a}'s` : "your"} delegate${q ? ` through ${q}` : ` until ${a ? "this is" : "you turn this"} off`}.` : `When enabled, workflow ownership and approvals resolve to ${a ? `${a}'s` : "your"} delegate.`
220
277
  }
221
278
  ),
222
- h && h.length > 0 && /* @__PURE__ */ a("div", { className: "mt-3 border-t border-slate-100 pt-3 dark:border-border/60", children: [
223
- /* @__PURE__ */ t("p", { className: "mb-1.5 text-[11px] font-medium uppercase tracking-wide text-slate-400", children: "Covers for" }),
224
- /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-x-4 gap-y-1.5", "data-person-covers": !0, children: h.map((e) => /* @__PURE__ */ t(V, { person: e }, e.id)) })
279
+ w && w.length > 0 && /* @__PURE__ */ o("div", { className: "mt-3 border-t border-slate-100 pt-3 dark:border-border/60", children: [
280
+ /* @__PURE__ */ e("p", { className: "mb-1.5 text-[11px] font-medium uppercase tracking-wide text-slate-400", children: "Covers for" }),
281
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-4 gap-y-1.5", "data-person-covers": !0, children: w.map((t) => /* @__PURE__ */ e(U, { person: t }, t.id)) })
225
282
  ] })
226
283
  ]
227
284
  }
228
285
  );
229
286
  }
230
287
  export {
231
- se as DelegationCard
288
+ ce as DelegationCard
232
289
  };