@nivaro/react 0.3.62 → 0.3.63
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +66 -0
- package/dist/index.js +239 -235
- package/dist/shared/components/CollectionBrowserView.js +368 -364
- package/dist/shared/components/QualityRulesView.js +212 -138
- package/dist/shared/components/alerts/AlertManagerView.js +341 -335
- package/dist/shared/components/help-videos/library/LearningPathsPanel.js +102 -98
- package/dist/shared/components/help-videos/library/PurgeVideoDialog.js +8 -8
- package/dist/shared/components/imports/CollectionImportPanel.js +273 -247
- package/dist/shared/components/pipeline/PipelineEditorView.js +636 -632
- package/dist/shared/components/pipeline/PipelineStateOwners.js +88 -87
- package/dist/shared/lib/batch-gets.js +68 -0
- package/dist/shared/lib/request-gate.js +284 -230
- package/package.json +1 -1
|
@@ -7,16 +7,17 @@ import { useNivaroClient as fe } from "../../context.js";
|
|
|
7
7
|
import { get as G, post as W, patch as Se, del as oe } from "../../lib/commands.js";
|
|
8
8
|
import { describeOwnerGroup as _e, sentenceLabelsFromFields as $e } from "../../lib/config-sentences.js";
|
|
9
9
|
import { useRecordReader as Ie } from "../../lib/record-loader.js";
|
|
10
|
-
import { ConfigReadBack as
|
|
11
|
-
import {
|
|
10
|
+
import { ConfigReadBack as Le } from "../ConfigReadBack.js";
|
|
11
|
+
import { ConfirmButton as Ee } from "../profile/primitives.js";
|
|
12
|
+
import { UserAvatar as de } from "../UserAvatar.js";
|
|
12
13
|
import { Button as k } from "../ui/button.js";
|
|
13
|
-
import { Command as
|
|
14
|
+
import { Command as je, CommandInput as Pe, CommandList as Oe, CommandEmpty as De, CommandGroup as Ue, CommandItem as ze } from "../ui/command.js";
|
|
14
15
|
import { Input as S } from "../ui/input.js";
|
|
15
16
|
import { Label as C } from "../ui/label.js";
|
|
16
|
-
import { Popover as
|
|
17
|
-
import { SimpleSelect as
|
|
17
|
+
import { Popover as Ae, PopoverTrigger as Re, PopoverContent as Be } from "../ui/popover.js";
|
|
18
|
+
import { SimpleSelect as ce } from "../ui/SimpleSelect.js";
|
|
18
19
|
import { FieldPicker as Ke } from "./FieldPicker.js";
|
|
19
|
-
import { findM2ORelation as
|
|
20
|
+
import { findM2ORelation as Te, findO2MRelation as Me, renderDisplayTemplate as Qe } from "./relations.js";
|
|
20
21
|
const ue = {
|
|
21
22
|
string: [
|
|
22
23
|
{ label: "=", value: "eq" },
|
|
@@ -74,45 +75,45 @@ const ue = {
|
|
|
74
75
|
{ label: "≠", value: "neq" }
|
|
75
76
|
]
|
|
76
77
|
};
|
|
77
|
-
function
|
|
78
|
+
function Ve(t) {
|
|
78
79
|
return ue[t] ?? ue.string;
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
+
function We({
|
|
81
82
|
relatedCollection: t,
|
|
82
83
|
value: o,
|
|
83
84
|
onChange: x
|
|
84
85
|
}) {
|
|
85
|
-
const
|
|
86
|
+
const d = fe();
|
|
86
87
|
Ie();
|
|
87
|
-
const [n, f] = h(""), [
|
|
88
|
+
const [n, f] = h(""), [c, r] = h(!1), [b, g] = h(""), v = Fe(null), { data: m } = F({
|
|
88
89
|
queryKey: ["collection-meta", t],
|
|
89
|
-
queryFn: () =>
|
|
90
|
+
queryFn: () => d.request(G(`/collections/${t}`)).then((u) => u.data)
|
|
90
91
|
}), s = (m == null ? void 0 : m.display_template) ?? null;
|
|
91
92
|
function N(u) {
|
|
92
|
-
return
|
|
93
|
+
return Qe(s, u);
|
|
93
94
|
}
|
|
94
|
-
const { data:
|
|
95
|
+
const { data: E, isLoading: j } = F({
|
|
95
96
|
queryKey: ["items-picker", t, n],
|
|
96
|
-
queryFn: () =>
|
|
97
|
+
queryFn: () => d.request(
|
|
97
98
|
G(`/items/${t}`, { limit: 30, search: n || void 0 })
|
|
98
99
|
).then((u) => u.data),
|
|
99
|
-
enabled:
|
|
100
|
+
enabled: c
|
|
100
101
|
}), { data: _ } = F({
|
|
101
102
|
queryKey: ["item-single", t, o],
|
|
102
|
-
queryFn: () =>
|
|
103
|
+
queryFn: () => d.request(G(`/items/${t}/${o}`)).then((u) => u.data),
|
|
103
104
|
enabled: !!o
|
|
104
105
|
});
|
|
105
106
|
return Ge(() => {
|
|
106
|
-
if (!
|
|
107
|
+
if (!c) return;
|
|
107
108
|
function u(P) {
|
|
108
109
|
v.current && !v.current.contains(P.target) && r(!1);
|
|
109
110
|
}
|
|
110
111
|
return document.addEventListener("mousedown", u), () => document.removeEventListener("mousedown", u);
|
|
111
|
-
}, [
|
|
112
|
+
}, [c]), /* @__PURE__ */ l("div", { className: "relative", ref: v, children: [
|
|
112
113
|
/* @__PURE__ */ e(
|
|
113
114
|
S,
|
|
114
115
|
{
|
|
115
|
-
value:
|
|
116
|
+
value: c ? b : _ ? N(_) : o,
|
|
116
117
|
onChange: (u) => {
|
|
117
118
|
g(u.target.value), f(u.target.value);
|
|
118
119
|
},
|
|
@@ -123,7 +124,7 @@ function Ve({
|
|
|
123
124
|
className: "h-8 text-[12px] w-[160px]"
|
|
124
125
|
}
|
|
125
126
|
),
|
|
126
|
-
|
|
127
|
+
c && /* @__PURE__ */ e("div", { className: "absolute z-50 top-full mt-0.5 max-h-48 w-full min-w-[200px] overflow-y-auto rounded-md border border-slate-200 bg-white shadow-lg dark:border-border dark:bg-card", children: j ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-3", children: /* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5 animate-spin text-slate-400" }) }) : (E ?? []).length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-2 text-[12px] text-slate-400", children: "No results" }) : (E ?? []).map((u) => /* @__PURE__ */ e(
|
|
127
128
|
"button",
|
|
128
129
|
{
|
|
129
130
|
type: "button",
|
|
@@ -141,18 +142,18 @@ function pe({
|
|
|
141
142
|
row: t,
|
|
142
143
|
fields: o,
|
|
143
144
|
relations: x,
|
|
144
|
-
collection:
|
|
145
|
+
collection: d,
|
|
145
146
|
onChange: n,
|
|
146
147
|
onRemove: f
|
|
147
148
|
}) {
|
|
148
|
-
const
|
|
149
|
-
(s) => s.many_collection ===
|
|
150
|
-
) ?? null : null, g = !r && !b && t.field &&
|
|
149
|
+
const c = o.find((s) => s.field === t.field), r = t.field && d ? Te(x, d, t.field) ?? null : null, b = !r && t.field && d ? x.find(
|
|
150
|
+
(s) => s.many_collection === d && s.many_field === t.field && s.junction_field !== null
|
|
151
|
+
) ?? null : null, g = !r && !b && t.field && d ? Me(x, d, t.field) ?? null : null, v = (r == null ? void 0 : r.one_collection) ?? (b == null ? void 0 : b.one_collection) ?? (g == null ? void 0 : g.many_collection) ?? null, m = v ? "uuid" : (c == null ? void 0 : c.type) ?? "string";
|
|
151
152
|
return /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
152
153
|
/* @__PURE__ */ e(
|
|
153
154
|
Ke,
|
|
154
155
|
{
|
|
155
|
-
collection:
|
|
156
|
+
collection: d,
|
|
156
157
|
fields: o,
|
|
157
158
|
relations: x,
|
|
158
159
|
value: t.field,
|
|
@@ -163,16 +164,16 @@ function pe({
|
|
|
163
164
|
}
|
|
164
165
|
),
|
|
165
166
|
/* @__PURE__ */ e(
|
|
166
|
-
|
|
167
|
+
ce,
|
|
167
168
|
{
|
|
168
169
|
value: t.op,
|
|
169
170
|
onChange: (s) => n({ ...t, op: s }),
|
|
170
171
|
className: "h-8 w-[70px] rounded-md border-slate-200 bg-white px-2 text-[13px]",
|
|
171
|
-
options:
|
|
172
|
+
options: Ve(m).map((s) => ({ value: s.value, label: s.label }))
|
|
172
173
|
}
|
|
173
174
|
),
|
|
174
175
|
m === "boolean" ? /* @__PURE__ */ e(
|
|
175
|
-
|
|
176
|
+
ce,
|
|
176
177
|
{
|
|
177
178
|
value: t.value,
|
|
178
179
|
onChange: (s) => n({ ...t, value: s }),
|
|
@@ -200,7 +201,7 @@ function pe({
|
|
|
200
201
|
className: "h-8 text-[12px] w-[140px]"
|
|
201
202
|
}
|
|
202
203
|
) : v ? /* @__PURE__ */ e(
|
|
203
|
-
|
|
204
|
+
We,
|
|
204
205
|
{
|
|
205
206
|
relatedCollection: v,
|
|
206
207
|
value: t.value,
|
|
@@ -226,10 +227,10 @@ function pe({
|
|
|
226
227
|
)
|
|
227
228
|
] });
|
|
228
229
|
}
|
|
229
|
-
function
|
|
230
|
+
function Ye(t) {
|
|
230
231
|
return [t.first_name, t.last_name].filter(Boolean).join(" ").trim() || t.email;
|
|
231
232
|
}
|
|
232
|
-
function
|
|
233
|
+
function L(t) {
|
|
233
234
|
const o = [t.first_name, t.last_name].filter(Boolean).join(" ").trim();
|
|
234
235
|
return o ? `${o} (${t.email})` : t.email;
|
|
235
236
|
}
|
|
@@ -237,11 +238,11 @@ function me({
|
|
|
237
238
|
value: t,
|
|
238
239
|
onChange: o,
|
|
239
240
|
users: x,
|
|
240
|
-
placeholder:
|
|
241
|
+
placeholder: d = "Select a user…"
|
|
241
242
|
}) {
|
|
242
|
-
const [n, f] = h(!1),
|
|
243
|
-
return /* @__PURE__ */ l(
|
|
244
|
-
/* @__PURE__ */ e(
|
|
243
|
+
const [n, f] = h(!1), c = x.find((r) => r.id === t);
|
|
244
|
+
return /* @__PURE__ */ l(Ae, { open: n, onOpenChange: f, children: [
|
|
245
|
+
/* @__PURE__ */ e(Re, { asChild: !0, children: /* @__PURE__ */ l(
|
|
245
246
|
"button",
|
|
246
247
|
{
|
|
247
248
|
type: "button",
|
|
@@ -250,8 +251,8 @@ function me({
|
|
|
250
251
|
/* @__PURE__ */ e(
|
|
251
252
|
"span",
|
|
252
253
|
{
|
|
253
|
-
className:
|
|
254
|
-
children:
|
|
254
|
+
className: c ? "flex-1 truncate text-left" : "flex-1 text-left text-slate-400",
|
|
255
|
+
children: c ? L(c) : d
|
|
255
256
|
}
|
|
256
257
|
),
|
|
257
258
|
/* @__PURE__ */ e(
|
|
@@ -276,14 +277,14 @@ function me({
|
|
|
276
277
|
]
|
|
277
278
|
}
|
|
278
279
|
) }),
|
|
279
|
-
/* @__PURE__ */ e(
|
|
280
|
-
/* @__PURE__ */ e(
|
|
281
|
-
/* @__PURE__ */ l(
|
|
282
|
-
/* @__PURE__ */ e(
|
|
280
|
+
/* @__PURE__ */ e(Be, { className: "w-[280px] p-0", align: "start", children: /* @__PURE__ */ l(je, { children: [
|
|
281
|
+
/* @__PURE__ */ e(Pe, { placeholder: "Search users…", className: "h-8 text-[12px]" }),
|
|
282
|
+
/* @__PURE__ */ l(Oe, { children: [
|
|
283
|
+
/* @__PURE__ */ e(De, { className: "py-3 text-center text-[12px] text-muted-foreground", children: "No users found" }),
|
|
283
284
|
/* @__PURE__ */ e(Ue, { children: x.map((r) => /* @__PURE__ */ l(
|
|
284
|
-
|
|
285
|
+
ze,
|
|
285
286
|
{
|
|
286
|
-
value: `${
|
|
287
|
+
value: `${L(r)} ${r.email}`,
|
|
287
288
|
onSelect: () => {
|
|
288
289
|
o(t === r.id ? "" : r.id), f(!1);
|
|
289
290
|
},
|
|
@@ -308,7 +309,7 @@ function me({
|
|
|
308
309
|
)
|
|
309
310
|
}
|
|
310
311
|
),
|
|
311
|
-
|
|
312
|
+
L(r)
|
|
312
313
|
]
|
|
313
314
|
},
|
|
314
315
|
r.id
|
|
@@ -322,34 +323,34 @@ function he(t) {
|
|
|
322
323
|
const o = ((n = t.first_name) == null ? void 0 : n[0]) ?? "", x = ((f = t.last_name) == null ? void 0 : f[0]) ?? "";
|
|
323
324
|
return (`${o}${x}`.trim() || t.email[0] || "?").toUpperCase();
|
|
324
325
|
}
|
|
325
|
-
function
|
|
326
|
+
function Xe(t) {
|
|
326
327
|
return !t || t.length === 0 ? "All records" : t.map((o) => `${o.field} ${o.op} ${String(o.value ?? "")}`).join(", ");
|
|
327
328
|
}
|
|
328
|
-
function
|
|
329
|
+
function vt({
|
|
329
330
|
stateId: t,
|
|
330
331
|
stateName: o,
|
|
331
332
|
templateId: x,
|
|
332
|
-
collection:
|
|
333
|
+
collection: d
|
|
333
334
|
}) {
|
|
334
335
|
var re;
|
|
335
|
-
const n = fe(), f = we(), { data:
|
|
336
|
-
queryKey: ["collection-meta",
|
|
337
|
-
queryFn: () => n.request(G(`/collections/${
|
|
338
|
-
enabled: !!
|
|
339
|
-
}), r = ((re =
|
|
336
|
+
const n = fe(), f = we(), { data: c } = F({
|
|
337
|
+
queryKey: ["collection-meta", d],
|
|
338
|
+
queryFn: () => n.request(G(`/collections/${d}`)).then((a) => a.data),
|
|
339
|
+
enabled: !!d
|
|
340
|
+
}), r = ((re = c == null ? void 0 : c.fields) == null ? void 0 : re.filter((a) => !a.hidden)) ?? [], b = (c == null ? void 0 : c.relations) ?? [], g = ["pipeline-owner-groups", t], { data: v, isLoading: m } = F({
|
|
340
341
|
queryKey: g,
|
|
341
342
|
queryFn: () => n.request(G(`/pipelines/states/${t}/owner-groups`)).then((a) => a.data)
|
|
342
343
|
}), { data: s } = F({
|
|
343
344
|
queryKey: ["users", "picker"],
|
|
344
345
|
queryFn: () => n.request(G("/users", { limit: 200 })).then((a) => a.data)
|
|
345
|
-
}), N = () => f.invalidateQueries({ queryKey: g }), [
|
|
346
|
+
}), N = () => f.invalidateQueries({ queryKey: g }), [E, j] = h(null), [_, u] = h(""), [P, X] = h(!1), [z, O] = h([]), [A, D] = h(""), [ve, H] = h(!1), [J, Z] = h(""), [ee, te] = h(!1), [R, U] = h([]), [B, ae] = h(""), be = (a) => {
|
|
346
347
|
j(a.id), u(a.name ?? ""), X(a.is_default), O(
|
|
347
348
|
(a.filters ?? []).map((p) => ({ field: p.field, op: p.op, value: String(p.value ?? "") }))
|
|
348
|
-
),
|
|
349
|
-
},
|
|
350
|
-
j(null),
|
|
349
|
+
), D("");
|
|
350
|
+
}, K = () => {
|
|
351
|
+
j(null), D("");
|
|
351
352
|
}, le = () => {
|
|
352
|
-
Z(""), te(!1),
|
|
353
|
+
Z(""), te(!1), U([]), ae(""), H(!1);
|
|
353
354
|
}, se = (a) => a.filter((p) => p.field.trim()).map((p) => ({ field: p.field.trim(), op: p.op, value: p.value })), T = I({
|
|
354
355
|
mutationFn: async () => {
|
|
355
356
|
const a = se(R), p = await n.request(
|
|
@@ -359,8 +360,8 @@ function xt({
|
|
|
359
360
|
filters: a.length > 0 ? a : void 0
|
|
360
361
|
})
|
|
361
362
|
).then((y) => y.data);
|
|
362
|
-
|
|
363
|
-
W(`/pipelines/owner-groups/${p.id}/users`, { user:
|
|
363
|
+
B && await n.request(
|
|
364
|
+
W(`/pipelines/owner-groups/${p.id}/users`, { user: B })
|
|
364
365
|
);
|
|
365
366
|
},
|
|
366
367
|
onSuccess: () => {
|
|
@@ -382,13 +383,13 @@ function xt({
|
|
|
382
383
|
}), ge = I({
|
|
383
384
|
mutationFn: (a) => n.request(oe(`/pipelines/owner-groups/${a}`)),
|
|
384
385
|
onSuccess: () => {
|
|
385
|
-
N(),
|
|
386
|
+
N(), K(), w.success("Group deleted");
|
|
386
387
|
},
|
|
387
388
|
onError: () => w.error("Failed to delete group")
|
|
388
389
|
}), ne = I({
|
|
389
390
|
mutationFn: ({ groupId: a, user: p }) => n.request(W(`/pipelines/owner-groups/${a}/users`, { user: p })),
|
|
390
391
|
onSuccess: () => {
|
|
391
|
-
N(),
|
|
392
|
+
N(), D("");
|
|
392
393
|
},
|
|
393
394
|
onError: () => w.error("Failed to add user")
|
|
394
395
|
}), Ne = I({
|
|
@@ -399,7 +400,7 @@ function xt({
|
|
|
399
400
|
return /* @__PURE__ */ l("div", { className: "space-y-3", children: [
|
|
400
401
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("span", { className: "text-[12px] font-medium text-slate-600", children: "Owner Groups" }) }),
|
|
401
402
|
m ? /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-400", children: "Loading groups…" }) : !v || v.length === 0 ? /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-400", children: "No owner groups configured — any authenticated user can act as owner for skip evaluation." }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: v.map((a, p) => {
|
|
402
|
-
const y =
|
|
403
|
+
const y = E === a.id;
|
|
403
404
|
return /* @__PURE__ */ l("div", { className: "rounded-lg border border-slate-200 bg-white", children: [
|
|
404
405
|
/* @__PURE__ */ l("div", { className: "group flex items-start gap-3 px-3 py-2.5", children: [
|
|
405
406
|
/* @__PURE__ */ l("div", { className: "min-w-0 flex-1 space-y-1.5", children: [
|
|
@@ -407,28 +408,28 @@ function xt({
|
|
|
407
408
|
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800", children: a.name || `Group ${p + 1}` }),
|
|
408
409
|
a.is_default && /* @__PURE__ */ e("span", { className: "rounded-full bg-nvr-cyan/10 px-1.5 py-0.5 text-[10px] font-medium text-nvr-cyan", children: "default" })
|
|
409
410
|
] }),
|
|
410
|
-
/* @__PURE__ */ e("p", { className: "font-mono text-[11px] text-slate-400", children:
|
|
411
|
+
/* @__PURE__ */ e("p", { className: "font-mono text-[11px] text-slate-400", children: Xe(a.filters) }),
|
|
411
412
|
/* @__PURE__ */ e(
|
|
412
|
-
|
|
413
|
+
Le,
|
|
413
414
|
{
|
|
414
415
|
kind: "owner-group",
|
|
415
416
|
sentences: _e(
|
|
416
417
|
a,
|
|
417
418
|
{ stateLabel: o },
|
|
418
|
-
$e(r, b,
|
|
419
|
+
$e(r, b, d)
|
|
419
420
|
)
|
|
420
421
|
}
|
|
421
422
|
),
|
|
422
423
|
a.users.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 flex-wrap pt-0.5", children: a.users.map((i) => /* @__PURE__ */ e(
|
|
423
|
-
|
|
424
|
+
de,
|
|
424
425
|
{
|
|
425
426
|
userId: i.user,
|
|
426
427
|
className: "h-7 w-7",
|
|
427
|
-
alt:
|
|
428
|
+
alt: L(i),
|
|
428
429
|
fallback: /* @__PURE__ */ e(
|
|
429
430
|
"span",
|
|
430
431
|
{
|
|
431
|
-
title:
|
|
432
|
+
title: L(i),
|
|
432
433
|
className: "flex h-7 w-7 items-center justify-center rounded-full bg-nvr-cyan/10 text-[11px] font-medium text-nvr-cyan",
|
|
433
434
|
children: he(i)
|
|
434
435
|
}
|
|
@@ -437,26 +438,26 @@ function xt({
|
|
|
437
438
|
i.link_id
|
|
438
439
|
)) })
|
|
439
440
|
] }),
|
|
440
|
-
/* @__PURE__ */ l("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0", children: [
|
|
441
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 [&:has([data-armed])]:opacity-100 transition-opacity shrink-0", children: [
|
|
441
442
|
/* @__PURE__ */ e(
|
|
442
443
|
"button",
|
|
443
444
|
{
|
|
444
445
|
type: "button",
|
|
445
|
-
onClick: () => y ?
|
|
446
|
+
onClick: () => y ? K() : be(a),
|
|
446
447
|
className: "rounded p-1 text-slate-400 hover:text-slate-700",
|
|
447
448
|
title: "Edit group",
|
|
448
449
|
children: /* @__PURE__ */ e(ke, { className: "h-3.5 w-3.5" })
|
|
449
450
|
}
|
|
450
451
|
),
|
|
451
452
|
/* @__PURE__ */ e(
|
|
452
|
-
|
|
453
|
+
Ee,
|
|
453
454
|
{
|
|
454
|
-
|
|
455
|
-
onClick: () => {
|
|
456
|
-
confirm(`Delete group "${a.name || `Group ${p + 1}`}"?`) && ge.mutate(a.id);
|
|
457
|
-
},
|
|
458
|
-
className: "rounded p-1 text-slate-400 hover:text-red-500",
|
|
455
|
+
onConfirm: () => ge.mutate(a.id),
|
|
459
456
|
title: "Delete group",
|
|
457
|
+
confirmLabel: "Delete?",
|
|
458
|
+
confirmTitle: `Delete group "${a.name || `Group ${p + 1}`}"?`,
|
|
459
|
+
className: "rounded p-1 text-slate-400 hover:text-red-500",
|
|
460
|
+
armedClassName: "rounded bg-red-50 px-1.5 text-[11px] font-semibold text-red-700 hover:text-red-700 dark:bg-red-500/10 dark:text-red-400",
|
|
460
461
|
children: /* @__PURE__ */ e(xe, { className: "h-3.5 w-3.5" })
|
|
461
462
|
}
|
|
462
463
|
)
|
|
@@ -512,7 +513,7 @@ function xt({
|
|
|
512
513
|
row: i,
|
|
513
514
|
fields: r,
|
|
514
515
|
relations: b,
|
|
515
|
-
collection:
|
|
516
|
+
collection: d ?? "",
|
|
516
517
|
onChange: ($) => O((ie) => ie.map((Q, ye) => ye === q ? $ : Q)),
|
|
517
518
|
onRemove: () => O(($) => $.filter((ie, Q) => Q !== q))
|
|
518
519
|
},
|
|
@@ -527,14 +528,14 @@ function xt({
|
|
|
527
528
|
className: "flex items-center gap-2 rounded-md border border-slate-200 bg-white px-2 py-1.5",
|
|
528
529
|
children: [
|
|
529
530
|
/* @__PURE__ */ e(
|
|
530
|
-
|
|
531
|
+
de,
|
|
531
532
|
{
|
|
532
533
|
userId: i.user,
|
|
533
534
|
className: "h-6 w-6",
|
|
534
535
|
fallback: /* @__PURE__ */ e("span", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-nvr-cyan/10 text-[10px] font-medium text-nvr-cyan", children: he(i) })
|
|
535
536
|
}
|
|
536
537
|
),
|
|
537
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[12px] text-slate-700", children:
|
|
538
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[12px] text-slate-700", children: Ye(i) }),
|
|
538
539
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: i.email }),
|
|
539
540
|
/* @__PURE__ */ e(
|
|
540
541
|
"button",
|
|
@@ -555,7 +556,7 @@ function xt({
|
|
|
555
556
|
me,
|
|
556
557
|
{
|
|
557
558
|
value: A,
|
|
558
|
-
onChange:
|
|
559
|
+
onChange: D,
|
|
559
560
|
users: s ?? [],
|
|
560
561
|
placeholder: "Add a user…"
|
|
561
562
|
}
|
|
@@ -585,7 +586,7 @@ function xt({
|
|
|
585
586
|
size: "sm",
|
|
586
587
|
variant: "ghost",
|
|
587
588
|
className: "text-[12px]",
|
|
588
|
-
onClick:
|
|
589
|
+
onClick: K,
|
|
589
590
|
children: "Cancel"
|
|
590
591
|
}
|
|
591
592
|
),
|
|
@@ -640,7 +641,7 @@ function xt({
|
|
|
640
641
|
size: "sm",
|
|
641
642
|
variant: "ghost",
|
|
642
643
|
className: "h-6 gap-1 text-[11px]",
|
|
643
|
-
onClick: () =>
|
|
644
|
+
onClick: () => U((a) => [...a, { field: "", op: "eq", value: "" }]),
|
|
644
645
|
children: [
|
|
645
646
|
/* @__PURE__ */ e(V, { className: "h-3 w-3" }),
|
|
646
647
|
"Add Filter"
|
|
@@ -655,9 +656,9 @@ function xt({
|
|
|
655
656
|
row: a,
|
|
656
657
|
fields: r,
|
|
657
658
|
relations: b,
|
|
658
|
-
collection:
|
|
659
|
-
onChange: (y) =>
|
|
660
|
-
onRemove: () =>
|
|
659
|
+
collection: d ?? "",
|
|
660
|
+
onChange: (y) => U((i) => i.map((q, $) => $ === p ? y : q)),
|
|
661
|
+
onRemove: () => U((y) => y.filter((i, q) => q !== p))
|
|
661
662
|
},
|
|
662
663
|
p
|
|
663
664
|
))
|
|
@@ -667,7 +668,7 @@ function xt({
|
|
|
667
668
|
/* @__PURE__ */ e(
|
|
668
669
|
me,
|
|
669
670
|
{
|
|
670
|
-
value:
|
|
671
|
+
value: B,
|
|
671
672
|
onChange: ae,
|
|
672
673
|
users: s ?? [],
|
|
673
674
|
placeholder: "Select a user…"
|
|
@@ -715,5 +716,5 @@ function xt({
|
|
|
715
716
|
] });
|
|
716
717
|
}
|
|
717
718
|
export {
|
|
718
|
-
|
|
719
|
+
vt as PipelineStateOwners
|
|
719
720
|
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const v = /^\/(settings|roles|pinned|users|tasks|custom-actions|field-rules|notification-subscriptions|my-jobs|announcements\/active|notifications\/unread-count|session-recordings\/enabled|help-videos\/for|presence\/online|chaos\/(armed|status|gamedays\/active)|chat\/(rooms|room-types)|collection-layouts(\/active|\/why|\/summary\/[^/]+|\/\d+)?|field-config\/[^/]+|field-defaults\/mine|data-model\/(relations\/for\/[^/]+|resolve-cascade)|bulk-actions\/available|ai-settings\/[^/]+|item-actions\/registered|revisions(\/latest|\/field-touch|\/o2m-cell-provenance)?|comments(\/counts|\/machine-markers)?|(last-touch|drafts|addendums|erp-submissions|access-explain)\/[^/]+\/[^/]+|config-conformance\/record\/[^/]+\/[^/]+|integration-obligations\/record\/[^/]+\/[^/]+|record-views\/[^/]+\/[^/]+\/viewers|sla\/status\/[^/]+\/[^/]+|legal-holds\/check\/[^/]+\/[^/]+|layout-collab\/\d+\/whats-new|pipelines\/instances\/[^/]+|widgets-internal\/\d+|items\/[^/]+(\/[^/]+)?\/resolve-paths)$/, y = 20, T = 10;
|
|
2
|
+
function p(i) {
|
|
3
|
+
return v.test(i);
|
|
4
|
+
}
|
|
5
|
+
let f = null;
|
|
6
|
+
function b(i) {
|
|
7
|
+
f = i;
|
|
8
|
+
}
|
|
9
|
+
function _() {
|
|
10
|
+
return f;
|
|
11
|
+
}
|
|
12
|
+
function g(i) {
|
|
13
|
+
let u = !0, l = [], d;
|
|
14
|
+
const r = (t) => t.read.alone().then(t.resolve, t.reject), m = async (t) => {
|
|
15
|
+
if (t.length === 1 || !u) {
|
|
16
|
+
for (const e of t) r(e);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
let s;
|
|
20
|
+
try {
|
|
21
|
+
s = await i.post(t.map((e, n) => ({ key: String(n), path: e.path })));
|
|
22
|
+
} catch (e) {
|
|
23
|
+
const n = e == null ? void 0 : e.status;
|
|
24
|
+
if ((n === 404 || n === 405) && (u = !1), typeof n == "number" && n >= 400 && n < 500 && n !== 429) {
|
|
25
|
+
for (const o of t) r(o);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
for (const o of t) o.reject(e);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const c = Array.isArray(s == null ? void 0 : s.results) ? s.results : null;
|
|
32
|
+
if (!c) {
|
|
33
|
+
for (const e of t) r(e);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
t.forEach((e, n) => {
|
|
37
|
+
const o = c[n], a = o == null ? void 0 : o.status;
|
|
38
|
+
if (!o || o.key !== String(n) || typeof a != "number" || !("body" in o)) {
|
|
39
|
+
r(e);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
a >= 200 && a < 300 ? e.resolve(o.body) : a >= 400 ? e.reject(e.read.error({ ...o, status: a })) : r(e);
|
|
43
|
+
});
|
|
44
|
+
}, h = () => {
|
|
45
|
+
d = void 0;
|
|
46
|
+
const t = l;
|
|
47
|
+
l = [];
|
|
48
|
+
for (let s = 0; s < t.length; s += 20)
|
|
49
|
+
m(t.slice(s, s + 20));
|
|
50
|
+
};
|
|
51
|
+
return (t, s) => new Promise((c, e) => {
|
|
52
|
+
l.push({
|
|
53
|
+
path: t,
|
|
54
|
+
read: s,
|
|
55
|
+
resolve: c,
|
|
56
|
+
reject: e
|
|
57
|
+
}), d === void 0 && (d = setTimeout(h, 10));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
v as BATCHABLE_GET,
|
|
62
|
+
y as BATCH_GET_LIMIT,
|
|
63
|
+
T as BATCH_GET_WINDOW_MS,
|
|
64
|
+
g as createGetBatcher,
|
|
65
|
+
p as isBatchableGetPath,
|
|
66
|
+
b as shareGetLoader,
|
|
67
|
+
_ as sharedGetLoader
|
|
68
|
+
};
|