@wssto2/vue-core 0.1.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 (314) hide show
  1. package/README.md +53 -9
  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-CKghARkW.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-CvAnzdc1.js} +48 -47
  7. package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-BZb4qKXo.js → AlertDialog.vue_vue_type_script_setup_true_lang-CJsMUIUg.js} +2 -2
  8. package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-B82bl36A.js → AsyncSection.vue_vue_type_script_setup_true_lang-CCtthMRd.js} +4 -4
  9. package/dist/Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js +51 -0
  10. 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
  11. package/dist/{BottomDock.vue_vue_type_script_setup_true_lang-DhlMnPC2.js → BottomDock.vue_vue_type_script_setup_true_lang-CjN7xYEr.js} +1 -1
  12. package/dist/Button.vue_vue_type_script_setup_true_lang-CYil8h9z.js +182 -0
  13. package/dist/Changes-DlT5mN9G.js +129 -0
  14. package/dist/CollectionPage.vue_vue_type_script_setup_true_lang-CXILftEc.js +1481 -0
  15. package/dist/CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js +299 -0
  16. package/dist/DataTable.vue_vue_type_script_setup_true_lang-DSYgS9lC.js +52 -0
  17. package/dist/DateField.vue_vue_type_script_setup_true_lang-DMVjNsaM.js +1099 -0
  18. package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-Bx5O1RZJ.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-Cb3xJI1x.js} +1 -1
  19. package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-BeGpHMUP.js → EmptyState.vue_vue_type_script_setup_true_lang-C2ZYIT9F.js} +1 -1
  20. package/dist/FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js +276 -0
  21. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-0mfG8TkU.js +136 -0
  22. package/dist/FormView.vue_vue_type_script_setup_true_lang-Bz2m3AtF.js +38 -0
  23. package/dist/General-BD-Hcz0a.js +145 -0
  24. package/dist/{Icon.vue_vue_type_script_lang-DtC4_mkz.js → Icon.vue_vue_type_script_lang-VvcV2Bzo.js} +46 -33
  25. package/dist/{IconTile.vue_vue_type_script_setup_true_lang-Csfv6Sel.js → IconTile.vue_vue_type_script_setup_true_lang-D7QgnUyN.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-DH6EB8br.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-C2udmeEA.js} +2 -2
  28. package/dist/{Menu.vue_vue_type_script_setup_true_lang-D44EHXQZ.js → Menu.vue_vue_type_script_setup_true_lang-BNAjx9tj.js} +61 -57
  29. package/dist/{Modal.vue_vue_type_script_setup_true_lang-DYQgaUtj.js → Modal.vue_vue_type_script_setup_true_lang-D7SwVPpL.js} +139 -129
  30. package/dist/NewRolePage-Dla4YnMs.js +42 -0
  31. package/dist/NoAccess.vue_vue_type_script_setup_true_lang-8m9cNptR.js +31 -0
  32. package/dist/NumberField.vue_vue_type_script_setup_true_lang-CYRg7Kfg.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-Cfr5xsJx.js +47 -0
  35. package/dist/{Panel.vue_vue_type_script_setup_true_lang-BQmv3cLb.js → Panel.vue_vue_type_script_setup_true_lang-BCRxRK4D.js} +1 -1
  36. package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-DDVQXJRB.js → PhotoViewer.vue_vue_type_script_setup_true_lang-B3Q4dhqJ.js} +2 -2
  37. package/dist/Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js +125 -0
  38. package/dist/ProfilePage-OJMQ8cr8.js +691 -0
  39. package/dist/{ProgressTrack.vue_vue_type_script_setup_true_lang-1DDaNs2W.js → ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js} +2 -2
  40. package/dist/RecordHeader.vue_vue_type_script_setup_true_lang-DKsaKlAq.js +64 -0
  41. package/dist/ResourcePage.vue_vue_type_script_setup_true_lang-CJcKa9SW.js +173 -0
  42. package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-DuEPOmjI.js +299 -0
  43. package/dist/RolePage-bZzv_E4l.js +315 -0
  44. package/dist/RolesPage-BniZv0nB.js +115 -0
  45. package/dist/SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js +23 -0
  46. package/dist/SectionList.vue_vue_type_script_setup_true_lang-BKP_bge8.js +148 -0
  47. package/dist/SectionNavigator.vue_vue_type_script_setup_true_lang-BgGEGxSI.js +314 -0
  48. package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BZ9UdgA1.js +58 -0
  49. package/dist/SelectField.vue_vue_type_script_setup_true_lang-BiGaEKBQ.js +422 -0
  50. package/dist/SessionList.vue_vue_type_script_setup_true_lang-DUQpr7gb.js +111 -0
  51. package/dist/Sessions-Co5-xdeb.js +96 -0
  52. package/dist/Sheet.vue_vue_type_script_setup_true_lang-bHYzx7-J.js +142 -0
  53. package/dist/SignIn-BWwFbxki.js +140 -0
  54. package/dist/SignInPage-FnLtoi2q.js +60 -0
  55. package/dist/SignInTable.vue_vue_type_script_setup_true_lang-Dnx3T_42.js +79 -0
  56. package/dist/SignIns-3UcI64_h.js +66 -0
  57. package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-4I8m27ol.js +93 -0
  58. package/dist/Tabs.vue_vue_type_script_setup_true_lang-BeGaydRr.js +155 -0
  59. package/dist/TextField.vue_vue_type_script_setup_true_lang-C_FMf3Vc.js +269 -0
  60. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CU3KTKIJ.js +127 -0
  61. 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
  62. package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-BJWPVyfT.js → Tooltip.vue_vue_type_script_setup_true_lang-OOD_XNWx.js} +1 -1
  63. package/dist/UserRecord-Ci8HfwbX.js +267 -0
  64. package/dist/UsersList-vEJ-cgkT.js +155 -0
  65. package/dist/ViewTabs.vue_vue_type_script_setup_true_lang-ByqTU2JT.js +28 -0
  66. package/dist/access/AddRoleDialog.vue.d.ts +19 -0
  67. package/dist/access/BindingRow.vue.d.ts +19 -0
  68. package/dist/access/EffectiveAccess.vue.d.ts +12 -0
  69. package/dist/access/NewRolePage.vue.d.ts +2 -0
  70. package/dist/access/PermissionTree.vue.d.ts +13 -0
  71. package/dist/access/PersonAccess.vue.d.ts +21 -0
  72. package/dist/access/ReplaceRoleDialog.vue.d.ts +17 -0
  73. package/dist/access/RoleCompareDialog.vue.d.ts +14 -0
  74. package/dist/access/RoleEditor.vue.d.ts +28 -0
  75. package/dist/access/RolePage.vue.d.ts +2 -0
  76. package/dist/access/RolesPage.vue.d.ts +2 -0
  77. package/dist/access/api.d.ts +26 -0
  78. package/dist/access/catalogue.d.ts +64 -0
  79. package/dist/access/context.d.ts +20 -0
  80. package/dist/access/effective.d.ts +42 -0
  81. package/dist/access/feature.d.ts +27 -0
  82. package/dist/access/index.d.ts +13 -0
  83. package/dist/access/index.js +15 -0
  84. package/dist/access/labels.d.ts +35 -0
  85. package/dist/access/refusals.d.ts +6 -0
  86. package/dist/access/routes.d.ts +45 -0
  87. package/dist/access/scopes.d.ts +20 -0
  88. package/dist/app/application.d.ts +5 -0
  89. package/dist/app/contributions.d.ts +1 -1
  90. package/dist/app/environment.d.ts +2 -0
  91. package/dist/app/feature.d.ts +8 -0
  92. package/dist/app/index.js +260 -294
  93. package/dist/bottomDock-BZEiOPYZ.js +12 -0
  94. package/dist/button/Button.vue.d.ts +3 -3
  95. package/dist/button/index.d.ts +1 -1
  96. package/dist/button/index.js +5 -3
  97. package/dist/button/shortcut.d.ts +28 -2
  98. package/dist/chrome-BS3xJcad.js +93 -0
  99. package/dist/client/client.d.ts +13 -0
  100. package/dist/client/index.d.ts +3 -1
  101. package/dist/client/index.js +19 -138
  102. package/dist/client/route.d.ts +59 -0
  103. package/dist/client-Bw0aM5Gu.js +147 -0
  104. package/dist/closeOverlays-CjVsIrpL.js +8 -0
  105. package/dist/collection/CollectionPage.vue.d.ts +1 -0
  106. package/dist/collection/CollectionRows.vue.d.ts +59 -0
  107. package/dist/collection/CollectionTable.vue.d.ts +1 -1
  108. package/dist/collection/DataTable.vue.d.ts +47 -0
  109. package/dist/collection/RowActions.vue.d.ts +19 -0
  110. package/dist/collection/columns.d.ts +2 -0
  111. package/dist/collection/http.d.ts +4 -2
  112. package/dist/collection/index.d.ts +4 -2
  113. package/dist/collection/index.js +87 -2299
  114. package/dist/collection/rowLayout.d.ts +10 -0
  115. package/dist/collection/slots.d.ts +6 -3
  116. package/dist/content/index.js +37 -66
  117. package/dist/contributions-CDDg3fKp.js +26 -0
  118. package/dist/controls/DateButton.vue.d.ts +1 -1
  119. package/dist/controls/PopupButton.vue.d.ts +1 -1
  120. package/dist/controls/index.js +11 -10
  121. package/dist/defineRoutes-BGAdiIrt.js +19 -0
  122. package/dist/describeError-Ctga6GcS.js +41 -0
  123. package/dist/dialogStack-DZZg55w0.js +31 -0
  124. package/dist/environment-Dva-SG8D.js +6 -0
  125. package/dist/{error-Bb_dr_Ay.js → error-CD7x0Jrz.js} +2 -2
  126. package/dist/feature-DdUAfyi4.js +25 -0
  127. package/dist/fieldMessages-C3Rpbktw.js +25 -0
  128. package/dist/form/CheckboxField.vue.d.ts +1 -1
  129. package/dist/form/CommandDialog.vue.d.ts +13 -2
  130. package/dist/form/DateField.vue.d.ts +1 -1
  131. package/dist/form/DateTimeField.vue.d.ts +1 -1
  132. package/dist/form/EditorPage.vue.d.ts +1 -1
  133. package/dist/form/Field.vue.d.ts +1 -1
  134. package/dist/form/FileField.vue.d.ts +1 -1
  135. package/dist/form/FormGroup.vue.d.ts +1 -1
  136. package/dist/form/FormGroupButton.vue.d.ts +1 -1
  137. package/dist/form/FormRow.vue.d.ts +1 -1
  138. package/dist/form/I18nField.vue.d.ts +3 -3
  139. package/dist/form/MoneyField.vue.d.ts +1 -1
  140. package/dist/form/MonthYearField.vue.d.ts +1 -1
  141. package/dist/form/MultiSelectField.vue.d.ts +4 -1
  142. package/dist/form/NumberCell.vue.d.ts +1 -1
  143. package/dist/form/NumberField.vue.d.ts +8 -2
  144. package/dist/form/OptionList.vue.d.ts +6 -2
  145. package/dist/form/OtpInput.vue.d.ts +2 -2
  146. package/dist/form/PhotoField.vue.d.ts +1 -1
  147. package/dist/form/SelectField.vue.d.ts +4 -1
  148. package/dist/form/SwitchField.vue.d.ts +1 -1
  149. package/dist/form/TextField.vue.d.ts +3 -3
  150. package/dist/form/TextareaField.vue.d.ts +3 -3
  151. package/dist/form/TimeField.vue.d.ts +1 -1
  152. package/dist/form/date/DatePickerSheet.vue.d.ts +1 -1
  153. package/dist/form/date/MonthYearPanel.vue.d.ts +1 -1
  154. package/dist/form/index.d.ts +2 -0
  155. package/dist/form/index.js +1273 -3509
  156. package/dist/form/suggestions.d.ts +11 -0
  157. package/dist/form/useOptions.d.ts +60 -0
  158. package/dist/guards-Cd1V28oG.js +51 -0
  159. package/dist/http-DGGSKWvU.js +193 -0
  160. package/dist/i18n/describeError.d.ts +31 -0
  161. package/dist/i18n/index.d.ts +307 -0
  162. package/dist/i18n/index.js +54 -52
  163. package/dist/icon/core.d.ts +13 -0
  164. package/dist/icon/index.js +1 -1
  165. package/dist/identity/ImpersonationBanner.vue.d.ts +2 -0
  166. package/dist/identity/LocaleSync.vue.d.ts +2 -0
  167. package/dist/identity/SessionExpiry.vue.d.ts +2 -0
  168. package/dist/identity/SignInAsButton.vue.d.ts +15 -0
  169. package/dist/identity/SignInPage.vue.d.ts +2 -0
  170. package/dist/identity/context.d.ts +7 -0
  171. package/dist/identity/feature.d.ts +16 -0
  172. package/dist/identity/fieldMessages.d.ts +15 -0
  173. package/dist/identity/index.d.ts +16 -0
  174. package/dist/identity/index.js +18 -0
  175. package/dist/identity/profile/DetailsPanel.vue.d.ts +11 -0
  176. package/dist/identity/profile/EmailChangeDialog.vue.d.ts +14 -0
  177. package/dist/identity/profile/EmailPanel.vue.d.ts +11 -0
  178. package/dist/identity/profile/PanelActions.vue.d.ts +17 -0
  179. package/dist/identity/profile/PasswordPanel.vue.d.ts +2 -0
  180. package/dist/identity/profile/ProfileMenuItem.vue.d.ts +2 -0
  181. package/dist/identity/profile/ProfilePage.vue.d.ts +2 -0
  182. package/dist/identity/profile/SessionsPanel.vue.d.ts +2 -0
  183. package/dist/identity/profile/SignInsPanel.vue.d.ts +2 -0
  184. package/dist/identity/profile/VerifyCode.vue.d.ts +49 -0
  185. package/dist/identity/profile/routes.d.ts +13 -0
  186. package/dist/identity/session.d.ts +30 -0
  187. package/dist/identity/shared/ActionRow.vue.d.ts +20 -0
  188. package/dist/identity/shared/ChangeFeed.vue.d.ts +11 -0
  189. package/dist/identity/shared/PageBar.vue.d.ts +12 -0
  190. package/dist/identity/shared/SectionIntro.vue.d.ts +16 -0
  191. package/dist/identity/shared/SessionList.vue.d.ts +19 -0
  192. package/dist/{phone/CountryFlag.vue.d.ts → identity/shared/SignInTable.vue.d.ts} +5 -4
  193. package/dist/identity/shared/ViewTabs.vue.d.ts +23 -0
  194. package/dist/identity/shared/signInEvents.d.ts +9 -0
  195. package/dist/identity/signIn.d.ts +27 -0
  196. package/dist/identity/useSignInForm.d.ts +20 -0
  197. package/dist/identity/user.d.ts +6 -0
  198. package/dist/identity/users/DeactivateDialog.vue.d.ts +18 -0
  199. package/dist/identity/users/NewUserDialog.vue.d.ts +9 -0
  200. package/dist/identity/users/SetPasswordDialog.vue.d.ts +16 -0
  201. package/dist/identity/users/UserRecord.vue.d.ts +2 -0
  202. package/dist/identity/users/UsersList.vue.d.ts +2 -0
  203. package/dist/identity/users/access.d.ts +4 -0
  204. package/dist/identity/users/context.d.ts +9 -0
  205. package/dist/identity/users/feature.d.ts +34 -0
  206. package/dist/identity/users/languages.d.ts +4 -0
  207. package/dist/identity/users/list.d.ts +8 -0
  208. package/dist/identity/users/person.d.ts +26 -0
  209. package/dist/identity/users/personSections.d.ts +22 -0
  210. package/dist/identity/users/routes.d.ts +22 -0
  211. package/dist/identity/users/sections/Activity.vue.d.ts +2 -0
  212. package/dist/identity/users/sections/Changes.vue.d.ts +2 -0
  213. package/dist/identity/users/sections/General.vue.d.ts +2 -0
  214. package/dist/identity/users/sections/Sessions.vue.d.ts +2 -0
  215. package/dist/identity/users/sections/SignIn.vue.d.ts +2 -0
  216. package/dist/identity/users/sections/SignIns.vue.d.ts +2 -0
  217. package/dist/identity/users/status.d.ts +4 -0
  218. package/dist/index-B2dbYZR9.js +706 -0
  219. package/dist/index-BAcl44SC.js +459 -0
  220. package/dist/index.d.ts +1 -1
  221. package/dist/index.js +1 -1
  222. package/dist/internal/CountryFlag.vue.d.ts +10 -0
  223. package/dist/internal/languageName.d.ts +2 -0
  224. package/dist/keepAlive-WYQGRhuz.js +48 -0
  225. package/dist/languageName-CItV_SOv.js +11 -0
  226. package/dist/languages-BShG9LpE.js +10 -0
  227. package/dist/leaveGuard-Cc8yeLxM.js +72 -0
  228. package/dist/modal/Modal.vue.d.ts +4 -0
  229. package/dist/modal/ShortcutHelp.vue.d.ts +2 -0
  230. package/dist/modal/index.d.ts +2 -0
  231. package/dist/modal/index.js +64 -6
  232. package/dist/modal/placement.d.ts +22 -0
  233. package/dist/modules/access/entities.d.ts +112 -0
  234. package/dist/modules/access/routes.d.ts +67 -0
  235. package/dist/modules/access/schemas.d.ts +73 -0
  236. package/dist/modules/identity/entities.d.ts +150 -0
  237. package/dist/modules/identity/routes.d.ts +118 -0
  238. package/dist/modules/identity/schemas.d.ts +145 -0
  239. package/dist/{navigation-B33ikiCS.js → navigation-BPWa63ge.js} +21 -20
  240. package/dist/neighbors-D0WRBxXI.js +86 -0
  241. package/dist/{options-CjSz2dQK.js → options-BXkMR63B.js} +48 -49
  242. package/dist/overlay/AlertDialog.vue.d.ts +3 -3
  243. package/dist/overlay/Popover.vue.d.ts +4 -1
  244. package/dist/overlay/closeOverlays.d.ts +7 -0
  245. package/dist/overlay/dialogStack.d.ts +9 -0
  246. package/dist/overlay/index.d.ts +1 -1
  247. package/dist/overlay/index.js +20 -18
  248. package/dist/page/AdaptivePageShell.vue.d.ts +2 -2
  249. package/dist/page/ResourceHeader.vue.d.ts +2 -2
  250. package/dist/page/index.js +99 -457
  251. package/dist/phone/PhoneField.vue.d.ts +2 -2
  252. package/dist/phone/index.js +247 -540
  253. package/dist/platform/AccessGate.vue.d.ts +50 -0
  254. package/dist/platform/index.d.ts +4 -2
  255. package/dist/platform/index.js +38 -35
  256. package/dist/platform/platform.d.ts +2 -2
  257. package/dist/platform/session.d.ts +22 -1
  258. package/dist/platform-hunMqFdB.js +255 -0
  259. package/dist/resource/index.js +8 -248
  260. package/dist/routeResource-DstM0hvf.js +82 -0
  261. package/dist/router/guards.d.ts +7 -1
  262. package/dist/router/index.js +23 -37
  263. package/dist/router/navigation.d.ts +1 -1
  264. package/dist/rowLayout-BI7a3Kom.js +603 -0
  265. package/dist/sectionIndex-BS0ic5W7.js +86 -0
  266. package/dist/{sections-LtxV5Mtk.js → sections-BEqW1dOc.js} +1 -1
  267. package/dist/shell/AccountMenuItem.vue.d.ts +4 -1
  268. package/dist/shell/BackofficeShell.vue.d.ts +2 -2
  269. package/dist/shell/ShellBrand.vue.d.ts +1 -1
  270. package/dist/shell/backofficeShell.d.ts +1 -1
  271. package/dist/shell/identity.d.ts +1 -1
  272. package/dist/shell/index.js +476 -532
  273. package/dist/state/Badge.vue.d.ts +17 -10
  274. package/dist/state/ProgressTrack.vue.d.ts +1 -1
  275. package/dist/state/hue.d.ts +8 -0
  276. package/dist/state/index.d.ts +2 -0
  277. package/dist/state/index.js +34 -31
  278. package/dist/state/useLoad.d.ts +41 -0
  279. package/dist/status-C9aXR-Jb.js +33 -0
  280. package/dist/styles.css +1 -1
  281. package/dist/suggestions-BJAqOj4c.js +138 -0
  282. package/dist/testing/app.d.ts +61 -0
  283. package/dist/testing/async.d.ts +12 -0
  284. package/dist/testing/collection.d.ts +18 -0
  285. package/dist/testing/format.d.ts +9 -0
  286. package/dist/testing/i18n.d.ts +16 -0
  287. package/dist/testing/index.d.ts +14 -0
  288. package/dist/testing/index.js +178 -0
  289. package/dist/testing/media.d.ts +23 -0
  290. package/dist/testing/platform.d.ts +40 -0
  291. package/dist/testing/transport.d.ts +40 -0
  292. package/dist/toast-D9Z5To38.js +13 -0
  293. package/dist/useCommand-BgRwnYlV.js +135 -0
  294. package/dist/{useDialog-wmyNx2j_.js → useDialog-CXR3hN0G.js} +1 -1
  295. package/dist/useLoad-CYRVx6HW.js +39 -0
  296. package/dist/useResourceForm-Bgc9jMcu.js +52 -0
  297. package/dist/useSaveChrome-chi6D3HY.js +25 -0
  298. package/dist/useSheetDrag-OsD6Eb6I.js +72 -0
  299. package/package.json +26 -5
  300. package/src/styles/theme.css +60 -0
  301. package/dist/Badge.vue_vue_type_script_setup_true_lang-DKc6ugmr.js +0 -31
  302. package/dist/Button.vue_vue_type_script_setup_true_lang-3f0emVNU.js +0 -141
  303. package/dist/NoAccess.vue_vue_type_script_setup_true_lang-OKW8pKYU.js +0 -78
  304. package/dist/SectionList.vue_vue_type_script_setup_true_lang-DGcKX_OJ.js +0 -230
  305. package/dist/SelectField.vue_vue_type_script_setup_true_lang-SyFWE33A.js +0 -422
  306. package/dist/Sheet.vue_vue_type_script_setup_true_lang-BLBD5ps8.js +0 -210
  307. package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-CGTuEnTv.js +0 -243
  308. package/dist/chrome-D9pwD6iS.js +0 -101
  309. package/dist/dialogStack-DiTG1rZc.js +0 -26
  310. package/dist/environment-D3nozt9a.js +0 -75
  311. package/dist/feature-DyDtyMLU.js +0 -47
  312. package/dist/platform-jqlKVJ2e.js +0 -244
  313. package/dist/toast-BTeX0r66.js +0 -129
  314. /package/dist/{phone → internal}/flagLoaders.d.ts +0 -0
@@ -0,0 +1,1481 @@
1
+ import { hasInjectionContext as Je, inject as Ge, shallowRef as he, computed as _, watch as Ce, toValue as xe, ref as le, getCurrentScope as Ye, onScopeDispose as Ze, defineComponent as ce, openBlock as f, createElementBlock as y, createVNode as S, unref as l, createElementVNode as r, toDisplayString as g, Fragment as J, renderList as Y, createCommentVNode as T, createBlock as W, mergeProps as ie, withCtx as F, createTextVNode as G, normalizeClass as oe, useTemplateRef as re, withModifiers as Ue, withDirectives as Se, vModelText as ze, nextTick as et, onBeforeUnmount as tt, onMounted as lt, renderSlot as ue, useSlots as $e, createSlots as Me, normalizeProps as Be, guardReactiveProps as Ie } from "vue";
2
+ import { routerKey as ot } from "vue-router";
3
+ import { i as je, a as nt } from "./error-CD7x0Jrz.js";
4
+ import { d as Ve, o as st, L as Pe, e as we, w as at, b as rt } from "./http-DGGSKWvU.js";
5
+ import { a as it } from "./AdaptivePageShell.vue_vue_type_script_setup_true_lang-CvAnzdc1.js";
6
+ import { useI18n as de } from "vue-i18n";
7
+ import { _ as se, u as Le } from "./Button.vue_vue_type_script_setup_true_lang-CYil8h9z.js";
8
+ import { _ as He } from "./Tabs.vue_vue_type_script_setup_true_lang-BeGaydRr.js";
9
+ import { u as Oe } from "./format-B8mJm946.js";
10
+ import { _ as U } from "./Icon.vue_vue_type_script_lang-VvcV2Bzo.js";
11
+ import { _ as Fe } from "./Banner.vue_vue_type_script_setup_true_lang-Cib_YYpr.js";
12
+ import { _ as ct } from "./EmptyState.vue_vue_type_script_setup_true_lang-C2ZYIT9F.js";
13
+ import { u as ut, _ as dt } from "./rowLayout-BI7a3Kom.js";
14
+ import { _ as De } from "./Menu.vue_vue_type_script_setup_true_lang-BNAjx9tj.js";
15
+ import { _ as Ke } from "./Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js";
16
+ import { _ as ft } from "./NumberField.vue_vue_type_script_setup_true_lang-CYRg7Kfg.js";
17
+ import { _ as pt } from "./SelectField.vue_vue_type_script_setup_true_lang-BiGaEKBQ.js";
18
+ import { a as vt } from "./mediaQuery-CygcXmFW.js";
19
+ import { _ as mt } from "./Sheet.vue_vue_type_script_setup_true_lang-bHYzx7-J.js";
20
+ import { t as ye } from "./toast-D9Z5To38.js";
21
+ const ne = (a) => a == null || a === "";
22
+ function We(a) {
23
+ if (!a) return [null, null];
24
+ const [o = "", s = ""] = String(a).split(",");
25
+ return [o.trim() || null, s.trim() || null];
26
+ }
27
+ function bt(a, o) {
28
+ const s = ne(a) ? "" : String(a), p = ne(o) ? "" : String(o);
29
+ return s === "" && p === "" ? null : `${s},${p}`;
30
+ }
31
+ function gt(a, o) {
32
+ const s = ne(o) ? null : new Set(String(o).split(",")), p = (a.options ?? []).filter(
33
+ (i) => !a.dependsOn || !s || i.parentValue !== void 0 && s.has(String(i.parentValue))
34
+ ), n = /* @__PURE__ */ new Map();
35
+ for (const i of p) {
36
+ const u = n.get(i.label) ?? [], d = String(i.value);
37
+ u.includes(d) || u.push(d), n.set(i.label, u);
38
+ }
39
+ return [...n.entries()].map(([i, u]) => ({ label: i, value: u.join(",") }));
40
+ }
41
+ function ht(a, o, s) {
42
+ if (ne(o)) return null;
43
+ if (a.type === "range") {
44
+ const [n, i] = We(String(o)), u = a.unit ? ` ${a.unit}` : "", d = (h) => `${a.unit ? s.formatNumber(Number(h)) : h}${u}`;
45
+ return n !== null && i !== null ? `${d(n)} – ${d(i)}` : n !== null ? `${s.from.toLowerCase()} ${d(n)}` : i !== null ? `${s.until.toLowerCase()} ${d(i)}` : null;
46
+ }
47
+ const p = new Set(String(o).split(","));
48
+ return (a.options ?? []).find((n) => p.has(String(n.value)))?.label ?? String(o);
49
+ }
50
+ function Qe(a, o, s) {
51
+ const p = new Set(a.map((u) => u.key)), n = (u) => a.find((d) => d.dependsOn === u), i = [];
52
+ for (const u of a.filter((d) => !d.dependsOn || !p.has(d.dependsOn))) {
53
+ const d = [];
54
+ for (let v = u; v && !d.includes(v); v = n(v.key)) d.push(v);
55
+ const h = d.map((v) => ({ filter: v, value: ht(v, o[v.key], s) })).filter((v) => v.value !== null);
56
+ h.length !== 0 && i.push({
57
+ key: u.key,
58
+ label: h.length === 1 ? h[0].filter.label : null,
59
+ values: h.map((v) => v.value),
60
+ clears: d.map((v) => v.key)
61
+ });
62
+ }
63
+ return i;
64
+ }
65
+ function yt(a, o) {
66
+ return a.filter((s) => !ne(o[s.key])).length;
67
+ }
68
+ const qe = /* @__PURE__ */ new WeakMap();
69
+ function _t(a, o, s, p) {
70
+ let n = qe.get(a);
71
+ n || qe.set(a, n = /* @__PURE__ */ new Map());
72
+ const i = `${s}\0${p}`, u = n.get(i);
73
+ if (u && u.id !== o)
74
+ throw new Error(
75
+ `useCollection("${o}"): the URL state key "${p}" is already used by the list "${u.id}" on this page. Two lists on one page each need their own \`state: { kind: "url", key }\`, or they overwrite each other's state.`
76
+ );
77
+ const d = u ?? { id: o, count: 0 };
78
+ return d.count++, n.set(i, d), () => {
79
+ --d.count <= 0 && n.delete(i);
80
+ };
81
+ }
82
+ const ke = (a) => a.status === "loaded" || a.status === "refreshing" || a.status === "stale", Re = (a) => a instanceof Error && a.message !== "" ? a.message : String(a);
83
+ function Vo(a, o) {
84
+ const s = `useCollection("${a.id}")`, p = o.state;
85
+ let n = null, i = "", u = "", d = () => {
86
+ };
87
+ if (p.kind === "url") {
88
+ if (n = Je() ? Ge(ot, null) : null, !n) throw new Error(`${s}: a URL state needs the application's router. Call it while a component is being set up, with the router installed, or use \`state: { kind: "memory" }\`.`);
89
+ if (!p.key) throw new Error(`${s}: \`state.key\` must not be empty.`);
90
+ u = p.key, i = n.currentRoute.value.path, d = _t(n, a.id, i, u);
91
+ }
92
+ const h = (() => {
93
+ if (!n) return a.defaults;
94
+ const e = n.currentRoute.value.query[u];
95
+ return Ve(a, Array.isArray(e) ? e[0] : e) ?? a.defaults;
96
+ })(), v = he(h), V = he({ status: "loading" }), O = he(null), D = he(null), x = _(() => ke(V.value) ? V.value.value : D.value);
97
+ let j = !1, k = null, M = 0, B = !1;
98
+ const N = [];
99
+ n && o.linked && Q(n.currentRoute.value.query, o.linked);
100
+ function Q(e, t) {
101
+ let $ = v.value;
102
+ const L = (H) => {
103
+ const q = e[H], ee = Array.isArray(q) ? q[0] : q;
104
+ return typeof ee == "string" && ee !== "" ? ee : null;
105
+ };
106
+ if (t.view) {
107
+ const H = L(t.view), q = H !== null && (a.contract.views ? a.contract.views.includes(H) : !0);
108
+ H !== null && q && ($ = { ...$, view: H, page: 1 }, N.push(t.view));
109
+ }
110
+ for (const [H, q] of Object.entries(t.params ?? {})) {
111
+ const ee = L(H);
112
+ if (ee === null) continue;
113
+ const R = typeof q == "string" ? q : q.filter, E = typeof q == "string" ? ee : q.value(ee), X = { ...$.filters };
114
+ E === null || E === "any" || E === "" ? delete X[R] : X[R] = String(E), $ = { ...$, filters: X, page: 1 }, N.push(H);
115
+ }
116
+ if (N.length > 0) {
117
+ for (const H of t.consume ?? []) H in e && N.push(H);
118
+ v.value = $;
119
+ }
120
+ }
121
+ async function I(e) {
122
+ if (j) return;
123
+ k?.abort();
124
+ const t = ++M, $ = k = new AbortController(), L = V.value, H = v.value;
125
+ V.value = e && ke(L) ? { status: "refreshing", value: L.value } : { status: "loading" };
126
+ try {
127
+ const q = await a.load(H, { signal: $.signal });
128
+ if (t !== M) return;
129
+ if (q.lastPage >= 1 && H.page > q.lastPage) {
130
+ v.value = { ...H, page: q.lastPage }, P(), I(!1);
131
+ return;
132
+ }
133
+ O.value = null, D.value = q, V.value = { status: "loaded", value: q };
134
+ } catch (q) {
135
+ if (t !== M || $.signal.aborted || je(q)) return;
136
+ O.value = q, V.value = e && ke(L) ? { status: "stale", value: L.value, error: Re(q) } : { status: "failed", error: Re(q) };
137
+ }
138
+ }
139
+ function K() {
140
+ P(), !(B || j) && (B = !0, queueMicrotask(() => {
141
+ B && (B = !1, I(!1));
142
+ }));
143
+ }
144
+ function te() {
145
+ return B = !1, I(!0);
146
+ }
147
+ let Z = !1, w = !1, A = !1;
148
+ function P() {
149
+ !n || Z || j || (Z = !0, queueMicrotask(() => {
150
+ Z = !1, b();
151
+ }));
152
+ }
153
+ async function b() {
154
+ if (n) {
155
+ if (w) {
156
+ A = !0;
157
+ return;
158
+ }
159
+ w = !0;
160
+ try {
161
+ do {
162
+ A = !1;
163
+ const e = n.currentRoute.value;
164
+ if (j || e.path !== i) return;
165
+ const t = we(a, v.value), $ = { ...e.query };
166
+ for (const L of N.splice(0)) delete $[L];
167
+ e.query[u] === t && Object.keys($).length === Object.keys(e.query).length || await n.replace({ query: { ...$, [u]: t }, hash: e.hash });
168
+ } while (A);
169
+ } catch {
170
+ } finally {
171
+ w = !1;
172
+ }
173
+ }
174
+ }
175
+ const C = n ? Ce(
176
+ () => n.currentRoute.value.query[u],
177
+ (e) => {
178
+ const t = n.currentRoute.value;
179
+ if (j || w || t.path !== i) return;
180
+ const $ = Array.isArray(e) ? e[0] : e, L = Ve(a, $) ?? a.defaults;
181
+ JSON.stringify(L) !== JSON.stringify(v.value) ? (v.value = L, K()) : P();
182
+ }
183
+ ) : () => {
184
+ }, z = (e, t = !1) => {
185
+ v.value = { ...v.value, ...e, ...t ? { page: 1 } : {} }, K();
186
+ }, ae = (e) => {
187
+ const t = { ...v.value.filters };
188
+ for (const [$, L] of Object.entries(e))
189
+ L == null || ne(L) ? delete t[$] : t[$] = String(L);
190
+ return t;
191
+ }, fe = _(() => v.value.search !== "" || Object.values(v.value.filters).some((e) => !ne(e))), pe = _(() => x.value?.rows ?? []), ve = _(() => {
192
+ const e = V.value;
193
+ return e.status === "loading" ? "loading" : e.status === "failed" ? "failed" : e.value.rows.length > 0 ? "rows" : fe.value ? "no-matches" : "empty";
194
+ }), me = _(() => {
195
+ const e = new Map((x.value?.views ?? []).map((t) => [t.key, t.count]));
196
+ return (xe(o.views) ?? []).map((t) => e.has(t.key) ? { ...t, count: e.get(t.key) } : t);
197
+ });
198
+ let be = () => {
199
+ };
200
+ const _e = o.savedViews ? c(o.savedViews) : null;
201
+ function ge(e) {
202
+ const t = { v: e.state.version, f: e.state.filters, s: e.state.search, w: e.state.view ?? void 0 };
203
+ return rt(a, t);
204
+ }
205
+ function c(e) {
206
+ const t = le([]), $ = le("idle");
207
+ let L = null;
208
+ const H = (R, E) => R.name.localeCompare(E.name), q = _(() => t.value.filter((R) => ge(R) !== null));
209
+ be = () => {
210
+ L?.abort(), t.value = [], $.value = "idle";
211
+ };
212
+ const ee = () => ({
213
+ version: a.stateVersion,
214
+ filters: Object.fromEntries(Object.entries(v.value.filters).filter(([R, E]) => E !== void 0 && !a.contract.sensitive.includes(R))),
215
+ search: v.value.search,
216
+ view: v.value.view
217
+ });
218
+ return {
219
+ items: q,
220
+ status: $,
221
+ async load() {
222
+ L?.abort();
223
+ const R = L = new AbortController();
224
+ $.value = "loading";
225
+ try {
226
+ const E = await e.list(a.id, { signal: R.signal });
227
+ if (R.signal.aborted) return;
228
+ t.value = [...E].sort(H), $.value = "ready";
229
+ } catch (E) {
230
+ if (R.signal.aborted || je(E)) return;
231
+ $.value = "failed";
232
+ }
233
+ },
234
+ current: ee,
235
+ async save(R, E) {
236
+ const X = await e.save(a.id, R, { ...ee(), ...E });
237
+ return t.value = [...t.value.filter((Xe) => Xe.id !== X.id), X].sort(H), X;
238
+ },
239
+ apply(R) {
240
+ const E = ge(R);
241
+ E && z({ filters: E.filters, search: E.search, view: R.state.view ? E.view : v.value.view }, !0);
242
+ },
243
+ stageRemoval(R) {
244
+ const E = t.value.find((X) => X.id === R) ?? null;
245
+ return t.value = t.value.filter((X) => X.id !== R), {
246
+ revert() {
247
+ E && !t.value.some((X) => X.id === R) && (t.value = [...t.value, E].sort(H));
248
+ },
249
+ // Saved again under the same name while the toast was up: the server replaced that very row, it must not be deleted now.
250
+ async commit() {
251
+ t.value.some((X) => X.id === R) || await e.remove(a.id, R);
252
+ }
253
+ };
254
+ }
255
+ };
256
+ }
257
+ function m() {
258
+ j || (j = !0, k?.abort(), M++, C(), d());
259
+ }
260
+ return Ye() && Ze(m), st((e) => {
261
+ k?.abort(), M++, V.value = { status: "loading" }, D.value = null, O.value = null, be(), e !== null && K();
262
+ }), K(), {
263
+ id: a.id,
264
+ pageSizes: a.contract.pageSizes,
265
+ rowKey: (e) => a.key(e),
266
+ state: V,
267
+ query: v,
268
+ page: x,
269
+ rows: pe,
270
+ total: _(() => x.value?.total ?? 0),
271
+ display: ve,
272
+ isFiltered: fe,
273
+ error: O,
274
+ columns: _(() => {
275
+ const e = xe(o.columns) ?? [], t = a.contract.sorts;
276
+ if (t) {
277
+ for (const $ of e) if ($.sort !== void 0 && !t.includes($.sort)) throw new Error(`${s}: column "${$.key}" sorts by "${$.sort}", which is not in the query contract's sorts (${t.join(", ")}).`);
278
+ }
279
+ return e;
280
+ }),
281
+ filters: _(() => xe(o.filters) ?? []),
282
+ views: me,
283
+ savedViews: _e,
284
+ refresh: te,
285
+ goToPage: (e) => {
286
+ Number.isInteger(e) && e >= 1 && e !== v.value.page && z({ page: e });
287
+ },
288
+ nextPage: () => {
289
+ const e = x.value?.lastPage ?? 0;
290
+ v.value.page < e && z({ page: v.value.page + 1 });
291
+ },
292
+ previousPage: () => {
293
+ v.value.page > 1 && z({ page: v.value.page - 1 });
294
+ },
295
+ setPageSize: (e) => {
296
+ a.contract.pageSizes.includes(e) && e !== v.value.pageSize && z({ pageSize: e }, !0);
297
+ },
298
+ sortBy: (e, t = "asc") => {
299
+ if (a.contract.sorts && !a.contract.sorts.includes(e)) throw new Error(`${s}: "${e}" is not in the query contract's sorts.`);
300
+ z({ sort: e, direction: t });
301
+ },
302
+ toggleSort: (e) => {
303
+ const t = v.value;
304
+ z({ sort: e, direction: t.sort === e && t.direction === "asc" ? "desc" : "asc" });
305
+ },
306
+ search: (e) => z({ search: e }, !0),
307
+ setFilter: (e, t) => z({ filters: ae({ [e]: t }) }, !0),
308
+ setFilters: (e) => z({ filters: ae(e) }, !0),
309
+ clearFilters: () => z({ filters: {}, search: "" }, !0),
310
+ setView: (e) => z({ view: e }, !0),
311
+ reset: () => {
312
+ v.value = a.defaults, K();
313
+ },
314
+ recordLocation: (e) => {
315
+ const t = o.recordRoute?.(e);
316
+ return t ? n ? at(t, { [Pe]: we(a, v.value) }) : t : null;
317
+ },
318
+ linkContext: () => n ? { [Pe]: we(a, v.value) } : {}
319
+ };
320
+ }
321
+ const xt = {
322
+ class: "mx-auto max-w-xl py-8 text-center",
323
+ "data-test": "collection-empty-filtered"
324
+ }, wt = { class: "mt-3 mb-1 text-headline font-semibold text-content-strong" }, kt = { class: "text-sm text-content-muted" }, $t = { class: "mt-4 flex flex-wrap justify-center gap-2" }, Ct = {
325
+ key: 0,
326
+ class: "shrink-0 text-content-muted"
327
+ }, St = ["title"], zt = ["aria-label", "onClick"], Ot = { class: "mt-5 flex flex-wrap justify-center gap-2" }, jt = /* @__PURE__ */ ce({
328
+ __name: "CollectionEmptyResult",
329
+ props: {
330
+ chips: {},
331
+ lastChip: {}
332
+ },
333
+ emits: ["remove", "clearAll"],
334
+ setup(a, { emit: o }) {
335
+ const s = a, p = o, { t: n } = de();
336
+ return (i, u) => (f(), y("div", xt, [
337
+ S(l(U), {
338
+ name: "filter3",
339
+ size: 32,
340
+ class: "mx-auto text-content-disabled"
341
+ }),
342
+ r("h3", wt, g(l(n)("core.collection.empty.title")), 1),
343
+ r("p", kt, g(l(n)("core.collection.empty.description")), 1),
344
+ r("ul", $t, [
345
+ (f(!0), y(J, null, Y(s.chips, (d) => (f(), y("li", {
346
+ key: d.key,
347
+ class: "inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-control bg-surface-cell pr-0.5 pl-2.5 text-sm shadow-group ring-1 ring-inset ring-border-separator"
348
+ }, [
349
+ d.label ? (f(), y("span", Ct, g(d.label), 1)) : T("", !0),
350
+ r("span", {
351
+ class: "min-w-0 truncate font-medium text-content-strong",
352
+ title: d.values.join(" › ")
353
+ }, g(d.values.join(" › ")), 9, St),
354
+ r("button", {
355
+ type: "button",
356
+ class: "shrink-0 cursor-pointer rounded p-1 text-content-disabled hover:bg-fill hover:text-content-strong",
357
+ "aria-label": `${l(n)("core.collection.clear")}: ${d.label ?? d.values.join(" › ")}`,
358
+ onClick: (h) => p("remove", d)
359
+ }, [
360
+ S(l(U), {
361
+ name: "close",
362
+ size: 12
363
+ })
364
+ ], 8, zt)
365
+ ]))), 128))
366
+ ]),
367
+ r("div", Ot, [
368
+ s.lastChip ? (f(), W(se, ie({ key: 0 }, { "data-test": "collection-empty-remove-last" }, {
369
+ prominence: "secondary",
370
+ size: "sm",
371
+ onClick: u[0] || (u[0] = (d) => p("remove", s.lastChip))
372
+ }), {
373
+ default: F(() => [
374
+ G(g(l(n)("core.collection.empty.remove_last", { filter: s.lastChip.values.join(" › ") })), 1)
375
+ ]),
376
+ _: 1
377
+ }, 16)) : T("", !0),
378
+ S(se, ie({ "data-test": "collection-empty-clear-all" }, {
379
+ size: "sm",
380
+ onClick: u[1] || (u[1] = (d) => p("clearAll"))
381
+ }), {
382
+ default: F(() => [
383
+ G(g(l(n)("core.collection.empty.clear_all")), 1)
384
+ ]),
385
+ _: 1
386
+ }, 16)
387
+ ])
388
+ ]));
389
+ }
390
+ }), Vt = ["aria-label"], Pt = ["disabled"], Lt = { class: "sr-only" }, Ft = {
391
+ class: "text-subheadline tabular-nums text-content-muted",
392
+ "aria-live": "polite"
393
+ }, qt = ["disabled"], Rt = { class: "sr-only" }, Tt = {
394
+ key: 1,
395
+ class: "flex select-none flex-col items-center justify-between gap-3 border-t border-border-separator px-4 py-2.5 md:flex-row"
396
+ }, Nt = { class: "flex flex-col items-center gap-x-4 text-footnote tabular-nums text-content-muted md:flex-row" }, At = {
397
+ key: 0,
398
+ "aria-live": "polite"
399
+ }, Et = { class: "flex items-center" }, Ut = { class: "mr-2" }, Mt = ["value"], Bt = ["value"], It = ["aria-label"], Ht = ["disabled"], Dt = { class: "sr-only" }, Kt = {
400
+ key: 0,
401
+ class: "px-1.5 text-content-disabled"
402
+ }, Wt = ["aria-current", "onClick"], Qt = ["disabled"], Xt = { class: "sr-only" }, Jt = /* @__PURE__ */ ce({
403
+ __name: "CollectionPager",
404
+ props: {
405
+ collection: {},
406
+ compact: { type: Boolean },
407
+ flat: { type: Boolean }
408
+ },
409
+ emits: ["turned"],
410
+ setup(a, { emit: o }) {
411
+ const s = a, p = o, { t: n } = de(), i = Oe(), u = _(() => s.collection.query.value.page), d = _(() => s.collection.page.value?.lastPage ?? 0), h = _(() => s.collection.page.value), v = _(() => {
412
+ if (d.value <= 1) return d.value === 1 ? [1] : [];
413
+ const x = [1], j = Math.max(2, u.value - 2), k = Math.min(d.value - 1, u.value + 2);
414
+ j > 2 && x.push(null);
415
+ for (let M = j; M <= k; M++) x.push(M);
416
+ return k < d.value - 1 && x.push(null), x.push(d.value), x;
417
+ });
418
+ function V(x) {
419
+ x === 1 ? s.collection.nextPage() : s.collection.previousPage(), p("turned");
420
+ }
421
+ const O = (x) => [
422
+ "hit-target inline-flex h-7 min-w-7 cursor-pointer items-center justify-center rounded-button px-2 transition-colors duration-motion-fast disabled:cursor-not-allowed disabled:opacity-40",
423
+ x ? "bg-tint font-semibold text-content-on-tint" : "text-content-strong hover:bg-fill disabled:hover:bg-transparent"
424
+ ].join(" ");
425
+ function D(x) {
426
+ s.collection.setPageSize(Number(x.target.value));
427
+ }
428
+ return (x, j) => s.compact && d.value > 1 ? (f(), y("nav", {
429
+ key: 0,
430
+ "aria-label": l(n)("core.collection.page.label"),
431
+ class: oe(["flex select-none items-center justify-between gap-3 px-1 py-2", s.flat ? "mt-1" : "border-t border-border-separator"]),
432
+ "data-test": "collection-pager-compact"
433
+ }, [
434
+ r("button", {
435
+ type: "button",
436
+ class: "inline-flex size-11 cursor-pointer items-center justify-center rounded-full text-content-link active:bg-fill disabled:cursor-not-allowed disabled:text-content-disabled",
437
+ disabled: u.value <= 1,
438
+ onClick: j[0] || (j[0] = (k) => V(-1))
439
+ }, [
440
+ S(l(U), {
441
+ name: "arrowLeftSLine",
442
+ size: 20
443
+ }),
444
+ r("span", Lt, g(l(n)("core.collection.page.previous")), 1)
445
+ ], 8, Pt),
446
+ r("span", Ft, g(l(n)("core.collection.page.page_of", { current: l(i).number(u.value), total: l(i).number(d.value) })), 1),
447
+ r("button", {
448
+ type: "button",
449
+ class: "inline-flex size-11 cursor-pointer items-center justify-center rounded-full text-content-link active:bg-fill disabled:cursor-not-allowed disabled:text-content-disabled",
450
+ disabled: u.value >= d.value,
451
+ onClick: j[1] || (j[1] = (k) => V(1))
452
+ }, [
453
+ S(l(U), {
454
+ name: "arrowRightSLine",
455
+ size: 20
456
+ }),
457
+ r("span", Rt, g(l(n)("core.collection.page.next")), 1)
458
+ ], 8, qt)
459
+ ], 10, Vt)) : s.compact ? T("", !0) : (f(), y("div", Tt, [
460
+ r("div", Nt, [
461
+ h.value ? (f(), y("span", At, g(l(n)("core.collection.page.total", { from: l(i).number(h.value.from), to: l(i).number(h.value.to), total: l(i).number(h.value.total) })), 1)) : T("", !0),
462
+ r("label", Et, [
463
+ r("span", Ut, g(l(n)("core.collection.page.per_page")) + ":", 1),
464
+ r("select", {
465
+ value: s.collection.query.value.pageSize,
466
+ class: "cursor-pointer rounded-control bg-transparent py-0.5 pr-1 font-semibold text-content-strong hover:bg-fill",
467
+ onChange: D
468
+ }, [
469
+ (f(!0), y(J, null, Y(s.collection.pageSizes, (k) => (f(), y("option", {
470
+ key: k,
471
+ value: k
472
+ }, g(k), 9, Bt))), 128))
473
+ ], 40, Mt)
474
+ ])
475
+ ]),
476
+ r("nav", {
477
+ "aria-label": l(n)("core.collection.page.label"),
478
+ class: "flex items-center gap-0.5 text-subheadline tabular-nums"
479
+ }, [
480
+ r("button", {
481
+ type: "button",
482
+ class: oe(O(!1)),
483
+ disabled: u.value <= 1,
484
+ onClick: j[2] || (j[2] = (k) => V(-1))
485
+ }, [
486
+ S(l(U), {
487
+ name: "arrowLeftSLine",
488
+ size: 16
489
+ }),
490
+ r("span", Dt, g(l(n)("core.collection.page.previous")), 1)
491
+ ], 10, Ht),
492
+ (f(!0), y(J, null, Y(v.value, (k, M) => (f(), y(J, { key: M }, [
493
+ k === null ? (f(), y("span", Kt, "…")) : (f(), y("button", {
494
+ key: 1,
495
+ type: "button",
496
+ class: oe(O(k === u.value)),
497
+ "aria-current": k === u.value ? "page" : void 0,
498
+ onClick: (B) => s.collection.goToPage(k)
499
+ }, g(l(i).number(k)), 11, Wt))
500
+ ], 64))), 128)),
501
+ r("button", {
502
+ type: "button",
503
+ class: oe(O(!1)),
504
+ disabled: u.value >= d.value,
505
+ onClick: j[3] || (j[3] = (k) => V(1))
506
+ }, [
507
+ S(l(U), {
508
+ name: "arrowRightSLine",
509
+ size: 16
510
+ }),
511
+ r("span", Xt, g(l(n)("core.collection.page.next")), 1)
512
+ ], 10, Qt)
513
+ ], 8, It)
514
+ ]));
515
+ }
516
+ }), Gt = ["onClick"], Yt = { class: "max-w-56 truncate" }, Zt = { class: "flex flex-col gap-1.5 text-footnote font-medium text-content-muted" }, el = ["placeholder"], tl = { class: "flex items-center justify-between gap-2" }, ll = {
517
+ type: "submit",
518
+ class: "cursor-pointer rounded-control bg-tint px-3 py-1.5 text-footnote font-semibold text-content-on-tint"
519
+ }, ol = ["onClick"], nl = { class: "max-w-56 truncate" }, Te = "inline-flex shrink-0 cursor-pointer items-center gap-x-2 rounded-button px-3 py-1.5 text-subheadline transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus", sl = /* @__PURE__ */ ce({
520
+ __name: "CollectionFilterMenu",
521
+ props: {
522
+ filter: {},
523
+ value: {}
524
+ },
525
+ emits: ["update"],
526
+ setup(a, { emit: o }) {
527
+ const s = a, p = o, { t: n } = de(), i = _(() => ne(s.value) ? null : String(s.value)), u = _(() => s.filter.options?.find((B) => String(B.value) === i.value) ?? null), d = _(() => [
528
+ ...s.filter.withoutDefaultOption ? [] : [{ id: "__all", label: s.filter.defaultOptionTitle ?? n("core.collection.filters.show_all"), checked: i.value === null, onSelect: () => p("update", null) }],
529
+ ...(s.filter.options ?? []).map((N) => ({
530
+ id: `option-${String(N.value)}`,
531
+ label: N.label,
532
+ icon: N.icon,
533
+ checked: i.value === String(N.value),
534
+ onSelect: () => p("update", String(N.value))
535
+ }))
536
+ ]), h = _(() => s.filter.type === "text" && i.value ? `${s.filter.label}: ${i.value}` : u.value?.label ?? s.filter.label), v = _(() => i.value !== null), V = _(
537
+ () => v.value ? "bg-tint-soft font-semibold text-content-link" : "bg-surface-cell font-medium text-content-strong ring-1 ring-inset ring-border-separator hover:bg-fill"
538
+ ), O = le(""), D = re("popover");
539
+ Ce(i, (B) => O.value = B ?? "", { immediate: !0 });
540
+ function x() {
541
+ const B = O.value.trim();
542
+ p("update", B === "" ? null : B), D.value?.dismiss();
543
+ }
544
+ function j() {
545
+ O.value = "", p("update", null), D.value?.dismiss();
546
+ }
547
+ const k = re("field");
548
+ async function M() {
549
+ await et(), k.value?.focus();
550
+ }
551
+ return (B, N) => s.filter.type === "text" ? (f(), W(l(Ke), {
552
+ key: 0,
553
+ ref_key: "popover",
554
+ ref: D,
555
+ label: s.filter.label,
556
+ width: "md",
557
+ placement: "bottom-start",
558
+ onPresented: M
559
+ }, {
560
+ trigger: F(({ toggle: Q, attrs: I }) => [
561
+ r("button", ie(I, {
562
+ type: "button",
563
+ class: [Te, V.value],
564
+ onClick: Q
565
+ }), [
566
+ s.filter.icon ? (f(), W(l(U), {
567
+ key: 0,
568
+ name: s.filter.icon,
569
+ size: 16
570
+ }, null, 8, ["name"])) : T("", !0),
571
+ r("span", Yt, g(h.value), 1),
572
+ S(l(U), {
573
+ name: "arrowDownSLine",
574
+ size: 16,
575
+ class: "text-content-muted"
576
+ })
577
+ ], 16, Gt)
578
+ ]),
579
+ default: F(() => [
580
+ r("form", {
581
+ class: "flex flex-col gap-3",
582
+ onSubmit: Ue(x, ["prevent"])
583
+ }, [
584
+ r("label", Zt, [
585
+ G(g(s.filter.label) + " ", 1),
586
+ Se(r("input", {
587
+ ref_key: "field",
588
+ ref: k,
589
+ "onUpdate:modelValue": N[0] || (N[0] = (Q) => O.value = Q),
590
+ type: "text",
591
+ autocomplete: "off",
592
+ placeholder: l(n)("core.collection.filters.type_to_filter"),
593
+ class: "rounded-control bg-fill px-2.5 py-1.5 text-body text-content-strong outline-none placeholder:text-content-disabled focus:bg-surface-cell focus:ring-[1.5px] focus:ring-inset focus:ring-border-focus"
594
+ }, null, 8, el), [
595
+ [ze, O.value]
596
+ ])
597
+ ]),
598
+ r("div", tl, [
599
+ r("button", {
600
+ type: "button",
601
+ class: "cursor-pointer rounded-control px-2 py-1 text-footnote text-content-muted hover:text-content-strong",
602
+ onClick: j
603
+ }, g(l(n)("core.collection.filters.clear")), 1),
604
+ r("button", ll, g(l(n)("core.collection.filters.apply")), 1)
605
+ ])
606
+ ], 32)
607
+ ]),
608
+ _: 1
609
+ }, 8, ["label"])) : (f(), W(l(De), {
610
+ key: 1,
611
+ items: d.value,
612
+ label: s.filter.label,
613
+ placement: "bottom-start"
614
+ }, {
615
+ trigger: F(({ toggle: Q, attrs: I }) => [
616
+ r("button", ie(I, {
617
+ type: "button",
618
+ class: [Te, V.value],
619
+ onClick: Q
620
+ }), [
621
+ s.filter.icon ? (f(), W(l(U), {
622
+ key: 0,
623
+ name: s.filter.icon,
624
+ size: 16
625
+ }, null, 8, ["name"])) : T("", !0),
626
+ r("span", nl, g(h.value), 1),
627
+ S(l(U), {
628
+ name: "arrowDownSLine",
629
+ size: 16,
630
+ class: "text-content-muted"
631
+ })
632
+ ], 16, ol)
633
+ ]),
634
+ _: 1
635
+ }, 8, ["items", "label"]));
636
+ }
637
+ }), al = {
638
+ key: 0,
639
+ "data-test": "filter-drilldown"
640
+ }, rl = { class: "mb-3 text-headline font-semibold" }, il = ["aria-label"], cl = ["aria-selected", "onClick"], ul = { class: "min-w-0 truncate" }, dl = {
641
+ key: 0,
642
+ class: "mb-5 border-b border-border-separator pb-5",
643
+ "data-test": "saved-filters"
644
+ }, fl = { class: "mb-2 text-footnote font-medium text-content-muted" }, pl = { class: "flex flex-wrap gap-2" }, vl = ["onClick"], ml = ["aria-label", "title", "onClick"], bl = { class: "space-y-5" }, gl = { key: 0 }, hl = { class: "mb-1.5 text-footnote font-medium text-content-muted" }, yl = ["aria-label"], _l = { class: "mb-1.5 text-footnote font-medium text-content-muted" }, xl = {
645
+ key: 0,
646
+ class: "grid grid-cols-2 gap-3"
647
+ }, wl = ["aria-label"], kl = { class: "mb-2 text-footnote font-medium text-content-muted" }, $l = { class: "flex flex-wrap gap-2" }, Cl = ["aria-pressed", "onClick"], Sl = ["disabled", "onClick"], zl = { class: "shrink-0 text-subheadline font-medium" }, Ol = { class: "flex items-center justify-between gap-2" }, jl = { class: "flex items-center gap-2" }, Vl = ["title"], Pl = { class: "sm:hidden" }, Ll = { class: "hidden sm:inline" }, Fl = { class: "flex flex-col gap-1.5 text-footnote font-medium text-content-muted" }, ql = ["placeholder"], Rl = {
648
+ key: 0,
649
+ class: "text-footnote text-status-warning-content",
650
+ "data-test": "saved-filter-replace-hint"
651
+ }, Tl = { class: "flex justify-end gap-2" }, Nl = 8, Al = 18, Ne = 6e3, El = /* @__PURE__ */ ce({
652
+ __name: "CollectionFilterPanel",
653
+ props: {
654
+ collection: {},
655
+ filters: {}
656
+ },
657
+ emits: ["touched"],
658
+ setup(a, { expose: o, emit: s }) {
659
+ const p = a, n = s, { t: i } = de(), u = re("sheet"), d = vt("(max-width: 1023px), (pointer: coarse)"), h = le({}), v = le({}), V = le(null), O = _(() => p.filters.find((c) => c.key === V.value) ?? null);
660
+ function D() {
661
+ const c = {}, m = {};
662
+ for (const e of p.filters) {
663
+ const t = p.collection.query.value.filters[e.key];
664
+ if (c[e.key] = ne(t) ? null : String(t), e.type === "range") {
665
+ const [$, L] = We(c[e.key]);
666
+ m[e.key] = { min: $ ?? "", max: L ?? "" };
667
+ }
668
+ }
669
+ h.value = c, v.value = m, V.value = null, u.value?.present();
670
+ }
671
+ function x(c, m) {
672
+ const e = ne(m) ? null : String(m);
673
+ if (h.value[c] !== e) {
674
+ h.value = { ...h.value, [c]: e };
675
+ for (const t of p.filters.filter(($) => $.dependsOn === c)) x(t.key, null);
676
+ }
677
+ }
678
+ function j() {
679
+ for (const c of p.filters)
680
+ h.value[c.key] = null, c.type === "range" && (v.value[c.key] = { min: "", max: "" });
681
+ }
682
+ const k = (c) => c.replace(/[^\d.,-]/g, "").replace(",", "."), M = (c, m) => {
683
+ const e = v.value[c]?.[m] ?? "", t = e === "" ? Number.NaN : Number(k(e));
684
+ return Number.isNaN(t) ? null : t;
685
+ };
686
+ function B(c, m, e) {
687
+ const t = v.value[c];
688
+ t && (t[m] = e === null ? "" : String(e));
689
+ }
690
+ function N() {
691
+ const c = {};
692
+ for (const m of p.filters) {
693
+ const e = v.value[m.key];
694
+ c[m.key] = m.type === "range" ? bt(e ? k(e.min) : null, e ? k(e.max) : null) : h.value[m.key] ?? null;
695
+ }
696
+ return c;
697
+ }
698
+ function Q() {
699
+ const c = N(), m = Object.keys(c).filter((e) => (p.collection.query.value.filters[e] ?? null) !== c[e]);
700
+ n("touched", m), p.collection.setFilters(c), u.value?.dismiss();
701
+ }
702
+ const I = (c) => gt(c, c.dependsOn ? h.value[c.dependsOn] : null), K = (c) => c.defaultOptionTitle ?? i("core.collection.filters.show_all");
703
+ function te(c) {
704
+ const m = h.value[c.key];
705
+ return m == null ? K(c) : I(c).find((e) => e.value === m)?.label ?? m;
706
+ }
707
+ const Z = (c) => [
708
+ { value: "", label: K(c) },
709
+ ...I(c).map((m) => ({ value: String(m.value), label: m.label }))
710
+ ], w = (c) => [
711
+ { value: "", label: K(c) },
712
+ ...(c.options ?? []).map((m) => ({ value: String(m.value), label: m.label }))
713
+ ];
714
+ function A(c) {
715
+ const m = I(c);
716
+ return !c.dependsOn && m.length > 0 && m.length <= Nl && m.every((e) => e.label.length <= Al);
717
+ }
718
+ const P = _(() => d.value && O.value !== null), b = _(() => p.collection.savedViews), C = le(""), z = le(!1), ae = re("savePopover");
719
+ function fe() {
720
+ const c = new Set(p.filters.map((e) => e.key)), m = {};
721
+ for (const [e, t] of Object.entries(p.collection.query.value.filters))
722
+ !c.has(e) && t !== void 0 && t !== "" && (m[e] = String(t));
723
+ for (const [e, t] of Object.entries(N())) t !== null && (m[e] = t);
724
+ return { filters: m, search: p.collection.query.value.search };
725
+ }
726
+ const pe = _(() => {
727
+ const c = fe();
728
+ return Object.keys(c.filters).length > 0 || c.search.trim() !== "";
729
+ }), ve = _(() => {
730
+ const c = C.value.trim();
731
+ return c ? b.value?.items.value.find((m) => m.name === c) ?? null : null;
732
+ }), me = (c, m) => nt(c) && c.message ? c.message : m;
733
+ async function be() {
734
+ const c = C.value.trim(), m = b.value;
735
+ if (!(!m || !c || z.value || !pe.value)) {
736
+ z.value = !0;
737
+ try {
738
+ const e = await m.save(c, fe());
739
+ C.value = "", ae.value?.dismiss(), ye.success(i("core.collection.saved.saved_toast", { name: e.name })), m.apply(e), n("touched", []), u.value?.dismiss();
740
+ } catch (e) {
741
+ ye.error(me(e, i("core.collection.saved.save_failed")));
742
+ } finally {
743
+ z.value = !1;
744
+ }
745
+ }
746
+ }
747
+ function _e(c) {
748
+ b.value?.apply(c), n("touched", []), u.value?.dismiss();
749
+ }
750
+ function ge(c) {
751
+ const m = b.value;
752
+ if (!m) return;
753
+ const { revert: e, commit: t } = m.stageRemoval(c.id), $ = setTimeout(() => {
754
+ t().catch((L) => {
755
+ e(), ye.error(me(L, i("core.collection.saved.delete_failed")));
756
+ });
757
+ }, Ne);
758
+ ye.success(i("core.collection.saved.deleted_toast", { name: c.name }), {
759
+ duration: Ne,
760
+ action: {
761
+ label: i("core.collection.saved.undo"),
762
+ onClick: () => {
763
+ clearTimeout($), e();
764
+ }
765
+ }
766
+ });
767
+ }
768
+ return o({ present: D }), (c, m) => (f(), W(l(mt), {
769
+ ref_key: "sheet",
770
+ ref: u,
771
+ title: l(i)("core.collection.filters.panel_title"),
772
+ grouped: P.value
773
+ }, {
774
+ footer: F(() => [
775
+ r("div", Ol, [
776
+ S(se, {
777
+ prominence: "standard",
778
+ class: "whitespace-nowrap",
779
+ onClick: j
780
+ }, {
781
+ default: F(() => [
782
+ G(g(l(i)("core.collection.filters.reset_all")), 1)
783
+ ]),
784
+ _: 1
785
+ }),
786
+ r("div", jl, [
787
+ b.value ? (f(), W(l(Ke), {
788
+ key: 0,
789
+ ref_key: "savePopover",
790
+ ref: ae,
791
+ placement: "top-end",
792
+ label: l(i)("core.collection.saved.save_button")
793
+ }, {
794
+ trigger: F(({ toggle: e, attrs: t }) => [
795
+ r("span", {
796
+ title: pe.value ? void 0 : l(i)("core.collection.saved.nothing_to_save")
797
+ }, [
798
+ S(se, ie({ ...t, "data-test": "saved-filter-open" }, {
799
+ prominence: "standard",
800
+ icon: "save",
801
+ class: "whitespace-nowrap",
802
+ disabled: !pe.value,
803
+ onClick: e
804
+ }), {
805
+ default: F(() => [
806
+ r("span", Pl, g(l(i)("core.collection.saved.save")), 1),
807
+ r("span", Ll, g(l(i)("core.collection.saved.save_button")), 1)
808
+ ]),
809
+ _: 1
810
+ }, 16, ["disabled", "onClick"])
811
+ ], 8, Vl)
812
+ ]),
813
+ default: F(() => [
814
+ r("form", {
815
+ class: "flex flex-col gap-3",
816
+ "data-test": "saved-filter-form",
817
+ onSubmit: Ue(be, ["prevent"])
818
+ }, [
819
+ r("label", Fl, [
820
+ G(g(l(i)("core.collection.saved.name_label")) + " ", 1),
821
+ Se(r("input", {
822
+ "onUpdate:modelValue": m[1] || (m[1] = (e) => C.value = e),
823
+ type: "text",
824
+ maxlength: "60",
825
+ autocomplete: "off",
826
+ placeholder: l(i)("core.collection.saved.name_placeholder"),
827
+ class: "rounded-control bg-fill px-2.5 py-1.5 text-body text-content-strong outline-none placeholder:text-content-disabled focus:bg-surface-cell focus:ring-[1.5px] focus:ring-inset focus:ring-border-focus"
828
+ }, null, 8, ql), [
829
+ [ze, C.value]
830
+ ])
831
+ ]),
832
+ ve.value ? (f(), y("p", Rl, g(l(i)("core.collection.saved.replace_hint", { name: ve.value.name })), 1)) : T("", !0),
833
+ r("div", Tl, [
834
+ S(se, {
835
+ size: "sm",
836
+ onClick: m[2] || (m[2] = (e) => ae.value?.dismiss())
837
+ }, {
838
+ default: F(() => [
839
+ G(g(l(i)("core.actions.cancel")), 1)
840
+ ]),
841
+ _: 1
842
+ }),
843
+ S(se, ie({ "data-test": "saved-filter-save" }, {
844
+ type: "submit",
845
+ prominence: "primary",
846
+ size: "sm",
847
+ processing: z.value,
848
+ disabled: !C.value.trim()
849
+ }), {
850
+ default: F(() => [
851
+ G(g(ve.value ? l(i)("core.collection.saved.replace") : l(i)("core.collection.saved.save")), 1)
852
+ ]),
853
+ _: 1
854
+ }, 16, ["processing", "disabled"])
855
+ ])
856
+ ], 32)
857
+ ]),
858
+ _: 1
859
+ }, 8, ["label"])) : T("", !0),
860
+ S(se, {
861
+ prominence: "primary",
862
+ icon: "filter3",
863
+ class: "whitespace-nowrap",
864
+ onClick: Q
865
+ }, {
866
+ default: F(() => [
867
+ G(g(l(i)("core.collection.filters.apply")), 1)
868
+ ]),
869
+ _: 1
870
+ })
871
+ ])
872
+ ])
873
+ ]),
874
+ default: F(() => [
875
+ l(d) && O.value ? (f(), y("div", al, [
876
+ r("button", {
877
+ type: "button",
878
+ "data-test": "filter-drilldown-back",
879
+ class: "-mx-2 -mt-2 mb-1 inline-flex h-10 cursor-pointer items-center gap-0.5 rounded-control px-2 text-body font-medium text-content-link active:bg-tint-soft",
880
+ onClick: m[0] || (m[0] = (e) => V.value = null)
881
+ }, [
882
+ S(l(U), {
883
+ name: "arrowLeftSLine",
884
+ size: 20
885
+ }),
886
+ G(" " + g(l(i)("core.collection.filters.panel_title")), 1)
887
+ ]),
888
+ r("p", rl, g(O.value.label), 1),
889
+ r("ul", {
890
+ class: "overflow-hidden rounded-group bg-surface-cell shadow-group",
891
+ role: "listbox",
892
+ "aria-label": O.value.label
893
+ }, [
894
+ (f(!0), y(J, null, Y([{ value: null, label: K(O.value) }, ...I(O.value)], (e) => (f(), y("li", {
895
+ key: String(e.value),
896
+ role: "presentation"
897
+ }, [
898
+ r("button", {
899
+ type: "button",
900
+ role: "option",
901
+ "aria-selected": (h.value[O.value.key] ?? null) === e.value,
902
+ class: "flex min-h-11 w-full cursor-pointer items-center justify-between gap-3 px-row-inset text-left text-body active:bg-fill",
903
+ onClick: (t) => {
904
+ x(O.value.key, e.value), V.value = null;
905
+ }
906
+ }, [
907
+ r("span", ul, g(e.label), 1),
908
+ (h.value[O.value.key] ?? null) === e.value ? (f(), W(l(U), {
909
+ key: 0,
910
+ name: "checkboxCircleFill",
911
+ size: 18,
912
+ class: "shrink-0 text-content-link"
913
+ })) : T("", !0)
914
+ ], 8, cl)
915
+ ]))), 128))
916
+ ], 8, il)
917
+ ])) : (f(), y(J, { key: 1 }, [
918
+ b.value && b.value.items.value.length > 0 ? (f(), y("section", dl, [
919
+ r("p", fl, g(l(i)("core.collection.saved.title")), 1),
920
+ r("div", pl, [
921
+ (f(!0), y(J, null, Y(b.value.items.value, (e) => (f(), y("span", {
922
+ key: e.id,
923
+ class: "inline-flex h-8 items-center rounded-control bg-surface-cell text-subheadline shadow-group ring-1 ring-inset ring-border-separator"
924
+ }, [
925
+ r("button", {
926
+ type: "button",
927
+ "data-test": "saved-filter-apply",
928
+ class: "inline-flex h-full cursor-pointer items-center gap-1.5 rounded-l-control pr-1.5 pl-2.5 font-medium text-content-strong hover:bg-fill",
929
+ onClick: (t) => _e(e)
930
+ }, [
931
+ S(l(U), {
932
+ name: "starFill",
933
+ size: 12,
934
+ class: "text-status-warning-content"
935
+ }),
936
+ G(" " + g(e.name), 1)
937
+ ], 8, vl),
938
+ r("button", {
939
+ type: "button",
940
+ "data-test": "saved-filter-delete",
941
+ "aria-label": l(i)("core.collection.saved.delete", { name: e.name }),
942
+ title: l(i)("core.collection.saved.delete", { name: e.name }),
943
+ class: "h-full cursor-pointer rounded-r-control px-1.5 text-content-muted hover:bg-fill hover:text-content-destructive",
944
+ onClick: (t) => ge(e)
945
+ }, [
946
+ S(l(U), {
947
+ name: "close",
948
+ size: 12
949
+ })
950
+ ], 8, ml)
951
+ ]))), 128))
952
+ ])
953
+ ])) : T("", !0),
954
+ r("div", bl, [
955
+ (f(!0), y(J, null, Y(p.filters, (e) => (f(), y(J, {
956
+ key: e.key
957
+ }, [
958
+ e.type === "segmented" ? (f(), y("div", gl, [
959
+ r("p", hl, g(e.label), 1),
960
+ S(l(He), {
961
+ "model-value": h.value[e.key] ?? "",
962
+ tabs: w(e),
963
+ label: e.label,
964
+ stretch: "",
965
+ "onUpdate:modelValue": (t) => x(e.key, t === null ? null : String(t))
966
+ }, null, 8, ["model-value", "tabs", "label", "onUpdate:modelValue"])
967
+ ])) : e.type === "range" ? (f(), y("div", {
968
+ key: 1,
969
+ role: "group",
970
+ "aria-label": e.label
971
+ }, [
972
+ r("p", _l, g(e.label), 1),
973
+ v.value[e.key] ? (f(), y("div", xl, [
974
+ (f(), y(J, null, Y(["min", "max"], (t) => S(ft, {
975
+ key: t,
976
+ "model-value": M(e.key, t),
977
+ name: `${e.key}_${t}`,
978
+ width: "full",
979
+ decimals: e.decimals ?? 0,
980
+ suffix: e.unit,
981
+ label: l(i)(t === "min" ? "core.collection.filters.range_from" : "core.collection.filters.range_until"),
982
+ "onUpdate:modelValue": ($) => B(e.key, t, $)
983
+ }, null, 8, ["model-value", "name", "decimals", "suffix", "label", "onUpdate:modelValue"])), 64))
984
+ ])) : T("", !0)
985
+ ], 8, yl)) : l(d) && A(e) ? (f(), y("div", {
986
+ key: 2,
987
+ role: "group",
988
+ "aria-label": e.label,
989
+ "data-test": "filter-chips"
990
+ }, [
991
+ r("p", kl, g(e.label), 1),
992
+ r("div", $l, [
993
+ (f(!0), y(J, null, Y([{ value: null, label: K(e) }, ...I(e)], (t) => (f(), y("button", {
994
+ key: String(t.value),
995
+ type: "button",
996
+ "aria-pressed": (h.value[e.key] ?? null) === t.value,
997
+ class: oe(["min-h-9 cursor-pointer rounded-full px-3.5 text-subheadline ring-1 ring-inset transition-colors", (h.value[e.key] ?? null) === t.value ? "bg-tint-soft font-semibold text-content-link ring-border-selected" : "bg-surface-cell text-content ring-border-separator active:bg-fill"]),
998
+ onClick: ($) => x(e.key, t.value)
999
+ }, g(t.label), 11, Cl))), 128))
1000
+ ])
1001
+ ], 8, wl)) : l(d) ? (f(), y("button", {
1002
+ key: 3,
1003
+ type: "button",
1004
+ "data-test": "filter-row",
1005
+ disabled: !!e.dependsOn && I(e).length === 0,
1006
+ class: "flex min-h-12 w-full cursor-pointer items-center gap-3 rounded-group bg-surface-cell px-3 text-left ring-1 ring-inset ring-border-separator active:bg-fill disabled:cursor-not-allowed disabled:opacity-50",
1007
+ onClick: (t) => V.value = e.key
1008
+ }, [
1009
+ r("span", zl, g(e.label), 1),
1010
+ r("span", {
1011
+ class: oe(["min-w-0 flex-1 truncate text-right text-subheadline", h.value[e.key] == null ? "text-content-disabled" : "font-medium text-content-link"])
1012
+ }, g(te(e)), 3),
1013
+ S(l(U), {
1014
+ name: "arrowRightSLine",
1015
+ size: 18,
1016
+ class: "shrink-0 text-content-muted"
1017
+ })
1018
+ ], 8, Sl)) : (f(), W(pt, {
1019
+ key: 4,
1020
+ "model-value": h.value[e.key] ?? "",
1021
+ label: e.label,
1022
+ options: Z(e),
1023
+ disabled: !!e.dependsOn && I(e).length === 0,
1024
+ "onUpdate:modelValue": (t) => x(e.key, t === "" ? null : t)
1025
+ }, null, 8, ["model-value", "label", "options", "disabled", "onUpdate:modelValue"]))
1026
+ ], 64))), 128))
1027
+ ])
1028
+ ], 64))
1029
+ ]),
1030
+ _: 1
1031
+ }, 8, ["title", "grouped"]));
1032
+ }
1033
+ }), Ul = { class: "flex flex-col items-start gap-2 lg:flex-row" }, Ml = { class: "flex h-9 w-full items-center rounded-control bg-fill px-2.5 text-content-muted transition-colors duration-motion-fast focus-within:outline-2 focus-within:outline-offset-1 focus-within:outline-border-focus lg:w-72 compact:h-10" }, Bl = ["placeholder", "aria-label"], Il = ["aria-label"], Hl = ["title"], Dl = {
1034
+ key: 0,
1035
+ class: "min-w-4.5 rounded-full bg-tint px-1 text-center text-caption font-semibold leading-4.5 text-content-on-tint"
1036
+ }, Kl = ["onClick"], Wl = {
1037
+ key: 0,
1038
+ class: "mt-2.5 flex flex-wrap items-center gap-2",
1039
+ "data-test": "collection-filter-chips"
1040
+ }, Ql = {
1041
+ key: 0,
1042
+ class: "shrink-0 opacity-80"
1043
+ }, Xl = { class: "flex min-w-0 flex-wrap items-center gap-1 font-semibold" }, Jl = { class: "break-words" }, Gl = ["aria-label", "onClick"], Ae = "__search", Yl = 3, Zl = 300, eo = /* @__PURE__ */ ce({
1044
+ __name: "CollectionToolbar",
1045
+ props: {
1046
+ collection: {},
1047
+ narrow: { type: Boolean },
1048
+ flat: { type: Boolean }
1049
+ },
1050
+ emits: ["touched"],
1051
+ setup(a, { emit: o }) {
1052
+ const s = a, p = o, { t: n } = de(), i = Oe(), u = le(s.collection.query.value.search), d = re("field");
1053
+ let h = null;
1054
+ Ce(() => s.collection.query.value.search, (w) => {
1055
+ w !== u.value.trim() && (u.value = w);
1056
+ });
1057
+ function v() {
1058
+ h && clearTimeout(h);
1059
+ const w = u.value;
1060
+ w.length > 0 && w.length < Yl || (h = setTimeout(() => {
1061
+ h = null, w !== s.collection.query.value.search && (p("touched", [Ae]), s.collection.search(w));
1062
+ }, Zl));
1063
+ }
1064
+ function V() {
1065
+ h && clearTimeout(h), u.value = "", p("touched", [Ae]), s.collection.search(""), d.value?.focus();
1066
+ }
1067
+ tt(() => h && clearTimeout(h));
1068
+ const O = (w) => w.placement === "panel" || s.narrow && w.type !== "text", D = _(() => s.collection.filters.value.filter((w) => !O(w))), x = _(() => s.collection.filters.value.filter(O)), j = _(() => s.collection.query.value.filters), k = _(
1069
+ () => Qe(x.value, j.value, {
1070
+ formatNumber: (w) => i.number(w),
1071
+ from: n("core.collection.filters.range_from"),
1072
+ until: n("core.collection.filters.range_until")
1073
+ })
1074
+ ), M = _(() => yt(x.value, j.value));
1075
+ function B(w, A) {
1076
+ p("touched", [w]), s.collection.setFilter(w, A);
1077
+ }
1078
+ function N(w) {
1079
+ s.collection.setFilters(Object.fromEntries(w.map((A) => [A, null])));
1080
+ }
1081
+ const Q = re("panel"), I = re("panelButton"), K = (w) => !!w && (typeof w.checkVisibility != "function" || w.checkVisibility());
1082
+ Le({ key: "/", group: "list", label: () => n("core.shortcuts.focus_search") }, () => {
1083
+ if (!K(d.value)) return !1;
1084
+ d.value?.focus(), d.value?.select();
1085
+ }), Le({ key: "f", group: "list", label: () => x.value.length > 0 ? n("core.shortcuts.open_filters") : "" }, () => {
1086
+ if (x.value.length === 0 || !K(I.value)) return !1;
1087
+ Q.value?.present();
1088
+ });
1089
+ const te = _(() => s.collection.savedViews);
1090
+ lt(() => void te.value?.load());
1091
+ const Z = _(
1092
+ () => (te.value?.items.value ?? []).map((w) => ({
1093
+ id: `saved-${w.id}`,
1094
+ label: w.name,
1095
+ icon: "starFill",
1096
+ onSelect: () => {
1097
+ p("touched", []), te.value?.apply(w);
1098
+ }
1099
+ }))
1100
+ );
1101
+ return (w, A) => (f(), y("div", {
1102
+ class: oe([s.flat ? "pb-3" : "border-b border-border-separator px-3 py-2.5", "select-none"]),
1103
+ "data-test": "collection-toolbar"
1104
+ }, [
1105
+ r("div", Ul, [
1106
+ r("div", Ml, [
1107
+ S(l(U), {
1108
+ name: "search",
1109
+ size: 16
1110
+ }),
1111
+ Se(r("input", {
1112
+ ref_key: "field",
1113
+ ref: d,
1114
+ "onUpdate:modelValue": A[0] || (A[0] = (P) => u.value = P),
1115
+ type: "text",
1116
+ name: "collection-search",
1117
+ autocomplete: "off",
1118
+ placeholder: l(n)("core.collection.search.placeholder"),
1119
+ "aria-label": l(n)("core.collection.search.label"),
1120
+ class: "peer block min-w-0 flex-1 bg-transparent px-2 py-1.5 text-body text-content-strong outline-0 placeholder:text-content-disabled",
1121
+ onInput: v
1122
+ }, null, 40, Bl), [
1123
+ [ze, u.value]
1124
+ ]),
1125
+ A[4] || (A[4] = r("kbd", {
1126
+ "aria-hidden": "true",
1127
+ class: "rounded border border-border-separator px-1.5 font-mono text-2xs leading-5 text-content-disabled peer-focus:hidden peer-[:not(:placeholder-shown)]:hidden [@media(pointer:coarse)]:hidden"
1128
+ }, "/", -1)),
1129
+ u.value !== "" ? (f(), y("button", {
1130
+ key: 0,
1131
+ type: "button",
1132
+ "aria-label": l(n)("core.collection.clear"),
1133
+ class: "cursor-pointer rounded-full text-content-disabled hover:text-content-muted",
1134
+ onClick: V
1135
+ }, [
1136
+ S(l(U), {
1137
+ name: "close",
1138
+ size: 16
1139
+ })
1140
+ ], 8, Il)) : T("", !0)
1141
+ ]),
1142
+ r("div", {
1143
+ class: oe(["flex min-w-0 flex-1 items-center gap-2", s.narrow ? "w-full flex-nowrap overflow-x-auto [scrollbar-width:none]" : "flex-wrap"])
1144
+ }, [
1145
+ x.value.length > 0 ? (f(), y("button", {
1146
+ key: 0,
1147
+ ref_key: "panelButton",
1148
+ ref: I,
1149
+ type: "button",
1150
+ "data-test": "collection-filter-panel-button",
1151
+ title: `${l(n)("core.collection.filters.panel_button")} (F)`,
1152
+ class: oe(["hit-target inline-flex h-8 shrink-0 cursor-pointer items-center gap-x-1.5 rounded-button px-3 text-subheadline font-semibold transition-colors duration-motion-fast compact:h-9", M.value > 0 ? "bg-tint-soft text-content-link" : "bg-surface-cell text-content-strong shadow-group ring-1 ring-inset ring-border-separator hover:bg-fill"]),
1153
+ onClick: A[1] || (A[1] = (P) => Q.value?.present())
1154
+ }, [
1155
+ S(l(U), {
1156
+ name: "filter3",
1157
+ size: 16
1158
+ }),
1159
+ G(" " + g(l(n)("core.collection.filters.panel_button")) + " ", 1),
1160
+ M.value > 0 ? (f(), y("span", Dl, g(M.value), 1)) : T("", !0)
1161
+ ], 10, Hl)) : T("", !0),
1162
+ Z.value.length > 0 ? (f(), W(l(De), {
1163
+ key: 1,
1164
+ items: Z.value,
1165
+ label: l(n)("core.collection.saved.menu"),
1166
+ placement: "bottom-start"
1167
+ }, {
1168
+ trigger: F(({ toggle: P, attrs: b }) => [
1169
+ r("button", ie(b, {
1170
+ type: "button",
1171
+ "data-test": "saved-filters-menu",
1172
+ class: "inline-flex shrink-0 cursor-pointer items-center gap-1.5 rounded-button bg-surface-cell px-3 py-1.5 text-subheadline font-semibold text-content-strong shadow-group ring-1 ring-inset ring-border-separator transition-colors hover:bg-fill",
1173
+ onClick: P
1174
+ }), [
1175
+ S(l(U), {
1176
+ name: "starFill",
1177
+ size: 14,
1178
+ class: "text-status-warning-content"
1179
+ }),
1180
+ G(" " + g(l(n)("core.collection.saved.menu")), 1)
1181
+ ], 16, Kl)
1182
+ ]),
1183
+ _: 1
1184
+ }, 8, ["items", "label"])) : T("", !0),
1185
+ (f(!0), y(J, null, Y(D.value, (P) => (f(), W(sl, {
1186
+ key: P.key,
1187
+ filter: P,
1188
+ value: j.value[P.key],
1189
+ onUpdate: (b) => B(P.key, b)
1190
+ }, null, 8, ["filter", "value", "onUpdate"]))), 128))
1191
+ ], 2),
1192
+ ue(w.$slots, "default")
1193
+ ]),
1194
+ k.value.length > 0 ? (f(), y("div", Wl, [
1195
+ (f(!0), y(J, null, Y(k.value, (P) => (f(), y("span", {
1196
+ key: P.key,
1197
+ class: "inline-flex min-h-7 max-w-full items-center gap-1.5 rounded-control bg-tint-soft py-0.5 pr-0.5 pl-2.5 text-subheadline text-content-link"
1198
+ }, [
1199
+ P.label ? (f(), y("span", Ql, g(P.label), 1)) : T("", !0),
1200
+ r("span", Xl, [
1201
+ (f(!0), y(J, null, Y(P.values, (b, C) => (f(), y(J, { key: C }, [
1202
+ C > 0 ? (f(), W(l(U), {
1203
+ key: 0,
1204
+ name: "arrowRightSLine",
1205
+ size: 12,
1206
+ class: "opacity-60"
1207
+ })) : T("", !0),
1208
+ r("span", Jl, g(b), 1)
1209
+ ], 64))), 128))
1210
+ ]),
1211
+ r("button", {
1212
+ type: "button",
1213
+ class: "hit-target flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full hover:bg-tint/15",
1214
+ "aria-label": l(n)("core.collection.clear"),
1215
+ onClick: (b) => N(P.clears)
1216
+ }, [
1217
+ S(l(U), {
1218
+ name: "close",
1219
+ size: 12
1220
+ })
1221
+ ], 8, Gl)
1222
+ ]))), 128)),
1223
+ k.value.length > 1 ? (f(), y("button", {
1224
+ key: 0,
1225
+ type: "button",
1226
+ class: "cursor-pointer px-2 text-subheadline text-content-muted hover:text-content-strong hover:underline",
1227
+ onClick: A[2] || (A[2] = (P) => N(x.value.map((b) => b.key)))
1228
+ }, g(l(n)("core.collection.filters.reset_all")), 1)) : T("", !0)
1229
+ ])) : T("", !0),
1230
+ x.value.length > 0 ? (f(), W(El, {
1231
+ key: 1,
1232
+ ref_key: "panel",
1233
+ ref: Q,
1234
+ collection: s.collection,
1235
+ filters: x.value,
1236
+ onTouched: A[3] || (A[3] = (P) => p("touched", P))
1237
+ }, null, 8, ["collection", "filters"])) : T("", !0)
1238
+ ], 2));
1239
+ }
1240
+ }), to = ["aria-busy"], lo = {
1241
+ key: 0,
1242
+ class: "mb-3 select-none"
1243
+ }, oo = {
1244
+ key: 0,
1245
+ role: "status",
1246
+ "data-test": "collection-refreshing",
1247
+ class: "m-2 flex w-fit max-w-full items-center gap-2 rounded-group bg-fill py-1 pr-3 pl-3 text-footnote text-content-muted"
1248
+ }, no = {
1249
+ key: 1,
1250
+ class: "m-2",
1251
+ "data-test": "collection-stale"
1252
+ }, so = { class: "flex flex-wrap items-center justify-between gap-3" }, ao = { class: "flex flex-wrap items-center justify-between gap-3" }, ro = { class: "font-semibold" }, Ee = "__search", io = /* @__PURE__ */ ce({
1253
+ __name: "CollectionTable",
1254
+ props: {
1255
+ collection: {},
1256
+ rowActions: { type: Function, default: void 0 },
1257
+ rowLabel: { type: Function, default: void 0 },
1258
+ rowHeight: { default: void 0 },
1259
+ density: { default: "regular" },
1260
+ viewsPresentation: { default: "segmented" },
1261
+ actionsVisible: { type: Boolean, default: !1 }
1262
+ },
1263
+ setup(a) {
1264
+ const o = a, s = $e(), { t: p } = de(), n = Oe(), i = _(() => Object.keys($e()).filter((b) => b !== "toolbar" && b !== "empty")), u = _(() => o.collection.columns.value), { narrow: d, phone: h } = ut(() => u.value), v = _(() => o.collection.rows.value), V = (b) => o.collection.recordLocation(b), O = _(() => o.collection.query.value.search), D = _(() => o.collection.views.value.map((b) => ({ value: b.key, label: b.label, icon: b.icon, badge: b.count }))), x = le([]), j = (b) => x.value = [...x.value.filter((C) => !b.includes(C)), ...b], k = _(() => {
1265
+ const b = Qe(o.collection.filters.value, o.collection.query.value.filters, {
1266
+ formatNumber: (z) => n.number(z),
1267
+ from: p("core.collection.filters.range_from"),
1268
+ until: p("core.collection.filters.range_until")
1269
+ }), C = o.collection.query.value.search;
1270
+ return C && b.push({ key: Ee, label: p("core.collection.empty.search"), values: [C], clears: [] }), b;
1271
+ }), M = _(() => {
1272
+ for (const b of [...x.value].reverse()) {
1273
+ const C = k.value.find((z) => z.key === b || z.clears.includes(b));
1274
+ if (C) return C;
1275
+ }
1276
+ return k.value[k.value.length - 1] ?? null;
1277
+ });
1278
+ function B(b) {
1279
+ x.value = x.value.filter((C) => C !== b.key && !b.clears.includes(C)), b.key === Ee ? o.collection.search("") : o.collection.setFilters(Object.fromEntries(b.clears.map((C) => [C, null])));
1280
+ }
1281
+ function N() {
1282
+ x.value = [], o.collection.clearFilters();
1283
+ }
1284
+ const Q = _(() => {
1285
+ const { sort: b, direction: C } = o.collection.query.value;
1286
+ return b === null ? null : { key: b, direction: C };
1287
+ }), I = re("card"), K = () => I.value?.scrollIntoView?.({ block: "start", behavior: "smooth" }), te = _(() => o.collection.display.value === "loading"), Z = _(() => o.collection.query.value.pageSize), w = _(() => o.collection.state.value.status === "refreshing"), A = _(() => o.collection.state.value.status === "stale"), P = _(() => {
1288
+ const b = o.collection.state.value;
1289
+ return b.status === "failed" || b.status === "stale" ? b.error ?? "" : "";
1290
+ });
1291
+ return (b, C) => (f(), y("div", {
1292
+ class: "collection",
1293
+ "aria-busy": te.value || w.value || void 0,
1294
+ "data-test": "collection"
1295
+ }, [
1296
+ D.value.length > 0 ? (f(), y("div", lo, [
1297
+ S(l(He), {
1298
+ "model-value": o.collection.query.value.view,
1299
+ tabs: D.value,
1300
+ presentation: o.viewsPresentation,
1301
+ label: l(p)("core.collection.views_label"),
1302
+ "onUpdate:modelValue": C[0] || (C[0] = (z) => o.collection.setView(z === null ? null : String(z)))
1303
+ }, null, 8, ["model-value", "tabs", "presentation", "label"])
1304
+ ])) : T("", !0),
1305
+ r("div", {
1306
+ ref_key: "card",
1307
+ ref: I,
1308
+ class: oe(["scroll-mt-16", l(h) ? "" : "rounded-group bg-surface-cell shadow-group"])
1309
+ }, [
1310
+ S(eo, {
1311
+ collection: o.collection,
1312
+ narrow: l(d),
1313
+ flat: l(h),
1314
+ onTouched: j
1315
+ }, {
1316
+ default: F(() => [
1317
+ ue(b.$slots, "toolbar")
1318
+ ]),
1319
+ _: 3
1320
+ }, 8, ["collection", "narrow", "flat"]),
1321
+ w.value ? (f(), y("div", oo, [
1322
+ S(l(U), {
1323
+ name: "loader4Line",
1324
+ size: 14,
1325
+ class: "animate-spin motion-reduce:animate-none"
1326
+ }),
1327
+ G(" " + g(l(p)("core.state.refreshing")), 1)
1328
+ ])) : T("", !0),
1329
+ A.value ? (f(), y("div", no, [
1330
+ S(l(Fe), {
1331
+ tone: "warning",
1332
+ role: "alert"
1333
+ }, {
1334
+ default: F(() => [
1335
+ r("div", so, [
1336
+ r("div", null, [
1337
+ r("p", null, g(P.value), 1),
1338
+ r("p", null, g(l(p)("core.state.stale")), 1)
1339
+ ]),
1340
+ S(se, {
1341
+ prominence: "secondary",
1342
+ size: "sm",
1343
+ onClick: C[1] || (C[1] = (z) => o.collection.refresh())
1344
+ }, {
1345
+ default: F(() => [
1346
+ G(g(l(p)("core.actions.retry")), 1)
1347
+ ]),
1348
+ _: 1
1349
+ })
1350
+ ])
1351
+ ]),
1352
+ _: 1
1353
+ })
1354
+ ])) : T("", !0),
1355
+ S(dt, {
1356
+ columns: u.value,
1357
+ rows: v.value,
1358
+ "row-key": o.collection.rowKey,
1359
+ display: o.collection.display.value,
1360
+ phone: l(h),
1361
+ link: V,
1362
+ search: O.value,
1363
+ sorted: Q.value,
1364
+ "row-actions": o.rowActions,
1365
+ "row-label": o.rowLabel,
1366
+ "row-height": o.rowHeight,
1367
+ density: o.density,
1368
+ "actions-visible": o.actionsVisible,
1369
+ "skeleton-rows": Z.value,
1370
+ "reserve-rows": te.value ? Z.value : void 0,
1371
+ onSort: C[3] || (C[3] = (z) => o.collection.toggleSort(z))
1372
+ }, Me({
1373
+ failed: F(() => [
1374
+ S(l(Fe), {
1375
+ tone: "warning",
1376
+ role: "alert"
1377
+ }, {
1378
+ default: F(() => [
1379
+ r("div", ao, [
1380
+ r("div", null, [
1381
+ r("p", ro, g(l(p)("core.collection.failed.title")), 1),
1382
+ r("p", null, g(P.value), 1)
1383
+ ]),
1384
+ S(se, {
1385
+ prominence: "secondary",
1386
+ size: "sm",
1387
+ onClick: C[2] || (C[2] = (z) => o.collection.refresh())
1388
+ }, {
1389
+ default: F(() => [
1390
+ G(g(l(p)("core.actions.retry")), 1)
1391
+ ]),
1392
+ _: 1
1393
+ })
1394
+ ])
1395
+ ]),
1396
+ _: 1
1397
+ })
1398
+ ]),
1399
+ empty: F(() => [
1400
+ o.collection.display.value === "empty" && s.empty ? ue(b.$slots, "empty", {}, void 0, void 0, 0) : k.value.length > 0 ? (f(), W(jt, {
1401
+ key: 1,
1402
+ chips: k.value,
1403
+ "last-chip": M.value,
1404
+ onRemove: B,
1405
+ onClearAll: N
1406
+ }, null, 8, ["chips", "last-chip"])) : (f(), W(l(ct), {
1407
+ key: 2,
1408
+ title: l(p)("core.collection.no_data"),
1409
+ description: l(p)("core.collection.no_results")
1410
+ }, null, 8, ["title", "description"]))
1411
+ ]),
1412
+ _: 2
1413
+ }, [
1414
+ Y(i.value, (z) => ({
1415
+ name: z,
1416
+ fn: F((ae) => [
1417
+ ue(b.$slots, z, Be(Ie(ae ?? {})))
1418
+ ])
1419
+ }))
1420
+ ]), 1032, ["columns", "rows", "row-key", "display", "phone", "search", "sorted", "row-actions", "row-label", "row-height", "density", "actions-visible", "skeleton-rows", "reserve-rows"]),
1421
+ S(Jt, {
1422
+ collection: o.collection,
1423
+ compact: l(d),
1424
+ flat: l(h),
1425
+ onTurned: K
1426
+ }, null, 8, ["collection", "compact", "flat"])
1427
+ ], 2)
1428
+ ], 8, to));
1429
+ }
1430
+ }), Po = /* @__PURE__ */ ce({
1431
+ __name: "CollectionPage",
1432
+ props: {
1433
+ collection: {},
1434
+ title: {},
1435
+ description: { default: void 0 },
1436
+ icon: { default: void 0 },
1437
+ actions: { default: () => [] },
1438
+ rowActions: { type: Function, default: void 0 },
1439
+ rowLabel: { type: Function, default: void 0 },
1440
+ rowHeight: { default: void 0 },
1441
+ density: { default: "regular" },
1442
+ viewsPresentation: { default: "segmented" },
1443
+ actionsVisible: { type: Boolean, default: !1 }
1444
+ },
1445
+ setup(a) {
1446
+ const o = a, s = _(() => Object.keys($e()).filter((n) => n !== "default")), p = _(() => o.collection.total.value || null);
1447
+ return (n, i) => (f(), W(l(it), {
1448
+ title: o.title,
1449
+ description: o.description,
1450
+ icon: o.icon,
1451
+ count: p.value,
1452
+ actions: o.actions
1453
+ }, {
1454
+ default: F(() => [
1455
+ S(io, {
1456
+ collection: o.collection,
1457
+ "row-actions": o.rowActions,
1458
+ "row-label": o.rowLabel,
1459
+ "row-height": o.rowHeight,
1460
+ density: o.density,
1461
+ "views-presentation": o.viewsPresentation,
1462
+ "actions-visible": o.actionsVisible
1463
+ }, Me({ _: 2 }, [
1464
+ Y(s.value, (u) => ({
1465
+ name: u,
1466
+ fn: F((d) => [
1467
+ ue(n.$slots, u, Be(Ie(d ?? {})))
1468
+ ])
1469
+ }))
1470
+ ]), 1032, ["collection", "row-actions", "row-label", "row-height", "density", "views-presentation", "actions-visible"]),
1471
+ ue(n.$slots, "default")
1472
+ ]),
1473
+ _: 3
1474
+ }, 8, ["title", "description", "icon", "count", "actions"]));
1475
+ }
1476
+ });
1477
+ export {
1478
+ Po as _,
1479
+ io as a,
1480
+ Vo as u
1481
+ };