@wssto2/vue-core 0.15.2 → 0.16.0

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 (57) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/{Activity-RAk3h7Aa.js → Activity-DOUuIkZR.js} +1 -1
  3. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-uO4EAmBb.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-d_dPurWG.js} +170 -168
  4. package/dist/{Changes-Dsar4rXS.js → Changes-BfcbVgmu.js} +1 -1
  5. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-qxeSTAKV.js → CollectionPage.vue_vue_type_script_setup_true_lang-B5hSkJ2N.js} +1 -1
  6. package/dist/{DeadLetters-vt9vhJD7.js → DeadLetters-CuMvfXH8.js} +2 -2
  7. package/dist/{General-Bu_ZIVbk.js → General-B5vcSEhP.js} +2 -2
  8. package/dist/{IncidentRecord-CQdv_bN5.js → IncidentRecord-wmStcEag.js} +5 -5
  9. package/dist/{IncidentsList-DwQ0wuM8.js → IncidentsList-CFx5tsxP.js} +2 -2
  10. package/dist/{NewRolePage-C-wbA-uW.js → NewRolePage-CZxAp7LR.js} +2 -2
  11. package/dist/{ProfilePage-7Xk2hsNL.js → ProfilePage-B-T8kBcc.js} +3 -3
  12. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-CZtvUH5L.js → RecordHeader.vue_vue_type_script_setup_true_lang-Bt5mT19g.js} +1 -1
  13. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-uLrX13ab.js → ResourcePage.vue_vue_type_script_setup_true_lang-DOiFuJnH.js} +1 -1
  14. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-V2D7fhR9.js → RoleEditor.vue_vue_type_script_setup_true_lang-CqSsNPCw.js} +1 -1
  15. package/dist/{RolePage-Crp71rRb.js → RolePage-zcUWpuDE.js} +3 -3
  16. package/dist/{RolesPage-DKXXnnDV.js → RolesPage-C7_zWw-c.js} +1 -1
  17. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-5ogQCj8M.js → SectionNavigator.vue_vue_type_script_setup_true_lang-BlCx9dVL.js} +2 -2
  18. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CGvJW3bi.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-C2D_D5Hi.js} +1 -1
  19. package/dist/{ServiceAccountRecord-Caj7mo3A.js → ServiceAccountRecord-BYxpHzTR.js} +4 -4
  20. package/dist/{ServiceAccountsList-D-YqPi_h.js → ServiceAccountsList-BUuK-RUj.js} +3 -3
  21. package/dist/{Sessions-Bv5GU5Oi.js → Sessions-Cm-Kilwl.js} +1 -1
  22. package/dist/{SettingsPage-lRWvsMYK.js → SettingsPage-Bavl0K-F.js} +2 -2
  23. package/dist/{SignIn-m6PANavm.js → SignIn-SfEhFiyM.js} +1 -1
  24. package/dist/{SignInPage-C9--4P11.js → SignInPage-BU0n2ehq.js} +1 -1
  25. package/dist/{SignIns-BhLnkY08.js → SignIns-Ahbn5cO6.js} +1 -1
  26. package/dist/{UserRecord-L3ahHNjb.js → UserRecord-3pCKMHkq.js} +4 -4
  27. package/dist/{UsersList-C6u3YCCp.js → UsersList-vw3aDpvo.js} +2 -2
  28. package/dist/access/index.js +3 -3
  29. package/dist/app/index.js +1 -1
  30. package/dist/{application-C900Wz0A.js → application-CHPpOssP.js} +1 -1
  31. package/dist/back-LcLlFodC.js +63 -0
  32. package/dist/{chrome-nUcmVu8G.js → chrome-kMBKIB1N.js} +2 -2
  33. package/dist/collection/index.js +2 -2
  34. package/dist/form/GroupSheet.vue.d.ts +3 -1
  35. package/dist/form/index.js +3 -3
  36. package/dist/identity/index.js +1 -1
  37. package/dist/incidents/index.js +1 -1
  38. package/dist/{index-vES_D5ls.js → index-Ct7W_gYE.js} +2 -2
  39. package/dist/{index-_hDHxrt5.js → index-D9_xqF5g.js} +3 -3
  40. package/dist/{index-D5DuvKP1.js → index-nByFc1eL.js} +12 -12
  41. package/dist/index.d.ts +1 -1
  42. package/dist/index.js +1 -1
  43. package/dist/{neighbors-DrEahe7B.js → neighbors-BpypL3Wb.js} +32 -31
  44. package/dist/notifications/index.js +1 -1
  45. package/dist/page/back.d.ts +37 -0
  46. package/dist/page/index.d.ts +1 -0
  47. package/dist/page/index.js +46 -42
  48. package/dist/resource/index.js +1 -1
  49. package/dist/router/index.js +1 -1
  50. package/dist/router/sections.d.ts +1 -1
  51. package/dist/sections-CSpJN0Z7.js +54 -0
  52. package/dist/shell/index.js +1 -1
  53. package/dist/testing/index.js +1 -1
  54. package/dist/{useGroupSheet-Qqo3ywsS.js → useGroupSheet-B-Hs4gNO.js} +104 -97
  55. package/dist/{useSaveChrome-7huA3FzR.js → useSaveChrome-DB9OwIjT.js} +1 -1
  56. package/package.json +1 -1
  57. package/dist/sections-DI_JhgQG.js +0 -53
@@ -246,7 +246,7 @@ const ft = ["aria-labelledby"], gt = ["id"], _t = { class: "mt-1 text-subheadlin
246
246
  ]));
247
247
  }
248
248
  }), wt = X({
249
- login: { name: "login", path: "/login", component: () => import("./SignInPage-C9--4P11.js"), meta: { public: !0, titleKey: "core.identity.signin.title" } }
249
+ login: { name: "login", path: "/login", component: () => import("./SignInPage-BU0n2ehq.js"), meta: { public: !0, titleKey: "core.identity.signin.title" } }
250
250
  });
251
251
  function Xn(e = {}) {
252
252
  return ne({
@@ -381,7 +381,7 @@ function Hn(e) {
381
381
  };
382
382
  }
383
383
  const ke = X({
384
- index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-7Xk2hsNL.js"), meta: { titleKey: "core.profile.title" } }
384
+ index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-B-T8kBcc.js"), meta: { titleKey: "core.profile.title" } }
385
385
  }), At = /* @__PURE__ */ $({
386
386
  __name: "ProfileMenuItem",
387
387
  setup(e) {
@@ -412,19 +412,19 @@ function jt(e, n) {
412
412
  return [...e.flatMap((s) => [s, ...o(s)]), ...n.filter((s) => s.after === void 0).map((s) => ce(s))];
413
413
  }
414
414
  const le = "iam.user:view", ts = "iam.user:manage", Kt = "iam.user.activity:view", Se = X({
415
- index: { name: "users.index", path: "/users", component: () => import("./UsersList-C6u3YCCp.js"), meta: { access: le, titleKey: "core.users.title" } },
415
+ index: { name: "users.index", path: "/users", component: () => import("./UsersList-vw3aDpvo.js"), meta: { access: le, titleKey: "core.users.title" } },
416
416
  record: {
417
417
  name: "users.record",
418
418
  path: "/users/:id",
419
- component: () => import("./UserRecord-L3ahHNjb.js"),
419
+ component: () => import("./UserRecord-3pCKMHkq.js"),
420
420
  meta: { access: le, titleKey: "core.users.title", remountOnParam: "id" },
421
421
  children: [
422
- { name: "users.record.general", path: "general", component: () => import("./General-Bu_ZIVbk.js"), meta: { section: { labelKey: "core.users.sections.general", icon: "user3Line", groupKey: "core.users.section_groups.person" } } },
423
- { name: "users.record.signin", path: "signin", component: () => import("./SignIn-m6PANavm.js"), meta: { section: { labelKey: "core.users.sections.signin", icon: "key2Line", groupKey: "core.users.section_groups.access" } } },
424
- { name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-Bv5GU5Oi.js"), meta: { section: { labelKey: "core.users.sections.sessions", icon: "deviceLine", groupKey: "core.users.section_groups.access" } } },
425
- { name: "users.record.signins", path: "signins", component: () => import("./SignIns-BhLnkY08.js"), meta: { section: { labelKey: "core.users.sections.signins", icon: "timeFill", groupKey: "core.users.section_groups.activity" } } },
426
- { name: "users.record.changes", path: "changes", component: () => import("./Changes-Dsar4rXS.js"), meta: { section: { labelKey: "core.users.sections.changes", icon: "edit", groupKey: "core.users.section_groups.activity" } } },
427
- { name: "users.record.activity", path: "activity", component: () => import("./Activity-RAk3h7Aa.js"), meta: { access: Kt, section: { labelKey: "core.users.sections.activity", icon: "listCheck", groupKey: "core.users.section_groups.activity" } } }
422
+ { name: "users.record.general", path: "general", component: () => import("./General-B5vcSEhP.js"), meta: { section: { labelKey: "core.users.sections.general", icon: "user3Line", groupKey: "core.users.section_groups.person" } } },
423
+ { name: "users.record.signin", path: "signin", component: () => import("./SignIn-SfEhFiyM.js"), meta: { section: { labelKey: "core.users.sections.signin", icon: "key2Line", groupKey: "core.users.section_groups.access" } } },
424
+ { name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-Cm-Kilwl.js"), meta: { section: { labelKey: "core.users.sections.sessions", icon: "deviceLine", groupKey: "core.users.section_groups.access" } } },
425
+ { name: "users.record.signins", path: "signins", component: () => import("./SignIns-Ahbn5cO6.js"), meta: { section: { labelKey: "core.users.sections.signins", icon: "timeFill", groupKey: "core.users.section_groups.activity" } } },
426
+ { name: "users.record.changes", path: "changes", component: () => import("./Changes-BfcbVgmu.js"), meta: { section: { labelKey: "core.users.sections.changes", icon: "edit", groupKey: "core.users.section_groups.activity" } } },
427
+ { name: "users.record.activity", path: "activity", component: () => import("./Activity-DOUuIkZR.js"), meta: { access: Kt, section: { labelKey: "core.users.sections.activity", icon: "listCheck", groupKey: "core.users.section_groups.activity" } } }
428
428
  ]
429
429
  }
430
430
  });
@@ -1153,11 +1153,11 @@ const Jt = ["title"], Qt = { class: "font-mono" }, cs = /* @__PURE__ */ $({
1153
1153
  }, 8, ["permission"])) : k("", !0);
1154
1154
  }
1155
1155
  }), [cn, ms] = N("vue-core.serviceaccounts"), ue = "iam.serviceaccount:view", ps = "iam.serviceaccount:manage", fs = "iam.serviceaccount:revoke", de = X({
1156
- index: { name: "serviceaccounts.index", path: "/iam/service-accounts", component: () => import("./ServiceAccountsList-D-YqPi_h.js"), meta: { access: ue, titleKey: "core.serviceaccounts.title_plural" } },
1156
+ index: { name: "serviceaccounts.index", path: "/iam/service-accounts", component: () => import("./ServiceAccountsList-BUuK-RUj.js"), meta: { access: ue, titleKey: "core.serviceaccounts.title_plural" } },
1157
1157
  record: {
1158
1158
  name: "serviceaccounts.record",
1159
1159
  path: "/iam/service-accounts/:id",
1160
- component: () => import("./ServiceAccountRecord-Caj7mo3A.js"),
1160
+ component: () => import("./ServiceAccountRecord-BYxpHzTR.js"),
1161
1161
  meta: { access: ue, titleKey: "core.serviceaccounts.title_plural", remountOnParam: "id" }
1162
1162
  }
1163
1163
  });
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** The version of @wssto2/vue-core (kept equal to package.json by index.test.ts). */
2
- export declare const version = "0.15.2";
2
+ export declare const version = "0.16.0";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const o = "0.15.2";
1
+ const o = "0.16.0";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -1,13 +1,14 @@
1
1
  import { computed as j, ref as z, shallowRef as I, watch as F, getCurrentScope as J, onScopeDispose as Q } from "vue";
2
- import { useRoute as O } from "vue-router";
3
- import { i as N } from "./error-CD7x0Jrz.js";
4
- import { L as k, d as B, e as D, o as U, q as V } from "./state-QDaxntgR.js";
2
+ import { useRoute as N } from "vue-router";
3
+ import { i as M } from "./error-CD7x0Jrz.js";
4
+ import { w as U } from "./back-LcLlFodC.js";
5
+ import { L as k, d as O, e as D, o as V, q as W } from "./state-QDaxntgR.js";
5
6
  function K(l, t, n, g) {
6
7
  return typeof t == "string" ? t : { ...t, query: { ...t.query, [n]: D(l, g) } };
7
8
  }
8
- function le(l, t) {
9
- const n = O(), g = t.from ?? (() => typeof n.query[k] == "string" ? n.query[k] : null), q = j(() => {
10
- const f = B(l, g());
9
+ function ae(l, t) {
10
+ const n = N(), g = t.from ?? (() => typeof n.query[k] == "string" ? n.query[k] : null), q = j(() => {
11
+ const f = O(l, g());
11
12
  return f ? K(l, t.list, t.stateKey ?? "query", f) : t.list;
12
13
  });
13
14
  return {
@@ -17,37 +18,37 @@ function le(l, t) {
17
18
  neighbors: null
18
19
  };
19
20
  }
20
- const W = 8;
21
- function re(l, t) {
22
- const n = O(), g = t.from ?? (() => typeof n.query[k] == "string" ? n.query[k] : null), q = t.stateKey ?? "query", f = z(null), p = z(0), h = I(null), m = I(null), S = z(!1), x = I(null), o = /* @__PURE__ */ new Map();
23
- let d = 0, C = new AbortController(), E = !1;
24
- function L(w, b, a) {
25
- const v = { ...w, page: b }, i = V(v);
21
+ const Y = 8;
22
+ function ne(l, t) {
23
+ const n = N(), g = t.from ?? (() => typeof n.query[k] == "string" ? n.query[k] : null), q = t.stateKey ?? "query", f = z(null), p = z(0), m = I(null), h = I(null), S = z(!1), x = I(null), o = /* @__PURE__ */ new Map();
24
+ let w = 0, C = new AbortController(), E = !1;
25
+ function L(d, b, a) {
26
+ const v = { ...d, page: b }, i = W(v);
26
27
  let u = o.get(i);
27
28
  for (u ? o.delete(i) : (u = (async () => l.load(v, { signal: a }))(), u.catch(() => {
28
29
  o.get(i) === u && o.delete(i);
29
- })), o.set(i, u); o.size > W; ) o.delete(o.keys().next().value);
30
+ })), o.set(i, u); o.size > Y; ) o.delete(o.keys().next().value);
30
31
  return u.catch((e) => {
31
- if (N(e)) throw e;
32
+ if (M(e)) throw e;
32
33
  return null;
33
34
  });
34
35
  }
35
36
  function T() {
36
- f.value = null, h.value = null, m.value = null, p.value = 0;
37
+ f.value = null, m.value = null, h.value = null, p.value = 0;
37
38
  }
38
39
  async function _() {
39
- const w = ++d, b = C.signal, a = B(l, g()), v = t.current();
40
+ const d = ++w, b = C.signal, a = O(l, g()), v = t.current();
40
41
  if (x.value = a ? K(l, t.list, q, a) : null, !a || v === null || v === void 0 || v === "") {
41
42
  T(), S.value = !1;
42
43
  return;
43
44
  }
44
- S.value = !0, h.value = null, m.value = null;
45
+ S.value = !0, m.value = null, h.value = null;
45
46
  const i = (e) => e ? e.rows.findIndex((r) => String(l.key(r)) === String(v)) : -1, u = (e, r) => {
46
47
  const s = D(l, { ...a, page: e });
47
48
  return {
48
49
  key: r,
49
50
  get to() {
50
- return { name: n.name ?? void 0, params: { ...n.params, [t.param]: String(r) }, query: { ...n.query, [k]: s }, hash: n.hash };
51
+ return { name: n.name ?? void 0, params: { ...n.params, [t.param]: String(r) }, query: { ...U(n.query), [k]: s }, hash: n.hash };
51
52
  }
52
53
  };
53
54
  };
@@ -55,10 +56,10 @@ function re(l, t) {
55
56
  let e = a.page, r = await L(a, e, b), s = i(r);
56
57
  for (const y of [e - 1, e + 1]) {
57
58
  if (s !== -1 || !r || y < 1 || y > r.lastPage) continue;
58
- const c = await L(a, y, b), M = i(c);
59
- c && M !== -1 && (e = y, r = c, s = M);
59
+ const c = await L(a, y, b), B = i(c);
60
+ c && B !== -1 && (e = y, r = c, s = B);
60
61
  }
61
- if (w !== d) return;
62
+ if (d !== w) return;
62
63
  if (!r || s === -1) {
63
64
  T();
64
65
  return;
@@ -76,30 +77,30 @@ function re(l, t) {
76
77
  const c = (await L(a, e + 1, b))?.rows[0];
77
78
  c !== void 0 && (R = u(e + 1, l.key(c)));
78
79
  }
79
- if (w !== d) return;
80
- p.value = r.total, f.value = (e - 1) * X + s + 1, h.value = P, m.value = R, x.value = K(l, t.list, q, { ...a, page: e });
80
+ if (d !== w) return;
81
+ p.value = r.total, f.value = (e - 1) * X + s + 1, m.value = P, h.value = R, x.value = K(l, t.list, q, { ...a, page: e });
81
82
  } catch (e) {
82
- if (!N(e)) throw e;
83
+ if (!M(e)) throw e;
83
84
  } finally {
84
- w === d && (S.value = !1);
85
+ d === w && (S.value = !1);
85
86
  }
86
87
  }
87
88
  const G = F([g, t.current], _, { immediate: !0 });
88
89
  function H() {
89
- E || (E = !0, d++, C.abort(), G(), o.clear());
90
+ E || (E = !0, w++, C.abort(), G(), o.clear());
90
91
  }
91
- return J() && Q(H), U(() => {
92
+ return J() && Q(H), V(() => {
92
93
  C.abort(), C = new AbortController(), o.clear(), _();
93
- }), { position: f, total: p, previous: h, next: m, loading: S, listRoute: x, context: {
94
+ }), { position: f, total: p, previous: m, next: h, loading: S, listRoute: x, context: {
94
95
  get back() {
95
96
  return { label: typeof t.backLabel == "function" ? t.backLabel() : t.backLabel, to: x.value ?? t.list };
96
97
  },
97
98
  get neighbors() {
98
- return f.value === null ? null : { position: f.value, total: p.value, previous: h.value?.to ?? null, next: m.value?.to ?? null };
99
+ return f.value === null ? null : { position: f.value, total: p.value, previous: m.value?.to ?? null, next: h.value?.to ?? null };
99
100
  }
100
101
  } };
101
102
  }
102
103
  export {
103
- le as a,
104
- re as u
104
+ ae as a,
105
+ ne as u
105
106
  };
@@ -1,4 +1,4 @@
1
- import { d as s, e as a, n as o, b as i, c as n, f as u } from "../index-vES_D5ls.js";
1
+ import { d as s, e as a, n as o, b as i, c as n, f as u } from "../index-Ct7W_gYE.js";
2
2
  export {
3
3
  s as deadLettersRoutes,
4
4
  a as eventsRoutes,
@@ -0,0 +1,37 @@
1
+ import { type ComputedRef } from "vue";
2
+ import { type RouteLocationNormalizedLoaded, type RouteLocationRaw, type Router } from "vue-router";
3
+ import type { PageBack } from "./types";
4
+ /** The query parameter that makes a page lead back to the page the user came from: the origin's path with its query. */
5
+ export declare const BACK_PARAM = "back";
6
+ /** The origin's name ("Golf 1.6 TDI"), so the back link reads it even after a reload or from a copied link. */
7
+ export declare const BACK_TITLE_PARAM = "back_title";
8
+ /** A query without the origin: a different record (the pager's) is not reached from the page the user came from. */
9
+ export declare function withoutBack(query: RouteLocationNormalizedLoaded["query"]): RouteLocationNormalizedLoaded["query"];
10
+ /**
11
+ * The back the current route asks for, or null: `?back=` must be a path of this application (one leading `/`, never `//`,
12
+ * `/\` or a scheme) that resolves to a real page other than this one. The label is `?back_title=` (plain text, capped), else
13
+ * the target route's `meta.titleKey`; without either there is no usable back.
14
+ */
15
+ export declare function originBackOf(router: Router, route: RouteLocationNormalizedLoaded, translate: {
16
+ t: (key: string) => string;
17
+ te: (key: string) => boolean;
18
+ }): PageBack | null;
19
+ /** The back the current route asks for through `?back=`, reactive; the page shell puts it in place of the page's own back. */
20
+ export declare function useOriginBack(): ComputedRef<PageBack | null>;
21
+ export interface BackLinks {
22
+ /**
23
+ * `to`, opened from this page: its page leads back here, with this page's name ("‹ Golf 1.6 TDI"). Call it in the template
24
+ * (or a computed): the title is read when the page has loaded, so the link updates once the record's name is there.
25
+ */
26
+ backHere(to: RouteLocationRaw): RouteLocationRaw;
27
+ /** `to`, carrying the back this page was opened with (create, then the saved record); `to` unchanged when there is none. */
28
+ keepBack(to: RouteLocationRaw): RouteLocationRaw;
29
+ }
30
+ /**
31
+ * The two link helpers of "back to where you came from": a link that leaves a record for another module uses `backHere`, a page
32
+ * that hands the user on (a saved record) uses `keepBack`.
33
+ *
34
+ * const { backHere } = useBackLinks();
35
+ * <RouterLink :to="backHere({ name: 'contracts.create' })">New contract</RouterLink>
36
+ */
37
+ export declare function useBackLinks(): BackLinks;
@@ -1,4 +1,5 @@
1
1
  export { default as AdaptivePageShell } from "./AdaptivePageShell.vue";
2
+ export { BACK_PARAM, BACK_TITLE_PARAM, useBackLinks, type BackLinks } from "./back";
2
3
  export { default as BottomDock } from "./BottomDock.vue";
3
4
  export { bottomDockKey, installBottomDock, useBottomDockTarget } from "./bottomDock";
4
5
  export { default as BottomDockPortal } from "./BottomDockPortal.vue";
@@ -1,23 +1,24 @@
1
- import { _ as W, a as X, b as Y, c as Z, p as ee, u as te, d as ae } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-uO4EAmBb.js";
2
- import { _ as se } from "../BottomDock.vue_vue_type_script_setup_true_lang-CjN7xYEr.js";
3
- import { b as ne, i as re, u as ie } from "../bottomDock-BZEiOPYZ.js";
1
+ import { _ as W, a as X, b as Y, c as Z, p as ee, u as te, d as ae } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-d_dPurWG.js";
2
+ import { B as se, a as le, u as ne } from "../back-LcLlFodC.js";
3
+ import { _ as ie } from "../BottomDock.vue_vue_type_script_setup_true_lang-CjN7xYEr.js";
4
+ import { b as ue, i as de, u as pe } from "../bottomDock-BZEiOPYZ.js";
4
5
  import { _ as x } from "../BottomDockPortal.vue_vue_type_script_setup_true_lang-DmwR-2SP.js";
5
- import { defineComponent as v, openBlock as a, createBlock as b, withCtx as c, createElementVNode as s, normalizeStyle as k, createElementBlock as l, Fragment as y, renderList as B, normalizeClass as d, unref as _, createCommentVNode as p, toDisplayString as f, useModel as S, useId as C, useTemplateRef as P, computed as $, mergeProps as w, createSlots as T, renderSlot as m, mergeModels as D } from "vue";
6
+ import { defineComponent as _, openBlock as a, createBlock as b, withCtx as c, createElementVNode as s, normalizeStyle as k, createElementBlock as l, Fragment as y, renderList as B, normalizeClass as d, unref as v, createCommentVNode as p, toDisplayString as f, useModel as C, useId as P, useTemplateRef as S, computed as $, mergeProps as T, createSlots as w, renderSlot as m, mergeModels as A } from "vue";
6
7
  import { _ as L } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
7
- import { _ as ue } from "../RecordHeader.vue_vue_type_script_setup_true_lang-CZtvUH5L.js";
8
- import { c as pe, i as fe, p as me, a as be, u as ge, b as ve } from "../chrome-nUcmVu8G.js";
9
- import { s as z, u as I } from "../sectionIndex-BS0ic5W7.js";
10
- import { p as he, a as xe } from "../sectionIndex-BS0ic5W7.js";
11
- import { _ as ye } from "../SectionNavigator.vue_vue_type_script_setup_true_lang-5ogQCj8M.js";
12
- import { a as Se, _ as Ce } from "../SectionList.vue_vue_type_script_setup_true_lang-CodyVezo.js";
13
- import { _ as A } from "../Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
14
- const K = ["aria-label"], M = ["aria-label"], N = ["aria-selected", "tabindex", "onClick"], R = { class: "relative" }, E = {
8
+ import { _ as me } from "../RecordHeader.vue_vue_type_script_setup_true_lang-Bt5mT19g.js";
9
+ import { c as ge, i as _e, p as ve, u as he, a as xe, b as ke } from "../chrome-kMBKIB1N.js";
10
+ import { s as D, u as I } from "../sectionIndex-BS0ic5W7.js";
11
+ import { p as Be, a as Ce } from "../sectionIndex-BS0ic5W7.js";
12
+ import { _ as Se } from "../SectionNavigator.vue_vue_type_script_setup_true_lang-BlCx9dVL.js";
13
+ import { a as Te, _ as we } from "../SectionList.vue_vue_type_script_setup_true_lang-CodyVezo.js";
14
+ import { _ as K } from "../Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
15
+ const M = ["aria-label"], R = ["aria-label"], z = ["aria-selected", "tabindex", "onClick"], E = { class: "relative" }, N = {
15
16
  key: 2,
16
17
  class: "absolute -right-1 -top-0.5 size-2 rounded-full bg-status-warning-solid ring-2 ring-surface-cell"
17
18
  }, H = {
18
19
  key: 0,
19
20
  class: "sr-only"
20
- }, U = /* @__PURE__ */ v({
21
+ }, U = /* @__PURE__ */ _({
21
22
  __name: "BottomTabBar",
22
23
  props: {
23
24
  items: {},
@@ -50,8 +51,8 @@ const K = ["aria-label"], M = ["aria-label"], N = ["aria-selected", "tabindex",
50
51
  class: d(["relative flex h-14 w-full cursor-pointer flex-col items-center justify-center gap-1 px-1 transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus", e.active ? "text-content-link" : "text-content-muted active:text-content-strong"]),
51
52
  onClick: (u) => r("select", e.value)
52
53
  }, [
53
- s("span", R, [
54
- e.icon ? (a(), b(_(L), {
54
+ s("span", E, [
55
+ e.icon ? (a(), b(v(L), {
55
56
  key: 0,
56
57
  name: e.icon,
57
58
  size: 22
@@ -59,23 +60,23 @@ const K = ["aria-label"], M = ["aria-label"], N = ["aria-selected", "tabindex",
59
60
  e.badge ? (a(), l("span", {
60
61
  key: 1,
61
62
  class: d(["absolute -right-2.5 -top-1.5 min-w-4 rounded-full px-1 text-center text-3xs font-semibold leading-4", e.badgeTone === "critical" ? "bg-status-danger-solid text-white" : "bg-tint text-content-on-tint"])
62
- }, f(e.badge), 3)) : e.warning ? (a(), l("span", E)) : p("", !0)
63
+ }, f(e.badge), 3)) : e.warning ? (a(), l("span", N)) : p("", !0)
63
64
  ]),
64
65
  e.warning ? (a(), l("span", H, f(e.warning), 1)) : p("", !0),
65
66
  s("span", {
66
67
  class: d(["w-full truncate text-center text-2xs", e.active ? "font-semibold" : "font-medium"])
67
68
  }, f(e.label), 3)
68
- ], 10, N)
69
+ ], 10, z)
69
70
  ]))), 128))
70
- ], 12, M)
71
- ], 8, K)
71
+ ], 12, R)
72
+ ], 8, M)
72
73
  ]),
73
74
  _: 1
74
75
  }));
75
76
  }
76
- }), q = /* @__PURE__ */ v({
77
+ }), q = /* @__PURE__ */ _({
77
78
  __name: "SectionPanel",
78
- props: /* @__PURE__ */ D({
79
+ props: /* @__PURE__ */ A({
79
80
  title: {},
80
81
  icon: { default: void 0 },
81
82
  number: { default: void 0 },
@@ -91,13 +92,13 @@ const K = ["aria-label"], M = ["aria-label"], N = ["aria-selected", "tabindex",
91
92
  }),
92
93
  emits: ["update:collapsed"],
93
94
  setup(n) {
94
- const t = n, o = S(n, "collapsed"), r = t.id ?? (z(t.title) || `section-${C()}`), i = P("panel"), g = $(() => i.value?.$el ?? null);
95
- return I(r, () => t.title, g, { number: () => t.number, reveal: () => i.value?.expand() }), (e, u) => (a(), b(A, w({
95
+ const t = n, o = C(n, "collapsed"), r = t.id ?? (D(t.title) || `section-${P()}`), i = S("panel"), g = $(() => i.value?.$el ?? null);
96
+ return I(r, () => t.title, g, { number: () => t.number, reveal: () => i.value?.expand() }), (e, u) => (a(), b(K, T({
96
97
  ref_key: "panel",
97
98
  ref: i,
98
99
  collapsed: o.value,
99
100
  "onUpdate:collapsed": u[0] || (u[0] = (h) => o.value = h)
100
- }, { id: _(r), tabindex: -1 }, {
101
+ }, { id: v(r), tabindex: -1 }, {
101
102
  title: t.title,
102
103
  icon: t.icon,
103
104
  number: t.number,
@@ -107,7 +108,7 @@ const K = ["aria-label"], M = ["aria-label"], N = ["aria-selected", "tabindex",
107
108
  flush: t.flush,
108
109
  "heading-level": t.headingLevel,
109
110
  class: "scroll-mt-[calc(var(--app-bar-height)+1.5rem)]"
110
- }), T({
111
+ }), w({
111
112
  default: c(() => [
112
113
  m(e.$slots, "default")
113
114
  ]),
@@ -132,31 +133,34 @@ const K = ["aria-label"], M = ["aria-label"], N = ["aria-selected", "tabindex",
132
133
  });
133
134
  export {
134
135
  W as AdaptivePageShell,
135
- se as BottomDock,
136
+ se as BACK_PARAM,
137
+ le as BACK_TITLE_PARAM,
138
+ ie as BottomDock,
136
139
  x as BottomDockPortal,
137
140
  U as BottomTabBar,
138
141
  X as PageActions,
139
142
  Y as PageToolbar,
140
- ue as RecordHeader,
143
+ me as RecordHeader,
141
144
  Z as ResourceHeader,
142
- Se as SectionJumper,
143
- Ce as SectionList,
144
- ye as SectionNavigator,
145
+ Te as SectionJumper,
146
+ we as SectionList,
147
+ Se as SectionNavigator,
145
148
  q as SectionPanel,
146
- ne as bottomDockKey,
147
- pe as createPageChrome,
148
- re as installBottomDock,
149
- fe as installPageChrome,
150
- me as pageChromeKey,
149
+ ue as bottomDockKey,
150
+ ge as createPageChrome,
151
+ de as installBottomDock,
152
+ _e as installPageChrome,
153
+ ve as pageChromeKey,
151
154
  ee as pageSectionBackKey,
152
- he as provideSectionIndex,
153
- z as sectionId,
154
- ie as useBottomDockTarget,
155
+ Be as provideSectionIndex,
156
+ D as sectionId,
157
+ ne as useBackLinks,
158
+ pe as useBottomDockTarget,
155
159
  te as useLargeTitle,
156
- be as useOptionalPageChrome,
157
- ge as usePageChrome,
158
- ve as usePageChromeContext,
160
+ he as useOptionalPageChrome,
161
+ xe as usePageChrome,
162
+ ke as usePageChromeContext,
159
163
  ae as usePageSectionBack,
160
164
  I as useSectionAnchor,
161
- xe as useSectionIndex
165
+ Ce as useSectionIndex
162
166
  };
@@ -1,7 +1,7 @@
1
1
  import { p as g, u as m, a as l, b as R } from "../routeResource-DlTsGTg_.js";
2
2
  import { c as a } from "../current-CslcEPXp.js";
3
3
  import { A as n } from "../error-CD7x0Jrz.js";
4
- import { _ as w, a as x } from "../ResourcePage.vue_vue_type_script_setup_true_lang-uLrX13ab.js";
4
+ import { _ as w, a as x } from "../ResourcePage.vue_vue_type_script_setup_true_lang-DOiFuJnH.js";
5
5
  async function i(t, e) {
6
6
  return (await a().platform.http.get(t, { signal: e.signal })).data;
7
7
  }
@@ -2,7 +2,7 @@ import { _ as a, c as o, a as r, i as t } from "../NoAccess.vue_vue_type_script_
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
4
  import { i as l, r as x } from "../guards-6fJxfUtk.js";
5
- import { u as y } from "../sections-DI_JhgQG.js";
5
+ import { u as y } from "../sections-CSpJN0Z7.js";
6
6
  import { b as v, c as N, n as H, u as b } from "../navigation-DMJ6akat.js";
7
7
  export {
8
8
  u as AppRouterView,
@@ -41,7 +41,7 @@ export interface RouteSections {
41
41
  *
42
42
  * A section the session may not open (`meta.access`) is left out. A page inside a section is a
43
43
  * sibling route without `meta.section` and with `meta.sectionParent` naming the section's route.
44
- * Links keep the query (a list's state) and carry only the params their own path declares.
44
+ * Links keep the query (a list's state, `?back=`) and carry only the params their own path declares.
45
45
  */
46
46
  export declare function useRouteSections(): RouteSections;
47
47
  /**
@@ -0,0 +1,54 @@
1
+ import { computed as n, watch as h } from "vue";
2
+ import { useI18n as g } from "vue-i18n";
3
+ import { useRoute as y, useRouter as v } from "vue-router";
4
+ import { u as A } from "./platform-ORzRR3Tw.js";
5
+ import { B as K, a as P } from "./back-LcLlFodC.js";
6
+ import { i as R } from "./access-DmAceEo5.js";
7
+ function C() {
8
+ const t = y(), u = v(), { access: c } = A(), { t: o } = g(), i = n(() => {
9
+ for (let e = t.matched.length - 1; e >= 0; e--) {
10
+ const a = t.matched[e];
11
+ if (a?.children.some((r) => r.name && r.meta?.section)) return a;
12
+ }
13
+ return null;
14
+ }), l = n(() => (i.value?.children ?? []).filter((e) => e.name && e.meta?.section)), p = (e) => t.matched.some((a) => a.name === e.name) || t.meta.sectionParent === e.name, d = (e) => {
15
+ const a = u.getRoutes().find((s) => s.name === e)?.path ?? "", r = new Set([...a.matchAll(/:(\w+)/g)].map((s) => s[1]));
16
+ return Object.fromEntries(Object.entries(t.params).filter(([s]) => r.has(s)));
17
+ }, b = n(() => Object.fromEntries([K, P].filter((e) => e in t.query).map((e) => [e, t.query[e]]))), f = n(
18
+ () => l.value.filter((e) => R(e.meta?.access, c)).map((e) => {
19
+ const a = e.meta.section, r = o(a.labelKey);
20
+ return {
21
+ name: String(e.name),
22
+ label: r,
23
+ shortLabel: a.shortLabelKey ? o(a.shortLabelKey) : r,
24
+ icon: a.icon,
25
+ group: a.groupKey ? o(a.groupKey) : void 0,
26
+ to: { name: e.name, params: d(e.name), query: t.meta.sectionParent ? b.value : t.query },
27
+ active: p(e)
28
+ };
29
+ })
30
+ ), m = n(() => f.value.find((e) => e.active) ?? null);
31
+ return {
32
+ sections: f,
33
+ declared: n(() => l.value.length),
34
+ active: m,
35
+ first: n(() => f.value[0] ?? null),
36
+ subPage: n(() => !!m.value && t.meta.sectionParent === m.value.name),
37
+ bare: n(() => !!i.value && t.matched[t.matched.length - 1] === i.value),
38
+ denied: n(() => l.value.some(p) && !m.value)
39
+ };
40
+ }
41
+ function E(t) {
42
+ const u = v();
43
+ h(
44
+ () => [t.bare.value || t.denied.value, t.first.value],
45
+ ([c, o]) => {
46
+ c && o && u.replace(o.to);
47
+ },
48
+ { immediate: !0 }
49
+ );
50
+ }
51
+ export {
52
+ E as a,
53
+ C as u
54
+ };
@@ -14,7 +14,7 @@ import { _ as dt } from "../Sheet.vue_vue_type_script_setup_true_lang-BG8HUNfs.j
14
14
  import { _ as ft } from "../LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CrGrjrlO.js";
15
15
  import { _ as mt } from "../Toaster.vue_vue_type_script_setup_true_lang-55boRLAj.js";
16
16
  import { _ as pt } from "../BottomDock.vue_vue_type_script_setup_true_lang-CjN7xYEr.js";
17
- import { b as je } from "../chrome-nUcmVu8G.js";
17
+ import { b as je } from "../chrome-kMBKIB1N.js";
18
18
  import { p as Ke, A as vt } from "../access-DmAceEo5.js";
19
19
  import { RouterLink as Ve, useRoute as ht, useRouter as ge } from "vue-router";
20
20
  import { u as bt } from "../navigation-DMJ6akat.js";
@@ -1,6 +1,6 @@
1
1
  import { nextTick as A, createApp as E, defineComponent as m, h as u } from "vue";
2
2
  import { createMemoryHistory as w, createRouter as $, RouterView as O } from "vue-router";
3
- import { c as k } from "../application-C900Wz0A.js";
3
+ import { c as k } from "../application-CHPpOssP.js";
4
4
  import { a as M, i as R } from "../platform-ORzRR3Tw.js";
5
5
  import { createI18n as S } from "vue-i18n";
6
6
  import { coreMessages as x } from "../i18n/index.js";