@nivaro/react 0.3.57 → 0.3.59

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 (69) hide show
  1. package/dist/components/fields/RelationField.js +110 -80
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useRelationOptions.js +1 -0
  4. package/dist/hooks/useSessionRecorder.js +1 -1
  5. package/dist/index.d.ts +37 -2
  6. package/dist/index.js +523 -520
  7. package/dist/shared/components/CollectionBrowserView.js +2693 -2619
  8. package/dist/shared/components/DataTable.js +538 -495
  9. package/dist/shared/components/ItemEditForm.js +4559 -4386
  10. package/dist/shared/components/PageRenderer.js +537 -508
  11. package/dist/shared/components/ProfileView.js +716 -715
  12. package/dist/shared/components/QueryTable.js +74 -74
  13. package/dist/shared/components/RecordReadView.js +367 -364
  14. package/dist/shared/components/ReportView.js +64 -39
  15. package/dist/shared/components/WidgetSlot.js +543 -520
  16. package/dist/shared/components/alerts/AlertManagerView.js +324 -317
  17. package/dist/shared/components/alerts/types.js +37 -14
  18. package/dist/shared/components/cbv/row-focus.js +19 -0
  19. package/dist/shared/components/help-videos/HelpVideoPlayer.js +152 -147
  20. package/dist/shared/components/integrations/console/SignalCard.js +59 -59
  21. package/dist/shared/components/integrations/console/tone.js +52 -30
  22. package/dist/shared/components/item-edit/CatalogPickerField.js +525 -505
  23. package/dist/shared/components/item-edit/FieldRenderer.js +22 -20
  24. package/dist/shared/components/item-edit/FieldRow.js +175 -173
  25. package/dist/shared/components/item-edit/GridBulkEditDialog.js +55 -54
  26. package/dist/shared/components/item-edit/InlineTableField.js +2487 -2442
  27. package/dist/shared/components/item-edit/M2MCombobox.js +321 -295
  28. package/dist/shared/components/item-edit/MidairCollisionDialog.js +1 -1
  29. package/dist/shared/components/item-edit/PlanGrid.js +973 -894
  30. package/dist/shared/components/item-edit/QuickCreateButton.js +335 -106
  31. package/dist/shared/components/item-edit/RecordLiveSync.js +77 -75
  32. package/dist/shared/components/item-edit/RelationCombobox.js +452 -335
  33. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +262 -141
  34. package/dist/shared/components/item-edit/SummaryPanel.js +385 -358
  35. package/dist/shared/components/item-edit/duplicate-rehearsal.js +47 -0
  36. package/dist/shared/components/item-edit/line-midair.js +82 -75
  37. package/dist/shared/components/item-edit/option-disambiguate.js +44 -32
  38. package/dist/shared/components/item-edit/related-missing.js +45 -0
  39. package/dist/shared/components/item-edit/save-outcome.js +9 -7
  40. package/dist/shared/components/notifications/NotificationRulesEditor.js +130 -123
  41. package/dist/shared/components/panels/AccessDeniedPanel.js +52 -48
  42. package/dist/shared/components/panels/ItemLockBanner.js +213 -211
  43. package/dist/shared/components/panels/PipelinePanel.js +1140 -1053
  44. package/dist/shared/components/panels/RecordIntegrityBanner.js +114 -86
  45. package/dist/shared/components/panels/RevisionsPanel.js +316 -299
  46. package/dist/shared/components/panels/TaskPanel.js +265 -249
  47. package/dist/shared/components/panels/landing-state.js +27 -0
  48. package/dist/shared/components/pipeline/PipelineEditorView.js +110 -92
  49. package/dist/shared/components/profile/AiMemoryCard.js +12 -10
  50. package/dist/shared/components/queue/OwnerAvatars.js +80 -41
  51. package/dist/shared/components/queue/QueueQuickFilters.js +52 -52
  52. package/dist/shared/components/queue/QueueWorklist.js +1050 -1026
  53. package/dist/shared/components/queue/group-sums.js +27 -0
  54. package/dist/shared/components/queue/live-state-aspect.js +9 -5
  55. package/dist/shared/components/widgets/ReviewListWidget.js +175 -154
  56. package/dist/shared/lib/back-closes.js +25 -0
  57. package/dist/shared/lib/display-prefs.js +60 -52
  58. package/dist/shared/lib/draft-store.js +71 -48
  59. package/dist/shared/lib/expression.js +53 -53
  60. package/dist/shared/lib/form-usage-beacon.js +7 -7
  61. package/dist/shared/lib/list-page-memory.js +63 -0
  62. package/dist/shared/lib/live.js +44 -44
  63. package/dist/shared/lib/money-input.js +45 -0
  64. package/dist/shared/lib/own-writes.js +76 -28
  65. package/dist/shared/lib/request-gate.js +110 -109
  66. package/dist/shared/lib/sanitize-html.js +10 -6
  67. package/dist/shared/lib/staged-row-labels.js +18 -0
  68. package/dist/shared/lib/validation-rules.js +34 -19
  69. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { jsxs as n, jsx as t, Fragment as v } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as t, Fragment as v } from "react/jsx-runtime";
2
2
  import { useQueryClient as w, useQuery as C, useMutation as E } from "@tanstack/react-query";
3
3
  import { Check as q, X as S, Pencil as I, Trash2 as F, Plus as K, Brain as M, History as _ } from "lucide-react";
4
4
  import { useEffect as D, useState as u } from "react";
@@ -9,18 +9,18 @@ import { AiHistorySwitch as j } from "../ai/AiHistorySwitch.js";
9
9
  import { SectionCard as N } from "./primitives.js";
10
10
  const g = 20, k = 300;
11
11
  function G() {
12
- const d = H(), A = w(), { data: i } = C({
12
+ const d = H(), A = w(), { data: n } = C({
13
13
  queryKey: ["nvr-profile-prefs"],
14
14
  queryFn: () => d.request(Q("/users/me")).then((e) => {
15
15
  var r;
16
16
  return ((r = e.data) == null ? void 0 : r.preferences) ?? {};
17
17
  })
18
- }), h = i !== void 0;
18
+ }), h = n !== void 0;
19
19
  D(() => {
20
20
  var e;
21
21
  !h || typeof window > "u" || window.location.hash !== "#ai-memory" || (e = document.querySelector('[data-profile-card="ai-memory"]')) == null || e.scrollIntoView({ block: "start", behavior: "smooth" });
22
22
  }, [h]);
23
- const s = Array.isArray(i == null ? void 0 : i.ai_memory) ? i.ai_memory.filter((e) => e && typeof e.text == "string") : [], [m, p] = u(""), [o, l] = u(null), [x, y] = u(null), c = E({
23
+ const s = Array.isArray(n == null ? void 0 : n.ai_memory) ? n.ai_memory.filter((e) => e && typeof e.text == "string") : [], [m, p] = u(""), [o, l] = u(null), [x, y] = u(null), c = E({
24
24
  mutationFn: (e) => d.request(P("/users/me/preferences", { ai_memory: e.length ? e : null })),
25
25
  onSuccess: () => {
26
26
  y(null), A.invalidateQueries({ queryKey: ["nvr-profile-prefs"] });
@@ -39,7 +39,7 @@ function G() {
39
39
  const e = o.text.trim(), r = e ? s.map((a) => a.id === o.id ? { ...a, text: e } : a) : s.filter((a) => a.id !== o.id);
40
40
  c.mutate(r, { onSuccess: () => l(null) });
41
41
  };
42
- return /* @__PURE__ */ n(
42
+ return /* @__PURE__ */ i(
43
43
  N,
44
44
  {
45
45
  icon: /* @__PURE__ */ t(M, { className: "h-4 w-4" }),
@@ -51,11 +51,12 @@ function G() {
51
51
  "li",
52
52
  {
53
53
  className: "group flex items-start gap-2 rounded-md px-1.5 py-1 hover:bg-muted",
54
- children: (o == null ? void 0 : o.id) === e.id ? /* @__PURE__ */ n(v, { children: [
54
+ children: (o == null ? void 0 : o.id) === e.id ? /* @__PURE__ */ i(v, { children: [
55
55
  /* @__PURE__ */ t(
56
56
  "input",
57
57
  {
58
58
  value: o.text,
59
+ "aria-label": "Edit this note",
59
60
  maxLength: k,
60
61
  onChange: (r) => l({ id: e.id, text: r.target.value }),
61
62
  onKeyDown: (r) => {
@@ -85,7 +86,7 @@ function G() {
85
86
  children: /* @__PURE__ */ t(S, { className: "h-3.5 w-3.5" })
86
87
  }
87
88
  )
88
- ] }) : /* @__PURE__ */ n(v, { children: [
89
+ ] }) : /* @__PURE__ */ i(v, { children: [
89
90
  /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 break-words text-[12.5px] text-slate-700 dark:text-slate-200", children: e.text }),
90
91
  /* @__PURE__ */ t(
91
92
  "button",
@@ -111,7 +112,7 @@ function G() {
111
112
  },
112
113
  e.id
113
114
  )) }),
114
- s.length < g ? /* @__PURE__ */ n("div", { className: "mt-3 flex items-center gap-2", children: [
115
+ s.length < g ? /* @__PURE__ */ i("div", { className: "mt-3 flex items-center gap-2", children: [
115
116
  /* @__PURE__ */ t(
116
117
  "input",
117
118
  {
@@ -122,11 +123,12 @@ function G() {
122
123
  e.key === "Enter" && b();
123
124
  },
124
125
  placeholder: "e.g. I work Zone 3 inventory requests",
126
+ "aria-label": "New note for the assistant",
125
127
  className: "min-w-0 flex-1 rounded-md border border-slate-200 bg-white px-2.5 py-1.5 text-[12.5px] dark:border-border dark:bg-background",
126
128
  "data-ai-memory-input": !0
127
129
  }
128
130
  ),
129
- /* @__PURE__ */ n(
131
+ /* @__PURE__ */ i(
130
132
  "button",
131
133
  {
132
134
  type: "button",
@@ -139,7 +141,7 @@ function G() {
139
141
  ]
140
142
  }
141
143
  )
142
- ] }) : /* @__PURE__ */ n("p", { className: "mt-3 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
144
+ ] }) : /* @__PURE__ */ i("p", { className: "mt-3 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
143
145
  g,
144
146
  " notes is the limit — remove one to add another."
145
147
  ] }),
@@ -1,8 +1,25 @@
1
- import { jsx as a, jsxs as l } from "react/jsx-runtime";
2
- import { UserAvatar as m } from "../UserAvatar.js";
3
- import { useState as x } from "react";
4
- import { cn as i } from "../../lib/utils.js";
5
- import { Popover as h, PopoverTrigger as u, PopoverContent as b } from "../ui/popover.js";
1
+ import { jsx as a, jsxs as i } from "react/jsx-runtime";
2
+ import { useState as u } from "react";
3
+ import { cn as l } from "../../lib/utils.js";
4
+ import { UserAvatar as h } from "../UserAvatar.js";
5
+ import { Popover as b, PopoverTrigger as v, PopoverContent as k } from "../ui/popover.js";
6
+ const g = {
7
+ suspended: "suspended",
8
+ former: "former user"
9
+ };
10
+ function N(e) {
11
+ return e.inactive ? `${e.name} (${g[e.inactive]})` : e.name;
12
+ }
13
+ function f({ owner: e }) {
14
+ return e.inactive ? /* @__PURE__ */ a(
15
+ "span",
16
+ {
17
+ "data-owner-inactive": e.inactive,
18
+ className: "ml-1 shrink-0 rounded bg-slate-100 px-1 py-px text-[10px] font-medium text-slate-600 dark:bg-muted dark:text-slate-300",
19
+ children: g[e.inactive]
20
+ }
21
+ ) : null;
22
+ }
6
23
  const o = [
7
24
  { bg: "#e0f2fe", fg: "#075985" },
8
25
  // sky
@@ -29,88 +46,110 @@ const o = [
29
46
  { bg: "#f3e8ff", fg: "#6b21a8" }
30
47
  // purple
31
48
  ];
32
- function k(e) {
33
- let t = 0;
34
- for (let r = 0; r < e.length; r++) t = t * 31 + e.charCodeAt(r) | 0;
35
- return o[Math.abs(t) % o.length];
49
+ function y(e) {
50
+ let n = 0;
51
+ for (let r = 0; r < e.length; r++) n = n * 31 + e.charCodeAt(r) | 0;
52
+ return o[Math.abs(n) % o.length];
36
53
  }
37
- function v(e) {
38
- const t = e.trim().split(/\s+/);
39
- return t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
54
+ function C(e) {
55
+ const n = e.trim().split(/\s+/);
56
+ return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
40
57
  }
41
- function f({ owner: e, className: t }) {
42
- const r = k(e.id);
58
+ function d({ owner: e, className: n }) {
59
+ const r = y(e.id);
43
60
  return /* @__PURE__ */ a(
44
- m,
61
+ h,
45
62
  {
46
63
  userId: e.id,
47
64
  alt: e.name,
48
- className: i("h-[22px] w-[22px] ring-2 ring-white dark:ring-card", t),
65
+ className: l("h-[22px] w-[22px] ring-2 ring-white dark:ring-card", n),
49
66
  fallback: /* @__PURE__ */ a(
50
67
  "span",
51
68
  {
52
69
  title: e.name,
53
- className: i(
70
+ className: l(
54
71
  "inline-flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-full text-[9px] font-semibold ring-2 ring-white dark:ring-card",
55
- t
72
+ n
56
73
  ),
57
74
  style: { backgroundColor: r.bg, color: r.fg },
58
- children: v(e.name)
75
+ children: C(e.name)
59
76
  }
60
77
  )
61
78
  }
62
79
  );
63
80
  }
64
- function O({
81
+ function T({
65
82
  owners: e,
66
- max: t = 4,
83
+ max: n = 4,
67
84
  emptyLabel: r = "No owners"
68
85
  }) {
69
- const [g, p] = x(!1);
86
+ const [p, m] = u(!1);
70
87
  if (e.length === 0)
71
88
  return /* @__PURE__ */ a("span", { className: "text-[12px] text-slate-300 dark:text-muted-foreground", children: r });
72
- const s = e.slice(0, t), c = e.length - s.length;
73
- return /* @__PURE__ */ l(h, { open: g, onOpenChange: p, children: [
74
- /* @__PURE__ */ a(u, { asChild: !0, children: /* @__PURE__ */ l(
89
+ const c = e.slice(0, n), s = e.length - c.length;
90
+ return /* @__PURE__ */ i(b, { open: p, onOpenChange: m, children: [
91
+ /* @__PURE__ */ a(v, { asChild: !0, children: /* @__PURE__ */ i(
75
92
  "button",
76
93
  {
77
94
  type: "button",
78
- onClick: (n) => n.stopPropagation(),
79
- "aria-label": `${e.length} owner${e.length === 1 ? "" : "s"}: ${e.map((n) => n.name).join(", ")}`,
95
+ onClick: (t) => t.stopPropagation(),
96
+ "aria-label": `${e.length} owner${e.length === 1 ? "" : "s"}: ${e.map(N).join(", ")}`,
80
97
  className: "group/owners flex items-center rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan",
81
98
  children: [
82
- /* @__PURE__ */ l("span", { className: "flex items-center transition-[gap]", children: [
83
- s.map((n, d) => /* @__PURE__ */ a(f, { owner: n, className: i(d > 0 && "-ml-1.5") }, n.id)),
84
- c > 0 && /* @__PURE__ */ l("span", { className: "-ml-1.5 inline-flex h-[22px] min-w-[22px] shrink-0 items-center justify-center rounded-full bg-slate-100 px-1 text-[9px] font-semibold text-slate-600 ring-2 ring-white dark:bg-muted dark:text-slate-300 dark:ring-card", children: [
99
+ /* @__PURE__ */ i("span", { className: "flex items-center transition-[gap]", children: [
100
+ c.map((t, x) => /* @__PURE__ */ a(
101
+ d,
102
+ {
103
+ owner: t,
104
+ className: l(x > 0 && "-ml-1.5", t.inactive && "opacity-50 grayscale")
105
+ },
106
+ t.id
107
+ )),
108
+ s > 0 && /* @__PURE__ */ i("span", { className: "-ml-1.5 inline-flex h-[22px] min-w-[22px] shrink-0 items-center justify-center rounded-full bg-slate-100 px-1 text-[9px] font-semibold text-slate-600 ring-2 ring-white dark:bg-muted dark:text-slate-300 dark:ring-card", children: [
85
109
  "+",
86
- c
110
+ s
87
111
  ] })
88
112
  ] }),
89
- e.length === 1 && /* @__PURE__ */ a("span", { className: "ml-1.5 truncate text-[12px] text-slate-600 group-hover/owners:text-slate-800 dark:text-slate-300", children: e[0].name })
113
+ e.length === 1 && /* @__PURE__ */ i("span", { className: "ml-1.5 flex min-w-0 items-center", children: [
114
+ /* @__PURE__ */ a(
115
+ "span",
116
+ {
117
+ className: l(
118
+ "truncate text-[12px] text-slate-600 group-hover/owners:text-slate-800 dark:text-slate-300",
119
+ e[0].inactive && "line-through decoration-slate-400"
120
+ ),
121
+ children: e[0].name
122
+ }
123
+ ),
124
+ /* @__PURE__ */ a(f, { owner: e[0] })
125
+ ] }),
126
+ e.length > 1 && e.some((t) => t.inactive) && /* @__PURE__ */ a("span", { className: "ml-1.5 text-[10px] text-slate-500 dark:text-slate-400", children: e.every((t) => t.inactive) ? "none can act" : `${e.filter((t) => t.inactive).length} can’t act` })
90
127
  ]
91
128
  }
92
129
  ) }),
93
- /* @__PURE__ */ l(
94
- b,
130
+ /* @__PURE__ */ i(
131
+ k,
95
132
  {
96
133
  className: "w-[240px] p-1.5",
97
134
  align: "start",
98
- onClick: (n) => n.stopPropagation(),
135
+ onClick: (t) => t.stopPropagation(),
99
136
  children: [
100
- /* @__PURE__ */ l("p", { className: "px-2 pb-1 pt-0.5 text-[10px] font-medium uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: [
137
+ /* @__PURE__ */ i("p", { className: "px-2 pb-1 pt-0.5 text-[10px] font-medium uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: [
101
138
  e.length,
102
139
  " owner",
103
140
  e.length === 1 ? "" : "s"
104
141
  ] }),
105
- /* @__PURE__ */ a("div", { className: "max-h-[260px] space-y-0.5 overflow-y-auto", children: e.map((n) => /* @__PURE__ */ l("div", { className: "flex items-center gap-2 rounded px-2 py-1", children: [
106
- /* @__PURE__ */ a(f, { owner: n }),
107
- /* @__PURE__ */ a("span", { className: "truncate text-[12px] text-slate-700 dark:text-slate-200", children: n.name })
108
- ] }, n.id)) })
142
+ /* @__PURE__ */ a("div", { className: "max-h-[260px] space-y-0.5 overflow-y-auto", children: e.map((t) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2 rounded px-2 py-1", children: [
143
+ /* @__PURE__ */ a(d, { owner: t }),
144
+ /* @__PURE__ */ a("span", { className: "truncate text-[12px] text-slate-700 dark:text-slate-200", children: t.name }),
145
+ /* @__PURE__ */ a(f, { owner: t })
146
+ ] }, t.id)) })
109
147
  ]
110
148
  }
111
149
  )
112
150
  ] });
113
151
  }
114
152
  export {
115
- O as OwnerAvatars
153
+ T as OwnerAvatars,
154
+ N as ownerText
116
155
  };
@@ -1,36 +1,36 @@
1
- import { jsxs as f, jsx as i, Fragment as S } from "react/jsx-runtime";
2
- import { useQuery as N } from "@tanstack/react-query";
3
- import { useState as x, useEffect as O, useMemo as C } from "react";
4
- import { MultiPick as q } from "../CollectionBrowserView.js";
5
- const d = (r) => Array.isArray(r) ? r : r ? [r] : [];
6
- function v({
1
+ import { jsxs as v, jsx as c, Fragment as q } from "react/jsx-runtime";
2
+ import { useQuery as S } from "@tanstack/react-query";
3
+ import { useState as x, useEffect as N, useMemo as C } from "react";
4
+ import { MultiPick as f } from "../CollectionBrowserView.js";
5
+ const b = (r) => Array.isArray(r) ? r : r ? [r] : [];
6
+ function O({
7
7
  def: r,
8
8
  selected: n,
9
- onChange: h,
10
- badge: y,
9
+ onChange: g,
10
+ badge: u,
11
11
  narrowBy: p
12
12
  }) {
13
- const [c, g] = x(!1), [o, m] = x(""), u = r.loadOptions, e = JSON.stringify(p), { data: a = [], isLoading: l } = N({
13
+ const [i, d] = x(!1), [o, h] = x(""), y = r.loadOptions, e = JSON.stringify(p), { data: a = [], isLoading: l } = S({
14
14
  queryKey: ["queue-quick-facet", r.key, o, e],
15
- queryFn: () => u ? u(o, { narrowBy: p }) : Promise.resolve([]),
16
- enabled: !!u && (c || n.length > 0),
15
+ queryFn: () => y ? y(o, { narrowBy: p }) : Promise.resolve([]),
16
+ enabled: !!y && (i || n.length > 0),
17
17
  staleTime: 6e4
18
- }), k = C(() => {
18
+ }), m = C(() => {
19
19
  const s = new Set(a.map((t) => t.value));
20
20
  return [...a, ...n.filter((t) => !s.has(t)).map((t) => ({ label: t, value: t }))];
21
21
  }, [a, n]);
22
- return /* @__PURE__ */ i(
23
- q,
22
+ return /* @__PURE__ */ c(
23
+ f,
24
24
  {
25
25
  label: r.placeholder,
26
- options: k,
26
+ options: m,
27
27
  selected: n,
28
- onChange: (s) => h(s.map(String)),
28
+ onChange: (s) => g(s.map(String)),
29
29
  loading: l,
30
- badge: y,
31
- onSearch: m,
30
+ badge: u,
31
+ onSearch: h,
32
32
  onOpenChange: (s) => {
33
- s && g(!0);
33
+ s && d(!0);
34
34
  }
35
35
  }
36
36
  );
@@ -38,69 +38,69 @@ function v({
38
38
  function Q({
39
39
  defs: r,
40
40
  values: n,
41
- seededKeys: h,
42
- onApply: y,
41
+ seededKeys: g,
42
+ onApply: u,
43
43
  onClear: p,
44
- right: c
44
+ right: i
45
45
  }) {
46
- const g = JSON.stringify(r.map((e) => [e.key, d(n[e.key])])), [o, m] = x({});
47
- O(() => {
46
+ const d = JSON.stringify(r.map((e) => [e.key, b(n[e.key])])), [o, h] = x({});
47
+ N(() => {
48
48
  const e = {};
49
- for (const a of r) e[a.key] = d(n[a.key]);
50
- m(e);
51
- }, [g]);
52
- const u = r.some(
53
- (e) => JSON.stringify(o[e.key] ?? []) !== JSON.stringify(d(n[e.key]))
49
+ for (const a of r) e[a.key] = b(n[a.key]);
50
+ h(e);
51
+ }, [d]);
52
+ const y = r.some(
53
+ (e) => JSON.stringify(o[e.key] ?? []) !== JSON.stringify(b(n[e.key]))
54
54
  );
55
- return r.length === 0 && !c ? null : /* @__PURE__ */ f(
55
+ return r.length === 0 && !i ? null : /* @__PURE__ */ v(
56
56
  "div",
57
57
  {
58
58
  className: "flex shrink-0 flex-wrap items-center gap-1.5 border-b border-slate-100 bg-white px-4 py-1.5 dark:border-slate-800 dark:bg-slate-900",
59
59
  "data-queue-quick-filters": !0,
60
60
  children: [
61
61
  r.map((e) => {
62
- const a = o[e.key] ?? [], l = e.restricted ? {
63
- label: "restricted",
64
- cls: "bg-amber-500/15 text-amber-700 dark:text-amber-300",
65
- title: `Options limited to your restricted ${e.placeholder} scope`
66
- } : h.has(e.key) && a.length > 0 ? {
62
+ const a = o[e.key] ?? [], l = g.has(e.key) && a.length > 0 ? {
67
63
  label: "your default",
68
64
  cls: "bg-nvr-cyan/[0.12] text-[#0284a8] dark:text-nvr-cyan",
69
- title: `Pre-selected from your default ${e.placeholder} scope — adjust freely`
70
- } : null, k = (t) => {
71
- m((b) => ({ ...b, [e.key]: t })), t.length === 0 && d(n[e.key]).length > 0 && y({ [e.key]: e.multi || e.type === "combobox" ? [] : "" });
65
+ title: `Pre-selected from your default ${e.placeholder} — change it freely.${e.restricted ? " The list shows only the ones you have access to." : ""}`
66
+ } : e.restricted ? {
67
+ label: "your access",
68
+ cls: "bg-amber-500/15 text-amber-700 dark:text-amber-300",
69
+ title: `The ${e.placeholder} list shows only the ones you have access to.`
70
+ } : null, m = (t) => {
71
+ h((k) => ({ ...k, [e.key]: t })), t.length === 0 && b(n[e.key]).length > 0 && u({ [e.key]: e.multi || e.type === "combobox" ? [] : "" });
72
72
  }, s = r.filter((t) => {
73
- var b;
74
- return t.key !== e.key && t.cascade && (((b = o[t.key]) == null ? void 0 : b.length) ?? 0) > 0;
73
+ var k;
74
+ return t.key !== e.key && t.cascade && (((k = o[t.key]) == null ? void 0 : k.length) ?? 0) > 0;
75
75
  }).map((t) => ({
76
76
  collection: t.cascade.collection,
77
77
  field: t.cascade.field,
78
78
  values: o[t.key] ?? []
79
79
  }));
80
- return e.loadOptions ? /* @__PURE__ */ i(
81
- v,
80
+ return e.loadOptions ? /* @__PURE__ */ c(
81
+ O,
82
82
  {
83
83
  def: e,
84
84
  selected: a,
85
- onChange: k,
85
+ onChange: m,
86
86
  badge: l,
87
87
  narrowBy: s
88
88
  },
89
89
  e.key
90
- ) : /* @__PURE__ */ i(
91
- q,
90
+ ) : /* @__PURE__ */ c(
91
+ f,
92
92
  {
93
93
  label: e.placeholder,
94
94
  options: e.options ?? [],
95
95
  selected: a,
96
- onChange: (t) => k(t.map(String)),
96
+ onChange: (t) => m(t.map(String)),
97
97
  badge: l
98
98
  },
99
99
  e.key
100
100
  );
101
101
  }),
102
- r.length > 0 && /* @__PURE__ */ f(S, { children: [
103
- /* @__PURE__ */ i(
102
+ r.length > 0 && /* @__PURE__ */ v(q, { children: [
103
+ /* @__PURE__ */ c(
104
104
  "button",
105
105
  {
106
106
  type: "button",
@@ -110,14 +110,14 @@ function Q({
110
110
  const l = o[a.key] ?? [];
111
111
  e[a.key] = a.multi || a.type === "combobox" ? l : l[0] ?? "";
112
112
  }
113
- y(e);
113
+ u(e);
114
114
  },
115
- 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"}`,
115
+ className: `h-6 rounded px-2.5 text-[11px] font-semibold transition-[filter] hover:brightness-110 ${y ? "bg-nvr-cyan text-nvr-navy" : "bg-nvr-cyan/15 text-nvr-navy dark:text-nvr-cyan"}`,
116
116
  "data-queue-quick-apply": !0,
117
117
  children: "Apply"
118
118
  }
119
119
  ),
120
- /* @__PURE__ */ i(
120
+ /* @__PURE__ */ c(
121
121
  "button",
122
122
  {
123
123
  type: "button",
@@ -128,7 +128,7 @@ function Q({
128
128
  }
129
129
  )
130
130
  ] }),
131
- c && /* @__PURE__ */ i("div", { className: "ml-auto flex items-center gap-2", children: c })
131
+ i && /* @__PURE__ */ c("div", { className: "ml-auto flex items-center gap-2", children: i })
132
132
  ]
133
133
  }
134
134
  );