@nivaro/react 0.3.111 → 0.3.113

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 (77) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +207 -3
  4. package/dist/index.js +745 -728
  5. package/dist/shared/components/CollectionBrowserView.js +3133 -2954
  6. package/dist/shared/components/CollectionImportBanner.js +135 -0
  7. package/dist/shared/components/ItemEditForm.js +2235 -2218
  8. package/dist/shared/components/JobsTray.js +54 -47
  9. package/dist/shared/components/ViewAsPersonButton.js +109 -0
  10. package/dist/shared/components/bulk/BulkFieldUpdate.js +228 -150
  11. package/dist/shared/components/bulk/BulkFieldUpdateButton.js +35 -41
  12. package/dist/shared/components/bulk/BulkLinksValue.js +91 -0
  13. package/dist/shared/components/bulk/bulk-field-options.js +20 -19
  14. package/dist/shared/components/bulk/bulk-update-preview.js +39 -0
  15. package/dist/shared/components/cbv/ColumnHeaderMenu.js +130 -0
  16. package/dist/shared/components/cbv/column-totals.js +163 -0
  17. package/dist/shared/components/collections-directory/CollectionHoverCard.js +108 -81
  18. package/dist/shared/components/collections-directory/CollectionRow.js +164 -148
  19. package/dist/shared/components/collections-directory/CollectionsDirectory.js +167 -166
  20. package/dist/shared/components/collections-directory/directory-data.js +70 -58
  21. package/dist/shared/components/imports/CollectionImportPanel.js +120 -118
  22. package/dist/shared/components/imports/DefinitionsPanel.js +24 -24
  23. package/dist/shared/components/imports/ImportDuplicatesNotice.js +65 -0
  24. package/dist/shared/components/item-edit/CatalogPickerField.js +631 -639
  25. package/dist/shared/components/item-edit/DuplicateNotice.js +168 -0
  26. package/dist/shared/components/item-edit/FieldRow.js +248 -246
  27. package/dist/shared/components/item-edit/InlineGridField.js +34 -33
  28. package/dist/shared/components/item-edit/InlineTableField.js +3002 -2825
  29. package/dist/shared/components/item-edit/MembershipSetField.js +165 -169
  30. package/dist/shared/components/item-edit/NestedRelationEditor.js +184 -189
  31. package/dist/shared/components/item-edit/PlanGrid.js +2 -1
  32. package/dist/shared/components/item-edit/QuickPickerDialog.js +35 -34
  33. package/dist/shared/components/item-edit/RecordLiveSync.js +32 -30
  34. package/dist/shared/components/item-edit/RelationCombobox.js +101 -100
  35. package/dist/shared/components/item-edit/RowHistorySheet.js +28 -27
  36. package/dist/shared/components/item-edit/SummaryPanel.js +133 -135
  37. package/dist/shared/components/item-edit/UserChip.js +262 -239
  38. package/dist/shared/components/item-edit/ViewAsRole.js +129 -52
  39. package/dist/shared/components/item-edit/grid-search.js +375 -0
  40. package/dist/shared/components/item-edit/render-stability.js +61 -54
  41. package/dist/shared/components/notifications/NotificationRulesEditor.js +25 -20
  42. package/dist/shared/components/ops-report/DigestSections.js +163 -144
  43. package/dist/shared/components/ops-report/drill.js +97 -97
  44. package/dist/shared/components/panels/AddendumLinesDiff.js +52 -51
  45. package/dist/shared/components/panels/AddendumPanel.js +92 -91
  46. package/dist/shared/components/panels/AsyncUserPicker.js +108 -0
  47. package/dist/shared/components/panels/CommentPanel.js +265 -252
  48. package/dist/shared/components/panels/OwnersSlot.js +47 -35
  49. package/dist/shared/components/panels/PipelineInsight.js +186 -0
  50. package/dist/shared/components/panels/PipelinePanel.js +1440 -1397
  51. package/dist/shared/components/panels/RecordIntegrityBanner.js +39 -38
  52. package/dist/shared/components/panels/RevisionsPanel.js +261 -260
  53. package/dist/shared/components/panels/StandInReason.js +69 -0
  54. package/dist/shared/components/pipeline/FieldPicker.js +41 -40
  55. package/dist/shared/components/pipeline/OwnerMatrix.js +829 -700
  56. package/dist/shared/components/pipeline/OwnerRecordTrial.js +362 -0
  57. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -467
  58. package/dist/shared/components/pipeline/PipelineStateOwners.js +65 -64
  59. package/dist/shared/components/pipeline/owner-matrix-draft.js +178 -0
  60. package/dist/shared/components/profile/MyDefaultsCard.js +36 -35
  61. package/dist/shared/components/profile/PersonHeader.js +29 -29
  62. package/dist/shared/components/profile/PersonProfile.js +30 -28
  63. package/dist/shared/components/profile/SlowScreensCard.js +286 -0
  64. package/dist/shared/components/queue/QueueWorklist.js +1090 -1071
  65. package/dist/shared/components/quick-filters/useQuickFilterEditing.js +45 -44
  66. package/dist/shared/components/support/TicketDetailSheet.js +25 -16
  67. package/dist/shared/components/support/TicketSlowScreens.js +32 -0
  68. package/dist/shared/lib/activity-sentence.js +224 -178
  69. package/dist/shared/lib/collection-import-banner.js +27 -0
  70. package/dist/shared/lib/crash-report.js +112 -0
  71. package/dist/shared/lib/export-runs.js +99 -0
  72. package/dist/shared/lib/jobs-tray.js +89 -67
  73. package/dist/shared/lib/list-link.js +76 -69
  74. package/dist/shared/lib/nav-trail.js +180 -76
  75. package/dist/shared/lib/query-keys.js +26 -0
  76. package/dist/shared/lib/view-as.js +16 -11
  77. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
- import { useRef as S, useLayoutEffect as v, useMemo as a } from "react";
2
- function C(e, t) {
1
+ import { useRef as E, useLayoutEffect as C, useMemo as f } from "react";
2
+ import { duplicateHintsEqual as v } from "./DuplicateNotice.js";
3
+ function b(e, t) {
3
4
  if (Object.is(e, t)) return !0;
4
5
  if (e == null || t == null || typeof e != "object" || typeof t != "object") return !1;
5
6
  try {
@@ -8,7 +9,7 @@ function C(e, t) {
8
9
  return !1;
9
10
  }
10
11
  }
11
- function E(e, t) {
12
+ function L(e, t) {
12
13
  if (Object.is(e, t)) return !0;
13
14
  if (!e || !t) return !1;
14
15
  const n = Object.keys(e);
@@ -16,15 +17,15 @@ function E(e, t) {
16
17
  for (const o of n) if (!Object.hasOwn(t, o) || !Object.is(e[o], t[o])) return !1;
17
18
  return !0;
18
19
  }
19
- function b(e, t, n) {
20
+ function q(e, t, n) {
20
21
  const o = e.current;
21
22
  return o !== void 0 && n(o, t) ? o : (e.current = t, t);
22
23
  }
23
- function j(e, t) {
24
- const n = S(void 0);
25
- return b(n, e, t);
24
+ function l(e, t) {
25
+ const n = E(void 0);
26
+ return q(n, e, t);
26
27
  }
27
- function L(e, t) {
28
+ function A(e, t) {
28
29
  const n = Object.keys(e);
29
30
  if (n.length !== Object.keys(t).length) return !1;
30
31
  for (const o of n) {
@@ -33,103 +34,109 @@ function L(e, t) {
33
34
  }
34
35
  return !0;
35
36
  }
36
- function T(e) {
37
- const t = S(e);
38
- v(() => {
37
+ const P = {};
38
+ function J(e) {
39
+ const t = E(e);
40
+ C(() => {
39
41
  t.current = e;
40
42
  });
41
- const n = a(
43
+ const n = f(
42
44
  () => ({
43
45
  dismissRemoteChange: (c) => t.current.dismissRemoteChange(c),
44
46
  takeRemoteChange: (c) => {
45
- var u, f;
46
- return (f = (u = t.current).takeRemoteChange) == null ? void 0 : f.call(u, c);
47
+ var u, i;
48
+ return (i = (u = t.current).takeRemoteChange) == null ? void 0 : i.call(u, c);
47
49
  },
48
50
  onLockHover: () => {
49
51
  var c, u;
50
52
  return (u = (c = t.current).onLockHover) == null ? void 0 : u.call(c);
51
53
  },
52
54
  openRelated: (c, u) => {
53
- var f, i;
54
- return (i = (f = t.current).openRelated) == null ? void 0 : i.call(f, c, u);
55
+ var i, a;
56
+ return (a = (i = t.current).openRelated) == null ? void 0 : a.call(i, c, u);
55
57
  }
56
58
  }),
57
59
  []
58
- ), o = j(e.lockReasons, E), s = j(e.applyToLines, L), r = a(() => {
60
+ ), o = l(e.lockReasons, L), s = l(e.applyToLines, A), r = f(() => {
59
61
  const c = {};
60
- for (const [u, f] of Object.entries(s))
62
+ for (const [u, i] of Object.entries(s))
61
63
  c[u] = {
62
- ...f,
63
- onApply: (i) => {
64
- var d;
65
- return (d = t.current.applyToLines[u]) == null ? void 0 : d.onApply(i);
64
+ ...i,
65
+ onApply: (a) => {
66
+ var S;
67
+ return (S = t.current.applyToLines[u]) == null ? void 0 : S.onApply(a);
66
68
  }
67
69
  };
68
70
  return c;
69
- }, [s]), l = !!e.takeRemoteChange, p = !!e.onLockHover, y = !!e.openRelated, { remoteChanges: h, layoutId: g, pickerMisses: k, fromAutofill: O, glossaryHelp: R, placementText: m } = e;
70
- return a(
71
+ }, [s]), p = !!e.takeRemoteChange, y = !!e.onLockHover, h = !!e.openRelated, { remoteChanges: g, layoutId: k, pickerMisses: O, fromAutofill: d, glossaryHelp: m, placementText: R } = e, j = l(
72
+ e.duplicates ?? P,
73
+ v
74
+ );
75
+ return f(
71
76
  () => ({
72
- remoteChanges: h,
77
+ remoteChanges: g,
73
78
  dismissRemoteChange: n.dismissRemoteChange,
74
- takeRemoteChange: l ? n.takeRemoteChange : void 0,
79
+ takeRemoteChange: p ? n.takeRemoteChange : void 0,
75
80
  lockReasons: o,
76
- onLockHover: p ? n.onLockHover : void 0,
81
+ onLockHover: y ? n.onLockHover : void 0,
77
82
  applyToLines: r,
78
- openRelated: y ? n.openRelated : void 0,
79
- layoutId: g,
80
- pickerMisses: k,
81
- fromAutofill: O,
82
- glossaryHelp: R,
83
- placementText: m
83
+ openRelated: h ? n.openRelated : void 0,
84
+ layoutId: k,
85
+ pickerMisses: O,
86
+ fromAutofill: d,
87
+ glossaryHelp: m,
88
+ placementText: R,
89
+ duplicates: j
84
90
  }),
85
91
  [
86
- h,
92
+ g,
87
93
  n,
88
- l,
89
- o,
90
94
  p,
91
- r,
95
+ o,
92
96
  y,
93
- g,
97
+ r,
98
+ h,
94
99
  k,
95
100
  O,
101
+ d,
102
+ m,
96
103
  R,
97
- m
104
+ j
98
105
  ]
99
106
  );
100
107
  }
101
- function q(e, t) {
108
+ function H(e, t) {
102
109
  if (e.size !== t.size) return !1;
103
110
  for (const n of e) if (!t.has(n)) return !1;
104
111
  return !0;
105
112
  }
106
- function A(e, t) {
113
+ function T(e, t) {
107
114
  if (e.length !== t.length) return !1;
108
115
  for (let n = 0; n < e.length; n++) if (!Object.is(e[n], t[n])) return !1;
109
116
  return !0;
110
117
  }
111
- const P = /* @__PURE__ */ new Set(["summaryFields", "swapConfig", "alternateWidths"]), w = /* @__PURE__ */ new Set(["onToggle", "onSwapToggle"]);
112
- function N(e, t) {
118
+ const w = /* @__PURE__ */ new Set(["summaryFields", "swapConfig", "alternateWidths"]), N = /* @__PURE__ */ new Set(["onToggle", "onSwapToggle"]);
119
+ function U(e, t) {
113
120
  const n = Object.keys(e);
114
121
  if (n.length !== Object.keys(t).length) return !1;
115
122
  for (const o of n) {
116
123
  if (!Object.hasOwn(t, o)) return !1;
117
124
  const s = e[o], r = t[o];
118
125
  if (!Object.is(s, r)) {
119
- if (w.has(o)) {
126
+ if (N.has(o)) {
120
127
  if (typeof s == "function" && typeof r == "function") continue;
121
128
  return !1;
122
129
  }
123
- if (P.has(o)) {
124
- if (C(s, r)) continue;
130
+ if (w.has(o)) {
131
+ if (b(s, r)) continue;
125
132
  return !1;
126
133
  }
127
134
  if (s instanceof Set && r instanceof Set) {
128
- if (q(s, r)) continue;
135
+ if (H(s, r)) continue;
129
136
  return !1;
130
137
  }
131
138
  if (Array.isArray(s) && Array.isArray(r)) {
132
- if (A(s, r)) continue;
139
+ if (T(s, r)) continue;
133
140
  return !1;
134
141
  }
135
142
  return !1;
@@ -138,10 +145,10 @@ function N(e, t) {
138
145
  return !0;
139
146
  }
140
147
  export {
141
- N as groupSectionPropsEqual,
142
- C as jsonEqual,
143
- b as keepIfEqual,
144
- E as shallowRecordEqual,
145
- j as useKeepIfEqual,
146
- T as useStableFieldAffordances
148
+ U as groupSectionPropsEqual,
149
+ b as jsonEqual,
150
+ q as keepIfEqual,
151
+ L as shallowRecordEqual,
152
+ l as useKeepIfEqual,
153
+ J as useStableFieldAffordances
147
154
  };
@@ -59,6 +59,11 @@ const Q = [
59
59
  label: "Chaos drills",
60
60
  help: "Chaos Monkey drills starting and ending, and pushes about drills you started or take part in (with a Stop button). Only administrators and chaos operators get these."
61
61
  },
62
+ {
63
+ key: "crashes",
64
+ label: "App crashes",
65
+ help: "A crash that is new in the current release reached several times or more than one person within 15 minutes. Only administrators get these."
66
+ },
62
67
  {
63
68
  key: "system",
64
69
  label: "System & digests",
@@ -69,13 +74,13 @@ const Q = [
69
74
  label: "Everything else",
70
75
  help: "Any notification that does not fit a category above — direct messages from other users, access requests, task assignments."
71
76
  }
72
- ], ae = /* @__PURE__ */ new Set(["chaos", "audit"]);
77
+ ], ae = /* @__PURE__ */ new Set(["chaos", "audit", "crashes"]);
73
78
  function le(a, l) {
74
79
  return a === "role" || l ? Q : Q.filter((i) => !ae.has(i.key));
75
80
  }
76
81
  const oe = ["inapp", "push", "teams", "email", "quiet_override"], W = ["push_after_min", "email_after_min"], q = (a) => !!a && (a.quiet_start !== void 0 || a.quiet_end !== void 0);
77
82
  function se(a, l) {
78
- var y, h, p, w, E, _, R, T;
83
+ var b, h, p, w, E, _, R, T;
79
84
  const i = {}, m = q(a) ? a : q(l) ? l : null;
80
85
  (m == null ? void 0 : m.quiet_start) !== void 0 && (i.quiet_start = m.quiet_start), (m == null ? void 0 : m.quiet_end) !== void 0 && (i.quiet_end = m.quiet_end);
81
86
  const O = {};
@@ -84,9 +89,9 @@ function se(a, l) {
84
89
  ...Object.keys((a == null ? void 0 : a.matrix) ?? {})
85
90
  ])) {
86
91
  const v = {};
87
- for (const b of oe) {
88
- const x = ((h = (y = a == null ? void 0 : a.matrix) == null ? void 0 : y[f]) == null ? void 0 : h[b]) ?? ((w = (p = l == null ? void 0 : l.matrix) == null ? void 0 : p[f]) == null ? void 0 : w[b]);
89
- x !== void 0 && (v[b] = x);
92
+ for (const y of oe) {
93
+ const x = ((h = (b = a == null ? void 0 : a.matrix) == null ? void 0 : b[f]) == null ? void 0 : h[y]) ?? ((w = (p = l == null ? void 0 : l.matrix) == null ? void 0 : p[f]) == null ? void 0 : w[y]);
94
+ x !== void 0 && (v[y] = x);
90
95
  }
91
96
  O[f] = v;
92
97
  }
@@ -97,9 +102,9 @@ function se(a, l) {
97
102
  ...Object.keys((a == null ? void 0 : a.escalation) ?? {})
98
103
  ])) {
99
104
  const v = {};
100
- for (const b of W) {
101
- const x = ((_ = (E = a == null ? void 0 : a.escalation) == null ? void 0 : E[f]) == null ? void 0 : _[b]) ?? ((T = (R = l == null ? void 0 : l.escalation) == null ? void 0 : R[f]) == null ? void 0 : T[b]);
102
- x !== void 0 && (v[b] = x);
105
+ for (const y of W) {
106
+ const x = ((_ = (E = a == null ? void 0 : a.escalation) == null ? void 0 : E[f]) == null ? void 0 : _[y]) ?? ((T = (R = l == null ? void 0 : l.escalation) == null ? void 0 : R[f]) == null ? void 0 : T[y]);
107
+ x !== void 0 && (v[y] = x);
103
108
  }
104
109
  A[f] = v;
105
110
  }
@@ -143,13 +148,13 @@ function ue({
143
148
  legacyEmail: m = "instant",
144
149
  onCommit: O,
145
150
  onLegacyEmail: A,
146
- saving: y,
151
+ saving: b,
147
152
  subject: h,
148
153
  teams: p,
149
154
  extraColumn: w,
150
155
  isAdmin: E = !0
151
156
  }) {
152
- const _ = se(a, l), R = le(h, E), [T, f] = Y(null), [v, b] = Y(null), x = T ?? _.quiet_start ?? "", P = v ?? _.quiet_end ?? "", U = q(a) ? "person" : q(l) ? "role" : "system", k = h === "person" && !!l, C = (e) => {
157
+ const _ = se(a, l), R = le(h, E), [T, f] = Y(null), [v, y] = Y(null), x = T ?? _.quiet_start ?? "", P = v ?? _.quiet_end ?? "", U = q(a) ? "person" : q(l) ? "role" : "system", k = h === "person" && !!l, C = (e) => {
153
158
  const o = {
154
159
  ...a,
155
160
  matrix: { ...a.matrix ?? {} },
@@ -216,7 +221,7 @@ function ue({
216
221
  "button",
217
222
  {
218
223
  type: "button",
219
- disabled: y,
224
+ disabled: b,
220
225
  onClick: () => O(
221
226
  a.teams_muted_until ? { teams_muted_until: a.teams_muted_until } : {}
222
227
  ),
@@ -248,7 +253,7 @@ function ue({
248
253
  {
249
254
  type: "time",
250
255
  value: P,
251
- onChange: (e) => b(e.target.value),
256
+ onChange: (e) => y(e.target.value),
252
257
  onBlur: () => {
253
258
  v != null && $(x || "", P || "");
254
259
  },
@@ -262,7 +267,7 @@ function ue({
262
267
  {
263
268
  type: "button",
264
269
  onClick: () => {
265
- f(""), b(""), q(l) ? $("", "") : $(void 0, void 0);
270
+ f(""), y(""), q(l) ? $("", "") : $(void 0, void 0);
266
271
  },
267
272
  className: "text-[11.5px] text-slate-400 underline decoration-dotted underline-offset-2",
268
273
  children: "Clear"
@@ -273,7 +278,7 @@ function ue({
273
278
  {
274
279
  type: "button",
275
280
  onClick: () => {
276
- f(null), b(null), $(void 0, void 0);
281
+ f(null), y(null), $(void 0, void 0);
277
282
  },
278
283
  className: "text-[11.5px] text-slate-400 underline decoration-dotted underline-offset-2",
279
284
  children: [
@@ -336,7 +341,7 @@ function ue({
336
341
  type: "checkbox",
337
342
  checked: o[c] !== !1,
338
343
  onChange: () => L(e.key, c, o[c] === !1),
339
- disabled: y,
344
+ disabled: b,
340
345
  "aria-label": `${c === "inapp" ? "In-app" : "Push"} for ${e.label}`,
341
346
  "data-notify-channel": `${e.key}:${c}`,
342
347
  className: "h-3.5 w-3.5 align-middle"
@@ -369,7 +374,7 @@ function ue({
369
374
  type: "checkbox",
370
375
  checked: o.teams === !0,
371
376
  onChange: () => L(e.key, "teams", o.teams !== !0),
372
- disabled: y || h === "person" && !p.linked,
377
+ disabled: b || h === "person" && !p.linked,
373
378
  "aria-label": `Teams for ${e.label}`,
374
379
  "data-tip": h === "person" && !p.linked ? "Connect Teams first" : void 0,
375
380
  "data-notify-channel": `${e.key}:teams`,
@@ -390,7 +395,7 @@ function ue({
390
395
  "quiet_override",
391
396
  o.quiet_override === !0 ? X(e.key).quiet_override === !0 ? !1 : void 0 : !0
392
397
  ),
393
- disabled: y,
398
+ disabled: b,
394
399
  "aria-label": `Let ${e.label} through quiet hours`,
395
400
  "data-quiet-override": e.key,
396
401
  className: "h-3.5 w-3.5 align-middle"
@@ -403,7 +408,7 @@ function ue({
403
408
  {
404
409
  type: "button",
405
410
  onClick: () => G(e.key),
406
- disabled: y,
411
+ disabled: b,
407
412
  "data-tip": "Back to the role default for this category",
408
413
  "aria-label": `Use the role default for ${e.label}`,
409
414
  className: M(
@@ -422,7 +427,7 @@ function ue({
422
427
  "button",
423
428
  {
424
429
  type: "button",
425
- disabled: y,
430
+ disabled: b,
426
431
  onClick: () => {
427
432
  C((o) => {
428
433
  const s = o.matrix ?? {};
@@ -497,7 +502,7 @@ function ue({
497
502
  {
498
503
  type: "button",
499
504
  onClick: () => J(e.key),
500
- disabled: y,
505
+ disabled: b,
501
506
  "data-tip": "Back to the role default for this category",
502
507
  "aria-label": `Use the role default escalation for ${e.label}`,
503
508
  className: M(