@nivaro/react 0.3.9 → 0.3.11

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 (80) hide show
  1. package/dist/components/fields/FileField.js +20 -19
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useNivaroForm.js +129 -126
  4. package/dist/hooks/useSessionRecorder.js +1 -1
  5. package/dist/index.d.ts +103 -4
  6. package/dist/index.js +512 -501
  7. package/dist/shared/components/CollectionBrowserView.js +1632 -1564
  8. package/dist/shared/components/ConformanceView.js +36 -35
  9. package/dist/shared/components/ForceReloadBanner.js +58 -34
  10. package/dist/shared/components/ItemEditForm.js +4386 -4142
  11. package/dist/shared/components/JsonMapEditor.js +18 -17
  12. package/dist/shared/components/MatrixEditor.js +8 -7
  13. package/dist/shared/components/MyWorkView.js +32 -31
  14. package/dist/shared/components/PageRenderer.js +527 -479
  15. package/dist/shared/components/QueryStatStrip.js +74 -70
  16. package/dist/shared/components/RecordGridEditor.js +76 -75
  17. package/dist/shared/components/ReportView.js +818 -827
  18. package/dist/shared/components/SheetHeaderBody.js +16 -14
  19. package/dist/shared/components/ai/AiMemorySuggestions.js +15 -14
  20. package/dist/shared/components/ai/AskPanel.js +55 -54
  21. package/dist/shared/components/bulk/BulkActionButtons.js +30 -29
  22. package/dist/shared/components/bulk/PushBulkButtons.js +57 -56
  23. package/dist/shared/components/chat/SlashCommands.js +30 -29
  24. package/dist/shared/components/chat/chat-outbox.js +76 -75
  25. package/dist/shared/components/help-videos/recorder/useLeaveWarning.js +6 -5
  26. package/dist/shared/components/integrations/console/SignalCard.js +124 -123
  27. package/dist/shared/components/integrations/console/SnoozeMenu.js +24 -23
  28. package/dist/shared/components/item-edit/CatalogPickerField.js +1029 -933
  29. package/dist/shared/components/item-edit/CloneDialog.js +85 -78
  30. package/dist/shared/components/item-edit/FieldRenderer.js +161 -156
  31. package/dist/shared/components/item-edit/FieldRow.js +20 -19
  32. package/dist/shared/components/item-edit/FilePickerField.js +52 -40
  33. package/dist/shared/components/item-edit/GroupSection.js +221 -221
  34. package/dist/shared/components/item-edit/InlineGridField.js +41 -41
  35. package/dist/shared/components/item-edit/InlineTableField.js +2287 -2275
  36. package/dist/shared/components/item-edit/M2MCombobox.js +46 -44
  37. package/dist/shared/components/item-edit/MembershipSetField.js +24 -23
  38. package/dist/shared/components/item-edit/NestedRelationEditor.js +11 -11
  39. package/dist/shared/components/item-edit/QuickCreateButton.js +8 -7
  40. package/dist/shared/components/item-edit/QuickPicker.js +263 -216
  41. package/dist/shared/components/item-edit/RecordLiveSync.js +101 -100
  42. package/dist/shared/components/item-edit/RelationCombobox.js +285 -245
  43. package/dist/shared/components/item-edit/RichTextEditorImpl.js +42 -32
  44. package/dist/shared/components/item-edit/RowHistorySheet.js +130 -134
  45. package/dist/shared/components/item-edit/SummaryPanel.js +305 -279
  46. package/dist/shared/components/item-edit/helpers.js +133 -134
  47. package/dist/shared/components/item-edit/line-qty.js +57 -0
  48. package/dist/shared/components/item-edit/option-disambiguate.js +53 -0
  49. package/dist/shared/components/item-edit/staged-links.js +86 -0
  50. package/dist/shared/components/layout-editor/LayoutEditor.js +275 -274
  51. package/dist/shared/components/layout-editor/editors/cascade-rule-row.js +18 -17
  52. package/dist/shared/components/layout-editor/inspector/HelpTab.js +37 -36
  53. package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +50 -49
  54. package/dist/shared/components/panels/AddendumLinesDiff.js +87 -90
  55. package/dist/shared/components/panels/CommentPanel.js +350 -315
  56. package/dist/shared/components/panels/ItemLockBanner.js +297 -230
  57. package/dist/shared/components/panels/PipelinePanel.js +719 -701
  58. package/dist/shared/components/profile/AiMemoryCard.js +15 -14
  59. package/dist/shared/components/profile/PersonAdminTools.js +70 -67
  60. package/dist/shared/components/queue/QueueItemSheet.js +36 -35
  61. package/dist/shared/components/queue/QueueQuickFilters.js +43 -41
  62. package/dist/shared/components/queue/QueueWorklist.js +1026 -957
  63. package/dist/shared/components/widgets/ReviewListWidget.js +99 -93
  64. package/dist/shared/lib/client-version.js +63 -0
  65. package/dist/shared/lib/force-reload.js +36 -0
  66. package/dist/shared/lib/load-error.js +11 -10
  67. package/dist/shared/lib/obligation-banner.js +14 -13
  68. package/dist/shared/lib/obligation-reason-text.js +13 -0
  69. package/dist/shared/lib/presence-live.js +54 -35
  70. package/dist/shared/lib/query-filter-seed.js +34 -11
  71. package/dist/shared/lib/record-outbox.js +76 -75
  72. package/dist/shared/lib/safe-error.js +39 -0
  73. package/dist/shared/lib/sanitize-html.js +24 -15
  74. package/dist/shared/lib/server-clock.js +11 -7
  75. package/dist/shared/lib/sheet-def.js +38 -22
  76. package/dist/shared/lib/unique-options.js +10 -0
  77. package/dist/shared/lib/unsaved-work.js +62 -0
  78. package/dist/shared/lib/utils.js +57 -43
  79. package/dist/shared/lib/validation-rules.js +58 -34
  80. package/package.json +1 -1
@@ -1,42 +1,43 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
2
  import { BellOff as D, Loader2 as g, EyeOff as S } from "lucide-react";
3
- import { useState as c } from "react";
3
+ import { useState as l } from "react";
4
+ import { userErrorMessage as L } from "../../../lib/safe-error.js";
4
5
  import { cn as C } from "../../../lib/utils.js";
5
- import { Popover as L, PopoverTrigger as j, PopoverContent as T } from "../../ui/popover.js";
6
+ import { Popover as j, PopoverTrigger as T, PopoverContent as B } from "../../ui/popover.js";
6
7
  import { useSnooze as P } from "./api.js";
7
- const B = [
8
+ const H = [
8
9
  { key: "day", label: "1 day" },
9
10
  { key: "week", label: "1 week" },
10
11
  { key: "change", label: "Until it changes" }
11
12
  ];
12
- function M({ signal: r, rowKey: u }) {
13
+ function W({ signal: r, rowKey: c }) {
13
14
  const { add: n } = P();
14
15
  return /* @__PURE__ */ t(
15
16
  "button",
16
17
  {
17
18
  type: "button",
18
- "data-ic-dismiss": `${r}:${u}`,
19
+ "data-ic-dismiss": `${r}:${c}`,
19
20
  "aria-label": "Dismiss this occurrence",
20
21
  "data-tip": "Hide until it happens again",
21
22
  disabled: n.isPending,
22
- onClick: () => n.mutate({ signal: r, row_key: u, until_occurrence: !0 }),
23
+ onClick: () => n.mutate({ signal: r, row_key: c, until_occurrence: !0 }),
23
24
  className: "inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-60",
24
25
  children: n.isPending ? /* @__PURE__ */ t(g, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(S, { className: "h-3.5 w-3.5" })
25
26
  }
26
27
  );
27
28
  }
28
- function U({
29
+ function J({
29
30
  signal: r,
30
- signalLabel: u,
31
+ signalLabel: c,
31
32
  rowKey: n,
32
33
  group: i,
33
34
  defaultScope: $,
34
35
  compact: h
35
36
  }) {
36
- const { add: s } = P(), [b, m] = c(!1), x = $ ?? (n ? "row" : i ? "group" : "signal"), [d, y] = c(x), [v, _] = c("day"), [k, N] = c(""), [w, p] = c(null), E = [
37
+ const { add: s } = P(), [b, u] = l(!1), x = $ ?? (n ? "row" : i ? "group" : "signal"), [d, y] = l(x), [v, _] = l("day"), [k, N] = l(""), [w, p] = l(null), E = [
37
38
  ...n ? [{ key: "row", label: "This problem" }] : [],
38
39
  ...i ? [{ key: "group", label: `Everything in ${i.label}` }] : [],
39
- { key: "signal", label: `All of “${u}”` }
40
+ { key: "signal", label: `All of “${c}”` }
40
41
  ], z = (e) => e !== "change" || d === "row", a = z(v) ? v : "day", O = () => {
41
42
  p(null);
42
43
  const e = a === "change" ? null : new Date(Date.now() + (a === "day" ? 1 : 7) * 864e5).toISOString();
@@ -51,24 +52,24 @@ function U({
51
52
  },
52
53
  {
53
54
  onSuccess: () => {
54
- m(!1), N("");
55
+ u(!1), N("");
55
56
  },
56
- onError: (l) => {
57
- const f = l == null ? void 0 : l.response;
58
- p((f == null ? void 0 : f.error) ?? (l instanceof Error ? l.message : "Could not snooze"));
57
+ onError: (m) => {
58
+ const f = m == null ? void 0 : m.response;
59
+ p((f == null ? void 0 : f.error) ?? L(m, "Could not snooze"));
59
60
  }
60
61
  }
61
62
  );
62
63
  };
63
64
  return /* @__PURE__ */ o(
64
- L,
65
+ j,
65
66
  {
66
67
  open: b,
67
68
  onOpenChange: (e) => {
68
- m(e), e && (y(x), p(null));
69
+ u(e), e && (y(x), p(null));
69
70
  },
70
71
  children: [
71
- /* @__PURE__ */ t(j, { asChild: !0, children: /* @__PURE__ */ o(
72
+ /* @__PURE__ */ t(T, { asChild: !0, children: /* @__PURE__ */ o(
72
73
  "button",
73
74
  {
74
75
  type: "button",
@@ -84,7 +85,7 @@ function U({
84
85
  ]
85
86
  }
86
87
  ) }),
87
- /* @__PURE__ */ o(T, { align: "end", className: "w-72 p-0", "data-ic-snooze-menu": !0, children: [
88
+ /* @__PURE__ */ o(B, { align: "end", className: "w-72 p-0", "data-ic-snooze-menu": !0, children: [
88
89
  n && /* @__PURE__ */ t("div", { className: "border-b border-border p-1", children: /* @__PURE__ */ o(
89
90
  "button",
90
91
  {
@@ -94,7 +95,7 @@ function U({
94
95
  onClick: () => {
95
96
  s.mutate(
96
97
  { signal: r, row_key: n, until_occurrence: !0 },
97
- { onSuccess: () => m(!1) }
98
+ { onSuccess: () => u(!1) }
98
99
  );
99
100
  },
100
101
  className: "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-[12.5px] font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-60",
@@ -131,7 +132,7 @@ function U({
131
132
  ] }),
132
133
  /* @__PURE__ */ o("fieldset", { children: [
133
134
  /* @__PURE__ */ t("legend", { className: "mb-1.5 text-[12px] font-medium text-foreground", children: "For how long" }),
134
- /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-1", children: B.filter((e) => z(e.key)).map((e) => /* @__PURE__ */ t(
135
+ /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-1", children: H.filter((e) => z(e.key)).map((e) => /* @__PURE__ */ t(
135
136
  "button",
136
137
  {
137
138
  type: "button",
@@ -166,7 +167,7 @@ function U({
166
167
  "button",
167
168
  {
168
169
  type: "button",
169
- onClick: () => m(!1),
170
+ onClick: () => u(!1),
170
171
  className: "h-7 rounded-md px-2.5 text-[12px] text-muted-foreground hover:text-foreground",
171
172
  children: "Cancel"
172
173
  }
@@ -192,6 +193,6 @@ function U({
192
193
  );
193
194
  }
194
195
  export {
195
- M as DismissButton,
196
- U as SnoozeMenu
196
+ W as DismissButton,
197
+ J as SnoozeMenu
197
198
  };