@nivaro/react 0.3.57 → 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 (50) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +5 -1
  4. package/dist/shared/components/CollectionBrowserView.js +2633 -2590
  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/QueueQuickFilters.js +48 -48
  40. package/dist/shared/components/queue/QueueWorklist.js +357 -358
  41. package/dist/shared/components/queue/group-sums.js +27 -0
  42. package/dist/shared/components/widgets/ReviewListWidget.js +186 -168
  43. package/dist/shared/lib/back-closes.js +25 -0
  44. package/dist/shared/lib/form-usage-beacon.js +7 -7
  45. package/dist/shared/lib/list-page-memory.js +41 -0
  46. package/dist/shared/lib/live.js +44 -44
  47. package/dist/shared/lib/own-writes.js +76 -28
  48. package/dist/shared/lib/request-gate.js +110 -109
  49. package/dist/shared/lib/validation-rules.js +34 -19
  50. package/package.json +1 -1
@@ -1,13 +1,17 @@
1
- import { titleCase as y } from "../../lib/utils.js";
2
- function S(n, i) {
1
+ import { titleCase as p, formatDateTime as y } from "../../lib/utils.js";
2
+ function w(e) {
3
+ return !/[\p{L}\p{N}]/u.test(e ?? "");
4
+ }
5
+ const E = "Unnamed record";
6
+ function k(e, o) {
3
7
  const r = /* @__PURE__ */ new Map();
4
- for (const o of n) {
5
- const s = i(o).trim().toLowerCase(), a = r.get(s);
6
- a ? a.push(String(o.id)) : r.set(s, [String(o.id)]);
8
+ for (const i of e) {
9
+ const n = o(i).trim().toLowerCase(), a = r.get(n);
10
+ a ? a.push(String(i.id)) : r.set(n, [String(i.id)]);
7
11
  }
8
- return [...r.values()].filter((o) => o.length > 1).flat();
12
+ return [...r.values()].filter((i) => i.length > 1).flat();
9
13
  }
10
- const b = /* @__PURE__ */ new Set([
14
+ const S = /* @__PURE__ */ new Set([
11
15
  "id",
12
16
  "sort",
13
17
  "date_created",
@@ -17,37 +21,45 @@ const b = /* @__PURE__ */ new Set([
17
21
  "created_at",
18
22
  "updated_at",
19
23
  "created_by",
20
- "updated_by"
21
- ]), m = /(^|_)(system_id|code|number|no|key|name|type|status)$/i;
22
- function p(n) {
23
- if (n == null || typeof n == "object") return null;
24
- const i = String(n).trim();
25
- return i === "" ? null : i;
24
+ "updated_by",
25
+ "created",
26
+ "changed",
27
+ "modified"
28
+ ]), b = /(^|_)(system_id|code|number|no|key|name|type|status)$/i, _ = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/;
29
+ function m(e) {
30
+ if (e == null || typeof e == "object") return null;
31
+ const o = String(e).trim();
32
+ return o === "" ? null : _.test(o) ? y(o) : o;
26
33
  }
27
- function w(n, i = []) {
28
- const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set([...b, ...i]);
29
- for (const s of n) {
30
- if (s.length < 2) continue;
31
- const a = [...new Set(s.flatMap((t) => Object.keys(t)))].filter(
32
- (t) => !o.has(t) && !t.startsWith("_")
34
+ function L(e, o = []) {
35
+ const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set([...S, ...o]);
36
+ for (const n of e) {
37
+ if (n.length < 2) continue;
38
+ const a = [...new Set(n.flatMap((t) => Object.keys(t)))].filter(
39
+ (t) => !i.has(t) && !t.startsWith("_")
33
40
  );
34
- let e = null;
41
+ let s = null;
35
42
  for (const t of a) {
36
- const c = s.map((d) => p(d[t]));
37
- if (c.some((d) => d === null)) continue;
38
- const u = new Set(c).size;
39
- if (u < 2) continue;
40
- const f = m.test(t), l = s.some((d) => typeof d[t] == "string");
41
- (!e || u > e.distinct || u === e.distinct && (f !== e.preferred ? f : l && !e.text)) && (e = { key: t, distinct: u, preferred: f, text: l });
42
- }
43
- for (const t of s) {
44
- const c = String(t.id);
45
- r.set(c, e ? `${y(e.key)}: ${p(t[e.key])}` : `#${c}`);
43
+ const u = n.map((c) => m(c[t]));
44
+ if (u.some((c) => c === null)) continue;
45
+ const d = new Set(u).size;
46
+ if (d < 2) continue;
47
+ const f = b.test(t), l = n.some((c) => typeof c[t] == "string");
48
+ (!s || d > s.distinct || d === s.distinct && (f !== s.preferred ? f : l && !s.text)) && (s = { key: t, distinct: d, preferred: f, text: l });
46
49
  }
50
+ n.forEach((t, u) => {
51
+ const d = String(t.id);
52
+ r.set(
53
+ d,
54
+ s ? `${p(s.key)}: ${m(t[s.key])}` : `Same name · ${u + 1} of ${n.length}`
55
+ );
56
+ });
47
57
  }
48
58
  return r;
49
59
  }
50
60
  export {
51
- S as collidingIds,
52
- w as disambiguators
61
+ E as NAMELESS_LABEL,
62
+ k as collidingIds,
63
+ L as disambiguators,
64
+ w as isNamelessLabel
53
65
  };
@@ -0,0 +1,45 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { describeError as d } from "../../lib/error-message.js";
3
+ import { cn as r } from "../../lib/utils.js";
4
+ function i(e) {
5
+ if (e == null)
6
+ return {
7
+ kind: "no-access",
8
+ text: "Not available to you",
9
+ tip: "Your access does not include this record."
10
+ };
11
+ const t = d(e).kind;
12
+ return t === "forbidden" || t === "signed-out" ? {
13
+ kind: "no-access",
14
+ text: "Not available to you",
15
+ tip: "Your access does not include this record."
16
+ } : t === "not-found" ? {
17
+ kind: "not-found",
18
+ text: "Record not found",
19
+ tip: "It may have been deleted, or it is outside what you can see."
20
+ } : {
21
+ kind: "failed",
22
+ text: "Couldn’t load",
23
+ tip: "The linked record didn’t load. Reload the page to try again."
24
+ };
25
+ }
26
+ function u(e, t) {
27
+ return i(t).kind !== "failed" ? !1 : e < 2;
28
+ }
29
+ function c({ error: e, className: t }) {
30
+ const n = i(e);
31
+ return /* @__PURE__ */ o(
32
+ "span",
33
+ {
34
+ className: r("italic text-muted-foreground", t),
35
+ "data-related-unavailable": n.kind,
36
+ "data-tip": n.tip,
37
+ children: n.text
38
+ }
39
+ );
40
+ }
41
+ export {
42
+ c as RelatedMissingLabel,
43
+ i as relatedMissing,
44
+ u as retryRelatedRead
45
+ };
@@ -1,8 +1,8 @@
1
- function r(e) {
1
+ function i(e) {
2
2
  return e.childFailed === !0 || e.reasonWaiting === !0;
3
3
  }
4
4
  function a(e, s) {
5
- const { isNew: t } = s, i = s.noun.toLowerCase();
5
+ const { isNew: t } = s, r = s.noun.toLowerCase();
6
6
  if (e.childFailed) {
7
7
  const n = e.childErrors ?? [];
8
8
  return n.length === 0 && e.linkProblems.length > 0 ? null : {
@@ -21,7 +21,7 @@ function a(e, s) {
21
21
  const n = e.hidden.reason ? ` (${e.hidden.reason})` : "";
22
22
  return {
23
23
  kind: "warning",
24
- text: t ? `The new ${i} was created, but it’s outside what you can see${n}.` : `Saved, but this ${i} is now outside what you can see${n}.`,
24
+ text: t ? `The new ${r} was created, but it’s outside what you can see${n}.` : `Saved, but this ${r} is now outside what you can see${n}.`,
25
25
  duration: 15e3
26
26
  };
27
27
  }
@@ -29,7 +29,7 @@ function a(e, s) {
29
29
  const n = e.lineConflicts;
30
30
  return {
31
31
  kind: "warning",
32
- text: `Saved, except ${n} ${n === 1 ? "line" : "lines"} someone else changed — pick which value wins`,
32
+ text: `Saved, except ${n} ${n === 1 ? "row" : "rows"} someone else changed — pick which value wins`,
33
33
  duration: 1e4
34
34
  };
35
35
  }
@@ -44,5 +44,5 @@ function a(e, s) {
44
44
  }
45
45
  export {
46
46
  a as saveClosingMessage,
47
- r as saveLeftWorkStaged
47
+ i as saveLeftWorkStaged
48
48
  };