@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.
- package/dist/components/fields/RelationField.js +110 -80
- package/dist/full.css +1 -1
- package/dist/hooks/useRelationOptions.js +1 -0
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +37 -2
- package/dist/index.js +523 -520
- package/dist/shared/components/CollectionBrowserView.js +2693 -2619
- package/dist/shared/components/DataTable.js +538 -495
- package/dist/shared/components/ItemEditForm.js +4559 -4386
- package/dist/shared/components/PageRenderer.js +537 -508
- package/dist/shared/components/ProfileView.js +716 -715
- package/dist/shared/components/QueryTable.js +74 -74
- package/dist/shared/components/RecordReadView.js +367 -364
- package/dist/shared/components/ReportView.js +64 -39
- package/dist/shared/components/WidgetSlot.js +543 -520
- package/dist/shared/components/alerts/AlertManagerView.js +324 -317
- package/dist/shared/components/alerts/types.js +37 -14
- package/dist/shared/components/cbv/row-focus.js +19 -0
- package/dist/shared/components/help-videos/HelpVideoPlayer.js +152 -147
- package/dist/shared/components/integrations/console/SignalCard.js +59 -59
- package/dist/shared/components/integrations/console/tone.js +52 -30
- package/dist/shared/components/item-edit/CatalogPickerField.js +525 -505
- package/dist/shared/components/item-edit/FieldRenderer.js +22 -20
- package/dist/shared/components/item-edit/FieldRow.js +175 -173
- package/dist/shared/components/item-edit/GridBulkEditDialog.js +55 -54
- package/dist/shared/components/item-edit/InlineTableField.js +2487 -2442
- package/dist/shared/components/item-edit/M2MCombobox.js +321 -295
- package/dist/shared/components/item-edit/MidairCollisionDialog.js +1 -1
- package/dist/shared/components/item-edit/PlanGrid.js +973 -894
- package/dist/shared/components/item-edit/QuickCreateButton.js +335 -106
- package/dist/shared/components/item-edit/RecordLiveSync.js +77 -75
- package/dist/shared/components/item-edit/RelationCombobox.js +452 -335
- package/dist/shared/components/item-edit/RelationGroupedCombobox.js +262 -141
- package/dist/shared/components/item-edit/SummaryPanel.js +385 -358
- package/dist/shared/components/item-edit/duplicate-rehearsal.js +47 -0
- package/dist/shared/components/item-edit/line-midair.js +82 -75
- package/dist/shared/components/item-edit/option-disambiguate.js +44 -32
- package/dist/shared/components/item-edit/related-missing.js +45 -0
- package/dist/shared/components/item-edit/save-outcome.js +9 -7
- package/dist/shared/components/notifications/NotificationRulesEditor.js +130 -123
- package/dist/shared/components/panels/AccessDeniedPanel.js +52 -48
- package/dist/shared/components/panels/ItemLockBanner.js +213 -211
- package/dist/shared/components/panels/PipelinePanel.js +1140 -1053
- package/dist/shared/components/panels/RecordIntegrityBanner.js +114 -86
- package/dist/shared/components/panels/RevisionsPanel.js +316 -299
- package/dist/shared/components/panels/TaskPanel.js +265 -249
- package/dist/shared/components/panels/landing-state.js +27 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +110 -92
- package/dist/shared/components/profile/AiMemoryCard.js +12 -10
- package/dist/shared/components/queue/OwnerAvatars.js +80 -41
- package/dist/shared/components/queue/QueueQuickFilters.js +52 -52
- package/dist/shared/components/queue/QueueWorklist.js +1050 -1026
- package/dist/shared/components/queue/group-sums.js +27 -0
- package/dist/shared/components/queue/live-state-aspect.js +9 -5
- package/dist/shared/components/widgets/ReviewListWidget.js +175 -154
- package/dist/shared/lib/back-closes.js +25 -0
- package/dist/shared/lib/display-prefs.js +60 -52
- package/dist/shared/lib/draft-store.js +71 -48
- package/dist/shared/lib/expression.js +53 -53
- package/dist/shared/lib/form-usage-beacon.js +7 -7
- package/dist/shared/lib/list-page-memory.js +63 -0
- package/dist/shared/lib/live.js +44 -44
- package/dist/shared/lib/money-input.js +45 -0
- package/dist/shared/lib/own-writes.js +76 -28
- package/dist/shared/lib/request-gate.js +110 -109
- package/dist/shared/lib/sanitize-html.js +10 -6
- package/dist/shared/lib/staged-row-labels.js +18 -0
- package/dist/shared/lib/validation-rules.js +34 -19
- 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
|
|
3
|
-
import { useState as
|
|
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
|
|
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
|
-
],
|
|
73
|
-
function
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
|
83
|
-
for (const
|
|
84
|
-
const
|
|
85
|
-
|
|
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
|
-
|
|
91
|
+
O[f] = v;
|
|
88
92
|
}
|
|
89
|
-
|
|
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
|
|
96
|
-
for (const
|
|
97
|
-
const
|
|
98
|
-
|
|
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] =
|
|
104
|
+
A[f] = v;
|
|
101
105
|
}
|
|
102
|
-
return
|
|
106
|
+
return i.escalation = A, i;
|
|
103
107
|
}
|
|
104
|
-
function
|
|
105
|
-
return
|
|
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
|
|
120
|
-
const
|
|
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 ?
|
|
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
|
|
139
|
+
function ue({
|
|
136
140
|
value: a,
|
|
137
141
|
inherited: l,
|
|
138
|
-
inheritedName:
|
|
142
|
+
inheritedName: i,
|
|
139
143
|
legacyEmail: m = "instant",
|
|
140
|
-
onCommit:
|
|
144
|
+
onCommit: O,
|
|
141
145
|
onLegacyEmail: A,
|
|
142
|
-
saving:
|
|
143
|
-
subject:
|
|
146
|
+
saving: y,
|
|
147
|
+
subject: h,
|
|
144
148
|
teams: p,
|
|
145
|
-
extraColumn: w
|
|
149
|
+
extraColumn: w,
|
|
150
|
+
isAdmin: E = !0
|
|
146
151
|
}) {
|
|
147
|
-
const _ =
|
|
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),
|
|
154
|
-
},
|
|
158
|
+
e(o), O(o);
|
|
159
|
+
}, L = (e, o, s) => C((d) => {
|
|
155
160
|
var c;
|
|
156
|
-
const n = { ...((c =
|
|
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 =
|
|
159
|
-
Object.keys(n).length ? u[e] = n : delete u[e],
|
|
160
|
-
}),
|
|
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
|
-
},
|
|
164
|
-
var o, s,
|
|
165
|
-
return ((s = (o = a.matrix) == null ? void 0 : o[e]) == null ? void 0 : s.email) ?? (m === "daily" ? "daily" : ((n = (
|
|
166
|
-
},
|
|
167
|
-
var o, s,
|
|
168
|
-
return ((s = (o = a.matrix) == null ? void 0 : o[e]) == null ? void 0 : s.email) !== void 0 || m === "daily" ? "person" : ((n = (
|
|
169
|
-
},
|
|
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
|
-
}),
|
|
172
|
-
var c, g,
|
|
173
|
-
const n = { ...((c =
|
|
174
|
-
s ? n[o] = s : (
|
|
175
|
-
const u =
|
|
176
|
-
Object.keys(n).length ? u[e] = n : delete u[e],
|
|
177
|
-
}),
|
|
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
|
-
}),
|
|
185
|
+
}), J = (e) => C((o) => {
|
|
181
186
|
var s;
|
|
182
187
|
(s = o.escalation) == null || delete s[e];
|
|
183
|
-
}),
|
|
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
|
-
],
|
|
195
|
+
], j = [
|
|
191
196
|
{ value: "instant", label: "Individual email" },
|
|
192
197
|
{ value: "daily", label: "Daily summary" },
|
|
193
198
|
{ value: "off", label: "No email" }
|
|
194
|
-
],
|
|
195
|
-
return /* @__PURE__ */ r("div", { className: "space-y-3", "data-notification-rules-editor":
|
|
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
|
-
|
|
209
|
+
i ? ` (${i})` : "",
|
|
205
210
|
" sets starting rules. Values marked",
|
|
206
211
|
" ",
|
|
207
|
-
/* @__PURE__ */ t(
|
|
212
|
+
/* @__PURE__ */ t(S, { show: !0, roleName: i }),
|
|
208
213
|
" come from it until you change them."
|
|
209
214
|
] }),
|
|
210
|
-
|
|
215
|
+
Z && /* @__PURE__ */ t(
|
|
211
216
|
"button",
|
|
212
217
|
{
|
|
213
218
|
type: "button",
|
|
214
|
-
disabled:
|
|
215
|
-
onClick: () =>
|
|
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) =>
|
|
237
|
+
onChange: (e) => f(e.target.value),
|
|
233
238
|
onBlur: () => {
|
|
234
|
-
T != null &&
|
|
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:
|
|
246
|
-
onChange: (e) =>
|
|
250
|
+
value: P,
|
|
251
|
+
onChange: (e) => b(e.target.value),
|
|
247
252
|
onBlur: () => {
|
|
248
|
-
|
|
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 &&
|
|
255
|
-
(x ||
|
|
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
|
-
|
|
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 &&
|
|
271
|
+
k && U === "person" && q(l) && /* @__PURE__ */ r(
|
|
267
272
|
"button",
|
|
268
273
|
{
|
|
269
274
|
type: "button",
|
|
270
275
|
onClick: () => {
|
|
271
|
-
|
|
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:
|
|
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 &&
|
|
319
|
-
var
|
|
320
|
-
return (
|
|
321
|
-
}) === "role",
|
|
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: () =>
|
|
334
|
-
disabled:
|
|
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(
|
|
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
|
-
|
|
349
|
+
D,
|
|
345
350
|
{
|
|
346
351
|
ariaLabel: `Email for ${e.label}`,
|
|
347
|
-
value:
|
|
348
|
-
options:
|
|
349
|
-
onChange: (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
|
-
|
|
358
|
+
S,
|
|
354
359
|
{
|
|
355
|
-
show: k &&
|
|
356
|
-
roleName:
|
|
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: () =>
|
|
367
|
-
disabled:
|
|
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":
|
|
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(
|
|
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: () =>
|
|
388
|
+
onChange: () => L(
|
|
384
389
|
e.key,
|
|
385
390
|
"quiet_override",
|
|
386
|
-
o.quiet_override === !0 ?
|
|
391
|
+
o.quiet_override === !0 ? X(e.key).quiet_override === !0 ? !1 : void 0 : !0
|
|
387
392
|
),
|
|
388
|
-
disabled:
|
|
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(
|
|
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: () =>
|
|
401
|
-
disabled:
|
|
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
|
-
!
|
|
411
|
+
!d && "invisible"
|
|
407
412
|
),
|
|
408
|
-
children: /* @__PURE__ */ t(
|
|
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
|
-
|
|
421
|
+
j.map((e) => /* @__PURE__ */ t(
|
|
417
422
|
"button",
|
|
418
423
|
{
|
|
419
424
|
type: "button",
|
|
420
|
-
disabled:
|
|
425
|
+
disabled: y,
|
|
421
426
|
onClick: () => {
|
|
422
|
-
|
|
427
|
+
C((o) => {
|
|
423
428
|
const s = o.matrix ?? {};
|
|
424
|
-
for (const
|
|
425
|
-
s[
|
|
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
|
-
|
|
445
|
+
h === "role" ? " it is" : " you",
|
|
441
446
|
" read",
|
|
442
|
-
|
|
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 ${
|
|
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:
|
|
465
|
-
var s,
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
476
|
-
onChange: (u) =>
|
|
480
|
+
options: ee,
|
|
481
|
+
onChange: (u) => V(e.key, n, u ? Number(u) : null)
|
|
477
482
|
}
|
|
478
483
|
),
|
|
479
484
|
/* @__PURE__ */ t(
|
|
480
|
-
|
|
485
|
+
S,
|
|
481
486
|
{
|
|
482
|
-
show: k &&
|
|
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:
|
|
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: () =>
|
|
495
|
-
disabled:
|
|
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
|
-
!((
|
|
505
|
+
!((d = a.escalation) != null && d[e.key]) && "invisible"
|
|
501
506
|
),
|
|
502
|
-
children: /* @__PURE__ */ t(
|
|
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
|
-
|
|
514
|
-
|
|
519
|
+
ue as NotificationRulesEditor,
|
|
520
|
+
se as mergeNotifyRulesClient,
|
|
521
|
+
le as ruleCatsFor
|
|
515
522
|
};
|