@nivaro/react 0.3.41 → 0.3.43

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 (97) hide show
  1. package/dist/components/LayoutForm.js +100 -98
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +733 -15
  5. package/dist/index.js +820 -775
  6. package/dist/shared/components/ActivityEntry.js +154 -0
  7. package/dist/shared/components/AudienceConfirmPanel.js +98 -0
  8. package/dist/shared/components/BackgroundRunOffer.js +43 -31
  9. package/dist/shared/components/BroadcastView.js +225 -204
  10. package/dist/shared/components/CollectionBrowserView.js +3924 -3584
  11. package/dist/shared/components/ConfigHistory.js +153 -0
  12. package/dist/shared/components/ConfigReadBack.js +65 -0
  13. package/dist/shared/components/DataTable.js +379 -346
  14. package/dist/shared/components/ForceReloadBanner.js +47 -40
  15. package/dist/shared/components/IdleReloadWatcher.js +69 -0
  16. package/dist/shared/components/ItemEditForm.js +4041 -3853
  17. package/dist/shared/components/MyWorkView.js +278 -213
  18. package/dist/shared/components/NotificationBell.js +130 -121
  19. package/dist/shared/components/ProfileView.js +776 -1003
  20. package/dist/shared/components/RecentRecordsRail.js +34 -16
  21. package/dist/shared/components/RecordReadView.js +500 -477
  22. package/dist/shared/components/Skeletons.js +199 -0
  23. package/dist/shared/components/SlowNotice.js +63 -0
  24. package/dist/shared/components/Term.js +23 -0
  25. package/dist/shared/components/WidgetSlot.js +350 -353
  26. package/dist/shared/components/access/PermissionSummary.js +106 -0
  27. package/dist/shared/components/bulk/BulkActionButtons.js +76 -73
  28. package/dist/shared/components/chat/ChatPanel.js +902 -886
  29. package/dist/shared/components/chat/MemberPaging.js +70 -0
  30. package/dist/shared/components/chat/RoomParts.js +147 -117
  31. package/dist/shared/components/chat/ScreenClip.js +73 -69
  32. package/dist/shared/components/chat/chat-core.js +449 -396
  33. package/dist/shared/components/chat/huddle/huddle-store.js +48 -43
  34. package/dist/shared/components/help-videos/api.js +2 -5
  35. package/dist/shared/components/help-videos/viewer/HelpVideoMatchChip.js +79 -0
  36. package/dist/shared/components/help-videos/viewer/matchChip.js +50 -0
  37. package/dist/shared/components/imports/CollectionImportPanel.js +139 -133
  38. package/dist/shared/components/imports/RunDetailSheet.js +222 -227
  39. package/dist/shared/components/integrations/console/ErrorExplanation.js +121 -0
  40. package/dist/shared/components/integrations/console/PartnerDetail.js +175 -174
  41. package/dist/shared/components/integrations/console/SubmissionRow.js +36 -34
  42. package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +50 -48
  43. package/dist/shared/components/item-edit/FieldComments.js +212 -0
  44. package/dist/shared/components/item-edit/FieldRow.js +340 -336
  45. package/dist/shared/components/item-edit/RecordHeaderActions.js +23 -22
  46. package/dist/shared/components/item-edit/RelationCombobox.js +231 -222
  47. package/dist/shared/components/item-edit/RuleHiddenNotes.js +55 -0
  48. package/dist/shared/components/item-edit/field-comments-context.js +6 -0
  49. package/dist/shared/components/item-edit/field-sources.js +33 -0
  50. package/dist/shared/components/item-edit/rule-hidden.js +30 -0
  51. package/dist/shared/components/layout-editor/HistoryPanel.js +113 -96
  52. package/dist/shared/components/layout-editor/editors/cascade-filters.js +170 -145
  53. package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +22 -18
  54. package/dist/shared/components/layout-editor/inspector/GroupInspector.js +177 -159
  55. package/dist/shared/components/layout-editor/inspector/PickerTab.js +35 -34
  56. package/dist/shared/components/layout-editor/inspector/RulesTab.js +124 -111
  57. package/dist/shared/components/layout-editor/inspector/kit.js +292 -277
  58. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  59. package/dist/shared/components/list/CopyListLinkButton.js +41 -0
  60. package/dist/shared/components/list/InlineEdit.js +363 -0
  61. package/dist/shared/components/notifications/NotificationCenterView.js +213 -181
  62. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -82
  63. package/dist/shared/components/notifications/NotificationRulesEditor.js +515 -0
  64. package/dist/shared/components/notifications/TestMyRules.js +137 -0
  65. package/dist/shared/components/notifications/changes-lines.js +24 -0
  66. package/dist/shared/components/notifications/why-lines.js +64 -0
  67. package/dist/shared/components/panels/CommentPanel.js +316 -281
  68. package/dist/shared/components/panels/LegalHoldBanner.js +38 -0
  69. package/dist/shared/components/panels/PipelinePanel.js +201 -196
  70. package/dist/shared/components/panels/RevisionsPanel.js +496 -479
  71. package/dist/shared/components/pipeline/PipelineEditorView.js +1587 -1560
  72. package/dist/shared/components/pipeline/PipelineStateOwners.js +116 -103
  73. package/dist/shared/components/profile/PersonDidPanel.js +188 -0
  74. package/dist/shared/components/profile/PersonProfile.js +57 -52
  75. package/dist/shared/components/queue/QueueWorklist.js +1526 -1365
  76. package/dist/shared/hooks/useSlowReason.js +39 -0
  77. package/dist/shared/lib/activity-sentence.js +670 -0
  78. package/dist/shared/lib/config-sentences.js +418 -0
  79. package/dist/shared/lib/core-glossary.js +229 -0
  80. package/dist/shared/lib/error-hints.js +159 -0
  81. package/dist/shared/lib/error-message.js +105 -0
  82. package/dist/shared/lib/error-toast.js +22 -0
  83. package/dist/shared/lib/field-comments.js +25 -0
  84. package/dist/shared/lib/filter-sentence.js +261 -0
  85. package/dist/shared/lib/glossary.js +55 -48
  86. package/dist/shared/lib/idle-reload.js +138 -0
  87. package/dist/shared/lib/layout-resolve.js +42 -29
  88. package/dist/shared/lib/list-inline-edit.js +190 -0
  89. package/dist/shared/lib/list-link.js +147 -0
  90. package/dist/shared/lib/nav-trail.js +107 -0
  91. package/dist/shared/lib/prefetch.js +259 -106
  92. package/dist/shared/lib/record-ref.js +72 -0
  93. package/dist/shared/lib/reload-holds.js +25 -0
  94. package/dist/shared/lib/safe-error.js +52 -24
  95. package/dist/shared/lib/skeleton-shapes.js +72 -0
  96. package/dist/shared/lib/slow-reason.js +63 -0
  97. package/package.json +1 -1
@@ -5,14 +5,15 @@ import { useMemo as y, useState as F } from "react";
5
5
  import { toast as p } from "sonner";
6
6
  import { useNivaroClient as v } from "../../context.js";
7
7
  import { get as j, post as k } from "../../lib/commands.js";
8
- import { userErrorMessage as A } from "../../lib/safe-error.js";
9
- import { cn as S } from "../../lib/utils.js";
8
+ import { errorToastOptions as A } from "../../lib/error-toast.js";
9
+ import { userErrorMessage as S } from "../../lib/safe-error.js";
10
+ import { cn as T } from "../../lib/utils.js";
10
11
  import { useAvailableBulkActions as B, guardMatches as P } from "../bulk/BulkActionButtons.js";
11
12
  import { Button as b } from "../ui/button.js";
12
- import { Dialog as T, DialogContent as D, DialogHeader as H, DialogTitle as M, DialogDescription as Q, DialogBody as _, DialogFooter as E } from "../ui/dialog.js";
13
- import { Textarea as J } from "../ui/textarea.js";
14
- import { invalidateRecordQueries as K } from "./RecordLiveSync.js";
15
- function ie(e, n, t) {
13
+ import { Dialog as D, DialogContent as H, DialogHeader as M, DialogTitle as Q, DialogDescription as _, DialogBody as E, DialogFooter as J } from "../ui/dialog.js";
14
+ import { Textarea as K } from "../ui/textarea.js";
15
+ import { invalidateRecordQueries as O } from "./RecordLiveSync.js";
16
+ function se(e, n, t) {
16
17
  const h = v(), m = !!n && n !== "new", { data: u } = B(m ? [e] : []), d = y(
17
18
  () => ((u == null ? void 0 : u[e]) ?? []).filter(
18
19
  (o) => o.header === !0 && (o.kind === "update_fields" || o.kind === "transition")
@@ -50,7 +51,7 @@ function W(e) {
50
51
  const n = e.summary && e.summary !== "Built-in" ? e.summary : e.label;
51
52
  return e.require_reason ? `${n}. You’ll be asked for a justification, saved as a note on the record.` : `${n}.`;
52
53
  }
53
- function ae({
54
+ function de({
54
55
  actions: e,
55
56
  onPick: n
56
57
  }) {
@@ -65,7 +66,7 @@ function ae({
65
66
  "data-record-header-action": t.key,
66
67
  "data-tip": W(t),
67
68
  onClick: () => n(t),
68
- className: S(
69
+ className: T(
69
70
  "shrink-0 gap-1.5 text-[12px]",
70
71
  t.variant === "danger" && "border-red-300 text-red-600 hover:bg-red-50 hover:text-red-700 dark:border-red-500/40 dark:text-red-400 dark:hover:bg-red-500/10"
71
72
  ),
@@ -78,7 +79,7 @@ function ae({
78
79
  )
79
80
  )) });
80
81
  }
81
- function se({
82
+ function ue({
82
83
  action: e,
83
84
  collection: n,
84
85
  itemId: t,
@@ -92,26 +93,26 @@ function se({
92
93
  },
93
94
  onSuccess: ({ a: r, result: c }) => {
94
95
  var g;
95
- (g = c.errors) != null && g.length ? p.error(c.errors[0].error) : !c.succeeded && c.skipped ? p.info(`${r.label}: nothing to change on this record`) : p.success(`${r.label} — done`), K(d, n, [t]), d.invalidateQueries({ queryKey: ["record-header-action-guard", n] }), l(""), m == null || m(), h();
96
+ (g = c.errors) != null && g.length ? p.error(c.errors[0].error) : !c.succeeded && c.skipped ? p.info(`${r.label}: nothing to change on this record`) : p.success(`${r.label} — done`), O(d, n, [t]), d.invalidateQueries({ queryKey: ["record-header-action-guard", n] }), l(""), m == null || m(), h();
96
97
  },
97
- onError: (r) => p.error(A(r, "The action did not run"))
98
+ onError: (r) => p.error(S(r, "The action did not run"), A(r))
98
99
  });
99
100
  return /* @__PURE__ */ i(
100
- T,
101
+ D,
101
102
  {
102
103
  open: !!e,
103
104
  onOpenChange: (r) => {
104
105
  r || (l(""), h());
105
106
  },
106
- children: /* @__PURE__ */ f(D, { className: "sm:max-w-md", "data-record-header-action-dialog": "", children: [
107
- /* @__PURE__ */ f(H, { children: [
108
- /* @__PURE__ */ i(M, { children: e == null ? void 0 : e.label }),
109
- /* @__PURE__ */ i(Q, { children: o ? "Say why — your justification is saved as a note on this record." : "Runs on this record. A justification, if you add one, is saved as a note." })
107
+ children: /* @__PURE__ */ f(H, { className: "sm:max-w-md", "data-record-header-action-dialog": "", children: [
108
+ /* @__PURE__ */ f(M, { children: [
109
+ /* @__PURE__ */ i(Q, { children: e == null ? void 0 : e.label }),
110
+ /* @__PURE__ */ i(_, { children: o ? "Say why — your justification is saved as a note on this record." : "Runs on this record. A justification, if you add one, is saved as a note." })
110
111
  ] }),
111
- /* @__PURE__ */ f(_, { className: "space-y-1.5", children: [
112
+ /* @__PURE__ */ f(E, { className: "space-y-1.5", children: [
112
113
  /* @__PURE__ */ i("label", { htmlFor: "record-header-action-reason", className: "text-[12.5px] font-medium", children: o ? "Justification (required)" : "Justification (optional)" }),
113
114
  /* @__PURE__ */ i(
114
- J,
115
+ K,
115
116
  {
116
117
  id: "record-header-action-reason",
117
118
  autoFocus: !0,
@@ -122,7 +123,7 @@ function se({
122
123
  }
123
124
  )
124
125
  ] }),
125
- /* @__PURE__ */ f(E, { children: [
126
+ /* @__PURE__ */ f(J, { children: [
126
127
  /* @__PURE__ */ i(b, { variant: "outline", onClick: h, disabled: a.isPending, children: "Cancel" }),
127
128
  /* @__PURE__ */ i(
128
129
  b,
@@ -139,7 +140,7 @@ function se({
139
140
  );
140
141
  }
141
142
  export {
142
- ae as RecordHeaderActionButtons,
143
- se as RecordHeaderActionDialog,
144
- ie as useRecordHeaderActions
143
+ de as RecordHeaderActionButtons,
144
+ ue as RecordHeaderActionDialog,
145
+ se as useRecordHeaderActions
145
146
  };