@nivaro/react 0.3.111 → 0.3.112
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 +170 -2
- package/dist/index.js +745 -728
- package/dist/shared/components/CollectionBrowserView.js +3097 -2972
- package/dist/shared/components/CollectionImportBanner.js +135 -0
- package/dist/shared/components/ItemEditForm.js +2235 -2218
- package/dist/shared/components/JobsTray.js +54 -47
- package/dist/shared/components/ViewAsPersonButton.js +109 -0
- package/dist/shared/components/bulk/BulkFieldUpdate.js +228 -150
- package/dist/shared/components/bulk/BulkFieldUpdateButton.js +35 -41
- package/dist/shared/components/bulk/BulkLinksValue.js +91 -0
- package/dist/shared/components/bulk/bulk-field-options.js +20 -19
- package/dist/shared/components/bulk/bulk-update-preview.js +39 -0
- package/dist/shared/components/cbv/ColumnHeaderMenu.js +113 -0
- package/dist/shared/components/cbv/column-totals.js +66 -0
- package/dist/shared/components/collections-directory/CollectionHoverCard.js +108 -81
- package/dist/shared/components/collections-directory/CollectionRow.js +164 -148
- package/dist/shared/components/collections-directory/CollectionsDirectory.js +167 -166
- package/dist/shared/components/collections-directory/directory-data.js +70 -58
- package/dist/shared/components/imports/CollectionImportPanel.js +120 -118
- package/dist/shared/components/imports/DefinitionsPanel.js +24 -24
- package/dist/shared/components/imports/ImportDuplicatesNotice.js +65 -0
- package/dist/shared/components/item-edit/CatalogPickerField.js +631 -639
- package/dist/shared/components/item-edit/DuplicateNotice.js +168 -0
- package/dist/shared/components/item-edit/FieldRow.js +248 -246
- package/dist/shared/components/item-edit/InlineGridField.js +34 -33
- package/dist/shared/components/item-edit/InlineTableField.js +3064 -2882
- package/dist/shared/components/item-edit/MembershipSetField.js +165 -169
- package/dist/shared/components/item-edit/NestedRelationEditor.js +184 -189
- package/dist/shared/components/item-edit/PlanGrid.js +2 -1
- package/dist/shared/components/item-edit/QuickPickerDialog.js +35 -34
- package/dist/shared/components/item-edit/RecordLiveSync.js +32 -30
- package/dist/shared/components/item-edit/RelationCombobox.js +101 -100
- package/dist/shared/components/item-edit/RowHistorySheet.js +28 -27
- package/dist/shared/components/item-edit/SummaryPanel.js +133 -135
- package/dist/shared/components/item-edit/ViewAsRole.js +129 -52
- package/dist/shared/components/item-edit/grid-search.js +345 -0
- package/dist/shared/components/item-edit/render-stability.js +61 -54
- package/dist/shared/components/notifications/NotificationRulesEditor.js +25 -20
- package/dist/shared/components/ops-report/DigestSections.js +163 -144
- package/dist/shared/components/ops-report/drill.js +97 -97
- package/dist/shared/components/panels/AddendumLinesDiff.js +52 -51
- package/dist/shared/components/panels/AddendumPanel.js +92 -91
- package/dist/shared/components/panels/AsyncUserPicker.js +108 -0
- package/dist/shared/components/panels/CommentPanel.js +265 -252
- package/dist/shared/components/panels/OwnersSlot.js +47 -35
- package/dist/shared/components/panels/PipelineInsight.js +186 -0
- package/dist/shared/components/panels/PipelinePanel.js +1529 -1492
- package/dist/shared/components/panels/RecordIntegrityBanner.js +39 -38
- package/dist/shared/components/panels/RevisionsPanel.js +261 -260
- package/dist/shared/components/pipeline/FieldPicker.js +41 -40
- package/dist/shared/components/pipeline/OwnerMatrix.js +829 -700
- package/dist/shared/components/pipeline/OwnerRecordTrial.js +362 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -467
- package/dist/shared/components/pipeline/PipelineStateOwners.js +65 -64
- package/dist/shared/components/pipeline/owner-matrix-draft.js +178 -0
- package/dist/shared/components/profile/MyDefaultsCard.js +36 -35
- package/dist/shared/components/profile/PersonHeader.js +29 -29
- package/dist/shared/components/profile/PersonProfile.js +30 -28
- package/dist/shared/components/profile/SlowScreensCard.js +286 -0
- package/dist/shared/components/queue/QueueWorklist.js +1090 -1071
- package/dist/shared/components/quick-filters/useQuickFilterEditing.js +45 -44
- package/dist/shared/components/support/TicketDetailSheet.js +25 -16
- package/dist/shared/components/support/TicketSlowScreens.js +32 -0
- package/dist/shared/lib/activity-sentence.js +224 -178
- package/dist/shared/lib/collection-import-banner.js +27 -0
- package/dist/shared/lib/crash-report.js +112 -0
- package/dist/shared/lib/export-runs.js +99 -0
- package/dist/shared/lib/jobs-tray.js +89 -67
- package/dist/shared/lib/list-link.js +76 -69
- package/dist/shared/lib/nav-trail.js +180 -76
- package/dist/shared/lib/query-keys.js +26 -0
- package/dist/shared/lib/view-as.js +16 -11
- package/package.json +1 -1
|
@@ -12,8 +12,8 @@ import { SimpleSelect as j } from "../ui/SimpleSelect.js";
|
|
|
12
12
|
import { Switch as ee } from "../ui/switch.js";
|
|
13
13
|
import { Textarea as ae } from "../ui/textarea.js";
|
|
14
14
|
import { IMPORT_HEALTH_KEY as he, ImportStalenessChip as be, ImportStalenessControl as ve } from "./ImportStalenessControl.js";
|
|
15
|
-
import { StagingColumnsBuilder as xe, ValidationBuilder as
|
|
16
|
-
import { ServiceConfigBuilder as
|
|
15
|
+
import { StagingColumnsBuilder as xe, ValidationBuilder as ye } from "./SchemaValidationBuilders.js";
|
|
16
|
+
import { ServiceConfigBuilder as fe } from "./ServiceConfigBuilder.js";
|
|
17
17
|
import { definitionTitle as F } from "./types.js";
|
|
18
18
|
const h = "__new__", ke = (e) => {
|
|
19
19
|
if (!e) return [];
|
|
@@ -72,18 +72,18 @@ function _e({
|
|
|
72
72
|
onChange: c
|
|
73
73
|
}) {
|
|
74
74
|
var w;
|
|
75
|
-
const u = Q(),
|
|
75
|
+
const u = Q(), f = z({
|
|
76
76
|
queryKey: ["flows", "post-run-picker"],
|
|
77
77
|
queryFn: () => u.request(O("/flows")),
|
|
78
78
|
staleTime: 6e4
|
|
79
|
-
}), k = ((w =
|
|
79
|
+
}), k = ((w = f.data) == null ? void 0 : w.data) ?? [], x = new Map(k.map((t) => [String(t.id).toUpperCase(), t])), l = e.map(
|
|
80
80
|
(t) => x.get(t) ?? {
|
|
81
81
|
id: t,
|
|
82
82
|
name: `Unknown flow ${t.slice(0, 8)}…`,
|
|
83
83
|
status: "missing",
|
|
84
84
|
trigger: ""
|
|
85
85
|
}
|
|
86
|
-
), v = k.filter((t) => !e.includes(String(t.id).toUpperCase())),
|
|
86
|
+
), v = k.filter((t) => !e.includes(String(t.id).toUpperCase())), y = (t, i) => {
|
|
87
87
|
const m = [...e], b = t + i;
|
|
88
88
|
b < 0 || b >= m.length || ([m[t], m[b]] = [m[b], m[t]], c(m));
|
|
89
89
|
};
|
|
@@ -106,7 +106,7 @@ function _e({
|
|
|
106
106
|
variant: "ghost",
|
|
107
107
|
size: "sm",
|
|
108
108
|
className: "h-6 px-1.5",
|
|
109
|
-
onClick: () =>
|
|
109
|
+
onClick: () => y(i, -1),
|
|
110
110
|
disabled: i === 0,
|
|
111
111
|
children: "↑"
|
|
112
112
|
}
|
|
@@ -118,7 +118,7 @@ function _e({
|
|
|
118
118
|
variant: "ghost",
|
|
119
119
|
size: "sm",
|
|
120
120
|
className: "h-6 px-1.5",
|
|
121
|
-
onClick: () =>
|
|
121
|
+
onClick: () => y(i, 1),
|
|
122
122
|
disabled: i === l.length - 1,
|
|
123
123
|
children: "↓"
|
|
124
124
|
}
|
|
@@ -146,7 +146,7 @@ function _e({
|
|
|
146
146
|
t && c([...e, String(t).toUpperCase()]);
|
|
147
147
|
},
|
|
148
148
|
options: [
|
|
149
|
-
{ value: "", label:
|
|
149
|
+
{ value: "", label: f.isLoading ? "Loading flows…" : "+ Add a flow…" },
|
|
150
150
|
...v.map((t) => ({
|
|
151
151
|
value: t.id,
|
|
152
152
|
label: `${t.name}${t.status !== "active" ? " (inactive)" : ""} · ${t.trigger}`
|
|
@@ -170,15 +170,15 @@ function je({
|
|
|
170
170
|
definitions: e,
|
|
171
171
|
runCounts: c,
|
|
172
172
|
isLoading: u,
|
|
173
|
-
initialKey:
|
|
173
|
+
initialKey: f = null
|
|
174
174
|
}) {
|
|
175
175
|
var H, G;
|
|
176
|
-
const k = Q(), x = re(), [l, v] = C(null), [
|
|
176
|
+
const k = Q(), x = re(), [l, v] = C(null), [y, w] = C(""), [t, i] = C(te(null)), [m, b] = C(null), [P, A] = C(!1);
|
|
177
177
|
Y(() => {
|
|
178
|
-
if (P || !
|
|
179
|
-
const a = e.find((s) => s.key ===
|
|
178
|
+
if (P || !f || !e.length) return;
|
|
179
|
+
const a = e.find((s) => s.key === f);
|
|
180
180
|
a && v(a.id), A(!0);
|
|
181
|
-
}, [P,
|
|
181
|
+
}, [P, f, e]);
|
|
182
182
|
const o = ((H = z({
|
|
183
183
|
queryKey: ["staged-import-processors"],
|
|
184
184
|
queryFn: () => k.request(
|
|
@@ -197,11 +197,11 @@ function je({
|
|
|
197
197
|
));
|
|
198
198
|
}, [l]);
|
|
199
199
|
const M = ue(() => {
|
|
200
|
-
const a =
|
|
200
|
+
const a = y.trim().toLowerCase();
|
|
201
201
|
return a ? e.filter(
|
|
202
202
|
(s) => [s.key, s.label, s.staging_table, s.procedure].filter(Boolean).some((oe) => String(oe).toLowerCase().includes(a))
|
|
203
203
|
) : e;
|
|
204
|
-
}, [e,
|
|
204
|
+
}, [e, y]), q = L({
|
|
205
205
|
mutationFn: async () => {
|
|
206
206
|
const a = {
|
|
207
207
|
label: t.label.trim() || null,
|
|
@@ -253,7 +253,7 @@ function je({
|
|
|
253
253
|
/* @__PURE__ */ r(
|
|
254
254
|
_,
|
|
255
255
|
{
|
|
256
|
-
value:
|
|
256
|
+
value: y,
|
|
257
257
|
onChange: (a) => w(a.target.value),
|
|
258
258
|
placeholder: "Search…",
|
|
259
259
|
className: "h-7 pl-8 text-[12px]"
|
|
@@ -268,7 +268,7 @@ function je({
|
|
|
268
268
|
/* @__PURE__ */ n("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [
|
|
269
269
|
l === h && /* @__PURE__ */ r("div", { className: "border-b border-slate-100 bg-nvr-cyan/10 px-3 py-2 text-[12.5px] font-medium text-slate-900 dark:border-border/60 dark:bg-nvr-cyan/15 dark:text-foreground", children: "New import definition" }),
|
|
270
270
|
u && e.length === 0 && /* @__PURE__ */ r("p", { className: "px-3 py-6 text-center text-[12px] text-slate-400", children: "Loading…" }),
|
|
271
|
-
!u && M.length === 0 && /* @__PURE__ */ r("p", { className: "px-3 py-6 text-center text-[12px] text-slate-400", children:
|
|
271
|
+
!u && M.length === 0 && /* @__PURE__ */ r("p", { className: "px-3 py-6 text-center text-[12px] text-slate-400", children: y ? `No import matches “${y}”.` : "No imports are defined yet." }),
|
|
272
272
|
M.map((a) => {
|
|
273
273
|
const s = a.id === l;
|
|
274
274
|
return /* @__PURE__ */ n(
|
|
@@ -472,7 +472,7 @@ function je({
|
|
|
472
472
|
p,
|
|
473
473
|
{
|
|
474
474
|
label: "Recalculate rollups for",
|
|
475
|
-
hint: "Collections the procedure writes, comma separated. After each run the stored rollups those rows feed are recomputed (a procedure bypasses the hooks that normally do it).",
|
|
475
|
+
hint: "Collections the procedure writes, comma separated. After each run the stored rollups those rows feed are recomputed (a procedure bypasses the hooks that normally do it), and while a run is going their list and record pages say an import is running.",
|
|
476
476
|
children: /* @__PURE__ */ r(
|
|
477
477
|
_,
|
|
478
478
|
{
|
|
@@ -517,7 +517,7 @@ function je({
|
|
|
517
517
|
),
|
|
518
518
|
t.processor === "service" && /* @__PURE__ */ r("div", { className: "sm:col-span-2", children: /* @__PURE__ */ n(p, { label: "Service mapping", children: [
|
|
519
519
|
/* @__PURE__ */ r(
|
|
520
|
-
|
|
520
|
+
fe,
|
|
521
521
|
{
|
|
522
522
|
value: t.service_config,
|
|
523
523
|
onChange: (a) => i((s) => ({ ...s, service_config: a })),
|
|
@@ -585,10 +585,10 @@ function Ne({
|
|
|
585
585
|
definition: e,
|
|
586
586
|
draft: c,
|
|
587
587
|
setDraft: u,
|
|
588
|
-
stagingColsProblem:
|
|
588
|
+
stagingColsProblem: f,
|
|
589
589
|
validationProblem: k
|
|
590
590
|
}) {
|
|
591
|
-
const x = Q(), l = re(), [v,
|
|
591
|
+
const x = Q(), l = re(), [v, y] = C(
|
|
592
592
|
!!(e.procedure_body || e.validation || e.staging_columns)
|
|
593
593
|
), [w, t] = C(null), i = L({
|
|
594
594
|
mutationFn: () => x.request(
|
|
@@ -635,7 +635,7 @@ function Ne({
|
|
|
635
635
|
"button",
|
|
636
636
|
{
|
|
637
637
|
type: "button",
|
|
638
|
-
onClick: () =>
|
|
638
|
+
onClick: () => y((o) => !o),
|
|
639
639
|
className: "flex w-full items-center justify-between px-4 py-2.5 text-left",
|
|
640
640
|
children: [
|
|
641
641
|
/* @__PURE__ */ r("span", { className: "text-[12.5px] font-medium text-slate-700 dark:text-foreground", children: "Validation, schema & procedure" }),
|
|
@@ -657,7 +657,7 @@ function Ne({
|
|
|
657
657
|
onChange: (o) => u((g) => ({ ...g, staging_columns: o }))
|
|
658
658
|
}
|
|
659
659
|
),
|
|
660
|
-
|
|
660
|
+
f && /* @__PURE__ */ r(E, { children: f })
|
|
661
661
|
]
|
|
662
662
|
}
|
|
663
663
|
),
|
|
@@ -679,7 +679,7 @@ function Ne({
|
|
|
679
679
|
}
|
|
680
680
|
) }),
|
|
681
681
|
/* @__PURE__ */ r(
|
|
682
|
-
|
|
682
|
+
ye,
|
|
683
683
|
{
|
|
684
684
|
value: c.validation,
|
|
685
685
|
onChange: (o) => u((g) => ({ ...g, validation: o })),
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { CopyCheck as m } from "lucide-react";
|
|
3
|
+
import { formatNumber as o, cn as c } from "../../lib/utils.js";
|
|
4
|
+
const l = (e, a, i) => e === 1 ? a : i;
|
|
5
|
+
function d({ dup: e }) {
|
|
6
|
+
const a = e.exact_rows + e.close_rows + e.in_file_rows;
|
|
7
|
+
if (a === 0) return null;
|
|
8
|
+
const i = [
|
|
9
|
+
e.exact_rows > 0 && `${o(e.exact_rows)} ${l(e.exact_rows, "copies", "copy")} an existing record`,
|
|
10
|
+
e.close_rows > 0 && `${o(e.close_rows)} ${l(e.close_rows, "nearly copies", "nearly copy")} one`,
|
|
11
|
+
e.in_file_rows > 0 && `${o(e.in_file_rows)} ${l(e.in_file_rows, "repeats", "repeat")} an earlier row`
|
|
12
|
+
].filter(Boolean);
|
|
13
|
+
return /* @__PURE__ */ t(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
"data-import-duplicates": !0,
|
|
17
|
+
className: "rounded-md border border-amber-200 bg-amber-50 px-3 py-2 dark:border-amber-500/30 dark:bg-amber-500/10",
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ t("p", { className: "flex items-start gap-1.5 text-[12px] font-medium text-amber-800 dark:text-amber-300", children: [
|
|
20
|
+
/* @__PURE__ */ s(m, { className: "mt-[2px] h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
|
|
21
|
+
/* @__PURE__ */ t("span", { children: [
|
|
22
|
+
o(a),
|
|
23
|
+
" new ",
|
|
24
|
+
l(a, "row", "rows"),
|
|
25
|
+
" would create a duplicate",
|
|
26
|
+
" — ",
|
|
27
|
+
i.join(", ")
|
|
28
|
+
] })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ t("p", { className: "mt-0.5 pl-5 text-[11px] text-amber-700/90 dark:text-amber-300/80", children: [
|
|
31
|
+
"Compared on ",
|
|
32
|
+
e.fields.join(", "),
|
|
33
|
+
". To update the existing records instead, choose a match field; otherwise remove these rows from the file."
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ s("ul", { className: "mt-1 max-h-32 space-y-0.5 overflow-y-auto pl-5 text-[11.5px] text-amber-800 dark:text-amber-200", children: e.rows.map((r) => /* @__PURE__ */ t("li", { "data-import-duplicate-row": r.row, children: [
|
|
36
|
+
/* @__PURE__ */ t("span", { className: "text-amber-600/80 dark:text-amber-400/70", children: [
|
|
37
|
+
"Row ",
|
|
38
|
+
r.row,
|
|
39
|
+
":"
|
|
40
|
+
] }),
|
|
41
|
+
" ",
|
|
42
|
+
/* @__PURE__ */ s("span", { className: "font-medium", children: r.value }),
|
|
43
|
+
" ",
|
|
44
|
+
/* @__PURE__ */ s(
|
|
45
|
+
"span",
|
|
46
|
+
{
|
|
47
|
+
className: c(
|
|
48
|
+
r.match === "exact" ? "text-amber-800 dark:text-amber-200" : "text-amber-700/80 dark:text-amber-300/70"
|
|
49
|
+
),
|
|
50
|
+
children: r.first_row != null ? `repeats row ${r.first_row}` : r.match === "exact" ? "already exists" : `looks like “${r.existing_value ?? ""}”`
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] }, `${r.row}-${r.field}`)) }),
|
|
54
|
+
e.rows.length < e.exact_rows + e.close_rows + e.in_file_rows && /* @__PURE__ */ t("p", { className: "mt-0.5 pl-5 text-[11px] text-amber-700/80 dark:text-amber-300/70", children: [
|
|
55
|
+
"First ",
|
|
56
|
+
o(e.rows.length),
|
|
57
|
+
" shown."
|
|
58
|
+
] })
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
d as ImportDuplicatesNotice
|
|
65
|
+
};
|