@nivaro/react 0.3.56 → 0.3.58

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 (55) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +9 -2
  4. package/dist/shared/components/CollectionBrowserView.js +2827 -2750
  5. package/dist/shared/components/DataTable.js +247 -236
  6. package/dist/shared/components/ItemEditForm.js +1693 -1668
  7. package/dist/shared/components/ProfileView.js +716 -715
  8. package/dist/shared/components/RecordReadView.js +367 -364
  9. package/dist/shared/components/ReportView.js +64 -39
  10. package/dist/shared/components/alerts/AlertManagerView.js +284 -271
  11. package/dist/shared/components/cbv/row-focus.js +19 -0
  12. package/dist/shared/components/help-videos/HelpVideoPlayer.js +152 -147
  13. package/dist/shared/components/integrations/console/SignalCard.js +59 -59
  14. package/dist/shared/components/integrations/console/tone.js +52 -30
  15. package/dist/shared/components/item-edit/CatalogPickerField.js +525 -505
  16. package/dist/shared/components/item-edit/FieldRow.js +175 -173
  17. package/dist/shared/components/item-edit/InlineTableField.js +407 -402
  18. package/dist/shared/components/item-edit/M2MCombobox.js +313 -291
  19. package/dist/shared/components/item-edit/MidairCollisionDialog.js +1 -1
  20. package/dist/shared/components/item-edit/PlanGrid.js +826 -803
  21. package/dist/shared/components/item-edit/QuickCreateButton.js +115 -79
  22. package/dist/shared/components/item-edit/RecordLiveSync.js +77 -75
  23. package/dist/shared/components/item-edit/RelationCombobox.js +412 -328
  24. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +147 -125
  25. package/dist/shared/components/item-edit/SummaryPanel.js +406 -392
  26. package/dist/shared/components/item-edit/option-disambiguate.js +44 -32
  27. package/dist/shared/components/item-edit/related-missing.js +45 -0
  28. package/dist/shared/components/item-edit/save-outcome.js +5 -5
  29. package/dist/shared/components/notifications/NotificationRulesEditor.js +130 -123
  30. package/dist/shared/components/panels/AccessDeniedPanel.js +52 -48
  31. package/dist/shared/components/panels/ItemLockBanner.js +2 -3
  32. package/dist/shared/components/panels/PipelinePanel.js +1027 -978
  33. package/dist/shared/components/panels/RevisionsPanel.js +4 -1
  34. package/dist/shared/components/panels/TaskPanel.js +265 -249
  35. package/dist/shared/components/panels/landing-state.js +27 -0
  36. package/dist/shared/components/pipeline/PipelineEditorView.js +86 -78
  37. package/dist/shared/components/profile/AiMemoryCard.js +12 -10
  38. package/dist/shared/components/queue/OwnerAvatars.js +80 -41
  39. package/dist/shared/components/queue/QueueItemSheet.js +111 -111
  40. package/dist/shared/components/queue/QueueQuickFilters.js +48 -48
  41. package/dist/shared/components/queue/QueueWorklist.js +975 -964
  42. package/dist/shared/components/queue/group-sums.js +27 -0
  43. package/dist/shared/components/queue/live-state-aspect.js +7 -3
  44. package/dist/shared/components/queue/path-label.js +14 -0
  45. package/dist/shared/components/widgets/ReviewListWidget.js +186 -168
  46. package/dist/shared/lib/back-closes.js +25 -0
  47. package/dist/shared/lib/cbv-page-warm.js +36 -0
  48. package/dist/shared/lib/form-usage-beacon.js +7 -7
  49. package/dist/shared/lib/list-page-memory.js +41 -0
  50. package/dist/shared/lib/live.js +44 -44
  51. package/dist/shared/lib/own-writes.js +76 -28
  52. package/dist/shared/lib/record-ref.js +78 -53
  53. package/dist/shared/lib/request-gate.js +110 -109
  54. package/dist/shared/lib/validation-rules.js +34 -19
  55. package/package.json +1 -1
@@ -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";
1
+ import { jsxs as f, jsx as c, Fragment as S } from "react/jsx-runtime";
2
+ import { useQuery as v } from "@tanstack/react-query";
3
+ import { useState as x, useEffect as N, useMemo as w } from "react";
4
4
  import { MultiPick as q } from "../CollectionBrowserView.js";
5
- const d = (r) => Array.isArray(r) ? r : r ? [r] : [];
6
- function v({
5
+ const b = (r) => Array.isArray(r) ? r : r ? [r] : [];
6
+ function C({
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 } = v({
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 = w(() => {
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(
22
+ return /* @__PURE__ */ c(
23
23
  q,
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__ */ f(
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
+ C,
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(
90
+ ) : /* @__PURE__ */ c(
91
91
  q,
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
102
  r.length > 0 && /* @__PURE__ */ f(S, { children: [
103
- /* @__PURE__ */ i(
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 text-white transition-[filter] hover:brightness-110 ${y ? "bg-nvr-cyan" : "bg-nvr-cyan opacity-60"}`,
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
  );