@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,51 @@
1
+ import { effectScope as R, watch as g } from "vue";
2
+ import { h as b } from "./platform-hunMqFdB.js";
3
+ const i = "redirect";
4
+ function q(r) {
5
+ const t = r.query[i], n = Array.isArray(t) ? t[0] : t;
6
+ return typeof n == "string" && n.startsWith("/") && !n.startsWith("//") && !n.includes("\\") ? n : null;
7
+ }
8
+ function m(r, t) {
9
+ return t === null ? r : typeof r == "string" ? { path: r, query: { [i]: t } } : { ...r, query: { ...r.query, [i]: t } };
10
+ }
11
+ function W(r) {
12
+ const { router: t, session: n, login: o, home: d } = r, f = /* @__PURE__ */ new WeakMap();
13
+ let s = !1;
14
+ const h = () => {
15
+ s || (s = !0, r.progress?.start());
16
+ }, c = () => {
17
+ s && (s = !1, r.progress?.done());
18
+ }, p = () => t.resolve(o).name, v = t.beforeEach(async (e) => {
19
+ if (h(), e.meta.public === !0) {
20
+ if (e.name !== void 0 && e.name === p() && (await n.restore()).status === "authenticated") return q(e) ?? d;
21
+ } else {
22
+ const a = await n.restore();
23
+ if (a.status === "failed")
24
+ return r.onError?.(a.error), !1;
25
+ if (a.status !== "authenticated") return m(o, e.fullPath);
26
+ }
27
+ return r.prepare && f.set(e, r.prepare(e)), !0;
28
+ }), y = t.beforeResolve(async (e) => {
29
+ await f.get(e);
30
+ }), E = t.afterEach((e, a, u) => {
31
+ c(), u || r.afterNavigation?.(e);
32
+ }), w = t.onError((e) => {
33
+ c(), r.onError?.(e);
34
+ }), l = R();
35
+ return l.run(
36
+ () => g(
37
+ () => n.state.value,
38
+ (e, a) => {
39
+ if (e.status !== "anonymous" || b(a) === null) return;
40
+ const u = t.currentRoute.value;
41
+ u.meta.public !== !0 && (e.reason === "expired" && r.holdExpired && e.previous || t.replace(m(o, e.reason === "expired" ? u.fullPath : null)).catch(r.onError));
42
+ }
43
+ )
44
+ ), () => {
45
+ v(), y(), E(), w(), l.stop(), c();
46
+ };
47
+ }
48
+ export {
49
+ W as i,
50
+ q as r
51
+ };
@@ -0,0 +1,193 @@
1
+ import { hasInjectionContext as z, inject as $, watch as _ } from "vue";
2
+ import { g as O } from "./platform-hunMqFdB.js";
3
+ const j = [5, 8, 10, 15, 25, 50, 100], E = 25;
4
+ function U(e) {
5
+ const t = `defineCollection("${e.id}")`;
6
+ if (typeof e.id != "string" || e.id.trim() === "") throw new Error("defineCollection: `id` must be a non-empty string.");
7
+ if (!Number.isInteger(e.stateVersion) || e.stateVersion < 1) throw new Error(`${t}: \`stateVersion\` must be a positive integer.`);
8
+ if (typeof e.load != "function") throw new Error(`${t}: \`load\` must be a function.`);
9
+ if (typeof e.key != "function") throw new Error(`${t}: \`key\` must be a function.`);
10
+ const r = {
11
+ sorts: e.query?.sorts ? [...e.query.sorts] : null,
12
+ filters: e.query?.filters ? [...e.query.filters] : null,
13
+ views: e.query?.views ? [...e.query.views] : null,
14
+ sensitive: [...e.query?.sensitive ?? []],
15
+ pageSizes: [...e.query?.pageSizes ?? j]
16
+ };
17
+ if (r.pageSizes.length === 0 || r.pageSizes.some((c) => !Number.isInteger(c) || c < 1))
18
+ throw new Error(`${t}: \`query.pageSizes\` must list positive integers.`);
19
+ for (const c of r.sensitive)
20
+ if (r.filters && !r.filters.includes(c)) throw new Error(`${t}: sensitive filter "${c}" is not in \`query.filters\`.`);
21
+ const s = e.defaults ?? {}, n = s.pageSize ?? (r.pageSizes.includes(E) ? E : r.pageSizes[0]);
22
+ if (!r.pageSizes.includes(n)) throw new Error(`${t}: default page size ${n} is not one of ${r.pageSizes.join(", ")}.`);
23
+ const o = s.sort ?? null;
24
+ if (o !== null && r.sorts && !r.sorts.includes(o)) throw new Error(`${t}: default sort "${o}" is not in \`query.sorts\`.`);
25
+ const i = s.view ?? null;
26
+ if (i !== null && r.views && !r.views.includes(i)) throw new Error(`${t}: default view "${i}" is not in \`query.views\`.`);
27
+ const a = Object.fromEntries(Object.entries(s.filters ?? {}).filter(([, c]) => c !== void 0 && c !== ""));
28
+ for (const c of Object.keys(a))
29
+ if (r.filters && !r.filters.includes(c)) throw new Error(`${t}: default filter "${c}" is not in \`query.filters\`.`);
30
+ const l = s.page ?? 1;
31
+ if (!Number.isInteger(l) || l < 1) throw new Error(`${t}: default page must be a positive integer.`);
32
+ const f = s.direction ?? "asc";
33
+ if (f !== "asc" && f !== "desc") throw new Error(`${t}: default direction must be "asc" or "desc".`);
34
+ return Object.freeze({
35
+ id: e.id,
36
+ stateVersion: e.stateVersion,
37
+ load: e.load,
38
+ key: e.key,
39
+ defaults: Object.freeze({
40
+ page: l,
41
+ pageSize: n,
42
+ sort: o,
43
+ direction: f,
44
+ search: s.search ?? "",
45
+ view: i,
46
+ filters: Object.freeze(a)
47
+ }),
48
+ contract: Object.freeze(r),
49
+ migrate: e.migrate
50
+ });
51
+ }
52
+ const X = "from";
53
+ function F(e, t) {
54
+ if (typeof e == "string") {
55
+ const r = new URLSearchParams(t).toString(), s = e.indexOf("#"), n = s === -1 ? e : e.slice(0, s);
56
+ return `${n}${n.includes("?") ? "&" : "?"}${r}${s === -1 ? "" : e.slice(s)}`;
57
+ }
58
+ return { ...e, query: { ...e.query, ...t } };
59
+ }
60
+ function G(e) {
61
+ if (!z()) return;
62
+ const t = $(O, null);
63
+ t && _(
64
+ () => {
65
+ const r = t.session.state.value;
66
+ return r.status === "authenticated" ? r.user.id : null;
67
+ },
68
+ e,
69
+ { flush: "sync" }
70
+ );
71
+ }
72
+ const I = 4096, k = 200, T = 32, N = 1e6, v = /^[A-Za-z0-9_.-]{1,64}$/;
73
+ function C(e) {
74
+ let t = "";
75
+ for (const r of new TextEncoder().encode(e)) t += String.fromCharCode(r);
76
+ return btoa(t).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
77
+ }
78
+ function M(e) {
79
+ const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = atob(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
80
+ return new TextDecoder("utf-8", { fatal: !0 }).decode(Uint8Array.from(r, (s) => s.charCodeAt(0)));
81
+ }
82
+ const S = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
83
+ function h(e, t = k) {
84
+ return typeof e == "string" && e.length <= t ? e : null;
85
+ }
86
+ function A(e, t) {
87
+ const { defaults: r, contract: s } = e, n = typeof t.p == "number" && Number.isInteger(t.p) && t.p >= 1 && t.p <= N ? t.p : r.page, o = typeof t.l == "number" && s.pageSizes.includes(t.l) ? t.l : r.pageSize;
88
+ let i = r.sort;
89
+ const a = h(t.c, 64);
90
+ a !== null && (s.sorts ? s.sorts.includes(a) : v.test(a)) && (i = a);
91
+ const l = t.d === "asc" || t.d === "desc" ? t.d : r.direction, f = h(t.s) ?? r.search;
92
+ let c = r.view;
93
+ const g = h(t.w, 64);
94
+ g !== null && (s.views ? s.views.includes(g) : v.test(g)) && (c = g);
95
+ const w = S(t.f) ? {} : { ...r.filters };
96
+ if (S(t.f)) {
97
+ let y = 0;
98
+ for (const [u, m] of Object.entries(t.f)) {
99
+ if (++y > T) break;
100
+ if (!(s.filters ? s.filters.includes(u) : v.test(u)) || s.sensitive.includes(u)) continue;
101
+ const b = typeof m == "number" || typeof m == "boolean" ? String(m) : h(m);
102
+ b !== null && b !== "" && (w[u] = b);
103
+ }
104
+ }
105
+ return { page: n, pageSize: o, sort: i, direction: l, search: f, view: c, filters: w };
106
+ }
107
+ function J(e, t) {
108
+ const r = { v: e.stateVersion, p: t.page, l: t.pageSize };
109
+ t.sort && (r.c = t.sort), r.d = t.direction, t.search && (r.s = t.search), t.view && (r.w = t.view);
110
+ const s = Object.fromEntries(
111
+ Object.entries(t.filters).filter(([n, o]) => o !== void 0 && o !== "" && !e.contract.sensitive.includes(n))
112
+ );
113
+ return (Object.keys(s).length > 0 || Object.keys(e.defaults.filters).length > 0) && (r.f = s), C(JSON.stringify(r));
114
+ }
115
+ function x(e, t) {
116
+ const r = t.v === void 0 ? e.stateVersion : t.v;
117
+ if (typeof r != "number" || !Number.isInteger(r)) return null;
118
+ if (r === e.stateVersion) return A(e, t);
119
+ const s = e.migrate?.(t, r);
120
+ return s ? A(e, s) : null;
121
+ }
122
+ function Z(e, t) {
123
+ if (typeof t != "string" || t === "" || t.length > I) return null;
124
+ let r;
125
+ try {
126
+ r = JSON.parse(M(t));
127
+ } catch {
128
+ return null;
129
+ }
130
+ return S(r) ? x(e, r) : null;
131
+ }
132
+ function B(e) {
133
+ return JSON.stringify([
134
+ e.page,
135
+ e.pageSize,
136
+ e.sort,
137
+ e.direction,
138
+ e.search,
139
+ e.view,
140
+ Object.entries(e.filters).sort(([t], [r]) => t.localeCompare(r))
141
+ ]);
142
+ }
143
+ const d = (e) => typeof e == "object" && e !== null && !Array.isArray(e), p = (...e) => {
144
+ for (const t of e) if (typeof t == "number" && Number.isFinite(t)) return t;
145
+ return null;
146
+ };
147
+ function L(e) {
148
+ return {
149
+ // Filters first: the reserved names below always win, a filter called "page" cannot break paging.
150
+ ...e.filters,
151
+ page: e.page,
152
+ per_page: e.pageSize,
153
+ order_col: e.sort,
154
+ order_dir: e.sort ? e.direction : null,
155
+ search: e.search,
156
+ view: e.view
157
+ };
158
+ }
159
+ function P(e, t) {
160
+ const r = e.data, s = d(r) && Array.isArray(r.data), n = Array.isArray(r) ? r : s ? r.data : [], o = s ? r : {}, i = d(e.meta) ? e.meta : d(o.meta) ? o.meta : {}, a = p(o.per_page, i.per_page) ?? t.pageSize, l = p(o.total, i.total) ?? n.length, f = p(o.current_page, i.page, i.current_page) ?? t.page, c = p(o.last_page, i.last_page) ?? (l === 0 ? 0 : Math.ceil(l / Math.max(1, a))), g = p(o.from, i.from) ?? (n.length === 0 ? 0 : (f - 1) * a + 1), w = p(o.to, i.to) ?? (n.length === 0 ? 0 : g + n.length - 1), y = Array.isArray(i.views) ? i.views : Array.isArray(o.views) ? o.views : void 0;
161
+ return {
162
+ rows: n,
163
+ total: l,
164
+ page: f,
165
+ pageSize: a,
166
+ lastPage: c,
167
+ from: g,
168
+ to: w,
169
+ views: y?.filter(d).flatMap((u) => typeof u.key == "string" ? [{ key: u.key, count: p(u.count) ?? void 0 }] : []),
170
+ meta: i,
171
+ requestId: e.requestId
172
+ };
173
+ }
174
+ function K(e, t, r = {}) {
175
+ return async (s, { signal: n }) => {
176
+ const o = await e.get(t, { query: r.params ? r.params(s) : L(s), signal: n });
177
+ return P(o, s);
178
+ };
179
+ }
180
+ export {
181
+ j as D,
182
+ X as L,
183
+ U as a,
184
+ x as b,
185
+ Z as d,
186
+ J as e,
187
+ K as h,
188
+ L as l,
189
+ G as o,
190
+ B as q,
191
+ P as r,
192
+ F as w
193
+ };
@@ -1,3 +1,7 @@
1
+ /** A group of texts: every key is a sentence. */
2
+ type Texts<Key extends string> = {
3
+ [K in Key]: string;
4
+ };
1
5
  /**
2
6
  * The shape of one locale's messages: `{ core: { … } }`. Written out (not inferred from the JSON
3
7
  * files) so the published declarations do not point at files that are not shipped; every locale
@@ -5,6 +9,149 @@
5
9
  */
6
10
  export type CoreMessages = {
7
11
  core: {
12
+ /** The roles, bindings and effective-access screens (`@wssto2/vue-core/access`). */
13
+ access: {
14
+ title: string;
15
+ description: string;
16
+ new_title: string;
17
+ new_description: string;
18
+ new_copy_description: string;
19
+ create: string;
20
+ save: string;
21
+ copy: string;
22
+ copy_name: string;
23
+ search: string;
24
+ list_footer: string;
25
+ empty: string;
26
+ permissions: string;
27
+ holders_count: string;
28
+ kinds: {
29
+ all: string;
30
+ predefined: string;
31
+ custom: string;
32
+ };
33
+ role_kind: {
34
+ predefined: string;
35
+ custom: string;
36
+ computed: string;
37
+ };
38
+ groups: {
39
+ role: string;
40
+ };
41
+ fields: {
42
+ name: string;
43
+ description: string;
44
+ };
45
+ notes: {
46
+ predefined: string;
47
+ computed: string;
48
+ };
49
+ requires: string;
50
+ modules: string;
51
+ turn_on_all: string;
52
+ turn_off_all: string;
53
+ completed: string;
54
+ name_required: string;
55
+ too_long: string;
56
+ saved: string;
57
+ deleted: string;
58
+ sensitive: string;
59
+ system: string;
60
+ system_group: string;
61
+ organization_only: string;
62
+ unowned: string;
63
+ qualifier: {
64
+ own: string;
65
+ own_location: string;
66
+ all: string;
67
+ };
68
+ qualifier_hint: {
69
+ own: string;
70
+ own_location: string;
71
+ all: string;
72
+ };
73
+ qualifier_noun: {
74
+ own: string;
75
+ own_location: string;
76
+ all: string;
77
+ };
78
+ /** The names of hierarchy levels (`organization` is the root of an application with one level); an app adds its own under `access.levels`. */
79
+ levels: {
80
+ organization: string;
81
+ };
82
+ compare: {
83
+ action: string;
84
+ title: string;
85
+ footer: string;
86
+ with: string;
87
+ loading: string;
88
+ failed: string;
89
+ identical: string;
90
+ only_in_role: string;
91
+ only_in_other: string;
92
+ different: string;
93
+ whose: string;
94
+ };
95
+ replace: {
96
+ action: string;
97
+ title: string;
98
+ footer: string;
99
+ with: string;
100
+ choose: string;
101
+ confirm: string;
102
+ moves: string;
103
+ done: string;
104
+ };
105
+ delete: {
106
+ action: string;
107
+ title: string;
108
+ body: string;
109
+ failed: string;
110
+ };
111
+ holders: {
112
+ title: string;
113
+ empty: string;
114
+ service: string;
115
+ };
116
+ person_roles: string;
117
+ roles_footer: string;
118
+ no_roles_title: string;
119
+ no_roles_description: string;
120
+ add_role: string;
121
+ remove: string;
122
+ remove_title: string;
123
+ remove_body: string;
124
+ added: string;
125
+ removed: string;
126
+ remove_failed: string;
127
+ add: {
128
+ confirm: string;
129
+ scope_header: string;
130
+ scope_level: string;
131
+ scopes_failed: string;
132
+ no_places: string;
133
+ roles_loading: string;
134
+ roles_failed: string;
135
+ no_roles: string;
136
+ role: string;
137
+ role_gives: string;
138
+ role_gives_footer: string;
139
+ choose_role: string;
140
+ choose_place: string;
141
+ };
142
+ effective: {
143
+ title: string;
144
+ footer: string;
145
+ empty: string;
146
+ from_roles: string;
147
+ unavailable: string;
148
+ why_row: string;
149
+ show_why: string;
150
+ hide_why: string;
151
+ all_modules: string;
152
+ fewer_modules: string;
153
+ };
154
+ };
8
155
  actions: {
9
156
  cancel: string;
10
157
  close: string;
@@ -79,6 +226,140 @@ export type CoreMessages = {
79
226
  offline: string;
80
227
  cancelled: string;
81
228
  unexpected: string;
229
+ /** go-core's delegation refusals (`authz.escalation` …), looked up by `describeError`. */
230
+ authz: {
231
+ forbidden: string;
232
+ escalation: string;
233
+ self_assignment: string;
234
+ last_admin: string;
235
+ role_in_use: string;
236
+ invalid: string;
237
+ };
238
+ /** go-core's identity reasons (`identity.signin.failed` …), looked up by `describeError`. */
239
+ identity: {
240
+ signin: {
241
+ failed: string;
242
+ locked: string;
243
+ inactive: string;
244
+ };
245
+ session: {
246
+ invalid: string;
247
+ current: string;
248
+ not_found: string;
249
+ };
250
+ locale: {
251
+ invalid: string;
252
+ };
253
+ impersonation: {
254
+ disabled: string;
255
+ not_active: string;
256
+ };
257
+ account: {
258
+ not_found: string;
259
+ inactive: string;
260
+ already_active: string;
261
+ already_inactive: string;
262
+ self_deactivation: string;
263
+ };
264
+ code: Texts<"expired" | "invalid" | "mismatch" | "no_pending" | "not_delivered" | "resend_too_soon" | "too_many_attempts" | "too_many_requests">;
265
+ email: Texts<"disabled" | "invalid" | "taken" | "unchanged">;
266
+ list: Texts<"dir_invalid" | "order_invalid" | "view_invalid">;
267
+ login: Texts<"invalid" | "taken">;
268
+ name: Texts<"invalid">;
269
+ password: Texts<"mismatch" | "unchanged" | "weak" | "wrong">;
270
+ phone: Texts<"invalid">;
271
+ reauth: Texts<"locked">;
272
+ activity: Texts<"area_unknown" | "range_invalid">;
273
+ };
274
+ };
275
+ identity: {
276
+ /** The label of a login field, on the sign-in page and in the prompt of an expired session. */
277
+ username: string;
278
+ signin: {
279
+ title: string;
280
+ password: string;
281
+ submit: string;
282
+ required: string;
283
+ };
284
+ expired: {
285
+ title: string;
286
+ body: string;
287
+ kept: string;
288
+ sign_out: string;
289
+ };
290
+ impersonation: {
291
+ banner: string;
292
+ banner_short: string;
293
+ return: string;
294
+ sign_in_as: string;
295
+ };
296
+ };
297
+ /** The screens of `usersFeature`: the list of people and a person's record. */
298
+ users: {
299
+ title: string;
300
+ description: string;
301
+ views: Texts<"active" | "locked" | "inactive" | "all">;
302
+ columns: Texts<"person" | "login" | "last_sign_in" | "status">;
303
+ never: string;
304
+ status: Texts<"active" | "locked" | "inactive">;
305
+ create: Texts<"title" | "subtitle" | "action" | "done">;
306
+ fields: Texts<"login" | "name" | "email" | "phone" | "locale" | "password" | "password_repeat">;
307
+ record: string;
308
+ sections_label: string;
309
+ sections: Texts<"general" | "signin" | "sessions" | "signins" | "changes" | "activity">;
310
+ section_groups: Texts<"person" | "access" | "activity">;
311
+ intro: Texts<"general" | "signin" | "sessions" | "signins" | "changes" | "activity">;
312
+ groups: Texts<"person" | "person_footer" | "contact">;
313
+ general: Texts<"saved" | "created" | "last_sign_in" | "never_signed_in" | "all_changes">;
314
+ actions: Texts<"deactivate" | "deactivate_short" | "activate">;
315
+ deactivate: Texts<"title" | "busy" | "done_label" | "done" | "row_sub" | "signs_out" | "signs_out_sub" | "cannot_sign_in" | "cannot_sign_in_sub">;
316
+ activate: Texts<"title" | "body" | "row_sub" | "done" | "failed">;
317
+ password: Texts<"title" | "action" | "footer" | "done">;
318
+ signin: Texts<"lock" | "lock_footer" | "locked_title" | "not_locked" | "not_locked_sub" | "unlocks_at" | "unlock" | "unlocked" | "unlock_failed" | "password" | "password_footer" | "set_password" | "set_password_sub" | "as_header" | "as_title" | "as_sub" | "as_footer">;
319
+ sessions: Texts<"header" | "footer" | "own_footer" | "end_all" | "end_all_title" | "end_all_body" | "ended_all">;
320
+ activity: {
321
+ areas: Texts<"all" | "identity" | "other">;
322
+ areas_label: string;
323
+ since: string;
324
+ until: string;
325
+ empty: string;
326
+ footer: string;
327
+ actions: Texts<"created" | "changed" | "deleted" | "other">;
328
+ signed_in_as: string;
329
+ signed_in_as_other: string;
330
+ };
331
+ changes: {
332
+ empty: string;
333
+ diff: string;
334
+ actions: Texts<"created" | "updated" | "deactivated" | "activated" | "password" | "email" | "profile" | "unknown">;
335
+ fields: Texts<"login" | "name" | "email" | "phone" | "locale" | "password" | "active">;
336
+ views: Texts<"all" | "access" | "details">;
337
+ };
338
+ };
339
+ /** "My profile": the signed-in person's own account. */
340
+ profile: {
341
+ title: string;
342
+ description: string;
343
+ menu: string;
344
+ details: Texts<"title" | "login_hint" | "submit" | "saved">;
345
+ email: Texts<"title" | "current" | "change" | "pending" | "valid_until" | "enter_code" | "cancel_change" | "change_title" | "new_email" | "current_password" | "request_hint" | "send_code" | "verify_title" | "verify_description" | "verify" | "resend" | "resend_in" | "request_new" | "changed" | "cancelled" | "code_sent" | "verify_failed" | "resend_failed" | "cancel_failed">;
346
+ password: Texts<"title" | "current" | "new" | "repeat" | "show" | "hide" | "submit" | "changed">;
347
+ sessions: Texts<"title" | "footer">;
348
+ signins: Texts<"title" | "footer">;
349
+ };
350
+ /** What the screens of a person's account share (their own profile and an administrator's view of them). */
351
+ account: {
352
+ validation: Texts<"required" | "mismatch">;
353
+ somebody_else: string;
354
+ sessions: Texts<"empty" | "unknown_device" | "last_active" | "expires" | "this_device" | "opened_by" | "opened_by_other" | "end" | "end_title" | "end_body" | "ended" | "end_failed">;
355
+ signins: {
356
+ columns: Texts<"time" | "event" | "device" | "ip">;
357
+ empty: string;
358
+ footer_user: string;
359
+ events: Texts<"signed_in" | "wrong_password" | "locked_out" | "refused_inactive" | "signed_in_as" | "unlocked" | "signed_out_everywhere" | "session_revoked" | "unknown">;
360
+ events_by: Texts<"signed_in_as" | "unlocked" | "signed_out_everywhere" | "session_revoked">;
361
+ views: Texts<"all" | "failed">;
362
+ };
82
363
  };
83
364
  startup: {
84
365
  title: string;