@wssto2/vue-core 0.2.0 → 0.4.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 (309) hide show
  1. package/README.md +36 -0
  2. package/dist/AccessGate.vue_vue_type_script_setup_true_lang-DcbZBINh.js +22 -0
  3. package/dist/AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js +76 -0
  4. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-LlfIPWsJ.js +45 -0
  5. package/dist/Activity-2gGxQn7v.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-BoinCY93.js} +48 -47
  7. package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-e4hzkzg3.js → AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js} +1 -1
  8. package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-CWLB3xsR.js → AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.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-DSStj_5z.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-CL9Qh5yq.js} +1 -1
  12. package/dist/Changes-Bm8xvagD.js +129 -0
  13. package/dist/CollectionPage.vue_vue_type_script_setup_true_lang-DCBVw2Qd.js +1485 -0
  14. package/dist/DataTable.vue_vue_type_script_setup_true_lang-UH6f9puS.js +52 -0
  15. package/dist/DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js +255 -0
  16. package/dist/DeadLetters-CMRtXn_N.js +104 -0
  17. package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-DyhYHRyz.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-D1arePCZ.js} +1 -1
  18. package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-BeGpHMUP.js → EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js} +1 -1
  19. package/dist/FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js +276 -0
  20. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js +136 -0
  21. package/dist/FormView.vue_vue_type_script_setup_true_lang-cr0xNDXP.js +38 -0
  22. package/dist/General-CTqd0SLK.js +145 -0
  23. package/dist/HeaderAction.vue_vue_type_script_setup_true_lang-Cgji-Jrr.js +45 -0
  24. package/dist/{Icon.vue_vue_type_script_lang-DtC4_mkz.js → Icon.vue_vue_type_script_lang-D7oC-d-S.js} +54 -37
  25. package/dist/{IconTile.vue_vue_type_script_setup_true_lang-Csfv6Sel.js → IconTile.vue_vue_type_script_setup_true_lang-BpIjgu5E.js} +1 -1
  26. package/dist/KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js +35 -0
  27. package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CvwoT1JF.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js} +2 -2
  28. package/dist/{Menu.vue_vue_type_script_setup_true_lang-CrMj6KPD.js → Menu.vue_vue_type_script_setup_true_lang-DTbAcDzL.js} +66 -58
  29. package/dist/{Modal.vue_vue_type_script_setup_true_lang-BQZM49gC.js → Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js} +4 -4
  30. package/dist/NewRolePage-DTOWIxxC.js +42 -0
  31. package/dist/NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js +31 -0
  32. package/dist/NumberField.vue_vue_type_script_setup_true_lang-C7N5nq0P.js +113 -0
  33. package/dist/OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js +95 -0
  34. package/dist/PageBar.vue_vue_type_script_setup_true_lang-B7qdEeej.js +47 -0
  35. package/dist/{Panel.vue_vue_type_script_setup_true_lang-BQmv3cLb.js → Panel.vue_vue_type_script_setup_true_lang-BA0u_DtS.js} +1 -1
  36. package/dist/PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js +46 -0
  37. package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-ElDizaW2.js → PhotoViewer.vue_vue_type_script_setup_true_lang-QPCW3Xi6.js} +1 -1
  38. package/dist/Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js +125 -0
  39. package/dist/ProfilePage-BlpiWH_W.js +654 -0
  40. package/dist/{ProgressTrack.vue_vue_type_script_setup_true_lang-1DDaNs2W.js → ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js} +2 -2
  41. package/dist/RecordHeader.vue_vue_type_script_setup_true_lang-C_ymvhHU.js +64 -0
  42. package/dist/ResourcePage.vue_vue_type_script_setup_true_lang-CwI_sROp.js +173 -0
  43. package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-CmwvSytD.js +300 -0
  44. package/dist/RolePage-DZk7BZOc.js +315 -0
  45. package/dist/RolesPage-DzGGCMnm.js +115 -0
  46. package/dist/SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js +23 -0
  47. package/dist/SectionList.vue_vue_type_script_setup_true_lang-BFYls8fR.js +148 -0
  48. package/dist/SectionNavigator.vue_vue_type_script_setup_true_lang-DSMXEaCs.js +314 -0
  49. package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js +58 -0
  50. package/dist/SelectField.vue_vue_type_script_setup_true_lang-7O1BAx04.js +423 -0
  51. package/dist/SessionList.vue_vue_type_script_setup_true_lang-D5KRitar.js +111 -0
  52. package/dist/Sessions-CWqjjTr1.js +96 -0
  53. package/dist/SettingsPage-C4s0IdkW.js +255 -0
  54. package/dist/Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js +145 -0
  55. package/dist/SignIn-zzKY__df.js +140 -0
  56. package/dist/SignInPage-Rqnus_s-.js +60 -0
  57. package/dist/SignInTable.vue_vue_type_script_setup_true_lang-CEbAvZ_C.js +79 -0
  58. package/dist/SignIns-Cnf9BVR0.js +66 -0
  59. package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-BJIA2JfI.js +93 -0
  60. package/dist/SwitchField.vue_vue_type_script_setup_true_lang-CM8yp9JQ.js +64 -0
  61. package/dist/Tabs.vue_vue_type_script_setup_true_lang-CcMcE38r.js +155 -0
  62. package/dist/TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js +269 -0
  63. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CqAWfABZ.js +68 -0
  64. package/dist/TimeField.vue_vue_type_script_setup_true_lang-DWfAUlnz.js +164 -0
  65. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-CSY_mMm1.js → Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js} +1 -1
  66. package/dist/UserRecord-DqigxVxH.js +267 -0
  67. package/dist/UsersList-DNlZsI9J.js +155 -0
  68. package/dist/ViewTabs.vue_vue_type_script_setup_true_lang-BJIoZAlH.js +28 -0
  69. package/dist/access/AddRoleDialog.vue.d.ts +19 -0
  70. package/dist/access/BindingRow.vue.d.ts +19 -0
  71. package/dist/access/EffectiveAccess.vue.d.ts +12 -0
  72. package/dist/access/NewRolePage.vue.d.ts +2 -0
  73. package/dist/access/PermissionTree.vue.d.ts +13 -0
  74. package/dist/access/PersonAccess.vue.d.ts +21 -0
  75. package/dist/access/ReplaceRoleDialog.vue.d.ts +17 -0
  76. package/dist/access/RoleCompareDialog.vue.d.ts +14 -0
  77. package/dist/access/RoleEditor.vue.d.ts +28 -0
  78. package/dist/access/RolePage.vue.d.ts +2 -0
  79. package/dist/access/RolesPage.vue.d.ts +2 -0
  80. package/dist/access/api.d.ts +26 -0
  81. package/dist/access/catalogue.d.ts +64 -0
  82. package/dist/access/context.d.ts +20 -0
  83. package/dist/access/effective.d.ts +42 -0
  84. package/dist/access/feature.d.ts +27 -0
  85. package/dist/access/index.d.ts +13 -0
  86. package/dist/access/index.js +15 -0
  87. package/dist/access/labels.d.ts +35 -0
  88. package/dist/access/refusals.d.ts +6 -0
  89. package/dist/access/routes.d.ts +45 -0
  90. package/dist/access/scopes.d.ts +20 -0
  91. package/dist/app/contributions.d.ts +1 -1
  92. package/dist/app/feature.d.ts +8 -0
  93. package/dist/app/index.js +259 -296
  94. package/dist/bottomDock-BZEiOPYZ.js +12 -0
  95. package/dist/button/Button.vue.d.ts +3 -3
  96. package/dist/button/index.js +1 -1
  97. package/dist/chrome-BS3xJcad.js +93 -0
  98. package/dist/client/client.d.ts +13 -0
  99. package/dist/client/index.d.ts +3 -1
  100. package/dist/client/index.js +11 -138
  101. package/dist/client/route.d.ts +59 -0
  102. package/dist/client-k9euDWF4.js +147 -0
  103. package/dist/closeOverlays-CjVsIrpL.js +8 -0
  104. package/dist/collection/definition.d.ts +3 -0
  105. package/dist/collection/http.d.ts +4 -2
  106. package/dist/collection/index.js +74 -2428
  107. package/dist/collection/useCollection.d.ts +2 -0
  108. package/dist/content/index.js +37 -66
  109. package/dist/contributions-DsfmDoRD.js +26 -0
  110. package/dist/control-7EP4tjYy.js +313 -0
  111. package/dist/controls/DateButton.vue.d.ts +1 -1
  112. package/dist/controls/PopupButton.vue.d.ts +1 -1
  113. package/dist/controls/index.js +11 -10
  114. package/dist/defineRoutes-BGAdiIrt.js +19 -0
  115. package/dist/{describeError-l5T9b8Uv.js → describeError-Ctga6GcS.js} +1 -1
  116. package/dist/environment-Dva-SG8D.js +6 -0
  117. package/dist/{error-Bb_dr_Ay.js → error-CD7x0Jrz.js} +2 -2
  118. package/dist/feature-DdUAfyi4.js +25 -0
  119. package/dist/fieldMessages-C3Rpbktw.js +25 -0
  120. package/dist/form/CheckboxField.vue.d.ts +1 -1
  121. package/dist/form/CommandDialog.vue.d.ts +1 -1
  122. package/dist/form/DateField.vue.d.ts +1 -1
  123. package/dist/form/DateTimeField.vue.d.ts +1 -1
  124. package/dist/form/EditorPage.vue.d.ts +1 -1
  125. package/dist/form/Field.vue.d.ts +1 -1
  126. package/dist/form/FileField.vue.d.ts +1 -1
  127. package/dist/form/FormGroup.vue.d.ts +1 -1
  128. package/dist/form/FormGroupButton.vue.d.ts +1 -1
  129. package/dist/form/FormRow.vue.d.ts +1 -1
  130. package/dist/form/I18nField.vue.d.ts +3 -3
  131. package/dist/form/MoneyField.vue.d.ts +1 -1
  132. package/dist/form/MonthYearField.vue.d.ts +1 -1
  133. package/dist/form/NumberCell.vue.d.ts +1 -1
  134. package/dist/form/NumberField.vue.d.ts +2 -2
  135. package/dist/form/OtpInput.vue.d.ts +2 -2
  136. package/dist/form/PhotoField.vue.d.ts +1 -1
  137. package/dist/form/SwitchField.vue.d.ts +1 -1
  138. package/dist/form/TextField.vue.d.ts +3 -3
  139. package/dist/form/TextareaField.vue.d.ts +3 -3
  140. package/dist/form/TimeField.vue.d.ts +1 -1
  141. package/dist/form/date/DatePickerSheet.vue.d.ts +1 -1
  142. package/dist/form/date/MonthYearPanel.vue.d.ts +1 -1
  143. package/dist/form/index.js +1159 -3474
  144. package/dist/guards-Dve61KjR.js +51 -0
  145. package/dist/http-CNcDHSOj.js +194 -0
  146. package/dist/i18n/index.d.ts +281 -0
  147. package/dist/i18n/index.js +52 -52
  148. package/dist/icon/core.d.ts +17 -0
  149. package/dist/icon/index.js +1 -1
  150. package/dist/identity/ImpersonationBanner.vue.d.ts +2 -0
  151. package/dist/identity/LocaleSync.vue.d.ts +2 -0
  152. package/dist/identity/SessionExpiry.vue.d.ts +2 -0
  153. package/dist/identity/SignInAsButton.vue.d.ts +15 -0
  154. package/dist/identity/SignInPage.vue.d.ts +2 -0
  155. package/dist/identity/context.d.ts +7 -0
  156. package/dist/identity/feature.d.ts +16 -0
  157. package/dist/identity/fieldMessages.d.ts +15 -0
  158. package/dist/identity/index.d.ts +16 -0
  159. package/dist/identity/index.js +18 -0
  160. package/dist/identity/profile/DetailsPanel.vue.d.ts +11 -0
  161. package/dist/identity/profile/EmailChangeDialog.vue.d.ts +14 -0
  162. package/dist/identity/profile/EmailPanel.vue.d.ts +11 -0
  163. package/dist/identity/profile/PanelActions.vue.d.ts +17 -0
  164. package/dist/identity/profile/PasswordPanel.vue.d.ts +2 -0
  165. package/dist/identity/profile/ProfileMenuItem.vue.d.ts +2 -0
  166. package/dist/identity/profile/ProfilePage.vue.d.ts +2 -0
  167. package/dist/identity/profile/SessionsPanel.vue.d.ts +2 -0
  168. package/dist/identity/profile/SignInsPanel.vue.d.ts +2 -0
  169. package/dist/identity/profile/VerifyCode.vue.d.ts +49 -0
  170. package/dist/identity/profile/routes.d.ts +13 -0
  171. package/dist/identity/session.d.ts +30 -0
  172. package/dist/identity/shared/ActionRow.vue.d.ts +20 -0
  173. package/dist/identity/shared/ChangeFeed.vue.d.ts +11 -0
  174. package/dist/identity/shared/PageBar.vue.d.ts +12 -0
  175. package/dist/identity/shared/SectionIntro.vue.d.ts +16 -0
  176. package/dist/identity/shared/SessionList.vue.d.ts +19 -0
  177. package/dist/identity/shared/SignInTable.vue.d.ts +11 -0
  178. package/dist/identity/shared/ViewTabs.vue.d.ts +23 -0
  179. package/dist/identity/shared/signInEvents.d.ts +9 -0
  180. package/dist/identity/signIn.d.ts +27 -0
  181. package/dist/identity/useSignInForm.d.ts +20 -0
  182. package/dist/identity/user.d.ts +6 -0
  183. package/dist/identity/users/DeactivateDialog.vue.d.ts +18 -0
  184. package/dist/identity/users/NewUserDialog.vue.d.ts +9 -0
  185. package/dist/identity/users/SetPasswordDialog.vue.d.ts +16 -0
  186. package/dist/identity/users/UserRecord.vue.d.ts +2 -0
  187. package/dist/identity/users/UsersList.vue.d.ts +2 -0
  188. package/dist/identity/users/access.d.ts +4 -0
  189. package/dist/identity/users/context.d.ts +9 -0
  190. package/dist/identity/users/feature.d.ts +34 -0
  191. package/dist/identity/users/languages.d.ts +4 -0
  192. package/dist/identity/users/list.d.ts +8 -0
  193. package/dist/identity/users/person.d.ts +26 -0
  194. package/dist/identity/users/personSections.d.ts +22 -0
  195. package/dist/identity/users/routes.d.ts +22 -0
  196. package/dist/identity/users/sections/Activity.vue.d.ts +2 -0
  197. package/dist/identity/users/sections/Changes.vue.d.ts +2 -0
  198. package/dist/identity/users/sections/General.vue.d.ts +2 -0
  199. package/dist/identity/users/sections/Sessions.vue.d.ts +2 -0
  200. package/dist/identity/users/sections/SignIn.vue.d.ts +2 -0
  201. package/dist/identity/users/sections/SignIns.vue.d.ts +2 -0
  202. package/dist/identity/users/status.d.ts +4 -0
  203. package/dist/index-BsJ92eub.js +504 -0
  204. package/dist/index-CGv-u1Ws.js +459 -0
  205. package/dist/index-GcLnFF-z.js +706 -0
  206. package/dist/index.d.ts +1 -1
  207. package/dist/index.js +1 -1
  208. package/dist/internal/languageName.d.ts +2 -0
  209. package/dist/keepAlive-WYQGRhuz.js +48 -0
  210. package/dist/languageName-CItV_SOv.js +11 -0
  211. package/dist/languages-BShG9LpE.js +10 -0
  212. package/dist/leaveGuard-Cc8yeLxM.js +72 -0
  213. package/dist/modal/Modal.vue.d.ts +1 -1
  214. package/dist/modal/Sheet.vue.d.ts +2 -0
  215. package/dist/modal/index.js +5 -5
  216. package/dist/modules/access/entities.d.ts +112 -0
  217. package/dist/modules/access/routes.d.ts +67 -0
  218. package/dist/modules/access/schemas.d.ts +73 -0
  219. package/dist/modules/events/entities.d.ts +16 -0
  220. package/dist/modules/events/routes.d.ts +17 -0
  221. package/dist/modules/events/schemas.d.ts +16 -0
  222. package/dist/modules/identity/entities.d.ts +150 -0
  223. package/dist/modules/identity/routes.d.ts +118 -0
  224. package/dist/modules/identity/schemas.d.ts +145 -0
  225. package/dist/modules/notification/entities.d.ts +46 -0
  226. package/dist/modules/notification/routes.d.ts +26 -0
  227. package/dist/modules/notification/schemas.d.ts +25 -0
  228. package/dist/{navigation-B33ikiCS.js → navigation-Cm3iChlR.js} +21 -20
  229. package/dist/neighbors-DpaIMQAL.js +86 -0
  230. package/dist/notifications/InboxPanel.vue.d.ts +16 -0
  231. package/dist/notifications/MarkAllRead.vue.d.ts +7 -0
  232. package/dist/notifications/NotificationBell.vue.d.ts +2 -0
  233. package/dist/notifications/SettingsLink.vue.d.ts +6 -0
  234. package/dist/notifications/context.d.ts +20 -0
  235. package/dist/notifications/deadletters/DeadLetters.vue.d.ts +2 -0
  236. package/dist/notifications/deadletters/access.d.ts +3 -0
  237. package/dist/notifications/deadletters/list.d.ts +3 -0
  238. package/dist/notifications/deadletters/routes.d.ts +13 -0
  239. package/dist/notifications/feature.d.ts +31 -0
  240. package/dist/notifications/inbox.d.ts +62 -0
  241. package/dist/notifications/index.d.ts +13 -0
  242. package/dist/notifications/index.js +8 -0
  243. package/dist/notifications/settings/EmailPanel.vue.d.ts +14 -0
  244. package/dist/notifications/settings/QuietHoursPanel.vue.d.ts +14 -0
  245. package/dist/notifications/settings/SettingsMenuItem.vue.d.ts +2 -0
  246. package/dist/notifications/settings/SettingsPage.vue.d.ts +2 -0
  247. package/dist/notifications/settings/categoryText.d.ts +9 -0
  248. package/dist/notifications/settings/routes.d.ts +13 -0
  249. package/dist/notifications/settings/settings.d.ts +18 -0
  250. package/dist/notifications/settings/state.d.ts +16 -0
  251. package/dist/notifications/state.d.ts +27 -0
  252. package/dist/notifications/stream.d.ts +21 -0
  253. package/dist/options-Ba_0uLWN.js +18 -0
  254. package/dist/overlay/AlertDialog.vue.d.ts +3 -3
  255. package/dist/overlay/Popover.vue.d.ts +1 -1
  256. package/dist/overlay/closeOverlays.d.ts +7 -0
  257. package/dist/overlay/index.js +21 -20
  258. package/dist/page/AdaptivePageShell.vue.d.ts +2 -2
  259. package/dist/page/ResourceHeader.vue.d.ts +2 -2
  260. package/dist/page/index.js +99 -457
  261. package/dist/phone/PhoneField.vue.d.ts +2 -2
  262. package/dist/phone/index.js +68 -67
  263. package/dist/platform/index.d.ts +2 -2
  264. package/dist/platform/index.js +73 -90
  265. package/dist/platform/platform.d.ts +2 -2
  266. package/dist/platform/session.d.ts +22 -1
  267. package/dist/platform-q3cjODLx.js +255 -0
  268. package/dist/resource/index.js +8 -248
  269. package/dist/route-goWMxDUN.js +13 -0
  270. package/dist/routeResource-DstM0hvf.js +82 -0
  271. package/dist/router/guards.d.ts +7 -1
  272. package/dist/router/index.js +23 -37
  273. package/dist/router/navigation.d.ts +1 -1
  274. package/dist/rowLayout-BqTEhEuy.js +603 -0
  275. package/dist/sectionIndex-BS0ic5W7.js +86 -0
  276. package/dist/{sections-LtxV5Mtk.js → sections-CntvUTxn.js} +1 -1
  277. package/dist/shell/AccountMenuItem.vue.d.ts +1 -1
  278. package/dist/shell/BackofficeShell.vue.d.ts +2 -2
  279. package/dist/shell/NavigationList.vue.d.ts +1 -1
  280. package/dist/shell/ShellBrand.vue.d.ts +1 -1
  281. package/dist/shell/backofficeShell.d.ts +1 -1
  282. package/dist/shell/identity.d.ts +1 -1
  283. package/dist/shell/index.js +491 -595
  284. package/dist/state/ProgressTrack.vue.d.ts +1 -1
  285. package/dist/state/index.js +59 -92
  286. package/dist/status-BuP3ULjH.js +33 -0
  287. package/dist/styles.css +1 -1
  288. package/dist/suggestions-BxMm6MQA.js +138 -0
  289. package/dist/testing/index.js +1 -1
  290. package/dist/toast-D9Z5To38.js +13 -0
  291. package/dist/transport-BnP7WC0Y.js +4 -0
  292. package/dist/useCommand-BkONMn3X.js +135 -0
  293. package/dist/useLoad-CYRVx6HW.js +39 -0
  294. package/dist/useResourceForm-D1hIpwW5.js +52 -0
  295. package/dist/useSaveChrome-chi6D3HY.js +25 -0
  296. package/dist/useSheetDrag-OsD6Eb6I.js +72 -0
  297. package/dist/useTypedEntry-aTfPBAhw.js +857 -0
  298. package/package.json +26 -5
  299. package/dist/NoAccess.vue_vue_type_script_setup_true_lang-OKW8pKYU.js +0 -78
  300. package/dist/SectionList.vue_vue_type_script_setup_true_lang-L9ita_Kx.js +0 -230
  301. package/dist/SelectField.vue_vue_type_script_setup_true_lang-DZTrU8NJ.js +0 -661
  302. package/dist/Sheet.vue_vue_type_script_setup_true_lang-CtkJ-4e3.js +0 -210
  303. package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-CGTuEnTv.js +0 -243
  304. package/dist/chrome-D9pwD6iS.js +0 -101
  305. package/dist/environment-D3nozt9a.js +0 -75
  306. package/dist/feature-DyDtyMLU.js +0 -47
  307. package/dist/options-DAkBtYkI.js +0 -330
  308. package/dist/platform-jqlKVJ2e.js +0 -244
  309. package/dist/toast-DvrHQ6Ag.js +0 -131
@@ -0,0 +1,34 @@
1
+ import { type Feature } from "../../app";
2
+ import type { Permission } from "../../platform";
3
+ import type { Destination } from "../../router";
4
+ import { type PersonSection } from "./personSections";
5
+ export interface UsersFeatureOptions {
6
+ /** The users list and a person's record (`/users`), for whoever holds `iam.user:view`. Default true. */
7
+ people?: boolean;
8
+ /** "My profile" (`/profile`) and its entry in the account menu, for every signed-in person. Default true. */
9
+ profile?: boolean;
10
+ /** The permission that shows "Sign in as" on a person's record (what the server's `AllowImpersonation` was given). Default `iam.user:impersonate`; `false` leaves the button out. */
11
+ signInAs?: Permission | false;
12
+ /** Names of the application's areas in a person's Activity: the area key the audit records (`crm`) and the i18n key of its name. `all`, `identity` and `other` are the library's. An area without a key reads as "Other". */
13
+ activityAreas?: Readonly<Record<string, string>>;
14
+ /** Sections the application adds to a person's record after the feature's own (their roles); each is a child route `users.record.<path>`. */
15
+ sections?: readonly PersonSection[];
16
+ /** The destination of the backend's menu that opens the users list. Without it the application binds the list itself. */
17
+ destination?: Destination;
18
+ }
19
+ /**
20
+ * The screens of go-core's users and profile routes, one feature to install:
21
+ *
22
+ * - **People** (`people`): the users list (`/users`, route `users.index`) and a person's record (`users.record`, with its
23
+ * sections: details, sign-in, sessions, sign-in history, changes), for whoever administers people. Every screen and action
24
+ * is behind the permission go-core checks for it (`iam.user:view`, `iam.user:manage`), so an application installs it for
25
+ * everyone and the server's catalogue decides who sees what.
26
+ * - **My profile** (`profile`): the signed-in person's own name and phone, password, e-mail address (changed with a code),
27
+ * sessions and sign-ins (`/profile`, route `profile`), with an entry in the account menu.
28
+ *
29
+ * An application leaves out what it does not want (`people: false`) and links to the rest by route name (`usersRoutes`,
30
+ * `profileRoutes`). It needs `identityFeature()` next to it for "Sign in as".
31
+ *
32
+ * createApplication({ platform, shell: backofficeShell(), features: [identityFeature(), usersFeature({ destination: "users" })] })
33
+ */
34
+ export declare function usersFeature(options?: UsersFeatureOptions): Feature;
@@ -0,0 +1,4 @@
1
+ import { type ComputedRef } from "vue";
2
+ import type { SelectOption } from "../../form";
3
+ /** The languages the application offers, as the options of a select (each named in itself). */
4
+ export declare function useLanguages(): ComputedRef<readonly SelectOption<string>[]>;
@@ -0,0 +1,8 @@
1
+ import type { HttpClient } from "../../client";
2
+ /** The views of the list, as go-core's `GET /v1/iam/users` knows them. */
3
+ export declare const USER_VIEWS: readonly ["active", "locked", "inactive", "all"];
4
+ /**
5
+ * The list of people, one definition for the list page and for the previous / next of a person's record, so both ask
6
+ * the server the same question. The sorts and views are the ones go-core accepts.
7
+ */
8
+ export declare function userList(http: HttpClient): import("../../collection").CollectionDefinition<import("..").UserRow, "name" | "email" | "login" | "created_at", never, "inactive" | "all" | "locked" | "active">;
@@ -0,0 +1,26 @@
1
+ import type { InjectionKey } from "vue";
2
+ import type { RouteResource } from "../../resource";
3
+ import type { Load } from "../../state";
4
+ import type { SessionList, UserDetail } from "../../modules/identity/entities";
5
+ /** The person a record page is about, shared with its routed sections (`useRouteResourceContext(PERSON)`). */
6
+ export declare const PERSON: InjectionKey<RouteResource<UserDetail>>;
7
+ /** What the viewer may do with this person right now, and the dialogs that do it (they live on the record page). */
8
+ export interface PersonActions {
9
+ readonly can: {
10
+ /** Edit the details, set a password, unlock, end sessions: whoever holds `iam.user:manage`. */
11
+ readonly manage: boolean;
12
+ /** Never one's own account (go-core refuses it), never one that is already inactive. */
13
+ readonly deactivate: boolean;
14
+ readonly activate: boolean;
15
+ /** Sessions of somebody else; one's own are ended in "my profile", where this device is kept. */
16
+ readonly endSessions: boolean;
17
+ };
18
+ deactivate(): void;
19
+ activate(): void;
20
+ setPassword(): void;
21
+ /** After something changed the person's state under the page (a new password unlocks, a deactivation ends sessions). */
22
+ refresh(): Promise<void>;
23
+ }
24
+ export declare const personActionsKey: InjectionKey<PersonActions>, usePersonActions: () => PersonActions;
25
+ /** The person's live sessions: loaded once by the record page (it counts them) and shared with the Sessions section. */
26
+ export declare const personSessionsKey: InjectionKey<Load<SessionList>>, usePersonSessions: () => Load<SessionList>;
@@ -0,0 +1,22 @@
1
+ import { type Component } from "vue";
2
+ import type { RouteRecordRaw } from "vue-router";
3
+ import type { UserDetail } from "../../modules/identity/entities";
4
+ import type { AccessRequirement, RouteSection } from "../../router";
5
+ /**
6
+ * A section the application adds to a person's record (their roles, say), listed after the feature's own. The component
7
+ * gets what `props` makes of the loaded person; `meta` is the section's route meta (its label, icon and `access`).
8
+ *
9
+ * usersFeature({ sections: [{ path: "roles", component: PersonAccess, props: (p) => ({ subject: { kind: "user", id: p.id }, name: p.name }), meta: personRolesSection }] })
10
+ */
11
+ export interface PersonSection {
12
+ /** The child route's path under `/users/:id/` and its name suffix (`users.record.<path>`): one lowercase word. */
13
+ readonly path: string;
14
+ readonly component: Component;
15
+ readonly props?: (person: UserDetail) => Record<string, unknown>;
16
+ readonly meta: {
17
+ readonly access?: AccessRequirement;
18
+ readonly section: RouteSection;
19
+ };
20
+ }
21
+ /** The child route of the record for an extra section. */
22
+ export declare function personSectionRoute(section: PersonSection): RouteRecordRaw;
@@ -0,0 +1,22 @@
1
+ import type { RouteRecordRaw } from "vue-router";
2
+ /**
3
+ * The routes of `usersFeature`: typed targets for links (`usersRoutes.index`, `usersRoutes.record({ id })`), and the
4
+ * records the feature installs. The names and paths are fixed, so a link or a menu binding of the application can name
5
+ * them. The sections of a person's record are its children, reached by name (`users.record.sessions`).
6
+ */
7
+ export interface UsersRoutes {
8
+ /** The records `usersFeature` installs. */
9
+ readonly records: readonly RouteRecordRaw[];
10
+ readonly index: {
11
+ readonly name: "users.index";
12
+ };
13
+ readonly record: (params: {
14
+ id: string | number;
15
+ }) => {
16
+ readonly name: "users.record";
17
+ readonly params: {
18
+ id: string | number;
19
+ };
20
+ };
21
+ }
22
+ export declare const usersRoutes: UsersRoutes;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import type { Status } from "../../modules/identity/entities";
2
+ import type { Tone } from "../../state";
3
+ /** The tone of a person's status: active is fine, locked needs attention, inactive is quiet. */
4
+ export declare const statusTone: (status: Status) => Tone;
@@ -0,0 +1,504 @@
1
+ import { r as y } from "./route-goWMxDUN.js";
2
+ import { d as se, p as le } from "./feature-DdUAfyi4.js";
3
+ import { defineComponent as z, openBlock as g, createBlock as I, unref as a, shallowRef as U, ref as G, readonly as P, withCtx as R, createTextVNode as Q, toDisplayString as L, mergeProps as X, computed as q, createElementBlock as w, createElementVNode as C, createCommentVNode as S, createVNode as T, Fragment as B, renderList as ce, normalizeClass as W, useTemplateRef as de, createSlots as ue } from "vue";
4
+ import { d as fe } from "./context-Ch1r4fdN.js";
5
+ import { d as Z } from "./defineRoutes-BGAdiIrt.js";
6
+ import { useI18n as N } from "vue-i18n";
7
+ import { _ as me } from "./AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js";
8
+ import { f as ve } from "./transport-BnP7WC0Y.js";
9
+ import { u as pe } from "./mediaQuery-CygcXmFW.js";
10
+ import { _ as be } from "./Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js";
11
+ import { _ as _e } from "./Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js";
12
+ import { _ as H } from "./HeaderAction.vue_vue_type_script_setup_true_lang-Cgji-Jrr.js";
13
+ import { useRouter as ge } from "vue-router";
14
+ import { _ as F } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
15
+ import { u as ye } from "./format-B8mJm946.js";
16
+ import { _ as xe } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
17
+ import { _ as he } from "./AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js";
18
+ const M = {
19
+ list: y("GET", "/v1/notifications"),
20
+ unread: y("GET", "/v1/notifications/unread"),
21
+ read: y("POST", "/v1/notifications/:id/read"),
22
+ readAll: y("POST", "/v1/notifications/read"),
23
+ stream: y.raw("GET", "/v1/notifications/stream"),
24
+ test: y("POST", "/v1/notifications/test"),
25
+ preferences: y("GET", "/v1/notifications/preferences"),
26
+ preferencesSetEmail: y("PUT", "/v1/notifications/preferences/:category"),
27
+ quietHours: y("PUT", "/v1/notifications/quiet-hours")
28
+ }, pt = {
29
+ deadLettersList: y("GET", "/v1/events/dead-letters", { permission: "events.deadletter:view" }),
30
+ deadLettersRetry: y("POST", "/v1/events/dead-letters/:event/:consumer/retry", { permission: "events.deadletter:retry" }),
31
+ deadLettersRetryAll: y("POST", "/v1/events/dead-letters/retry", { permission: "events.deadletter:retry" }),
32
+ consumers: y("GET", "/v1/events/consumers", { permission: "events.deadletter:view" })
33
+ }, [ke, ee] = fe("vue-core.notifications"), we = "events.deadletter:view", bt = "events.deadletter:retry", J = Z({
34
+ index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-CMRtXn_N.js"), meta: { access: we, titleKey: "core.notifications.dead_letters.title" } }
35
+ }), j = Z({
36
+ index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-C4s0IdkW.js"), meta: { titleKey: "core.notifications.settings.title" } }
37
+ }), Te = /* @__PURE__ */ z({
38
+ __name: "SettingsMenuItem",
39
+ setup(o) {
40
+ const { t } = N();
41
+ return (e, n) => (g(), I(me, {
42
+ label: a(t)("core.notifications.settings.title"),
43
+ icon: "notification3Line",
44
+ to: a(j).index,
45
+ "data-notification-settings-menu-item": ""
46
+ }, null, 8, ["label", "to"]));
47
+ }
48
+ });
49
+ function te(o) {
50
+ return o.reduce((t, e) => Math.max(t, e.id), 0);
51
+ }
52
+ function Ee(o, t, e) {
53
+ return o.map((n) => n.id === t && n.read_at === null ? { ...n, read_at: e } : n);
54
+ }
55
+ function Ce(o, t, e) {
56
+ return o.map((n) => n.read_at === null && n.id <= t ? { ...n, read_at: e } : n);
57
+ }
58
+ function Le(o, t) {
59
+ const e = te(o);
60
+ return [...t.filter((n) => n.id > e), ...o];
61
+ }
62
+ function Se(o, t) {
63
+ const e = new Set(o.map((n) => n.id));
64
+ return [...o, ...t.filter((n) => !e.has(n.id))];
65
+ }
66
+ function Re(o, t, e) {
67
+ let n = o.items;
68
+ if (t.type === "created" && t.notification && !n.some((r) => r.id === t.notification?.id) && (n = [t.notification, ...n]), t.type === "read") {
69
+ const r = new Set(t.read_ids ?? []), _ = t.read_up_to_id ?? 0;
70
+ n = n.map((f) => f.read_at === null && (t.all_read ? f.id <= _ : r.has(f.id)) ? { ...f, read_at: e } : f);
71
+ }
72
+ return { items: n, unreadCount: Math.max(0, t.unread_count) };
73
+ }
74
+ function $e(o) {
75
+ return o > 99 ? "99+" : String(o);
76
+ }
77
+ const Me = ["created", "read", "unread"];
78
+ function Ae(o) {
79
+ const t = o.split(`
80
+ `).filter((e) => e.startsWith("data:")).map((e) => e.slice(5).replace(/^ /, "")).join(`
81
+ `);
82
+ if (t === "") return null;
83
+ try {
84
+ const e = JSON.parse(t);
85
+ if (typeof e != "object" || e === null) return null;
86
+ const { type: n, unread_count: r } = e;
87
+ return typeof n == "string" && Me.includes(n) && typeof r == "number" ? e : null;
88
+ } catch {
89
+ return null;
90
+ }
91
+ }
92
+ async function Pe({ url: o, transport: t, signal: e, onEvent: n, idleTimeout: r }) {
93
+ if (e.aborted) return "aborted";
94
+ const _ = new AbortController();
95
+ let f = null, E = !1, i;
96
+ const b = () => {
97
+ _.abort(), f?.cancel().catch(() => {
98
+ });
99
+ }, v = () => {
100
+ clearTimeout(i), i = setTimeout(() => {
101
+ E = !0, b();
102
+ }, r);
103
+ };
104
+ e.addEventListener("abort", b, { once: !0 }), v();
105
+ try {
106
+ const l = await t(o, { method: "GET", headers: { Accept: "text/event-stream" }, credentials: "include", signal: _.signal });
107
+ if (l.status === 401) return "unauthorized";
108
+ if (!l.ok || !l.body) return "failed";
109
+ f = l.body.getReader();
110
+ const x = new TextDecoder();
111
+ let h = "";
112
+ for (; ; ) {
113
+ const { done: m, value: s } = await f.read();
114
+ if (e.aborted) return "aborted";
115
+ if (E) return "stalled";
116
+ if (m) return "closed";
117
+ v(), h += x.decode(s, { stream: !0 }).replace(/\r\n/g, `
118
+ `);
119
+ const k = h.split(`
120
+
121
+ `);
122
+ h = k.pop() ?? "";
123
+ for (const p of k) {
124
+ const A = Ae(p);
125
+ A && n(A);
126
+ }
127
+ }
128
+ } catch (l) {
129
+ return e.aborted ? "aborted" : E ? "stalled" : l instanceof Error && l.name === "AbortError" ? "aborted" : "failed";
130
+ } finally {
131
+ clearTimeout(i), e.removeEventListener("abort", b);
132
+ }
133
+ }
134
+ function ze(o) {
135
+ const { http: t, signal: e, pageSize: n = 20, backoff: r = { min: 1e3, max: 3e4 }, idleTimeout: _ = 5e4, transport: f = ve, now: E = () => /* @__PURE__ */ new Date() } = o, i = U([]), b = G(0), v = G(!1), l = U({ status: "idle" }), x = G("idle");
136
+ let h = 0;
137
+ const m = () => E().toISOString();
138
+ async function s() {
139
+ try {
140
+ const { data: c } = await t.request(M.unread, void 0, { signal: e });
141
+ e.aborted || (b.value = c.unread_count);
142
+ } catch {
143
+ }
144
+ }
145
+ async function k() {
146
+ const c = ++h;
147
+ x.value = "idle", l.value = { status: "loading" };
148
+ try {
149
+ const { data: d } = await t.request(M.list, { limit: n }, { signal: e });
150
+ if (e.aborted || c !== h) return;
151
+ i.value = Le(d.items, i.value), v.value = d.has_more, l.value = { status: "loaded" };
152
+ } catch (d) {
153
+ if (e.aborted || c !== h) return;
154
+ l.value = { status: "failed", error: d };
155
+ }
156
+ }
157
+ async function p() {
158
+ const c = i.value[i.value.length - 1]?.id;
159
+ if (!v.value || x.value === "loading" || c === void 0) return;
160
+ const d = h;
161
+ x.value = "loading";
162
+ try {
163
+ const { data: u } = await t.request(M.list, { before_id: c, limit: n }, { signal: e });
164
+ if (e.aborted || d !== h) return;
165
+ i.value = Se(i.value, u.items), v.value = u.has_more, x.value = "idle";
166
+ } catch {
167
+ !e.aborted && d === h && (x.value = "failed");
168
+ }
169
+ }
170
+ async function A(c) {
171
+ if (!(c.read_at !== null || i.value.find((d) => d.id === c.id)?.read_at)) {
172
+ i.value = Ee(i.value, c.id, m()), b.value = Math.max(0, b.value - 1);
173
+ try {
174
+ const { data: d } = await t.request(M.read, { id: c.id }, { signal: e });
175
+ e.aborted || (b.value = d.unread_count);
176
+ } catch {
177
+ if (e.aborted) return;
178
+ i.value = i.value.map((d) => d.id === c.id ? { ...d, read_at: null } : d), await s();
179
+ }
180
+ }
181
+ }
182
+ async function ae() {
183
+ const c = te(i.value);
184
+ if (c === 0) return;
185
+ const d = new Set(i.value.filter((u) => u.read_at === null && u.id <= c).map((u) => u.id));
186
+ i.value = Ce(i.value, c, m()), b.value = Math.max(0, b.value - d.size);
187
+ try {
188
+ const { data: u } = await t.request(M.readAll, { up_to_id: c }, { signal: e });
189
+ e.aborted || (b.value = u.unread_count);
190
+ } catch {
191
+ if (e.aborted) return;
192
+ i.value = i.value.map((u) => d.has(u.id) ? { ...u, read_at: null } : u), await s();
193
+ }
194
+ }
195
+ let $ = r.min, O = null;
196
+ const ie = (c) => new Promise((d) => {
197
+ const u = () => {
198
+ clearTimeout(D), e.removeEventListener("abort", u), O = null, d();
199
+ }, D = setTimeout(u, c);
200
+ e.addEventListener("abort", u, { once: !0 }), O = u;
201
+ });
202
+ async function re() {
203
+ for (let c = !1; !e.aborted; c = !0) {
204
+ if (c && await s(), e.aborted) return;
205
+ let d = !1;
206
+ if (await Pe({
207
+ url: o.streamUrl,
208
+ transport: f,
209
+ signal: e,
210
+ idleTimeout: _,
211
+ onEvent(u) {
212
+ d = !0;
213
+ const D = Re({ items: i.value, unreadCount: b.value }, u, m());
214
+ i.value = D.items, b.value = D.unreadCount;
215
+ }
216
+ }), e.aborted) return;
217
+ d && ($ = r.min), await ie($), $ = Math.min($ * 2, r.max);
218
+ }
219
+ }
220
+ const V = () => {
221
+ document.visibilityState === "visible" && (s(), $ = r.min, O?.());
222
+ }, K = () => {
223
+ s(), $ = r.min, O?.();
224
+ };
225
+ return document.addEventListener("visibilitychange", V), window.addEventListener("online", K), e.addEventListener(
226
+ "abort",
227
+ () => {
228
+ document.removeEventListener("visibilitychange", V), window.removeEventListener("online", K);
229
+ },
230
+ { once: !0 }
231
+ ), e.aborted || re(), { items: P(i), unreadCount: P(b), hasMore: P(v), list: P(l), more: P(x), load: k, loadMore: p, markRead: A, markAllRead: ae };
232
+ }
233
+ const ne = /* @__PURE__ */ z({
234
+ __name: "MarkAllRead",
235
+ props: {
236
+ inbox: {}
237
+ },
238
+ setup(o) {
239
+ const { t } = N();
240
+ return (e, n) => (g(), I(a(F), {
241
+ prominence: "plain",
242
+ size: "sm",
243
+ icon: "checkDoubleLine",
244
+ "data-notification-mark-all": "",
245
+ disabled: o.inbox.unreadCount.value === 0,
246
+ onClick: n[0] || (n[0] = (r) => o.inbox.markAllRead())
247
+ }, {
248
+ default: R(() => [
249
+ Q(L(a(t)("core.notifications.mark_all_read")), 1)
250
+ ]),
251
+ _: 1
252
+ }, 8, ["disabled"]));
253
+ }
254
+ }), oe = /* @__PURE__ */ z({
255
+ __name: "SettingsLink",
256
+ emits: ["click"],
257
+ setup(o, { emit: t }) {
258
+ const e = t, { t: n } = N();
259
+ return (r, _) => (g(), I(a(F), X({
260
+ prominence: "plain",
261
+ size: "sm",
262
+ icon: "settings3Line",
263
+ to: a(j).index
264
+ }, { "aria-label": a(n)("core.notifications.settings.open"), title: a(n)("core.notifications.settings.open") }, {
265
+ "data-notification-settings": "",
266
+ onClick: _[0] || (_[0] = (f) => e("click"))
267
+ }), null, 16, ["to"]));
268
+ }
269
+ }), Ie = {
270
+ "data-notification-inbox": "",
271
+ class: "w-full min-w-0 sm:w-96"
272
+ }, Ne = {
273
+ key: 0,
274
+ class: "mb-1 flex items-center justify-between gap-2"
275
+ }, Oe = { class: "px-1 text-headline font-semibold" }, De = { class: "flex items-center gap-1" }, qe = { class: "-mx-1 max-h-[min(28rem,60dvh)] overflow-y-auto overscroll-contain" }, Ge = ["data-unread", "onClick"], Ue = { class: "min-w-0 flex-1" }, Be = {
276
+ key: 0,
277
+ class: "mt-0.5 line-clamp-2 block text-footnote text-content-muted"
278
+ }, Fe = ["datetime"], je = {
279
+ key: 0,
280
+ class: "mt-2 size-2 shrink-0 rounded-full bg-content-link",
281
+ "aria-hidden": "true"
282
+ }, Ve = {
283
+ key: 1,
284
+ class: "sr-only"
285
+ }, Ke = {
286
+ key: 0,
287
+ class: "mt-2 flex flex-col items-center gap-1",
288
+ "data-notification-more": ""
289
+ }, We = {
290
+ key: 0,
291
+ class: "text-footnote text-status-danger-content",
292
+ role: "alert"
293
+ }, He = "bg-fill text-content-muted", Y = /* @__PURE__ */ z({
294
+ __name: "InboxPanel",
295
+ props: {
296
+ inbox: {},
297
+ appearance: {}
298
+ },
299
+ emits: ["close"],
300
+ setup(o, { emit: t }) {
301
+ const e = o, n = t, { t: r } = N(), _ = ge(), f = ye(), { categories: E, settings: i } = ee(), b = {
302
+ amber: "bg-category-amber-surface text-category-amber-content",
303
+ lime: "bg-category-lime-surface text-category-lime-content",
304
+ teal: "bg-category-teal-surface text-category-teal-content",
305
+ cyan: "bg-category-cyan-surface text-category-cyan-content",
306
+ blue: "bg-category-blue-surface text-category-blue-content",
307
+ indigo: "bg-category-indigo-surface text-category-indigo-content",
308
+ violet: "bg-category-violet-surface text-category-violet-content",
309
+ fuchsia: "bg-category-fuchsia-surface text-category-fuchsia-content",
310
+ pink: "bg-category-pink-surface text-category-pink-content"
311
+ }, v = q(() => {
312
+ const { list: m, items: s } = e.inbox;
313
+ if (m.value.status === "failed") {
314
+ const k = r("core.notifications.load_error");
315
+ return s.value.length > 0 ? { status: "stale", value: s.value, error: k } : { status: "failed", error: k };
316
+ }
317
+ return m.value.status === "loaded" ? { status: "loaded", value: s.value } : s.value.length > 0 ? { status: "refreshing", value: s.value } : { status: "loading" };
318
+ }), l = (m) => {
319
+ const s = E[m.category];
320
+ return { icon: s?.icon ?? "notification3Line", classes: s?.hue ? b[s.hue] : He };
321
+ }, x = (m) => m.startsWith("/") && !m.startsWith("//");
322
+ function h(m) {
323
+ e.inbox.markRead(m), !(m.link === "" || !x(m.link)) && (n("close"), _.push(m.link));
324
+ }
325
+ return (m, s) => (g(), w("div", Ie, [
326
+ o.appearance === "popover" ? (g(), w("div", Ne, [
327
+ C("h2", Oe, L(a(r)("core.notifications.title")), 1),
328
+ C("div", De, [
329
+ a(i) ? (g(), I(oe, {
330
+ key: 0,
331
+ onClick: s[0] || (s[0] = (k) => n("close"))
332
+ })) : S("", !0),
333
+ T(ne, { inbox: o.inbox }, null, 8, ["inbox"])
334
+ ])
335
+ ])) : S("", !0),
336
+ T(a(he), {
337
+ state: v.value,
338
+ "empty-title": a(r)("core.notifications.empty_title"),
339
+ "empty-description": a(r)("core.notifications.empty_description"),
340
+ "empty-icon": "notification3Line",
341
+ onRetry: s[2] || (s[2] = (k) => o.inbox.load())
342
+ }, {
343
+ default: R(({ value: k }) => [
344
+ C("ul", qe, [
345
+ (g(!0), w(B, null, ce(k, (p) => (g(), w("li", {
346
+ key: p.id
347
+ }, [
348
+ C("button", {
349
+ type: "button",
350
+ "data-notification-item": "",
351
+ "data-unread": p.read_at === null ? "true" : void 0,
352
+ class: "flex w-full cursor-pointer items-start gap-3 rounded-control px-2 py-2.5 text-left transition-colors duration-motion-fast hover:bg-fill focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
353
+ onClick: (A) => h(p)
354
+ }, [
355
+ C("span", {
356
+ class: W(["flex size-9 shrink-0 items-center justify-center rounded-full", l(p).classes]),
357
+ "aria-hidden": "true"
358
+ }, [
359
+ T(a(xe), {
360
+ name: l(p).icon,
361
+ size: 18
362
+ }, null, 8, ["name"])
363
+ ], 2),
364
+ C("span", Ue, [
365
+ C("span", {
366
+ class: W(["block text-subheadline", p.read_at === null ? "font-semibold text-content-strong" : "font-medium text-content"])
367
+ }, L(p.title), 3),
368
+ p.body ? (g(), w("span", Be, L(p.body), 1)) : S("", !0),
369
+ C("time", {
370
+ datetime: p.created_at,
371
+ class: "mt-0.5 block text-footnote text-content-muted"
372
+ }, L(a(f).relative(p.created_at)), 9, Fe)
373
+ ]),
374
+ p.read_at === null ? (g(), w("span", je)) : S("", !0),
375
+ p.read_at === null ? (g(), w("span", Ve, L(a(r)("core.notifications.unread")), 1)) : S("", !0)
376
+ ], 8, Ge)
377
+ ]))), 128))
378
+ ]),
379
+ o.inbox.hasMore.value ? (g(), w("div", Ke, [
380
+ o.inbox.more.value === "failed" ? (g(), w("p", We, L(a(r)("core.notifications.load_more_error")), 1)) : S("", !0),
381
+ T(a(F), {
382
+ prominence: "plain",
383
+ size: "sm",
384
+ processing: o.inbox.more.value === "loading",
385
+ onClick: s[1] || (s[1] = (p) => o.inbox.loadMore())
386
+ }, {
387
+ default: R(() => [
388
+ Q(L(a(r)("core.notifications.load_more")), 1)
389
+ ]),
390
+ _: 1
391
+ }, 8, ["processing"])
392
+ ])) : S("", !0)
393
+ ]),
394
+ _: 1
395
+ }, 8, ["state", "empty-title", "empty-description"])
396
+ ]));
397
+ }
398
+ }), Je = { class: "flex items-center justify-center" }, Ye = /* @__PURE__ */ z({
399
+ __name: "NotificationBell",
400
+ setup(o) {
401
+ const { t } = N(), { inbox: e, settings: n } = ee(), r = pe(), _ = de("sheet"), f = q(() => e.value?.unreadCount.value ?? 0), E = q(() => f.value > 0 ? t("core.notifications.open_unread", { count: f.value }) : t("core.notifications.open")), i = q(() => f.value > 0 ? $e(f.value) : void 0);
402
+ return (b, v) => a(e) ? (g(), w(B, { key: 0 }, [
403
+ a(r) ? (g(), w(B, { key: 1 }, [
404
+ T(H, {
405
+ icon: "notification3Line",
406
+ label: E.value,
407
+ badge: i.value,
408
+ "data-notification-bell": "",
409
+ onClick: v[1] || (v[1] = (l) => {
410
+ _.value?.present(), a(e).load();
411
+ })
412
+ }, null, 8, ["label", "badge"]),
413
+ T(a(be), {
414
+ ref_key: "sheet",
415
+ ref: _,
416
+ title: a(t)("core.notifications.title")
417
+ }, ue({
418
+ footer: R(() => [
419
+ C("div", Je, [
420
+ T(ne, { inbox: a(e) }, null, 8, ["inbox"])
421
+ ])
422
+ ]),
423
+ default: R(() => [
424
+ T(Y, {
425
+ inbox: a(e),
426
+ appearance: "sheet",
427
+ onClose: v[3] || (v[3] = (l) => _.value?.dismiss())
428
+ }, null, 8, ["inbox"])
429
+ ]),
430
+ _: 2
431
+ }, [
432
+ a(n) ? {
433
+ name: "actions",
434
+ fn: R(() => [
435
+ T(oe, {
436
+ onClick: v[2] || (v[2] = (l) => _.value?.dismiss())
437
+ })
438
+ ]),
439
+ key: "0"
440
+ } : void 0
441
+ ]), 1032, ["title"])
442
+ ], 64)) : (g(), I(a(_e), {
443
+ key: 0,
444
+ placement: "bottom-start",
445
+ width: "auto",
446
+ arrow: !1,
447
+ label: a(t)("core.notifications.title"),
448
+ onPresented: v[0] || (v[0] = (l) => a(e).load())
449
+ }, {
450
+ trigger: R(({ toggle: l, attrs: x }) => [
451
+ T(H, X(x, {
452
+ icon: "notification3Line",
453
+ label: E.value,
454
+ badge: i.value,
455
+ "data-notification-bell": "",
456
+ onClick: l
457
+ }), null, 16, ["label", "badge", "onClick"])
458
+ ]),
459
+ default: R(({ dismiss: l }) => [
460
+ T(Y, {
461
+ inbox: a(e),
462
+ appearance: "popover",
463
+ onClose: l
464
+ }, null, 8, ["inbox", "onClose"])
465
+ ]),
466
+ _: 1
467
+ }, 8, ["label"]))
468
+ ], 64)) : S("", !0);
469
+ }
470
+ });
471
+ function Qe(o) {
472
+ return {
473
+ id: "notifications.inbox",
474
+ scope: "session",
475
+ start({ signal: t, platform: e }) {
476
+ const n = e.config.apiBase.replace(/\/+$/, "");
477
+ return o.value = ze({ http: e.http, streamUrl: `${n}/${M.stream.path.replace(/^\/+/, "")}`, signal: t }), () => {
478
+ o.value = null;
479
+ };
480
+ }
481
+ };
482
+ }
483
+ function _t(o = {}) {
484
+ const t = U(null), e = o.deadLetters ?? {}, n = o.settings ?? !0;
485
+ return se({
486
+ id: "notifications",
487
+ routes: [...e === !1 ? [] : J.records, ...n ? j.records : []],
488
+ navigation: e !== !1 && e.destination ? [{ destination: e.destination, to: J.index }] : [],
489
+ context: le(ke, { inbox: t, categories: o.categories ?? {}, settings: n }),
490
+ contributions: [
491
+ { id: "notifications.bell", slot: "headerActions", component: Ye, scope: "authenticated" },
492
+ ...n ? [{ id: "notifications.settings", slot: "accountMenu", component: Te, scope: "authenticated", optional: !0, order: -9 }] : []
493
+ ],
494
+ effects: [Qe(t)]
495
+ });
496
+ }
497
+ export {
498
+ bt as R,
499
+ j as a,
500
+ _t as b,
501
+ J as d,
502
+ pt as e,
503
+ M as n
504
+ };