@wssto2/vue-core 0.4.25 → 0.4.27
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/CHANGELOG.md +33 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-DcbZBINh.js → AccessGate.vue_vue_type_script_setup_true_lang-J5HoyGNJ.js} +1 -1
- package/dist/{Activity-CI-l_OFl.js → Activity-xtkZq4vG.js} +3 -3
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CxU9aNRQ.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-GUTIXuNd.js} +58 -53
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js → AsyncSection.vue_vue_type_script_setup_true_lang-B0NfvG3B.js} +45 -40
- package/dist/Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js +50 -0
- package/dist/{Changes-BdR0R20V.js → Changes-BPB8h56i.js} +4 -4
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-BNM_cbXa.js → CollectionPage.vue_vue_type_script_setup_true_lang-CVEYkb26.js} +3 -3
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-DPuH84I7.js → DataTable.vue_vue_type_script_setup_true_lang-DcQQ-uQS.js} +1 -1
- package/dist/{DeadLetters-CRTeoZS1.js → DeadLetters-DeYxkTMh.js} +4 -4
- package/dist/{General-hdmVP72B.js → General-BLbn4BCc.js} +2 -2
- package/dist/{NewRolePage-BPeKasOp.js → NewRolePage-B7DwFWPk.js} +4 -4
- package/dist/{ProfilePage-Dq9lcO5O.js → ProfilePage-CQYHj9Ns.js} +5 -5
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-szzWzdDu.js → RecordHeader.vue_vue_type_script_setup_true_lang-fmx0f8xi.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-BFaaFQSm.js → ResourcePage.vue_vue_type_script_setup_true_lang-BFBGvevP.js} +2 -2
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-B6g2760V.js → RoleEditor.vue_vue_type_script_setup_true_lang-DRHmjA9w.js} +2 -2
- package/dist/{RolePage-BYH-0fVI.js → RolePage-ODFu68Ce.js} +6 -6
- package/dist/{RolesPage-BRm5xDw7.js → RolesPage-B5RwSZ89.js} +4 -4
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-BJnz2ROc.js → SectionList.vue_vue_type_script_setup_true_lang-wyW7n3Uq.js} +1 -1
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-BltrQnrQ.js → SectionNavigator.vue_vue_type_script_setup_true_lang-Dmv6TpCi.js} +3 -3
- package/dist/{Sessions-B1eKG_I2.js → Sessions-wEdUsK-U.js} +3 -3
- package/dist/{SettingsPage-0P38Ty4w.js → SettingsPage-BVrMihx0.js} +4 -4
- package/dist/{SignIn-Dp8Ji0_r.js → SignIn-CK9rq8LQ.js} +2 -2
- package/dist/{SignInPage-CiStJboK.js → SignInPage-BORsM1g4.js} +2 -2
- package/dist/{SignInTable.vue_vue_type_script_setup_true_lang-ByEAVfjv.js → SignInTable.vue_vue_type_script_setup_true_lang-AakWNvaM.js} +1 -1
- package/dist/{SignIns-Bo7R2Coi.js → SignIns-C-8kVf7I.js} +4 -4
- package/dist/Timestamp.vue_vue_type_script_setup_true_lang-DRmzPDOP.js +51 -0
- package/dist/{UserRecord-DGq_PPy1.js → UserRecord-C1SzdpKu.js} +7 -7
- package/dist/{UsersList-BulNu4aE.js → UsersList-B3hc683r.js} +5 -5
- package/dist/access/index.js +1 -1
- package/dist/app/index.js +5 -5
- package/dist/collection/index.js +5 -5
- package/dist/content/Avatar.vue.d.ts +6 -0
- package/dist/content/Timestamp.vue.d.ts +14 -0
- package/dist/content/index.js +2 -2
- package/dist/{contributions-DsfmDoRD.js → contributions-BVBZP5Jb.js} +1 -1
- package/dist/form/index.js +2 -2
- package/dist/{guards-Dve61KjR.js → guards-BJZjc3FZ.js} +1 -1
- package/dist/{http-D_D9YbLH.js → http-BFfkA7gN.js} +1 -1
- package/dist/identity/index.js +1 -1
- package/dist/{index-Yy28omu6.js → index-C3E6DcO0.js} +6 -6
- package/dist/{index-BmowiT1y.js → index-LP6NNnow.js} +12 -12
- package/dist/{index-tnSTp0cM.js → index-qUaGJ9j2.js} +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{navigation-Cm3iChlR.js → navigation-DpcDF0rX.js} +1 -1
- package/dist/{neighbors-DVN_cADL.js → neighbors-RVQ4O3Qv.js} +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/overlay/MenuButton.vue.d.ts +23 -0
- package/dist/overlay/index.d.ts +1 -0
- package/dist/overlay/index.js +59 -35
- package/dist/page/index.js +5 -5
- package/dist/platform/index.d.ts +25 -1
- package/dist/platform/index.js +59 -49
- package/dist/platform/platform.d.ts +9 -5
- package/dist/platform/session.d.ts +10 -0
- package/dist/platform/sessionUser.d.ts +8 -0
- package/dist/platform-PZpUkkMS.js +268 -0
- package/dist/resource/index.js +1 -1
- package/dist/router/index.js +3 -3
- package/dist/{rowLayout-D1vrdy0s.js → rowLayout-Dh749umr.js} +1 -1
- package/dist/{sections-D-kD98vu.js → sections-CeZl-Jxg.js} +1 -1
- package/dist/shell/index.js +6 -4
- package/dist/state/async.d.ts +16 -0
- package/dist/state/index.d.ts +1 -1
- package/dist/state/index.js +38 -37
- package/dist/{status-Bh3-Cg7o.js → status-D9iQJJiz.js} +2 -2
- package/dist/styles.css +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/platform.d.ts +10 -7
- package/package.json +3 -2
- package/dist/Avatar.vue_vue_type_script_setup_true_lang-CFIheaSr.js +0 -35
- package/dist/Timestamp.vue_vue_type_script_setup_true_lang-CU2Y5oYl.js +0 -34
- package/dist/platform-q3cjODLx.js +0 -255
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { c as k } from "./client-k9euDWF4.js";
|
|
2
|
+
import { d as q } from "./context-Ch1r4fdN.js";
|
|
3
|
+
import { a as x, A as U } from "./error-CD7x0Jrz.js";
|
|
4
|
+
import { shallowRef as _ } from "vue";
|
|
5
|
+
const z = (e, n) => e.level === n.level && e.id === n.id, C = (e, n) => Object.prototype.hasOwnProperty.call(e, n);
|
|
6
|
+
function I(e, n = {}) {
|
|
7
|
+
const t = n.covers ?? z;
|
|
8
|
+
function o(s) {
|
|
9
|
+
const r = e();
|
|
10
|
+
return !r || !C(r.permissions, s) || r.unavailable.includes(s) ? null : r.permissions[s] ?? null;
|
|
11
|
+
}
|
|
12
|
+
function u(s, r) {
|
|
13
|
+
const i = o(s);
|
|
14
|
+
return i ? r ? (i.clauses.length > 0 ? i.clauses.map((f) => f.scope) : [i.scope]).some((f) => t(f, r)) : !0 : !1;
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
get root() {
|
|
18
|
+
return e()?.root ?? !1;
|
|
19
|
+
},
|
|
20
|
+
can: u,
|
|
21
|
+
canAny: (s) => s.some((r) => u(r)),
|
|
22
|
+
canAll: (s) => s.every((r) => u(r)),
|
|
23
|
+
held: o
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const A = ["own", "own_location", "all"], m = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
27
|
+
function $(e, n, t) {
|
|
28
|
+
return !m(e) || typeof e.level != "string" ? (t.push(`${n}: expected { level: string, id?: number }`), { level: "" }) : (e.id !== void 0 && typeof e.id != "number" && t.push(`${n}.id: expected number`), typeof e.id == "number" ? { level: e.level, id: e.id } : { level: e.level });
|
|
29
|
+
}
|
|
30
|
+
function S(e, n, t) {
|
|
31
|
+
return typeof e == "string" && A.includes(e) ? e : (t.push(`${n}: expected one of ${A.join(", ")}`), "own");
|
|
32
|
+
}
|
|
33
|
+
function T(e) {
|
|
34
|
+
const n = [], t = {}, o = { root: !1, permissions: {}, unavailable: [] };
|
|
35
|
+
if (!m(e)) return { snapshot: o, issues: ["access: expected an object"] };
|
|
36
|
+
if (!m(e.permissions)) n.push("access.permissions: expected an object");
|
|
37
|
+
else
|
|
38
|
+
for (const [s, r] of Object.entries(e.permissions)) {
|
|
39
|
+
const i = `access.permissions.${s}`;
|
|
40
|
+
if (!m(r)) {
|
|
41
|
+
n.push(`${i}: expected an object`);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const c = (Array.isArray(r.clauses) ? r.clauses : []).map((f, g) => {
|
|
45
|
+
const a = `${i}.clauses[${g}]`;
|
|
46
|
+
if (!m(f))
|
|
47
|
+
return n.push(`${a}: expected an object`), { scope: { level: "" }, qualifier: "own" };
|
|
48
|
+
const l = { scope: $(f.scope, `${a}.scope`, n), qualifier: S(f.qualifier, `${a}.qualifier`, n) };
|
|
49
|
+
return typeof f.role == "string" ? { ...l, role: f.role } : l;
|
|
50
|
+
});
|
|
51
|
+
t[s] = {
|
|
52
|
+
scope: $(r.scope, `${i}.scope`, n),
|
|
53
|
+
qualifier: S(r.qualifier, `${i}.qualifier`, n),
|
|
54
|
+
clauses: c
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const u = e.unavailable ?? [];
|
|
58
|
+
return (!Array.isArray(u) || !u.every((s) => typeof s == "string")) && n.push("access.unavailable: expected an array of strings"), {
|
|
59
|
+
snapshot: {
|
|
60
|
+
root: e.root === !0,
|
|
61
|
+
permissions: t,
|
|
62
|
+
unavailable: Array.isArray(u) ? u.filter((s) => typeof s == "string") : []
|
|
63
|
+
},
|
|
64
|
+
issues: n
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const N = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
68
|
+
function j(e, n, t = "navigation") {
|
|
69
|
+
return Array.isArray(e) ? e.flatMap((o, u) => {
|
|
70
|
+
const s = `${t}[${u}]`;
|
|
71
|
+
if (!N(o) || typeof o.i18n != "string")
|
|
72
|
+
return n.push(`${s}: expected an object with an i18n key`), [];
|
|
73
|
+
for (const i of ["icon", "route"])
|
|
74
|
+
o[i] != null && typeof o[i] != "string" && n.push(`${s}.${i}: expected a string`);
|
|
75
|
+
const r = o.children == null ? void 0 : j(o.children, n, `${s}.children`);
|
|
76
|
+
return [
|
|
77
|
+
{
|
|
78
|
+
i18n: o.i18n,
|
|
79
|
+
...typeof o.icon == "string" && { icon: o.icon },
|
|
80
|
+
...typeof o.route == "string" && { route: o.route },
|
|
81
|
+
...r && { children: r }
|
|
82
|
+
}
|
|
83
|
+
];
|
|
84
|
+
}) : (n.push(`${t}: expected an array`), []);
|
|
85
|
+
}
|
|
86
|
+
const b = (e) => typeof e == "object" && e !== null && !Array.isArray(e), B = (e) => {
|
|
87
|
+
if (b(e) && (typeof e.id == "number" || typeof e.id == "string")) return { id: e.id };
|
|
88
|
+
throw new TypeError("expected an object with a numeric or string id");
|
|
89
|
+
};
|
|
90
|
+
function F(e, n = B) {
|
|
91
|
+
const t = [];
|
|
92
|
+
if (!b(e)) throw w(["expected an object"]);
|
|
93
|
+
let o = null;
|
|
94
|
+
try {
|
|
95
|
+
o = n(e.user);
|
|
96
|
+
} catch (c) {
|
|
97
|
+
t.push(`user: ${c instanceof Error ? c.message : "invalid"}`);
|
|
98
|
+
}
|
|
99
|
+
let u = null;
|
|
100
|
+
if (e.expires_at !== void 0 && e.expires_at !== null) {
|
|
101
|
+
const c = typeof e.expires_at == "string" ? new Date(e.expires_at) : null;
|
|
102
|
+
c === null || Number.isNaN(c.getTime()) ? t.push("expires_at: expected an ISO date-time string") : u = c;
|
|
103
|
+
}
|
|
104
|
+
let s;
|
|
105
|
+
if (e.impersonator !== void 0 && e.impersonator !== null) {
|
|
106
|
+
const c = e.impersonator;
|
|
107
|
+
b(c) && (typeof c.id == "number" || typeof c.id == "string") && typeof c.name == "string" ? s = { id: c.id, name: c.name } : t.push("impersonator: expected { id, name }");
|
|
108
|
+
}
|
|
109
|
+
const r = T(e.access);
|
|
110
|
+
t.push(...r.issues);
|
|
111
|
+
const i = e.navigation === void 0 || e.navigation === null ? void 0 : j(e.navigation, t);
|
|
112
|
+
if (o === null || t.length > 0) throw w(t);
|
|
113
|
+
return { user: o, expiresAt: u, access: r.snapshot, ...s && { impersonator: s }, ...i && { navigation: i } };
|
|
114
|
+
}
|
|
115
|
+
const w = (e) => new U({ kind: "malformed", message: `Unreadable session payload: ${e.join("; ")}` });
|
|
116
|
+
function H(e, n = {}) {
|
|
117
|
+
const { mePath: t = "/auth/me", signOutPath: o = "/auth/logout", parseUser: u } = n;
|
|
118
|
+
return {
|
|
119
|
+
async load(s) {
|
|
120
|
+
try {
|
|
121
|
+
const { data: r } = await e.get(t, { signal: s, handleUnauthorized: !1 });
|
|
122
|
+
return F(r, u);
|
|
123
|
+
} catch (r) {
|
|
124
|
+
if (x(r) && r.kind === "unauthorized") return null;
|
|
125
|
+
throw r;
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
async signOut() {
|
|
129
|
+
try {
|
|
130
|
+
await e.post(o, void 0, { handleUnauthorized: !1 });
|
|
131
|
+
} catch (s) {
|
|
132
|
+
if (!(x(s) && s.kind === "unauthorized")) throw s;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
function E(e) {
|
|
138
|
+
return e.status === "authenticated" ? e : e.status === "anonymous" && e.reason === "expired" ? e.previous ?? null : null;
|
|
139
|
+
}
|
|
140
|
+
const O = 3e3;
|
|
141
|
+
function Q(e, n = {}) {
|
|
142
|
+
const t = _({ status: "unknown" });
|
|
143
|
+
let o = 0;
|
|
144
|
+
const u = new Set(n.beforeSignOut ? [n.beforeSignOut] : []);
|
|
145
|
+
let s = !1, r = null, i = null;
|
|
146
|
+
function c() {
|
|
147
|
+
o++, i?.controller.abort(), i = null;
|
|
148
|
+
}
|
|
149
|
+
async function f(a) {
|
|
150
|
+
const l = new AbortController();
|
|
151
|
+
let h;
|
|
152
|
+
const y = new Promise((p) => {
|
|
153
|
+
h = setTimeout(() => {
|
|
154
|
+
l.abort(), n.onError?.(new Error(`A before-sign-out hook did not finish within ${O} ms; signing out without it.`)), p();
|
|
155
|
+
}, O);
|
|
156
|
+
}), v = Promise.all(
|
|
157
|
+
[...u].map(async (p) => {
|
|
158
|
+
try {
|
|
159
|
+
await p(a, l.signal);
|
|
160
|
+
} catch (d) {
|
|
161
|
+
n.onError?.(d);
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
).then(() => {
|
|
165
|
+
});
|
|
166
|
+
await Promise.race([v, y]), clearTimeout(h);
|
|
167
|
+
}
|
|
168
|
+
function g() {
|
|
169
|
+
if (i) return i.promise;
|
|
170
|
+
const a = o, l = new AbortController(), h = t.value, y = E(h) !== null;
|
|
171
|
+
y || (t.value = { status: "loading" });
|
|
172
|
+
const v = async () => {
|
|
173
|
+
try {
|
|
174
|
+
const d = await e.load(l.signal);
|
|
175
|
+
if (o !== a) return t.value;
|
|
176
|
+
t.value = d ? { status: "authenticated", ...d } : { status: "anonymous", reason: "none" };
|
|
177
|
+
} catch (d) {
|
|
178
|
+
if (o !== a) return t.value;
|
|
179
|
+
n.onError?.(d), t.value = y ? h : { status: "failed", error: d };
|
|
180
|
+
} finally {
|
|
181
|
+
o === a && (i = null);
|
|
182
|
+
}
|
|
183
|
+
return t.value;
|
|
184
|
+
}, p = Promise.resolve().then(v);
|
|
185
|
+
return i = { controller: l, promise: p }, p;
|
|
186
|
+
}
|
|
187
|
+
return {
|
|
188
|
+
state: t,
|
|
189
|
+
restore: () => t.value.status === "unknown" || t.value.status === "failed" ? g() : i?.promise ?? Promise.resolve(t.value),
|
|
190
|
+
refresh: g,
|
|
191
|
+
establish(a) {
|
|
192
|
+
c(), t.value = { status: "authenticated", ...a };
|
|
193
|
+
},
|
|
194
|
+
update(a) {
|
|
195
|
+
const l = t.value;
|
|
196
|
+
if (l.status === "authenticated") {
|
|
197
|
+
if (a.user && a.user.id !== l.user.id)
|
|
198
|
+
throw new Error(`session.update cannot change who is signed in (user ${String(l.user.id)} to ${String(a.user.id)}); use session.establish for a different person.`);
|
|
199
|
+
t.value = {
|
|
200
|
+
...l,
|
|
201
|
+
user: a.user ?? l.user,
|
|
202
|
+
access: a.access ?? l.access,
|
|
203
|
+
...(a.navigation ?? l.navigation) && { navigation: a.navigation ?? l.navigation }
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
expire() {
|
|
208
|
+
if (t.value.status !== "authenticated") return;
|
|
209
|
+
const { status: a, ...l } = t.value;
|
|
210
|
+
c(), t.value = s && !t.value.impersonator ? { status: "anonymous", reason: "expired", previous: l } : { status: "anonymous", reason: "expired" }, n.onExpired?.();
|
|
211
|
+
},
|
|
212
|
+
signOut() {
|
|
213
|
+
return r ?? (r = (async () => {
|
|
214
|
+
try {
|
|
215
|
+
const a = t.value;
|
|
216
|
+
a.status === "authenticated" && u.size > 0 && await f(a.user), c(), t.value = { status: "anonymous", reason: "signedOut" }, await e.signOut();
|
|
217
|
+
} finally {
|
|
218
|
+
r = null;
|
|
219
|
+
}
|
|
220
|
+
})()), r;
|
|
221
|
+
},
|
|
222
|
+
holdExpired(a) {
|
|
223
|
+
s = a;
|
|
224
|
+
},
|
|
225
|
+
onBeforeSignOut(a) {
|
|
226
|
+
return u.add(a), () => void u.delete(a);
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function G(e) {
|
|
231
|
+
let n = null;
|
|
232
|
+
const t = k({
|
|
233
|
+
baseUrl: e.config.apiBase,
|
|
234
|
+
transport: e.transport,
|
|
235
|
+
headers: e.headers,
|
|
236
|
+
credentials: e.credentials,
|
|
237
|
+
requestId: e.requestId,
|
|
238
|
+
async onUnauthorized() {
|
|
239
|
+
return s.state.value.status !== "authenticated" ? "fail" : e.renewSession && (n ?? (n = e.renewSession(s, t).then(
|
|
240
|
+
(i) => i,
|
|
241
|
+
() => !1
|
|
242
|
+
).finally(() => {
|
|
243
|
+
n = null;
|
|
244
|
+
})), await n) ? "retry" : (s.expire(), "fail");
|
|
245
|
+
}
|
|
246
|
+
}), o = e.session ?? ((i) => H(i)), u = typeof o == "function" ? o(t) : o, s = Q(u, { onError: e.onSessionError, onExpired: e.onSessionExpired, beforeSignOut: e.beforeSignOut }), r = I(
|
|
247
|
+
() => E(s.state.value)?.access ?? null,
|
|
248
|
+
{ covers: e.covers }
|
|
249
|
+
);
|
|
250
|
+
return { config: e.config, http: t, session: s, access: r };
|
|
251
|
+
}
|
|
252
|
+
const P = q("platform"), R = P[0], J = P[1];
|
|
253
|
+
function V(e, n) {
|
|
254
|
+
e.provide(R, n);
|
|
255
|
+
}
|
|
256
|
+
export {
|
|
257
|
+
G as a,
|
|
258
|
+
O as b,
|
|
259
|
+
I as c,
|
|
260
|
+
Q as d,
|
|
261
|
+
H as e,
|
|
262
|
+
F as f,
|
|
263
|
+
R as g,
|
|
264
|
+
E as h,
|
|
265
|
+
V as i,
|
|
266
|
+
j as p,
|
|
267
|
+
J as u
|
|
268
|
+
};
|
package/dist/resource/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as o, u as r, a, b as u } from "../routeResource-DlTsGTg_.js";
|
|
2
|
-
import { _ as R, a as c } from "../ResourcePage.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as R, a as c } from "../ResourcePage.vue_vue_type_script_setup_true_lang-BFBGvevP.js";
|
|
3
3
|
export {
|
|
4
4
|
R as RecordPager,
|
|
5
5
|
c as ResourcePage,
|
package/dist/router/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { _ as a, c as o, a as r, i as t } from "../NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js";
|
|
2
2
|
import { d as c } from "../defineRoutes-BGAdiIrt.js";
|
|
3
3
|
import { A as u, f as p, i as f, r as A, u as m } from "../access-DmAceEo5.js";
|
|
4
|
-
import { i as l, r as x } from "../guards-
|
|
5
|
-
import { u as y } from "../sections-
|
|
6
|
-
import { b as v, c as N, n as H, u as b } from "../navigation-
|
|
4
|
+
import { i as l, r as x } from "../guards-BJZjc3FZ.js";
|
|
5
|
+
import { u as y } from "../sections-CeZl-Jxg.js";
|
|
6
|
+
import { b as v, c as N, n as H, u as b } from "../navigation-DpcDF0rX.js";
|
|
7
7
|
export {
|
|
8
8
|
u as AppRouterView,
|
|
9
9
|
a as NoAccess,
|
|
@@ -8,7 +8,7 @@ import { _ as ze } from "./Tooltip.vue_vue_type_script_setup_true_lang-mErNPt8e.
|
|
|
8
8
|
import { _ as he } from "./EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js";
|
|
9
9
|
import { u as Fe } from "./format-D8X4zsx6.js";
|
|
10
10
|
import { _ as Ve } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
11
|
-
import { _ as Oe } from "./Timestamp.vue_vue_type_script_setup_true_lang-
|
|
11
|
+
import { _ as Oe } from "./Timestamp.vue_vue_type_script_setup_true_lang-DRmzPDOP.js";
|
|
12
12
|
import { a as je } from "./mediaQuery-CygcXmFW.js";
|
|
13
13
|
function Ue(y, n) {
|
|
14
14
|
const d = (n ?? "").split(/\s+/).filter((v) => v !== "");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as n, watch as h } from "vue";
|
|
2
2
|
import { useI18n as b } from "vue-i18n";
|
|
3
3
|
import { useRoute as g, useRouter as p } from "vue-router";
|
|
4
|
-
import { u as y } from "./platform-
|
|
4
|
+
import { u as y } from "./platform-PZpUkkMS.js";
|
|
5
5
|
import { i as w } from "./access-DmAceEo5.js";
|
|
6
6
|
function j() {
|
|
7
7
|
const t = g(), u = p(), { access: c } = y(), { t: r } = b(), i = n(() => {
|
package/dist/shell/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as z, provide as Q, computed as C, ref as N, useId as re, openBlock as d, createElementBlock as b, normalizeClass as $, unref as t, createVNode as h, createCommentVNode as S, createElementVNode as f, toDisplayString as D, createBlock as R, withDirectives as Be, Fragment as F, renderList as ne, vShow as je, withCtx as A, mergeProps as G, useTemplateRef as ae, renderSlot as I, createSlots as K, normalizeProps as W, guardReactiveProps as Y, inject as ge, onMounted as Ve, onBeforeUnmount as ye, normalizeStyle as oe, nextTick as ie, watch as q, onScopeDispose as ce, Teleport as Fe, shallowRef as Ke, h as ee } from "vue";
|
|
2
2
|
import { useI18n as B } from "vue-i18n";
|
|
3
|
-
import { _ as we } from "../Avatar.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { _ as we } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
4
4
|
import { _ as P, u as Xe, c as Ue } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
5
5
|
import { _ as We } from "../Popover.vue_vue_type_script_setup_true_lang-C70GrCP7.js";
|
|
6
|
-
import { u as xe, S as X } from "../contributions-
|
|
6
|
+
import { u as xe, S as X } from "../contributions-BVBZP5Jb.js";
|
|
7
7
|
import { u as Ye } from "../environment-Dva-SG8D.js";
|
|
8
8
|
import { _ as He } from "../CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js";
|
|
9
9
|
import { l as pe } from "../languageName-CItV_SOv.js";
|
|
10
10
|
import { t as _e } from "../toast-CqSDTWRX.js";
|
|
11
|
-
import { u as J, h as ue } from "../platform-
|
|
11
|
+
import { u as J, h as ue } from "../platform-PZpUkkMS.js";
|
|
12
12
|
import { a as qe, _ as ve, h as ke } from "../AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js";
|
|
13
13
|
import { _ as Ge } from "../Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js";
|
|
14
14
|
import { _ as Qe } from "../LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js";
|
|
@@ -17,7 +17,7 @@ import { _ as Ze } from "../BottomDock.vue_vue_type_script_setup_true_lang-CjN7x
|
|
|
17
17
|
import { b as $e } from "../chrome-nUcmVu8G.js";
|
|
18
18
|
import { p as Se, A as et } from "../access-DmAceEo5.js";
|
|
19
19
|
import { RouterLink as Le, useRoute as tt, useRouter as de } from "vue-router";
|
|
20
|
-
import { u as nt } from "../navigation-
|
|
20
|
+
import { u as nt } from "../navigation-DpcDF0rX.js";
|
|
21
21
|
import { u as at } from "../leaveGuard-Cc8yeLxM.js";
|
|
22
22
|
import { u as ot, S as st } from "../dialogStack-DZZg55w0.js";
|
|
23
23
|
import { a as H } from "../mediaQuery-CygcXmFW.js";
|
|
@@ -775,6 +775,7 @@ const Zt = ["id", "aria-label"], en = ["data-drawer", "inert"], tn = /* @__PURE_
|
|
|
775
775
|
key: 1,
|
|
776
776
|
type: "button",
|
|
777
777
|
"data-shell-bar-back": "",
|
|
778
|
+
"data-page-back": "",
|
|
778
779
|
class: "hit-target inline-flex min-w-0 cursor-pointer items-center rounded-control pr-2 text-body text-content-link active:opacity-60",
|
|
779
780
|
onClick: E
|
|
780
781
|
}, [
|
|
@@ -858,6 +859,7 @@ const Zt = ["id", "aria-label"], en = ["data-drawer", "inert"], tn = /* @__PURE_
|
|
|
858
859
|
f("button", G({ type: "button" }, T, {
|
|
859
860
|
"aria-label": t(a)("core.page.more_actions"),
|
|
860
861
|
"data-shell-bar-more": "",
|
|
862
|
+
"data-page-overflow": "",
|
|
861
863
|
class: "hit-target flex size-9 cursor-pointer items-center justify-center rounded-full text-content-link",
|
|
862
864
|
onClick: u
|
|
863
865
|
}), [
|
package/dist/state/async.d.ts
CHANGED
|
@@ -29,3 +29,19 @@ export type AsyncState<Value> = {
|
|
|
29
29
|
export declare function valueOf<Value>(state: AsyncState<Value>): Value | undefined;
|
|
30
30
|
/** Nothing to list: null or undefined, an empty array, an empty string. */
|
|
31
31
|
export declare function isEmptyValue(value: unknown): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The `AsyncState` of a region that tracks its load with plain flags (a store's `loading` and
|
|
34
|
+
* `error`, a `ref` that is `undefined` until the answer comes), for `AsyncSection`'s one `state`.
|
|
35
|
+
*
|
|
36
|
+
* <AsyncSection :state="asyncState({ loading, error, value: documents })" @retry="reload">
|
|
37
|
+
*
|
|
38
|
+
* `value` is `undefined` while there is nothing yet; `null` is an answer (nothing there), which
|
|
39
|
+
* `AsyncSection` shows as empty. A loading flag over a value is `refreshing`, an error over a value
|
|
40
|
+
* is `stale`; loading wins over an error, since a retry is running. An empty `error` is no error.
|
|
41
|
+
* Not yet loaded, not loading, no error: `loading`, never a blank region.
|
|
42
|
+
*/
|
|
43
|
+
export declare function asyncState<Value>(flags: {
|
|
44
|
+
loading?: boolean;
|
|
45
|
+
error?: string | null;
|
|
46
|
+
value?: Value;
|
|
47
|
+
}): AsyncState<Value>;
|
package/dist/state/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as AsyncSection } from "./AsyncSection.vue";
|
|
2
|
-
export { isEmptyValue, valueOf, type AsyncState } from "./async";
|
|
2
|
+
export { asyncState, isEmptyValue, valueOf, type AsyncState } from "./async";
|
|
3
3
|
export { default as Badge } from "./Badge.vue";
|
|
4
4
|
export { HUES, type Hue } from "./hue";
|
|
5
5
|
export { default as Banner } from "./Banner.vue";
|
package/dist/state/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { _ as D, a as I,
|
|
2
|
-
import { _ as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { _ as D, a as I, b as W, i as F, v as O } from "../AsyncSection.vue_vue_type_script_setup_true_lang-B0NfvG3B.js";
|
|
2
|
+
import { _ as H } from "../Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
3
|
+
import { _ as R } from "../Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js";
|
|
4
4
|
import { _ } from "../ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js";
|
|
5
|
-
import { a as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { defineComponent as m, computed as k, openBlock as e, createElementBlock as
|
|
5
|
+
import { a as j } from "../ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js";
|
|
6
|
+
import { _ as G } from "../EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js";
|
|
7
|
+
import { defineComponent as m, computed as k, openBlock as e, createElementBlock as a, normalizeClass as p, createVNode as d, unref as i, createElementVNode as u, renderSlot as f, createBlock as S, toDisplayString as l, createCommentVNode as c } from "vue";
|
|
8
8
|
import { _ as x } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
9
9
|
import { useI18n as g } from "vue-i18n";
|
|
10
|
-
import { u as
|
|
11
|
-
import { D as
|
|
12
|
-
const
|
|
10
|
+
import { u as K } from "../useLoad-M7V-AVwR.js";
|
|
11
|
+
import { D as X, W as Y, u as Z } from "../useWaitStatus-fsacMl4W.js";
|
|
12
|
+
const $ = ["amber", "lime", "teal", "cyan", "blue", "indigo", "violet", "fuchsia", "pink"], V = /* @__PURE__ */ m({
|
|
13
13
|
__name: "FieldNote",
|
|
14
14
|
props: {
|
|
15
15
|
tone: { default: "info" },
|
|
16
16
|
icon: { default: void 0 }
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const t =
|
|
18
|
+
setup(s) {
|
|
19
|
+
const t = s, o = {
|
|
20
20
|
info: { text: "text-content-muted", icon: "informationLine" },
|
|
21
21
|
warning: { text: "text-status-warning-content", icon: "alertTriangle" },
|
|
22
22
|
critical: { text: "text-status-danger-content", icon: "errorWarningLine" }
|
|
23
|
-
},
|
|
24
|
-
return (r, B) => (e(),
|
|
25
|
-
class: p(["mt-1 flex items-start gap-1.5 text-xs",
|
|
23
|
+
}, n = k(() => o[t.tone]);
|
|
24
|
+
return (r, B) => (e(), a("p", {
|
|
25
|
+
class: p(["mt-1 flex items-start gap-1.5 text-xs", n.value.text])
|
|
26
26
|
}, [
|
|
27
27
|
d(i(x), {
|
|
28
|
-
name: t.icon ??
|
|
28
|
+
name: t.icon ?? n.value.icon,
|
|
29
29
|
size: 14,
|
|
30
30
|
class: "mt-px"
|
|
31
31
|
}, null, 8, ["name"]),
|
|
@@ -34,11 +34,11 @@ const b = ["amber", "lime", "teal", "cyan", "blue", "indigo", "violet", "fuchsia
|
|
|
34
34
|
])
|
|
35
35
|
], 2));
|
|
36
36
|
}
|
|
37
|
-
}), h = ["data-done"],
|
|
37
|
+
}), h = ["data-done"], y = {
|
|
38
38
|
class: "flex min-w-0 items-center gap-2.5 text-subheadline",
|
|
39
39
|
role: "status",
|
|
40
40
|
"aria-live": "polite"
|
|
41
|
-
},
|
|
41
|
+
}, v = {
|
|
42
42
|
key: 0,
|
|
43
43
|
class: "text-content-link"
|
|
44
44
|
}, E = {
|
|
@@ -55,14 +55,14 @@ const b = ["amber", "lime", "teal", "cyan", "blue", "indigo", "violet", "fuchsia
|
|
|
55
55
|
done: { type: Boolean },
|
|
56
56
|
elapsed: {}
|
|
57
57
|
},
|
|
58
|
-
setup(
|
|
59
|
-
const t =
|
|
60
|
-
return (
|
|
58
|
+
setup(s) {
|
|
59
|
+
const t = s, { t: o } = g();
|
|
60
|
+
return (n, r) => (e(), a("div", {
|
|
61
61
|
class: "flex min-w-0 flex-col gap-1",
|
|
62
62
|
"data-done": t.done || void 0
|
|
63
63
|
}, [
|
|
64
|
-
u("div",
|
|
65
|
-
t.done ? (e(),
|
|
64
|
+
u("div", y, [
|
|
65
|
+
t.done ? (e(), a("span", v, [
|
|
66
66
|
d(_, { size: 16 })
|
|
67
67
|
])) : (e(), S(i(x), {
|
|
68
68
|
key: 1,
|
|
@@ -70,34 +70,35 @@ const b = ["amber", "lime", "teal", "cyan", "blue", "indigo", "violet", "fuchsia
|
|
|
70
70
|
size: 16,
|
|
71
71
|
class: "animate-spin text-content-link"
|
|
72
72
|
})),
|
|
73
|
-
(e(),
|
|
73
|
+
(e(), a("span", {
|
|
74
74
|
key: t.text,
|
|
75
75
|
class: p(["min-w-0 animate-text-swap", t.done ? "font-semibold text-content-link" : "text-shimmer"]),
|
|
76
76
|
"data-status-text": ""
|
|
77
77
|
}, l(t.text), 3)),
|
|
78
|
-
t.elapsed != null ? (e(),
|
|
78
|
+
t.elapsed != null ? (e(), a("span", E, l(i(o)("core.wait.seconds", { count: t.elapsed })), 1)) : c("", !0)
|
|
79
79
|
]),
|
|
80
|
-
|
|
81
|
-
f(
|
|
80
|
+
n.$slots.default ? (e(), a("div", w, [
|
|
81
|
+
f(n.$slots, "default")
|
|
82
82
|
])) : c("", !0)
|
|
83
83
|
], 8, h));
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
export {
|
|
87
87
|
D as AsyncSection,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
H as Badge,
|
|
89
|
+
R as Banner,
|
|
90
|
+
X as DONE_BEAT_MS,
|
|
91
91
|
_ as DrawnCheck,
|
|
92
|
-
|
|
92
|
+
G as EmptyState,
|
|
93
93
|
V as FieldNote,
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
$ as HUES,
|
|
95
|
+
j as ProgressTrack,
|
|
96
96
|
I as Skeleton,
|
|
97
97
|
z as StatusLine,
|
|
98
|
-
|
|
99
|
-
W as
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
Y as WAIT_VISIBLE_AFTER_MS,
|
|
99
|
+
W as asyncState,
|
|
100
|
+
F as isEmptyValue,
|
|
101
|
+
K as useLoad,
|
|
102
|
+
Z as useWaitStatus,
|
|
103
|
+
O as valueOf
|
|
103
104
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, r as o } from "./http-
|
|
2
|
-
import { i as r } from "./index-
|
|
1
|
+
import { a, r as o } from "./http-BFfkA7gN.js";
|
|
2
|
+
import { i as r } from "./index-LP6NNnow.js";
|
|
3
3
|
const n = ["active", "locked", "inactive", "all"];
|
|
4
4
|
function l(i) {
|
|
5
5
|
return a({
|