@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
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
function
|
|
1
|
+
import { noteTrailAddress as L } from "./nav-trail.js";
|
|
2
|
+
const u = "lv", m = "nvr:list-address", A = 1, v = 7e3;
|
|
3
|
+
function k(t) {
|
|
4
4
|
const e = new TextEncoder().encode(t);
|
|
5
5
|
let o = "";
|
|
6
6
|
for (const i of e) o += String.fromCharCode(i);
|
|
7
7
|
return btoa(o).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function S(t) {
|
|
10
10
|
try {
|
|
11
11
|
const e = t.replace(/-/g, "+").replace(/_/g, "/"), o = atob(e + "=".repeat((4 - e.length % 4) % 4)), i = Uint8Array.from(o, (r) => r.charCodeAt(0));
|
|
12
12
|
return new TextDecoder().decode(i);
|
|
@@ -14,38 +14,38 @@ function g(t) {
|
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function w(t) {
|
|
18
18
|
const e = {};
|
|
19
19
|
for (const [o, i] of Object.entries(t))
|
|
20
20
|
i == null || i === "" || Array.isArray(i) && i.length === 0 || typeof i == "object" && !Array.isArray(i) && Object.keys(i).length === 0 || (e[o] = i);
|
|
21
21
|
return e;
|
|
22
22
|
}
|
|
23
|
-
function A(t, e) {
|
|
24
|
-
return L(JSON.stringify({ v: 1, k: t, s: h(e) }));
|
|
25
|
-
}
|
|
26
23
|
function b(t, e) {
|
|
24
|
+
return k(JSON.stringify({ v: A, k: t, s: w(e) }));
|
|
25
|
+
}
|
|
26
|
+
function _(t, e) {
|
|
27
27
|
if (!t) return null;
|
|
28
|
-
const o =
|
|
28
|
+
const o = S(t);
|
|
29
29
|
if (!o) return null;
|
|
30
30
|
try {
|
|
31
31
|
const i = JSON.parse(o);
|
|
32
|
-
return (i == null ? void 0 : i.v) !==
|
|
32
|
+
return (i == null ? void 0 : i.v) !== A || i.k !== e || !i.s || typeof i.s != "object" || Array.isArray(i.s) ? null : i.s;
|
|
33
33
|
} catch {
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function $(t, e, o) {
|
|
38
38
|
const i = new URL(t);
|
|
39
|
-
return i.searchParams.set(
|
|
39
|
+
return i.searchParams.set(u, b(e, o)), i.toString();
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return typeof window > "u" ? null :
|
|
41
|
+
function N(t) {
|
|
42
|
+
return typeof window > "u" ? null : _(new URLSearchParams(window.location.search).get(u), t);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function j() {
|
|
45
45
|
if (typeof window > "u") return;
|
|
46
46
|
const t = new URLSearchParams(window.location.search);
|
|
47
|
-
if (!t.has(
|
|
48
|
-
t.delete(
|
|
47
|
+
if (!t.has(u)) return;
|
|
48
|
+
t.delete(u);
|
|
49
49
|
const e = t.toString();
|
|
50
50
|
window.history.replaceState(
|
|
51
51
|
window.history.state,
|
|
@@ -53,40 +53,42 @@ function N() {
|
|
|
53
53
|
`${window.location.pathname}${e ? `?${e}` : ""}${window.location.hash}`
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function I(t, e) {
|
|
57
57
|
if (typeof window > "u" || !window.history) return;
|
|
58
|
-
const o = new URLSearchParams(window.location.search), i = e ?
|
|
59
|
-
if ((o.get(
|
|
60
|
-
i ? o.set(
|
|
61
|
-
const r = o.toString()
|
|
58
|
+
const o = new URLSearchParams(window.location.search), i = e ? b(t, e) : null;
|
|
59
|
+
if ((o.get(u) ?? null) === i) return;
|
|
60
|
+
i ? o.set(u, i) : o.delete(u);
|
|
61
|
+
const r = o.toString(), l = `${window.location.pathname}${r ? `?${r}` : ""}${window.location.hash}`;
|
|
62
62
|
try {
|
|
63
|
-
window.history.replaceState(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
window.history.replaceState(window.history.state, "", l);
|
|
64
|
+
} catch {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
L(l);
|
|
68
|
+
try {
|
|
69
|
+
window.dispatchEvent(new CustomEvent(m, { detail: { path: l } }));
|
|
68
70
|
} catch {
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
|
-
async function
|
|
73
|
+
async function O(t, e) {
|
|
72
74
|
if (typeof window > "u") return "failed";
|
|
73
|
-
const o =
|
|
74
|
-
if (o.length >
|
|
75
|
+
const o = $(window.location.href, t, e);
|
|
76
|
+
if (o.length > v) return "too-long";
|
|
75
77
|
try {
|
|
76
78
|
return await navigator.clipboard.writeText(o), "copied";
|
|
77
79
|
} catch {
|
|
78
80
|
return "failed";
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
|
-
const
|
|
83
|
+
const a = (t) => !!t && typeof t == "object" && !Array.isArray(t), y = (t) => typeof t == "string" ? t : void 0, g = (t) => Array.isArray(t) ? t.filter((e) => typeof e == "string") : void 0, E = (t) => Array.isArray(t) ? t.filter((e) => typeof e == "string" || typeof e == "number") : [], d = (t, e) => {
|
|
82
84
|
const o = Number(t);
|
|
83
85
|
return Number.isInteger(o) && o > 0 ? Math.min(o, e) : void 0;
|
|
84
86
|
};
|
|
85
|
-
function
|
|
87
|
+
function R(t) {
|
|
86
88
|
if (!t) return null;
|
|
87
|
-
const e = {}, o =
|
|
89
|
+
const e = {}, o = y(t.q);
|
|
88
90
|
o && (e.q = o.slice(0, 500)), Array.isArray(t.f) && (e.f = t.f.filter(
|
|
89
|
-
(n) =>
|
|
91
|
+
(n) => a(n) && Array.isArray(n.path) && typeof n.op == "string"
|
|
90
92
|
).slice(0, 50).map((n, s) => ({
|
|
91
93
|
...n,
|
|
92
94
|
id: typeof n.id == "string" && n.id ? n.id : `lv-${s}`,
|
|
@@ -94,70 +96,75 @@ function w(t) {
|
|
|
94
96
|
fieldType: typeof n.fieldType == "string" ? n.fieldType : "string",
|
|
95
97
|
value: n.value ?? ""
|
|
96
98
|
})));
|
|
97
|
-
const i =
|
|
99
|
+
const i = y(t.s);
|
|
98
100
|
if (i && /^-?[\w.$]+$/.test(i) && (e.s = i), Array.isArray(t.c) && (e.c = t.c.filter(
|
|
99
|
-
(n) => typeof n == "string" ||
|
|
100
|
-
).slice(0, 100)),
|
|
101
|
+
(n) => typeof n == "string" || a(n) && typeof n.key == "string"
|
|
102
|
+
).slice(0, 100)), a(t.qf)) {
|
|
101
103
|
const n = {};
|
|
102
104
|
for (const [s, f] of Object.entries(t.qf)) {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
+
const h = E(f);
|
|
106
|
+
h.length && (n[s] = h.slice(0, 500));
|
|
105
107
|
}
|
|
106
108
|
e.qf = n;
|
|
107
109
|
}
|
|
108
|
-
if (
|
|
110
|
+
if (a(t.cf)) {
|
|
109
111
|
const n = {};
|
|
110
112
|
for (const [s, f] of Object.entries(t.cf))
|
|
111
|
-
|
|
113
|
+
a(f) && typeof f.kind == "string" && (n[s] = f);
|
|
112
114
|
e.cf = n;
|
|
113
115
|
}
|
|
114
116
|
Array.isArray(t.lc) && (e.lc = t.lc.filter(
|
|
115
|
-
(n) =>
|
|
116
|
-
).slice(0, 50)), Array.isArray(t.ex) && (e.ex = t.ex.filter((n) =>
|
|
117
|
-
const r =
|
|
117
|
+
(n) => a(n) && Array.isArray(n.path) && typeof n.op == "string"
|
|
118
|
+
).slice(0, 50)), Array.isArray(t.ex) && (e.ex = t.ex.filter((n) => a(n) && Array.isArray(n.path)).slice(0, 50));
|
|
119
|
+
const r = y(t.g);
|
|
118
120
|
r && /^[\w.$]+$/.test(r) && (e.g = r);
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
|
|
121
|
+
const l = d(t.ps, 200);
|
|
122
|
+
l && (e.ps = l);
|
|
123
|
+
const p = d(t.p, 1e5);
|
|
124
|
+
p && (e.p = p), t.a === !0 && (e.a = !0);
|
|
125
|
+
const c = d(t.v, Number.MAX_SAFE_INTEGER);
|
|
126
|
+
return c && (e.v = c), e;
|
|
123
127
|
}
|
|
124
|
-
function
|
|
128
|
+
function q(t) {
|
|
125
129
|
if (!t) return null;
|
|
126
130
|
const e = {};
|
|
127
|
-
if ((t.scope === "mine" || t.scope === "unowned" || t.scope === "all" || t.scope === "claimed") && (e.scope = t.scope),
|
|
131
|
+
if ((t.scope === "mine" || t.scope === "unowned" || t.scope === "all" || t.scope === "claimed") && (e.scope = t.scope), a(t.filters)) {
|
|
128
132
|
const c = {};
|
|
129
133
|
for (const [n, s] of Object.entries(t.filters))
|
|
130
134
|
if (typeof s == "string") c[n] = s.slice(0, 500);
|
|
131
135
|
else {
|
|
132
|
-
const f =
|
|
136
|
+
const f = g(s);
|
|
133
137
|
f != null && f.length && (c[n] = f.slice(0, 500));
|
|
134
138
|
}
|
|
135
139
|
e.filters = c;
|
|
136
140
|
}
|
|
137
|
-
const o =
|
|
141
|
+
const o = y(t.sort);
|
|
138
142
|
o && /^-?[\w.$]+$/.test(o) && (e.sort = o);
|
|
139
|
-
const i =
|
|
143
|
+
const i = y(t.group_by);
|
|
140
144
|
i && (e.group_by = i), (t.view === "table" || t.view === "kanban" || t.view === "workload") && (e.view = t.view);
|
|
141
|
-
const r =
|
|
142
|
-
if (r != null && r.length && (e.columns = r.slice(0, 100)),
|
|
145
|
+
const r = g(t.columns);
|
|
146
|
+
if (r != null && r.length && (e.columns = r.slice(0, 100)), a(t.pins)) {
|
|
143
147
|
const c = {};
|
|
144
148
|
for (const [n, s] of Object.entries(t.pins)) (s === "left" || s === "right") && (c[n] = s);
|
|
145
149
|
Object.keys(c).length && (e.pins = c);
|
|
146
150
|
}
|
|
147
|
-
const
|
|
148
|
-
|
|
151
|
+
const l = d(t.page, 1e5);
|
|
152
|
+
l && (e.page = l);
|
|
153
|
+
const p = d(t.view_id, Number.MAX_SAFE_INTEGER);
|
|
154
|
+
return p && (e.view_id = p), e;
|
|
149
155
|
}
|
|
150
156
|
export {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
m as LIST_ADDRESS_EVENT,
|
|
158
|
+
v as LIST_LINK_MAX_CHARS,
|
|
159
|
+
u as LIST_LINK_PARAM,
|
|
160
|
+
O as copyListLink,
|
|
161
|
+
_ as decodeListLink,
|
|
162
|
+
j as dropListLinkParam,
|
|
163
|
+
b as encodeListLink,
|
|
164
|
+
$ as listLinkUrl,
|
|
165
|
+
w as pruneListLinkState,
|
|
166
|
+
N as readListLinkFromLocation,
|
|
167
|
+
I as replaceListLinkParam,
|
|
168
|
+
R as sanitizeCbvLinkState,
|
|
169
|
+
q as sanitizeQueueLinkState
|
|
163
170
|
};
|
|
@@ -1,107 +1,211 @@
|
|
|
1
|
-
import { useSyncExternalStore as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
let
|
|
1
|
+
import { useSyncExternalStore as b } from "react";
|
|
2
|
+
const y = "nvr:nav-trail", m = 60, f = (n) => n.split(/[?#]/)[0] || "/";
|
|
3
|
+
function E(n, t) {
|
|
4
|
+
const e = t.at ?? Date.now(), i = Number.isFinite(t.idx) ? Math.max(0, Math.floor(t.idx)) : 0, l = n.entries.find((r) => r.idx === i);
|
|
5
|
+
let s;
|
|
6
6
|
if (t.action === "PUSH")
|
|
7
|
-
|
|
8
|
-
else if (
|
|
9
|
-
|
|
7
|
+
s = [...n.entries.filter((r) => r.idx < i), { key: t.key, idx: i, path: t.path, at: e }];
|
|
8
|
+
else if (l && l.key === t.key && l.path === t.path)
|
|
9
|
+
s = n.entries;
|
|
10
10
|
else {
|
|
11
|
-
const
|
|
11
|
+
const r = l && f(l.path) === f(t.path) ? l : null, o = t.action === "POP" && !!r, a = {
|
|
12
12
|
key: t.key,
|
|
13
|
-
idx:
|
|
13
|
+
idx: i,
|
|
14
14
|
path: t.path,
|
|
15
|
-
at:
|
|
16
|
-
...
|
|
17
|
-
...
|
|
15
|
+
at: e,
|
|
16
|
+
...r != null && r.label ? { label: r.label } : {},
|
|
17
|
+
...r != null && r.detail ? { detail: r.detail } : {},
|
|
18
|
+
...r != null && r.scroll && (t.action === "REPLACE" || o) ? { scroll: r.scroll } : {}
|
|
18
19
|
};
|
|
19
|
-
|
|
20
|
+
s = [...n.entries.filter((c) => c.idx !== i), a].sort((c, u) => c.idx - u.idx);
|
|
20
21
|
}
|
|
21
|
-
return
|
|
22
|
+
return s.length > m && (s = s.slice(s.length - m)), { entries: s, current: { key: t.key, idx: i } };
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function P(n) {
|
|
24
25
|
const t = n.current;
|
|
25
26
|
if (!t) return [];
|
|
26
|
-
const
|
|
27
|
-
for (let
|
|
28
|
-
const
|
|
29
|
-
if (!
|
|
30
|
-
|
|
27
|
+
const e = new Map(n.entries.map((l) => [l.idx, l])), i = [];
|
|
28
|
+
for (let l = t.idx - 1; l >= 0; l--) {
|
|
29
|
+
const s = e.get(l);
|
|
30
|
+
if (!s) break;
|
|
31
|
+
i.unshift(s);
|
|
31
32
|
}
|
|
32
|
-
return
|
|
33
|
+
return i;
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
-
var
|
|
36
|
-
const
|
|
37
|
-
for (let
|
|
38
|
-
const
|
|
39
|
-
if (!
|
|
35
|
+
function L(n, t, e = {}) {
|
|
36
|
+
var o;
|
|
37
|
+
const i = e.max ?? 4, l = f(t.path), s = /* @__PURE__ */ new Set([l]), r = [];
|
|
38
|
+
for (let a = n.length - 1; a >= 0 && r.length < i; a--) {
|
|
39
|
+
const c = n[a], u = f(c.path);
|
|
40
|
+
if (!s.has(u) && (s.add(u), r.unshift({
|
|
41
|
+
key: c.key,
|
|
42
|
+
path: c.path,
|
|
43
|
+
label: c.label,
|
|
44
|
+
...c.detail ? { detail: c.detail } : {},
|
|
45
|
+
delta: c.idx - t.idx
|
|
46
|
+
}), (o = e.isRoot) != null && o.call(e, u)))
|
|
40
47
|
break;
|
|
41
48
|
}
|
|
42
|
-
return
|
|
49
|
+
return r;
|
|
50
|
+
}
|
|
51
|
+
function M(n) {
|
|
52
|
+
const t = [], e = (n.view ?? "").trim();
|
|
53
|
+
e && t.push(e.length > 40 ? `${e.slice(0, 39)}…` : e);
|
|
54
|
+
const i = (n.search ?? "").trim();
|
|
55
|
+
i && t.push(`“${i.length > 24 ? `${i.slice(0, 23)}…` : i}”`);
|
|
56
|
+
const l = Math.max(0, Math.floor(n.filters ?? 0));
|
|
57
|
+
!e && l > 0 && t.push(`${l} filter${l === 1 ? "" : "s"}`);
|
|
58
|
+
const s = Math.floor(n.page ?? 1);
|
|
59
|
+
return s > 1 && t.push(`page ${s}`), t.join(" · ");
|
|
43
60
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
61
|
+
function O(n, t) {
|
|
62
|
+
const e = (t ?? "").trim();
|
|
63
|
+
return e ? `${n} · ${e}` : n;
|
|
64
|
+
}
|
|
65
|
+
const g = { entries: [], current: null };
|
|
66
|
+
let d = null;
|
|
67
|
+
const h = /* @__PURE__ */ new Set();
|
|
68
|
+
function p() {
|
|
69
|
+
if (d) return d;
|
|
49
70
|
try {
|
|
50
|
-
const n = typeof sessionStorage < "u" ? sessionStorage.getItem(
|
|
51
|
-
|
|
52
|
-
(
|
|
71
|
+
const n = typeof sessionStorage < "u" ? sessionStorage.getItem(y) : null, t = n ? JSON.parse(n) : null;
|
|
72
|
+
d = { entries: Array.isArray(t == null ? void 0 : t.entries) ? t.entries.filter(
|
|
73
|
+
(i) => !!i && typeof i.key == "string" && typeof i.path == "string" && Number.isFinite(i.idx)
|
|
53
74
|
) : [], current: (t == null ? void 0 : t.current) ?? null };
|
|
54
75
|
} catch {
|
|
55
|
-
|
|
76
|
+
d = g;
|
|
56
77
|
}
|
|
57
|
-
return
|
|
78
|
+
return d;
|
|
58
79
|
}
|
|
59
|
-
function
|
|
60
|
-
|
|
80
|
+
function S(n) {
|
|
81
|
+
d = n;
|
|
61
82
|
try {
|
|
62
|
-
sessionStorage.setItem(
|
|
83
|
+
sessionStorage.setItem(y, JSON.stringify(n));
|
|
63
84
|
} catch {
|
|
64
85
|
}
|
|
65
|
-
for (const t of
|
|
86
|
+
for (const t of h) t();
|
|
66
87
|
}
|
|
67
|
-
function
|
|
68
|
-
return
|
|
88
|
+
function w() {
|
|
89
|
+
return p();
|
|
69
90
|
}
|
|
70
|
-
function
|
|
71
|
-
const t =
|
|
72
|
-
return t !==
|
|
73
|
-
var
|
|
74
|
-
return
|
|
91
|
+
function $(n) {
|
|
92
|
+
const t = E(p(), n);
|
|
93
|
+
return t !== d && S(t), t.entries.find((e) => {
|
|
94
|
+
var i;
|
|
95
|
+
return e.idx === ((i = t.current) == null ? void 0 : i.idx);
|
|
75
96
|
});
|
|
76
97
|
}
|
|
77
|
-
function
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
if (!
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
98
|
+
function T(n, t) {
|
|
99
|
+
const e = p(), i = e.current, l = n ? i && i.key === n ? e.entries.findIndex((o) => o.idx === i.idx && o.key === n) : -1 : i ? e.entries.findIndex((o) => o.idx === i.idx && o.key === i.key) : -1;
|
|
100
|
+
if (l < 0) return;
|
|
101
|
+
const s = t(e.entries[l]);
|
|
102
|
+
if (!s) return;
|
|
103
|
+
const r = [...e.entries];
|
|
104
|
+
r[l] = s, S({ ...e, entries: r });
|
|
105
|
+
}
|
|
106
|
+
const x = (n) => T(void 0, n);
|
|
107
|
+
function I(n, t) {
|
|
108
|
+
const e = (n ?? "").trim().slice(0, 120);
|
|
109
|
+
e && T(t, (i) => i.label === e ? null : { ...i, label: e });
|
|
110
|
+
}
|
|
111
|
+
function D(n) {
|
|
112
|
+
const t = (n ?? "").trim().slice(0, 120);
|
|
113
|
+
x((e) => {
|
|
114
|
+
if ((e.detail ?? "") === t) return null;
|
|
115
|
+
const { detail: i, ...l } = e;
|
|
116
|
+
return t ? { ...l, detail: t } : l;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function F(n) {
|
|
120
|
+
n && x(
|
|
121
|
+
(t) => t.path === n || f(t.path) !== f(n) ? null : { ...t, path: n }
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
function R(n, t) {
|
|
125
|
+
var l, s;
|
|
126
|
+
const e = f(t.path);
|
|
127
|
+
if (t.action === "POP") {
|
|
128
|
+
const r = n.entries.find((o) => o.idx === t.idx);
|
|
129
|
+
return (l = r == null ? void 0 : r.scroll) != null && l.length && f(r.path) === e ? r.scroll : null;
|
|
130
|
+
}
|
|
131
|
+
if (t.action !== "PUSH" || !t.returning) return null;
|
|
132
|
+
let i = null;
|
|
133
|
+
for (const r of n.entries)
|
|
134
|
+
r.idx >= t.idx || f(r.path) !== e || !((s = r.scroll) != null && s.length) || (!i || r.idx > i.idx) && (i = r);
|
|
135
|
+
return (i == null ? void 0 : i.scroll) ?? null;
|
|
136
|
+
}
|
|
137
|
+
function C(n) {
|
|
138
|
+
const t = n.filter((e) => Number.isFinite(e.top) && e.top >= 0).slice(0, 4);
|
|
139
|
+
x(
|
|
140
|
+
(e) => JSON.stringify(e.scroll ?? []) === JSON.stringify(t) ? null : { ...e, scroll: t }
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
function N(n) {
|
|
144
|
+
return h.add(n), () => {
|
|
145
|
+
h.delete(n);
|
|
92
146
|
};
|
|
93
147
|
}
|
|
94
|
-
function
|
|
95
|
-
return
|
|
148
|
+
function H() {
|
|
149
|
+
return b(N, w, () => g);
|
|
150
|
+
}
|
|
151
|
+
function J(n, t) {
|
|
152
|
+
if (t === n) return "";
|
|
153
|
+
const e = [];
|
|
154
|
+
let i = t;
|
|
155
|
+
for (; i && i !== n; ) {
|
|
156
|
+
const l = i.parentElement;
|
|
157
|
+
if (!l) return null;
|
|
158
|
+
e.unshift(Array.prototype.indexOf.call(l.children, i)), i = l;
|
|
159
|
+
}
|
|
160
|
+
return i === n ? e.join(".") : null;
|
|
161
|
+
}
|
|
162
|
+
function k(n, t) {
|
|
163
|
+
if (t === "") return n;
|
|
164
|
+
let e = n;
|
|
165
|
+
for (const i of t.split(".")) {
|
|
166
|
+
const l = Number(i);
|
|
167
|
+
if (e = (e == null ? void 0 : e.children[l]) ?? null, !e) return null;
|
|
168
|
+
}
|
|
169
|
+
return e;
|
|
170
|
+
}
|
|
171
|
+
function _(n, t, e = 2e3) {
|
|
172
|
+
let i = !1;
|
|
173
|
+
const l = Date.now(), s = new Map(t.map((a) => [a.path, a.top])), r = () => {
|
|
174
|
+
i = !0, n.removeEventListener("wheel", r), n.removeEventListener("touchstart", r), n.removeEventListener("keydown", r);
|
|
175
|
+
};
|
|
176
|
+
n.addEventListener("wheel", r, { passive: !0 }), n.addEventListener("touchstart", r, { passive: !0 }), n.addEventListener("keydown", r);
|
|
177
|
+
const o = () => {
|
|
178
|
+
if (!i) {
|
|
179
|
+
for (const [a, c] of s) {
|
|
180
|
+
const u = k(n, a);
|
|
181
|
+
u && u.scrollHeight - u.clientHeight >= c - 1 && (u.scrollTop = c, s.delete(a));
|
|
182
|
+
}
|
|
183
|
+
if (s.size === 0 || Date.now() - l > e) {
|
|
184
|
+
r();
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
requestAnimationFrame(o);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
return requestAnimationFrame(o), r;
|
|
96
191
|
}
|
|
97
192
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
w as
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
193
|
+
y as NAV_TRAIL_KEY,
|
|
194
|
+
L as displayTrail,
|
|
195
|
+
k as elementAtScrollPath,
|
|
196
|
+
w as getNavTrail,
|
|
197
|
+
M as listTrailDetail,
|
|
198
|
+
F as noteTrailAddress,
|
|
199
|
+
$ as recordNavigation,
|
|
200
|
+
E as reduceTrail,
|
|
201
|
+
_ as restoreTrailScroll,
|
|
202
|
+
J as scrollPathOf,
|
|
203
|
+
R as scrollToRestore,
|
|
204
|
+
D as setTrailDetail,
|
|
205
|
+
I as setTrailLabel,
|
|
206
|
+
C as setTrailScroll,
|
|
207
|
+
N as subscribeNavTrail,
|
|
208
|
+
P as trailChain,
|
|
209
|
+
O as trailCrumbText,
|
|
210
|
+
H as useNavTrail
|
|
107
211
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { get as i } from "./commands.js";
|
|
2
|
+
function o(e, ...t) {
|
|
3
|
+
return [e, ...t];
|
|
4
|
+
}
|
|
5
|
+
const a = {
|
|
6
|
+
collectionMeta: (e) => o("collection-meta", e),
|
|
7
|
+
collectionRelations: (e) => o("collection-relations", e),
|
|
8
|
+
collectionDisplayMeta: (e) => o("collection-display-meta", e),
|
|
9
|
+
fieldConfig: (e, ...t) => o("field-config", e, ...t),
|
|
10
|
+
collections: () => o("collections")
|
|
11
|
+
};
|
|
12
|
+
function s(e, t) {
|
|
13
|
+
return e.request(i(`/collections/${t}`)).then((l) => l.data);
|
|
14
|
+
}
|
|
15
|
+
function f(e, t) {
|
|
16
|
+
return t ? e.request(i(`/collections/${t}`)).then((l) => {
|
|
17
|
+
var c;
|
|
18
|
+
const n = (c = l.data) == null ? void 0 : c.relations;
|
|
19
|
+
return Array.isArray(n) ? n : [];
|
|
20
|
+
}) : Promise.resolve([]);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
s as fetchCollectionMeta,
|
|
24
|
+
f as fetchCollectionRelations,
|
|
25
|
+
a as queryKeys
|
|
26
|
+
};
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
let
|
|
2
|
-
function
|
|
3
|
-
return
|
|
4
|
-
|
|
1
|
+
let t = null;
|
|
2
|
+
function e(n) {
|
|
3
|
+
return t = n, () => {
|
|
4
|
+
t === n && (t = null);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return
|
|
7
|
+
function r() {
|
|
8
|
+
return t !== null;
|
|
9
9
|
}
|
|
10
|
-
function u(
|
|
11
|
-
return
|
|
10
|
+
function u(n) {
|
|
11
|
+
return t == null ? void 0 : t(n);
|
|
12
|
+
}
|
|
13
|
+
function l(n) {
|
|
14
|
+
const i = n ?? (typeof window < "u" ? `${window.location.pathname}${window.location.search}` : "");
|
|
15
|
+
return !(i != null && i.startsWith("/")) || i.startsWith("//") || i.startsWith("/\\") ? null : i.split("#")[0] ?? null;
|
|
12
16
|
}
|
|
13
17
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
u as viewAs
|
|
18
|
+
r as canViewAs,
|
|
19
|
+
e as registerViewAsOpener,
|
|
20
|
+
u as viewAs,
|
|
21
|
+
l as viewAsPath
|
|
17
22
|
};
|