@wssto2/vue-core 0.2.0 → 0.3.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 (265) hide show
  1. package/README.md +33 -0
  2. package/dist/AccessGate.vue_vue_type_script_setup_true_lang-DKX3PH2n.js +22 -0
  3. package/dist/AccountMenuItem.vue_vue_type_script_setup_true_lang-DIGqTLwd.js +76 -0
  4. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-B7Lpfkf6.js +45 -0
  5. package/dist/Activity-DviO0VQ8.js +156 -0
  6. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CeKK8_g5.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-CvAnzdc1.js} +48 -47
  7. package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-e4hzkzg3.js → AlertDialog.vue_vue_type_script_setup_true_lang-CJsMUIUg.js} +1 -1
  8. package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-CWLB3xsR.js → AsyncSection.vue_vue_type_script_setup_true_lang-CCtthMRd.js} +4 -4
  9. package/dist/{Banner.vue_vue_type_script_setup_true_lang-n_wGPIIu.js → Banner.vue_vue_type_script_setup_true_lang-Cib_YYpr.js} +1 -1
  10. package/dist/{BottomDock.vue_vue_type_script_setup_true_lang-DhlMnPC2.js → BottomDock.vue_vue_type_script_setup_true_lang-CjN7xYEr.js} +1 -1
  11. package/dist/{Button.vue_vue_type_script_setup_true_lang-B1eZgLae.js → Button.vue_vue_type_script_setup_true_lang-CYil8h9z.js} +1 -1
  12. package/dist/Changes-DlT5mN9G.js +129 -0
  13. package/dist/CollectionPage.vue_vue_type_script_setup_true_lang-CXILftEc.js +1481 -0
  14. package/dist/DataTable.vue_vue_type_script_setup_true_lang-DSYgS9lC.js +52 -0
  15. package/dist/DateField.vue_vue_type_script_setup_true_lang-DMVjNsaM.js +1099 -0
  16. package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-DyhYHRyz.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-Cb3xJI1x.js} +1 -1
  17. package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-BeGpHMUP.js → EmptyState.vue_vue_type_script_setup_true_lang-C2ZYIT9F.js} +1 -1
  18. package/dist/FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js +276 -0
  19. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-0mfG8TkU.js +136 -0
  20. package/dist/FormView.vue_vue_type_script_setup_true_lang-Bz2m3AtF.js +38 -0
  21. package/dist/General-BD-Hcz0a.js +145 -0
  22. package/dist/{Icon.vue_vue_type_script_lang-DtC4_mkz.js → Icon.vue_vue_type_script_lang-VvcV2Bzo.js} +46 -33
  23. package/dist/{IconTile.vue_vue_type_script_setup_true_lang-Csfv6Sel.js → IconTile.vue_vue_type_script_setup_true_lang-D7QgnUyN.js} +1 -1
  24. package/dist/KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js +35 -0
  25. package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CvwoT1JF.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-C2udmeEA.js} +2 -2
  26. package/dist/{Menu.vue_vue_type_script_setup_true_lang-CrMj6KPD.js → Menu.vue_vue_type_script_setup_true_lang-BNAjx9tj.js} +61 -57
  27. package/dist/{Modal.vue_vue_type_script_setup_true_lang-BQZM49gC.js → Modal.vue_vue_type_script_setup_true_lang-D7SwVPpL.js} +4 -4
  28. package/dist/NewRolePage-Dla4YnMs.js +42 -0
  29. package/dist/NoAccess.vue_vue_type_script_setup_true_lang-8m9cNptR.js +31 -0
  30. package/dist/NumberField.vue_vue_type_script_setup_true_lang-CYRg7Kfg.js +113 -0
  31. package/dist/OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js +95 -0
  32. package/dist/PageBar.vue_vue_type_script_setup_true_lang-Cfr5xsJx.js +47 -0
  33. package/dist/{Panel.vue_vue_type_script_setup_true_lang-BQmv3cLb.js → Panel.vue_vue_type_script_setup_true_lang-BCRxRK4D.js} +1 -1
  34. package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-ElDizaW2.js → PhotoViewer.vue_vue_type_script_setup_true_lang-B3Q4dhqJ.js} +1 -1
  35. package/dist/Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js +125 -0
  36. package/dist/ProfilePage-OJMQ8cr8.js +691 -0
  37. package/dist/{ProgressTrack.vue_vue_type_script_setup_true_lang-1DDaNs2W.js → ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js} +2 -2
  38. package/dist/RecordHeader.vue_vue_type_script_setup_true_lang-DKsaKlAq.js +64 -0
  39. package/dist/ResourcePage.vue_vue_type_script_setup_true_lang-CJcKa9SW.js +173 -0
  40. package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-DuEPOmjI.js +299 -0
  41. package/dist/RolePage-bZzv_E4l.js +315 -0
  42. package/dist/RolesPage-BniZv0nB.js +115 -0
  43. package/dist/SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js +23 -0
  44. package/dist/SectionList.vue_vue_type_script_setup_true_lang-BKP_bge8.js +148 -0
  45. package/dist/SectionNavigator.vue_vue_type_script_setup_true_lang-BgGEGxSI.js +314 -0
  46. package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BZ9UdgA1.js +58 -0
  47. package/dist/SelectField.vue_vue_type_script_setup_true_lang-BiGaEKBQ.js +422 -0
  48. package/dist/SessionList.vue_vue_type_script_setup_true_lang-DUQpr7gb.js +111 -0
  49. package/dist/Sessions-Co5-xdeb.js +96 -0
  50. package/dist/Sheet.vue_vue_type_script_setup_true_lang-bHYzx7-J.js +142 -0
  51. package/dist/SignIn-BWwFbxki.js +140 -0
  52. package/dist/SignInPage-FnLtoi2q.js +60 -0
  53. package/dist/SignInTable.vue_vue_type_script_setup_true_lang-Dnx3T_42.js +79 -0
  54. package/dist/SignIns-3UcI64_h.js +66 -0
  55. package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-4I8m27ol.js +93 -0
  56. package/dist/Tabs.vue_vue_type_script_setup_true_lang-BeGaydRr.js +155 -0
  57. package/dist/TextField.vue_vue_type_script_setup_true_lang-C_FMf3Vc.js +269 -0
  58. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CU3KTKIJ.js +127 -0
  59. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-CSY_mMm1.js → Timestamp.vue_vue_type_script_setup_true_lang-1RJGKxbD.js} +1 -1
  60. package/dist/UserRecord-Ci8HfwbX.js +267 -0
  61. package/dist/UsersList-vEJ-cgkT.js +155 -0
  62. package/dist/ViewTabs.vue_vue_type_script_setup_true_lang-ByqTU2JT.js +28 -0
  63. package/dist/access/AddRoleDialog.vue.d.ts +19 -0
  64. package/dist/access/BindingRow.vue.d.ts +19 -0
  65. package/dist/access/EffectiveAccess.vue.d.ts +12 -0
  66. package/dist/access/NewRolePage.vue.d.ts +2 -0
  67. package/dist/access/PermissionTree.vue.d.ts +13 -0
  68. package/dist/access/PersonAccess.vue.d.ts +21 -0
  69. package/dist/access/ReplaceRoleDialog.vue.d.ts +17 -0
  70. package/dist/access/RoleCompareDialog.vue.d.ts +14 -0
  71. package/dist/access/RoleEditor.vue.d.ts +28 -0
  72. package/dist/access/RolePage.vue.d.ts +2 -0
  73. package/dist/access/RolesPage.vue.d.ts +2 -0
  74. package/dist/access/api.d.ts +26 -0
  75. package/dist/access/catalogue.d.ts +64 -0
  76. package/dist/access/context.d.ts +20 -0
  77. package/dist/access/effective.d.ts +42 -0
  78. package/dist/access/feature.d.ts +27 -0
  79. package/dist/access/index.d.ts +13 -0
  80. package/dist/access/index.js +15 -0
  81. package/dist/access/labels.d.ts +35 -0
  82. package/dist/access/refusals.d.ts +6 -0
  83. package/dist/access/routes.d.ts +45 -0
  84. package/dist/access/scopes.d.ts +20 -0
  85. package/dist/app/contributions.d.ts +1 -1
  86. package/dist/app/feature.d.ts +8 -0
  87. package/dist/app/index.js +259 -296
  88. package/dist/bottomDock-BZEiOPYZ.js +12 -0
  89. package/dist/button/Button.vue.d.ts +3 -3
  90. package/dist/button/index.js +1 -1
  91. package/dist/chrome-BS3xJcad.js +93 -0
  92. package/dist/client/client.d.ts +13 -0
  93. package/dist/client/index.d.ts +3 -1
  94. package/dist/client/index.js +19 -138
  95. package/dist/client/route.d.ts +59 -0
  96. package/dist/client-Bw0aM5Gu.js +147 -0
  97. package/dist/closeOverlays-CjVsIrpL.js +8 -0
  98. package/dist/collection/http.d.ts +4 -2
  99. package/dist/collection/index.js +74 -2428
  100. package/dist/content/index.js +37 -66
  101. package/dist/contributions-CDDg3fKp.js +26 -0
  102. package/dist/controls/DateButton.vue.d.ts +1 -1
  103. package/dist/controls/PopupButton.vue.d.ts +1 -1
  104. package/dist/controls/index.js +11 -10
  105. package/dist/defineRoutes-BGAdiIrt.js +19 -0
  106. package/dist/{describeError-l5T9b8Uv.js → describeError-Ctga6GcS.js} +1 -1
  107. package/dist/environment-Dva-SG8D.js +6 -0
  108. package/dist/{error-Bb_dr_Ay.js → error-CD7x0Jrz.js} +2 -2
  109. package/dist/feature-DdUAfyi4.js +25 -0
  110. package/dist/fieldMessages-C3Rpbktw.js +25 -0
  111. package/dist/form/CheckboxField.vue.d.ts +1 -1
  112. package/dist/form/CommandDialog.vue.d.ts +1 -1
  113. package/dist/form/DateField.vue.d.ts +1 -1
  114. package/dist/form/DateTimeField.vue.d.ts +1 -1
  115. package/dist/form/EditorPage.vue.d.ts +1 -1
  116. package/dist/form/Field.vue.d.ts +1 -1
  117. package/dist/form/FileField.vue.d.ts +1 -1
  118. package/dist/form/FormGroup.vue.d.ts +1 -1
  119. package/dist/form/FormGroupButton.vue.d.ts +1 -1
  120. package/dist/form/FormRow.vue.d.ts +1 -1
  121. package/dist/form/I18nField.vue.d.ts +3 -3
  122. package/dist/form/MoneyField.vue.d.ts +1 -1
  123. package/dist/form/MonthYearField.vue.d.ts +1 -1
  124. package/dist/form/NumberCell.vue.d.ts +1 -1
  125. package/dist/form/NumberField.vue.d.ts +2 -2
  126. package/dist/form/OtpInput.vue.d.ts +2 -2
  127. package/dist/form/PhotoField.vue.d.ts +1 -1
  128. package/dist/form/SwitchField.vue.d.ts +1 -1
  129. package/dist/form/TextField.vue.d.ts +3 -3
  130. package/dist/form/TextareaField.vue.d.ts +3 -3
  131. package/dist/form/TimeField.vue.d.ts +1 -1
  132. package/dist/form/date/DatePickerSheet.vue.d.ts +1 -1
  133. package/dist/form/date/MonthYearPanel.vue.d.ts +1 -1
  134. package/dist/form/index.js +1262 -3430
  135. package/dist/guards-Cd1V28oG.js +51 -0
  136. package/dist/http-DGGSKWvU.js +193 -0
  137. package/dist/i18n/index.d.ts +281 -0
  138. package/dist/i18n/index.js +50 -50
  139. package/dist/icon/core.d.ts +13 -0
  140. package/dist/icon/index.js +1 -1
  141. package/dist/identity/ImpersonationBanner.vue.d.ts +2 -0
  142. package/dist/identity/LocaleSync.vue.d.ts +2 -0
  143. package/dist/identity/SessionExpiry.vue.d.ts +2 -0
  144. package/dist/identity/SignInAsButton.vue.d.ts +15 -0
  145. package/dist/identity/SignInPage.vue.d.ts +2 -0
  146. package/dist/identity/context.d.ts +7 -0
  147. package/dist/identity/feature.d.ts +16 -0
  148. package/dist/identity/fieldMessages.d.ts +15 -0
  149. package/dist/identity/index.d.ts +16 -0
  150. package/dist/identity/index.js +18 -0
  151. package/dist/identity/profile/DetailsPanel.vue.d.ts +11 -0
  152. package/dist/identity/profile/EmailChangeDialog.vue.d.ts +14 -0
  153. package/dist/identity/profile/EmailPanel.vue.d.ts +11 -0
  154. package/dist/identity/profile/PanelActions.vue.d.ts +17 -0
  155. package/dist/identity/profile/PasswordPanel.vue.d.ts +2 -0
  156. package/dist/identity/profile/ProfileMenuItem.vue.d.ts +2 -0
  157. package/dist/identity/profile/ProfilePage.vue.d.ts +2 -0
  158. package/dist/identity/profile/SessionsPanel.vue.d.ts +2 -0
  159. package/dist/identity/profile/SignInsPanel.vue.d.ts +2 -0
  160. package/dist/identity/profile/VerifyCode.vue.d.ts +49 -0
  161. package/dist/identity/profile/routes.d.ts +13 -0
  162. package/dist/identity/session.d.ts +30 -0
  163. package/dist/identity/shared/ActionRow.vue.d.ts +20 -0
  164. package/dist/identity/shared/ChangeFeed.vue.d.ts +11 -0
  165. package/dist/identity/shared/PageBar.vue.d.ts +12 -0
  166. package/dist/identity/shared/SectionIntro.vue.d.ts +16 -0
  167. package/dist/identity/shared/SessionList.vue.d.ts +19 -0
  168. package/dist/identity/shared/SignInTable.vue.d.ts +11 -0
  169. package/dist/identity/shared/ViewTabs.vue.d.ts +23 -0
  170. package/dist/identity/shared/signInEvents.d.ts +9 -0
  171. package/dist/identity/signIn.d.ts +27 -0
  172. package/dist/identity/useSignInForm.d.ts +20 -0
  173. package/dist/identity/user.d.ts +6 -0
  174. package/dist/identity/users/DeactivateDialog.vue.d.ts +18 -0
  175. package/dist/identity/users/NewUserDialog.vue.d.ts +9 -0
  176. package/dist/identity/users/SetPasswordDialog.vue.d.ts +16 -0
  177. package/dist/identity/users/UserRecord.vue.d.ts +2 -0
  178. package/dist/identity/users/UsersList.vue.d.ts +2 -0
  179. package/dist/identity/users/access.d.ts +4 -0
  180. package/dist/identity/users/context.d.ts +9 -0
  181. package/dist/identity/users/feature.d.ts +34 -0
  182. package/dist/identity/users/languages.d.ts +4 -0
  183. package/dist/identity/users/list.d.ts +8 -0
  184. package/dist/identity/users/person.d.ts +26 -0
  185. package/dist/identity/users/personSections.d.ts +22 -0
  186. package/dist/identity/users/routes.d.ts +22 -0
  187. package/dist/identity/users/sections/Activity.vue.d.ts +2 -0
  188. package/dist/identity/users/sections/Changes.vue.d.ts +2 -0
  189. package/dist/identity/users/sections/General.vue.d.ts +2 -0
  190. package/dist/identity/users/sections/Sessions.vue.d.ts +2 -0
  191. package/dist/identity/users/sections/SignIn.vue.d.ts +2 -0
  192. package/dist/identity/users/sections/SignIns.vue.d.ts +2 -0
  193. package/dist/identity/users/status.d.ts +4 -0
  194. package/dist/index-B2dbYZR9.js +706 -0
  195. package/dist/index-BAcl44SC.js +459 -0
  196. package/dist/index.d.ts +1 -1
  197. package/dist/index.js +1 -1
  198. package/dist/internal/languageName.d.ts +2 -0
  199. package/dist/keepAlive-WYQGRhuz.js +48 -0
  200. package/dist/languageName-CItV_SOv.js +11 -0
  201. package/dist/languages-BShG9LpE.js +10 -0
  202. package/dist/leaveGuard-Cc8yeLxM.js +72 -0
  203. package/dist/modal/Modal.vue.d.ts +1 -1
  204. package/dist/modal/index.js +5 -5
  205. package/dist/modules/access/entities.d.ts +112 -0
  206. package/dist/modules/access/routes.d.ts +67 -0
  207. package/dist/modules/access/schemas.d.ts +73 -0
  208. package/dist/modules/identity/entities.d.ts +150 -0
  209. package/dist/modules/identity/routes.d.ts +118 -0
  210. package/dist/modules/identity/schemas.d.ts +145 -0
  211. package/dist/{navigation-B33ikiCS.js → navigation-BPWa63ge.js} +21 -20
  212. package/dist/neighbors-D0WRBxXI.js +86 -0
  213. package/dist/{options-DAkBtYkI.js → options-BXkMR63B.js} +51 -52
  214. package/dist/overlay/AlertDialog.vue.d.ts +3 -3
  215. package/dist/overlay/Popover.vue.d.ts +1 -1
  216. package/dist/overlay/closeOverlays.d.ts +7 -0
  217. package/dist/overlay/index.js +21 -20
  218. package/dist/page/AdaptivePageShell.vue.d.ts +2 -2
  219. package/dist/page/ResourceHeader.vue.d.ts +2 -2
  220. package/dist/page/index.js +99 -457
  221. package/dist/phone/PhoneField.vue.d.ts +2 -2
  222. package/dist/phone/index.js +2 -2
  223. package/dist/platform/index.d.ts +2 -2
  224. package/dist/platform/index.js +73 -90
  225. package/dist/platform/platform.d.ts +2 -2
  226. package/dist/platform/session.d.ts +22 -1
  227. package/dist/platform-hunMqFdB.js +255 -0
  228. package/dist/resource/index.js +8 -248
  229. package/dist/routeResource-DstM0hvf.js +82 -0
  230. package/dist/router/guards.d.ts +7 -1
  231. package/dist/router/index.js +23 -37
  232. package/dist/router/navigation.d.ts +1 -1
  233. package/dist/rowLayout-BI7a3Kom.js +603 -0
  234. package/dist/sectionIndex-BS0ic5W7.js +86 -0
  235. package/dist/{sections-LtxV5Mtk.js → sections-BEqW1dOc.js} +1 -1
  236. package/dist/shell/AccountMenuItem.vue.d.ts +1 -1
  237. package/dist/shell/BackofficeShell.vue.d.ts +2 -2
  238. package/dist/shell/NavigationList.vue.d.ts +1 -1
  239. package/dist/shell/ShellBrand.vue.d.ts +1 -1
  240. package/dist/shell/backofficeShell.d.ts +1 -1
  241. package/dist/shell/identity.d.ts +1 -1
  242. package/dist/shell/index.js +507 -575
  243. package/dist/state/ProgressTrack.vue.d.ts +1 -1
  244. package/dist/state/index.js +59 -92
  245. package/dist/status-C9aXR-Jb.js +33 -0
  246. package/dist/styles.css +1 -1
  247. package/dist/suggestions-BJAqOj4c.js +138 -0
  248. package/dist/testing/index.js +1 -1
  249. package/dist/toast-D9Z5To38.js +13 -0
  250. package/dist/useCommand-BgRwnYlV.js +135 -0
  251. package/dist/useLoad-CYRVx6HW.js +39 -0
  252. package/dist/useResourceForm-Bgc9jMcu.js +52 -0
  253. package/dist/useSaveChrome-chi6D3HY.js +25 -0
  254. package/dist/useSheetDrag-OsD6Eb6I.js +72 -0
  255. package/package.json +22 -5
  256. package/dist/NoAccess.vue_vue_type_script_setup_true_lang-OKW8pKYU.js +0 -78
  257. package/dist/SectionList.vue_vue_type_script_setup_true_lang-L9ita_Kx.js +0 -230
  258. package/dist/SelectField.vue_vue_type_script_setup_true_lang-DZTrU8NJ.js +0 -661
  259. package/dist/Sheet.vue_vue_type_script_setup_true_lang-CtkJ-4e3.js +0 -210
  260. package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-CGTuEnTv.js +0 -243
  261. package/dist/chrome-D9pwD6iS.js +0 -101
  262. package/dist/environment-D3nozt9a.js +0 -75
  263. package/dist/feature-DyDtyMLU.js +0 -47
  264. package/dist/platform-jqlKVJ2e.js +0 -244
  265. package/dist/toast-DvrHQ6Ag.js +0 -131
@@ -0,0 +1,138 @@
1
+ import { inject as O, shallowRef as S, ref as p, computed as y, onBeforeUnmount as R } from "vue";
2
+ import { i as x } from "./error-CD7x0Jrz.js";
3
+ import { c as m } from "./options-BXkMR63B.js";
4
+ const W = Symbol("vue-core.recentChoices"), D = 5, j = (e) => {
5
+ if (typeof e != "object" || e === null) return !1;
6
+ const n = e;
7
+ return (typeof n.value == "string" || typeof n.value == "number") && typeof n.label == "string";
8
+ }, J = {
9
+ read(e) {
10
+ try {
11
+ const n = JSON.parse(localStorage.getItem(`vue-core.recent.${e}`) ?? "[]");
12
+ return Array.isArray(n) ? n.filter(j).slice(0, D) : [];
13
+ } catch {
14
+ return [];
15
+ }
16
+ },
17
+ write(e, n) {
18
+ try {
19
+ localStorage.setItem(`vue-core.recent.${e}`, JSON.stringify(n));
20
+ } catch {
21
+ }
22
+ }
23
+ };
24
+ function _(e, n) {
25
+ const r = m(n.trim());
26
+ if (r === "") return { before: "", match: "", after: e };
27
+ let s = "";
28
+ const c = [];
29
+ let a = 0;
30
+ for (const d of e) {
31
+ const v = m(d);
32
+ for (let h = 0; h < v.length; h++) c.push(a);
33
+ s += v, a += d.length;
34
+ }
35
+ const o = s.indexOf(r);
36
+ if (o < 0) return { before: "", match: "", after: e };
37
+ const u = c[o] ?? 0, i = c[o + r.length] ?? e.length;
38
+ return { before: e.slice(0, u), match: e.slice(u, i), after: e.slice(i) };
39
+ }
40
+ function q(e, n) {
41
+ return e === "" || n.length <= e.length ? "" : n.toLocaleLowerCase().startsWith(e.toLocaleLowerCase()) ? n.slice(e.length) : "";
42
+ }
43
+ function K(e, n) {
44
+ const r = m(n.trim());
45
+ if (r === "") return [...e];
46
+ const s = [], c = [];
47
+ for (const a of e) {
48
+ const o = m(a.label);
49
+ o.startsWith(r) ? s.push(a) : (o.includes(r) || a.description !== void 0 && m(a.description).includes(r)) && c.push(a);
50
+ }
51
+ return [...s, ...c];
52
+ }
53
+ function z(e, n, r, s) {
54
+ return e && (n > 0 || r === "loading" || r === "failed" || r === "loaded" && s);
55
+ }
56
+ function P() {
57
+ const e = S([]), n = p("idle");
58
+ let r = 0, s = null;
59
+ function c() {
60
+ r++, s?.abort(), s = null;
61
+ }
62
+ async function a(o, u = (i) => i) {
63
+ c();
64
+ const i = r;
65
+ s = new AbortController(), n.value = "loading";
66
+ try {
67
+ const d = await o(s.signal);
68
+ if (i !== r) return;
69
+ e.value = u(d), n.value = "loaded";
70
+ } catch (d) {
71
+ if (i !== r || x(d)) return;
72
+ e.value = [], n.value = "failed";
73
+ }
74
+ }
75
+ return { items: e, status: n, run: a, cancel: c };
76
+ }
77
+ function F(e) {
78
+ const n = O(W, J), r = P(), { items: s, status: c } = r, a = S([]), o = p(!1), u = p(0), i = p(!1);
79
+ let d = "", v = null;
80
+ const h = y(() => c.value === "idle" ? a.value : s.value), T = y(() => c.value === "idle" && a.value.length > 0), w = y(() => h.value[u.value]);
81
+ function g() {
82
+ r.cancel(), v && clearTimeout(v), v = null;
83
+ }
84
+ R(g);
85
+ function b(t) {
86
+ return u.value = 0, i.value = !1, t.slice(0, e.limit());
87
+ }
88
+ const E = (t, l) => r.run((f) => l(t, { signal: f }), b);
89
+ function L(t) {
90
+ d = t, g(), o.value = !0;
91
+ const l = e.source(), f = t.trim() === "";
92
+ if (!l || f && !e.listAllWhenEmpty || typeof l == "function" && t.trim().length < e.minLength()) {
93
+ c.value = "idle", s.value = [], u.value = 0, i.value = !1;
94
+ return;
95
+ }
96
+ typeof l == "function" ? v = setTimeout(() => void E(t, l), e.debounce()) : (s.value = b(K(l, t)), c.value = "loaded");
97
+ }
98
+ function k(t) {
99
+ const l = e.recents();
100
+ a.value = l ? n.read(l) : [], L(t), o.value = h.value.length > 0;
101
+ }
102
+ function A() {
103
+ g(), o.value = !1, c.value === "loading" && (c.value = "idle");
104
+ }
105
+ function I(t) {
106
+ const l = e.recents();
107
+ if (!l) return;
108
+ const f = n.read(l).filter((N) => N.value !== t.value);
109
+ n.write(l, [{ value: t.value, label: t.label, ...t.description !== void 0 ? { description: t.description } : {} }, ...f].slice(0, D));
110
+ }
111
+ function C(t, l = !0) {
112
+ u.value = t, l && (i.value = !0);
113
+ }
114
+ function M(t, l) {
115
+ if (t.key === "Escape" && o.value)
116
+ t.stopPropagation(), t.preventDefault(), A();
117
+ else if (t.key === "ArrowDown" || t.key === "ArrowUp") {
118
+ if (t.preventDefault(), !o.value) {
119
+ k(d), o.value = !0;
120
+ return;
121
+ }
122
+ const f = h.value.length - 1;
123
+ C(t.key === "ArrowDown" ? Math.min(u.value + 1, f) : Math.max(u.value - 1, 0));
124
+ } else if (t.key === "Enter" && o.value) {
125
+ const f = w.value;
126
+ f && !f.disabled && (i.value || !l.enterNeedsMove) && (t.preventDefault(), l.pick(f));
127
+ } else t.key === "Tab" && !t.shiftKey && o.value && l.complete?.() && t.preventDefault();
128
+ }
129
+ return { items: h, showingRecent: T, status: c, open: o, highlighted: u, moved: i, current: w, ask: L, show: k, close: A, cancel: g, remember: I, highlight: C, keydown: M };
130
+ }
131
+ export {
132
+ P as a,
133
+ q as c,
134
+ z as l,
135
+ _ as m,
136
+ W as r,
137
+ F as u
138
+ };
@@ -1,6 +1,6 @@
1
1
  import { nextTick as b, createApp as j, defineComponent as m, h as u } from "vue";
2
2
  import { createMemoryHistory as P, createRouter as E, RouterView as $ } from "vue-router";
3
- import { a as A, i as O } from "../platform-jqlKVJ2e.js";
3
+ import { a as A, i as O } from "../platform-hunMqFdB.js";
4
4
  import { createI18n as k } from "vue-i18n";
5
5
  import { coreMessages as M } from "../i18n/index.js";
6
6
  import { i as R, c as S } from "../format-B8mJm946.js";
@@ -0,0 +1,13 @@
1
+ import { toast as i } from "vue-sonner";
2
+ const t = {
3
+ success: (s, o) => i.success(s, o),
4
+ info: (s, o) => i.info(s, o),
5
+ warning: (s, o) => i.warning(s, o),
6
+ error: (s, o) => i.error(s, o),
7
+ loading: (s, o) => i.loading(s, o),
8
+ /** Dismisses one toast, or all of them without an id. */
9
+ dismiss: (s) => void i.dismiss(s)
10
+ };
11
+ export {
12
+ t
13
+ };
@@ -0,0 +1,135 @@
1
+ import { nextTick as f, defineComponent as L, useTemplateRef as p, ref as w, watch as S, onBeforeUnmount as x, computed as E, openBlock as v, createBlock as T, unref as c, createSlots as $, withCtx as y, createElementVNode as C, createElementBlock as D, toDisplayString as B, createCommentVNode as N, createVNode as z, renderSlot as g } from "vue";
2
+ import { useI18n as V } from "vue-i18n";
3
+ import { f as q } from "./useDialog-CXR3hN0G.js";
4
+ import { _ as A } from "./Modal.vue_vue_type_script_setup_true_lang-D7SwVPpL.js";
5
+ import { D as F } from "./useWaitStatus-fsacMl4W.js";
6
+ import { _ as O, u as I } from "./FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js";
7
+ import { a as R } from "./leaveGuard-Cc8yeLxM.js";
8
+ const d = "input:not([type=hidden]):not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex='-1'])";
9
+ async function U(t = document, n) {
10
+ const e = [...t.querySelectorAll("[data-field-error]")], s = e.find((a) => a.matches(d) || a.querySelector(d)) ?? e[0];
11
+ if (!s) return !1;
12
+ const r = n?.sections.value.find((a) => a.element.contains(s));
13
+ r && (await n?.scrollTo(r.id, { updateUrl: !1 }), await f());
14
+ const o = s.matches(d) ? s : s.querySelector(d);
15
+ return (o ?? s).scrollIntoView?.({ block: "center" }), (o ?? s).focus({ preventScroll: !0 }), !0;
16
+ }
17
+ const Q = (t) => ({ "data-field-key": t }), G = {
18
+ key: 0,
19
+ class: "text-body text-content-muted"
20
+ }, X = /* @__PURE__ */ L({
21
+ __name: "CommandDialog",
22
+ props: {
23
+ command: {},
24
+ title: {},
25
+ subtitle: { default: void 0 },
26
+ confirmLabel: {},
27
+ doneLabel: { default: void 0 },
28
+ busyLabel: { default: void 0 },
29
+ message: { default: void 0 },
30
+ size: { default: "sm" },
31
+ fieldLabel: { type: Function, default: void 0 }
32
+ },
33
+ emits: ["done"],
34
+ setup(t, { emit: n }) {
35
+ const e = t, s = n, { t: r } = V(), o = p("modal"), a = p("body"), u = w(!1);
36
+ let m = null;
37
+ const { confirmDiscard: _ } = R(() => e.command.open.value && e.command.form.dirty.value);
38
+ S(() => e.command.open.value, (i) => {
39
+ i ? (u.value = !1, o.value?.present()) : o.value?.dismiss();
40
+ });
41
+ async function b(i = {}) {
42
+ const l = await e.command.run();
43
+ if (l.status === "failed") {
44
+ l.failure.kind === "invalid" && await f().then(() => U(a.value ?? document));
45
+ return;
46
+ }
47
+ if (l.status !== "aborted") {
48
+ if (s("done"), i.addAnother) {
49
+ e.command.present(), await f(), q(a.value)[0]?.focus();
50
+ return;
51
+ }
52
+ u.value = !0, m = setTimeout(() => e.command.dismiss(), F);
53
+ }
54
+ }
55
+ x(() => {
56
+ m && clearTimeout(m);
57
+ });
58
+ const k = E(() => e.command.form.submitting.value ? "processing" : u.value ? "done" : "idle");
59
+ return (i, l) => (v(), T(A, {
60
+ ref_key: "modal",
61
+ ref: o,
62
+ size: e.size,
63
+ grouped: "",
64
+ title: e.title,
65
+ subtitle: e.subtitle,
66
+ "before-dismiss": c(_),
67
+ "primary-label": e.confirmLabel,
68
+ status: k.value,
69
+ "processing-label": e.busyLabel ?? c(r)("core.actions.saving"),
70
+ "done-label": e.doneLabel ?? c(r)("core.actions.saved"),
71
+ onPrimary: l[0] || (l[0] = (h) => b()),
72
+ onDismissed: l[1] || (l[1] = (h) => e.command.dismiss())
73
+ }, $({
74
+ default: y(() => [
75
+ C("div", {
76
+ ref_key: "body",
77
+ ref: a,
78
+ class: "flex min-w-0 flex-col gap-group-gap",
79
+ "data-test": "command-dialog"
80
+ }, [
81
+ e.message ? (v(), D("p", G, B(e.message), 1)) : N("", !0),
82
+ z(O, {
83
+ form: e.command.form,
84
+ label: e.fieldLabel,
85
+ scope: a.value
86
+ }, null, 8, ["form", "label", "scope"]),
87
+ g(i.$slots, "default")
88
+ ], 512)
89
+ ]),
90
+ _: 2
91
+ }, [
92
+ i.$slots.actions ? {
93
+ name: "actions",
94
+ fn: y(() => [
95
+ g(i.$slots, "actions", {
96
+ run: b,
97
+ busy: e.command.form.submitting.value
98
+ })
99
+ ]),
100
+ key: "0"
101
+ } : void 0
102
+ ]), 1032, ["size", "title", "subtitle", "before-dismiss", "primary-label", "status", "processing-label", "done-label"]));
103
+ }
104
+ });
105
+ function Y(t) {
106
+ const n = I(t), e = w(!1), s = () => typeof t.defaults == "function" ? t.defaults() : t.defaults;
107
+ async function r() {
108
+ return await n.submit(t.run, {
109
+ // The page updating itself after the call is the refresh: its failure is "saved, but could not be read back".
110
+ refresh: t.done ? (a) => t.done?.(a) : void 0
111
+ });
112
+ }
113
+ return {
114
+ form: n,
115
+ open: e,
116
+ present(o) {
117
+ n.hydrate({ ...s(), ...o }), e.value = !0;
118
+ },
119
+ dismiss() {
120
+ e.value = !1;
121
+ },
122
+ run: r,
123
+ async confirm() {
124
+ const o = await r();
125
+ if (o.status === "failed") throw new Error(o.failure.message);
126
+ if (o.status === "aborted") throw new Error("aborted");
127
+ }
128
+ };
129
+ }
130
+ export {
131
+ X as _,
132
+ Q as a,
133
+ U as f,
134
+ Y as u
135
+ };
@@ -0,0 +1,39 @@
1
+ import { shallowRef as h, watch as k, getCurrentScope as y, onScopeDispose as C, computed as v } from "vue";
2
+ import { useI18n as D } from "vue-i18n";
3
+ import { u as E } from "./describeError-Ctga6GcS.js";
4
+ function I(f, t = {}) {
5
+ const { t: m } = D(), g = E(), p = t.errorMessage ?? ((a) => g(a, { fallback: m("core.resource.unavailable") })), e = h({ status: "loading" });
6
+ let s = 0, u = null;
7
+ function l() {
8
+ return u?.abort(), u = null, ++s;
9
+ }
10
+ async function o() {
11
+ const a = l(), i = e.value, r = "value" in i ? i : null;
12
+ e.value = r ? { status: "refreshing", value: r.value } : { status: "loading" };
13
+ const c = new AbortController();
14
+ u = c;
15
+ try {
16
+ const n = await f({ signal: c.signal });
17
+ a === s && (e.value = { status: "loaded", value: n });
18
+ } catch (n) {
19
+ if (a !== s) return;
20
+ const d = p(n);
21
+ e.value = r ? { status: "stale", value: r.value, error: d } : { status: "failed", error: d };
22
+ }
23
+ }
24
+ function w(a) {
25
+ l(), e.value = { status: "loaded", value: a };
26
+ }
27
+ function b() {
28
+ e.value = { status: "loading" }, o();
29
+ }
30
+ return t.watch !== void 0 ? k(t.watch, b, { immediate: t.immediate ?? !0 }) : (t.immediate ?? !0) && o(), y() && C(l), {
31
+ state: v(() => e.value),
32
+ data: v(() => "value" in e.value ? e.value.value : null),
33
+ reload: o,
34
+ update: w
35
+ };
36
+ }
37
+ export {
38
+ I as u
39
+ };
@@ -0,0 +1,52 @@
1
+ import { shallowRef as v, watch as m, computed as f } from "vue";
2
+ import { u as i, c as h } from "./FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js";
3
+ function b(u) {
4
+ const t = i(u), r = v(null), s = v(!1);
5
+ let n = null;
6
+ function c(e) {
7
+ r.value = e, n = u.source.id.value, s.value = !1, t.hydrate(u.toValues(e));
8
+ }
9
+ m(
10
+ u.source.data,
11
+ (e) => {
12
+ !e || e === r.value || (n !== u.source.id.value || !t.dirty.value ? c(e) : (r.value = e, s.value = !0));
13
+ },
14
+ { immediate: !0, flush: "sync" }
15
+ );
16
+ async function d(e) {
17
+ return t.submit(
18
+ async (a, l) => {
19
+ const o = r.value;
20
+ if (!o) throw new Error("useResourceForm: the record is not loaded, so there is nothing to save.");
21
+ return u.save(a, o, l);
22
+ },
23
+ {
24
+ refresh: e?.refresh,
25
+ // The saved record is the new truth, unless the user has moved on to another record meanwhile.
26
+ hydrateFrom: (a) => {
27
+ const l = r.value;
28
+ return r.value = a, u.source.update(a) ? (s.value = !1, u.toValues(a)) : (r.value = l, null);
29
+ }
30
+ }
31
+ );
32
+ }
33
+ return {
34
+ ...t,
35
+ record: f(() => r.value),
36
+ outdated: f(() => s.value),
37
+ save: d,
38
+ rebase(e = []) {
39
+ const a = u.source.data.value;
40
+ if (!a || u.source.state.value.status !== "loaded") return !1;
41
+ const l = Object.fromEntries(e.map((o) => [o, h(t.values[o])]));
42
+ return c(a), Object.assign(t.values, l), !0;
43
+ },
44
+ reset() {
45
+ const e = r.value;
46
+ e && s.value ? c(e) : t.reset();
47
+ }
48
+ };
49
+ }
50
+ export {
51
+ b as u
52
+ };
@@ -0,0 +1,25 @@
1
+ import { computed as u, toValue as r } from "vue";
2
+ import { useI18n as n } from "vue-i18n";
3
+ import { u as s } from "./chrome-BS3xJcad.js";
4
+ import { a as m } from "./leaveGuard-Cc8yeLxM.js";
5
+ function d(e) {
6
+ const { t: a } = n(), l = u(() => (r(e.ready) ?? !0) && (r(e.allowed) ?? !0)), c = u(() => l.value && e.form.dirty.value);
7
+ m(() => l.value && e.form.dirty.value), s({
8
+ actions: () => l.value ? [
9
+ {
10
+ id: e.id ?? "save",
11
+ label: r(e.label) ?? a("core.actions.save"),
12
+ shortLabel: a("core.actions.save"),
13
+ icon: "save",
14
+ placement: "primary",
15
+ processing: e.form.submitting.value,
16
+ onClick: e.save
17
+ }
18
+ ] : [],
19
+ leading: () => c.value ? { id: `${e.id ?? "save"}-cancel`, label: a("core.actions.cancel"), prominence: "plain", onClick: e.cancel } : null,
20
+ status: () => c.value ? a("core.form.unsaved_changes") : null
21
+ });
22
+ }
23
+ export {
24
+ d as u
25
+ };
@@ -0,0 +1,72 @@
1
+ import { ref as p, computed as S } from "vue";
2
+ const D = 120, P = 0.5, C = 40;
3
+ function H({ enabled: l, panel: f, body: T, onDismiss: I }) {
4
+ const o = p(0), n = p(!1);
5
+ let u = 0, s = 0, i = 0, c = 0, v = !1, a = !1;
6
+ function h(t, e) {
7
+ l.value && (u = s = t, i = performance.now(), c = 0, v = e, a = !0, n.value = !e);
8
+ }
9
+ function d(t) {
10
+ if (!a) return !1;
11
+ const e = t - u;
12
+ if (!n.value) {
13
+ const m = (T.value?.scrollTop ?? 0) <= 0;
14
+ if (!v || !m || e <= 0)
15
+ return (e < 0 || !m) && (a = !1), !1;
16
+ n.value = !0, u = t;
17
+ }
18
+ const g = performance.now();
19
+ return c = (t - s) / Math.max(g - i, 1), s = t, i = g, o.value = Math.max(0, t - u), !0;
20
+ }
21
+ async function r() {
22
+ if (!a || (a = !1, !n.value)) return;
23
+ n.value = !1;
24
+ const t = c > P && o.value > C;
25
+ if (o.value > D || t) {
26
+ const e = o.value;
27
+ if (await I()) {
28
+ o.value = Math.max(e, f.value?.offsetHeight ?? window.innerHeight);
29
+ return;
30
+ }
31
+ }
32
+ o.value = 0;
33
+ }
34
+ function w() {
35
+ a = !1, n.value = !1, o.value = 0;
36
+ }
37
+ const M = {
38
+ onPointerdown(t) {
39
+ t.button === 0 && (t.target?.closest('button, a, input, [role="button"]') || (t.currentTarget.setPointerCapture(t.pointerId), h(t.clientY, !1)));
40
+ },
41
+ onPointermove(t) {
42
+ if (t.buttons === 0) {
43
+ r();
44
+ return;
45
+ }
46
+ d(t.clientY);
47
+ },
48
+ onPointerup: () => void r(),
49
+ onPointercancel: () => void r()
50
+ }, b = {
51
+ onTouchstartPassive(t) {
52
+ const e = t.touches[0];
53
+ e && t.touches.length === 1 && h(e.clientY, !0);
54
+ },
55
+ onTouchmove(t) {
56
+ const e = t.touches[0];
57
+ e && d(e.clientY) && t.cancelable && t.preventDefault();
58
+ },
59
+ onTouchend: () => void r(),
60
+ onTouchcancel: () => void r()
61
+ }, x = S(
62
+ () => !l.value || o.value === 0 ? void 0 : { transform: `translateY(${o.value}px)` }
63
+ ), y = S(() => {
64
+ if (!l.value || o.value === 0) return;
65
+ const t = f.value?.offsetHeight || window.innerHeight;
66
+ return { opacity: String(Math.max(0, 1 - o.value / t)) };
67
+ });
68
+ return { dragOffset: o, dragging: n, handleEvents: M, bodyEvents: b, panelStyle: x, backdropStyle: y, reset: w };
69
+ }
70
+ export {
71
+ H as u
72
+ };
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@wssto2/vue-core",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
+ "goCore": "v1.6.0",
4
5
  "description": "Shared Vue 3 library for go-core applications: app shell, list / record / form pages and their controls.",
5
6
  "keywords": [
6
7
  "vue",
@@ -107,6 +108,14 @@
107
108
  "types": "./dist/phone/index.d.ts",
108
109
  "import": "./dist/phone/index.js"
109
110
  },
111
+ "./identity": {
112
+ "types": "./dist/identity/index.d.ts",
113
+ "import": "./dist/identity/index.js"
114
+ },
115
+ "./access": {
116
+ "types": "./dist/access/index.d.ts",
117
+ "import": "./dist/access/index.js"
118
+ },
110
119
  "./testing": {
111
120
  "types": "./dist/testing/index.d.ts",
112
121
  "import": "./dist/testing/index.js"
@@ -123,18 +132,22 @@
123
132
  "lint": "eslint . && node scripts/check-src-imports.mjs",
124
133
  "typecheck": "vue-tsc --noEmit",
125
134
  "typecheck:docs": "vue-tsc --noEmit -p docs/examples/tsconfig.json",
135
+ "typecheck:fixtures": "vue-tsc --noEmit -p test-data/tsconfig.json",
126
136
  "test": "vitest run",
127
137
  "build": "vite build && vite build -c vite.styles.config.ts && vue-tsc -p tsconfig.build.json",
128
138
  "check:consumer": "node scripts/check-consumer.mjs",
129
- "check": "npm run lint && npm run typecheck && npm run typecheck:docs && npm run check:docs && npm run test && npm run build && npm run check:consumer",
139
+ "check": "npm run lint && npm run typecheck && npm run typecheck:docs && npm run typecheck:fixtures && npm run check:modules && npm run check:docs && npm run test && npm run build && npm run check:consumer",
130
140
  "check:docs": "node scripts/check-docs.mjs",
131
- "prepublishOnly": "npm run check"
141
+ "prepublishOnly": "npm run check",
142
+ "modules:sync": "node scripts/modules.mjs sync",
143
+ "check:modules": "node scripts/modules.mjs check"
132
144
  },
133
145
  "peerDependencies": {
146
+ "tailwindcss": "^4.0.0",
134
147
  "vue": "^3.5.0",
135
148
  "vue-i18n": "^10.0.0-beta.5",
136
149
  "vue-router": "^4.4.3",
137
- "tailwindcss": "^4.0.0"
150
+ "zod": "^4.0.0"
138
151
  },
139
152
  "devDependencies": {
140
153
  "@eslint/js": "^10.0.1",
@@ -156,7 +169,8 @@
156
169
  "vue-eslint-parser": "^10.4.0",
157
170
  "vue-i18n": "^10.0.8",
158
171
  "vue-router": "^4.5.0",
159
- "vue-tsc": "^2.2.8"
172
+ "vue-tsc": "^2.2.8",
173
+ "zod": "^4.6.5"
160
174
  },
161
175
  "dependencies": {
162
176
  "@floating-ui/dom": "^1.8.0",
@@ -167,6 +181,9 @@
167
181
  "peerDependenciesMeta": {
168
182
  "tailwindcss": {
169
183
  "optional": true
184
+ },
185
+ "zod": {
186
+ "optional": true
170
187
  }
171
188
  }
172
189
  }
@@ -1,78 +0,0 @@
1
- import { createWebHistory as d } from "vue-router";
2
- import { effectScope as b, watch as w, defineComponent as A, openBlock as W, createBlock as q, unref as i } from "vue";
3
- import { useI18n as H } from "vue-i18n";
4
- import { _ as k } from "./EmptyState.vue_vue_type_script_setup_true_lang-BeGpHMUP.js";
5
- function x(e = navigator) {
6
- return e.standalone === !0;
7
- }
8
- function B(e) {
9
- const r = d(e);
10
- return r.push = (n, a) => r.replace(n, a), r;
11
- }
12
- function G(e) {
13
- return x() ? B(e) : d(e);
14
- }
15
- const f = "redirect";
16
- function N(e) {
17
- const r = e.query[f], n = Array.isArray(r) ? r[0] : r;
18
- return typeof n == "string" && n.startsWith("/") && !n.startsWith("//") && !n.includes("\\") ? n : null;
19
- }
20
- function m(e, r) {
21
- return r === null ? e : typeof e == "string" ? { path: e, query: { [f]: r } } : { ...e, query: { ...e.query, [f]: r } };
22
- }
23
- function L(e) {
24
- const { router: r, session: n, login: a, home: h } = e, l = /* @__PURE__ */ new WeakMap();
25
- let o = !1;
26
- const y = () => {
27
- o || (o = !0, e.progress?.start());
28
- }, u = () => {
29
- o && (o = !1, e.progress?.done());
30
- }, _ = () => r.resolve(a).name, v = r.beforeEach(async (t) => {
31
- if (y(), t.meta.public === !0) {
32
- if (t.name !== void 0 && t.name === _() && (await n.restore()).status === "authenticated") return N(t) ?? h;
33
- } else {
34
- const s = await n.restore();
35
- if (s.status === "failed")
36
- return e.onError?.(s.error), !1;
37
- if (s.status !== "authenticated") return m(a, t.fullPath);
38
- }
39
- return e.prepare && l.set(t, e.prepare(t)), !0;
40
- }), E = r.beforeResolve(async (t) => {
41
- await l.get(t);
42
- }), g = r.afterEach((t, s, c) => {
43
- u(), c || e.afterNavigation?.(t);
44
- }), R = r.onError((t) => {
45
- u(), e.onError?.(t);
46
- }), p = b();
47
- return p.run(
48
- () => w(
49
- () => n.state.value,
50
- (t, s) => {
51
- if (t.status !== "anonymous" || s.status !== "authenticated") return;
52
- const c = r.currentRoute.value;
53
- c.meta.public !== !0 && r.replace(m(a, t.reason === "expired" ? c.fullPath : null)).catch(e.onError);
54
- }
55
- )
56
- ), () => {
57
- v(), E(), g(), R(), p.stop(), u();
58
- };
59
- }
60
- const M = /* @__PURE__ */ A({
61
- __name: "NoAccess",
62
- setup(e) {
63
- const { t: r } = H();
64
- return (n, a) => (W(), q(i(k), {
65
- title: i(r)("core.no_access.title"),
66
- description: i(r)("core.no_access.body"),
67
- icon: "errorWarningLine"
68
- }, null, 8, ["title", "description"]));
69
- }
70
- });
71
- export {
72
- M as _,
73
- B as a,
74
- x as b,
75
- G as c,
76
- L as i,
77
- N as r
78
- };