@wssto2/vue-core 0.19.0 → 0.21.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 (174) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +5 -1
  3. package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-Bg8JFAOT.js → AccessGate.vue_vue_type_script_setup_true_lang-Dw_pnsh9.js} +1 -1
  4. package/dist/{AccountMenuItem.vue_vue_type_script_setup_true_lang-BIYgaihv.js → AccountMenuItem.vue_vue_type_script_setup_true_lang-C2TmmH38.js} +1 -1
  5. package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-B5IMNnTf.js → ActionRow.vue_vue_type_script_setup_true_lang-BEV0drwF.js} +2 -2
  6. package/dist/{Activity-CiYn5E6A.js → Activity-CZzAt3SH.js} +9 -9
  7. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-oXWQTfBs.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-BkZzuICH.js} +6 -6
  8. package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-WuGvAOrj.js → AlertDialog.vue_vue_type_script_setup_true_lang-B0UvzCoE.js} +1 -1
  9. package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-CX8mpXRE.js → AsyncSection.vue_vue_type_script_setup_true_lang-DuPS_zMX.js} +4 -4
  10. package/dist/{Banner.vue_vue_type_script_setup_true_lang-sv0phngk.js → Banner.vue_vue_type_script_setup_true_lang-BXZVOhfH.js} +1 -1
  11. package/dist/{Button.vue_vue_type_script_setup_true_lang-JrqhO99l.js → Button.vue_vue_type_script_setup_true_lang-CZkTqGtE.js} +1 -1
  12. package/dist/{Changes-Cy8STpLX.js → Changes-B0bhSNU3.js} +5 -5
  13. package/dist/CharacteristicsPage-fGnahf62.js +4 -0
  14. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-Dr6nFNBB.js → CollectionPage.vue_vue_type_script_setup_true_lang-Bf5WXVFZ.js} +12 -12
  15. package/dist/CollectionTree.vue_vue_type_script_setup_true_lang-DV0OhquO.js +345 -0
  16. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-D372wlxR.js → DataTable.vue_vue_type_script_setup_true_lang-Cw_E8w48.js} +1 -1
  17. package/dist/{DateField.vue_vue_type_script_setup_true_lang-D0KcfW8R.js → DateField.vue_vue_type_script_setup_true_lang-Cn8CNAwM.js} +4 -4
  18. package/dist/{DeadLetters-DhJkMpd_.js → DeadLetters--js7aeC6.js} +4 -4
  19. package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-92szOrYd.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-lnFUie1d.js} +1 -1
  20. package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js → EmptyState.vue_vue_type_script_setup_true_lang-DHmu-UG-.js} +1 -1
  21. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-lvAuBG-0.js → FormGroup.vue_vue_type_script_setup_true_lang-BUhKKybf.js} +4 -4
  22. package/dist/{FormRow.vue_vue_type_script_setup_true_lang-CpgNVQF4.js → FormRow.vue_vue_type_script_setup_true_lang-B-uth5RB.js} +1 -1
  23. package/dist/{FormView.vue_vue_type_script_setup_true_lang-D01Jr4UU.js → FormView.vue_vue_type_script_setup_true_lang-CoQZG-hB.js} +2 -2
  24. package/dist/{General-CwTPC5UP.js → General-BGT9H69S.js} +8 -8
  25. package/dist/{HeaderAction.vue_vue_type_script_setup_true_lang-Da59TLBh.js → HeaderAction.vue_vue_type_script_setup_true_lang-Uw0vwV-o.js} +2 -2
  26. package/dist/{Icon.vue_vue_type_script_lang-BhhsFYwp.js → Icon.vue_vue_type_script_lang-BIzh8LF1.js} +19 -13
  27. package/dist/{IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js → IconTile.vue_vue_type_script_setup_true_lang-DRirnJvd.js} +1 -1
  28. package/dist/{IncidentRecord-hXEGuLGg.js → IncidentRecord-BETFfXbI.js} +17 -17
  29. package/dist/{IncidentsList-C41VyDwK.js → IncidentsList-BIr3a2To.js} +6 -6
  30. package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CrGrjrlO.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-DjXYh-p0.js} +1 -1
  31. package/dist/{Menu.vue_vue_type_script_setup_true_lang-Cqu4Ebsb.js → Menu.vue_vue_type_script_setup_true_lang-D2FsOVYA.js} +1 -1
  32. package/dist/{MenuButton.vue_vue_type_script_setup_true_lang-C-XRr5f2.js → MenuButton.vue_vue_type_script_setup_true_lang-BNzrYIzR.js} +1 -1
  33. package/dist/{Modal.vue_vue_type_script_setup_true_lang-CZ7WrDwu.js → Modal.vue_vue_type_script_setup_true_lang-BRRMKXOV.js} +2 -2
  34. package/dist/{NewRolePage-BYYZJkK7.js → NewRolePage-B0Y5MrTu.js} +4 -4
  35. package/dist/{NoAccess.vue_vue_type_script_setup_true_lang-BHzZtZ50.js → NoAccess.vue_vue_type_script_setup_true_lang-CnfE_AEl.js} +1 -1
  36. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-BhNZgEW6.js → NumberField.vue_vue_type_script_setup_true_lang-BDZ_0TH7.js} +2 -2
  37. package/dist/{Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js → Panel.vue_vue_type_script_setup_true_lang-CwcJadT7.js} +1 -1
  38. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-mYFuG-Y3.js → PersonAccess.vue_vue_type_script_setup_true_lang-CJMV9BDQ.js} +12 -12
  39. package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-DmMg1T_V.js → PhotoViewer.vue_vue_type_script_setup_true_lang-BL485L63.js} +1 -1
  40. package/dist/{ProfilePage-DGEsIycR.js → ProfilePage-CMy2Dkr2.js} +17 -17
  41. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-B3BnYg1x.js → RecordHeader.vue_vue_type_script_setup_true_lang-D4PcZnbo.js} +2 -2
  42. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-1iZtj3rh.js → ResourcePage.vue_vue_type_script_setup_true_lang-CpGwm2tv.js} +4 -4
  43. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-BslSDDiM.js → RoleEditor.vue_vue_type_script_setup_true_lang-CMo8PrO7.js} +12 -12
  44. package/dist/{RolePage-C08ZUqw1.js → RolePage-DGFISfM1.js} +13 -13
  45. package/dist/{RolesPage-FOuY1VKg.js → RolesPage-Bq9EVB_3.js} +9 -9
  46. package/dist/{SectionList.vue_vue_type_script_setup_true_lang-CodyVezo.js → SectionList.vue_vue_type_script_setup_true_lang-BdJ11lZo.js} +3 -3
  47. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-DCTFxfPB.js → SectionNavigator.vue_vue_type_script_setup_true_lang-CnzECivO.js} +6 -6
  48. package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-CLR6EvzO.js → SegmentedField.vue_vue_type_script_setup_true_lang-D3IZil4q.js} +2 -2
  49. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-D5xYofdb.js → SelectField.vue_vue_type_script_setup_true_lang-DxCEwED6.js} +6 -6
  50. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CDr4WNIb.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-DtVXUOdP.js} +8 -8
  51. package/dist/{ServiceAccountRecord-kWwIQGZb.js → ServiceAccountRecord-Dc7Gn52W.js} +18 -18
  52. package/dist/{ServiceAccountsList-CKy9_YHP.js → ServiceAccountsList-DBUFeka-.js} +10 -10
  53. package/dist/{Sessions-BDc8gdYH.js → Sessions-BMmqYZrJ.js} +7 -7
  54. package/dist/{SettingsPage-t-8kmFVT.js → SettingsPage-4Dolsr0t.js} +18 -18
  55. package/dist/Sheet.vue_vue_type_script_setup_true_lang-BVU5yzXe.js +163 -0
  56. package/dist/{SignIn-CqtkvtCZ.js → SignIn-uFn1ZWG8.js} +8 -8
  57. package/dist/{SignInPage-DcdNKZIb.js → SignInPage-DouCg9aD.js} +6 -6
  58. package/dist/{SignIns-D4-nGu0B.js → SignIns-CqN5UNmh.js} +5 -5
  59. package/dist/SortableList.vue_vue_type_script_setup_true_lang-D2-5Z_jO.js +112 -0
  60. package/dist/{StatusLine.vue_vue_type_script_setup_true_lang-DsdQmLq6.js → StatusLine.vue_vue_type_script_setup_true_lang-DBkQueB0.js} +1 -1
  61. package/dist/{SwipeActions.vue_vue_type_script_setup_true_lang-D8SiC0G7.js → SwipeActions.vue_vue_type_script_setup_true_lang-DUjUWq3G.js} +1 -1
  62. package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-CLtcuofe.js → SwitchField.vue_vue_type_script_setup_true_lang-CTMjlNid.js} +2 -2
  63. package/dist/Tabs.vue_vue_type_script_setup_true_lang-7CJto6Mp.js +169 -0
  64. package/dist/{TextField.vue_vue_type_script_setup_true_lang-CVGh-p3J.js → TextField.vue_vue_type_script_setup_true_lang-B6Q65aQA.js} +4 -4
  65. package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-YxUlNHSk.js → TextareaField.vue_vue_type_script_setup_true_lang-Cj0LKDdo.js} +2 -2
  66. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DHNC_MLt.js → TimeField.vue_vue_type_script_setup_true_lang-TSnnjMn1.js} +4 -4
  67. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-d_KuxWjH.js → Timestamp.vue_vue_type_script_setup_true_lang-0WL7PP0j.js} +1 -1
  68. package/dist/{UserRecord-CwZCr9Im.js → UserRecord-CH5oNRLg.js} +10 -10
  69. package/dist/{UsersList-Cn19sFgv.js → UsersList-BmxWpt9h.js} +3 -3
  70. package/dist/{ViewTabs.vue_vue_type_script_setup_true_lang-BjdDXE3T.js → ViewTabs.vue_vue_type_script_setup_true_lang-BKI5DGuS.js} +1 -1
  71. package/dist/access/index.js +7 -7
  72. package/dist/app/index.js +2 -2
  73. package/dist/{application-CDSweJb9.js → application-C5fZyCB9.js} +8 -8
  74. package/dist/{back-LcLlFodC.js → back-CeozxCgQ.js} +2 -2
  75. package/dist/button/index.js +1 -1
  76. package/dist/characteristics/CharacteristicsPage.vue.d.ts +2 -0
  77. package/dist/characteristics/DeleteDialog.vue.d.ts +22 -0
  78. package/dist/characteristics/ItemSheet.vue.d.ts +25 -0
  79. package/dist/characteristics/access.d.ts +3 -0
  80. package/dist/characteristics/api.d.ts +23 -0
  81. package/dist/characteristics/context.d.ts +12 -0
  82. package/dist/characteristics/feature.d.ts +27 -0
  83. package/dist/characteristics/index.d.ts +10 -0
  84. package/dist/characteristics/index.js +617 -0
  85. package/dist/characteristics/model.d.ts +34 -0
  86. package/dist/characteristics/routes.d.ts +13 -0
  87. package/dist/collection/CollectionTree.vue.d.ts +51 -0
  88. package/dist/collection/CollectionTreeBranch.vue.d.ts +12 -0
  89. package/dist/collection/FileExplorer.vue.d.ts +53 -0
  90. package/dist/collection/RowMore.vue.d.ts +11 -0
  91. package/dist/collection/explorer.d.ts +11 -0
  92. package/dist/collection/index.d.ts +5 -0
  93. package/dist/collection/index.js +431 -158
  94. package/dist/collection/tree.d.ts +64 -0
  95. package/dist/content/DiffView.vue.d.ts +22 -0
  96. package/dist/content/PreviewFrame.vue.d.ts +46 -0
  97. package/dist/content/diff.d.ts +27 -0
  98. package/dist/content/index.d.ts +4 -0
  99. package/dist/content/index.js +552 -218
  100. package/dist/content/previewFrame.d.ts +50 -0
  101. package/dist/{contributions-B0x5x5xD.js → contributions-BSmIRPg1.js} +1 -1
  102. package/dist/controls/SortableList.vue.d.ts +32 -0
  103. package/dist/controls/Tabs.vue.d.ts +2 -0
  104. package/dist/controls/index.d.ts +1 -0
  105. package/dist/controls/index.js +18 -16
  106. package/dist/form/CharacteristicField.vue.d.ts +36 -0
  107. package/dist/form/CodeEditor.vue.d.ts +61 -0
  108. package/dist/form/I18nField.vue.d.ts +1 -1
  109. package/dist/form/MarkerList.vue.d.ts +20 -0
  110. package/dist/form/TextareaField.vue.d.ts +1 -1
  111. package/dist/form/index.d.ts +3 -0
  112. package/dist/form/index.js +1769 -1805
  113. package/dist/{guards-CNJ0ATVC.js → guards-BP9x7CLF.js} +1 -1
  114. package/dist/i18n/index.js +46 -46
  115. package/dist/icon/core.d.ts +6 -0
  116. package/dist/icon/index.js +1 -1
  117. package/dist/identity/index.js +3 -3
  118. package/dist/identity/profile/EmailChangeDialog.vue.d.ts +2 -2
  119. package/dist/incidents/index.js +1 -1
  120. package/dist/{index-SLJWm40T.js → index-4wyfEeIw.js} +9 -9
  121. package/dist/{index-BA2w8uwD.js → index-C_ZVaTkR.js} +27 -27
  122. package/dist/{index-1HS7O2-e.js → index-OVbtHAtG.js} +10 -10
  123. package/dist/index.d.ts +1 -1
  124. package/dist/index.js +1 -1
  125. package/dist/modal/Sheet.vue.d.ts +13 -0
  126. package/dist/modal/TabbedSheet.vue.d.ts +46 -0
  127. package/dist/modal/index.d.ts +1 -0
  128. package/dist/modal/index.js +123 -41
  129. package/dist/modules/characteristics/entities.d.ts +67 -0
  130. package/dist/modules/characteristics/routes.d.ts +55 -0
  131. package/dist/modules/characteristics/schemas.d.ts +50 -0
  132. package/dist/modules/identity/entities.d.ts +1 -0
  133. package/dist/navigation-C05vGEN8.js +55 -0
  134. package/dist/{neighbors-Dg_LU9ry.js → neighbors-BqfO6zf3.js} +2 -2
  135. package/dist/notifications/index.js +1 -1
  136. package/dist/onboarding/index.js +2 -2
  137. package/dist/{options-mOOX6JSS.js → options-DDCG86OV.js} +2 -2
  138. package/dist/overlay/index.js +4 -4
  139. package/dist/page/SectionNavigator.vue.d.ts +1 -1
  140. package/dist/page/SplitPane.vue.d.ts +54 -0
  141. package/dist/page/WorkbenchPage.vue.d.ts +72 -0
  142. package/dist/page/index.d.ts +2 -0
  143. package/dist/page/index.js +343 -104
  144. package/dist/phone/index.js +3 -3
  145. package/dist/platform/index.js +3 -3
  146. package/dist/platform/navigation.d.ts +10 -0
  147. package/dist/{platform-DU9QFts8.js → platform-YWfOO7b2.js} +94 -88
  148. package/dist/pwa/index.js +3 -3
  149. package/dist/resource/index.js +1 -1
  150. package/dist/{resources-BZLlAtoS.js → resources-DkI60fHL.js} +1 -1
  151. package/dist/router/index.js +4 -4
  152. package/dist/router/navigation.d.ts +2 -0
  153. package/dist/routes-DC8BWFz8.js +251 -0
  154. package/dist/{rowLayout-PIuD7MGo.js → rowLayout-zd3Yw6fO.js} +34 -33
  155. package/dist/{sectionIndex-BS0ic5W7.js → sectionIndex-CSr457Lb.js} +2 -2
  156. package/dist/{sections-BpiRLntE.js → sections-DXso1JSV.js} +2 -2
  157. package/dist/shell/NavigationList.vue.d.ts +1 -1
  158. package/dist/shell/index.js +522 -501
  159. package/dist/shell/navigationGroups.d.ts +4 -1
  160. package/dist/state/index.js +8 -8
  161. package/dist/{state-z1iPF1DT.js → state-DqCZdet7.js} +1 -1
  162. package/dist/styles.css +1 -1
  163. package/dist/{suggestions-DeMgs_ki.js → suggestions-DZ3B5RVH.js} +1 -1
  164. package/dist/testing/index.js +2 -2
  165. package/dist/{useCommand-DQKvro1n.js → useCommand-DerEnzIW.js} +4 -4
  166. package/dist/{useGroupSheet-CRw3MUmX.js → useGroupSheet-B9TCHIKH.js} +5 -5
  167. package/dist/{usePreferences-DB29UTFD.js → usePreferences-D38x73re.js} +1 -1
  168. package/dist/{useRecordDialog-0azHxxvm.js → useRecordDialog-DX97ivZD.js} +1 -1
  169. package/dist/{useResourceForm-zVuWerSn.js → useResourceForm-D8T1snBQ.js} +1 -1
  170. package/dist/{useTypedEntry-BsMV66Yc.js → useTypedEntry-CTkgM29Y.js} +2 -2
  171. package/package.json +6 -2
  172. package/dist/Sheet.vue_vue_type_script_setup_true_lang-BG8HUNfs.js +0 -145
  173. package/dist/Tabs.vue_vue_type_script_setup_true_lang-tpkGp98F.js +0 -155
  174. package/dist/navigation-d-JAPBGA.js +0 -53
@@ -1,98 +1,104 @@
1
1
  import { c as U } from "./client-Do8v1I5l.js";
2
2
  import { d as _ } from "./context-Ch1r4fdN.js";
3
- import { a as A, A as z } from "./error-CD7x0Jrz.js";
3
+ import { a as $, A as z } from "./error-CD7x0Jrz.js";
4
4
  import { shallowRef as C } from "vue";
5
- const I = (e, r) => e.level === r.level && e.id === r.id, T = (e, r) => Object.prototype.hasOwnProperty.call(e, r);
6
- function N(e, r = {}) {
7
- const n = r.covers ?? I;
5
+ const I = (e, t) => e.level === t.level && e.id === t.id, T = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
6
+ function N(e, t = {}) {
7
+ const n = t.covers ?? I;
8
8
  function o(s) {
9
- const t = e();
10
- return !t || !T(t.permissions, s) || t.unavailable.includes(s) ? null : t.permissions[s] ?? null;
9
+ const r = e();
10
+ return !r || !T(r.permissions, s) || r.unavailable.includes(s) ? null : r.permissions[s] ?? null;
11
11
  }
12
- function u(s, t) {
12
+ function u(s, r) {
13
13
  const c = o(s);
14
- return c ? t ? (c.clauses.length > 0 ? c.clauses.map((i) => i.scope) : [c.scope]).some((i) => n(i, t)) : !0 : !1;
14
+ return c ? r ? (c.clauses.length > 0 ? c.clauses.map((i) => i.scope) : [c.scope]).some((i) => n(i, r)) : !0 : !1;
15
15
  }
16
16
  return {
17
17
  get root() {
18
18
  return e()?.root ?? !1;
19
19
  },
20
20
  can: u,
21
- canAny: (s) => s.some((t) => u(t)),
22
- canAll: (s) => s.every((t) => u(t)),
21
+ canAny: (s) => s.some((r) => u(r)),
22
+ canAll: (s) => s.every((r) => u(r)),
23
23
  held: o
24
24
  };
25
25
  }
26
- const $ = ["own", "own_location", "all"], y = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
27
- function S(e, r, n) {
28
- return !y(e) || typeof e.level != "string" ? (n.push(`${r}: expected { level: string, id?: number }`), { level: "" }) : (e.id !== void 0 && typeof e.id != "number" && n.push(`${r}.id: expected number`), typeof e.id == "number" ? { level: e.level, id: e.id } : { level: e.level });
26
+ const A = ["own", "own_location", "all"], y = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
27
+ function S(e, t, n) {
28
+ return !y(e) || typeof e.level != "string" ? (n.push(`${t}: expected { level: string, id?: number }`), { level: "" }) : (e.id !== void 0 && typeof e.id != "number" && n.push(`${t}.id: expected number`), typeof e.id == "number" ? { level: e.level, id: e.id } : { level: e.level });
29
29
  }
30
- function O(e, r, n) {
31
- return typeof e == "string" && $.includes(e) ? e : (n.push(`${r}: expected one of ${$.join(", ")}`), "own");
30
+ function O(e, t, n) {
31
+ return typeof e == "string" && A.includes(e) ? e : (n.push(`${t}: expected one of ${A.join(", ")}`), "own");
32
32
  }
33
- function B(e) {
34
- const r = [], n = {}, o = { root: !1, permissions: {}, unavailable: [] };
33
+ function H(e) {
34
+ const t = [], n = {}, o = { root: !1, permissions: {}, unavailable: [] };
35
35
  if (!y(e)) return { snapshot: o, issues: ["access: expected an object"] };
36
- if (!y(e.permissions)) r.push("access.permissions: expected an object");
36
+ if (!y(e.permissions)) t.push("access.permissions: expected an object");
37
37
  else
38
- for (const [s, t] of Object.entries(e.permissions)) {
38
+ for (const [s, r] of Object.entries(e.permissions)) {
39
39
  const c = `access.permissions.${s}`;
40
- if (!y(t)) {
41
- r.push(`${c}: expected an object`);
40
+ if (!y(r)) {
41
+ t.push(`${c}: expected an object`);
42
42
  continue;
43
43
  }
44
- const f = (Array.isArray(t.clauses) ? t.clauses : []).map((i, x) => {
45
- const m = `${c}.clauses[${x}]`;
44
+ const f = (Array.isArray(r.clauses) ? r.clauses : []).map((i, x) => {
45
+ const h = `${c}.clauses[${x}]`;
46
46
  if (!y(i))
47
- return r.push(`${m}: expected an object`), { scope: { level: "" }, qualifier: "own" };
48
- const d = { scope: S(i.scope, `${m}.scope`, r), qualifier: O(i.qualifier, `${m}.qualifier`, r) };
47
+ return t.push(`${h}: expected an object`), { scope: { level: "" }, qualifier: "own" };
48
+ const d = { scope: S(i.scope, `${h}.scope`, t), qualifier: O(i.qualifier, `${h}.qualifier`, t) };
49
49
  return typeof i.role == "string" ? { ...d, role: i.role } : d;
50
50
  });
51
51
  n[s] = {
52
- scope: S(t.scope, `${c}.scope`, r),
53
- qualifier: O(t.qualifier, `${c}.qualifier`, r),
52
+ scope: S(r.scope, `${c}.scope`, t),
53
+ qualifier: O(r.qualifier, `${c}.qualifier`, t),
54
54
  clauses: f
55
55
  };
56
56
  }
57
57
  const u = e.unavailable ?? [];
58
- return (!Array.isArray(u) || !u.every((s) => typeof s == "string")) && r.push("access.unavailable: expected an array of strings"), {
58
+ return (!Array.isArray(u) || !u.every((s) => typeof s == "string")) && t.push("access.unavailable: expected an array of strings"), {
59
59
  snapshot: {
60
60
  root: e.root === !0,
61
61
  permissions: n,
62
62
  unavailable: Array.isArray(u) ? u.filter((s) => typeof s == "string") : []
63
63
  },
64
- issues: r
64
+ issues: t
65
65
  };
66
66
  }
67
- const F = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
68
- function P(e, r, n = "navigation") {
67
+ function R(e) {
68
+ return e.startsWith("/") ? !e.startsWith("//") && !e.startsWith("/\\") : /^https?:\/\//i.test(e);
69
+ }
70
+ const W = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
71
+ function P(e, t, n = "navigation") {
69
72
  return Array.isArray(e) ? e.flatMap((o, u) => {
70
73
  const s = `${n}[${u}]`;
71
- if (!F(o) || typeof o.i18n != "string")
72
- return r.push(`${s}: expected an object with an i18n key`), [];
73
- for (const c of ["icon", "route"])
74
- o[c] != null && typeof o[c] != "string" && r.push(`${s}.${c}: expected a string`);
75
- const t = o.children == null ? void 0 : P(o.children, r, `${s}.children`);
74
+ if (!W(o) || typeof o.i18n != "string")
75
+ return t.push(`${s}: expected an object with an i18n key`), [];
76
+ for (const f of ["icon", "route", "href"])
77
+ o[f] != null && typeof o[f] != "string" && t.push(`${s}.${f}: expected a string`);
78
+ let r = typeof o.href == "string" ? o.href : void 0;
79
+ r !== void 0 && typeof o.route == "string" ? (t.push(`${s}: has both a route and an href; the route is used`), r = void 0) : r !== void 0 && !R(r) && (t.push(`${s}.href: expected a path on this origin or an http(s) URL`), r = void 0);
80
+ const c = o.children == null ? void 0 : P(o.children, t, `${s}.children`);
76
81
  return [
77
82
  {
78
83
  i18n: o.i18n,
79
84
  ...typeof o.icon == "string" && { icon: o.icon },
80
85
  ...typeof o.route == "string" && { route: o.route },
81
- ...t && { children: t }
86
+ ...r !== void 0 && { href: r },
87
+ ...c && { children: c }
82
88
  }
83
89
  ];
84
- }) : (r.push(`${n}: expected an array`), []);
90
+ }) : (t.push(`${n}: expected an array`), []);
85
91
  }
86
- const b = (e) => typeof e == "object" && e !== null && !Array.isArray(e), H = (e) => {
92
+ const b = (e) => typeof e == "object" && e !== null && !Array.isArray(e), B = (e) => {
87
93
  if (b(e) && (typeof e.id == "number" || typeof e.id == "string")) return { id: e.id };
88
94
  throw new TypeError("expected an object with a numeric or string id");
89
95
  };
90
- function Q(e, r = H) {
96
+ function F(e, t = B) {
91
97
  const n = [];
92
98
  if (!b(e)) throw j(["expected an object"]);
93
99
  let o = null;
94
100
  try {
95
- o = r(e.user);
101
+ o = t(e.user);
96
102
  } catch (i) {
97
103
  n.push(`user: ${i instanceof Error ? i.message : "invalid"}`);
98
104
  }
@@ -106,30 +112,30 @@ function Q(e, r = H) {
106
112
  const i = e.impersonator;
107
113
  b(i) && (typeof i.id == "number" || typeof i.id == "string") && typeof i.name == "string" ? s = { id: i.id, name: i.name } : n.push("impersonator: expected { id, name }");
108
114
  }
109
- const t = B(e.access);
110
- n.push(...t.issues);
115
+ const r = H(e.access);
116
+ n.push(...r.issues);
111
117
  const c = e.navigation === void 0 || e.navigation === null ? void 0 : P(e.navigation, n), f = b(e.preferences) ? e.preferences : {};
112
118
  if (o === null || n.length > 0) throw j(n);
113
- return { user: o, expiresAt: u, access: t.snapshot, preferences: f, ...s && { impersonator: s }, ...c && { navigation: c } };
119
+ return { user: o, expiresAt: u, access: r.snapshot, preferences: f, ...s && { impersonator: s }, ...c && { navigation: c } };
114
120
  }
115
121
  const j = (e) => new z({ kind: "malformed", message: `Unreadable session payload: ${e.join("; ")}` });
116
- function R(e, r = {}) {
117
- const { mePath: n = "/auth/me", signOutPath: o = "/auth/logout", parseUser: u } = r;
122
+ function L(e, t = {}) {
123
+ const { mePath: n = "/auth/me", signOutPath: o = "/auth/logout", parseUser: u } = t;
118
124
  return {
119
125
  async load(s) {
120
126
  try {
121
- const { data: t } = await e.get(n, { signal: s, handleUnauthorized: !1 });
122
- return Q(t, u);
123
- } catch (t) {
124
- if (A(t) && t.kind === "unauthorized") return null;
125
- throw t;
127
+ const { data: r } = await e.get(n, { signal: s, handleUnauthorized: !1 });
128
+ return F(r, u);
129
+ } catch (r) {
130
+ if ($(r) && r.kind === "unauthorized") return null;
131
+ throw r;
126
132
  }
127
133
  },
128
134
  async signOut() {
129
135
  try {
130
136
  await e.post(o, void 0, { handleUnauthorized: !1 });
131
137
  } catch (s) {
132
- if (!(A(s) && s.kind === "unauthorized")) throw s;
138
+ if (!($(s) && s.kind === "unauthorized")) throw s;
133
139
  }
134
140
  }
135
141
  };
@@ -138,34 +144,34 @@ function k(e) {
138
144
  return e.status === "authenticated" ? e : e.status === "anonymous" && e.reason === "expired" ? e.previous ?? null : null;
139
145
  }
140
146
  const E = 3e3;
141
- function D(e, r = {}) {
147
+ function Q(e, t = {}) {
142
148
  const n = C({ status: "unknown" });
143
149
  let o = 0;
144
- const u = new Set(r.beforeSignOut ? [r.beforeSignOut] : []);
145
- let s = !1, t = null, c = null, f = null;
150
+ const u = new Set(t.beforeSignOut ? [t.beforeSignOut] : []);
151
+ let s = !1, r = null, c = null, f = null;
146
152
  function i() {
147
153
  o++, f?.controller.abort(), f = null;
148
154
  }
149
155
  async function x(a) {
150
156
  const l = new AbortController();
151
157
  let g;
152
- const v = new Promise((h) => {
158
+ const v = new Promise((m) => {
153
159
  g = setTimeout(() => {
154
- l.abort(), r.onError?.(new Error(`A before-sign-out hook did not finish within ${E} ms; signing out without it.`)), h();
160
+ l.abort(), t.onError?.(new Error(`A before-sign-out hook did not finish within ${E} ms; signing out without it.`)), m();
155
161
  }, E);
156
162
  }), w = Promise.all(
157
- [...u].map(async (h) => {
163
+ [...u].map(async (m) => {
158
164
  try {
159
- await h(a, l.signal);
165
+ await m(a, l.signal);
160
166
  } catch (p) {
161
- r.onError?.(p);
167
+ t.onError?.(p);
162
168
  }
163
169
  })
164
170
  ).then(() => {
165
171
  });
166
172
  await Promise.race([w, v]), clearTimeout(g);
167
173
  }
168
- function m() {
174
+ function h() {
169
175
  if (f) return f.promise;
170
176
  const a = o, l = new AbortController(), g = n.value, v = k(g) !== null;
171
177
  v || (n.value = { status: "loading" });
@@ -176,18 +182,18 @@ function D(e, r = {}) {
176
182
  n.value = p ? { status: "authenticated", ...p } : { status: "anonymous", reason: "none" };
177
183
  } catch (p) {
178
184
  if (o !== a) return n.value;
179
- r.onError?.(p), n.value = v ? g : { status: "failed", error: p };
185
+ t.onError?.(p), n.value = v ? g : { status: "failed", error: p };
180
186
  } finally {
181
187
  o === a && (f = null);
182
188
  }
183
189
  return n.value;
184
- }, h = Promise.resolve().then(w);
185
- return f = { controller: l, promise: h }, h;
190
+ }, m = Promise.resolve().then(w);
191
+ return f = { controller: l, promise: m }, m;
186
192
  }
187
193
  const d = {
188
194
  state: n,
189
- restore: () => n.value.status === "unknown" || n.value.status === "failed" ? m() : f?.promise ?? Promise.resolve(n.value),
190
- refresh: m,
195
+ restore: () => n.value.status === "unknown" || n.value.status === "failed" ? h() : f?.promise ?? Promise.resolve(n.value),
196
+ refresh: h,
191
197
  establish(a) {
192
198
  i(), n.value = { status: "authenticated", ...a };
193
199
  },
@@ -208,25 +214,25 @@ function D(e, r = {}) {
208
214
  expire() {
209
215
  if (n.value.status !== "authenticated") return;
210
216
  const { status: a, ...l } = n.value;
211
- i(), n.value = s && !n.value.impersonator ? { status: "anonymous", reason: "expired", previous: l } : { status: "anonymous", reason: "expired" }, r.onExpired?.();
217
+ i(), n.value = s && !n.value.impersonator ? { status: "anonymous", reason: "expired", previous: l } : { status: "anonymous", reason: "expired" }, t.onExpired?.();
212
218
  },
213
219
  signOut() {
214
- return t ?? (t = (async () => {
220
+ return r ?? (r = (async () => {
215
221
  try {
216
222
  const a = n.value;
217
223
  a.status === "authenticated" && u.size > 0 && await x(a.user), i(), n.value = { status: "anonymous", reason: "signedOut" }, await e.signOut();
218
224
  } finally {
219
- t = null;
225
+ r = null;
220
226
  }
221
- })()), t;
227
+ })()), r;
222
228
  },
223
229
  get renewable() {
224
- return r.renew !== void 0 && (r.renewable?.() ?? !0);
230
+ return t.renew !== void 0 && (t.renewable?.() ?? !0);
225
231
  },
226
232
  renew() {
227
233
  return n.value.status !== "authenticated" ? Promise.resolve(!1) : (c ?? (c = (async () => {
228
234
  try {
229
- if (d.renewable && await r.renew(d)) return !0;
235
+ if (d.renewable && await t.renew(d)) return !0;
230
236
  } catch {
231
237
  }
232
238
  return d.expire(), !1;
@@ -243,8 +249,8 @@ function D(e, r = {}) {
243
249
  };
244
250
  return d;
245
251
  }
246
- function W(e) {
247
- const r = U({
252
+ function X(e) {
253
+ const t = U({
248
254
  baseUrl: e.config.apiBase,
249
255
  transport: e.transport,
250
256
  headers: e.headers,
@@ -253,33 +259,33 @@ function W(e) {
253
259
  async onUnauthorized() {
254
260
  return await u.renew() ? "retry" : "fail";
255
261
  }
256
- }), n = e.session ?? ((t) => R(t)), o = typeof n == "function" ? n(r) : n, u = D(o, {
262
+ }), n = e.session ?? ((r) => L(r)), o = typeof n == "function" ? n(t) : n, u = Q(o, {
257
263
  onError: e.onSessionError,
258
264
  onExpired: e.onSessionExpired,
259
265
  beforeSignOut: e.beforeSignOut,
260
- renew: e.renewSession && ((t) => e.renewSession(t, r)),
266
+ renew: e.renewSession && ((r) => e.renewSession(r, t)),
261
267
  renewable: e.renewable
262
268
  }), s = N(
263
269
  () => k(u.state.value)?.access ?? null,
264
270
  { covers: e.covers }
265
271
  );
266
- return { config: e.config, http: r, session: u, access: s };
272
+ return { config: e.config, http: t, session: u, access: s };
267
273
  }
268
- const q = _("platform"), K = q[0], L = q[1], X = () => L().access;
269
- function Y(e, r) {
270
- e.provide(K, r);
274
+ const q = _("platform"), D = q[0], K = q[1], Y = () => K().access;
275
+ function Z(e, t) {
276
+ e.provide(D, t);
271
277
  }
272
278
  export {
273
- W as a,
279
+ X as a,
274
280
  E as b,
275
281
  N as c,
276
- D as d,
277
- R as e,
278
- Q as f,
279
- K as g,
282
+ Q as d,
283
+ L as e,
284
+ F as f,
285
+ D as g,
280
286
  k as h,
281
- Y as i,
282
- X as j,
287
+ Z as i,
288
+ Y as j,
283
289
  P as p,
284
- L as u
290
+ K as u
285
291
  };
package/dist/pwa/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { computed as m, shallowRef as D, ref as x, defineComponent as _, openBlock as f, createBlock as b, Teleport as S, createElementVNode as t, toDisplayString as c, unref as n, createVNode as g, withCtx as k, createTextVNode as q, createElementBlock as h, useModel as Q, watch as T, createCommentVNode as M, mergeModels as A, onMounted as V, onBeforeUnmount as R, Fragment as W, renderList as G, normalizeClass as j } from "vue";
2
2
  import { useI18n as C } from "vue-i18n";
3
- import { _ as P } from "../Button.vue_vue_type_script_setup_true_lang-JrqhO99l.js";
4
- import { _ as z } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
5
- import { _ as F } from "../Modal.vue_vue_type_script_setup_true_lang-CZ7WrDwu.js";
3
+ import { _ as P } from "../Button.vue_vue_type_script_setup_true_lang-CZkTqGtE.js";
4
+ import { _ as z } from "../Icon.vue_vue_type_script_lang-BIzh8LF1.js";
5
+ import { _ as F } from "../Modal.vue_vue_type_script_setup_true_lang-BRRMKXOV.js";
6
6
  import { encode as H } from "uqr";
7
7
  const v = D(null), I = x(!1);
8
8
  let B = !1;
@@ -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-1iZtj3rh.js";
4
+ import { _ as w, a as x } from "../ResourcePage.vue_vue_type_script_setup_true_lang-CpGwm2tv.js";
5
5
  async function i(t, e) {
6
6
  return (await a().platform.http.get(t, { signal: e.signal })).data;
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { shallowRef as c, defineComponent as p, useTemplateRef as u, watch as f, openBlock as d, createBlock as m, unref as a, withCtx as v, renderSlot as k, createCommentVNode as _ } from "vue";
2
2
  import { useI18n as h } from "vue-i18n";
3
- import { _ as b } from "./Modal.vue_vue_type_script_setup_true_lang-CZ7WrDwu.js";
3
+ import { _ as b } from "./Modal.vue_vue_type_script_setup_true_lang-BRRMKXOV.js";
4
4
  function P() {
5
5
  const o = c({ open: !1, options: null });
6
6
  let e = null;
@@ -1,9 +1,9 @@
1
- import { _ as a, c as o, a as r, i as t } from "../NoAccess.vue_vue_type_script_setup_true_lang-BHzZtZ50.js";
1
+ import { _ as a, c as o, a as r, i as t } from "../NoAccess.vue_vue_type_script_setup_true_lang-CnfE_AEl.js";
2
2
  import { d as c } from "../defineRoutes-BGAdiIrt.js";
3
3
  import { A as u, f as p, i as f, r as A, u as m } from "../access-DmAceEo5.js";
4
- import { i as l, r as x } from "../guards-CNJ0ATVC.js";
5
- import { u as y } from "../sections-BpiRLntE.js";
6
- import { b as v, c as N, n as H, u as b } from "../navigation-d-JAPBGA.js";
4
+ import { i as l, r as x } from "../guards-BP9x7CLF.js";
5
+ import { u as y } from "../sections-DXso1JSV.js";
6
+ import { b as v, c as N, n as H, u as b } from "../navigation-C05vGEN8.js";
7
7
  export {
8
8
  u as AppRouterView,
9
9
  a as NoAccess,
@@ -43,6 +43,8 @@ export interface NavigationItem {
43
43
  readonly icon: string | null;
44
44
  /** Where it goes; null for a group. */
45
45
  readonly to: RouteLocationRaw | null;
46
+ /** A destination outside the application (a full page load, no router); `to` is null then. */
47
+ readonly href?: string | null;
46
48
  /** The current page belongs to this destination, or to one of its children. */
47
49
  readonly active: boolean;
48
50
  readonly children: readonly NavigationItem[];