@wssto2/vue-core 0.8.0 → 0.9.1

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.
Files changed (103) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-CkomzGrt.js → AccessGate.vue_vue_type_script_setup_true_lang-B8gpkhbw.js} +1 -1
  3. package/dist/{Activity-Cm1dlM2b.js → Activity-CfG8_Pp3.js} +7 -7
  4. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-9Lt1XggN.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-DC-zSRcl.js} +1 -1
  5. package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-GxAsImnO.js → AsyncSection.vue_vue_type_script_setup_true_lang-BTIUz3cG.js} +1 -1
  6. package/dist/{Button.vue_vue_type_script_setup_true_lang-DQq_0P0p.js → Button.vue_vue_type_script_setup_true_lang-Dn-cJcj3.js} +67 -65
  7. package/dist/{Changes-fN0KMYbW.js → Changes-BT__0XX0.js} +6 -6
  8. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang--onFdKOB.js → CollectionPage.vue_vue_type_script_setup_true_lang-Bcwwr8ng.js} +7 -7
  9. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-CTukf2B2.js → DataTable.vue_vue_type_script_setup_true_lang-CJlllQII.js} +1 -1
  10. package/dist/{DateField.vue_vue_type_script_setup_true_lang-DmYp54mq.js → DateField.vue_vue_type_script_setup_true_lang-BuQY5e5x.js} +2 -2
  11. package/dist/{DeadLetters-BslDh93e.js → DeadLetters-Btv3u3qh.js} +4 -4
  12. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-BTADNpwB.js → FormGroup.vue_vue_type_script_setup_true_lang-Bzm3yJy5.js} +1 -1
  13. package/dist/{General-DJ53Egpp.js → General-Cum9U4Z3.js} +6 -6
  14. package/dist/{IncidentRecord-DQTnYQEe.js → IncidentRecord-C4K8hDJ1.js} +10 -10
  15. package/dist/{IncidentsList-C3yUnwwY.js → IncidentsList-BHfJ1cbg.js} +6 -6
  16. package/dist/{Modal.vue_vue_type_script_setup_true_lang-4MsnTWyx.js → Modal.vue_vue_type_script_setup_true_lang-BqO9X_-u.js} +1 -1
  17. package/dist/{NewRolePage-Bw2_jXcQ.js → NewRolePage-BSvYZkH4.js} +4 -4
  18. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-C3nw944P.js → NumberField.vue_vue_type_script_setup_true_lang-CLN2COfp.js} +1 -1
  19. package/dist/{PageBar.vue_vue_type_script_setup_true_lang-DPpcZxuT.js → PageBar.vue_vue_type_script_setup_true_lang-OE8VgTkY.js} +1 -1
  20. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-07pq4SrY.js → PersonAccess.vue_vue_type_script_setup_true_lang-CBQ1kv8G.js} +7 -7
  21. package/dist/{ProfilePage-DxALOfzC.js → ProfilePage-Dnn_VUoB.js} +13 -13
  22. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-DPm9q1P_.js → RecordHeader.vue_vue_type_script_setup_true_lang-CU7fZpp2.js} +1 -1
  23. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Cm3tx76N.js → ResourcePage.vue_vue_type_script_setup_true_lang-y3gyR5A-.js} +3 -3
  24. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-DuQR8hFf.js → RoleEditor.vue_vue_type_script_setup_true_lang-BcUxVL9y.js} +5 -5
  25. package/dist/{RolePage-Yv6m6u7o.js → RolePage-BIY9dEME.js} +10 -10
  26. package/dist/{RolesPage-TibtzxzQ.js → RolesPage-Be35CA_4.js} +5 -5
  27. package/dist/{SectionList.vue_vue_type_script_setup_true_lang-DAnZbfWA.js → SectionList.vue_vue_type_script_setup_true_lang-DzoE_o8v.js} +1 -1
  28. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-ivdGWUeF.js → SectionNavigator.vue_vue_type_script_setup_true_lang-CWPD9zQJ.js} +3 -3
  29. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-iJm8qmjT.js → SelectField.vue_vue_type_script_setup_true_lang-CYiarLAK.js} +1 -1
  30. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-en2w_pAJ.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CKIq1Ljb.js} +7 -7
  31. package/dist/{ServiceAccountRecord-B_amE8fL.js → ServiceAccountRecord-QsIfylwj.js} +13 -13
  32. package/dist/{ServiceAccountsList-CoDKG_15.js → ServiceAccountsList-CVDIhuCh.js} +7 -7
  33. package/dist/{SessionList.vue_vue_type_script_setup_true_lang-BEKTaL0g.js → SessionList.vue_vue_type_script_setup_true_lang-CkN7vR71.js} +3 -3
  34. package/dist/{Sessions-BrAEXAMA.js → Sessions-Cl2DTM7s.js} +5 -5
  35. package/dist/{SettingsPage-Cje1X0ix.js → SettingsPage-B2uWw27O.js} +10 -10
  36. package/dist/{SignIn-CbWgDlFb.js → SignIn-BHYFSMOX.js} +5 -5
  37. package/dist/{SignInPage-DmHdrZR-.js → SignInPage--OC0hQ8M.js} +3 -3
  38. package/dist/{SignIns-D5BRb9Sr.js → SignIns-CJ09NqOn.js} +5 -5
  39. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-BwoE08jT.js → TimeField.vue_vue_type_script_setup_true_lang-B140Gjqd.js} +2 -2
  40. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-u53rHMFG.js → Timestamp.vue_vue_type_script_setup_true_lang-CAz2W69d.js} +1 -1
  41. package/dist/{UserRecord-rIeTkocJ.js → UserRecord-BjXUcHo8.js} +9 -9
  42. package/dist/{UsersList-CiPeerC7.js → UsersList-D4-eC5tC.js} +9 -9
  43. package/dist/access/index.js +4 -4
  44. package/dist/app/application.d.ts +4 -2
  45. package/dist/app/index.js +2 -2
  46. package/dist/application-DtY0ef-w.js +420 -0
  47. package/dist/button/index.js +1 -1
  48. package/dist/button/shortcut.d.ts +7 -0
  49. package/dist/client/client.d.ts +33 -0
  50. package/dist/client/disposition.d.ts +5 -0
  51. package/dist/client/index.d.ts +1 -1
  52. package/dist/client/index.js +1 -1
  53. package/dist/client-Dr2vV3qH.js +193 -0
  54. package/dist/collection/index.js +5 -5
  55. package/dist/content/Money.vue.d.ts +31 -0
  56. package/dist/content/index.d.ts +1 -0
  57. package/dist/content/index.js +75 -40
  58. package/dist/{contributions-BQ9dZoRw.js → contributions-DGsAIWd8.js} +1 -1
  59. package/dist/{fieldMessages-DTXpWnBd.js → fieldMessages-6UTV9yWL.js} +1 -1
  60. package/dist/form/EditorPage.vue.d.ts +6 -0
  61. package/dist/form/FileField.vue.d.ts +1 -1
  62. package/dist/form/PhotoField.vue.d.ts +1 -1
  63. package/dist/form/index.js +108 -108
  64. package/dist/format/format.d.ts +9 -1
  65. package/dist/format/index.js +1 -1
  66. package/dist/format-Dn-BOb-o.js +86 -0
  67. package/dist/{guards-BFCulig0.js → guards-Cz7TOQD8.js} +1 -1
  68. package/dist/identity/index.js +1 -1
  69. package/dist/incidents/index.js +1 -1
  70. package/dist/{index-B_lzrZot.js → index-BB0_hxmE.js} +16 -16
  71. package/dist/{index-BQg5X6iK.js → index-C1jSzT1V.js} +7 -7
  72. package/dist/{index-Cgu6Ntok.js → index-DZQ3gy3e.js} +8 -8
  73. package/dist/index.d.ts +1 -1
  74. package/dist/index.js +1 -1
  75. package/dist/modal/index.js +15 -15
  76. package/dist/{navigation-BSC9X7FM.js → navigation-CWj6F_cV.js} +1 -1
  77. package/dist/{neighbors-BKzihEGQ.js → neighbors-CcCaurV5.js} +1 -1
  78. package/dist/notifications/index.js +1 -1
  79. package/dist/page/index.js +5 -5
  80. package/dist/platform/index.js +3 -3
  81. package/dist/{platform-Dr4iY3b8.js → platform-BZUWAXQV.js} +1 -1
  82. package/dist/pwa/index.d.ts +2 -0
  83. package/dist/pwa/index.js +51 -0
  84. package/dist/pwa/install.d.ts +12 -0
  85. package/dist/pwa/worker.d.ts +13 -0
  86. package/dist/resource/index.js +1 -1
  87. package/dist/router/index.js +3 -3
  88. package/dist/{rowLayout-XlTcD4de.js → rowLayout-BLhJ9-42.js} +2 -2
  89. package/dist/{sections-BXg4_ZhO.js → sections-CmqFs-U-.js} +1 -1
  90. package/dist/shell/index.js +3 -3
  91. package/dist/state/index.js +1 -1
  92. package/dist/{state-ChVIjayU.js → state-BiYPPKoj.js} +1 -1
  93. package/dist/{status-BV5Ae4K4.js → status-Bf4nfIe0.js} +1 -1
  94. package/dist/styles.css +1 -1
  95. package/dist/testing/index.js +2 -2
  96. package/dist/{useCommand-BIZX1ReM.js → useCommand-C3QTZIIw.js} +1 -1
  97. package/dist/{useGroupSheet-DxXzdKo3.js → useGroupSheet-LAnO37WV.js} +2 -2
  98. package/dist/{useRecordDialog-BLVSz7g3.js → useRecordDialog-Da1Sfak1.js} +1 -1
  99. package/dist/{useTypedEntry-CKuGqWT8.js → useTypedEntry-DIYdA7DK.js} +1 -1
  100. package/package.json +5 -1
  101. package/dist/application-D8Nm17zA.js +0 -420
  102. package/dist/client-CZgikXPG.js +0 -151
  103. package/dist/format-D8X4zsx6.js +0 -78
@@ -1,5 +1,5 @@
1
1
  import { shallowRef as t } from "vue";
2
- import { u as o } from "./useCommand-BIZX1ReM.js";
2
+ import { u as o } from "./useCommand-C3QTZIIw.js";
3
3
  function f(r) {
4
4
  const u = t(null);
5
5
  let n = null;
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as K, ref as L, watch as re, computed as _, openBlock as f, createElementBlock as b, Fragment as I, createElementVNode as h, normalizeClass as $, unref as y, createVNode as N, createTextVNode as Ee, toDisplayString as M, renderList as j, useModel as ce, useId as Te, useTemplateRef as me, createCommentVNode as Z, createBlock as ue, mergeModels as fe, nextTick as Ce, onMounted as Fe, onBeforeUnmount as je, normalizeStyle as ee, withCtx as ye } from "vue";
2
2
  import { i as W } from "./intlLocale-CeRU44qJ.js";
3
3
  import { useI18n as X } from "vue-i18n";
4
- import { u as Me } from "./format-D8X4zsx6.js";
4
+ import { u as Me } from "./format-Dn-BOb-o.js";
5
5
  import { _ as Oe } from "./Sheet.vue_vue_type_script_setup_true_lang-sh9YD0Pm.js";
6
6
  import { _ as F } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
7
7
  import { a as We } from "./mediaQuery-CygcXmFW.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wssto2/vue-core",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "goCore": "v1.12.0",
5
5
  "description": "Shared Vue 3 library for go-core applications: app shell, list / record / form pages and their controls.",
6
6
  "keywords": [
@@ -129,6 +129,10 @@
129
129
  "types": "./dist/push-worker/index.d.ts",
130
130
  "import": "./dist/push-worker/index.js"
131
131
  },
132
+ "./pwa": {
133
+ "types": "./dist/pwa/index.d.ts",
134
+ "import": "./dist/pwa/index.js"
135
+ },
132
136
  "./testing": {
133
137
  "types": "./dist/testing/index.d.ts",
134
138
  "import": "./dist/testing/index.js"
@@ -1,420 +0,0 @@
1
- var Se = Object.defineProperty;
2
- var xe = (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) => xe(e, typeof n != "symbol" ? n + "" : n, r);
4
- import { effectScope as P, watch as W, defineComponent as pe, openBlock as Me, createElementBlock as Le, createVNode as ee, unref as _, withCtx as te, createTextVNode as je, toDisplayString as Ae, shallowRef as Ne, computed as Ke, h as se, createApp as Oe } from "vue";
5
- import { useI18n as _e, createI18n as Ce } 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-D8X4zsx6.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-BhhsFYwp.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-Dr4iY3b8.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-BHzZtZ50.js";
16
- import { i as tt } from "./guards-BFCulig0.js";
17
- import { b as st, c as ot, n as ae } from "./navigation-BSC9X7FM.js";
18
- import { c as rt, s as ne } from "./contributions-BQ9dZoRw.js";
19
- import { a as ie } from "./environment-Dva-SG8D.js";
20
- import { b as ce, c as le } from "./describeError-BqGAUZgX.js";
21
- import { _ as at } from "./Button.vue_vue_type_script_setup_true_lang-DQq_0P0p.js";
22
- import { _ as nt } from "./EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js";
23
- import { i as it } from "./feature-DdUAfyi4.js";
24
- function ct(e) {
25
- const { platform: n } = e, r = P();
26
- let i = null, v = null, y = !1;
27
- function E(l, m) {
28
- const h = new AbortController(), u = { controller: h, stops: [] };
29
- for (const k of l)
30
- try {
31
- const b = m(k, h.signal);
32
- typeof b == "function" && u.stops.push({ owned: k, stop: b });
33
- } catch (b) {
34
- e.onError(b, k);
35
- }
36
- return u;
37
- }
38
- function x(l) {
39
- if (l) {
40
- l.controller.abort();
41
- for (const { owned: m, stop: h } of l.stops.reverse())
42
- try {
43
- h();
44
- } catch (u) {
45
- e.onError(u, m);
46
- }
47
- }
48
- }
49
- const j = (l) => e.effects.filter((m) => m.effect.scope === l), M = (l) => l.status !== "authenticated" ? null : e.sessionKey ? e.sessionKey(l) : String(l.user.id);
50
- return {
51
- start() {
52
- if (y || i) return;
53
- i = E(
54
- j("app"),
55
- (m, h) => m.effect.start({ signal: h, platform: n, report: (u) => e.onError(u, m) })
56
- );
57
- const l = j("session");
58
- r.run(
59
- () => W(
60
- () => M(n.session.state.value),
61
- (m) => {
62
- x(v), v = null;
63
- const h = n.session.state.value;
64
- m === null || h.status !== "authenticated" || (v = E(
65
- l,
66
- (u, k) => u.effect.start({ signal: k, platform: n, user: h.user, report: (b) => e.onError(b, u) })
67
- ));
68
- },
69
- { immediate: !0, flush: "sync" }
70
- )
71
- );
72
- },
73
- dispose() {
74
- y || (y = !0, r.stop(), x(v), x(i), v = i = null);
75
- }
76
- };
77
- }
78
- const lt = { class: "mx-auto flex min-h-screen max-w-content items-center justify-center p-screen-padding" }, ut = /* @__PURE__ */ pe({
79
- __name: "StartupFailure",
80
- props: {
81
- kind: {}
82
- },
83
- emits: ["retry"],
84
- setup(e) {
85
- const { t: n } = _e();
86
- return (r, i) => (Me(), Le("div", lt, [
87
- ee(_(nt), {
88
- title: _(n)("core.startup.title"),
89
- description: _(n)(e.kind === "startup" ? "core.startup.other" : `core.startup.${e.kind}`),
90
- icon: "errorWarningLine"
91
- }, {
92
- actions: te(() => [
93
- ee(_(at), {
94
- prominence: "primary",
95
- icon: "refreshLine",
96
- onClick: i[0] || (i[0] = (v) => r.$emit("retry"))
97
- }, {
98
- default: te(() => [
99
- je(Ae(_(n)("core.actions.retry")), 1)
100
- ]),
101
- _: 1
102
- })
103
- ]),
104
- _: 1
105
- }, 8, ["title", "description"])
106
- ]));
107
- }
108
- });
109
- class ue extends Error {
110
- constructor(r) {
111
- super(`The application composition is invalid:
112
- ${r.map((i) => ` - [${i.owner}] ${i.message}`).join(`
113
- `)}`);
114
- Z(this, "issues");
115
- this.name = "ApplicationError", this.issues = r;
116
- }
117
- }
118
- const fe = "application", w = (e) => `feature "${e.id}"`;
119
- function* B(e, n = "") {
120
- for (const r of e) {
121
- const i = r.path.startsWith("/") ? r.path : `${n.replace(/\/$/, "")}/${r.path}`;
122
- yield { record: r, path: i }, r.children && (yield* B(r.children, i));
123
- }
124
- }
125
- function ft(e) {
126
- const n = [], r = (o, s) => n.push({ owner: o, message: s }), i = [];
127
- e.features.forEach((o, s) => {
128
- it(o) ? i.push(o) : r(fe, `features[${s}] was not created with defineFeature().`);
129
- });
130
- const v = /* @__PURE__ */ new Map();
131
- for (const o of i)
132
- v.has(o.id) ? r(w(o), `the feature id "${o.id}" is used twice in the features list.`) : v.set(o.id, o);
133
- for (const o of i)
134
- for (const s of o.requires)
135
- v.has(s) || r(w(o), `requires the feature "${s}", which is not in the features list.`);
136
- const y = [], E = /* @__PURE__ */ new Set(), x = (o) => {
137
- if (E.has(o.id)) return;
138
- const s = y.indexOf(o.id);
139
- if (s !== -1) {
140
- r(w(o), `requirements form a cycle: ${[...y.slice(s), o.id].join(" -> ")}.`), E.add(o.id);
141
- return;
142
- }
143
- y.push(o.id);
144
- for (const c of o.requires) {
145
- const f = v.get(c);
146
- f && x(f);
147
- }
148
- y.pop(), E.add(o.id);
149
- };
150
- i.forEach(x);
151
- const j = new Set(e.platform.config.capabilities);
152
- for (const o of i)
153
- for (const s of o.backend)
154
- j.has(s) || r(w(o), `needs the backend capability "${s}", which the server does not report.`);
155
- const M = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
156
- for (const o of i) {
157
- for (const s of o.routes) {
158
- const c = s.path.length > 1 ? s.path.replace(/\/$/, "") : s.path, f = l.get(c);
159
- f ? r(w(o), `declares the path "${s.path}", which feature "${f.id}" declares too.`) : l.set(c, o);
160
- }
161
- for (const { record: s } of B(o.routes)) {
162
- if (s.meta && "feature" in s.meta && r(w(o), `the route "${String(s.name ?? s.path)}" sets meta.feature, which the runtime owns.`), typeof s.name != "string") continue;
163
- const c = M.get(s.name);
164
- c ? r(w(o), `declares the route name "${s.name}", which feature "${c.id}" declares too.`) : M.set(s.name, o);
165
- }
166
- }
167
- const m = new Set(e.reservedContexts), h = /* @__PURE__ */ new Map();
168
- for (const o of i)
169
- for (const { key: s } of o.contexts) {
170
- const c = s.description ?? "a context";
171
- m.has(s) && r(w(o), `provides the context "${c}", which the runtime provides itself.`);
172
- const f = h.get(s);
173
- f ? r(w(o), `provides the context "${c}", which feature "${f.id}" provides too.`) : h.set(s, o);
174
- }
175
- const u = /* @__PURE__ */ new Map(), k = (o, s) => {
176
- for (const c of s) {
177
- const f = u.get(c.namespace);
178
- f ? r(o, `declares the message namespace "${c.namespace}", which ${f} declares too.`) : u.set(c.namespace, o);
179
- for (const A of Object.keys(c.loaders))
180
- e.supportedLocales.includes(A) || r(o, `the namespace "${c.namespace}" has a loader for "${A}", which is not a supported locale (${e.supportedLocales.join(", ")}).`);
181
- }
182
- };
183
- for (const o of i) k(w(o), o.messages);
184
- k(fe, e.messages);
185
- const b = (o) => u.has(o);
186
- for (const o of i)
187
- for (const { record: s } of B(o.routes))
188
- for (const c of s.meta?.messages ?? [])
189
- b(c) || r(w(o), `the route "${String(s.name ?? s.path)}" needs the message namespace "${c}", which nobody declares.`);
190
- const R = /* @__PURE__ */ new Map();
191
- for (const o of i)
192
- for (const s of o.contributions) {
193
- const c = R.get(s.id);
194
- c ? r(w(o), `declares the shell contribution "${s.id}", which feature "${c.id}" declares too.`) : R.set(s.id, o), e.shellSlots && !s.optional && !e.shellSlots.includes(s.slot) && r(w(o), `contributes "${s.id}" to the slot "${s.slot}", which the shell does not render (it renders ${e.shellSlots.join(", ") || "none"}). Mark it optional to leave it out instead.`);
195
- for (const f of s.messages ?? [])
196
- b(f) || r(w(o), `the contribution "${s.id}" needs the message namespace "${f}", which nobody declares.`);
197
- }
198
- const L = /* @__PURE__ */ new Map();
199
- for (const o of i)
200
- for (const s of o.effects) {
201
- const c = L.get(s.id);
202
- c ? r(w(o), `declares the effect "${s.id}", which feature "${c.id}" declares too.`) : L.set(s.id, o);
203
- const f = s.scope;
204
- f !== "app" && f !== "session" && r(w(o), `the effect "${s.id}" has the scope "${f}"; use "app" or "session".`);
205
- }
206
- return { features: i, issues: n };
207
- }
208
- const dt = (e, n, r) => Ce({
209
- legacy: !1,
210
- locale: e,
211
- fallbackLocale: n,
212
- pluralRules: r?.pluralRules && { ...r.pluralRules },
213
- ...r?.missingWarn === !1 && { missingWarn: !1, fallbackWarn: !1 },
214
- messages: {}
215
- }), pt = (e) => typeof e == "object" && e !== null && "component" in e && "slots" in e;
216
- function me(e, n) {
217
- return e.map((r) => ({
218
- ...r,
219
- meta: { ...r.meta, feature: n },
220
- ...r.children && { children: me(r.children, n) }
221
- }));
222
- }
223
- const de = (e) => [...new Set(e)];
224
- function Tt(e) {
225
- const { platform: n } = e, r = e.locale?.supported ?? Object.keys(oe), i = e.locale?.fallback ?? "en", v = e.shell === void 0 ? void 0 : pt(e.shell) ? e.shell : { component: e.shell, slots: void 0, progress: void 0 }, y = [];
226
- r.includes(i) || y.push({ owner: "application", message: `the fallback locale "${i}" is not among the supported locales (${r.join(", ")}).` });
227
- for (const t of Object.keys(e.locale?.flags ?? {}))
228
- r.includes(t) || y.push({ owner: "application", message: `locale.flags names the locale "${t}", which is not among the supported locales (${r.join(", ")}).` });
229
- const E = e.locale?.initial ?? (r.includes(n.config.locale) ? n.config.locale : i);
230
- r.includes(E) || y.push({ owner: "application", message: `the initial locale "${E}" is not among the supported locales (${r.join(", ")}).` });
231
- const x = [Ue, Pe, ze, Ge, He, ae, ne, re, ie, ce, le], j = ft({
232
- features: e.features,
233
- platform: n,
234
- messages: e.messages ?? [],
235
- reservedContexts: x,
236
- supportedLocales: r,
237
- shellSlots: v?.slots
238
- }), M = [...y, ...j.issues], l = j.features, m = st(
239
- l.flatMap((t) => t.navigation.map((a) => ({ feature: t.id, binding: a }))),
240
- e.navigation
241
- );
242
- for (const t of m.issues) M.push({ owner: "navigation", message: t });
243
- if (M.length > 0) throw new ue(M);
244
- const h = dt(E, i, e.i18n), u = h.global;
245
- for (const [t, a] of Object.entries(oe)) u.mergeLocaleMessage(t, a);
246
- for (const [t, a] of Object.entries(e.i18n?.messages ?? {})) u.mergeLocaleMessage(t, a);
247
- const k = qe({ locale: () => u.locale.value, formatters: e.formatting }), b = [...l.flatMap((t) => t.messages), ...e.messages ?? []], R = (t) => (e.onError ?? mt)({ ...t, route: s.currentRoute.value.matched.length > 0 ? s.currentRoute.value.fullPath : null }), L = We({
248
- target: u,
249
- namespaces: b,
250
- fallback: i,
251
- supported: r,
252
- onFailure: (t) => R({ source: "messages", error: t.error, detail: `${t.namespace} (${t.locale})`, feature: o.get(t.namespace) })
253
- }), o = new Map(l.flatMap((t) => t.messages.map((a) => [a.namespace, t.id]))), s = Fe({
254
- history: e.router?.history ?? Ze(),
255
- routes: l.flatMap((t) => me(t.routes, t.id)),
256
- scrollBehavior: e.router?.scrollBehavior ?? ((t, a) => t.name === a.name ? !1 : { top: 0 })
257
- }), c = e.router?.login ?? { name: "login" }, f = e.router?.home ?? { path: "/" }, A = [], H = (t) => {
258
- try {
259
- return s.resolve(t).matched.length > 0 ? null : "matches no route";
260
- } catch (a) {
261
- const p = a instanceof Error ? a.message : String(a);
262
- return p.startsWith("No match for") ? "matches no route" : `cannot be resolved (${p})`;
263
- }
264
- };
265
- if (l.some((t) => t.routes.some((a) => a.meta?.public !== !0))) {
266
- const t = H(c) ?? (s.resolve(c).meta.public === !0 ? null : "is not public (meta.public: true)");
267
- t && A.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.` });
268
- }
269
- for (const { feature: t, binding: a } of m.destinations.values()) {
270
- const p = H(a.to);
271
- p && A.push({ owner: `feature "${t}"`, message: `the destination "${a.destination}" is bound to ${JSON.stringify(a.to)}, which ${p}.` });
272
- }
273
- if (A.length > 0) throw new ue(A);
274
- const N = Ne({ status: "idle" }), C = {
275
- state: N,
276
- locale: Ke(() => u.locale.value),
277
- locales: r,
278
- localeFlags: e.locale?.flags ?? {},
279
- setLocale: async (t) => {
280
- const a = u.locale.value, p = await L.setLocale(t);
281
- if (p && u.locale.value !== a) {
282
- const g = (O) => R({ source: "locale", error: O, detail: t });
283
- try {
284
- Promise.resolve(e.locale?.onChange?.(t)).catch(g);
285
- } catch (O) {
286
- g(O);
287
- }
288
- }
289
- return p;
290
- },
291
- retry: () => D()
292
- }, I = {
293
- contributions: l.flatMap((t) => t.contributions.map((a) => ({ feature: t.id, contribution: a }))),
294
- effects: l.flatMap((t) => t.effects.map((a) => ({ feature: t.id, effect: a })))
295
- }, V = ct({
296
- effects: I.effects,
297
- platform: n,
298
- sessionKey: e.sessionKey,
299
- onError: (t, a) => R({ source: "effect", error: t, feature: a.feature, detail: a.effect.id })
300
- }), 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");
301
- async function ve(t) {
302
- const a = t.matched.flatMap((g) => [...he.get(g.meta.feature ?? "") ?? [], ...g.meta.messages ?? []]), p = n.session.state.value.status === "authenticated";
303
- await L.load(de([...a, ...ge, ...p ? we : []]));
304
- }
305
- let T = null;
306
- function q(t) {
307
- const a = t.meta.titleKey, p = T?.documentTitle.value ?? (a && u.te(a) ? u.t(a) : null), g = (e.router?.documentTitle ?? ht)(p, n.config.appName);
308
- g !== "" && (document.title = g);
309
- }
310
- 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({
311
- name: "ApplicationRoot",
312
- setup() {
313
- return () => {
314
- const t = N.value;
315
- return t.status === "failed" ? se(ut, { kind: t.kind, onRetry: () => void D() }) : t.status !== "ready" ? null : se(v?.component ?? Ye);
316
- };
317
- }
318
- }), d = Oe(Ee);
319
- Qe(d, n), d.use(h), De(d, k), T = Je(d), Ve(d), Te(d), e.icons && Be(d, ...Array.isArray(e.icons) ? e.icons : [e.icons]), d.provide(ie, C), e.describeError && d.provide(ce, e.describeError), e.describeFieldError && d.provide(le, e.describeFieldError), d.provide(ae, ye), d.provide(ne, $e), d.provide(re, be);
320
- for (const t of l) for (const { key: a, value: p } of t.contexts) d.provide(a, p);
321
- let S = !1, J = !1, z = !1, Q = !1;
322
- const K = [];
323
- function ke() {
324
- const t = d.config.errorHandler;
325
- d.config.errorHandler = ($, Re, Y) => {
326
- R({ source: "vue", error: $, detail: Y }), t?.($, Re, Y);
327
- };
328
- const a = ($) => R({ source: "unhandledrejection", error: $.reason }), p = ($) => {
329
- $.error && R({ source: "window", error: $.error });
330
- };
331
- window.addEventListener("unhandledrejection", a), window.addEventListener("error", p), K.push(() => {
332
- window.removeEventListener("unhandledrejection", a), window.removeEventListener("error", p);
333
- });
334
- const g = l.some(($) => $.holdsExpiredSession);
335
- n.session.holdExpired(g), K.push(() => n.session.holdExpired(!1)), K.push(
336
- tt({
337
- router: s,
338
- session: n.session,
339
- login: c,
340
- home: f,
341
- holdExpired: g,
342
- prepare: ve,
343
- afterNavigation: q,
344
- progress: e.router?.progress ?? v?.progress,
345
- onError: ($) => R({ source: "router", error: $ })
346
- })
347
- );
348
- const O = P();
349
- O.run(() => W(() => T?.documentTitle.value, () => q(s.currentRoute.value))), K.push(() => O.stop());
350
- const X = P();
351
- X.run(
352
- () => W(
353
- () => u.locale.value,
354
- ($) => {
355
- document.documentElement.lang = $, q(s.currentRoute.value);
356
- },
357
- { immediate: !0 }
358
- )
359
- ), K.push(() => X.stop());
360
- }
361
- const F = (t, a) => {
362
- N.value = { status: "failed", kind: t, error: a };
363
- };
364
- async function U() {
365
- N.value = { status: "starting" };
366
- const t = await n.session.restore();
367
- if (S) return;
368
- if (t.status === "failed") return F("session", t.error);
369
- const a = t.status === "authenticated" ? t.user.locale : void 0;
370
- if (typeof a == "string" && a !== u.locale.value && r.includes(a) && await C.setLocale(a), S) return;
371
- const p = await L.loadEssential();
372
- if (!S) {
373
- if (p.length > 0) return F("messages", p[0].error);
374
- try {
375
- const g = await s.replace(s.options.history.location);
376
- if (S) return;
377
- if (Ie(g)) return F("startup", g);
378
- } catch (g) {
379
- S || F("startup", g);
380
- return;
381
- }
382
- Q || (d.use(s), Q = !0), N.value = { status: "ready" }, V.start();
383
- }
384
- }
385
- async function D() {
386
- S || N.value.status !== "failed" || (await L.retry(), await U());
387
- }
388
- return {
389
- app: d,
390
- router: s,
391
- i18n: h,
392
- state: N,
393
- locale: C.locale,
394
- setLocale: C.setLocale,
395
- async mount(t) {
396
- if (S) throw new Error("This application was disposed; create a new one with createApplication().");
397
- if (J) throw new Error("This application is already mounted.");
398
- J = !0, ke(), await U(), !S && (d.mount(t), z = !0);
399
- },
400
- retry: D,
401
- dispose() {
402
- if (!S) {
403
- S = !0, V.dispose(), L.dispose(), z && d.unmount();
404
- for (const t of K.reverse()) t();
405
- s.options.history.destroy();
406
- }
407
- }
408
- };
409
- }
410
- function mt(e) {
411
- console.error(`[vue-core] ${e.source}${e.feature ? ` (${e.feature})` : ""}${e.detail ? `: ${e.detail}` : ""}`, e.error);
412
- }
413
- function ht(e, n) {
414
- return [e, n].filter((r) => !!r).join(" · ");
415
- }
416
- export {
417
- ue as A,
418
- Tt as c,
419
- mt as d
420
- };
@@ -1,151 +0,0 @@
1
- import { A as T, k as D, i as j } from "./error-Bb_dr_Ay.js";
2
- function z(t) {
3
- if (!t) return "";
4
- const e = new URLSearchParams();
5
- for (const [s, r] of Object.entries(t))
6
- if (!(r == null || r === ""))
7
- if (Array.isArray(r)) for (const o of r) e.append(s, String(o));
8
- else e.append(s, String(r));
9
- return e.toString();
10
- }
11
- const b = (t) => typeof Blob < "u" && t instanceof Blob;
12
- function v(t) {
13
- const e = new FormData();
14
- for (const [s, r] of Object.entries(t))
15
- if (r != null)
16
- if (Array.isArray(r))
17
- for (const o of r) e.append(`${s}[]`, R(o));
18
- else
19
- e.append(s, R(r));
20
- return e;
21
- }
22
- function R(t) {
23
- return b(t) ? t : t instanceof Date ? t.toISOString() : typeof t == "object" && t !== null ? JSON.stringify(t) : String(t);
24
- }
25
- function B(t) {
26
- if (t === void 0) return { body: void 0, contentType: null };
27
- if (typeof t == "string" || t instanceof FormData || t instanceof URLSearchParams || t instanceof ArrayBuffer || ArrayBuffer.isView(t) || b(t))
28
- return { body: t, contentType: null };
29
- if (typeof t == "object" && t !== null && !Array.isArray(t)) {
30
- const e = t;
31
- if (Object.values(e).some((s) => b(s) || Array.isArray(s) && s.some(b)))
32
- return { body: v(e), contentType: null };
33
- }
34
- return { body: JSON.stringify(t), contentType: "application/json" };
35
- }
36
- function O() {
37
- const t = new Uint8Array(16);
38
- return globalThis.crypto.getRandomValues(t), Array.from(t, (e) => e.toString(16).padStart(2, "0")).join("");
39
- }
40
- const E = "X-Request-ID", S = (t) => typeof t == "object" && t !== null && !Array.isArray(t), A = (t) => typeof t == "string" && t !== "" ? t : null;
41
- function _(t) {
42
- const e = t?.errors ?? t?.fields;
43
- if (!S(e)) return {};
44
- const s = {};
45
- for (const [r, o] of Object.entries(e))
46
- Array.isArray(o) ? s[r] = o.map(String) : o != null && (s[r] = [String(o)]);
47
- return s;
48
- }
49
- async function C(t) {
50
- const e = await t.text();
51
- if (e.trim() === "") return { payload: null, readable: !0 };
52
- try {
53
- return { payload: JSON.parse(e), readable: !0 };
54
- } catch {
55
- return { payload: null, readable: !1 };
56
- }
57
- }
58
- async function F(t, e) {
59
- const s = t.headers.get(E) ?? e, { payload: r, readable: o } = await C(t), i = S(r) ? r : null;
60
- if (!t.ok) {
61
- const p = _(i), l = i?.params;
62
- throw new T({
63
- kind: D(t.status, Object.keys(p).length > 0),
64
- message: A(i?.error) ?? A(i?.message) ?? `Request failed with status ${t.status}`,
65
- status: t.status,
66
- fields: p,
67
- code: A(i?.code),
68
- params: S(l) ? l : null,
69
- requestId: s,
70
- payload: r
71
- });
72
- }
73
- if (!o)
74
- throw new T({
75
- kind: "malformed",
76
- message: `The server answered ${t.status} with a body that is not JSON`,
77
- status: t.status,
78
- requestId: s
79
- });
80
- return i !== null && typeof i.success == "boolean" ? {
81
- data: i.data ?? null,
82
- meta: i.meta ?? null,
83
- message: A(i.message),
84
- status: t.status,
85
- requestId: s
86
- } : { data: r, meta: null, message: null, status: t.status, requestId: s };
87
- }
88
- const H = (t, e) => globalThis.fetch(t, e), N = 20, P = (t) => /^[a-z][a-z0-9+.-]*:\/\//i.test(t);
89
- function x(t, e, s) {
90
- const r = P(e) || t === "" ? e : `${t.replace(/\/+$/, "")}/${e.replace(/^\/+/, "")}`;
91
- return s === "" ? r : `${r}${r.includes("?") ? "&" : "?"}${s}`;
92
- }
93
- const I = (t, e) => new T({ kind: "aborted", message: "The request was cancelled", requestId: t, cause: e });
94
- function L(t = {}) {
95
- const { baseUrl: e = "", transport: s = H, credentials: r = "include" } = t, o = [], i = (n) => {
96
- n !== null && (o.push(n), o.length > N && o.shift());
97
- };
98
- async function p(n, a, c, f) {
99
- const { signal: d } = f, y = t.requestId === !1 ? null : (t.requestId ?? O)();
100
- if (d?.aborted) throw I(y, d.reason);
101
- const g = B(c), h = new Headers({ Accept: "application/json" }), m = t.headers ? await t.headers() : void 0;
102
- for (const u of [m, f.headers])
103
- u && new Headers(u).forEach((w, U) => h.set(U, w));
104
- y !== null && !h.has(E) && h.set(E, y), g.contentType !== null && !h.has("Content-Type") && h.set("Content-Type", g.contentType);
105
- const q = { method: n, headers: h, credentials: r, body: g.body, signal: d }, $ = x(e, a, z(f.query));
106
- try {
107
- const u = await s($, q), w = await F(u, y);
108
- return i(w.requestId), w;
109
- } catch (u) {
110
- throw j(u) ? (i(u.requestId), u) : d?.aborted || u instanceof Error && u.name === "AbortError" ? I(y, u) : (i(y), new T({
111
- kind: "network",
112
- message: u instanceof Error ? u.message : "The server could not be reached",
113
- requestId: y,
114
- cause: u
115
- }));
116
- }
117
- }
118
- async function l(n, a, c, f = {}) {
119
- try {
120
- return await p(n, a, c, f);
121
- } catch (d) {
122
- if (!j(d) || d.kind !== "unauthorized" || f.handleUnauthorized === !1 || !t.onUnauthorized || await t.onUnauthorized({ error: d, method: n, path: a }) !== "retry") throw d;
123
- return p(n, a, c, f);
124
- }
125
- }
126
- async function k(n, a, c = {}) {
127
- const f = typeof a == "object" && a !== null && !Array.isArray(a) ? { ...a } : {}, d = n.path.replace(/:([A-Za-z_][A-Za-z0-9_]*)/g, (g, h) => {
128
- const m = f[h];
129
- if (m == null || m === "")
130
- throw new Error(`${n.method} ${n.path}: the input has no value for the path parameter "${h}"`);
131
- return delete f[h], encodeURIComponent(String(m));
132
- }), y = Object.keys(f).length > 0;
133
- return n.method === "GET" || n.method === "DELETE" ? l(n.method, d, void 0, { ...c, query: { ...f, ...c.query } }) : l(n.method, d, y ? f : void 0, c);
134
- }
135
- return {
136
- // the rest-tuple overload is the public contract; the implementation takes its arguments positionally
137
- request: k,
138
- get: (n, a) => l("GET", n, void 0, a),
139
- post: (n, a, c) => l("POST", n, a, c),
140
- put: (n, a, c) => l("PUT", n, a, c),
141
- patch: (n, a, c) => l("PATCH", n, a, c),
142
- delete: (n, a) => l("DELETE", n, void 0, a),
143
- recentRequestIds: () => [...o]
144
- };
145
- }
146
- export {
147
- N as R,
148
- E as a,
149
- L as c,
150
- H as f
151
- };
@@ -1,78 +0,0 @@
1
- import { d as T } from "./context-Ch1r4fdN.js";
2
- import { i as m } from "./intlLocale-CeRU44qJ.js";
3
- const b = /^(\d{4})-(\d{2})-(\d{2})$/;
4
- function o(n) {
5
- if (n == null || n === "") return null;
6
- let r;
7
- if (n instanceof Date) r = n;
8
- else if (typeof n == "number") r = new Date(n);
9
- else {
10
- const i = b.exec(n);
11
- r = i ? new Date(Number(i[1]), Number(i[2]) - 1, Number(i[3])) : new Date(n);
12
- }
13
- return Number.isNaN(r.getTime()) || r.getTime() <= 0 ? null : r;
14
- }
15
- const u = { year: "numeric", month: "2-digit", day: "2-digit" }, d = { hour: "2-digit", minute: "2-digit" }, c = [
16
- ["year", 31536e3],
17
- ["month", 2592e3],
18
- ["week", 604800],
19
- ["day", 86400],
20
- ["hour", 3600],
21
- ["minute", 60],
22
- ["second", 1]
23
- ];
24
- function y() {
25
- const n = /* @__PURE__ */ new Map(), r = (t, e) => {
26
- let a = n.get(t);
27
- return a || (a = e(), n.set(t, a)), a;
28
- }, i = (t, e) => r(`d|${t}|${JSON.stringify(e)}`, () => new Intl.DateTimeFormat(m(t), e));
29
- return {
30
- date: (t, e) => i(e, u).format(t),
31
- dateTime: (t, e) => i(e, { ...u, ...d }).format(t),
32
- time: (t, e) => i(e, d).format(t),
33
- number: (t, e, a) => r(`n|${e}|${JSON.stringify(a ?? {})}`, () => new Intl.NumberFormat(m(e), a)).format(t),
34
- money: (t, e, a) => r(`m|${a}|${e}`, () => new Intl.NumberFormat(m(a), { style: "currency", currency: e })).format(t),
35
- relative(t, e, a) {
36
- const s = Math.trunc((t.getTime() - a.getTime()) / 1e3), [f, l] = c.find(([, g]) => Math.abs(s) >= g) ?? c[c.length - 1];
37
- return r(`r|${e}`, () => new Intl.RelativeTimeFormat(m(e), { numeric: "auto" })).format(Math.trunc(s / l), f);
38
- }
39
- };
40
- }
41
- function w(n) {
42
- const r = { ...y(), ...n.formatters }, i = (t) => typeof t == "number" && Number.isFinite(t);
43
- return {
44
- get locale() {
45
- return n.locale();
46
- },
47
- date: (t) => {
48
- const e = o(t);
49
- return e ? r.date(e, n.locale()) : "";
50
- },
51
- dateTime: (t) => {
52
- const e = o(t);
53
- return e ? r.dateTime(e, n.locale()) : "";
54
- },
55
- time: (t) => {
56
- const e = o(t);
57
- return e ? r.time(e, n.locale()) : "";
58
- },
59
- number: (t, e) => i(t) ? r.number(t, n.locale(), e) : "",
60
- money: (t, e) => i(t) ? r.money(t, e, n.locale()) : "",
61
- relative: (t, e = /* @__PURE__ */ new Date()) => {
62
- const a = o(t);
63
- return a ? r.relative(a, n.locale(), e) : "";
64
- }
65
- };
66
- }
67
- const [N, D] = T("vue-core.formatting");
68
- function I(n, r) {
69
- n.provide(N, r);
70
- }
71
- export {
72
- y as a,
73
- w as c,
74
- N as f,
75
- I as i,
76
- o as t,
77
- D as u
78
- };