@wssto2/vue-core 0.4.13 → 0.4.15
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/{ActionRow.vue_vue_type_script_setup_true_lang-LlfIPWsJ.js → ActionRow.vue_vue_type_script_setup_true_lang-CkvS5W6K.js} +1 -1
- package/dist/{Activity-DhVVSf60.js → Activity-4q26REYj.js} +6 -6
- package/dist/{Changes-Czs32zlz.js → Changes-CKIuGF8O.js} +5 -5
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-DkpFEHUw.js → CollectionPage.vue_vue_type_script_setup_true_lang-B17cUOzj.js} +2 -2
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js → DateField.vue_vue_type_script_setup_true_lang-DehwWm78.js} +17 -16
- package/dist/{DeadLetters-DBUALYXL.js → DeadLetters-DPGcQOz1.js} +4 -4
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-DWcVKZM3.js +285 -0
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js → FormGroup.vue_vue_type_script_setup_true_lang-noYI9QMk.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-cr0xNDXP.js → FormView.vue_vue_type_script_setup_true_lang-BcIbTMHN.js} +2 -2
- package/dist/{General-UWbJQLc8.js → General-CUA9b3ML.js} +10 -10
- package/dist/{NewRolePage-Dm7urTx0.js → NewRolePage-DBfCvDWA.js} +3 -3
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-Dm6FfJ2T.js +126 -0
- package/dist/{ProfilePage-Ep75xf-u.js → ProfilePage-On-eAiJ-.js} +41 -41
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-CDZjkiU5.js → RoleEditor.vue_vue_type_script_setup_true_lang-fvAf3rQm.js} +44 -44
- package/dist/{RolePage-CQc_wV3b.js → RolePage-B8oul55j.js} +8 -8
- package/dist/{RolesPage-CG7InZ_u.js → RolesPage-DsXVivdj.js} +5 -5
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js → SegmentedField.vue_vue_type_script_setup_true_lang-B2d55hrh.js} +7 -6
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-DedKLLQK.js +443 -0
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-D4k5QeWS.js → SessionList.vue_vue_type_script_setup_true_lang-CirlMdHb.js} +2 -2
- package/dist/{Sessions-_w3Tnevz.js → Sessions-BTyXDEuY.js} +4 -4
- package/dist/{SettingsPage-BNdeH-_0.js → SettingsPage-DHTmMgif.js} +9 -9
- package/dist/{SignIn-DIjshMpl.js → SignIn-DU4DE2wj.js} +6 -6
- package/dist/{SignInPage-C3-LHjo2.js → SignInPage-BA22kyOp.js} +3 -3
- package/dist/{SignIns-DNdLctGJ.js → SignIns-C8QAZBaL.js} +3 -3
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-CM8yp9JQ.js → SwitchField.vue_vue_type_script_setup_true_lang-B2Z2hy_h.js} +11 -10
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js → TextField.vue_vue_type_script_setup_true_lang-nqnGG7Zc.js} +27 -26
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-CqAWfABZ.js → TextareaField.vue_vue_type_script_setup_true_lang-BgIQyYtf.js} +9 -8
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DWfAUlnz.js → TimeField.vue_vue_type_script_setup_true_lang-Dr0h-V_8.js} +25 -24
- package/dist/{UserRecord-C0JZgK47.js → UserRecord-D1BNmYp9.js} +10 -10
- package/dist/{UsersList-Bc8dCuRB.js → UsersList-ltx3G23-.js} +8 -8
- package/dist/access/index.js +1 -1
- package/dist/app/application.d.ts +13 -0
- package/dist/app/index.js +160 -159
- package/dist/collection/index.js +1 -1
- package/dist/control-CX9BG2UB.js +320 -0
- package/dist/describeError-B-NMa--w.js +53 -0
- package/dist/fieldMessages-DV6sESpn.js +25 -0
- package/dist/form/DateField.vue.d.ts +1 -0
- package/dist/form/DateTimeField.vue.d.ts +1 -0
- package/dist/form/Field.vue.d.ts +1 -0
- package/dist/form/FileField.vue.d.ts +1 -0
- package/dist/form/FormErrors.vue.d.ts +1 -1
- package/dist/form/FormRow.vue.d.ts +3 -0
- package/dist/form/I18nField.vue.d.ts +1 -0
- package/dist/form/MoneyField.vue.d.ts +1 -0
- package/dist/form/MonthYearField.vue.d.ts +1 -0
- package/dist/form/NumberField.vue.d.ts +5 -0
- package/dist/form/PhotoField.vue.d.ts +1 -0
- package/dist/form/SelectField.vue.d.ts +5 -6
- package/dist/form/SwitchField.vue.d.ts +1 -0
- package/dist/form/TextField.vue.d.ts +1 -0
- package/dist/form/TextareaField.vue.d.ts +1 -0
- package/dist/form/TimeField.vue.d.ts +1 -0
- package/dist/form/field.d.ts +3 -0
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +469 -456
- package/dist/form/useForm.d.ts +2 -2
- package/dist/form/useHiddenFieldErrors.d.ts +23 -0
- package/dist/form/useSaveChrome.d.ts +8 -3
- package/dist/i18n/describeError.d.ts +19 -1
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +8 -6
- package/dist/identity/fieldMessages.d.ts +1 -1
- package/dist/identity/index.js +1 -1
- package/dist/{index-Cz4LtYKa.js → index-BCw_Ki6z.js} +2 -2
- package/dist/{index-BesWsiIg.js → index-Chh4z9xW.js} +10 -10
- package/dist/{index-BEDhdJQE.js → index-DwdVrW6q.js} +15 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/phone/PhoneField.vue.d.ts +1 -0
- package/dist/phone/index.js +66 -65
- package/dist/resource/index.js +1 -1
- package/dist/resource/resource.d.ts +1 -1
- package/dist/{routeResource-DstM0hvf.js → routeResource-DlTsGTg_.js} +36 -32
- package/dist/state/index.js +1 -1
- package/dist/state/useLoad.d.ts +7 -0
- package/dist/{status-DfAac6vw.js → status-cWCAMAmW.js} +1 -1
- package/dist/{useCommand-BkONMn3X.js → useCommand-B-N6HJOz.js} +1 -1
- package/dist/useLoad-M7V-AVwR.js +43 -0
- package/dist/{useResourceForm-D1hIpwW5.js → useResourceForm-CP2lCwmD.js} +1 -1
- package/dist/useSaveChrome-7huA3FzR.js +26 -0
- package/package.json +1 -1
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js +0 -276
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-C7N5nq0P.js +0 -113
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-BJoAkBo2.js +0 -437
- package/dist/control-7EP4tjYy.js +0 -313
- package/dist/describeError-Ctga6GcS.js +0 -41
- package/dist/fieldMessages-C3Rpbktw.js +0 -25
- package/dist/useLoad-CYRVx6HW.js +0 -39
- package/dist/useSaveChrome-DuWm0Czf.js +0 -25
package/dist/app/index.js
CHANGED
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Z = (e,
|
|
4
|
-
import { effectScope as
|
|
5
|
-
import { useI18n as
|
|
6
|
-
import { createRouter as
|
|
7
|
-
import { i as
|
|
8
|
-
import { c as
|
|
9
|
-
import { coreMessages as oe, createMessageRuntime as
|
|
10
|
-
import { i as
|
|
11
|
-
import { i as
|
|
12
|
-
import { i as
|
|
13
|
-
import { i as
|
|
14
|
-
import { c as
|
|
15
|
-
import { c as
|
|
16
|
-
import { i as
|
|
17
|
-
import { b as
|
|
18
|
-
import { c as
|
|
19
|
-
import { S as
|
|
1
|
+
var Se = Object.defineProperty;
|
|
2
|
+
var Re = (e, n, r) => n in e ? Se(e, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[n] = r;
|
|
3
|
+
var Z = (e, n, r) => Re(e, typeof n != "symbol" ? n + "" : n, r);
|
|
4
|
+
import { effectScope as P, watch as W, defineComponent as pe, openBlock as Me, createElementBlock as Ae, createVNode as ee, unref as C, withCtx as te, createTextVNode as je, toDisplayString as Le, shallowRef as Ne, computed as Ke, h as se, createApp as Oe } from "vue";
|
|
5
|
+
import { useI18n as Ce, createI18n as _e } from "vue-i18n";
|
|
6
|
+
import { createRouter as Fe, isNavigationFailure as Ie } from "vue-router";
|
|
7
|
+
import { i as Te } from "../leaveGuard-Cc8yeLxM.js";
|
|
8
|
+
import { c as qe, i as De, f as Pe } from "../format-B8mJm946.js";
|
|
9
|
+
import { coreMessages as oe, createMessageRuntime as We } from "../i18n/index.js";
|
|
10
|
+
import { i as Be, a as He } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
11
|
+
import { i as Ve, b as Ge } from "../bottomDock-BZEiOPYZ.js";
|
|
12
|
+
import { i as Je, p as ze } from "../chrome-nUcmVu8G.js";
|
|
13
|
+
import { i as Qe, g as Ue } from "../platform-q3cjODLx.js";
|
|
14
|
+
import { c as Xe, A as Ye, r as re } from "../access-DmAceEo5.js";
|
|
15
|
+
import { c as Ze, _ as et } from "../NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js";
|
|
16
|
+
import { i as tt } from "../guards-Dve61KjR.js";
|
|
17
|
+
import { b as st, c as ot, n as ae } from "../navigation-Cm3iChlR.js";
|
|
18
|
+
import { c as rt, s as ne } from "../contributions-DsfmDoRD.js";
|
|
19
|
+
import { S as Pt } from "../contributions-DsfmDoRD.js";
|
|
20
20
|
import { a as ie } from "../environment-Dva-SG8D.js";
|
|
21
|
-
import { u as
|
|
22
|
-
import {
|
|
23
|
-
import { _ as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
import { u as Bt } from "../environment-Dva-SG8D.js";
|
|
22
|
+
import { b as ce, c as le } from "../describeError-B-NMa--w.js";
|
|
23
|
+
import { _ as at } from "../Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
24
|
+
import { _ as nt } from "../EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js";
|
|
25
|
+
import { i as it } from "../feature-DdUAfyi4.js";
|
|
26
|
+
import { d as Vt, p as Gt } from "../feature-DdUAfyi4.js";
|
|
27
|
+
import { k as zt } from "../keepAlive-CDvMQlcJ.js";
|
|
28
|
+
function ct(e) {
|
|
29
|
+
const { platform: n } = e, r = P();
|
|
29
30
|
let i = null, w = null, v = !1;
|
|
30
|
-
function
|
|
31
|
+
function E(l, m) {
|
|
31
32
|
const h = new AbortController(), u = { controller: h, stops: [] };
|
|
32
|
-
for (const
|
|
33
|
+
for (const k of l)
|
|
33
34
|
try {
|
|
34
|
-
const $ = m(
|
|
35
|
-
typeof $ == "function" && u.stops.push({ owned:
|
|
35
|
+
const $ = m(k, h.signal);
|
|
36
|
+
typeof $ == "function" && u.stops.push({ owned: k, stop: $ });
|
|
36
37
|
} catch ($) {
|
|
37
|
-
e.onError($,
|
|
38
|
+
e.onError($, k);
|
|
38
39
|
}
|
|
39
40
|
return u;
|
|
40
41
|
}
|
|
@@ -53,20 +54,20 @@ function at(e) {
|
|
|
53
54
|
return {
|
|
54
55
|
start() {
|
|
55
56
|
if (v || i) return;
|
|
56
|
-
i =
|
|
57
|
+
i = E(
|
|
57
58
|
j("app"),
|
|
58
|
-
(m, h) => m.effect.start({ signal: h, platform:
|
|
59
|
+
(m, h) => m.effect.start({ signal: h, platform: n, report: (u) => e.onError(u, m) })
|
|
59
60
|
);
|
|
60
61
|
const l = j("session");
|
|
61
62
|
r.run(
|
|
62
|
-
() =>
|
|
63
|
-
() => M(
|
|
63
|
+
() => W(
|
|
64
|
+
() => M(n.session.state.value),
|
|
64
65
|
(m) => {
|
|
65
66
|
R(w), w = null;
|
|
66
|
-
const h =
|
|
67
|
-
m === null || h.status !== "authenticated" || (w =
|
|
67
|
+
const h = n.session.state.value;
|
|
68
|
+
m === null || h.status !== "authenticated" || (w = E(
|
|
68
69
|
l,
|
|
69
|
-
(u,
|
|
70
|
+
(u, k) => u.effect.start({ signal: k, platform: n, user: h.user, report: ($) => e.onError($, u) })
|
|
70
71
|
));
|
|
71
72
|
},
|
|
72
73
|
{ immediate: !0, flush: "sync" }
|
|
@@ -78,28 +79,28 @@ function at(e) {
|
|
|
78
79
|
}
|
|
79
80
|
};
|
|
80
81
|
}
|
|
81
|
-
const
|
|
82
|
+
const lt = { class: "mx-auto flex min-h-screen max-w-content items-center justify-center p-screen-padding" }, ut = /* @__PURE__ */ pe({
|
|
82
83
|
__name: "StartupFailure",
|
|
83
84
|
props: {
|
|
84
85
|
kind: {}
|
|
85
86
|
},
|
|
86
87
|
emits: ["retry"],
|
|
87
88
|
setup(e) {
|
|
88
|
-
const { t:
|
|
89
|
-
return (r, i) => (
|
|
90
|
-
ee(
|
|
91
|
-
title:
|
|
92
|
-
description:
|
|
89
|
+
const { t: n } = Ce();
|
|
90
|
+
return (r, i) => (Me(), Ae("div", lt, [
|
|
91
|
+
ee(C(nt), {
|
|
92
|
+
title: C(n)("core.startup.title"),
|
|
93
|
+
description: C(n)(e.kind === "startup" ? "core.startup.other" : `core.startup.${e.kind}`),
|
|
93
94
|
icon: "errorWarningLine"
|
|
94
95
|
}, {
|
|
95
96
|
actions: te(() => [
|
|
96
|
-
ee(
|
|
97
|
+
ee(C(at), {
|
|
97
98
|
prominence: "primary",
|
|
98
99
|
icon: "refreshLine",
|
|
99
100
|
onClick: i[0] || (i[0] = (w) => r.$emit("retry"))
|
|
100
101
|
}, {
|
|
101
102
|
default: te(() => [
|
|
102
|
-
|
|
103
|
+
je(Le(C(n)("core.actions.retry")), 1)
|
|
103
104
|
]),
|
|
104
105
|
_: 1
|
|
105
106
|
})
|
|
@@ -109,7 +110,7 @@ const it = { class: "mx-auto flex min-h-screen max-w-content items-center justif
|
|
|
109
110
|
]));
|
|
110
111
|
}
|
|
111
112
|
});
|
|
112
|
-
class
|
|
113
|
+
class ue extends Error {
|
|
113
114
|
constructor(r) {
|
|
114
115
|
super(`The application composition is invalid:
|
|
115
116
|
${r.map((i) => ` - [${i.owner}] ${i.message}`).join(`
|
|
@@ -118,17 +119,17 @@ ${r.map((i) => ` - [${i.owner}] ${i.message}`).join(`
|
|
|
118
119
|
this.name = "ApplicationError", this.issues = r;
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
|
-
const
|
|
122
|
-
function*
|
|
122
|
+
const fe = "application", g = (e) => `feature "${e.id}"`;
|
|
123
|
+
function* B(e, n = "") {
|
|
123
124
|
for (const r of e) {
|
|
124
|
-
const i = r.path.startsWith("/") ? r.path : `${
|
|
125
|
-
yield { record: r, path: i }, r.children && (yield*
|
|
125
|
+
const i = r.path.startsWith("/") ? r.path : `${n.replace(/\/$/, "")}/${r.path}`;
|
|
126
|
+
yield { record: r, path: i }, r.children && (yield* B(r.children, i));
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
|
-
function
|
|
129
|
-
const
|
|
129
|
+
function ft(e) {
|
|
130
|
+
const n = [], r = (o, s) => n.push({ owner: o, message: s }), i = [];
|
|
130
131
|
e.features.forEach((o, s) => {
|
|
131
|
-
|
|
132
|
+
it(o) ? i.push(o) : r(fe, `features[${s}] was not created with defineFeature().`);
|
|
132
133
|
});
|
|
133
134
|
const w = /* @__PURE__ */ new Map();
|
|
134
135
|
for (const o of i)
|
|
@@ -136,11 +137,11 @@ function lt(e) {
|
|
|
136
137
|
for (const o of i)
|
|
137
138
|
for (const s of o.requires)
|
|
138
139
|
w.has(s) || r(g(o), `requires the feature "${s}", which is not in the features list.`);
|
|
139
|
-
const v = [],
|
|
140
|
-
if (
|
|
140
|
+
const v = [], E = /* @__PURE__ */ new Set(), R = (o) => {
|
|
141
|
+
if (E.has(o.id)) return;
|
|
141
142
|
const s = v.indexOf(o.id);
|
|
142
143
|
if (s !== -1) {
|
|
143
|
-
r(g(o), `requirements form a cycle: ${[...v.slice(s), o.id].join(" -> ")}.`),
|
|
144
|
+
r(g(o), `requirements form a cycle: ${[...v.slice(s), o.id].join(" -> ")}.`), E.add(o.id);
|
|
144
145
|
return;
|
|
145
146
|
}
|
|
146
147
|
v.push(o.id);
|
|
@@ -148,7 +149,7 @@ function lt(e) {
|
|
|
148
149
|
const d = w.get(c);
|
|
149
150
|
d && R(d);
|
|
150
151
|
}
|
|
151
|
-
v.pop(),
|
|
152
|
+
v.pop(), E.add(o.id);
|
|
152
153
|
};
|
|
153
154
|
i.forEach(R);
|
|
154
155
|
const j = new Set(e.platform.config.capabilities);
|
|
@@ -161,7 +162,7 @@ function lt(e) {
|
|
|
161
162
|
const c = s.path.length > 1 ? s.path.replace(/\/$/, "") : s.path, d = l.get(c);
|
|
162
163
|
d ? r(g(o), `declares the path "${s.path}", which feature "${d.id}" declares too.`) : l.set(c, o);
|
|
163
164
|
}
|
|
164
|
-
for (const { record: s } of
|
|
165
|
+
for (const { record: s } of B(o.routes)) {
|
|
165
166
|
if (s.meta && "feature" in s.meta && r(g(o), `the route "${String(s.name ?? s.path)}" sets meta.feature, which the runtime owns.`), typeof s.name != "string") continue;
|
|
166
167
|
const c = M.get(s.name);
|
|
167
168
|
c ? r(g(o), `declares the route name "${s.name}", which feature "${c.id}" declares too.`) : M.set(s.name, o);
|
|
@@ -175,7 +176,7 @@ function lt(e) {
|
|
|
175
176
|
const d = h.get(s);
|
|
176
177
|
d ? r(g(o), `provides the context "${c}", which feature "${d.id}" provides too.`) : h.set(s, o);
|
|
177
178
|
}
|
|
178
|
-
const u = /* @__PURE__ */ new Map(),
|
|
179
|
+
const u = /* @__PURE__ */ new Map(), k = (o, s) => {
|
|
179
180
|
for (const c of s) {
|
|
180
181
|
const d = u.get(c.namespace);
|
|
181
182
|
d ? r(o, `declares the message namespace "${c.namespace}", which ${d} declares too.`) : u.set(c.namespace, o);
|
|
@@ -183,11 +184,11 @@ function lt(e) {
|
|
|
183
184
|
e.supportedLocales.includes(L) || r(o, `the namespace "${c.namespace}" has a loader for "${L}", which is not a supported locale (${e.supportedLocales.join(", ")}).`);
|
|
184
185
|
}
|
|
185
186
|
};
|
|
186
|
-
for (const o of i)
|
|
187
|
-
|
|
187
|
+
for (const o of i) k(g(o), o.messages);
|
|
188
|
+
k(fe, e.messages);
|
|
188
189
|
const $ = (o) => u.has(o);
|
|
189
190
|
for (const o of i)
|
|
190
|
-
for (const { record: s } of
|
|
191
|
+
for (const { record: s } of B(o.routes))
|
|
191
192
|
for (const c of s.meta?.messages ?? [])
|
|
192
193
|
$(c) || r(g(o), `the route "${String(s.name ?? s.path)}" needs the message namespace "${c}", which nobody declares.`);
|
|
193
194
|
const x = /* @__PURE__ */ new Map();
|
|
@@ -206,176 +207,176 @@ function lt(e) {
|
|
|
206
207
|
const d = s.scope;
|
|
207
208
|
d !== "app" && d !== "session" && r(g(o), `the effect "${s.id}" has the scope "${d}"; use "app" or "session".`);
|
|
208
209
|
}
|
|
209
|
-
return { features: i, issues:
|
|
210
|
+
return { features: i, issues: n };
|
|
210
211
|
}
|
|
211
|
-
const
|
|
212
|
+
const dt = (e, n, r) => _e({
|
|
212
213
|
legacy: !1,
|
|
213
214
|
locale: e,
|
|
214
|
-
fallbackLocale:
|
|
215
|
+
fallbackLocale: n,
|
|
215
216
|
pluralRules: r?.pluralRules && { ...r.pluralRules },
|
|
216
217
|
...r?.missingWarn === !1 && { missingWarn: !1, fallbackWarn: !1 },
|
|
217
218
|
messages: {}
|
|
218
|
-
}),
|
|
219
|
-
function
|
|
219
|
+
}), pt = (e) => typeof e == "object" && e !== null && "component" in e && "slots" in e;
|
|
220
|
+
function me(e, n) {
|
|
220
221
|
return e.map((r) => ({
|
|
221
222
|
...r,
|
|
222
|
-
meta: { ...r.meta, feature:
|
|
223
|
-
...r.children && { children:
|
|
223
|
+
meta: { ...r.meta, feature: n },
|
|
224
|
+
...r.children && { children: me(r.children, n) }
|
|
224
225
|
}));
|
|
225
226
|
}
|
|
226
|
-
const
|
|
227
|
-
function
|
|
228
|
-
const { platform:
|
|
227
|
+
const de = (e) => [...new Set(e)];
|
|
228
|
+
function Tt(e) {
|
|
229
|
+
const { platform: n } = e, r = e.locale?.supported ?? Object.keys(oe), i = e.locale?.fallback ?? "en", w = e.shell === void 0 ? void 0 : pt(e.shell) ? e.shell : { component: e.shell, slots: void 0, progress: void 0 }, v = [];
|
|
229
230
|
r.includes(i) || v.push({ owner: "application", message: `the fallback locale "${i}" is not among the supported locales (${r.join(", ")}).` });
|
|
230
231
|
for (const t of Object.keys(e.locale?.flags ?? {}))
|
|
231
232
|
r.includes(t) || v.push({ owner: "application", message: `locale.flags names the locale "${t}", which is not among the supported locales (${r.join(", ")}).` });
|
|
232
|
-
const
|
|
233
|
-
r.includes(
|
|
234
|
-
const R = [
|
|
233
|
+
const E = e.locale?.initial ?? (r.includes(n.config.locale) ? n.config.locale : i);
|
|
234
|
+
r.includes(E) || v.push({ owner: "application", message: `the initial locale "${E}" is not among the supported locales (${r.join(", ")}).` });
|
|
235
|
+
const R = [Ue, Pe, ze, Ge, He, ae, ne, re, ie, ce, le], j = ft({
|
|
235
236
|
features: e.features,
|
|
236
|
-
platform:
|
|
237
|
+
platform: n,
|
|
237
238
|
messages: e.messages ?? [],
|
|
238
239
|
reservedContexts: R,
|
|
239
240
|
supportedLocales: r,
|
|
240
241
|
shellSlots: w?.slots
|
|
241
|
-
}), M = [...v, ...j.issues], l = j.features, m =
|
|
242
|
-
l.flatMap((t) => t.navigation.map((
|
|
242
|
+
}), M = [...v, ...j.issues], l = j.features, m = st(
|
|
243
|
+
l.flatMap((t) => t.navigation.map((a) => ({ feature: t.id, binding: a }))),
|
|
243
244
|
e.navigation
|
|
244
245
|
);
|
|
245
246
|
for (const t of m.issues) M.push({ owner: "navigation", message: t });
|
|
246
|
-
if (M.length > 0) throw new
|
|
247
|
-
const h =
|
|
248
|
-
for (const [t,
|
|
249
|
-
for (const [t,
|
|
250
|
-
const
|
|
247
|
+
if (M.length > 0) throw new ue(M);
|
|
248
|
+
const h = dt(E, i, e.i18n), u = h.global;
|
|
249
|
+
for (const [t, a] of Object.entries(oe)) u.mergeLocaleMessage(t, a);
|
|
250
|
+
for (const [t, a] of Object.entries(e.i18n?.messages ?? {})) u.mergeLocaleMessage(t, a);
|
|
251
|
+
const k = qe({ locale: () => u.locale.value, formatters: e.formatting }), $ = [...l.flatMap((t) => t.messages), ...e.messages ?? []], x = (t) => (e.onError ?? mt)({ ...t, route: s.currentRoute.value.matched.length > 0 ? s.currentRoute.value.fullPath : null }), A = We({
|
|
251
252
|
target: u,
|
|
252
253
|
namespaces: $,
|
|
253
254
|
fallback: i,
|
|
254
255
|
supported: r,
|
|
255
256
|
onFailure: (t) => x({ source: "messages", error: t.error, detail: `${t.namespace} (${t.locale})`, feature: o.get(t.namespace) })
|
|
256
|
-
}), o = new Map(l.flatMap((t) => t.messages.map((
|
|
257
|
-
history: e.router?.history ??
|
|
258
|
-
routes: l.flatMap((t) =>
|
|
259
|
-
scrollBehavior: e.router?.scrollBehavior ?? ((t,
|
|
257
|
+
}), o = new Map(l.flatMap((t) => t.messages.map((a) => [a.namespace, t.id]))), s = Fe({
|
|
258
|
+
history: e.router?.history ?? Ze(),
|
|
259
|
+
routes: l.flatMap((t) => me(t.routes, t.id)),
|
|
260
|
+
scrollBehavior: e.router?.scrollBehavior ?? ((t, a) => t.name === a.name ? !1 : { top: 0 })
|
|
260
261
|
}), c = e.router?.login ?? { name: "login" }, d = e.router?.home ?? { path: "/" }, L = [], H = (t) => {
|
|
261
262
|
try {
|
|
262
263
|
return s.resolve(t).matched.length > 0 ? null : "matches no route";
|
|
263
|
-
} catch (
|
|
264
|
-
const f =
|
|
264
|
+
} catch (a) {
|
|
265
|
+
const f = a instanceof Error ? a.message : String(a);
|
|
265
266
|
return f.startsWith("No match for") ? "matches no route" : `cannot be resolved (${f})`;
|
|
266
267
|
}
|
|
267
268
|
};
|
|
268
|
-
if (l.some((t) => t.routes.some((
|
|
269
|
+
if (l.some((t) => t.routes.some((a) => a.meta?.public !== !0))) {
|
|
269
270
|
const t = H(c) ?? (s.resolve(c).meta.public === !0 ? null : "is not public (meta.public: true)");
|
|
270
271
|
t && L.push({ owner: "application", message: `the login route ${JSON.stringify(c)} ${t.replace("matches no route", "does not exist")}, but protected routes are installed: an anonymous visitor would have nowhere to go. Install a feature with the login route or set router.login.` });
|
|
271
272
|
}
|
|
272
|
-
for (const { feature: t, binding:
|
|
273
|
-
const f = H(
|
|
274
|
-
f && L.push({ owner: `feature "${t}"`, message: `the destination "${
|
|
273
|
+
for (const { feature: t, binding: a } of m.destinations.values()) {
|
|
274
|
+
const f = H(a.to);
|
|
275
|
+
f && L.push({ owner: `feature "${t}"`, message: `the destination "${a.destination}" is bound to ${JSON.stringify(a.to)}, which ${f}.` });
|
|
275
276
|
}
|
|
276
|
-
if (L.length > 0) throw new
|
|
277
|
-
const N =
|
|
277
|
+
if (L.length > 0) throw new ue(L);
|
|
278
|
+
const N = Ne({ status: "idle" }), F = {
|
|
278
279
|
state: N,
|
|
279
|
-
locale:
|
|
280
|
+
locale: Ke(() => u.locale.value),
|
|
280
281
|
locales: r,
|
|
281
282
|
localeFlags: e.locale?.flags ?? {},
|
|
282
283
|
setLocale: async (t) => {
|
|
283
|
-
const
|
|
284
|
-
if (f && u.locale.value !==
|
|
285
|
-
const b = (
|
|
284
|
+
const a = u.locale.value, f = await A.setLocale(t);
|
|
285
|
+
if (f && u.locale.value !== a) {
|
|
286
|
+
const b = (O) => x({ source: "locale", error: O, detail: t });
|
|
286
287
|
try {
|
|
287
288
|
Promise.resolve(e.locale?.onChange?.(t)).catch(b);
|
|
288
|
-
} catch (
|
|
289
|
-
b(
|
|
289
|
+
} catch (O) {
|
|
290
|
+
b(O);
|
|
290
291
|
}
|
|
291
292
|
}
|
|
292
293
|
return f;
|
|
293
294
|
},
|
|
294
|
-
retry: () =>
|
|
295
|
-
},
|
|
296
|
-
contributions: l.flatMap((t) => t.contributions.map((
|
|
297
|
-
effects: l.flatMap((t) => t.effects.map((
|
|
298
|
-
}, V =
|
|
299
|
-
effects:
|
|
300
|
-
platform:
|
|
295
|
+
retry: () => D()
|
|
296
|
+
}, I = {
|
|
297
|
+
contributions: l.flatMap((t) => t.contributions.map((a) => ({ feature: t.id, contribution: a }))),
|
|
298
|
+
effects: l.flatMap((t) => t.effects.map((a) => ({ feature: t.id, effect: a })))
|
|
299
|
+
}, V = ct({
|
|
300
|
+
effects: I.effects,
|
|
301
|
+
platform: n,
|
|
301
302
|
sessionKey: e.sessionKey,
|
|
302
|
-
onError: (t,
|
|
303
|
-
}),
|
|
304
|
-
async function
|
|
305
|
-
const
|
|
306
|
-
await A.load(
|
|
303
|
+
onError: (t, a) => x({ source: "effect", error: t, feature: a.feature, detail: a.effect.id })
|
|
304
|
+
}), he = new Map(l.map((t) => [t.id, t.messages.map((a) => a.namespace)])), G = (t) => de(I.contributions.filter(({ contribution: a }) => a.scope === t).flatMap(({ contribution: a }) => a.messages ?? [])), ge = G("always"), we = G("authenticated");
|
|
305
|
+
async function ve(t) {
|
|
306
|
+
const a = t.matched.flatMap((b) => [...he.get(b.meta.feature ?? "") ?? [], ...b.meta.messages ?? []]), f = n.session.state.value.status === "authenticated";
|
|
307
|
+
await A.load(de([...a, ...ge, ...f ? we : []]));
|
|
307
308
|
}
|
|
308
309
|
let T = null;
|
|
309
310
|
function q(t) {
|
|
310
|
-
const
|
|
311
|
+
const a = t.meta.titleKey, f = T?.documentTitle.value ?? (a && u.te(a) ? u.t(a) : null), b = (e.router?.documentTitle ?? ht)(f, n.config.appName);
|
|
311
312
|
b !== "" && (document.title = b);
|
|
312
313
|
}
|
|
313
|
-
const
|
|
314
|
+
const ye = ot({ session: n.session, router: s, i18n: u, destinations: m.destinations }), $e = rt(I.contributions, n.session), be = Xe({ router: s, access: n.access, noAccess: e.noAccess ?? et }), Ee = pe({
|
|
314
315
|
name: "ApplicationRoot",
|
|
315
316
|
setup() {
|
|
316
317
|
return () => {
|
|
317
318
|
const t = N.value;
|
|
318
|
-
return t.status === "failed" ? se(
|
|
319
|
+
return t.status === "failed" ? se(ut, { kind: t.kind, onRetry: () => void D() }) : t.status !== "ready" ? null : se(w?.component ?? Ye);
|
|
319
320
|
};
|
|
320
321
|
}
|
|
321
|
-
}), p =
|
|
322
|
-
|
|
323
|
-
for (const t of l) for (const { key:
|
|
322
|
+
}), p = Oe(Ee);
|
|
323
|
+
Qe(p, n), p.use(h), De(p, k), T = Je(p), Ve(p), Te(p), e.icons && Be(p, ...Array.isArray(e.icons) ? e.icons : [e.icons]), p.provide(ie, F), e.describeError && p.provide(ce, e.describeError), e.describeFieldError && p.provide(le, e.describeFieldError), p.provide(ae, ye), p.provide(ne, $e), p.provide(re, be);
|
|
324
|
+
for (const t of l) for (const { key: a, value: f } of t.contexts) p.provide(a, f);
|
|
324
325
|
let S = !1, J = !1, z = !1, Q = !1;
|
|
325
|
-
const
|
|
326
|
-
function
|
|
326
|
+
const K = [];
|
|
327
|
+
function ke() {
|
|
327
328
|
const t = p.config.errorHandler;
|
|
328
|
-
p.config.errorHandler = (y,
|
|
329
|
-
x({ source: "vue", error: y, detail: Y }), t?.(y,
|
|
329
|
+
p.config.errorHandler = (y, xe, Y) => {
|
|
330
|
+
x({ source: "vue", error: y, detail: Y }), t?.(y, xe, Y);
|
|
330
331
|
};
|
|
331
|
-
const
|
|
332
|
+
const a = (y) => x({ source: "unhandledrejection", error: y.reason }), f = (y) => {
|
|
332
333
|
y.error && x({ source: "window", error: y.error });
|
|
333
334
|
};
|
|
334
|
-
window.addEventListener("unhandledrejection",
|
|
335
|
-
window.removeEventListener("unhandledrejection",
|
|
335
|
+
window.addEventListener("unhandledrejection", a), window.addEventListener("error", f), K.push(() => {
|
|
336
|
+
window.removeEventListener("unhandledrejection", a), window.removeEventListener("error", f);
|
|
336
337
|
});
|
|
337
338
|
const b = l.some((y) => y.holdsExpiredSession);
|
|
338
|
-
|
|
339
|
-
|
|
339
|
+
n.session.holdExpired(b), K.push(() => n.session.holdExpired(!1)), K.push(
|
|
340
|
+
tt({
|
|
340
341
|
router: s,
|
|
341
|
-
session:
|
|
342
|
+
session: n.session,
|
|
342
343
|
login: c,
|
|
343
344
|
home: d,
|
|
344
345
|
holdExpired: b,
|
|
345
|
-
prepare:
|
|
346
|
+
prepare: ve,
|
|
346
347
|
afterNavigation: q,
|
|
347
348
|
progress: e.router?.progress ?? w?.progress,
|
|
348
349
|
onError: (y) => x({ source: "router", error: y })
|
|
349
350
|
})
|
|
350
351
|
);
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
const X =
|
|
352
|
+
const O = P();
|
|
353
|
+
O.run(() => W(() => T?.documentTitle.value, () => q(s.currentRoute.value))), K.push(() => O.stop());
|
|
354
|
+
const X = P();
|
|
354
355
|
X.run(
|
|
355
|
-
() =>
|
|
356
|
+
() => W(
|
|
356
357
|
() => u.locale.value,
|
|
357
358
|
(y) => {
|
|
358
359
|
document.documentElement.lang = y, q(s.currentRoute.value);
|
|
359
360
|
},
|
|
360
361
|
{ immediate: !0 }
|
|
361
362
|
)
|
|
362
|
-
),
|
|
363
|
+
), K.push(() => X.stop());
|
|
363
364
|
}
|
|
364
|
-
const _ = (t,
|
|
365
|
-
N.value = { status: "failed", kind: t, error:
|
|
365
|
+
const _ = (t, a) => {
|
|
366
|
+
N.value = { status: "failed", kind: t, error: a };
|
|
366
367
|
};
|
|
367
368
|
async function U() {
|
|
368
369
|
N.value = { status: "starting" };
|
|
369
|
-
const t = await
|
|
370
|
+
const t = await n.session.restore();
|
|
370
371
|
if (S) return;
|
|
371
372
|
if (t.status === "failed") return _("session", t.error);
|
|
372
|
-
const
|
|
373
|
+
const a = await A.loadEssential();
|
|
373
374
|
if (!S) {
|
|
374
|
-
if (
|
|
375
|
+
if (a.length > 0) return _("messages", a[0].error);
|
|
375
376
|
try {
|
|
376
377
|
const f = await s.replace(s.options.history.location);
|
|
377
378
|
if (S) return;
|
|
378
|
-
if (
|
|
379
|
+
if (Ie(f)) return _("startup", f);
|
|
379
380
|
} catch (f) {
|
|
380
381
|
S || _("startup", f);
|
|
381
382
|
return;
|
|
@@ -383,7 +384,7 @@ function _t(e) {
|
|
|
383
384
|
Q || (p.use(s), Q = !0), N.value = { status: "ready" }, V.start();
|
|
384
385
|
}
|
|
385
386
|
}
|
|
386
|
-
async function
|
|
387
|
+
async function D() {
|
|
387
388
|
S || N.value.status !== "failed" || (await A.retry(), await U());
|
|
388
389
|
}
|
|
389
390
|
return {
|
|
@@ -391,36 +392,36 @@ function _t(e) {
|
|
|
391
392
|
router: s,
|
|
392
393
|
i18n: h,
|
|
393
394
|
state: N,
|
|
394
|
-
locale:
|
|
395
|
-
setLocale:
|
|
395
|
+
locale: F.locale,
|
|
396
|
+
setLocale: F.setLocale,
|
|
396
397
|
async mount(t) {
|
|
397
398
|
if (S) throw new Error("This application was disposed; create a new one with createApplication().");
|
|
398
399
|
if (J) throw new Error("This application is already mounted.");
|
|
399
|
-
J = !0,
|
|
400
|
+
J = !0, ke(), await U(), !S && (p.mount(t), z = !0);
|
|
400
401
|
},
|
|
401
|
-
retry:
|
|
402
|
+
retry: D,
|
|
402
403
|
dispose() {
|
|
403
404
|
if (!S) {
|
|
404
405
|
S = !0, V.dispose(), A.dispose(), z && p.unmount();
|
|
405
|
-
for (const t of
|
|
406
|
+
for (const t of K.reverse()) t();
|
|
406
407
|
s.options.history.destroy();
|
|
407
408
|
}
|
|
408
409
|
}
|
|
409
410
|
};
|
|
410
411
|
}
|
|
411
|
-
function
|
|
412
|
+
function mt(e) {
|
|
412
413
|
console.error(`[vue-core] ${e.source}${e.feature ? ` (${e.feature})` : ""}${e.detail ? `: ${e.detail}` : ""}`, e.error);
|
|
413
414
|
}
|
|
414
|
-
function
|
|
415
|
-
return [e,
|
|
415
|
+
function ht(e, n) {
|
|
416
|
+
return [e, n].filter((r) => !!r).join(" · ");
|
|
416
417
|
}
|
|
417
418
|
export {
|
|
418
|
-
|
|
419
|
-
|
|
419
|
+
ue as ApplicationError,
|
|
420
|
+
Pt as ShellOutlet,
|
|
420
421
|
ie as applicationKey,
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
422
|
+
Tt as createApplication,
|
|
423
|
+
Vt as defineFeature,
|
|
424
|
+
zt as keepSessionAlive,
|
|
425
|
+
Gt as provideContext,
|
|
426
|
+
Bt as useApplication
|
|
426
427
|
};
|
package/dist/collection/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { D as O, L as j, a as U, h as G, l as X, r as Z } from "../http-D_D9YbLH.js";
|
|
2
|
-
import { _ as H, a as J, u as K } from "../CollectionPage.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as H, a as J, u as K } from "../CollectionPage.vue_vue_type_script_setup_true_lang-B17cUOzj.js";
|
|
3
3
|
import { u as W, a as Y } from "../neighbors-DVN_cADL.js";
|
|
4
4
|
import { a as te, b as se } from "../rowLayout-D1cYQghV.js";
|
|
5
5
|
import { _ as ae } from "../DataTable.vue_vue_type_script_setup_true_lang-ChS9ULwk.js";
|