@nivaro/react 0.3.64 → 0.3.66

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 (74) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +62 -8
  4. package/dist/shared/components/CollectionBrowserView.js +3127 -3204
  5. package/dist/shared/components/ConformanceView.js +235 -221
  6. package/dist/shared/components/DataTable.js +478 -459
  7. package/dist/shared/components/ItemEditForm.js +4842 -4500
  8. package/dist/shared/components/MyWorkView.js +124 -113
  9. package/dist/shared/components/PageRenderer.js +146 -138
  10. package/dist/shared/components/ProfileView.js +483 -472
  11. package/dist/shared/components/RecordDrilldownSheet.js +73 -65
  12. package/dist/shared/components/ReportView.js +1100 -1094
  13. package/dist/shared/components/bulk/BulkActionButtons.js +72 -72
  14. package/dist/shared/components/bulk/BulkCompareButton.js +62 -0
  15. package/dist/shared/components/bulk/BulkFieldUpdate.js +114 -103
  16. package/dist/shared/components/bulk/BulkFieldUpdateButton.js +73 -0
  17. package/dist/shared/components/bulk/MessageStakeholders.js +235 -0
  18. package/dist/shared/components/bulk/bulk-field-options.js +29 -23
  19. package/dist/shared/components/integrations/IntegrationObligationsView.js +191 -173
  20. package/dist/shared/components/integrations/IntegrationStatusLines.js +101 -85
  21. package/dist/shared/components/integrations/RecordIntegrationPreview.js +11 -9
  22. package/dist/shared/components/integrations/SendCurrentData.js +126 -0
  23. package/dist/shared/components/item-edit/CatalogPickerField.js +1535 -1440
  24. package/dist/shared/components/item-edit/FieldRenderer.js +49 -45
  25. package/dist/shared/components/item-edit/FieldRow.js +413 -403
  26. package/dist/shared/components/item-edit/GroupSection.js +555 -538
  27. package/dist/shared/components/item-edit/InlineTableField.js +2903 -2816
  28. package/dist/shared/components/item-edit/M2MCombobox.js +407 -338
  29. package/dist/shared/components/item-edit/MidairCollisionDialog.js +367 -116
  30. package/dist/shared/components/item-edit/NestedRelationEditor.js +171 -163
  31. package/dist/shared/components/item-edit/PlanGrid.js +783 -724
  32. package/dist/shared/components/item-edit/QuickCreateButton.js +291 -224
  33. package/dist/shared/components/item-edit/RecordInsights.js +113 -111
  34. package/dist/shared/components/item-edit/RecordLiveSync.js +4 -1
  35. package/dist/shared/components/item-edit/RelationCombobox.js +398 -364
  36. package/dist/shared/components/item-edit/SummaryPanel.js +146 -144
  37. package/dist/shared/components/item-edit/UserChip.js +264 -229
  38. package/dist/shared/components/item-edit/cascade-clear-notice.js +56 -0
  39. package/dist/shared/components/item-edit/collision-format.js +37 -0
  40. package/dist/shared/components/item-edit/field-a11y.js +25 -0
  41. package/dist/shared/components/item-edit/header-path-preview.js +52 -0
  42. package/dist/shared/components/item-edit/line-merge.js +84 -0
  43. package/dist/shared/components/item-edit/line-midair.js +94 -87
  44. package/dist/shared/components/item-edit/move-guard.js +17 -0
  45. package/dist/shared/components/item-edit/picker-search.js +27 -16
  46. package/dist/shared/components/item-edit/rail-width.js +8 -0
  47. package/dist/shared/components/monitoring/InactiveUserLinksView.js +126 -124
  48. package/dist/shared/components/panels/AccessDeniedPanel.js +96 -55
  49. package/dist/shared/components/panels/CommentPanel.js +142 -136
  50. package/dist/shared/components/panels/ItemLockBanner.js +246 -240
  51. package/dist/shared/components/panels/PipelinePanel.js +1366 -1194
  52. package/dist/shared/components/panels/RevisionsPanel.js +106 -102
  53. package/dist/shared/components/panels/SlaBreachBanner.js +16 -20
  54. package/dist/shared/components/panels/SlaClock.js +90 -68
  55. package/dist/shared/components/queue/QueueItemSheet.js +94 -87
  56. package/dist/shared/components/queue/QueueWorklist.js +1522 -1347
  57. package/dist/shared/components/queue/worklist-csv.js +75 -0
  58. package/dist/shared/components/queue/worklist-helpers.js +20 -0
  59. package/dist/shared/components/widgets/ReviewListWidget.js +226 -207
  60. package/dist/shared/lib/bulk-copy.js +17 -0
  61. package/dist/shared/lib/cbv-export.js +122 -0
  62. package/dist/shared/lib/delete-offer.js +13 -0
  63. package/dist/shared/lib/error-hints.js +1 -0
  64. package/dist/shared/lib/leave-guard.js +41 -26
  65. package/dist/shared/lib/list-link.js +72 -56
  66. package/dist/shared/lib/live-queries.js +32 -30
  67. package/dist/shared/lib/moved-notice.js +25 -0
  68. package/dist/shared/lib/notification-target.js +56 -54
  69. package/dist/shared/lib/obligation-banner.js +11 -8
  70. package/dist/shared/lib/obligation-reason-text.js +6 -6
  71. package/dist/shared/lib/quick-filter-cascade.js +29 -19
  72. package/dist/shared/lib/sort-cycle.js +6 -0
  73. package/dist/shared/lib/summary-mode.js +59 -41
  74. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
- import { jsxs as a, Fragment as M, jsx as t } from "react/jsx-runtime";
2
- import { useQueryClient as T, useQuery as G } from "@tanstack/react-query";
3
- import { ArrowLeft as J, Eye as U, ExternalLink as X } from "lucide-react";
4
- import { useState as Y, useCallback as R, useMemo as Z, Suspense as $, lazy as j } from "react";
5
- import { useNivaroClient as L, useItemNavigation as P, useDrilldownViews as ee, DrilldownContext as v } from "../context.js";
6
- import { get as te } from "../lib/commands.js";
7
- import { usePresence as le } from "../lib/presence-hooks.js";
8
- import { titleCase as re } from "../lib/utils.js";
9
- import { DesignCanvas as oe } from "./layout-editor/design-canvas.js";
10
- import { Sheet as ne, SheetContent as ae, SheetHeader as ie, SheetTitle as ce } from "./ui/sheet.js";
11
- const se = j(() => import("./ItemEditForm.js").then((n) => ({ default: n.ItemEditForm }))), q = j(
1
+ import { jsxs as a, Fragment as U, jsx as t } from "react/jsx-runtime";
2
+ import { useQueryClient as G, useQuery as J } from "@tanstack/react-query";
3
+ import { ArrowLeft as X, Eye as Y, ExternalLink as Z } from "lucide-react";
4
+ import { useState as L, useCallback as K, useMemo as P, Suspense as q, lazy as j } from "react";
5
+ import { useNivaroClient as ee, useItemNavigation as te, useDrilldownViews as le, DrilldownContext as y } from "../context.js";
6
+ import { get as re } from "../lib/commands.js";
7
+ import { usePresence as oe } from "../lib/presence-hooks.js";
8
+ import { titleCase as ne } from "../lib/utils.js";
9
+ import { DesignCanvas as ae } from "./layout-editor/design-canvas.js";
10
+ import { Sheet as ie, SheetContent as ce, SheetHeader as se, SheetTitle as de } from "./ui/sheet.js";
11
+ const me = j(() => import("./ItemEditForm.js").then((n) => ({ default: n.ItemEditForm }))), F = j(
12
12
  () => import("./RecordReadView.js").then((n) => ({ default: n.RecordReadView }))
13
13
  ), b = /* @__PURE__ */ t("div", { className: "space-y-2 px-4 py-3", children: [0, 1, 2, 3, 4, 5].map((n) => /* @__PURE__ */ t(
14
14
  "div",
@@ -17,59 +17,60 @@ const se = j(() => import("./ItemEditForm.js").then((n) => ({ default: n.ItemEdi
17
17
  },
18
18
  n
19
19
  )) });
20
- function we({
20
+ function ke({
21
21
  collection: n,
22
22
  itemId: E,
23
23
  layoutId: W,
24
- rootLayoutSlug: y,
25
- width: f,
26
- title: F,
27
- stack: p,
24
+ rootLayoutSlug: w,
25
+ width: p,
26
+ title: Q,
27
+ stack: x,
28
28
  onPush: u,
29
29
  onPop: h,
30
- onClose: K,
31
- design: l
30
+ onClose: _,
31
+ design: l,
32
+ onOpenRecord: g
32
33
  }) {
33
- var D;
34
- const O = T(), Q = L(), { open: _ } = P(), [A, w] = Y([
35
- { collection: n, itemId: E, layoutId: W, width: f, title: F }
36
- ]), s = p != null, i = s && p.length ? p : A, e = l ? i[0] : i[i.length - 1], k = R(
37
- (o) => {
38
- s ? u == null || u(o) : w((H) => [...H, o]);
34
+ var R;
35
+ const A = G(), O = ee(), { open: V, urlFor: z } = te(), [B, k] = L([
36
+ { collection: n, itemId: E, layoutId: W, width: p, title: Q }
37
+ ]), s = x != null, i = s && x.length ? x : B, e = l ? i[0] : i[i.length - 1], I = K(
38
+ (r) => {
39
+ s ? u == null || u(r) : k((f) => [...f, r]);
39
40
  },
40
41
  [s, u]
41
- ), g = R(() => {
42
- s ? h == null || h() : w((o) => o.slice(0, -1));
43
- }, [s, h]), { viewers: c } = le(
42
+ ), N = K(() => {
43
+ s ? h == null || h() : k((r) => r.slice(0, -1));
44
+ }, [s, h]), { viewers: c } = oe(
44
45
  l ? null : e.collection,
45
46
  l ? null : e.itemId
46
- ), x = Z(() => l ? null : { open: k }, [l, k]), V = ee(), d = l ? null : V[e.collection] ?? null, m = !l && i.length === 1 && !!y, { data: z, isLoading: B } = G({
47
+ ), v = P(() => l ? null : { open: I }, [l, I]), H = le(), d = l ? null : H[e.collection] ?? null, m = !l && i.length === 1 && !!w, { data: M, isLoading: T } = J({
47
48
  queryKey: ["drilldown-layout", e.collection, e.layoutId ?? null],
48
49
  enabled: !m && !l,
49
- queryFn: () => Q.request(
50
- te(
50
+ queryFn: () => O.request(
51
+ re(
51
52
  `/collection-layouts/detail/${e.collection}`,
52
53
  e.layoutId ? { layout_id: e.layoutId } : {}
53
54
  )
54
- ).then((o) => o.data ?? null)
55
- }), r = l ? {
55
+ ).then((r) => r.data ?? null)
56
+ }), o = l ? {
56
57
  ...l.layout,
57
58
  layout: l.layout.layout ?? { id: 0, name: "", slug: null }
58
- } : z, N = m ? y ?? void 0 : (r == null ? void 0 : r.layout.slug) ?? void 0, I = (D = r == null ? void 0 : r.layout) == null ? void 0 : D.sheet_width, C = /* @__PURE__ */ a(M, { children: [
59
+ } : M, S = m ? w ?? void 0 : (o == null ? void 0 : o.layout.slug) ?? void 0, C = (R = o == null ? void 0 : o.layout) == null ? void 0 : R.sheet_width, D = /* @__PURE__ */ a(U, { children: [
59
60
  /* @__PURE__ */ a("span", { className: "flex min-w-0 items-center gap-1.5", children: [
60
61
  i.length > 1 && /* @__PURE__ */ t(
61
62
  "button",
62
63
  {
63
64
  type: "button",
64
65
  "aria-label": "Back",
65
- onClick: g,
66
+ onClick: N,
66
67
  className: "shrink-0 rounded p-0.5 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-slate-800 dark:hover:text-slate-200",
67
- children: /* @__PURE__ */ t(J, { className: "h-4 w-4" })
68
+ children: /* @__PURE__ */ t(X, { className: "h-4 w-4" })
68
69
  }
69
70
  ),
70
71
  /* @__PURE__ */ a("span", { className: "truncate", children: [
71
- re(e.collection),
72
- !m && r ? ` · ${r.layout.name}` : ""
72
+ ne(e.collection),
73
+ !m && o ? ` · ${o.layout.name}` : ""
73
74
  ] })
74
75
  ] }),
75
76
  !l && c.length > 0 && /* @__PURE__ */ a(
@@ -77,79 +78,86 @@ function we({
77
78
  {
78
79
  className: "ml-auto flex min-w-0 items-center gap-1 text-[11px] font-normal text-slate-500 dark:text-slate-400",
79
80
  "data-drill-viewers": c.length,
80
- "data-tip": `Also viewing: ${c.map((o) => o.name).join(", ")}`,
81
+ "data-tip": `Also viewing: ${c.map((r) => r.name).join(", ")}`,
81
82
  children: [
82
- /* @__PURE__ */ t(U, { className: "h-3 w-3 shrink-0" }),
83
+ /* @__PURE__ */ t(Y, { className: "h-3 w-3 shrink-0" }),
83
84
  /* @__PURE__ */ t("span", { className: "truncate", children: c.length === 1 ? c[0].name : `${c.length} others` })
84
85
  ]
85
86
  }
86
87
  ),
87
- !l && /* @__PURE__ */ a(
88
- "button",
88
+ !l && // A real link (army 11 Q1-4): Cmd/Ctrl/middle-click opens the record in a new
89
+ // tab and keeps this list where it is; a plain click goes through the host.
90
+ /* @__PURE__ */ a(
91
+ "a",
89
92
  {
90
- type: "button",
91
- onClick: () => _({ collection: e.collection, itemId: e.itemId }),
93
+ href: z({ collection: e.collection, itemId: e.itemId }),
94
+ onClick: (r) => {
95
+ if (r.metaKey || r.ctrlKey || r.shiftKey || r.altKey || r.button !== 0) return;
96
+ r.preventDefault();
97
+ const f = { collection: e.collection, itemId: String(e.itemId) };
98
+ g ? g(f) : V(f);
99
+ },
92
100
  className: "flex shrink-0 items-center gap-1 text-[11px] font-normal text-nvr-navy hover:underline dark:text-nvr-cyan",
93
101
  children: [
94
102
  "Open record ",
95
- /* @__PURE__ */ t(X, { className: "h-3 w-3" })
103
+ /* @__PURE__ */ t(Z, { className: "h-3 w-3" })
96
104
  ]
97
105
  }
98
106
  )
99
- ] }), S = /* @__PURE__ */ t("div", { className: "nvr-tab-enter flex min-h-0 flex-1 flex-col overflow-hidden", children: d ? /* @__PURE__ */ t(v.Provider, { value: x, children: d.render({ itemId: String(e.itemId) }) }) : B && !m ? b : !m && (r == null ? void 0 : r.layout.display_mode) === "read" ? (
107
+ ] }), $ = /* @__PURE__ */ t("div", { className: "nvr-tab-enter flex min-h-0 flex-1 flex-col overflow-hidden", children: d ? /* @__PURE__ */ t(y.Provider, { value: v, children: d.render({ itemId: String(e.itemId) }) }) : T && !m ? b : !m && (o == null ? void 0 : o.layout.display_mode) === "read" ? (
100
108
  // Read-only presentation — definition grids + tabbed child lists,
101
109
  // no form inputs. Editing lives on the full record page.
102
- /* @__PURE__ */ t(v.Provider, { value: x, children: /* @__PURE__ */ t($, { fallback: b, children: l ? /* @__PURE__ */ t(q, { collection: e.collection, design: l }) : /* @__PURE__ */ t(
103
- q,
110
+ /* @__PURE__ */ t(y.Provider, { value: v, children: /* @__PURE__ */ t(q, { fallback: b, children: l ? /* @__PURE__ */ t(F, { collection: e.collection, design: l }) : /* @__PURE__ */ t(
111
+ F,
104
112
  {
105
113
  collection: e.collection,
106
114
  itemId: e.itemId,
107
- layoutData: r
115
+ layoutData: o
108
116
  },
109
117
  `${e.collection}:${e.itemId}:read`
110
118
  ) }) })
111
- ) : /* @__PURE__ */ t(v.Provider, { value: x, children: /* @__PURE__ */ t($, { fallback: b, children: /* @__PURE__ */ t(
112
- se,
119
+ ) : /* @__PURE__ */ t(y.Provider, { value: v, children: /* @__PURE__ */ t(q, { fallback: b, children: /* @__PURE__ */ t(
120
+ me,
113
121
  {
114
122
  collection: e.collection,
115
123
  itemId: e.itemId,
116
- layoutSlug: N,
124
+ layoutSlug: S,
117
125
  onSaved: () => {
118
- O.invalidateQueries({ queryKey: ["queue-items"] });
126
+ A.invalidateQueries({ queryKey: ["queue-items"] });
119
127
  },
120
128
  design: l
121
129
  },
122
- `${e.collection}:${e.itemId}:${N ?? "default"}`
130
+ `${e.collection}:${e.itemId}:${S ?? "default"}`
123
131
  ) }) }) });
124
- return l ? /* @__PURE__ */ t(oe, { design: l.context, onRefusedWrite: l.onRefusedWrite, children: /* @__PURE__ */ a(
132
+ return l ? /* @__PURE__ */ t(ae, { design: l.context, onRefusedWrite: l.onRefusedWrite, children: /* @__PURE__ */ a(
125
133
  "div",
126
134
  {
127
135
  "data-design-sheet": !0,
128
136
  className: "flex h-full min-h-0 flex-col gap-0 overflow-hidden rounded-lg border border-slate-200 bg-background shadow-sm dark:border-border",
129
- style: { width: I ?? f ?? 640, maxWidth: "100%" },
137
+ style: { width: C ?? p ?? 640, maxWidth: "100%" },
130
138
  children: [
131
- /* @__PURE__ */ t("div", { className: "flex shrink-0 flex-col border-b border-slate-200 bg-slate-50 px-4 py-2 dark:border-border dark:bg-muted/30", children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between gap-2 text-[12px] font-medium text-slate-500 dark:text-muted-foreground", children: C }) }),
132
- S
139
+ /* @__PURE__ */ t("div", { className: "flex shrink-0 flex-col border-b border-slate-200 bg-slate-50 px-4 py-2 dark:border-border dark:bg-muted/30", children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between gap-2 text-[12px] font-medium text-slate-500 dark:text-muted-foreground", children: D }) }),
140
+ $
133
141
  ]
134
142
  }
135
- ) }) : /* @__PURE__ */ t(ne, { open: !0, onOpenChange: (o) => !o && K(), children: /* @__PURE__ */ a(
136
- ae,
143
+ ) }) : /* @__PURE__ */ t(ie, { open: !0, onOpenChange: (r) => !r && _(), children: /* @__PURE__ */ a(
144
+ ce,
137
145
  {
138
146
  className: "flex flex-col gap-0 overflow-hidden p-0",
139
147
  style: {
140
- width: (d == null ? void 0 : d.width) ?? e.width ?? I ?? f ?? 640,
148
+ width: (d == null ? void 0 : d.width) ?? e.width ?? C ?? p ?? 640,
141
149
  maxWidth: "96vw"
142
150
  },
143
- onEscapeKeyDown: i.length > 1 ? (o) => {
144
- o.preventDefault(), g();
151
+ onEscapeKeyDown: i.length > 1 ? (r) => {
152
+ r.preventDefault(), N();
145
153
  } : void 0,
146
154
  children: [
147
- /* @__PURE__ */ t(ie, { className: "shrink-0 border-b border-slate-200 bg-slate-50 px-4 py-2 dark:border-border dark:bg-muted/30", children: /* @__PURE__ */ t(ce, { className: "flex items-center justify-between gap-2 pr-6 text-[12px] font-medium text-slate-500 dark:text-muted-foreground", children: C }) }),
148
- S
155
+ /* @__PURE__ */ t(se, { className: "shrink-0 border-b border-slate-200 bg-slate-50 px-4 py-2 dark:border-border dark:bg-muted/30", children: /* @__PURE__ */ t(de, { className: "flex items-center justify-between gap-2 pr-6 text-[12px] font-medium text-slate-500 dark:text-muted-foreground", children: D }) }),
156
+ $
149
157
  ]
150
158
  }
151
159
  ) });
152
160
  }
153
161
  export {
154
- we as RecordDrilldownSheet
162
+ ke as RecordDrilldownSheet
155
163
  };