@nivaro/react 0.3.57 → 0.3.58
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 +5 -1
- package/dist/shared/components/CollectionBrowserView.js +2633 -2590
- package/dist/shared/components/DataTable.js +247 -236
- package/dist/shared/components/ItemEditForm.js +1693 -1668
- package/dist/shared/components/ProfileView.js +716 -715
- package/dist/shared/components/RecordReadView.js +367 -364
- package/dist/shared/components/ReportView.js +64 -39
- package/dist/shared/components/alerts/AlertManagerView.js +284 -271
- 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/FieldRow.js +175 -173
- package/dist/shared/components/item-edit/InlineTableField.js +407 -402
- package/dist/shared/components/item-edit/M2MCombobox.js +313 -291
- package/dist/shared/components/item-edit/MidairCollisionDialog.js +1 -1
- package/dist/shared/components/item-edit/PlanGrid.js +826 -803
- package/dist/shared/components/item-edit/QuickCreateButton.js +115 -79
- package/dist/shared/components/item-edit/RecordLiveSync.js +77 -75
- package/dist/shared/components/item-edit/RelationCombobox.js +412 -328
- package/dist/shared/components/item-edit/RelationGroupedCombobox.js +147 -125
- package/dist/shared/components/item-edit/SummaryPanel.js +406 -392
- 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 +5 -5
- 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 +2 -3
- package/dist/shared/components/panels/PipelinePanel.js +1027 -978
- package/dist/shared/components/panels/RevisionsPanel.js +4 -1
- 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 +86 -78
- 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 +48 -48
- package/dist/shared/components/queue/QueueWorklist.js +357 -358
- package/dist/shared/components/queue/group-sums.js +27 -0
- package/dist/shared/components/widgets/ReviewListWidget.js +186 -168
- package/dist/shared/lib/back-closes.js +25 -0
- package/dist/shared/lib/form-usage-beacon.js +7 -7
- package/dist/shared/lib/list-page-memory.js +41 -0
- package/dist/shared/lib/live.js +44 -44
- package/dist/shared/lib/own-writes.js +76 -28
- package/dist/shared/lib/request-gate.js +110 -109
- package/dist/shared/lib/validation-rules.js +34 -19
- package/package.json +1 -1
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { titleCase as y } from "../../lib/utils.js";
|
|
2
|
-
function
|
|
1
|
+
import { titleCase as p, formatDateTime as y } from "../../lib/utils.js";
|
|
2
|
+
function w(e) {
|
|
3
|
+
return !/[\p{L}\p{N}]/u.test(e ?? "");
|
|
4
|
+
}
|
|
5
|
+
const E = "Unnamed record";
|
|
6
|
+
function k(e, o) {
|
|
3
7
|
const r = /* @__PURE__ */ new Map();
|
|
4
|
-
for (const
|
|
5
|
-
const
|
|
6
|
-
a ? a.push(String(
|
|
8
|
+
for (const i of e) {
|
|
9
|
+
const n = o(i).trim().toLowerCase(), a = r.get(n);
|
|
10
|
+
a ? a.push(String(i.id)) : r.set(n, [String(i.id)]);
|
|
7
11
|
}
|
|
8
|
-
return [...r.values()].filter((
|
|
12
|
+
return [...r.values()].filter((i) => i.length > 1).flat();
|
|
9
13
|
}
|
|
10
|
-
const
|
|
14
|
+
const S = /* @__PURE__ */ new Set([
|
|
11
15
|
"id",
|
|
12
16
|
"sort",
|
|
13
17
|
"date_created",
|
|
@@ -17,37 +21,45 @@ const b = /* @__PURE__ */ new Set([
|
|
|
17
21
|
"created_at",
|
|
18
22
|
"updated_at",
|
|
19
23
|
"created_by",
|
|
20
|
-
"updated_by"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
"updated_by",
|
|
25
|
+
"created",
|
|
26
|
+
"changed",
|
|
27
|
+
"modified"
|
|
28
|
+
]), b = /(^|_)(system_id|code|number|no|key|name|type|status)$/i, _ = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/;
|
|
29
|
+
function m(e) {
|
|
30
|
+
if (e == null || typeof e == "object") return null;
|
|
31
|
+
const o = String(e).trim();
|
|
32
|
+
return o === "" ? null : _.test(o) ? y(o) : o;
|
|
26
33
|
}
|
|
27
|
-
function
|
|
28
|
-
const r = /* @__PURE__ */ new Map(),
|
|
29
|
-
for (const
|
|
30
|
-
if (
|
|
31
|
-
const a = [...new Set(
|
|
32
|
-
(t) => !
|
|
34
|
+
function L(e, o = []) {
|
|
35
|
+
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set([...S, ...o]);
|
|
36
|
+
for (const n of e) {
|
|
37
|
+
if (n.length < 2) continue;
|
|
38
|
+
const a = [...new Set(n.flatMap((t) => Object.keys(t)))].filter(
|
|
39
|
+
(t) => !i.has(t) && !t.startsWith("_")
|
|
33
40
|
);
|
|
34
|
-
let
|
|
41
|
+
let s = null;
|
|
35
42
|
for (const t of a) {
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
const f =
|
|
41
|
-
(!
|
|
42
|
-
}
|
|
43
|
-
for (const t of s) {
|
|
44
|
-
const c = String(t.id);
|
|
45
|
-
r.set(c, e ? `${y(e.key)}: ${p(t[e.key])}` : `#${c}`);
|
|
43
|
+
const u = n.map((c) => m(c[t]));
|
|
44
|
+
if (u.some((c) => c === null)) continue;
|
|
45
|
+
const d = new Set(u).size;
|
|
46
|
+
if (d < 2) continue;
|
|
47
|
+
const f = b.test(t), l = n.some((c) => typeof c[t] == "string");
|
|
48
|
+
(!s || d > s.distinct || d === s.distinct && (f !== s.preferred ? f : l && !s.text)) && (s = { key: t, distinct: d, preferred: f, text: l });
|
|
46
49
|
}
|
|
50
|
+
n.forEach((t, u) => {
|
|
51
|
+
const d = String(t.id);
|
|
52
|
+
r.set(
|
|
53
|
+
d,
|
|
54
|
+
s ? `${p(s.key)}: ${m(t[s.key])}` : `Same name · ${u + 1} of ${n.length}`
|
|
55
|
+
);
|
|
56
|
+
});
|
|
47
57
|
}
|
|
48
58
|
return r;
|
|
49
59
|
}
|
|
50
60
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
E as NAMELESS_LABEL,
|
|
62
|
+
k as collidingIds,
|
|
63
|
+
L as disambiguators,
|
|
64
|
+
w as isNamelessLabel
|
|
53
65
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { describeError as d } from "../../lib/error-message.js";
|
|
3
|
+
import { cn as r } from "../../lib/utils.js";
|
|
4
|
+
function i(e) {
|
|
5
|
+
if (e == null)
|
|
6
|
+
return {
|
|
7
|
+
kind: "no-access",
|
|
8
|
+
text: "Not available to you",
|
|
9
|
+
tip: "Your access does not include this record."
|
|
10
|
+
};
|
|
11
|
+
const t = d(e).kind;
|
|
12
|
+
return t === "forbidden" || t === "signed-out" ? {
|
|
13
|
+
kind: "no-access",
|
|
14
|
+
text: "Not available to you",
|
|
15
|
+
tip: "Your access does not include this record."
|
|
16
|
+
} : t === "not-found" ? {
|
|
17
|
+
kind: "not-found",
|
|
18
|
+
text: "Record not found",
|
|
19
|
+
tip: "It may have been deleted, or it is outside what you can see."
|
|
20
|
+
} : {
|
|
21
|
+
kind: "failed",
|
|
22
|
+
text: "Couldn’t load",
|
|
23
|
+
tip: "The linked record didn’t load. Reload the page to try again."
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function u(e, t) {
|
|
27
|
+
return i(t).kind !== "failed" ? !1 : e < 2;
|
|
28
|
+
}
|
|
29
|
+
function c({ error: e, className: t }) {
|
|
30
|
+
const n = i(e);
|
|
31
|
+
return /* @__PURE__ */ o(
|
|
32
|
+
"span",
|
|
33
|
+
{
|
|
34
|
+
className: r("italic text-muted-foreground", t),
|
|
35
|
+
"data-related-unavailable": n.kind,
|
|
36
|
+
"data-tip": n.tip,
|
|
37
|
+
children: n.text
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
c as RelatedMissingLabel,
|
|
43
|
+
i as relatedMissing,
|
|
44
|
+
u as retryRelatedRead
|
|
45
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function
|
|
1
|
+
function i(e) {
|
|
2
2
|
return e.childFailed === !0 || e.reasonWaiting === !0;
|
|
3
3
|
}
|
|
4
4
|
function a(e, s) {
|
|
5
|
-
const { isNew: t } = s,
|
|
5
|
+
const { isNew: t } = s, r = s.noun.toLowerCase();
|
|
6
6
|
if (e.childFailed) {
|
|
7
7
|
const n = e.childErrors ?? [];
|
|
8
8
|
return n.length === 0 && e.linkProblems.length > 0 ? null : {
|
|
@@ -21,7 +21,7 @@ function a(e, s) {
|
|
|
21
21
|
const n = e.hidden.reason ? ` (${e.hidden.reason})` : "";
|
|
22
22
|
return {
|
|
23
23
|
kind: "warning",
|
|
24
|
-
text: t ? `The new ${
|
|
24
|
+
text: t ? `The new ${r} was created, but it’s outside what you can see${n}.` : `Saved, but this ${r} is now outside what you can see${n}.`,
|
|
25
25
|
duration: 15e3
|
|
26
26
|
};
|
|
27
27
|
}
|
|
@@ -29,7 +29,7 @@ function a(e, s) {
|
|
|
29
29
|
const n = e.lineConflicts;
|
|
30
30
|
return {
|
|
31
31
|
kind: "warning",
|
|
32
|
-
text: `Saved, except ${n} ${n === 1 ? "
|
|
32
|
+
text: `Saved, except ${n} ${n === 1 ? "row" : "rows"} someone else changed — pick which value wins`,
|
|
33
33
|
duration: 1e4
|
|
34
34
|
};
|
|
35
35
|
}
|
|
@@ -44,5 +44,5 @@ function a(e, s) {
|
|
|
44
44
|
}
|
|
45
45
|
export {
|
|
46
46
|
a as saveClosingMessage,
|
|
47
|
-
|
|
47
|
+
i as saveLeftWorkStaged
|
|
48
48
|
};
|