@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
@@ -2,12 +2,12 @@ import { jsx as i, jsxs as h } from "react/jsx-runtime";
2
2
  import { ExternalLink as Je } from "lucide-react";
3
3
  import { memo as Ke, useContext as Ve, useRef as j, useEffect as re, useState as He, useLayoutEffect as $e } from "react";
4
4
  import { useDrilldown as Ge, useParentDraft as We, RelationPathDataContext as Ye, useApiFetchConfig as ze, fieldDrilldownConfig as V } from "../../context.js";
5
- import { getFieldInterface as Ue } from "../../lib/field-interfaces.js";
6
- import { precisionOf as Qe } from "../../lib/format-value.js";
5
+ import { getFieldInterface as Qe } from "../../lib/field-interfaces.js";
6
+ import { precisionOf as Ue } from "../../lib/format-value.js";
7
7
  import { resolveOptionFilterTokens as oe } from "../../lib/option-filter-tokens.js";
8
- import { counterOf as Xe } from "../../lib/placement-behaviour.js";
9
- import { choiceLabel as Ze } from "../../lib/utils.js";
10
- import { Badge as Ce } from "../ui/badge.js";
8
+ import { counterOf as Ce } from "../../lib/placement-behaviour.js";
9
+ import { choiceLabel as Xe } from "../../lib/utils.js";
10
+ import { Badge as Ze } from "../ui/badge.js";
11
11
  import { Input as B } from "../ui/input.js";
12
12
  import { Label as Oe } from "../ui/label.js";
13
13
  import { NumberDraftInput as et } from "../ui/number-draft-input.js";
@@ -28,11 +28,11 @@ import { M2MSingleSelectCombobox as ft, M2MCombobox as _t } from "./M2MCombobox.
28
28
  import { MembershipSetField as bt } from "./MembershipSetField.js";
29
29
  import { PlanGridField as xt } from "./PlanGrid.js";
30
30
  import { smartParseDate as ht, CountdownChip as gt, DurationField as vt, FiscalPeriodField as wt, ChecklistField as Nt, RepeaterField as kt, RangeSliderField as Ft, DateRangeField as At, AddressField as Rt, maskFor as St, applyInputMask as se } from "./PolishFields.js";
31
- import { QuickCreateButton as jt } from "./QuickCreateButton.js";
32
- import { RelationCombobox as It } from "./RelationCombobox.js";
33
- import { RelationGroupedCombobox as Dt } from "./RelationGroupedCombobox.js";
34
- import { RichTextEditor as Mt } from "./RichTextEditor.js";
35
- function Pt({
31
+ import { useQuickCreateFollow as jt, QuickCreateButton as It } from "./QuickCreateButton.js";
32
+ import { RelationCombobox as Dt } from "./RelationCombobox.js";
33
+ import { RelationGroupedCombobox as Mt } from "./RelationGroupedCombobox.js";
34
+ import { RichTextEditor as Pt } from "./RichTextEditor.js";
35
+ function Lt({
36
36
  plugin: m,
37
37
  props: e
38
38
  }) {
@@ -86,7 +86,7 @@ function ye(m, e) {
86
86
  onBlur: (c) => d(c.target.value)
87
87
  };
88
88
  }
89
- function Lt({
89
+ function Bt({
90
90
  value: m,
91
91
  commit: e,
92
92
  ...n
@@ -102,7 +102,7 @@ function ue({
102
102
  const a = ye(m, e);
103
103
  return /* @__PURE__ */ i(me, { ...n, ...a });
104
104
  }
105
- const br = Ke(function({
105
+ const xr = Ke(function({
106
106
  field: e,
107
107
  value: n,
108
108
  onChange: a,
@@ -117,17 +117,19 @@ const br = Ke(function({
117
117
  prefillParentId: fe,
118
118
  pinnedOption: $
119
119
  }) {
120
- var z, U, Q, X, Z, C, O, ee, te;
121
- const I = Ge(), M = nt(), A = We(), K = Ve(Ye), D = A, b = (() => {
120
+ var z, Q, U, C, X, Z, O, ee, te;
121
+ const I = Ge(), M = nt(), k = We();
122
+ jt(k);
123
+ const K = Ve(Ye), D = k, b = (() => {
122
124
  try {
123
125
  return ze();
124
126
  } catch {
125
127
  return null;
126
128
  }
127
- })(), s = e.interface ?? "", G = j(Ue(s)).current;
129
+ })(), s = e.interface ?? "", G = j(Qe(s)).current;
128
130
  if (G)
129
131
  return /* @__PURE__ */ i(
130
- Pt,
132
+ Lt,
131
133
  {
132
134
  plugin: G,
133
135
  props: {
@@ -153,17 +155,17 @@ const br = Ke(function({
153
155
  }
154
156
  );
155
157
  }
156
- const W = !s || s.startsWith("relation-") || s === "select-multiple-m2m" || s.endsWith("-m2o") || s.endsWith("-m2m"), k = W ? p.find(
158
+ const W = !s || s.startsWith("relation-") || s === "select-multiple-m2m" || s.endsWith("-m2o") || s.endsWith("-m2m"), F = W ? p.find(
157
159
  (r) => r.many_collection === d && r.many_field === e.field && !r.junction_field
158
160
  ) : null;
159
- if (k != null && k.one_collection) {
161
+ if (F != null && F.one_collection) {
160
162
  if (s === "relation-grouped") {
161
163
  const y = f(e.options);
162
164
  if (y != null && y.group_field && (y != null && y.option_field))
163
165
  return /* @__PURE__ */ i(
164
- Dt,
166
+ Mt,
165
167
  {
166
- collection: k.one_collection,
168
+ collection: F.one_collection,
167
169
  value: n,
168
170
  onChange: a,
169
171
  groupField: y.group_field,
@@ -178,14 +180,14 @@ const br = Ke(function({
178
180
  }
179
181
  const r = I && n != null && n !== "" ? V(e) : null, o = f(e.options), l = oe(
180
182
  o != null && o.option_filter && typeof o.option_filter == "object" ? o.option_filter : void 0,
181
- A == null ? void 0 : A.draft,
183
+ k == null ? void 0 : k.draft,
182
184
  c
183
185
  ), t = l ? _ ? { _and: [l, _] } : l : _, x = /* @__PURE__ */ i(
184
- It,
186
+ Dt,
185
187
  {
186
188
  fieldKey: e.field,
187
189
  missPlacement: (M == null ? void 0 : M.layoutId) != null && M.pickerMisses !== !1 ? { layoutId: Number(M.layoutId), collection: d, field: e.field } : null,
188
- collection: k.one_collection,
190
+ collection: F.one_collection,
189
191
  value: n,
190
192
  onChange: a,
191
193
  disabled: e.readonly,
@@ -202,18 +204,19 @@ const br = Ke(function({
202
204
  // _and clause pruning) as option_filter, resolved from the same
203
205
  // parent draft — keeps facet option lists in sync with the main
204
206
  // option query's eligibility clauses.
205
- filter: y.filter && typeof y.filter == "object" ? oe(y.filter, A == null ? void 0 : A.draft, c) : void 0
207
+ filter: y.filter && typeof y.filter == "object" ? oe(y.filter, k == null ? void 0 : k.draft, c) : void 0
206
208
  })) : void 0
207
209
  }
208
210
  ), w = o != null && o.quick_create && Array.isArray(o.quick_create.fields) && !e.readonly ? o.quick_create : null;
209
211
  return !r && !w ? x : /* @__PURE__ */ h("div", { className: "flex items-center gap-1.5", children: [
210
212
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: x }),
211
213
  w && /* @__PURE__ */ i(
212
- jt,
214
+ It,
213
215
  {
214
- targetCollection: k.one_collection,
216
+ targetCollection: F.one_collection,
215
217
  config: w,
216
218
  value: n,
219
+ field: e.field,
217
220
  onCreated: (y) => a(y)
218
221
  }
219
222
  ),
@@ -223,7 +226,7 @@ const br = Ke(function({
223
226
  type: "button",
224
227
  title: "Open detail panel",
225
228
  onClick: () => I == null ? void 0 : I.open({
226
- collection: k.one_collection,
229
+ collection: F.one_collection,
227
230
  itemId: String(n),
228
231
  layoutId: r.layout_id,
229
232
  width: r.width
@@ -234,7 +237,7 @@ const br = Ke(function({
234
237
  )
235
238
  ] });
236
239
  }
237
- const E = W && !k ? (() => {
240
+ const E = W && !F ? (() => {
238
241
  const r = p.find(
239
242
  (l) => l.one_collection === d && (l.one_field === e.field || l.junction_field != null && l.many_collection === e.field)
240
243
  );
@@ -329,7 +332,7 @@ const br = Ke(function({
329
332
  }
330
333
  if (s === "progress") return /* @__PURE__ */ i(ne, { value: n, onChange: a, readOnly: !0 });
331
334
  if (s === "rating") {
332
- const l = (U = f(e.options)) == null ? void 0 : U.rating_max;
335
+ const l = (Q = f(e.options)) == null ? void 0 : Q.rating_max;
333
336
  return /* @__PURE__ */ i(ie, { value: n, onChange: a, max: l ?? 5, readOnly: !0 });
334
337
  }
335
338
  if (s === "duration") return /* @__PURE__ */ i(it, { value: n });
@@ -337,7 +340,7 @@ const br = Ke(function({
337
340
  if (s === "color")
338
341
  return /* @__PURE__ */ i(ae, { field: e, value: n, onChange: a, readOnly: !0 });
339
342
  if (s === "phone") return /* @__PURE__ */ i(le, { value: n, onChange: a, readOnly: !0 });
340
- const o = n == null ? /* @__PURE__ */ i("span", { className: "text-muted-foreground italic text-sm", children: "—" }) : typeof n == "boolean" ? /* @__PURE__ */ i(Ce, { variant: n ? "default" : "secondary", children: n ? "Yes" : "No" }) : /* @__PURE__ */ i("span", { className: "text-sm tabular-nums", children: L(n, e) });
343
+ const o = n == null ? /* @__PURE__ */ i("span", { className: "text-muted-foreground italic text-sm", children: "—" }) : typeof n == "boolean" ? /* @__PURE__ */ i(Ze, { variant: n ? "default" : "secondary", children: n ? "Yes" : "No" }) : /* @__PURE__ */ i("span", { className: "text-sm tabular-nums", children: L(n, e) });
341
344
  return /* @__PURE__ */ i("div", { className: "min-h-[36px] flex items-center", children: o });
342
345
  }
343
346
  const g = n == null ? "" : String(n);
@@ -373,7 +376,7 @@ const br = Ke(function({
373
376
  );
374
377
  }
375
378
  if (e.type === "date" || s === "date") {
376
- const r = ((Q = f(e.options)) == null ? void 0 : Q.countdown) === !0, o = ce(e);
379
+ const r = ((U = f(e.options)) == null ? void 0 : U.countdown) === !0, o = ce(e);
377
380
  return /* @__PURE__ */ h("div", { className: "flex items-center", children: [
378
381
  /* @__PURE__ */ i(
379
382
  B,
@@ -412,7 +415,7 @@ const br = Ke(function({
412
415
  ].includes(e.type)) {
413
416
  const r = ["integer", "bigInteger", "int", "bigint", "smallint", "tinyint"].includes(
414
417
  e.type
415
- ), o = r ? 0 : Qe(e.options, -1), l = r ? "1" : o >= 0 ? String(10 ** -o) : "any", t = yt(n, { type: e.type, label: e.label || "Value" }), x = t.ok ? null : t.message;
418
+ ), o = r ? 0 : Ue(e.options, -1), l = r ? "1" : o >= 0 ? String(10 ** -o) : "any", t = yt(n, { type: e.type, label: e.label || "Value" }), x = t.ok ? null : t.message;
416
419
  return /* @__PURE__ */ h("div", { children: [
417
420
  /* @__PURE__ */ i(
418
421
  et,
@@ -476,13 +479,13 @@ const br = Ke(function({
476
479
  );
477
480
  if (s === "input-rich-text-html" || s === "rich_text" || e.type === "rich_text" || s === "extension-editorjs")
478
481
  return /* @__PURE__ */ i(
479
- Mt,
482
+ Pt,
480
483
  {
481
484
  value: g,
482
485
  onChange: a,
483
486
  placeholder: e.placeholder ?? void 0,
484
487
  disabled: e.readonly,
485
- pastePlain: ((X = f(e.options)) == null ? void 0 : X.paste_plain) === !0
488
+ pastePlain: ((C = f(e.options)) == null ? void 0 : C.paste_plain) === !0
486
489
  }
487
490
  );
488
491
  if (s === "inline-grid" || s === "relation-list" || s === "list-o2m") {
@@ -548,12 +551,13 @@ const br = Ke(function({
548
551
  manyField: l,
549
552
  parentId: c,
550
553
  parentCollection: d,
554
+ field: e.field,
551
555
  config: S,
552
556
  readOnly: e.readonly
553
557
  }
554
558
  );
555
- const F = t.row_split;
556
- if (F != null && F.key_field && (F != null && F.category_field) && Array.isArray(F.value_fields)) {
559
+ const A = t.row_split;
560
+ if (A != null && A.key_field && (A != null && A.category_field) && Array.isArray(A.value_fields)) {
557
561
  const J = t.spread_remaining;
558
562
  return /* @__PURE__ */ i(
559
563
  xt,
@@ -561,7 +565,7 @@ const br = Ke(function({
561
565
  relatedCollection: o,
562
566
  manyField: l,
563
567
  parentId: c,
564
- config: F,
568
+ config: A,
565
569
  compareSeries: t.compare_series && typeof t.compare_series == "object" && typeof t.compare_series.endpoint == "string" ? t.compare_series : null,
566
570
  stats: Array.isArray(t.stats) ? t.stats : null,
567
571
  sumCap: t.sum_cap && typeof t.sum_cap == "object" ? t.sum_cap : null,
@@ -624,7 +628,7 @@ const br = Ke(function({
624
628
  }
625
629
  if (s === "color") return /* @__PURE__ */ i(ae, { field: e, value: n, onChange: a });
626
630
  if (s === "rating") {
627
- const r = (Z = f(e.options)) == null ? void 0 : Z.rating_max;
631
+ const r = (X = f(e.options)) == null ? void 0 : X.rating_max;
628
632
  return /* @__PURE__ */ i(ie, { value: n, onChange: a, max: r ?? 5 });
629
633
  }
630
634
  if (s === "progress") return /* @__PURE__ */ i(ne, { value: n, onChange: a });
@@ -651,7 +655,7 @@ const br = Ke(function({
651
655
  if (s === "repeater" || e.repeater_schema && e.type === "json")
652
656
  return /* @__PURE__ */ i(kt, { field: e, value: n, onChange: a });
653
657
  if (s === "range_slider") {
654
- const r = (C = f(e.options)) == null ? void 0 : C.range_end_field;
658
+ const r = (Z = f(e.options)) == null ? void 0 : Z.range_end_field;
655
659
  return /* @__PURE__ */ i(
656
660
  Ft,
657
661
  {
@@ -686,7 +690,7 @@ const br = Ke(function({
686
690
  }
687
691
  );
688
692
  if (s === "tags")
689
- return /* @__PURE__ */ i(Bt, { field: e, value: n, onChange: a });
693
+ return /* @__PURE__ */ i(Et, { field: e, value: n, onChange: a });
690
694
  if (s === "select-dropdown" || s === "radio-buttons") {
691
695
  const r = (() => {
692
696
  const o = f(e.options);
@@ -700,7 +704,7 @@ const br = Ke(function({
700
704
  onChange: (o) => a(o || null),
701
705
  options: [
702
706
  { value: "", label: "— Select —" },
703
- ...r.map((o) => ({ value: o.value, label: Ze(o.text) }))
707
+ ...r.map((o) => ({ value: o.value, label: Xe(o.text) }))
704
708
  ],
705
709
  ariaLabel: e.label ?? e.field,
706
710
  className: "h-9 rounded-md text-sm"
@@ -723,7 +727,7 @@ const br = Ke(function({
723
727
  placeholder: e.placeholder ?? T ?? void 0
724
728
  }
725
729
  ) : /* @__PURE__ */ i(
726
- Lt,
730
+ Bt,
727
731
  {
728
732
  maxLength: de(e),
729
733
  value: g,
@@ -731,7 +735,7 @@ const br = Ke(function({
731
735
  placeholder: e.placeholder ?? void 0
732
736
  }
733
737
  );
734
- if (P != null && P > 0 && !Xe(e._overrides)) {
738
+ if (P != null && P > 0 && !Ce(e._overrides)) {
735
739
  const r = g.length;
736
740
  return /* @__PURE__ */ h("div", { children: [
737
741
  Y,
@@ -750,7 +754,7 @@ const br = Ke(function({
750
754
  }
751
755
  return Y;
752
756
  });
753
- function Bt({
757
+ function Et({
754
758
  field: m,
755
759
  value: e,
756
760
  onChange: n
@@ -824,7 +828,7 @@ function Bt({
824
828
  ] });
825
829
  }
826
830
  export {
827
- br as FieldRenderer,
831
+ xr as FieldRenderer,
828
832
  oe as resolveOptionFilterTokens,
829
833
  ye as useKeptText
830
834
  };