@nivaro/react 0.3.57 → 0.3.59

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 (69) hide show
  1. package/dist/components/fields/RelationField.js +110 -80
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useRelationOptions.js +1 -0
  4. package/dist/hooks/useSessionRecorder.js +1 -1
  5. package/dist/index.d.ts +37 -2
  6. package/dist/index.js +523 -520
  7. package/dist/shared/components/CollectionBrowserView.js +2693 -2619
  8. package/dist/shared/components/DataTable.js +538 -495
  9. package/dist/shared/components/ItemEditForm.js +4559 -4386
  10. package/dist/shared/components/PageRenderer.js +537 -508
  11. package/dist/shared/components/ProfileView.js +716 -715
  12. package/dist/shared/components/QueryTable.js +74 -74
  13. package/dist/shared/components/RecordReadView.js +367 -364
  14. package/dist/shared/components/ReportView.js +64 -39
  15. package/dist/shared/components/WidgetSlot.js +543 -520
  16. package/dist/shared/components/alerts/AlertManagerView.js +324 -317
  17. package/dist/shared/components/alerts/types.js +37 -14
  18. package/dist/shared/components/cbv/row-focus.js +19 -0
  19. package/dist/shared/components/help-videos/HelpVideoPlayer.js +152 -147
  20. package/dist/shared/components/integrations/console/SignalCard.js +59 -59
  21. package/dist/shared/components/integrations/console/tone.js +52 -30
  22. package/dist/shared/components/item-edit/CatalogPickerField.js +525 -505
  23. package/dist/shared/components/item-edit/FieldRenderer.js +22 -20
  24. package/dist/shared/components/item-edit/FieldRow.js +175 -173
  25. package/dist/shared/components/item-edit/GridBulkEditDialog.js +55 -54
  26. package/dist/shared/components/item-edit/InlineTableField.js +2487 -2442
  27. package/dist/shared/components/item-edit/M2MCombobox.js +321 -295
  28. package/dist/shared/components/item-edit/MidairCollisionDialog.js +1 -1
  29. package/dist/shared/components/item-edit/PlanGrid.js +973 -894
  30. package/dist/shared/components/item-edit/QuickCreateButton.js +335 -106
  31. package/dist/shared/components/item-edit/RecordLiveSync.js +77 -75
  32. package/dist/shared/components/item-edit/RelationCombobox.js +452 -335
  33. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +262 -141
  34. package/dist/shared/components/item-edit/SummaryPanel.js +385 -358
  35. package/dist/shared/components/item-edit/duplicate-rehearsal.js +47 -0
  36. package/dist/shared/components/item-edit/line-midair.js +82 -75
  37. package/dist/shared/components/item-edit/option-disambiguate.js +44 -32
  38. package/dist/shared/components/item-edit/related-missing.js +45 -0
  39. package/dist/shared/components/item-edit/save-outcome.js +9 -7
  40. package/dist/shared/components/notifications/NotificationRulesEditor.js +130 -123
  41. package/dist/shared/components/panels/AccessDeniedPanel.js +52 -48
  42. package/dist/shared/components/panels/ItemLockBanner.js +213 -211
  43. package/dist/shared/components/panels/PipelinePanel.js +1140 -1053
  44. package/dist/shared/components/panels/RecordIntegrityBanner.js +114 -86
  45. package/dist/shared/components/panels/RevisionsPanel.js +316 -299
  46. package/dist/shared/components/panels/TaskPanel.js +265 -249
  47. package/dist/shared/components/panels/landing-state.js +27 -0
  48. package/dist/shared/components/pipeline/PipelineEditorView.js +110 -92
  49. package/dist/shared/components/profile/AiMemoryCard.js +12 -10
  50. package/dist/shared/components/queue/OwnerAvatars.js +80 -41
  51. package/dist/shared/components/queue/QueueQuickFilters.js +52 -52
  52. package/dist/shared/components/queue/QueueWorklist.js +1050 -1026
  53. package/dist/shared/components/queue/group-sums.js +27 -0
  54. package/dist/shared/components/queue/live-state-aspect.js +9 -5
  55. package/dist/shared/components/widgets/ReviewListWidget.js +175 -154
  56. package/dist/shared/lib/back-closes.js +25 -0
  57. package/dist/shared/lib/display-prefs.js +60 -52
  58. package/dist/shared/lib/draft-store.js +71 -48
  59. package/dist/shared/lib/expression.js +53 -53
  60. package/dist/shared/lib/form-usage-beacon.js +7 -7
  61. package/dist/shared/lib/list-page-memory.js +63 -0
  62. package/dist/shared/lib/live.js +44 -44
  63. package/dist/shared/lib/money-input.js +45 -0
  64. package/dist/shared/lib/own-writes.js +76 -28
  65. package/dist/shared/lib/request-gate.js +110 -109
  66. package/dist/shared/lib/sanitize-html.js +10 -6
  67. package/dist/shared/lib/staged-row-labels.js +18 -0
  68. package/dist/shared/lib/validation-rules.js +34 -19
  69. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
- import { RotateCcw as U } from "lucide-react";
3
- import { useState as B } from "react";
2
+ import { RotateCcw as F } from "lucide-react";
3
+ import { useState as Y } from "react";
4
4
  import { cn as M } from "../../lib/utils.js";
5
- import { SimpleSelectXs as F } from "../ui/SimpleSelect.js";
5
+ import { SimpleSelectXs as D } from "../ui/SimpleSelect.js";
6
6
  const Q = [
7
7
  {
8
8
  key: "mentions",
@@ -69,40 +69,44 @@ const Q = [
69
69
  label: "Everything else",
70
70
  help: "Any notification that does not fit a category above — direct messages from other users, access requests, task assignments."
71
71
  }
72
- ], ee = ["inapp", "push", "teams", "email", "quiet_override"], D = ["push_after_min", "email_after_min"], S = (a) => !!a && (a.quiet_start !== void 0 || a.quiet_end !== void 0);
73
- function te(a, l) {
74
- var b, y, p, w, _, T, C, $;
75
- const d = {}, m = S(a) ? a : S(l) ? l : null;
76
- (m == null ? void 0 : m.quiet_start) !== void 0 && (d.quiet_start = m.quiet_start), (m == null ? void 0 : m.quiet_end) !== void 0 && (d.quiet_end = m.quiet_end);
77
- const R = {};
72
+ ], ae = /* @__PURE__ */ new Set(["chaos", "audit"]);
73
+ function le(a, l) {
74
+ return a === "role" || l ? Q : Q.filter((i) => !ae.has(i.key));
75
+ }
76
+ 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
+ function se(a, l) {
78
+ var y, h, p, w, E, _, R, T;
79
+ const i = {}, m = q(a) ? a : q(l) ? l : null;
80
+ (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
+ const O = {};
78
82
  for (const f of /* @__PURE__ */ new Set([
79
83
  ...Object.keys((l == null ? void 0 : l.matrix) ?? {}),
80
84
  ...Object.keys((a == null ? void 0 : a.matrix) ?? {})
81
85
  ])) {
82
- const x = {};
83
- for (const h of ee) {
84
- const v = ((y = (b = a == null ? void 0 : a.matrix) == null ? void 0 : b[f]) == null ? void 0 : y[h]) ?? ((w = (p = l == null ? void 0 : l.matrix) == null ? void 0 : p[f]) == null ? void 0 : w[h]);
85
- v !== void 0 && (x[h] = v);
86
+ 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);
86
90
  }
87
- R[f] = x;
91
+ O[f] = v;
88
92
  }
89
- d.matrix = R;
93
+ i.matrix = O;
90
94
  const A = {};
91
95
  for (const f of /* @__PURE__ */ new Set([
92
96
  ...Object.keys((l == null ? void 0 : l.escalation) ?? {}),
93
97
  ...Object.keys((a == null ? void 0 : a.escalation) ?? {})
94
98
  ])) {
95
- const x = {};
96
- for (const h of D) {
97
- const v = ((T = (_ = a == null ? void 0 : a.escalation) == null ? void 0 : _[f]) == null ? void 0 : T[h]) ?? (($ = (C = l == null ? void 0 : l.escalation) == null ? void 0 : C[f]) == null ? void 0 : $[h]);
98
- v !== void 0 && (x[h] = v);
99
+ 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);
99
103
  }
100
- A[f] = x;
104
+ A[f] = v;
101
105
  }
102
- return d.escalation = A, d;
106
+ return i.escalation = A, i;
103
107
  }
104
- function Y(a, l, d) {
105
- return d(a) !== void 0 ? "person" : d(l) !== void 0 ? "role" : "system";
108
+ function H(a, l, i) {
109
+ return i(a) !== void 0 ? "person" : i(l) !== void 0 ? "role" : "system";
106
110
  }
107
111
  function N({ text: a }) {
108
112
  return /* @__PURE__ */ t(
@@ -116,14 +120,14 @@ function N({ text: a }) {
116
120
  }
117
121
  );
118
122
  }
119
- function q({ show: a, roleName: l }) {
120
- const d = `From the ${l ? `"${l}" ` : ""}role default — change it to make it yours`;
123
+ function S({ show: a, roleName: l }) {
124
+ const i = `From the ${l ? `"${l}" ` : ""}role default — change it to make it yours`;
121
125
  return /* @__PURE__ */ t(
122
126
  "span",
123
127
  {
124
128
  "data-from-role": a ? "" : void 0,
125
129
  "aria-hidden": !a,
126
- "data-tip": a ? d : void 0,
130
+ "data-tip": a ? i : void 0,
127
131
  className: M(
128
132
  "ml-0.5 inline-block rounded bg-violet-50 px-0.5 align-middle text-[8.5px] font-bold uppercase leading-[12px] text-violet-600 dark:bg-violet-500/15 dark:text-violet-300",
129
133
  !a && "invisible"
@@ -132,67 +136,68 @@ function q({ show: a, roleName: l }) {
132
136
  }
133
137
  );
134
138
  }
135
- function ne({
139
+ function ue({
136
140
  value: a,
137
141
  inherited: l,
138
- inheritedName: d,
142
+ inheritedName: i,
139
143
  legacyEmail: m = "instant",
140
- onCommit: R,
144
+ onCommit: O,
141
145
  onLegacyEmail: A,
142
- saving: b,
143
- subject: y,
146
+ saving: y,
147
+ subject: h,
144
148
  teams: p,
145
- extraColumn: w
149
+ extraColumn: w,
150
+ isAdmin: E = !0
146
151
  }) {
147
- const _ = te(a, l), [T, C] = B(null), [$, f] = B(null), x = T ?? _.quiet_start ?? "", h = $ ?? _.quiet_end ?? "", v = S(a) ? "person" : S(l) ? "role" : "system", k = y === "person" && !!l, O = (e) => {
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) => {
148
153
  const o = {
149
154
  ...a,
150
155
  matrix: { ...a.matrix ?? {} },
151
156
  escalation: { ...a.escalation ?? {} }
152
157
  };
153
- e(o), R(o);
154
- }, P = (e, o, s) => O((i) => {
158
+ e(o), O(o);
159
+ }, L = (e, o, s) => C((d) => {
155
160
  var c;
156
- const n = { ...((c = i.matrix) == null ? void 0 : c[e]) ?? {} };
161
+ const n = { ...((c = d.matrix) == null ? void 0 : c[e]) ?? {} };
157
162
  s === void 0 ? delete n[o] : n[o] = s;
158
- const u = i.matrix ?? {};
159
- Object.keys(n).length ? u[e] = n : delete u[e], i.matrix = u;
160
- }), H = (e) => {
163
+ const u = d.matrix ?? {};
164
+ Object.keys(n).length ? u[e] = n : delete u[e], d.matrix = u;
165
+ }), X = (e) => {
161
166
  var o;
162
167
  return ((o = l == null ? void 0 : l.matrix) == null ? void 0 : o[e]) ?? {};
163
- }, W = (e) => {
164
- var o, s, i, n;
165
- return ((s = (o = a.matrix) == null ? void 0 : o[e]) == null ? void 0 : s.email) ?? (m === "daily" ? "daily" : ((n = (i = l == null ? void 0 : l.matrix) == null ? void 0 : i[e]) == null ? void 0 : n.email) ?? m);
166
- }, X = (e) => {
167
- var o, s, i, n;
168
- return ((s = (o = a.matrix) == null ? void 0 : o[e]) == null ? void 0 : s.email) !== void 0 || m === "daily" ? "person" : ((n = (i = l == null ? void 0 : l.matrix) == null ? void 0 : i[e]) == null ? void 0 : n.email) !== void 0 ? "role" : "system";
169
- }, I = (e, o) => O((s) => {
168
+ }, z = (e) => {
169
+ var o, s, d, n;
170
+ return ((s = (o = a.matrix) == null ? void 0 : o[e]) == null ? void 0 : s.email) ?? (m === "daily" ? "daily" : ((n = (d = l == null ? void 0 : l.matrix) == null ? void 0 : d[e]) == null ? void 0 : n.email) ?? m);
171
+ }, K = (e) => {
172
+ var o, s, d, n;
173
+ return ((s = (o = a.matrix) == null ? void 0 : o[e]) == null ? void 0 : s.email) !== void 0 || m === "daily" ? "person" : ((n = (d = l == null ? void 0 : l.matrix) == null ? void 0 : d[e]) == null ? void 0 : n.email) !== void 0 ? "role" : "system";
174
+ }, $ = (e, o) => C((s) => {
170
175
  e === void 0 && o === void 0 ? (delete s.quiet_start, delete s.quiet_end) : (s.quiet_start = e ?? "", s.quiet_end = o ?? "");
171
- }), z = (e, o, s) => O((i) => {
172
- var c, g, E;
173
- const n = { ...((c = i.escalation) == null ? void 0 : c[e]) ?? {} };
174
- s ? n[o] = s : (E = (g = l == null ? void 0 : l.escalation) == null ? void 0 : g[e]) != null && E[o] ? n[o] = 0 : delete n[o];
175
- const u = i.escalation ?? {};
176
- Object.keys(n).length ? u[e] = n : delete u[e], i.escalation = u;
177
- }), K = (e) => O((o) => {
176
+ }), V = (e, o, s) => C((d) => {
177
+ var c, g, I;
178
+ const n = { ...((c = d.escalation) == null ? void 0 : c[e]) ?? {} };
179
+ s ? n[o] = s : (I = (g = l == null ? void 0 : l.escalation) == null ? void 0 : g[e]) != null && I[o] ? n[o] = 0 : delete n[o];
180
+ const u = d.escalation ?? {};
181
+ Object.keys(n).length ? u[e] = n : delete u[e], d.escalation = u;
182
+ }), G = (e) => C((o) => {
178
183
  var s;
179
184
  (s = o.matrix) == null || delete s[e];
180
- }), V = (e) => O((o) => {
185
+ }), J = (e) => C((o) => {
181
186
  var s;
182
187
  (s = o.escalation) == null || delete s[e];
183
- }), G = S(a) || Object.keys(a.matrix ?? {}).length > 0 || Object.keys(a.escalation ?? {}).length > 0, J = [
188
+ }), Z = q(a) || Object.keys(a.matrix ?? {}).length > 0 || Object.keys(a.escalation ?? {}).length > 0, ee = [
184
189
  { value: "", label: "never" },
185
190
  { value: "15", label: "15 min" },
186
191
  { value: "60", label: "1 hour" },
187
192
  { value: "240", label: "4 hours" },
188
193
  { value: "480", label: "8 hours" },
189
194
  { value: "1440", label: "1 day" }
190
- ], L = [
195
+ ], j = [
191
196
  { value: "instant", label: "Individual email" },
192
197
  { value: "daily", label: "Daily summary" },
193
198
  { value: "off", label: "No email" }
194
- ], Z = y === "role" ? "members" : "you";
195
- return /* @__PURE__ */ r("div", { className: "space-y-3", "data-notification-rules-editor": y, children: [
199
+ ], te = h === "role" ? "members" : "you";
200
+ return /* @__PURE__ */ r("div", { className: "space-y-3", "data-notification-rules-editor": h, children: [
196
201
  k && /* @__PURE__ */ r(
197
202
  "div",
198
203
  {
@@ -201,18 +206,18 @@ function ne({
201
206
  children: [
202
207
  /* @__PURE__ */ r("span", { className: "min-w-0 flex-1", children: [
203
208
  "Your role",
204
- d ? ` (${d})` : "",
209
+ i ? ` (${i})` : "",
205
210
  " sets starting rules. Values marked",
206
211
  " ",
207
- /* @__PURE__ */ t(q, { show: !0, roleName: d }),
212
+ /* @__PURE__ */ t(S, { show: !0, roleName: i }),
208
213
  " come from it until you change them."
209
214
  ] }),
210
- G && /* @__PURE__ */ t(
215
+ Z && /* @__PURE__ */ t(
211
216
  "button",
212
217
  {
213
218
  type: "button",
214
- disabled: b,
215
- onClick: () => R(
219
+ disabled: y,
220
+ onClick: () => O(
216
221
  a.teams_muted_until ? { teams_muted_until: a.teams_muted_until } : {}
217
222
  ),
218
223
  className: "underline decoration-dotted underline-offset-2 disabled:opacity-50",
@@ -229,9 +234,9 @@ function ne({
229
234
  {
230
235
  type: "time",
231
236
  value: x,
232
- onChange: (e) => C(e.target.value),
237
+ onChange: (e) => f(e.target.value),
233
238
  onBlur: () => {
234
- T != null && I(x || "", h || "");
239
+ T != null && $(x || "", P || "");
235
240
  },
236
241
  "aria-label": "Quiet hours start",
237
242
  className: "h-7 rounded-md border border-slate-200 bg-background px-1.5 text-[12px] dark:border-border"
@@ -242,33 +247,33 @@ function ne({
242
247
  "input",
243
248
  {
244
249
  type: "time",
245
- value: h,
246
- onChange: (e) => f(e.target.value),
250
+ value: P,
251
+ onChange: (e) => b(e.target.value),
247
252
  onBlur: () => {
248
- $ != null && I(x || "", h || "");
253
+ v != null && $(x || "", P || "");
249
254
  },
250
255
  "aria-label": "Quiet hours end",
251
256
  className: "h-7 rounded-md border border-slate-200 bg-background px-1.5 text-[12px] dark:border-border"
252
257
  }
253
258
  ),
254
- k && v === "role" && /* @__PURE__ */ t(q, { show: !0, roleName: d }),
255
- (x || h) && /* @__PURE__ */ t(
259
+ k && U === "role" && /* @__PURE__ */ t(S, { show: !0, roleName: i }),
260
+ (x || P) && /* @__PURE__ */ t(
256
261
  "button",
257
262
  {
258
263
  type: "button",
259
264
  onClick: () => {
260
- C(""), f(""), S(l) ? I("", "") : I(void 0, void 0);
265
+ f(""), b(""), q(l) ? $("", "") : $(void 0, void 0);
261
266
  },
262
267
  className: "text-[11.5px] text-slate-400 underline decoration-dotted underline-offset-2",
263
268
  children: "Clear"
264
269
  }
265
270
  ),
266
- k && v === "person" && S(l) && /* @__PURE__ */ r(
271
+ k && U === "person" && q(l) && /* @__PURE__ */ r(
267
272
  "button",
268
273
  {
269
274
  type: "button",
270
275
  onClick: () => {
271
- C(null), f(null), I(void 0, void 0);
276
+ f(null), b(null), $(void 0, void 0);
272
277
  },
273
278
  className: "text-[11.5px] text-slate-400 underline decoration-dotted underline-offset-2",
274
279
  children: [
@@ -313,12 +318,12 @@ function ne({
313
318
  ] }),
314
319
  k && /* @__PURE__ */ t("th", { className: "w-6 py-1", "aria-label": "Reset" })
315
320
  ] }) }),
316
- /* @__PURE__ */ t("tbody", { children: Q.map((e) => {
321
+ /* @__PURE__ */ t("tbody", { children: R.map((e) => {
317
322
  var n, u;
318
- const o = ((n = _.matrix) == null ? void 0 : n[e.key]) ?? {}, s = (c) => k && Y(a, l, (g) => {
319
- var E, j;
320
- return (j = (E = g == null ? void 0 : g.matrix) == null ? void 0 : E[e.key]) == null ? void 0 : j[c];
321
- }) === "role", i = (u = a.matrix) == null ? void 0 : u[e.key];
323
+ const o = ((n = _.matrix) == null ? void 0 : n[e.key]) ?? {}, s = (c) => k && H(a, l, (g) => {
324
+ var I, B;
325
+ return (B = (I = g == null ? void 0 : g.matrix) == null ? void 0 : I[e.key]) == null ? void 0 : B[c];
326
+ }) === "role", d = (u = a.matrix) == null ? void 0 : u[e.key];
322
327
  return /* @__PURE__ */ r("tr", { className: "border-t border-slate-100 dark:border-border", children: [
323
328
  /* @__PURE__ */ r("td", { className: "py-1.5 text-slate-700 dark:text-foreground", children: [
324
329
  e.label,
@@ -330,30 +335,30 @@ function ne({
330
335
  {
331
336
  type: "checkbox",
332
337
  checked: o[c] !== !1,
333
- onChange: () => P(e.key, c, o[c] === !1),
334
- disabled: b,
338
+ onChange: () => L(e.key, c, o[c] === !1),
339
+ disabled: y,
335
340
  "aria-label": `${c === "inapp" ? "In-app" : "Push"} for ${e.label}`,
336
341
  "data-notify-channel": `${e.key}:${c}`,
337
342
  className: "h-3.5 w-3.5 align-middle"
338
343
  }
339
344
  ),
340
- /* @__PURE__ */ t(q, { show: s(c), roleName: d })
345
+ /* @__PURE__ */ t(S, { show: s(c), roleName: i })
341
346
  ] }, c)),
342
347
  /* @__PURE__ */ t("td", { className: "py-1 text-center", children: /* @__PURE__ */ r("div", { className: "inline-flex items-center", children: [
343
348
  /* @__PURE__ */ t(
344
- F,
349
+ D,
345
350
  {
346
351
  ariaLabel: `Email for ${e.label}`,
347
- value: W(e.key),
348
- options: L,
349
- onChange: (c) => P(e.key, "email", c)
352
+ value: z(e.key),
353
+ options: j,
354
+ onChange: (c) => L(e.key, "email", c)
350
355
  }
351
356
  ),
352
357
  /* @__PURE__ */ t(
353
- q,
358
+ S,
354
359
  {
355
- show: k && X(e.key) === "role",
356
- roleName: d
360
+ show: k && K(e.key) === "role",
361
+ roleName: i
357
362
  }
358
363
  )
359
364
  ] }) }),
@@ -363,15 +368,15 @@ function ne({
363
368
  {
364
369
  type: "checkbox",
365
370
  checked: o.teams === !0,
366
- onChange: () => P(e.key, "teams", o.teams !== !0),
367
- disabled: b || y === "person" && !p.linked,
371
+ onChange: () => L(e.key, "teams", o.teams !== !0),
372
+ disabled: y || h === "person" && !p.linked,
368
373
  "aria-label": `Teams for ${e.label}`,
369
- "data-tip": y === "person" && !p.linked ? "Connect Teams first" : void 0,
374
+ "data-tip": h === "person" && !p.linked ? "Connect Teams first" : void 0,
370
375
  "data-notify-channel": `${e.key}:teams`,
371
376
  className: "h-3.5 w-3.5 align-middle"
372
377
  }
373
378
  ),
374
- /* @__PURE__ */ t(q, { show: s("teams"), roleName: d })
379
+ /* @__PURE__ */ t(S, { show: s("teams"), roleName: i })
375
380
  ] }),
376
381
  w && /* @__PURE__ */ t("td", { className: "py-1 text-center", children: w.cell(e.key, e.label) }),
377
382
  /* @__PURE__ */ r("td", { className: "py-1.5 text-center", children: [
@@ -380,32 +385,32 @@ function ne({
380
385
  {
381
386
  type: "checkbox",
382
387
  checked: o.quiet_override === !0,
383
- onChange: () => P(
388
+ onChange: () => L(
384
389
  e.key,
385
390
  "quiet_override",
386
- o.quiet_override === !0 ? H(e.key).quiet_override === !0 ? !1 : void 0 : !0
391
+ o.quiet_override === !0 ? X(e.key).quiet_override === !0 ? !1 : void 0 : !0
387
392
  ),
388
- disabled: b,
393
+ disabled: y,
389
394
  "aria-label": `Let ${e.label} through quiet hours`,
390
395
  "data-quiet-override": e.key,
391
396
  className: "h-3.5 w-3.5 align-middle"
392
397
  }
393
398
  ),
394
- /* @__PURE__ */ t(q, { show: s("quiet_override"), roleName: d })
399
+ /* @__PURE__ */ t(S, { show: s("quiet_override"), roleName: i })
395
400
  ] }),
396
401
  k && /* @__PURE__ */ t("td", { className: "py-1 text-center", children: /* @__PURE__ */ t(
397
402
  "button",
398
403
  {
399
404
  type: "button",
400
- onClick: () => K(e.key),
401
- disabled: b,
405
+ onClick: () => G(e.key),
406
+ disabled: y,
402
407
  "data-tip": "Back to the role default for this category",
403
408
  "aria-label": `Use the role default for ${e.label}`,
404
409
  className: M(
405
410
  "rounded p-0.5 text-slate-400 hover:bg-muted hover:text-slate-700 dark:hover:text-slate-200",
406
- !i && "invisible"
411
+ !d && "invisible"
407
412
  ),
408
- children: /* @__PURE__ */ t(U, { className: "h-3 w-3" })
413
+ children: /* @__PURE__ */ t(F, { className: "h-3 w-3" })
409
414
  }
410
415
  ) })
411
416
  ] }, e.key);
@@ -413,16 +418,16 @@ function ne({
413
418
  ] }),
414
419
  /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
415
420
  /* @__PURE__ */ t("span", { children: "All email:" }),
416
- L.map((e) => /* @__PURE__ */ t(
421
+ j.map((e) => /* @__PURE__ */ t(
417
422
  "button",
418
423
  {
419
424
  type: "button",
420
- disabled: b,
425
+ disabled: y,
421
426
  onClick: () => {
422
- O((o) => {
427
+ C((o) => {
423
428
  const s = o.matrix ?? {};
424
- for (const i of Q)
425
- s[i.key] = { ...s[i.key] ?? {}, email: e.value };
429
+ for (const d of Q)
430
+ s[d.key] = { ...s[d.key] ?? {}, email: e.value };
426
431
  o.matrix = s;
427
432
  }), e.value !== "off" && (A == null || A(e.value));
428
433
  },
@@ -437,9 +442,9 @@ function ne({
437
442
  "If it stays unread",
438
443
  /* @__PURE__ */ r("span", { className: "ml-1.5 text-[11px] font-normal text-slate-400", children: [
439
444
  "one notification climbs channels on a schedule — push, then email — and stops the moment",
440
- y === "role" ? " it is" : " you",
445
+ h === "role" ? " it is" : " you",
441
446
  " read",
442
- y === "role" ? "" : " it",
447
+ h === "role" ? "" : " it",
443
448
  ". A channel that already delivered it is not repeated."
444
449
  ] })
445
450
  ] }),
@@ -451,7 +456,7 @@ function ne({
451
456
  /* @__PURE__ */ t(
452
457
  N,
453
458
  {
454
- text: `Still unread after this long → a browser / device push (needs a registered device; quiet hours do not apply to escalations ${Z} asked for).`
459
+ text: `Still unread after this long → a browser / device push (needs a registered device; quiet hours do not apply to escalations ${te} asked for).`
455
460
  }
456
461
  )
457
462
  ] }),
@@ -461,29 +466,29 @@ function ne({
461
466
  ] }),
462
467
  k && /* @__PURE__ */ t("th", { className: "w-6 py-1", "aria-label": "Reset" })
463
468
  ] }) }),
464
- /* @__PURE__ */ t("tbody", { children: Q.map((e) => {
465
- var s, i;
469
+ /* @__PURE__ */ t("tbody", { children: R.map((e) => {
470
+ var s, d;
466
471
  const o = ((s = _.escalation) == null ? void 0 : s[e.key]) ?? {};
467
472
  return /* @__PURE__ */ r("tr", { className: "border-t border-slate-100 dark:border-border", children: [
468
473
  /* @__PURE__ */ t("td", { className: "py-1 text-slate-700 dark:text-foreground", children: e.label }),
469
- D.map((n) => /* @__PURE__ */ t("td", { className: "py-1", children: /* @__PURE__ */ r("span", { className: "inline-flex items-center", children: [
474
+ W.map((n) => /* @__PURE__ */ t("td", { className: "py-1", children: /* @__PURE__ */ r("span", { className: "inline-flex items-center", children: [
470
475
  /* @__PURE__ */ t(
471
- F,
476
+ D,
472
477
  {
473
478
  ariaLabel: `${n === "push_after_min" ? "Push" : "Email"} after for ${e.label}`,
474
479
  value: o[n] ? String(o[n]) : "",
475
- options: J,
476
- onChange: (u) => z(e.key, n, u ? Number(u) : null)
480
+ options: ee,
481
+ onChange: (u) => V(e.key, n, u ? Number(u) : null)
477
482
  }
478
483
  ),
479
484
  /* @__PURE__ */ t(
480
- q,
485
+ S,
481
486
  {
482
- show: k && Y(a, l, (u) => {
487
+ show: k && H(a, l, (u) => {
483
488
  var c, g;
484
489
  return (g = (c = u == null ? void 0 : u.escalation) == null ? void 0 : c[e.key]) == null ? void 0 : g[n];
485
490
  }) === "role",
486
- roleName: d
491
+ roleName: i
487
492
  }
488
493
  )
489
494
  ] }) }, n)),
@@ -491,15 +496,15 @@ function ne({
491
496
  "button",
492
497
  {
493
498
  type: "button",
494
- onClick: () => V(e.key),
495
- disabled: b,
499
+ onClick: () => J(e.key),
500
+ disabled: y,
496
501
  "data-tip": "Back to the role default for this category",
497
502
  "aria-label": `Use the role default escalation for ${e.label}`,
498
503
  className: M(
499
504
  "rounded p-0.5 text-slate-400 hover:bg-muted hover:text-slate-700 dark:hover:text-slate-200",
500
- !((i = a.escalation) != null && i[e.key]) && "invisible"
505
+ !((d = a.escalation) != null && d[e.key]) && "invisible"
501
506
  ),
502
- children: /* @__PURE__ */ t(U, { className: "h-3 w-3" })
507
+ children: /* @__PURE__ */ t(F, { className: "h-3 w-3" })
503
508
  }
504
509
  ) })
505
510
  ] }, e.key);
@@ -509,7 +514,9 @@ function ne({
509
514
  ] });
510
515
  }
511
516
  export {
517
+ ae as ADMIN_ONLY_RULE_CATS,
512
518
  Q as NOTIFY_RULE_CATS,
513
- ne as NotificationRulesEditor,
514
- te as mergeNotifyRulesClient
519
+ ue as NotificationRulesEditor,
520
+ se as mergeNotifyRulesClient,
521
+ le as ruleCatsFor
515
522
  };