@nextcloud/vue 8.32.0 → 8.33.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 (602) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/dist/Components/NcActionButton.cjs +1 -1
  3. package/dist/Components/NcActionButton.mjs +1 -1
  4. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  5. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  6. package/dist/Components/NcActionCheckbox.cjs +1 -1
  7. package/dist/Components/NcActionCheckbox.mjs +1 -1
  8. package/dist/Components/NcActionInput.cjs +1 -1
  9. package/dist/Components/NcActionInput.mjs +1 -1
  10. package/dist/Components/NcActionLink.cjs +5 -5
  11. package/dist/Components/NcActionLink.cjs.map +1 -1
  12. package/dist/Components/NcActionLink.mjs +5 -5
  13. package/dist/Components/NcActionLink.mjs.map +1 -1
  14. package/dist/Components/NcActionRadio.cjs +1 -1
  15. package/dist/Components/NcActionRadio.mjs +1 -1
  16. package/dist/Components/NcActionRouter.cjs +4 -4
  17. package/dist/Components/NcActionRouter.cjs.map +1 -1
  18. package/dist/Components/NcActionRouter.mjs +4 -4
  19. package/dist/Components/NcActionRouter.mjs.map +1 -1
  20. package/dist/Components/NcActionText.cjs +4 -4
  21. package/dist/Components/NcActionText.cjs.map +1 -1
  22. package/dist/Components/NcActionText.mjs +4 -4
  23. package/dist/Components/NcActionText.mjs.map +1 -1
  24. package/dist/Components/NcActionTextEditable.cjs +1 -1
  25. package/dist/Components/NcActionTextEditable.mjs +1 -1
  26. package/dist/Components/NcActions.cjs +1 -1
  27. package/dist/Components/NcActions.mjs +1 -1
  28. package/dist/Components/NcAppContent.cjs +1 -1
  29. package/dist/Components/NcAppContent.mjs +1 -1
  30. package/dist/Components/NcAppNavigation.cjs +1 -1
  31. package/dist/Components/NcAppNavigation.mjs +1 -1
  32. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  33. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  34. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  35. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  36. package/dist/Components/NcAppNavigationNew.cjs +1 -1
  37. package/dist/Components/NcAppNavigationNew.mjs +1 -1
  38. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  39. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  40. package/dist/Components/NcAppNavigationSearch.cjs +1 -1
  41. package/dist/Components/NcAppNavigationSearch.mjs +1 -1
  42. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  43. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  44. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  45. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  46. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  47. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  48. package/dist/Components/NcAppSettingsSection.cjs +1 -1
  49. package/dist/Components/NcAppSettingsSection.mjs +1 -1
  50. package/dist/Components/NcAppSettingsSectionShortcuts.cjs +4 -0
  51. package/dist/Components/NcAppSettingsSectionShortcuts.cjs.map +1 -0
  52. package/dist/Components/NcAppSettingsSectionShortcuts.mjs +5 -0
  53. package/dist/Components/NcAppSettingsSectionShortcuts.mjs.map +1 -0
  54. package/dist/Components/NcAppSidebar.cjs +1 -1
  55. package/dist/Components/NcAppSidebar.mjs +1 -1
  56. package/dist/Components/NcAppSidebarTab.cjs +2 -3
  57. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  58. package/dist/Components/NcAppSidebarTab.mjs +2 -3
  59. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  60. package/dist/Components/NcAssistantButton.cjs +1 -1
  61. package/dist/Components/NcAssistantButton.mjs +1 -1
  62. package/dist/Components/NcAssistantIcon.cjs +1 -1
  63. package/dist/Components/NcAssistantIcon.mjs +1 -1
  64. package/dist/Components/NcAvatar.cjs +1 -1
  65. package/dist/Components/NcAvatar.mjs +1 -1
  66. package/dist/Components/NcBreadcrumb.cjs +1 -1
  67. package/dist/Components/NcBreadcrumb.mjs +1 -1
  68. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  69. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  70. package/dist/Components/NcButton.cjs +1 -1
  71. package/dist/Components/NcButton.mjs +1 -1
  72. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  73. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  74. package/dist/Components/NcChip.cjs +11 -17
  75. package/dist/Components/NcChip.cjs.map +1 -1
  76. package/dist/Components/NcChip.mjs +11 -17
  77. package/dist/Components/NcChip.mjs.map +1 -1
  78. package/dist/Components/NcCollectionList.cjs +1 -1
  79. package/dist/Components/NcCollectionList.mjs +1 -1
  80. package/dist/Components/NcColorPicker.cjs +1 -1
  81. package/dist/Components/NcColorPicker.mjs +1 -1
  82. package/dist/Components/NcContent.cjs +1 -1
  83. package/dist/Components/NcContent.mjs +1 -1
  84. package/dist/Components/NcCounterBubble.cjs +1 -1
  85. package/dist/Components/NcCounterBubble.mjs +1 -1
  86. package/dist/Components/NcDashboardWidget.cjs +1 -1
  87. package/dist/Components/NcDashboardWidget.mjs +1 -1
  88. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  89. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  90. package/dist/Components/NcDateTimePicker.cjs +17 -30
  91. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  92. package/dist/Components/NcDateTimePicker.mjs +17 -30
  93. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  94. package/dist/Components/NcDateTimePickerNative.cjs +14 -32
  95. package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
  96. package/dist/Components/NcDateTimePickerNative.mjs +14 -32
  97. package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
  98. package/dist/Components/NcDialog.cjs +1 -1
  99. package/dist/Components/NcDialog.mjs +1 -1
  100. package/dist/Components/NcDialogButton.cjs +1 -1
  101. package/dist/Components/NcDialogButton.mjs +1 -1
  102. package/dist/Components/NcEllipsisedOption.cjs +1 -1
  103. package/dist/Components/NcEllipsisedOption.mjs +1 -1
  104. package/dist/Components/NcEmojiPicker.cjs +1 -1
  105. package/dist/Components/NcEmojiPicker.mjs +1 -1
  106. package/dist/Components/NcEmptyContent.cjs +14 -9
  107. package/dist/Components/NcEmptyContent.cjs.map +1 -1
  108. package/dist/Components/NcEmptyContent.mjs +14 -9
  109. package/dist/Components/NcEmptyContent.mjs.map +1 -1
  110. package/dist/Components/NcHeaderButton.cjs +1 -1
  111. package/dist/Components/NcHeaderButton.mjs +1 -1
  112. package/dist/Components/NcHeaderMenu.cjs +1 -1
  113. package/dist/Components/NcHeaderMenu.mjs +1 -1
  114. package/dist/Components/NcHighlight.cjs +1 -1
  115. package/dist/Components/NcHighlight.mjs +1 -1
  116. package/dist/Components/NcHotkey.cjs +4 -0
  117. package/dist/Components/NcHotkey.cjs.map +1 -0
  118. package/dist/Components/NcHotkey.mjs +5 -0
  119. package/dist/Components/NcHotkey.mjs.map +1 -0
  120. package/dist/Components/NcHotkeyList.cjs +4 -0
  121. package/dist/Components/NcHotkeyList.cjs.map +1 -0
  122. package/dist/Components/NcHotkeyList.mjs +5 -0
  123. package/dist/Components/NcHotkeyList.mjs.map +1 -0
  124. package/dist/Components/NcIconSvgWrapper.cjs +1 -1
  125. package/dist/Components/NcIconSvgWrapper.mjs +1 -1
  126. package/dist/Components/NcInputField.cjs +1 -1
  127. package/dist/Components/NcInputField.mjs +1 -1
  128. package/dist/Components/NcKbd.cjs +2 -63
  129. package/dist/Components/NcKbd.cjs.map +1 -1
  130. package/dist/Components/NcKbd.mjs +2 -63
  131. package/dist/Components/NcKbd.mjs.map +1 -1
  132. package/dist/Components/NcListItem.cjs +1 -1
  133. package/dist/Components/NcListItem.mjs +1 -1
  134. package/dist/Components/NcListItemIcon.cjs +1 -1
  135. package/dist/Components/NcListItemIcon.mjs +1 -1
  136. package/dist/Components/NcModal.cjs +12 -13
  137. package/dist/Components/NcModal.cjs.map +1 -1
  138. package/dist/Components/NcModal.mjs +12 -13
  139. package/dist/Components/NcModal.mjs.map +1 -1
  140. package/dist/Components/NcNoteCard.cjs +2 -2
  141. package/dist/Components/NcNoteCard.mjs +2 -2
  142. package/dist/Components/NcPasswordField.cjs +1 -1
  143. package/dist/Components/NcPasswordField.mjs +1 -1
  144. package/dist/Components/NcPopover.cjs +1 -1
  145. package/dist/Components/NcPopover.mjs +1 -1
  146. package/dist/Components/NcProgressBar.cjs +1 -1
  147. package/dist/Components/NcProgressBar.mjs +1 -1
  148. package/dist/Components/NcRadioGroup.cjs +1 -1
  149. package/dist/Components/NcRadioGroup.mjs +1 -1
  150. package/dist/Components/NcRadioGroupButton.cjs +1 -1
  151. package/dist/Components/NcRadioGroupButton.mjs +1 -1
  152. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  153. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  154. package/dist/Components/NcRichContenteditable.cjs +2 -2
  155. package/dist/Components/NcRichContenteditable.mjs +2 -2
  156. package/dist/Components/NcRichText.cjs +3 -3
  157. package/dist/Components/NcRichText.mjs +4 -4
  158. package/dist/Components/NcSelect.cjs +1 -1
  159. package/dist/Components/NcSelect.mjs +1 -1
  160. package/dist/Components/NcSelectTags.cjs +1 -1
  161. package/dist/Components/NcSelectTags.mjs +1 -1
  162. package/dist/Components/NcSelectUsers.cjs +1 -1
  163. package/dist/Components/NcSelectUsers.mjs +1 -1
  164. package/dist/Components/NcSettingsInputText.cjs +1 -1
  165. package/dist/Components/NcSettingsInputText.mjs +1 -1
  166. package/dist/Components/NcSettingsSection.cjs +1 -1
  167. package/dist/Components/NcSettingsSection.mjs +1 -1
  168. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  169. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  170. package/dist/Components/NcTextArea.cjs +1 -1
  171. package/dist/Components/NcTextArea.mjs +1 -1
  172. package/dist/Components/NcTextField.cjs +1 -1
  173. package/dist/Components/NcTextField.mjs +1 -1
  174. package/dist/Components/NcThemeProvider.cjs +1 -1
  175. package/dist/Components/NcThemeProvider.mjs +1 -1
  176. package/dist/Components/NcTimezonePicker.cjs +1 -1
  177. package/dist/Components/NcTimezonePicker.mjs +1 -1
  178. package/dist/Components/NcUserBubble.cjs +1 -1
  179. package/dist/Components/NcUserBubble.mjs +1 -1
  180. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  181. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  182. package/dist/Components/NcVNodes.cjs +1 -2
  183. package/dist/Components/NcVNodes.cjs.map +1 -1
  184. package/dist/Components/NcVNodes.mjs +1 -2
  185. package/dist/Components/NcVNodes.mjs.map +1 -1
  186. package/dist/Composables/useFormatDateTime.cjs +12 -27
  187. package/dist/Composables/useFormatDateTime.cjs.map +1 -1
  188. package/dist/Composables/useFormatDateTime.mjs +12 -27
  189. package/dist/Composables/useFormatDateTime.mjs.map +1 -1
  190. package/dist/Composables/useHotKey.cjs +1 -2
  191. package/dist/Composables/useHotKey.cjs.map +1 -1
  192. package/dist/Composables/useHotKey.mjs +1 -2
  193. package/dist/Composables/useHotKey.mjs.map +1 -1
  194. package/dist/Composables/useIsDarkTheme.cjs +2 -5
  195. package/dist/Composables/useIsDarkTheme.cjs.map +1 -1
  196. package/dist/Composables/useIsDarkTheme.mjs +2 -5
  197. package/dist/Composables/useIsDarkTheme.mjs.map +1 -1
  198. package/dist/Directives/Linkify.cjs +1 -2
  199. package/dist/Directives/Linkify.cjs.map +1 -1
  200. package/dist/Directives/Linkify.mjs +1 -2
  201. package/dist/Directives/Linkify.mjs.map +1 -1
  202. package/dist/Functions/contactsMenu.cjs +2 -3
  203. package/dist/Functions/contactsMenu.cjs.map +1 -1
  204. package/dist/Functions/contactsMenu.mjs +2 -3
  205. package/dist/Functions/contactsMenu.mjs.map +1 -1
  206. package/dist/Functions/dialog.cjs +5 -20
  207. package/dist/Functions/dialog.cjs.map +1 -1
  208. package/dist/Functions/dialog.mjs +5 -20
  209. package/dist/Functions/dialog.mjs.map +1 -1
  210. package/dist/Functions/emoji.cjs +1 -1
  211. package/dist/Functions/emoji.mjs +1 -1
  212. package/dist/Functions/reference.cjs +2 -2
  213. package/dist/Functions/reference.mjs +2 -2
  214. package/dist/Functions/registerReference.cjs +1 -1
  215. package/dist/Functions/registerReference.mjs +1 -1
  216. package/dist/Functions/usernameToColor.cjs +1 -1
  217. package/dist/Functions/usernameToColor.mjs +1 -1
  218. package/dist/Mixins/richEditor.cjs +1 -1
  219. package/dist/Mixins/richEditor.mjs +1 -1
  220. package/dist/assets/{NcActionButton-DwJihiLc.css → NcActionButton-CG4V9b5b.css} +18 -18
  221. package/dist/assets/{NcActionCheckbox-DvdNISIs.css → NcActionCheckbox-C8I_k6NA.css} +12 -12
  222. package/dist/assets/{NcActionInput-DsGwr3wt.css → NcActionInput-BvPYSqDP.css} +65 -65
  223. package/dist/assets/{NcActionLink-7Wp6P-Nk.css → NcActionLink-BtpJIbvI.css} +13 -13
  224. package/dist/assets/{NcActionRadio-CLsR2Ore.css → NcActionRadio-CLIRNp3t.css} +12 -12
  225. package/dist/assets/{NcActionRouter-ByijfQtF.css → NcActionRouter-Bpv5Ywxq.css} +16 -16
  226. package/dist/assets/{NcActionText-CR_yvwWo.css → NcActionText-IMOkntPi.css} +18 -18
  227. package/dist/assets/{NcActionTextEditable-CCWTiT5c.css → NcActionTextEditable-BCmDMuUg.css} +65 -65
  228. package/dist/assets/{NcAppContent-BpjG38I8.css → NcAppContent-Ri_iNfn5.css} +4 -4
  229. package/dist/assets/{NcAppNavigationItem-UaB3qdsS.css → NcAppNavigationItem-DSL2nLRf.css} +36 -36
  230. package/dist/assets/{NcAppNavigationNewItem-Cjbn5XkO.css → NcAppNavigationNewItem-CYSjj3pD.css} +38 -38
  231. package/dist/assets/NcAppNavigationSettings-2Wh1E3Hq.css +53 -0
  232. package/dist/assets/{NcAppSettingsDialog-DH3DIIwL.css → NcAppSettingsDialog-2axspyf-.css} +10 -10
  233. package/dist/assets/{NcAppSettingsSection-Dq0eTGEp.css → NcAppSettingsSection-CLSVNQzv.css} +3 -3
  234. package/dist/assets/NcAppSettingsSectionShortcuts-BuI-s4kd.css +27 -0
  235. package/dist/assets/{NcChip-Cc17FJEC.css → NcChip-ByvuZS2-.css} +23 -11
  236. package/dist/assets/{NcDateTimePicker-C6sMtYzL.css → NcDateTimePicker-BmMuUpwr.css} +22 -22
  237. package/dist/assets/{NcEmptyContent-xdTcF0yQ.css → NcEmptyContent-CUFc_Dds.css} +9 -9
  238. package/dist/assets/{NcHeaderButton-CeT-dsLr.css → NcHeaderButton-DI-1Gsph.css} +9 -9
  239. package/dist/assets/{NcHeaderMenu-BXb9npZp.css → NcHeaderMenu-BkpmEa3M.css} +13 -13
  240. package/dist/assets/NcHotkey-QklVKSyr.css +44 -0
  241. package/dist/assets/NcHotkeyList-B42a0d8Z.css +9 -0
  242. package/dist/assets/{NcInputField-BI3vWgSo.css → NcInputField-CtUAgq1i.css} +42 -42
  243. package/dist/assets/{NcRadioGroupButton-6mf16D0h.css → NcRadioGroupButton-qxDfssOp.css} +13 -13
  244. package/dist/assets/{NcRichContenteditable-Ds_cptgr.css → NcRichContenteditable-CO5ziuZO.css} +12 -12
  245. package/dist/assets/{NcRichText-CVy4zTPr.css → NcRichText-BpXupu1n.css} +86 -87
  246. package/dist/chunks/{NcActionButton-CZsSFAT4.mjs → NcActionButton-CD1Z-o2Y.mjs} +6 -6
  247. package/dist/chunks/{NcActionButton-CZsSFAT4.mjs.map → NcActionButton-CD1Z-o2Y.mjs.map} +1 -1
  248. package/dist/chunks/{NcActionButton-lJ0IA3IS.cjs → NcActionButton-DSq_luox.cjs} +6 -6
  249. package/dist/chunks/{NcActionButton-lJ0IA3IS.cjs.map → NcActionButton-DSq_luox.cjs.map} +1 -1
  250. package/dist/chunks/{NcActionButtonGroup-CIvAeDpU.mjs → NcActionButtonGroup-Bd-SOAHU.mjs} +3 -3
  251. package/dist/chunks/{NcActionButtonGroup-CIvAeDpU.mjs.map → NcActionButtonGroup-Bd-SOAHU.mjs.map} +1 -1
  252. package/dist/chunks/{NcActionButtonGroup-CQZL14Nz.cjs → NcActionButtonGroup-DKVCsZhH.cjs} +3 -3
  253. package/dist/chunks/{NcActionButtonGroup-CQZL14Nz.cjs.map → NcActionButtonGroup-DKVCsZhH.cjs.map} +1 -1
  254. package/dist/chunks/{NcActionCheckbox-BAuN4ZMC.mjs → NcActionCheckbox-D9aQuEYw.mjs} +4 -4
  255. package/dist/chunks/{NcActionCheckbox-BAuN4ZMC.mjs.map → NcActionCheckbox-D9aQuEYw.mjs.map} +1 -1
  256. package/dist/chunks/{NcActionCheckbox-BvMmq0jL.cjs → NcActionCheckbox-ixZtnZR4.cjs} +4 -4
  257. package/dist/chunks/{NcActionCheckbox-BvMmq0jL.cjs.map → NcActionCheckbox-ixZtnZR4.cjs.map} +1 -1
  258. package/dist/chunks/{NcActionInput-DfjLV0Gg.cjs → NcActionInput-BMUreHhp.cjs} +10 -10
  259. package/dist/chunks/{NcActionInput-DfjLV0Gg.cjs.map → NcActionInput-BMUreHhp.cjs.map} +1 -1
  260. package/dist/chunks/{NcActionInput-CfznemNH.mjs → NcActionInput-D4MLI-0P.mjs} +10 -10
  261. package/dist/chunks/{NcActionInput-CfznemNH.mjs.map → NcActionInput-D4MLI-0P.mjs.map} +1 -1
  262. package/dist/chunks/{NcActionRadio-Bg5VuF7I.mjs → NcActionRadio-BmVR-lhZ.mjs} +4 -4
  263. package/dist/chunks/{NcActionRadio-CBh6AlC4.cjs.map → NcActionRadio-BmVR-lhZ.mjs.map} +1 -1
  264. package/dist/chunks/{NcActionRadio-CBh6AlC4.cjs → NcActionRadio-DPF0_wH9.cjs} +4 -4
  265. package/dist/chunks/{NcActionRadio-Bg5VuF7I.mjs.map → NcActionRadio-DPF0_wH9.cjs.map} +1 -1
  266. package/dist/chunks/{NcActionTextEditable-CSP4OjpU.mjs → NcActionTextEditable-5mNFl7Jm.mjs} +7 -7
  267. package/dist/chunks/{NcActionTextEditable-CSP4OjpU.mjs.map → NcActionTextEditable-5mNFl7Jm.mjs.map} +1 -1
  268. package/dist/chunks/{NcActionTextEditable-BhucWrOO.cjs → NcActionTextEditable-C8B1qqqe.cjs} +7 -7
  269. package/dist/chunks/NcActionTextEditable-C8B1qqqe.cjs.map +1 -0
  270. package/dist/chunks/{NcActions-A918mfXE.mjs → NcActions-BvFVkIzX.mjs} +64 -82
  271. package/dist/chunks/{NcActions-A918mfXE.mjs.map → NcActions-BvFVkIzX.mjs.map} +1 -1
  272. package/dist/chunks/{NcActions-D3N_As6c.cjs → NcActions-CF9VxHHD.cjs} +64 -82
  273. package/dist/chunks/{NcActions-D3N_As6c.cjs.map → NcActions-CF9VxHHD.cjs.map} +1 -1
  274. package/dist/chunks/{NcAppContent-CCyPMvUa.cjs → NcAppContent-BSyhjn2J.cjs} +23 -24
  275. package/dist/chunks/NcAppContent-BSyhjn2J.cjs.map +1 -0
  276. package/dist/chunks/{NcAppContent-DFlcxER-.mjs → NcAppContent-C7hwN-sU.mjs} +23 -24
  277. package/dist/chunks/NcAppContent-C7hwN-sU.mjs.map +1 -0
  278. package/dist/chunks/{NcAppNavigation-CLF6-i2t.mjs → NcAppNavigation-B2cKVKBH.mjs} +4 -5
  279. package/dist/chunks/{NcAppNavigation-CLF6-i2t.mjs.map → NcAppNavigation-B2cKVKBH.mjs.map} +1 -1
  280. package/dist/chunks/{NcAppNavigation-CCHYn0D6.cjs → NcAppNavigation-DApCpI_F.cjs} +4 -5
  281. package/dist/chunks/{NcAppNavigation-CCHYn0D6.cjs.map → NcAppNavigation-DApCpI_F.cjs.map} +1 -1
  282. package/dist/chunks/{NcAppNavigationCaption-DhW300oH.cjs → NcAppNavigationCaption-BOHmVyQb.cjs} +3 -3
  283. package/dist/chunks/{NcAppNavigationCaption-DhW300oH.cjs.map → NcAppNavigationCaption-BOHmVyQb.cjs.map} +1 -1
  284. package/dist/chunks/{NcAppNavigationCaption-CsG8P-1P.mjs → NcAppNavigationCaption-bTauZtcw.mjs} +3 -3
  285. package/dist/chunks/{NcAppNavigationCaption-CsG8P-1P.mjs.map → NcAppNavigationCaption-bTauZtcw.mjs.map} +1 -1
  286. package/dist/chunks/{NcAppNavigationItem-HZVy5JEa.cjs → NcAppNavigationItem-DbtR6u7Y.cjs} +10 -10
  287. package/dist/chunks/{NcAppNavigationItem-CwuKVEUN.mjs.map → NcAppNavigationItem-DbtR6u7Y.cjs.map} +1 -1
  288. package/dist/chunks/{NcAppNavigationItem-CwuKVEUN.mjs → NcAppNavigationItem-geCwhCsd.mjs} +10 -10
  289. package/dist/chunks/{NcAppNavigationItem-HZVy5JEa.cjs.map → NcAppNavigationItem-geCwhCsd.mjs.map} +1 -1
  290. package/dist/chunks/{NcAppNavigationNew-DbqusDUV.mjs → NcAppNavigationNew-BHzvRlVc.mjs} +2 -2
  291. package/dist/chunks/{NcAppNavigationNew-DbqusDUV.mjs.map → NcAppNavigationNew-BHzvRlVc.mjs.map} +1 -1
  292. package/dist/chunks/{NcAppNavigationNew-T56pahiu.cjs → NcAppNavigationNew-BYvFykgl.cjs} +2 -2
  293. package/dist/chunks/{NcAppNavigationNew-T56pahiu.cjs.map → NcAppNavigationNew-BYvFykgl.cjs.map} +1 -1
  294. package/dist/chunks/{NcAppNavigationNewItem-DMRZwa_y.cjs → NcAppNavigationNewItem-Dqnwa8Gl.cjs} +4 -4
  295. package/dist/chunks/{NcAppNavigationNewItem-DMRZwa_y.cjs.map → NcAppNavigationNewItem-Dqnwa8Gl.cjs.map} +1 -1
  296. package/dist/chunks/{NcAppNavigationNewItem-BsnZWCLW.mjs → NcAppNavigationNewItem-Yy56yPrn.mjs} +4 -4
  297. package/dist/chunks/{NcAppNavigationNewItem-BsnZWCLW.mjs.map → NcAppNavigationNewItem-Yy56yPrn.mjs.map} +1 -1
  298. package/dist/chunks/{NcAppNavigationSearch-DCMN2cWp.mjs → NcAppNavigationSearch-WfL4IPD8.mjs} +6 -10
  299. package/dist/chunks/{NcAppNavigationSearch-DCMN2cWp.mjs.map → NcAppNavigationSearch-WfL4IPD8.mjs.map} +1 -1
  300. package/dist/chunks/{NcAppNavigationSearch-BlG1xMok.cjs → NcAppNavigationSearch-pMlFjm9w.cjs} +6 -10
  301. package/dist/chunks/{NcAppNavigationSearch-BlG1xMok.cjs.map → NcAppNavigationSearch-pMlFjm9w.cjs.map} +1 -1
  302. package/dist/chunks/{NcAppNavigationSettings-n8OaxTbE.mjs → NcAppNavigationSettings-BhK7vlfP.mjs} +17 -11
  303. package/dist/chunks/NcAppNavigationSettings-BhK7vlfP.mjs.map +1 -0
  304. package/dist/chunks/{NcAppNavigationSettings-DlIDzhxh.cjs → NcAppNavigationSettings-C6qjJ3hF.cjs} +17 -11
  305. package/dist/chunks/NcAppNavigationSettings-C6qjJ3hF.cjs.map +1 -0
  306. package/dist/chunks/{NcAppNavigationToggle-Cn1UvxNP.cjs → NcAppNavigationToggle-8lSuagjd.cjs} +13 -14
  307. package/dist/chunks/{NcAppNavigationToggle-Cn1UvxNP.cjs.map → NcAppNavigationToggle-8lSuagjd.cjs.map} +1 -1
  308. package/dist/chunks/{NcAppNavigationToggle-ClYKr8Zn.mjs → NcAppNavigationToggle-DlnxjlcH.mjs} +13 -14
  309. package/dist/chunks/{NcAppNavigationToggle-ClYKr8Zn.mjs.map → NcAppNavigationToggle-DlnxjlcH.mjs.map} +1 -1
  310. package/dist/chunks/{NcAppSettingsDialog-R6Y-tl6d.cjs → NcAppSettingsDialog--RlMIfbo.cjs} +26 -28
  311. package/dist/chunks/NcAppSettingsDialog--RlMIfbo.cjs.map +1 -0
  312. package/dist/chunks/{NcAppSettingsDialog-Cpjr8Tca.mjs → NcAppSettingsDialog-8YaW7ud3.mjs} +27 -29
  313. package/dist/chunks/NcAppSettingsDialog-8YaW7ud3.mjs.map +1 -0
  314. package/dist/chunks/NcAppSettingsSection-DVrBPuLD.mjs +53 -0
  315. package/dist/chunks/NcAppSettingsSection-DVrBPuLD.mjs.map +1 -0
  316. package/dist/chunks/NcAppSettingsSection-OPWPqi2Y.cjs +52 -0
  317. package/dist/chunks/NcAppSettingsSection-OPWPqi2Y.cjs.map +1 -0
  318. package/dist/chunks/NcAppSettingsSectionShortcuts-CBYgfYGz.cjs +42 -0
  319. package/dist/chunks/NcAppSettingsSectionShortcuts-CBYgfYGz.cjs.map +1 -0
  320. package/dist/chunks/NcAppSettingsSectionShortcuts-CdP-4ktS.mjs +43 -0
  321. package/dist/chunks/NcAppSettingsSectionShortcuts-CdP-4ktS.mjs.map +1 -0
  322. package/dist/chunks/{NcAppSidebar-Ddt82bsA.cjs → NcAppSidebar-DLb6ALHL.cjs} +15 -18
  323. package/dist/chunks/{NcAppSidebar-Ddt82bsA.cjs.map → NcAppSidebar-DLb6ALHL.cjs.map} +1 -1
  324. package/dist/chunks/{NcAppSidebar-CVcOP4bk.mjs → NcAppSidebar-f7tuofzM.mjs} +15 -18
  325. package/dist/chunks/{NcAppSidebar-CVcOP4bk.mjs.map → NcAppSidebar-f7tuofzM.mjs.map} +1 -1
  326. package/dist/chunks/{NcAssistantButton-WQvWhoAr.cjs → NcAssistantButton-BMzPE7WA.cjs} +4 -4
  327. package/dist/chunks/{NcAssistantButton-WQvWhoAr.cjs.map → NcAssistantButton-BMzPE7WA.cjs.map} +1 -1
  328. package/dist/chunks/{NcAssistantButton-lDdWOemf.mjs → NcAssistantButton-enexPvoC.mjs} +4 -4
  329. package/dist/chunks/{NcAssistantButton-lDdWOemf.mjs.map → NcAssistantButton-enexPvoC.mjs.map} +1 -1
  330. package/dist/chunks/{NcAssistantIcon-RDQ8YhZE.cjs → NcAssistantIcon-DfVd2zWt.cjs} +4 -4
  331. package/dist/chunks/{NcAssistantIcon-RDQ8YhZE.cjs.map → NcAssistantIcon-DfVd2zWt.cjs.map} +1 -1
  332. package/dist/chunks/{NcAssistantIcon-BTjYuSQ9.mjs → NcAssistantIcon-XwQFzBgA.mjs} +4 -4
  333. package/dist/chunks/{NcAssistantIcon-BTjYuSQ9.mjs.map → NcAssistantIcon-XwQFzBgA.mjs.map} +1 -1
  334. package/dist/chunks/{NcAvatar-D_0Aw88L.cjs → NcAvatar-BwioPrbY.cjs} +23 -25
  335. package/dist/chunks/{NcAvatar-D_0Aw88L.cjs.map → NcAvatar-BwioPrbY.cjs.map} +1 -1
  336. package/dist/chunks/{NcAvatar-Cupl4prm.mjs → NcAvatar-DwUmx6Fg.mjs} +23 -25
  337. package/dist/chunks/{NcAvatar-Cupl4prm.mjs.map → NcAvatar-DwUmx6Fg.mjs.map} +1 -1
  338. package/dist/chunks/{NcBreadcrumb-FbePEaGS.cjs → NcBreadcrumb-B-zWjBNp.cjs} +6 -22
  339. package/dist/chunks/{NcBreadcrumb-FbePEaGS.cjs.map → NcBreadcrumb-B-zWjBNp.cjs.map} +1 -1
  340. package/dist/chunks/{NcBreadcrumb-VJGW992x.mjs → NcBreadcrumb-ljdZbX7p.mjs} +6 -22
  341. package/dist/chunks/{NcBreadcrumb-VJGW992x.mjs.map → NcBreadcrumb-ljdZbX7p.mjs.map} +1 -1
  342. package/dist/chunks/{NcBreadcrumbs-CrNBCyUa.cjs → NcBreadcrumbs-B6tPEu9b.cjs} +29 -47
  343. package/dist/chunks/{NcBreadcrumbs-DJSAcn8x.mjs.map → NcBreadcrumbs-B6tPEu9b.cjs.map} +1 -1
  344. package/dist/chunks/{NcBreadcrumbs-DJSAcn8x.mjs → NcBreadcrumbs-D2DtX3XC.mjs} +29 -47
  345. package/dist/chunks/{NcBreadcrumbs-CrNBCyUa.cjs.map → NcBreadcrumbs-D2DtX3XC.mjs.map} +1 -1
  346. package/dist/chunks/{NcButton-DK7bNZIL.cjs → NcButton-CJBZrdiL.cjs} +18 -33
  347. package/dist/chunks/{NcButton-D3CaJu1f.mjs.map → NcButton-CJBZrdiL.cjs.map} +1 -1
  348. package/dist/chunks/{NcButton-D3CaJu1f.mjs → NcButton-DUZTtFhr.mjs} +18 -33
  349. package/dist/chunks/{NcButton-DK7bNZIL.cjs.map → NcButton-DUZTtFhr.mjs.map} +1 -1
  350. package/dist/chunks/{NcCheckboxRadioSwitch-ezquUuPz.mjs → NcCheckboxRadioSwitch-NPJuwzqS.mjs} +8 -8
  351. package/dist/chunks/{NcCheckboxRadioSwitch-ezquUuPz.mjs.map → NcCheckboxRadioSwitch-NPJuwzqS.mjs.map} +1 -1
  352. package/dist/chunks/{NcCheckboxRadioSwitch-CDFUoj2J.cjs → NcCheckboxRadioSwitch-wSD3hWxs.cjs} +8 -8
  353. package/dist/chunks/{NcCheckboxRadioSwitch-CDFUoj2J.cjs.map → NcCheckboxRadioSwitch-wSD3hWxs.cjs.map} +1 -1
  354. package/dist/chunks/{NcCollectionList-zAI6Ysc0.cjs → NcCollectionList-Br6V_EiM.cjs} +7 -8
  355. package/dist/chunks/{NcCollectionList-zAI6Ysc0.cjs.map → NcCollectionList-Br6V_EiM.cjs.map} +1 -1
  356. package/dist/chunks/{NcCollectionList-w-7M5HGN.mjs → NcCollectionList-D85QdobI.mjs} +7 -8
  357. package/dist/chunks/{NcCollectionList-w-7M5HGN.mjs.map → NcCollectionList-D85QdobI.mjs.map} +1 -1
  358. package/dist/chunks/{NcColorPicker-DpLU-oKM.mjs → NcColorPicker-BoS26yac.mjs} +15 -35
  359. package/dist/chunks/{NcColorPicker-DpLU-oKM.mjs.map → NcColorPicker-BoS26yac.mjs.map} +1 -1
  360. package/dist/chunks/{NcColorPicker-F-UP8OaJ.cjs → NcColorPicker-Dg3d5_aQ.cjs} +15 -35
  361. package/dist/chunks/{NcColorPicker-F-UP8OaJ.cjs.map → NcColorPicker-Dg3d5_aQ.cjs.map} +1 -1
  362. package/dist/chunks/{NcContent-DITvuNbF.cjs → NcContent-BbPae-OV.cjs} +5 -5
  363. package/dist/chunks/{NcContent-DITvuNbF.cjs.map → NcContent-BbPae-OV.cjs.map} +1 -1
  364. package/dist/chunks/{NcContent-C0_AA_wt.mjs → NcContent-D8OFKv52.mjs} +5 -5
  365. package/dist/chunks/{NcContent-C0_AA_wt.mjs.map → NcContent-D8OFKv52.mjs.map} +1 -1
  366. package/dist/chunks/{NcCounterBubble-B_H3NCef.cjs → NcCounterBubble-hyvazclA.cjs} +4 -6
  367. package/dist/chunks/{NcCounterBubble-B_H3NCef.cjs.map → NcCounterBubble-hyvazclA.cjs.map} +1 -1
  368. package/dist/chunks/{NcCounterBubble-BKPpoBiy.mjs → NcCounterBubble-oxV8oMlX.mjs} +4 -6
  369. package/dist/chunks/{NcCounterBubble-BKPpoBiy.mjs.map → NcCounterBubble-oxV8oMlX.mjs.map} +1 -1
  370. package/dist/chunks/{NcDashboardWidget-CEL-DhKX.mjs → NcDashboardWidget-SSlGHcII.mjs} +5 -5
  371. package/dist/chunks/{NcDashboardWidget-CEL-DhKX.mjs.map → NcDashboardWidget-SSlGHcII.mjs.map} +1 -1
  372. package/dist/chunks/{NcDashboardWidget--n1nzfhg.cjs → NcDashboardWidget-mEPmvuR0.cjs} +5 -5
  373. package/dist/chunks/{NcDashboardWidget--n1nzfhg.cjs.map → NcDashboardWidget-mEPmvuR0.cjs.map} +1 -1
  374. package/dist/chunks/{NcDashboardWidgetItem-DeQtScn8.mjs → NcDashboardWidgetItem-BqlNJI6a.mjs} +4 -4
  375. package/dist/chunks/{NcDashboardWidgetItem-DeQtScn8.mjs.map → NcDashboardWidgetItem-BqlNJI6a.mjs.map} +1 -1
  376. package/dist/chunks/{NcDashboardWidgetItem-loanO02A.cjs → NcDashboardWidgetItem-C7AmqxH4.cjs} +4 -4
  377. package/dist/chunks/{NcDashboardWidgetItem-loanO02A.cjs.map → NcDashboardWidgetItem-C7AmqxH4.cjs.map} +1 -1
  378. package/dist/chunks/{NcDialog-BM_wTqUn.mjs → NcDialog-Bg0hY6TP.mjs} +3 -3
  379. package/dist/chunks/{NcDialog-BM_wTqUn.mjs.map → NcDialog-Bg0hY6TP.mjs.map} +1 -1
  380. package/dist/chunks/{NcDialog-CG2sufkb.cjs → NcDialog-D020rlVy.cjs} +3 -3
  381. package/dist/chunks/{NcDialog-CG2sufkb.cjs.map → NcDialog-D020rlVy.cjs.map} +1 -1
  382. package/dist/chunks/{NcDialogButton-DkfxsIhv.cjs → NcDialogButton-8JhFaC5X.cjs} +6 -7
  383. package/dist/chunks/{NcDialogButton-DkfxsIhv.cjs.map → NcDialogButton-8JhFaC5X.cjs.map} +1 -1
  384. package/dist/chunks/{NcDialogButton-Cr0wVMne.mjs → NcDialogButton-DSrC6lFd.mjs} +6 -7
  385. package/dist/chunks/{NcDialogButton-Cr0wVMne.mjs.map → NcDialogButton-DSrC6lFd.mjs.map} +1 -1
  386. package/dist/chunks/{NcEmojiPicker-BV_iVlIv.mjs → NcEmojiPicker-CAphjgaf.mjs} +12 -13
  387. package/dist/chunks/{NcEmojiPicker-BV_iVlIv.mjs.map → NcEmojiPicker-CAphjgaf.mjs.map} +1 -1
  388. package/dist/chunks/{NcEmojiPicker-fgsuVz7X.cjs → NcEmojiPicker-DwXhWYHY.cjs} +12 -13
  389. package/dist/chunks/{NcEmojiPicker-fgsuVz7X.cjs.map → NcEmojiPicker-DwXhWYHY.cjs.map} +1 -1
  390. package/dist/chunks/{NcHeaderButton-CNQVz4QP.cjs → NcHeaderButton-6kuTEKbj.cjs} +4 -4
  391. package/dist/chunks/{NcHeaderButton-CNQVz4QP.cjs.map → NcHeaderButton-6kuTEKbj.cjs.map} +1 -1
  392. package/dist/chunks/{NcHeaderButton-TJML067P.mjs → NcHeaderButton-TgPjfPtk.mjs} +4 -4
  393. package/dist/chunks/{NcHeaderButton-TJML067P.mjs.map → NcHeaderButton-TgPjfPtk.mjs.map} +1 -1
  394. package/dist/chunks/{NcHeaderMenu-BzyFhg55.cjs → NcHeaderMenu-CwjH_j0c.cjs} +10 -12
  395. package/dist/chunks/{NcHeaderMenu-D5ddiKnF.mjs.map → NcHeaderMenu-CwjH_j0c.cjs.map} +1 -1
  396. package/dist/chunks/{NcHeaderMenu-D5ddiKnF.mjs → NcHeaderMenu-Hk8OTuma.mjs} +10 -12
  397. package/dist/chunks/{NcHeaderMenu-BzyFhg55.cjs.map → NcHeaderMenu-Hk8OTuma.mjs.map} +1 -1
  398. package/dist/chunks/NcHotkey-BVMf1V89.mjs +60 -0
  399. package/dist/chunks/NcHotkey-BVMf1V89.mjs.map +1 -0
  400. package/dist/chunks/NcHotkey-CUPH5u09.cjs +59 -0
  401. package/dist/chunks/NcHotkey-CUPH5u09.cjs.map +1 -0
  402. package/dist/chunks/NcHotkeyList-CUjp1-hr.cjs +47 -0
  403. package/dist/chunks/NcHotkeyList-CUjp1-hr.cjs.map +1 -0
  404. package/dist/chunks/NcHotkeyList-jfSroQAQ.mjs +48 -0
  405. package/dist/chunks/NcHotkeyList-jfSroQAQ.mjs.map +1 -0
  406. package/dist/chunks/{NcIconSvgWrapper-BCVwmZN2.mjs → NcIconSvgWrapper-BreCg8pX.mjs} +2 -2
  407. package/dist/chunks/{NcIconSvgWrapper-BCVwmZN2.mjs.map → NcIconSvgWrapper-BreCg8pX.mjs.map} +1 -1
  408. package/dist/chunks/{NcIconSvgWrapper-DoVPfeNg.cjs → NcIconSvgWrapper-D-aKMbf3.cjs} +2 -2
  409. package/dist/chunks/{NcIconSvgWrapper-DoVPfeNg.cjs.map → NcIconSvgWrapper-D-aKMbf3.cjs.map} +1 -1
  410. package/dist/chunks/{NcInputConfirmCancel-DVVTaxWi.cjs → NcInputConfirmCancel-Bk_FQ5aA.cjs} +3 -3
  411. package/dist/chunks/{NcInputConfirmCancel-DVVTaxWi.cjs.map → NcInputConfirmCancel-Bk_FQ5aA.cjs.map} +1 -1
  412. package/dist/chunks/{NcInputConfirmCancel-C8WnMK2V.mjs → NcInputConfirmCancel-XPlRewAN.mjs} +3 -3
  413. package/dist/chunks/{NcInputConfirmCancel-C8WnMK2V.mjs.map → NcInputConfirmCancel-XPlRewAN.mjs.map} +1 -1
  414. package/dist/chunks/{NcInputField-LBv3nCrt.cjs → NcInputField-DAllLk3X.cjs} +12 -16
  415. package/dist/chunks/NcInputField-DAllLk3X.cjs.map +1 -0
  416. package/dist/chunks/{NcInputField-1ujONIvp.mjs → NcInputField-DUtDY_1I.mjs} +12 -16
  417. package/dist/chunks/NcInputField-DUtDY_1I.mjs.map +1 -0
  418. package/dist/chunks/NcKbd-BdW5UbhW.mjs +66 -0
  419. package/dist/chunks/NcKbd-BdW5UbhW.mjs.map +1 -0
  420. package/dist/chunks/NcKbd-CVBh8nyU.cjs +65 -0
  421. package/dist/chunks/NcKbd-CVBh8nyU.cjs.map +1 -0
  422. package/dist/chunks/{NcListItem-DFEvD1TA.cjs → NcListItem-D3HiK7ra.cjs} +7 -9
  423. package/dist/chunks/{NcListItem-DFEvD1TA.cjs.map → NcListItem-D3HiK7ra.cjs.map} +1 -1
  424. package/dist/chunks/{NcListItem-DNMfT12A.mjs → NcListItem-YVemqwZ_.mjs} +7 -9
  425. package/dist/chunks/{NcListItem-DNMfT12A.mjs.map → NcListItem-YVemqwZ_.mjs.map} +1 -1
  426. package/dist/chunks/{NcListItemIcon-PNp6Wael.mjs → NcListItemIcon-BKwmcXnO.mjs} +5 -6
  427. package/dist/chunks/{NcListItemIcon-PNp6Wael.mjs.map → NcListItemIcon-BKwmcXnO.mjs.map} +1 -1
  428. package/dist/chunks/{NcListItemIcon-OzD38-2R.cjs → NcListItemIcon-DL1VwHvL.cjs} +5 -6
  429. package/dist/chunks/{NcListItemIcon-OzD38-2R.cjs.map → NcListItemIcon-DL1VwHvL.cjs.map} +1 -1
  430. package/dist/chunks/{NcPasswordField-lqTDeja4.cjs → NcPasswordField-BeEYmL5N.cjs} +16 -29
  431. package/dist/chunks/{NcPasswordField-lqTDeja4.cjs.map → NcPasswordField-BeEYmL5N.cjs.map} +1 -1
  432. package/dist/chunks/{NcPasswordField-D2iDTTpp.mjs → NcPasswordField-CujpFQHq.mjs} +16 -29
  433. package/dist/chunks/{NcPasswordField-D2iDTTpp.mjs.map → NcPasswordField-CujpFQHq.mjs.map} +1 -1
  434. package/dist/chunks/{NcPopover-DrXnNOgM.cjs → NcPopover-BgUZkmjk.cjs} +8 -12
  435. package/dist/chunks/{NcPopover-nzbq2IjT.mjs.map → NcPopover-BgUZkmjk.cjs.map} +1 -1
  436. package/dist/chunks/{NcPopover-nzbq2IjT.mjs → NcPopover-gxcAqoEb.mjs} +8 -12
  437. package/dist/chunks/{NcPopover-DrXnNOgM.cjs.map → NcPopover-gxcAqoEb.mjs.map} +1 -1
  438. package/dist/chunks/{NcProgressBar-BwnuvxiZ.mjs → NcProgressBar-D7zYeXBH.mjs} +2 -2
  439. package/dist/chunks/{NcProgressBar-BwnuvxiZ.mjs.map → NcProgressBar-D7zYeXBH.mjs.map} +1 -1
  440. package/dist/chunks/{NcProgressBar-D10gQgAY.cjs → NcProgressBar-DvxA9bq5.cjs} +2 -2
  441. package/dist/chunks/{NcProgressBar-D10gQgAY.cjs.map → NcProgressBar-DvxA9bq5.cjs.map} +1 -1
  442. package/dist/chunks/{NcRadioGroup-DsnIVQZJ.cjs → NcRadioGroup-BZ-humrK.cjs} +5 -23
  443. package/dist/chunks/{NcRadioGroup-sZaH_3Y0.mjs.map → NcRadioGroup-BZ-humrK.cjs.map} +1 -1
  444. package/dist/chunks/{NcRadioGroup-sZaH_3Y0.mjs → NcRadioGroup-VKZJ0Vnh.mjs} +5 -23
  445. package/dist/chunks/{NcRadioGroup-DsnIVQZJ.cjs.map → NcRadioGroup-VKZJ0Vnh.mjs.map} +1 -1
  446. package/dist/chunks/{NcRadioGroupButton-B6m10k9G.mjs → NcRadioGroupButton-CD4tkF_s.mjs} +9 -9
  447. package/dist/chunks/{NcRadioGroupButton-B6m10k9G.mjs.map → NcRadioGroupButton-CD4tkF_s.mjs.map} +1 -1
  448. package/dist/chunks/{NcRadioGroupButton-CDf_01-t.cjs → NcRadioGroupButton-DrqgN-8C.cjs} +9 -9
  449. package/dist/chunks/{NcRadioGroupButton-CDf_01-t.cjs.map → NcRadioGroupButton-DrqgN-8C.cjs.map} +1 -1
  450. package/dist/chunks/{NcRelatedResourcesPanel-Q6jZk-Pm.mjs → NcRelatedResourcesPanel-BTyqVb_E.mjs} +35 -44
  451. package/dist/chunks/{NcRelatedResourcesPanel-Q6jZk-Pm.mjs.map → NcRelatedResourcesPanel-BTyqVb_E.mjs.map} +1 -1
  452. package/dist/chunks/{NcRelatedResourcesPanel-bfv-6W_Z.cjs → NcRelatedResourcesPanel-CO6jajKF.cjs} +35 -44
  453. package/dist/chunks/{NcRelatedResourcesPanel-bfv-6W_Z.cjs.map → NcRelatedResourcesPanel-CO6jajKF.cjs.map} +1 -1
  454. package/dist/chunks/{NcRichContenteditable-8_poOeSx.mjs → NcRichContenteditable-BivvoSO5.mjs} +32 -54
  455. package/dist/chunks/{NcRichContenteditable-8_poOeSx.mjs.map → NcRichContenteditable-BivvoSO5.mjs.map} +1 -1
  456. package/dist/chunks/{NcRichContenteditable-CtLNSs0S.cjs → NcRichContenteditable-BjxmdpS0.cjs} +32 -54
  457. package/dist/chunks/{NcRichContenteditable-CtLNSs0S.cjs.map → NcRichContenteditable-BjxmdpS0.cjs.map} +1 -1
  458. package/dist/chunks/{NcRichText-CEsiozf5.cjs → NcRichText-DoQg3Lha.cjs} +120 -111
  459. package/dist/chunks/{NcRichText-CEsiozf5.cjs.map → NcRichText-DoQg3Lha.cjs.map} +1 -1
  460. package/dist/chunks/{NcRichText-Dnx5x9WS.mjs → NcRichText-Dy5By94Y.mjs} +120 -113
  461. package/dist/chunks/{NcRichText-Dnx5x9WS.mjs.map → NcRichText-Dy5By94Y.mjs.map} +1 -1
  462. package/dist/chunks/{NcSelect-bo6wla87.cjs → NcSelect-Bw8EG_xU.cjs} +25 -42
  463. package/dist/chunks/{NcSelect-bo6wla87.cjs.map → NcSelect-Bw8EG_xU.cjs.map} +1 -1
  464. package/dist/chunks/{NcSelect-TjZw7TJ_.mjs → NcSelect-QVd6uJPA.mjs} +25 -42
  465. package/dist/chunks/{NcSelect-TjZw7TJ_.mjs.map → NcSelect-QVd6uJPA.mjs.map} +1 -1
  466. package/dist/chunks/{NcSelectTags-CytnLDOw.mjs → NcSelectTags-D-22teKJ.mjs} +28 -49
  467. package/dist/chunks/{NcSelectTags-D2OSaAfO.cjs.map → NcSelectTags-D-22teKJ.mjs.map} +1 -1
  468. package/dist/chunks/{NcSelectTags-D2OSaAfO.cjs → NcSelectTags-aGwTgIM-.cjs} +28 -49
  469. package/dist/chunks/{NcSelectTags-CytnLDOw.mjs.map → NcSelectTags-aGwTgIM-.cjs.map} +1 -1
  470. package/dist/chunks/{NcSelectUsers-Bm0877Tm.mjs → NcSelectUsers-DR6-q1aK.mjs} +7 -8
  471. package/dist/chunks/{NcSelectUsers-Bm0877Tm.mjs.map → NcSelectUsers-DR6-q1aK.mjs.map} +1 -1
  472. package/dist/chunks/{NcSelectUsers-wcRyExkC.cjs → NcSelectUsers-Qhrizan5.cjs} +7 -8
  473. package/dist/chunks/{NcSelectUsers-wcRyExkC.cjs.map → NcSelectUsers-Qhrizan5.cjs.map} +1 -1
  474. package/dist/chunks/{NcSettingsInputText-DaFMiOS6.cjs → NcSettingsInputText-O8870Grr.cjs} +4 -4
  475. package/dist/chunks/{NcSettingsInputText-DaFMiOS6.cjs.map → NcSettingsInputText-O8870Grr.cjs.map} +1 -1
  476. package/dist/chunks/{NcSettingsInputText-DPAtsY2T.mjs → NcSettingsInputText-Q8DDr-Yj.mjs} +4 -4
  477. package/dist/chunks/{NcSettingsInputText-DPAtsY2T.mjs.map → NcSettingsInputText-Q8DDr-Yj.mjs.map} +1 -1
  478. package/dist/chunks/{NcSettingsSection-r4NOxKIz.cjs → NcSettingsSection-DKpzo7eI.cjs} +3 -4
  479. package/dist/chunks/{NcSettingsSection-r4NOxKIz.cjs.map → NcSettingsSection-DKpzo7eI.cjs.map} +1 -1
  480. package/dist/chunks/{NcSettingsSection-CX5q924g.mjs → NcSettingsSection-VxcVEF8L.mjs} +3 -4
  481. package/dist/chunks/{NcSettingsSection-CX5q924g.mjs.map → NcSettingsSection-VxcVEF8L.mjs.map} +1 -1
  482. package/dist/chunks/{NcSettingsSelectGroup-DYYAPkgp.cjs → NcSettingsSelectGroup-BQWwtSEb.cjs} +10 -26
  483. package/dist/chunks/{NcSettingsSelectGroup-DYYAPkgp.cjs.map → NcSettingsSelectGroup-BQWwtSEb.cjs.map} +1 -1
  484. package/dist/chunks/{NcSettingsSelectGroup-CR4XLrgs.mjs → NcSettingsSelectGroup-CZ0EjeJb.mjs} +10 -26
  485. package/dist/chunks/{NcSettingsSelectGroup-CR4XLrgs.mjs.map → NcSettingsSelectGroup-CZ0EjeJb.mjs.map} +1 -1
  486. package/dist/chunks/{NcTextArea-If_ygOSv.mjs → NcTextArea-DHmD6-6s.mjs} +5 -5
  487. package/dist/chunks/{NcTextArea-If_ygOSv.mjs.map → NcTextArea-DHmD6-6s.mjs.map} +1 -1
  488. package/dist/chunks/{NcTextArea-iDhGI-Ko.cjs → NcTextArea-DkVtHTpD.cjs} +5 -5
  489. package/dist/chunks/{NcTextArea-iDhGI-Ko.cjs.map → NcTextArea-DkVtHTpD.cjs.map} +1 -1
  490. package/dist/chunks/{NcTextField-OPiMgNR7.cjs → NcTextField-52Fnd27A.cjs} +17 -31
  491. package/dist/chunks/{NcTextField-OPiMgNR7.cjs.map → NcTextField-52Fnd27A.cjs.map} +1 -1
  492. package/dist/chunks/{NcTextField-BE9R1pLt.mjs → NcTextField-CVfixgfj.mjs} +17 -31
  493. package/dist/chunks/{NcTextField-BE9R1pLt.mjs.map → NcTextField-CVfixgfj.mjs.map} +1 -1
  494. package/dist/chunks/{NcThemeProvider-E_S5rhIQ.mjs → NcThemeProvider-25ResoIv.mjs} +2 -2
  495. package/dist/chunks/{NcThemeProvider-E_S5rhIQ.mjs.map → NcThemeProvider-25ResoIv.mjs.map} +1 -1
  496. package/dist/chunks/{NcThemeProvider-DbNRSwkX.cjs → NcThemeProvider-BqGPTeWg.cjs} +2 -2
  497. package/dist/chunks/{NcThemeProvider-DbNRSwkX.cjs.map → NcThemeProvider-BqGPTeWg.cjs.map} +1 -1
  498. package/dist/chunks/{NcTimezonePicker-D4y736xC.mjs → NcTimezonePicker-BInLNCSt.mjs} +6 -6
  499. package/dist/chunks/{NcTimezonePicker-D4y736xC.mjs.map → NcTimezonePicker-BInLNCSt.mjs.map} +1 -1
  500. package/dist/chunks/{NcTimezonePicker-DPpWz5fa.cjs → NcTimezonePicker-CtFsF-jG.cjs} +6 -6
  501. package/dist/chunks/{NcTimezonePicker-DPpWz5fa.cjs.map → NcTimezonePicker-CtFsF-jG.cjs.map} +1 -1
  502. package/dist/chunks/{NcUserBubble-Bb9WBP1S.cjs → NcUserBubble-ByvVV8jh.cjs} +6 -7
  503. package/dist/chunks/{NcUserBubble-Bb9WBP1S.cjs.map → NcUserBubble-ByvVV8jh.cjs.map} +1 -1
  504. package/dist/chunks/{NcUserBubble-8Mts76ii.mjs → NcUserBubble-sIUM-Rru.mjs} +6 -7
  505. package/dist/chunks/{NcUserBubble-8Mts76ii.mjs.map → NcUserBubble-sIUM-Rru.mjs.map} +1 -1
  506. package/dist/chunks/{NcUserStatusIcon-DV2H-KfR.cjs → NcUserStatusIcon-CYsrjxDh.cjs} +9 -12
  507. package/dist/chunks/{NcUserStatusIcon-DV2H-KfR.cjs.map → NcUserStatusIcon-CYsrjxDh.cjs.map} +1 -1
  508. package/dist/chunks/{NcUserStatusIcon-BWxo_etm.mjs → NcUserStatusIcon-DZI9jlXE.mjs} +9 -12
  509. package/dist/chunks/{NcUserStatusIcon-BWxo_etm.mjs.map → NcUserStatusIcon-DZI9jlXE.mjs.map} +1 -1
  510. package/dist/chunks/{ScopeComponent-CDX-s-IV.cjs → ScopeComponent-BCznIxFT.cjs} +2 -2
  511. package/dist/chunks/{ScopeComponent-CDX-s-IV.cjs.map → ScopeComponent-BCznIxFT.cjs.map} +1 -1
  512. package/dist/chunks/{ScopeComponent-DsONbC6w.mjs → ScopeComponent-CNZ_b7IG.mjs} +2 -2
  513. package/dist/chunks/{ScopeComponent-DsONbC6w.mjs.map → ScopeComponent-CNZ_b7IG.mjs.map} +1 -1
  514. package/dist/chunks/{_l10n-DSLCwJSN.mjs → _l10n-BWisB7-O.mjs} +43 -43
  515. package/dist/chunks/_l10n-BWisB7-O.mjs.map +1 -0
  516. package/dist/chunks/{_l10n-9b4TMo5Q.cjs → _l10n-eOBJ3Dwl.cjs} +24 -24
  517. package/dist/chunks/{_l10n-9b4TMo5Q.cjs.map → _l10n-eOBJ3Dwl.cjs.map} +1 -1
  518. package/dist/chunks/{actionText-ZM1k96ts.mjs → actionText-BMig9Egt.mjs} +2 -2
  519. package/dist/chunks/{actionText-ZM1k96ts.mjs.map → actionText-BMig9Egt.mjs.map} +1 -1
  520. package/dist/chunks/{actionText-D_3-6fCH.cjs → actionText-D2-z0ud3.cjs} +2 -2
  521. package/dist/chunks/{actionText-D_3-6fCH.cjs.map → actionText-D2-z0ud3.cjs.map} +1 -1
  522. package/dist/chunks/{colors-DcbJ13is.cjs → colors-BsDQ1Yz3.cjs} +4 -4
  523. package/dist/chunks/{colors-DcbJ13is.cjs.map → colors-BsDQ1Yz3.cjs.map} +1 -1
  524. package/dist/chunks/{colors-BMiIMYXK.mjs → colors-D3xlq-id.mjs} +4 -4
  525. package/dist/chunks/{colors-BMiIMYXK.mjs.map → colors-D3xlq-id.mjs.map} +1 -1
  526. package/dist/chunks/createElementId-DhjFt1I9.mjs +8 -0
  527. package/dist/chunks/{createElementId-5skgwxOP.mjs.map → createElementId-DhjFt1I9.mjs.map} +1 -1
  528. package/dist/chunks/createElementId-lalylSCf.cjs +7 -0
  529. package/dist/chunks/{createElementId-DaJhnLzq.cjs.map → createElementId-lalylSCf.cjs.map} +1 -1
  530. package/dist/chunks/{customPickerElements-BPROmh4T.mjs → customPickerElements-DLFtgReB.mjs} +21 -43
  531. package/dist/chunks/{customPickerElements-BPROmh4T.mjs.map → customPickerElements-DLFtgReB.mjs.map} +1 -1
  532. package/dist/chunks/{customPickerElements-DBEOrbce.cjs → customPickerElements-GyIIOHiQ.cjs} +21 -43
  533. package/dist/chunks/{customPickerElements-DBEOrbce.cjs.map → customPickerElements-GyIIOHiQ.cjs.map} +1 -1
  534. package/dist/chunks/{emoji-V6ytyzoR.mjs → emoji-BY_D0V5K.mjs} +3 -4
  535. package/dist/chunks/{emoji-V6ytyzoR.mjs.map → emoji-BY_D0V5K.mjs.map} +1 -1
  536. package/dist/chunks/{emoji-BCCCB3t3.cjs → emoji-VgSjNTd5.cjs} +3 -4
  537. package/dist/chunks/{emoji-BCCCB3t3.cjs.map → emoji-VgSjNTd5.cjs.map} +1 -1
  538. package/dist/chunks/{focusTrap-DhhUL4JZ.cjs → focusTrap-DUTqW_IG.cjs} +2 -3
  539. package/dist/chunks/{focusTrap-BibOtksr.mjs.map → focusTrap-DUTqW_IG.cjs.map} +1 -1
  540. package/dist/chunks/{focusTrap-BibOtksr.mjs → focusTrap-HJQ4pqHV.mjs} +2 -3
  541. package/dist/chunks/{focusTrap-DhhUL4JZ.cjs.map → focusTrap-HJQ4pqHV.mjs.map} +1 -1
  542. package/dist/chunks/getAvatarUrl-Du9Y3cPO.cjs +14 -0
  543. package/dist/chunks/{getAvatarUrl-DwWyuiUZ.cjs.map → getAvatarUrl-Du9Y3cPO.cjs.map} +1 -1
  544. package/dist/chunks/getAvatarUrl-IhLacDEr.mjs +15 -0
  545. package/dist/chunks/{getAvatarUrl-C8Q41hfR.mjs.map → getAvatarUrl-IhLacDEr.mjs.map} +1 -1
  546. package/dist/chunks/{index-D_jGr37E.cjs → index-CgkN1xho.cjs} +9 -9
  547. package/dist/chunks/{index-D_jGr37E.cjs.map → index-CgkN1xho.cjs.map} +1 -1
  548. package/dist/chunks/{index-JArK0Dbx.mjs → index-CxTT94_h.mjs} +4 -22
  549. package/dist/chunks/{index-JArK0Dbx.mjs.map → index-CxTT94_h.mjs.map} +1 -1
  550. package/dist/chunks/{index-CmwBGDjr.cjs → index-Dr9k4hIP.cjs} +4 -22
  551. package/dist/chunks/{index-CmwBGDjr.cjs.map → index-Dr9k4hIP.cjs.map} +1 -1
  552. package/dist/chunks/{index-BsEMR4S4.mjs → index-TmAR7I2T.mjs} +9 -9
  553. package/dist/chunks/{index-BsEMR4S4.mjs.map → index-TmAR7I2T.mjs.map} +1 -1
  554. package/dist/chunks/legacy-KBXhWdRy.cjs +5 -0
  555. package/dist/chunks/{legacy-NU_qxPFK.mjs.map → legacy-KBXhWdRy.cjs.map} +1 -1
  556. package/dist/chunks/legacy-MK4GvP26.mjs +6 -0
  557. package/dist/chunks/{legacy-DUgfmdiS.cjs.map → legacy-MK4GvP26.mjs.map} +1 -1
  558. package/dist/chunks/{referencePickerModal-DpJUQ5fq.mjs → referencePickerModal-Cl3fIc9s.mjs} +34 -65
  559. package/dist/chunks/{referencePickerModal-DpJUQ5fq.mjs.map → referencePickerModal-Cl3fIc9s.mjs.map} +1 -1
  560. package/dist/chunks/{referencePickerModal-CusxgEsK.cjs → referencePickerModal-Dz1h1EHq.cjs} +34 -65
  561. package/dist/chunks/{referencePickerModal-CusxgEsK.cjs.map → referencePickerModal-Dz1h1EHq.cjs.map} +1 -1
  562. package/dist/chunks/useAppSettingsDialog-CPqmms-u.cjs.map +1 -1
  563. package/dist/chunks/useAppSettingsDialog-Dn48dw1k.mjs.map +1 -1
  564. package/dist/chunks/{useModelMigration-HPf30klj.cjs → useModelMigration-D5zhrNXr.cjs} +2 -2
  565. package/dist/chunks/{useModelMigration-HPf30klj.cjs.map → useModelMigration-D5zhrNXr.cjs.map} +1 -1
  566. package/dist/chunks/{useModelMigration-DBUi8saj.mjs → useModelMigration-EhAWvqDD.mjs} +2 -2
  567. package/dist/chunks/{useModelMigration-DBUi8saj.mjs.map → useModelMigration-EhAWvqDD.mjs.map} +1 -1
  568. package/dist/chunks/{useTrapStackControl-2gEo3rvr.mjs → useTrapStackControl-BnLfCgGU.mjs} +2 -2
  569. package/dist/chunks/{useTrapStackControl-2gEo3rvr.mjs.map → useTrapStackControl-BnLfCgGU.mjs.map} +1 -1
  570. package/dist/chunks/{useTrapStackControl-dthvITlQ.cjs → useTrapStackControl-XYABY64G.cjs} +2 -2
  571. package/dist/chunks/{useTrapStackControl-dthvITlQ.cjs.map → useTrapStackControl-XYABY64G.cjs.map} +1 -1
  572. package/dist/components/NcAppSettingsDialog/useAppSettingsDialog.d.ts +3 -2
  573. package/dist/components/NcAppSettingsSection/index.d.ts +5 -0
  574. package/dist/components/NcAppSettingsSectionShortcuts/index.d.ts +1 -0
  575. package/dist/components/NcHotkey/index.d.ts +1 -0
  576. package/dist/components/NcHotkeyList/index.d.ts +1 -0
  577. package/dist/index.cjs +74 -65
  578. package/dist/index.cjs.map +1 -1
  579. package/dist/index.mjs +76 -67
  580. package/dist/index.mjs.map +1 -1
  581. package/package.json +11 -12
  582. package/dist/assets/NcAppNavigationSettings-1YRzh-xl.css +0 -74
  583. package/dist/chunks/NcActionTextEditable-BhucWrOO.cjs.map +0 -1
  584. package/dist/chunks/NcAppContent-CCyPMvUa.cjs.map +0 -1
  585. package/dist/chunks/NcAppContent-DFlcxER-.mjs.map +0 -1
  586. package/dist/chunks/NcAppNavigationSettings-DlIDzhxh.cjs.map +0 -1
  587. package/dist/chunks/NcAppNavigationSettings-n8OaxTbE.mjs.map +0 -1
  588. package/dist/chunks/NcAppSettingsDialog-Cpjr8Tca.mjs.map +0 -1
  589. package/dist/chunks/NcAppSettingsDialog-R6Y-tl6d.cjs.map +0 -1
  590. package/dist/chunks/NcAppSettingsSection-BNVlt4g0.mjs +0 -88
  591. package/dist/chunks/NcAppSettingsSection-BNVlt4g0.mjs.map +0 -1
  592. package/dist/chunks/NcAppSettingsSection-CTqViPnP.cjs +0 -87
  593. package/dist/chunks/NcAppSettingsSection-CTqViPnP.cjs.map +0 -1
  594. package/dist/chunks/NcInputField-1ujONIvp.mjs.map +0 -1
  595. package/dist/chunks/NcInputField-LBv3nCrt.cjs.map +0 -1
  596. package/dist/chunks/_l10n-DSLCwJSN.mjs.map +0 -1
  597. package/dist/chunks/createElementId-5skgwxOP.mjs +0 -9
  598. package/dist/chunks/createElementId-DaJhnLzq.cjs +0 -8
  599. package/dist/chunks/getAvatarUrl-C8Q41hfR.mjs +0 -16
  600. package/dist/chunks/getAvatarUrl-DwWyuiUZ.cjs +0 -15
  601. package/dist/chunks/legacy-DUgfmdiS.cjs +0 -6
  602. package/dist/chunks/legacy-NU_qxPFK.mjs +0 -7
@@ -16,8 +16,7 @@ const _sfc_main = {
16
16
  * @return {object} The created VNode
17
17
  */
18
18
  render() {
19
- var _a, _b, _c;
20
- return this.vnodes || ((_a = this.$slots) == null ? void 0 : _a.default) || ((_c = (_b = this.$scopedSlots) == null ? void 0 : _b.default) == null ? void 0 : _c.call(_b));
19
+ return this.vnodes || this.$slots?.default || this.$scopedSlots?.default?.();
21
20
  }
22
21
  };
23
22
  const _sfc_render = null;
@@ -1 +1 @@
1
- {"version":3,"file":"NcVNodes.mjs","sources":["../../src/components/NcVNodes/NcVNodes.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nA util component to render a VNode or an array of VNodes from the prop or the default slot.\n\n### Render the given or generated VNodes\n\n```vue\n<template>\n\t<NcVNodes :vnodes=\"renderDiv()\" />\n</template>\n\n<script>\nexport default {\n\tmethods: {\n\t\trenderDiv() {\n\t\t\treturn this.$createElement('div', 'This div was created programmatically as a VNode')\n\t\t},\n\t}\n}\n</script>\n```\n\n### Render content in a conditional wrapper\n\n```vue\n<template>\n\t<div>\n\t\t<p>\n\t\t\t<NcCheckboxRadioSwitch :checked.sync=\"shouldRenderNcNoteCard\">Render text inside \"NcNoteCard\"</NcCheckboxRadioSwitch>\n\t\t</p>\n\t\t<component :is=\"shouldRenderNcNoteCard ? 'NcNoteCard' : 'NcVNodes'\">\n\t\t\t<p>This content is rendered {{ shouldRenderNcNoteCard ? 'with' : 'without' }} a \"NcNoteCard\" wrapper</p>\n\t\t</component>\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshouldRenderNcNoteCard: true,\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<script>\nexport default {\n\tname: 'NcVNodes',\n\tprops: {\n\t\t/**\n\t\t * The vnodes to render\n\t\t */\n\t\tvnodes: {\n\t\t\ttype: [Array, Object],\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\t/**\n\t * The render function to display the component\n\t *\n\t * @return {object} The created VNode\n\t */\n\trender() {\n\t\t// eslint-disable-next-line jsdoc/check-tag-names\n\t\t/** @slot Directly rendered content */\n\t\treturn this.vnodes || this.$slots?.default || this.$scopedSlots?.default?.()\n\t},\n}\n</script>\n"],"names":[],"mappings":";AAqDA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,QAAA;AAAA,MACA,MAAA,CAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAA;;AAGA,WAAA,KAAA,YAAA,UAAA,WAAA,mBAAA,cAAA,gBAAA,iBAAA,mBAAA,YAAA;AAAA,EACA;AACA;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcVNodes.mjs","sources":["../../src/components/NcVNodes/NcVNodes.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nA util component to render a VNode or an array of VNodes from the prop or the default slot.\n\n### Render the given or generated VNodes\n\n```vue\n<template>\n\t<NcVNodes :vnodes=\"renderDiv()\" />\n</template>\n\n<script>\nexport default {\n\tmethods: {\n\t\trenderDiv() {\n\t\t\treturn this.$createElement('div', 'This div was created programmatically as a VNode')\n\t\t},\n\t}\n}\n</script>\n```\n\n### Render content in a conditional wrapper\n\n```vue\n<template>\n\t<div>\n\t\t<p>\n\t\t\t<NcCheckboxRadioSwitch :checked.sync=\"shouldRenderNcNoteCard\">Render text inside \"NcNoteCard\"</NcCheckboxRadioSwitch>\n\t\t</p>\n\t\t<component :is=\"shouldRenderNcNoteCard ? 'NcNoteCard' : 'NcVNodes'\">\n\t\t\t<p>This content is rendered {{ shouldRenderNcNoteCard ? 'with' : 'without' }} a \"NcNoteCard\" wrapper</p>\n\t\t</component>\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshouldRenderNcNoteCard: true,\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<script>\nexport default {\n\tname: 'NcVNodes',\n\tprops: {\n\t\t/**\n\t\t * The vnodes to render\n\t\t */\n\t\tvnodes: {\n\t\t\ttype: [Array, Object],\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\t/**\n\t * The render function to display the component\n\t *\n\t * @return {object} The created VNode\n\t */\n\trender() {\n\t\t// eslint-disable-next-line jsdoc/check-tag-names\n\t\t/** @slot Directly rendered content */\n\t\treturn this.vnodes || this.$slots?.default || this.$scopedSlots?.default?.()\n\t},\n}\n</script>\n"],"names":[],"mappings":";AAqDA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,QAAA;AAAA,MACA,MAAA,CAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAA;AAGA,WAAA,KAAA,UAAA,KAAA,QAAA,WAAA,KAAA,cAAA,UAAA;AAAA,EACA;AACA;;;;;;;;;;;;"}
@@ -3,27 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const l10n = require("@nextcloud/l10n");
4
4
  const core = require("@vueuse/core");
5
5
  const Vue = require("vue");
6
- const _l10n = require("../chunks/_l10n-9b4TMo5Q.cjs");
6
+ const _l10n = require("../chunks/_l10n-eOBJ3Dwl.cjs");
7
7
  _l10n.register(_l10n.t2);
8
- var __defProp = Object.defineProperty;
9
- var __defProps = Object.defineProperties;
10
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
11
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
12
- var __hasOwnProp = Object.prototype.hasOwnProperty;
13
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
14
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15
- var __spreadValues = (a, b) => {
16
- for (var prop in b || (b = {}))
17
- if (__hasOwnProp.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- if (__getOwnPropSymbols)
20
- for (var prop of __getOwnPropSymbols(b)) {
21
- if (__propIsEnum.call(b, prop))
22
- __defNormalProp(a, prop, b[prop]);
23
- }
24
- return a;
25
- };
26
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27
8
  const FEW_SECONDS_AGO = {
28
9
  long: _l10n.t("a few seconds ago"),
29
10
  short: _l10n.t("seconds ago"),
@@ -36,9 +17,11 @@ function useFormatRelativeTime(timestamp = Date.now(), opts = {}) {
36
17
  const date = Vue.computed(() => new Date(core.toValue(timestamp)));
37
18
  const options = Vue.computed(() => {
38
19
  const { language, relativeTime: relativeTime2, ignoreSeconds } = core.toValue(opts);
39
- return __spreadProps(__spreadValues(__spreadValues({}, language && { language }), relativeTime2 && { relativeTime: relativeTime2 }), {
20
+ return {
21
+ ...language && { language },
22
+ ...relativeTime2 && { relativeTime: relativeTime2 },
40
23
  ignoreSeconds: ignoreSeconds ? FEW_SECONDS_AGO[relativeTime2 || "long"] : false
41
- });
24
+ };
42
25
  });
43
26
  const relativeTime = Vue.ref("");
44
27
  Vue.watchEffect(() => updateRelativeTime());
@@ -54,10 +37,11 @@ function useFormatRelativeTime(timestamp = Date.now(), opts = {}) {
54
37
  return Vue.readonly(relativeTime);
55
38
  }
56
39
  function useFormatTime(timestamp, opts) {
57
- const options = Vue.computed(() => __spreadValues({
40
+ const options = Vue.computed(() => ({
58
41
  locale: l10n.getCanonicalLocale(),
59
- format: { dateStyle: "short", timeStyle: "medium" }
60
- }, core.toValue(opts)));
42
+ format: { dateStyle: "short", timeStyle: "medium" },
43
+ ...core.toValue(opts)
44
+ }));
61
45
  const formatter = Vue.computed(() => new Intl.DateTimeFormat(options.value.locale, options.value.format));
62
46
  return Vue.computed(() => formatter.value.format(core.toValue(timestamp)));
63
47
  }
@@ -65,9 +49,10 @@ function useFormatDateTime(timestamp = Date.now(), opts = {}) {
65
49
  const formattedFullTime = useFormatTime(timestamp, opts);
66
50
  const relativeTime = useFormatRelativeTime(timestamp, Vue.computed(() => {
67
51
  const options = core.toValue(opts);
68
- return __spreadProps(__spreadValues({}, options), {
52
+ return {
53
+ ...options,
69
54
  relativeTime: typeof options.relativeTime === "string" ? options.relativeTime : "long"
70
- });
55
+ };
71
56
  }));
72
57
  const formattedTime = Vue.computed(() => core.toValue(opts).relativeTime !== false ? relativeTime.value : formattedFullTime.value);
73
58
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"useFormatDateTime.cjs","sources":["../../src/composables/useFormatDateTime/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { FormatDateOptions } from '@nextcloud/l10n'\nimport type { MaybeRefOrGetter } from '@vueuse/core'\nimport type { Ref } from 'vue'\n\nimport { formatRelativeTime, getCanonicalLocale } from '@nextcloud/l10n'\nimport { toValue } from '@vueuse/core'\nimport { computed, onUnmounted, readonly, ref, watchEffect } from 'vue'\nimport { t } from '../../l10n.js'\n\ninterface FormatRelativeTimeOptions extends Partial<Omit<FormatDateOptions, 'ignoreSeconds'>> {\n\tignoreSeconds?: boolean\n\n\t/**\n\t * If set to false the relative time will not be updated anymore.\n\t *\n\t * @default true - Meaning the relative time will be updated if needed\n\t */\n\tupdate?: boolean\n}\n\ninterface FormatTimeOptions {\n\t/**\n\t * Locale to use for formatting.\n\t *\n\t * @default current locale\n\t */\n\tlocale?: string\n\n\t/**\n\t * The format used for displaying.\n\t *\n\t * @default { timeStyle: 'medium', dateStyle: 'short' }\n\t */\n\tformat?: Intl.DateTimeFormatOptions\n}\n\n/**\n * @deprecated\n */\ninterface LegacyFormatDateTimeOptions {\n\t/**\n\t * The format used for displaying, or if relative time is used the format used for the title\n\t */\n\tformat?: Intl.DateTimeFormatOptions\n\t/**\n\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t */\n\tignoreSeconds?: boolean\n\t/**\n\t * Wether to display the timestamp as time from now\n\t */\n\trelativeTime?: false | 'long' | 'short' | 'narrow'\n}\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\n/**\n * Format a timestamp or date object as relative time.\n *\n * This is a composable wrapper around `formatRelativeTime` from `@nextcloud/l10n`.\n *\n * @param timestamp - The timestamp to format\n * @param opts - Formatting options\n */\nexport function useFormatRelativeTime(\n\ttimestamp: MaybeRefOrGetter<Date | number> = Date.now(),\n\topts: MaybeRefOrGetter<FormatRelativeTimeOptions> = {},\n): Readonly<Ref<string>> {\n\tlet timeoutId: number\n\n\t/**\n\t * ECMA Date object of the timestamp\n\t */\n\tconst date = computed(() => new Date(toValue(timestamp)))\n\n\t/**\n\t * Reactive options for `formatRelativeTime` method\n\t */\n\tconst options = computed<FormatDateOptions>(() => {\n\t\tconst { language, relativeTime, ignoreSeconds } = toValue(opts)\n\t\treturn {\n\t\t\t...language && { language },\n\t\t\t...relativeTime && { relativeTime },\n\t\t\tignoreSeconds: ignoreSeconds\n\t\t\t\t? FEW_SECONDS_AGO[relativeTime || 'long']\n\t\t\t\t: false,\n\t\t}\n\t})\n\n\t/**\n\t * The formatted relative time\n\t */\n\tconst relativeTime = ref('')\n\twatchEffect(() => updateRelativeTime())\n\n\t/**\n\t * Update the relative time string.\n\t * This is the callback for the interval.\n\t */\n\tfunction updateRelativeTime() {\n\t\trelativeTime.value = formatRelativeTime(date.value, options.value)\n\n\t\tif (toValue(opts).update !== false) {\n\t\t\tconst diff = Math.abs(Date.now() - new Date(toValue(timestamp)).getTime())\n\t\t\tconst interval = diff > 120000 || options.value.ignoreSeconds\n\t\t\t\t? Math.min(diff / 60, 1800000)\n\t\t\t\t: 1000\n\t\t\ttimeoutId = window.setTimeout(updateRelativeTime, interval)\n\t\t}\n\t}\n\n\t// when the component is unmounted we also clear the timeout\n\tonUnmounted(() => timeoutId && window.clearTimeout(timeoutId))\n\n\treturn readonly(relativeTime)\n}\n\n/**\n * Format a given timestamp or date object as a human readable string.\n *\n * @param timestamp - Timestamp or date object to format\n * @param opts - Formatting options\n */\nexport function useFormatTime(\n\ttimestamp: MaybeRefOrGetter<number | Date>,\n\topts: MaybeRefOrGetter<FormatTimeOptions>,\n): Readonly<Ref<string>> {\n\tconst options = computed<Required<FormatTimeOptions>>(() => ({\n\t\tlocale: getCanonicalLocale(),\n\t\tformat: { dateStyle: 'short', timeStyle: 'medium' },\n\t\t...toValue(opts),\n\t}))\n\n\tconst formatter = computed(() => new Intl.DateTimeFormat(options.value.locale, options.value.format))\n\n\treturn computed(() => formatter.value.format(toValue(timestamp)))\n}\n\n/**\n * Composable for formatting time stamps using current users locale and language\n *\n * @param timestamp Current timestamp\n * @param opts Optional options\n * @param opts.format The format used for displaying, or if relative time is used the format used for the title (optional)\n * @param opts.ignoreSeconds Ignore seconds when displaying the relative time and just show `a few seconds ago`\n * @param opts.relativeTime Wether to display the timestamp as time from now (optional)\n *\n * @deprecated use `useFormatRelativeTime` or `useFormatTime` instead.\n */\nexport function useFormatDateTime(\n\ttimestamp: MaybeRefOrGetter<Date | number> = Date.now(),\n\topts: MaybeRefOrGetter<LegacyFormatDateTimeOptions> = {},\n) {\n\tconst formattedFullTime = useFormatTime(timestamp, opts)\n\tconst relativeTime = useFormatRelativeTime(timestamp, computed(() => {\n\t\tconst options = toValue(opts)\n\t\treturn {\n\t\t\t...options,\n\t\t\trelativeTime: typeof options.relativeTime === 'string'\n\t\t\t\t? options.relativeTime\n\t\t\t\t: 'long',\n\t\t}\n\t}))\n\n\tconst formattedTime = computed(() => toValue(opts).relativeTime !== false\n\t\t? relativeTime.value\n\t\t: formattedFullTime.value)\n\n\treturn {\n\t\tformattedTime,\n\t\tformattedFullTime,\n\t}\n}\n"],"names":["t","computed","toValue","relativeTime","ref","watchEffect","formatRelativeTime","onUnmounted","readonly","getCanonicalLocale"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,MAAM,kBAAkB;AAAA,EACvB,MAAMA,MAAAA,EAAE,mBAAmB;AAAA,EAC3B,OAAOA,MAAAA,EAAE,aAAa;AAAA;AAAA,EACtB,QAAQA,MAAAA,EAAE,UAAU;AAAA;AACrB;AAUO,SAAS,sBACf,YAA6C,KAAK,OAClD,OAAoD,CAAA,GAC5B;AACxB,MAAI;AAKJ,QAAM,OAAOC,IAAAA,SAAS,MAAM,IAAI,KAAKC,KAAAA,QAAQ,SAAS,CAAC,CAAC;AAKxD,QAAM,UAAUD,IAAAA,SAA4B,MAAM;AACjD,UAAM,EAAE,UAAU,cAAAE,eAAc,cAAA,IAAkBD,KAAAA,QAAQ,IAAI;AAC9D,WAAO,cAAA,eAAA,eAAA,CAAA,GACH,YAAY,EAAE,SAAA,IACdC,iBAAgB,EAAE,cAAAA,cAAAA,CAAa,GAF5B;AAAA,MAGN,eAAe,gBACZ,gBAAgBA,iBAAgB,MAAM,IACtC;AAAA,IAAA,CACJ;AAAA,EACD,CAAC;AAKD,QAAM,eAAeC,IAAAA,IAAI,EAAE;AAC3BC,MAAAA,YAAY,MAAM,oBAAoB;AAMtC,WAAS,qBAAqB;AAC7B,iBAAa,QAAQC,KAAAA,mBAAmB,KAAK,OAAO,QAAQ,KAAK;AAEjE,QAAIJ,aAAQ,IAAI,EAAE,WAAW,OAAO;AACnC,YAAM,OAAO,KAAK,IAAI,KAAK,IAAA,IAAQ,IAAI,KAAKA,KAAAA,QAAQ,SAAS,CAAC,EAAE,SAAS;AACzE,YAAM,WAAW,OAAO,QAAU,QAAQ,MAAM,gBAC7C,KAAK,IAAI,OAAO,IAAI,IAAO,IAC3B;AACH,kBAAY,OAAO,WAAW,oBAAoB,QAAQ;AAAA,IAC3D;AAAA,EACD;AAGAK,MAAAA,YAAY,MAAM,aAAa,OAAO,aAAa,SAAS,CAAC;AAE7D,SAAOC,IAAAA,SAAS,YAAY;AAC7B;AAQO,SAAS,cACf,WACA,MACwB;AACxB,QAAM,UAAUP,aAAsC,MAAO,eAAA;AAAA,IAC5D,QAAQQ,KAAAA,mBAAA;AAAA,IACR,QAAQ,EAAE,WAAW,SAAS,WAAW,SAAA;AAAA,EAAS,GAC/CP,KAAAA,QAAQ,IAAI,CAAA,CACd;AAEF,QAAM,YAAYD,IAAAA,SAAS,MAAM,IAAI,KAAK,eAAe,QAAQ,MAAM,QAAQ,QAAQ,MAAM,MAAM,CAAC;AAEpG,SAAOA,IAAAA,SAAS,MAAM,UAAU,MAAM,OAAOC,KAAAA,QAAQ,SAAS,CAAC,CAAC;AACjE;AAaO,SAAS,kBACf,YAA6C,KAAK,OAClD,OAAsD,CAAA,GACrD;AACD,QAAM,oBAAoB,cAAc,WAAW,IAAI;AACvD,QAAM,eAAe,sBAAsB,WAAWD,IAAAA,SAAS,MAAM;AACpE,UAAM,UAAUC,KAAAA,QAAQ,IAAI;AAC5B,WAAO,iCACH,OAAA,GADG;AAAA,MAEN,cAAc,OAAO,QAAQ,iBAAiB,WAC3C,QAAQ,eACR;AAAA,IAAA,CACJ;AAAA,EACD,CAAC,CAAC;AAEF,QAAM,gBAAgBD,IAAAA,SAAS,MAAMC,KAAAA,QAAQ,IAAI,EAAE,iBAAiB,QACjE,aAAa,QACb,kBAAkB,KAAK;AAE1B,SAAO;AAAA,IACN;AAAA,IACA;AAAA,EAAA;AAEF;;;;"}
1
+ {"version":3,"file":"useFormatDateTime.cjs","sources":["../../src/composables/useFormatDateTime/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { FormatDateOptions } from '@nextcloud/l10n'\nimport type { MaybeRefOrGetter } from '@vueuse/core'\nimport type { Ref } from 'vue'\n\nimport { formatRelativeTime, getCanonicalLocale } from '@nextcloud/l10n'\nimport { toValue } from '@vueuse/core'\nimport { computed, onUnmounted, readonly, ref, watchEffect } from 'vue'\nimport { t } from '../../l10n.js'\n\ninterface FormatRelativeTimeOptions extends Partial<Omit<FormatDateOptions, 'ignoreSeconds'>> {\n\tignoreSeconds?: boolean\n\n\t/**\n\t * If set to false the relative time will not be updated anymore.\n\t *\n\t * @default true - Meaning the relative time will be updated if needed\n\t */\n\tupdate?: boolean\n}\n\ninterface FormatTimeOptions {\n\t/**\n\t * Locale to use for formatting.\n\t *\n\t * @default current locale\n\t */\n\tlocale?: string\n\n\t/**\n\t * The format used for displaying.\n\t *\n\t * @default { timeStyle: 'medium', dateStyle: 'short' }\n\t */\n\tformat?: Intl.DateTimeFormatOptions\n}\n\n/**\n * @deprecated\n */\ninterface LegacyFormatDateTimeOptions {\n\t/**\n\t * The format used for displaying, or if relative time is used the format used for the title\n\t */\n\tformat?: Intl.DateTimeFormatOptions\n\t/**\n\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t */\n\tignoreSeconds?: boolean\n\t/**\n\t * Wether to display the timestamp as time from now\n\t */\n\trelativeTime?: false | 'long' | 'short' | 'narrow'\n}\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\n/**\n * Format a timestamp or date object as relative time.\n *\n * This is a composable wrapper around `formatRelativeTime` from `@nextcloud/l10n`.\n *\n * @param timestamp - The timestamp to format\n * @param opts - Formatting options\n */\nexport function useFormatRelativeTime(\n\ttimestamp: MaybeRefOrGetter<Date | number> = Date.now(),\n\topts: MaybeRefOrGetter<FormatRelativeTimeOptions> = {},\n): Readonly<Ref<string>> {\n\tlet timeoutId: number\n\n\t/**\n\t * ECMA Date object of the timestamp\n\t */\n\tconst date = computed(() => new Date(toValue(timestamp)))\n\n\t/**\n\t * Reactive options for `formatRelativeTime` method\n\t */\n\tconst options = computed<FormatDateOptions>(() => {\n\t\tconst { language, relativeTime, ignoreSeconds } = toValue(opts)\n\t\treturn {\n\t\t\t...language && { language },\n\t\t\t...relativeTime && { relativeTime },\n\t\t\tignoreSeconds: ignoreSeconds\n\t\t\t\t? FEW_SECONDS_AGO[relativeTime || 'long']\n\t\t\t\t: false,\n\t\t}\n\t})\n\n\t/**\n\t * The formatted relative time\n\t */\n\tconst relativeTime = ref('')\n\twatchEffect(() => updateRelativeTime())\n\n\t/**\n\t * Update the relative time string.\n\t * This is the callback for the interval.\n\t */\n\tfunction updateRelativeTime() {\n\t\trelativeTime.value = formatRelativeTime(date.value, options.value)\n\n\t\tif (toValue(opts).update !== false) {\n\t\t\tconst diff = Math.abs(Date.now() - new Date(toValue(timestamp)).getTime())\n\t\t\tconst interval = diff > 120000 || options.value.ignoreSeconds\n\t\t\t\t? Math.min(diff / 60, 1800000)\n\t\t\t\t: 1000\n\t\t\ttimeoutId = window.setTimeout(updateRelativeTime, interval)\n\t\t}\n\t}\n\n\t// when the component is unmounted we also clear the timeout\n\tonUnmounted(() => timeoutId && window.clearTimeout(timeoutId))\n\n\treturn readonly(relativeTime)\n}\n\n/**\n * Format a given timestamp or date object as a human readable string.\n *\n * @param timestamp - Timestamp or date object to format\n * @param opts - Formatting options\n */\nexport function useFormatTime(\n\ttimestamp: MaybeRefOrGetter<number | Date>,\n\topts: MaybeRefOrGetter<FormatTimeOptions>,\n): Readonly<Ref<string>> {\n\tconst options = computed<Required<FormatTimeOptions>>(() => ({\n\t\tlocale: getCanonicalLocale(),\n\t\tformat: { dateStyle: 'short', timeStyle: 'medium' },\n\t\t...toValue(opts),\n\t}))\n\n\tconst formatter = computed(() => new Intl.DateTimeFormat(options.value.locale, options.value.format))\n\n\treturn computed(() => formatter.value.format(toValue(timestamp)))\n}\n\n/**\n * Composable for formatting time stamps using current users locale and language\n *\n * @param timestamp Current timestamp\n * @param opts Optional options\n * @param opts.format The format used for displaying, or if relative time is used the format used for the title (optional)\n * @param opts.ignoreSeconds Ignore seconds when displaying the relative time and just show `a few seconds ago`\n * @param opts.relativeTime Wether to display the timestamp as time from now (optional)\n *\n * @deprecated use `useFormatRelativeTime` or `useFormatTime` instead.\n */\nexport function useFormatDateTime(\n\ttimestamp: MaybeRefOrGetter<Date | number> = Date.now(),\n\topts: MaybeRefOrGetter<LegacyFormatDateTimeOptions> = {},\n) {\n\tconst formattedFullTime = useFormatTime(timestamp, opts)\n\tconst relativeTime = useFormatRelativeTime(timestamp, computed(() => {\n\t\tconst options = toValue(opts)\n\t\treturn {\n\t\t\t...options,\n\t\t\trelativeTime: typeof options.relativeTime === 'string'\n\t\t\t\t? options.relativeTime\n\t\t\t\t: 'long',\n\t\t}\n\t}))\n\n\tconst formattedTime = computed(() => toValue(opts).relativeTime !== false\n\t\t? relativeTime.value\n\t\t: formattedFullTime.value)\n\n\treturn {\n\t\tformattedTime,\n\t\tformattedFullTime,\n\t}\n}\n"],"names":["t","computed","toValue","relativeTime","ref","watchEffect","formatRelativeTime","onUnmounted","readonly","getCanonicalLocale"],"mappings":";;;;;;;AA2DA,MAAM,kBAAkB;AAAA,EACvB,MAAMA,MAAAA,EAAE,mBAAmB;AAAA,EAC3B,OAAOA,MAAAA,EAAE,aAAa;AAAA;AAAA,EACtB,QAAQA,MAAAA,EAAE,UAAU;AAAA;AACrB;AAUO,SAAS,sBACf,YAA6C,KAAK,OAClD,OAAoD,CAAA,GAC5B;AACxB,MAAI;AAKJ,QAAM,OAAOC,IAAAA,SAAS,MAAM,IAAI,KAAKC,KAAAA,QAAQ,SAAS,CAAC,CAAC;AAKxD,QAAM,UAAUD,IAAAA,SAA4B,MAAM;AACjD,UAAM,EAAE,UAAU,cAAAE,eAAc,cAAA,IAAkBD,KAAAA,QAAQ,IAAI;AAC9D,WAAO;AAAA,MACN,GAAG,YAAY,EAAE,SAAA;AAAA,MACjB,GAAGC,iBAAgB,EAAE,cAAAA,cAAAA;AAAAA,MACrB,eAAe,gBACZ,gBAAgBA,iBAAgB,MAAM,IACtC;AAAA,IAAA;AAAA,EAEL,CAAC;AAKD,QAAM,eAAeC,IAAAA,IAAI,EAAE;AAC3BC,MAAAA,YAAY,MAAM,oBAAoB;AAMtC,WAAS,qBAAqB;AAC7B,iBAAa,QAAQC,KAAAA,mBAAmB,KAAK,OAAO,QAAQ,KAAK;AAEjE,QAAIJ,aAAQ,IAAI,EAAE,WAAW,OAAO;AACnC,YAAM,OAAO,KAAK,IAAI,KAAK,IAAA,IAAQ,IAAI,KAAKA,KAAAA,QAAQ,SAAS,CAAC,EAAE,SAAS;AACzE,YAAM,WAAW,OAAO,QAAU,QAAQ,MAAM,gBAC7C,KAAK,IAAI,OAAO,IAAI,IAAO,IAC3B;AACH,kBAAY,OAAO,WAAW,oBAAoB,QAAQ;AAAA,IAC3D;AAAA,EACD;AAGAK,MAAAA,YAAY,MAAM,aAAa,OAAO,aAAa,SAAS,CAAC;AAE7D,SAAOC,IAAAA,SAAS,YAAY;AAC7B;AAQO,SAAS,cACf,WACA,MACwB;AACxB,QAAM,UAAUP,IAAAA,SAAsC,OAAO;AAAA,IAC5D,QAAQQ,KAAAA,mBAAA;AAAA,IACR,QAAQ,EAAE,WAAW,SAAS,WAAW,SAAA;AAAA,IACzC,GAAGP,KAAAA,QAAQ,IAAI;AAAA,EAAA,EACd;AAEF,QAAM,YAAYD,IAAAA,SAAS,MAAM,IAAI,KAAK,eAAe,QAAQ,MAAM,QAAQ,QAAQ,MAAM,MAAM,CAAC;AAEpG,SAAOA,IAAAA,SAAS,MAAM,UAAU,MAAM,OAAOC,KAAAA,QAAQ,SAAS,CAAC,CAAC;AACjE;AAaO,SAAS,kBACf,YAA6C,KAAK,OAClD,OAAsD,CAAA,GACrD;AACD,QAAM,oBAAoB,cAAc,WAAW,IAAI;AACvD,QAAM,eAAe,sBAAsB,WAAWD,IAAAA,SAAS,MAAM;AACpE,UAAM,UAAUC,KAAAA,QAAQ,IAAI;AAC5B,WAAO;AAAA,MACN,GAAG;AAAA,MACH,cAAc,OAAO,QAAQ,iBAAiB,WAC3C,QAAQ,eACR;AAAA,IAAA;AAAA,EAEL,CAAC,CAAC;AAEF,QAAM,gBAAgBD,IAAAA,SAAS,MAAMC,KAAAA,QAAQ,IAAI,EAAE,iBAAiB,QACjE,aAAa,QACb,kBAAkB,KAAK;AAE1B,SAAO;AAAA,IACN;AAAA,IACA;AAAA,EAAA;AAEF;;;;"}
@@ -1,27 +1,8 @@
1
1
  import { formatRelativeTime, getCanonicalLocale } from "@nextcloud/l10n";
2
2
  import { toValue } from "@vueuse/core";
3
3
  import { computed, ref, watchEffect, onUnmounted, readonly } from "vue";
4
- import { r as register, e as t2, a as t } from "../chunks/_l10n-DSLCwJSN.mjs";
4
+ import { r as register, e as t2, a as t } from "../chunks/_l10n-BWisB7-O.mjs";
5
5
  register(t2);
6
- var __defProp = Object.defineProperty;
7
- var __defProps = Object.defineProperties;
8
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
10
- var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
6
  const FEW_SECONDS_AGO = {
26
7
  long: t("a few seconds ago"),
27
8
  short: t("seconds ago"),
@@ -34,9 +15,11 @@ function useFormatRelativeTime(timestamp = Date.now(), opts = {}) {
34
15
  const date = computed(() => new Date(toValue(timestamp)));
35
16
  const options = computed(() => {
36
17
  const { language, relativeTime: relativeTime2, ignoreSeconds } = toValue(opts);
37
- return __spreadProps(__spreadValues(__spreadValues({}, language && { language }), relativeTime2 && { relativeTime: relativeTime2 }), {
18
+ return {
19
+ ...language && { language },
20
+ ...relativeTime2 && { relativeTime: relativeTime2 },
38
21
  ignoreSeconds: ignoreSeconds ? FEW_SECONDS_AGO[relativeTime2 || "long"] : false
39
- });
22
+ };
40
23
  });
41
24
  const relativeTime = ref("");
42
25
  watchEffect(() => updateRelativeTime());
@@ -52,10 +35,11 @@ function useFormatRelativeTime(timestamp = Date.now(), opts = {}) {
52
35
  return readonly(relativeTime);
53
36
  }
54
37
  function useFormatTime(timestamp, opts) {
55
- const options = computed(() => __spreadValues({
38
+ const options = computed(() => ({
56
39
  locale: getCanonicalLocale(),
57
- format: { dateStyle: "short", timeStyle: "medium" }
58
- }, toValue(opts)));
40
+ format: { dateStyle: "short", timeStyle: "medium" },
41
+ ...toValue(opts)
42
+ }));
59
43
  const formatter = computed(() => new Intl.DateTimeFormat(options.value.locale, options.value.format));
60
44
  return computed(() => formatter.value.format(toValue(timestamp)));
61
45
  }
@@ -63,9 +47,10 @@ function useFormatDateTime(timestamp = Date.now(), opts = {}) {
63
47
  const formattedFullTime = useFormatTime(timestamp, opts);
64
48
  const relativeTime = useFormatRelativeTime(timestamp, computed(() => {
65
49
  const options = toValue(opts);
66
- return __spreadProps(__spreadValues({}, options), {
50
+ return {
51
+ ...options,
67
52
  relativeTime: typeof options.relativeTime === "string" ? options.relativeTime : "long"
68
- });
53
+ };
69
54
  }));
70
55
  const formattedTime = computed(() => toValue(opts).relativeTime !== false ? relativeTime.value : formattedFullTime.value);
71
56
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"useFormatDateTime.mjs","sources":["../../src/composables/useFormatDateTime/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { FormatDateOptions } from '@nextcloud/l10n'\nimport type { MaybeRefOrGetter } from '@vueuse/core'\nimport type { Ref } from 'vue'\n\nimport { formatRelativeTime, getCanonicalLocale } from '@nextcloud/l10n'\nimport { toValue } from '@vueuse/core'\nimport { computed, onUnmounted, readonly, ref, watchEffect } from 'vue'\nimport { t } from '../../l10n.js'\n\ninterface FormatRelativeTimeOptions extends Partial<Omit<FormatDateOptions, 'ignoreSeconds'>> {\n\tignoreSeconds?: boolean\n\n\t/**\n\t * If set to false the relative time will not be updated anymore.\n\t *\n\t * @default true - Meaning the relative time will be updated if needed\n\t */\n\tupdate?: boolean\n}\n\ninterface FormatTimeOptions {\n\t/**\n\t * Locale to use for formatting.\n\t *\n\t * @default current locale\n\t */\n\tlocale?: string\n\n\t/**\n\t * The format used for displaying.\n\t *\n\t * @default { timeStyle: 'medium', dateStyle: 'short' }\n\t */\n\tformat?: Intl.DateTimeFormatOptions\n}\n\n/**\n * @deprecated\n */\ninterface LegacyFormatDateTimeOptions {\n\t/**\n\t * The format used for displaying, or if relative time is used the format used for the title\n\t */\n\tformat?: Intl.DateTimeFormatOptions\n\t/**\n\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t */\n\tignoreSeconds?: boolean\n\t/**\n\t * Wether to display the timestamp as time from now\n\t */\n\trelativeTime?: false | 'long' | 'short' | 'narrow'\n}\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\n/**\n * Format a timestamp or date object as relative time.\n *\n * This is a composable wrapper around `formatRelativeTime` from `@nextcloud/l10n`.\n *\n * @param timestamp - The timestamp to format\n * @param opts - Formatting options\n */\nexport function useFormatRelativeTime(\n\ttimestamp: MaybeRefOrGetter<Date | number> = Date.now(),\n\topts: MaybeRefOrGetter<FormatRelativeTimeOptions> = {},\n): Readonly<Ref<string>> {\n\tlet timeoutId: number\n\n\t/**\n\t * ECMA Date object of the timestamp\n\t */\n\tconst date = computed(() => new Date(toValue(timestamp)))\n\n\t/**\n\t * Reactive options for `formatRelativeTime` method\n\t */\n\tconst options = computed<FormatDateOptions>(() => {\n\t\tconst { language, relativeTime, ignoreSeconds } = toValue(opts)\n\t\treturn {\n\t\t\t...language && { language },\n\t\t\t...relativeTime && { relativeTime },\n\t\t\tignoreSeconds: ignoreSeconds\n\t\t\t\t? FEW_SECONDS_AGO[relativeTime || 'long']\n\t\t\t\t: false,\n\t\t}\n\t})\n\n\t/**\n\t * The formatted relative time\n\t */\n\tconst relativeTime = ref('')\n\twatchEffect(() => updateRelativeTime())\n\n\t/**\n\t * Update the relative time string.\n\t * This is the callback for the interval.\n\t */\n\tfunction updateRelativeTime() {\n\t\trelativeTime.value = formatRelativeTime(date.value, options.value)\n\n\t\tif (toValue(opts).update !== false) {\n\t\t\tconst diff = Math.abs(Date.now() - new Date(toValue(timestamp)).getTime())\n\t\t\tconst interval = diff > 120000 || options.value.ignoreSeconds\n\t\t\t\t? Math.min(diff / 60, 1800000)\n\t\t\t\t: 1000\n\t\t\ttimeoutId = window.setTimeout(updateRelativeTime, interval)\n\t\t}\n\t}\n\n\t// when the component is unmounted we also clear the timeout\n\tonUnmounted(() => timeoutId && window.clearTimeout(timeoutId))\n\n\treturn readonly(relativeTime)\n}\n\n/**\n * Format a given timestamp or date object as a human readable string.\n *\n * @param timestamp - Timestamp or date object to format\n * @param opts - Formatting options\n */\nexport function useFormatTime(\n\ttimestamp: MaybeRefOrGetter<number | Date>,\n\topts: MaybeRefOrGetter<FormatTimeOptions>,\n): Readonly<Ref<string>> {\n\tconst options = computed<Required<FormatTimeOptions>>(() => ({\n\t\tlocale: getCanonicalLocale(),\n\t\tformat: { dateStyle: 'short', timeStyle: 'medium' },\n\t\t...toValue(opts),\n\t}))\n\n\tconst formatter = computed(() => new Intl.DateTimeFormat(options.value.locale, options.value.format))\n\n\treturn computed(() => formatter.value.format(toValue(timestamp)))\n}\n\n/**\n * Composable for formatting time stamps using current users locale and language\n *\n * @param timestamp Current timestamp\n * @param opts Optional options\n * @param opts.format The format used for displaying, or if relative time is used the format used for the title (optional)\n * @param opts.ignoreSeconds Ignore seconds when displaying the relative time and just show `a few seconds ago`\n * @param opts.relativeTime Wether to display the timestamp as time from now (optional)\n *\n * @deprecated use `useFormatRelativeTime` or `useFormatTime` instead.\n */\nexport function useFormatDateTime(\n\ttimestamp: MaybeRefOrGetter<Date | number> = Date.now(),\n\topts: MaybeRefOrGetter<LegacyFormatDateTimeOptions> = {},\n) {\n\tconst formattedFullTime = useFormatTime(timestamp, opts)\n\tconst relativeTime = useFormatRelativeTime(timestamp, computed(() => {\n\t\tconst options = toValue(opts)\n\t\treturn {\n\t\t\t...options,\n\t\t\trelativeTime: typeof options.relativeTime === 'string'\n\t\t\t\t? options.relativeTime\n\t\t\t\t: 'long',\n\t\t}\n\t}))\n\n\tconst formattedTime = computed(() => toValue(opts).relativeTime !== false\n\t\t? relativeTime.value\n\t\t: formattedFullTime.value)\n\n\treturn {\n\t\tformattedTime,\n\t\tformattedFullTime,\n\t}\n}\n"],"names":["relativeTime"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2DA,MAAM,kBAAkB;AAAA,EACvB,MAAM,EAAE,mBAAmB;AAAA,EAC3B,OAAO,EAAE,aAAa;AAAA;AAAA,EACtB,QAAQ,EAAE,UAAU;AAAA;AACrB;AAUO,SAAS,sBACf,YAA6C,KAAK,OAClD,OAAoD,CAAA,GAC5B;AACxB,MAAI;AAKJ,QAAM,OAAO,SAAS,MAAM,IAAI,KAAK,QAAQ,SAAS,CAAC,CAAC;AAKxD,QAAM,UAAU,SAA4B,MAAM;AACjD,UAAM,EAAE,UAAU,cAAAA,eAAc,cAAA,IAAkB,QAAQ,IAAI;AAC9D,WAAO,cAAA,eAAA,eAAA,CAAA,GACH,YAAY,EAAE,SAAA,IACdA,iBAAgB,EAAE,cAAAA,cAAAA,CAAa,GAF5B;AAAA,MAGN,eAAe,gBACZ,gBAAgBA,iBAAgB,MAAM,IACtC;AAAA,IAAA,CACJ;AAAA,EACD,CAAC;AAKD,QAAM,eAAe,IAAI,EAAE;AAC3B,cAAY,MAAM,oBAAoB;AAMtC,WAAS,qBAAqB;AAC7B,iBAAa,QAAQ,mBAAmB,KAAK,OAAO,QAAQ,KAAK;AAEjE,QAAI,QAAQ,IAAI,EAAE,WAAW,OAAO;AACnC,YAAM,OAAO,KAAK,IAAI,KAAK,IAAA,IAAQ,IAAI,KAAK,QAAQ,SAAS,CAAC,EAAE,SAAS;AACzE,YAAM,WAAW,OAAO,QAAU,QAAQ,MAAM,gBAC7C,KAAK,IAAI,OAAO,IAAI,IAAO,IAC3B;AACH,kBAAY,OAAO,WAAW,oBAAoB,QAAQ;AAAA,IAC3D;AAAA,EACD;AAGA,cAAY,MAAM,aAAa,OAAO,aAAa,SAAS,CAAC;AAE7D,SAAO,SAAS,YAAY;AAC7B;AAQO,SAAS,cACf,WACA,MACwB;AACxB,QAAM,UAAU,SAAsC,MAAO,eAAA;AAAA,IAC5D,QAAQ,mBAAA;AAAA,IACR,QAAQ,EAAE,WAAW,SAAS,WAAW,SAAA;AAAA,EAAS,GAC/C,QAAQ,IAAI,CAAA,CACd;AAEF,QAAM,YAAY,SAAS,MAAM,IAAI,KAAK,eAAe,QAAQ,MAAM,QAAQ,QAAQ,MAAM,MAAM,CAAC;AAEpG,SAAO,SAAS,MAAM,UAAU,MAAM,OAAO,QAAQ,SAAS,CAAC,CAAC;AACjE;AAaO,SAAS,kBACf,YAA6C,KAAK,OAClD,OAAsD,CAAA,GACrD;AACD,QAAM,oBAAoB,cAAc,WAAW,IAAI;AACvD,QAAM,eAAe,sBAAsB,WAAW,SAAS,MAAM;AACpE,UAAM,UAAU,QAAQ,IAAI;AAC5B,WAAO,iCACH,OAAA,GADG;AAAA,MAEN,cAAc,OAAO,QAAQ,iBAAiB,WAC3C,QAAQ,eACR;AAAA,IAAA,CACJ;AAAA,EACD,CAAC,CAAC;AAEF,QAAM,gBAAgB,SAAS,MAAM,QAAQ,IAAI,EAAE,iBAAiB,QACjE,aAAa,QACb,kBAAkB,KAAK;AAE1B,SAAO;AAAA,IACN;AAAA,IACA;AAAA,EAAA;AAEF;"}
1
+ {"version":3,"file":"useFormatDateTime.mjs","sources":["../../src/composables/useFormatDateTime/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { FormatDateOptions } from '@nextcloud/l10n'\nimport type { MaybeRefOrGetter } from '@vueuse/core'\nimport type { Ref } from 'vue'\n\nimport { formatRelativeTime, getCanonicalLocale } from '@nextcloud/l10n'\nimport { toValue } from '@vueuse/core'\nimport { computed, onUnmounted, readonly, ref, watchEffect } from 'vue'\nimport { t } from '../../l10n.js'\n\ninterface FormatRelativeTimeOptions extends Partial<Omit<FormatDateOptions, 'ignoreSeconds'>> {\n\tignoreSeconds?: boolean\n\n\t/**\n\t * If set to false the relative time will not be updated anymore.\n\t *\n\t * @default true - Meaning the relative time will be updated if needed\n\t */\n\tupdate?: boolean\n}\n\ninterface FormatTimeOptions {\n\t/**\n\t * Locale to use for formatting.\n\t *\n\t * @default current locale\n\t */\n\tlocale?: string\n\n\t/**\n\t * The format used for displaying.\n\t *\n\t * @default { timeStyle: 'medium', dateStyle: 'short' }\n\t */\n\tformat?: Intl.DateTimeFormatOptions\n}\n\n/**\n * @deprecated\n */\ninterface LegacyFormatDateTimeOptions {\n\t/**\n\t * The format used for displaying, or if relative time is used the format used for the title\n\t */\n\tformat?: Intl.DateTimeFormatOptions\n\t/**\n\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t */\n\tignoreSeconds?: boolean\n\t/**\n\t * Wether to display the timestamp as time from now\n\t */\n\trelativeTime?: false | 'long' | 'short' | 'narrow'\n}\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\n/**\n * Format a timestamp or date object as relative time.\n *\n * This is a composable wrapper around `formatRelativeTime` from `@nextcloud/l10n`.\n *\n * @param timestamp - The timestamp to format\n * @param opts - Formatting options\n */\nexport function useFormatRelativeTime(\n\ttimestamp: MaybeRefOrGetter<Date | number> = Date.now(),\n\topts: MaybeRefOrGetter<FormatRelativeTimeOptions> = {},\n): Readonly<Ref<string>> {\n\tlet timeoutId: number\n\n\t/**\n\t * ECMA Date object of the timestamp\n\t */\n\tconst date = computed(() => new Date(toValue(timestamp)))\n\n\t/**\n\t * Reactive options for `formatRelativeTime` method\n\t */\n\tconst options = computed<FormatDateOptions>(() => {\n\t\tconst { language, relativeTime, ignoreSeconds } = toValue(opts)\n\t\treturn {\n\t\t\t...language && { language },\n\t\t\t...relativeTime && { relativeTime },\n\t\t\tignoreSeconds: ignoreSeconds\n\t\t\t\t? FEW_SECONDS_AGO[relativeTime || 'long']\n\t\t\t\t: false,\n\t\t}\n\t})\n\n\t/**\n\t * The formatted relative time\n\t */\n\tconst relativeTime = ref('')\n\twatchEffect(() => updateRelativeTime())\n\n\t/**\n\t * Update the relative time string.\n\t * This is the callback for the interval.\n\t */\n\tfunction updateRelativeTime() {\n\t\trelativeTime.value = formatRelativeTime(date.value, options.value)\n\n\t\tif (toValue(opts).update !== false) {\n\t\t\tconst diff = Math.abs(Date.now() - new Date(toValue(timestamp)).getTime())\n\t\t\tconst interval = diff > 120000 || options.value.ignoreSeconds\n\t\t\t\t? Math.min(diff / 60, 1800000)\n\t\t\t\t: 1000\n\t\t\ttimeoutId = window.setTimeout(updateRelativeTime, interval)\n\t\t}\n\t}\n\n\t// when the component is unmounted we also clear the timeout\n\tonUnmounted(() => timeoutId && window.clearTimeout(timeoutId))\n\n\treturn readonly(relativeTime)\n}\n\n/**\n * Format a given timestamp or date object as a human readable string.\n *\n * @param timestamp - Timestamp or date object to format\n * @param opts - Formatting options\n */\nexport function useFormatTime(\n\ttimestamp: MaybeRefOrGetter<number | Date>,\n\topts: MaybeRefOrGetter<FormatTimeOptions>,\n): Readonly<Ref<string>> {\n\tconst options = computed<Required<FormatTimeOptions>>(() => ({\n\t\tlocale: getCanonicalLocale(),\n\t\tformat: { dateStyle: 'short', timeStyle: 'medium' },\n\t\t...toValue(opts),\n\t}))\n\n\tconst formatter = computed(() => new Intl.DateTimeFormat(options.value.locale, options.value.format))\n\n\treturn computed(() => formatter.value.format(toValue(timestamp)))\n}\n\n/**\n * Composable for formatting time stamps using current users locale and language\n *\n * @param timestamp Current timestamp\n * @param opts Optional options\n * @param opts.format The format used for displaying, or if relative time is used the format used for the title (optional)\n * @param opts.ignoreSeconds Ignore seconds when displaying the relative time and just show `a few seconds ago`\n * @param opts.relativeTime Wether to display the timestamp as time from now (optional)\n *\n * @deprecated use `useFormatRelativeTime` or `useFormatTime` instead.\n */\nexport function useFormatDateTime(\n\ttimestamp: MaybeRefOrGetter<Date | number> = Date.now(),\n\topts: MaybeRefOrGetter<LegacyFormatDateTimeOptions> = {},\n) {\n\tconst formattedFullTime = useFormatTime(timestamp, opts)\n\tconst relativeTime = useFormatRelativeTime(timestamp, computed(() => {\n\t\tconst options = toValue(opts)\n\t\treturn {\n\t\t\t...options,\n\t\t\trelativeTime: typeof options.relativeTime === 'string'\n\t\t\t\t? options.relativeTime\n\t\t\t\t: 'long',\n\t\t}\n\t}))\n\n\tconst formattedTime = computed(() => toValue(opts).relativeTime !== false\n\t\t? relativeTime.value\n\t\t: formattedFullTime.value)\n\n\treturn {\n\t\tformattedTime,\n\t\tformattedFullTime,\n\t}\n}\n"],"names":["relativeTime"],"mappings":";;;;;AA2DA,MAAM,kBAAkB;AAAA,EACvB,MAAM,EAAE,mBAAmB;AAAA,EAC3B,OAAO,EAAE,aAAa;AAAA;AAAA,EACtB,QAAQ,EAAE,UAAU;AAAA;AACrB;AAUO,SAAS,sBACf,YAA6C,KAAK,OAClD,OAAoD,CAAA,GAC5B;AACxB,MAAI;AAKJ,QAAM,OAAO,SAAS,MAAM,IAAI,KAAK,QAAQ,SAAS,CAAC,CAAC;AAKxD,QAAM,UAAU,SAA4B,MAAM;AACjD,UAAM,EAAE,UAAU,cAAAA,eAAc,cAAA,IAAkB,QAAQ,IAAI;AAC9D,WAAO;AAAA,MACN,GAAG,YAAY,EAAE,SAAA;AAAA,MACjB,GAAGA,iBAAgB,EAAE,cAAAA,cAAAA;AAAAA,MACrB,eAAe,gBACZ,gBAAgBA,iBAAgB,MAAM,IACtC;AAAA,IAAA;AAAA,EAEL,CAAC;AAKD,QAAM,eAAe,IAAI,EAAE;AAC3B,cAAY,MAAM,oBAAoB;AAMtC,WAAS,qBAAqB;AAC7B,iBAAa,QAAQ,mBAAmB,KAAK,OAAO,QAAQ,KAAK;AAEjE,QAAI,QAAQ,IAAI,EAAE,WAAW,OAAO;AACnC,YAAM,OAAO,KAAK,IAAI,KAAK,IAAA,IAAQ,IAAI,KAAK,QAAQ,SAAS,CAAC,EAAE,SAAS;AACzE,YAAM,WAAW,OAAO,QAAU,QAAQ,MAAM,gBAC7C,KAAK,IAAI,OAAO,IAAI,IAAO,IAC3B;AACH,kBAAY,OAAO,WAAW,oBAAoB,QAAQ;AAAA,IAC3D;AAAA,EACD;AAGA,cAAY,MAAM,aAAa,OAAO,aAAa,SAAS,CAAC;AAE7D,SAAO,SAAS,YAAY;AAC7B;AAQO,SAAS,cACf,WACA,MACwB;AACxB,QAAM,UAAU,SAAsC,OAAO;AAAA,IAC5D,QAAQ,mBAAA;AAAA,IACR,QAAQ,EAAE,WAAW,SAAS,WAAW,SAAA;AAAA,IACzC,GAAG,QAAQ,IAAI;AAAA,EAAA,EACd;AAEF,QAAM,YAAY,SAAS,MAAM,IAAI,KAAK,eAAe,QAAQ,MAAM,QAAQ,QAAQ,MAAM,MAAM,CAAC;AAEpG,SAAO,SAAS,MAAM,UAAU,MAAM,OAAO,QAAQ,SAAS,CAAC,CAAC;AACjE;AAaO,SAAS,kBACf,YAA6C,KAAK,OAClD,OAAsD,CAAA,GACrD;AACD,QAAM,oBAAoB,cAAc,WAAW,IAAI;AACvD,QAAM,eAAe,sBAAsB,WAAW,SAAS,MAAM;AACpE,UAAM,UAAU,QAAQ,IAAI;AAC5B,WAAO;AAAA,MACN,GAAG;AAAA,MACH,cAAc,OAAO,QAAQ,iBAAiB,WAC3C,QAAQ,eACR;AAAA,IAAA;AAAA,EAEL,CAAC,CAAC;AAEF,QAAM,gBAAgB,SAAS,MAAM,QAAQ,IAAI,EAAE,iBAAiB,QACjE,aAAa,QACb,kBAAkB,KAAK;AAE1B,SAAO;AAAA,IACN;AAAA,IACA;AAAA,EAAA;AAEF;"}
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const core = require("@vueuse/core");
4
4
  const platform = require("../chunks/platform-oKxQ1agV.cjs");
5
- var _a, _b, _c;
6
- const disableKeyboardShortcuts = (_c = (_b = (_a = window.OCP) == null ? void 0 : _a.Accessibility) == null ? void 0 : _b.disableKeyboardShortcuts) == null ? void 0 : _c.call(_b);
5
+ const disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.();
7
6
  const derivedKeysRegex = /^[a-zA-Z0-9]$/;
8
7
  const nonAsciiPrintableRegex = /^[^\x20-\x7F]$/;
9
8
  function shouldIgnoreEvent(event) {
@@ -1 +1 @@
1
- {"version":3,"file":"useHotKey.cjs","sources":["../../src/composables/useHotKey/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { onKeyStroke } from '@vueuse/core'\nimport { isMac } from '../../utils/platform.ts'\n\nconst disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.()\nconst derivedKeysRegex = /^[a-zA-Z0-9]$/\nconst nonAsciiPrintableRegex = /^[^\\x20-\\x7F]$/\n\nexport interface UseHotKeyOptions {\n\t/** Make key filter case sensitive */\n\tcaseSensitive?: boolean\n\n\t/** Prevent default behavior of key stroke */\n\tprevent?: boolean\n\n\t/** Stop the event bubbling */\n\tstop?: boolean\n\n\t/** Also listen for keyup event */\n\tpush?: boolean\n\n\t/**\n\t * If set then the callback is only called when the shift key is (not) pressed.\n\t * When left `undefined` a pressed shift key is ignored (callback is run with and without shift pressed).\n\t */\n\tshift?: boolean\n\n\t/**\n\t * Only run the callback if the control key is (not-)pressed.\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'ctrl' key is NOT pressed.\n\t */\n\tctrl?: boolean\n\n\t/**\n\t * If set the callback is only executed if the alt key is (not-)pressed\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'alt' key is NOT pressed.\n\t */\n\talt?: boolean\n}\n\n/**\n * Check if event target (active element) is editable (allows input from keyboard) or NcModal is open\n * If true, a hot key should not trigger the callback\n *\n * @todo Discuss if we should abort on another interactive elements (button, a, e.t.c)\n *\n * @param event keyboard event\n * @return Whether it should prevent callback\n */\nfunction shouldIgnoreEvent(event: KeyboardEvent): boolean {\n\tif (!(event.target instanceof HTMLElement)\n\t\t|| event.target instanceof HTMLInputElement\n\t\t|| event.target instanceof HTMLTextAreaElement\n\t\t|| event.target instanceof HTMLSelectElement\n\t\t|| event.target.isContentEditable) {\n\t\treturn true\n\t}\n\t/** Abort if any modal/dialog opened */\n\treturn document.getElementsByClassName('modal-mask').length !== 0\n}\n\ntype KeyboardEventHandler = (event: KeyboardEvent) => void\n\n/**\n * Implementation of the event handler.\n *\n * @param callback The callback to run\n * @param options hot key options\n */\nfunction eventHandler(callback: KeyboardEventHandler, options: UseHotKeyOptions): KeyboardEventHandler {\n\treturn (event: KeyboardEvent) => {\n\t\tconst ctrlKeyPressed = isMac ? event.metaKey : event.ctrlKey\n\t\tif (ctrlKeyPressed !== Boolean(options.ctrl)) {\n\t\t\t/**\n\t\t\t * Ctrl is required and not pressed, or the opposite\n\t\t\t * As on macOS 'cmd' key is used instead of 'ctrl' key for most key combinations,\n\t\t\t * 'event.metaKey' should be checked\n\t\t\t */\n\t\t\treturn\n\t\t} else if (event.altKey !== Boolean(options.alt)) {\n\t\t\t// Alt is required and not pressed, or the opposite\n\t\t\treturn\n\t\t} else if (options.shift !== undefined && event.shiftKey !== Boolean(options.shift)) {\n\t\t\t/**\n\t\t\t * Shift is required and not pressed, or the opposite\n\t\t\t * As shift key is used to type capital letters and alternate characters,\n\t\t\t * option should be explicitly defined\n\t\t\t */\n\t\t\treturn\n\t\t} else if (shouldIgnoreEvent(event)) {\n\t\t\t// Keyboard shortcuts are disabled, because active element assumes input\n\t\t\treturn\n\t\t}\n\n\t\tif (options.prevent) {\n\t\t\tevent.preventDefault()\n\t\t}\n\t\tif (options.stop) {\n\t\t\tevent.stopPropagation()\n\t\t}\n\t\tcallback(event)\n\t}\n}\n\n/**\n * Composable to use keyboard shortcuts in the application.\n * It respects the users accessibility configuration (opt-out shortcuts).\n *\n * @param keysOrFilter - keyboard key(s) to listen to, or filter function or pass `true` for listening to all keys\n * @param callback - callback function\n * @param options - composable options\n * @see docs/composables/useHotKey.md\n */\nexport function useHotKey(\n\tkeysOrFilter: true | string | string[] | ((e: KeyboardEvent) => boolean),\n\tcallback: KeyboardEventHandler = () => {},\n\toptions: UseHotKeyOptions = {},\n) {\n\tif (disableKeyboardShortcuts) {\n\t\t// Keyboard shortcuts are disabled\n\t\treturn () => {}\n\t}\n\n\t/**\n\t * Validates event key to expected key\n\t *\n\t * @param event keyboard event\n\t * @param key expected key\n\t * @return whether it satisfies expected value or not\n\t */\n\tconst validateKeyEvent = (event: KeyboardEvent, key: string): boolean => {\n\t\t// If key exactly matches event.key, valid with any caseSensitive option. Do not perform further checks\n\t\tif (event.key === key) {\n\t\t\treturn true\n\t\t}\n\n\t\t// If key and event.key are in different cases, invalid with caseSensitive = true. Do not perform further checks\n\t\tif (options.caseSensitive) {\n\t\t\tconst isKeyInLowerCase = key === key.toLowerCase()\n\t\t\tconst isEventKeyInLowerCase = event.key === event.key.toLowerCase()\n\t\t\tif (isKeyInLowerCase !== isEventKeyInLowerCase) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// If received event.key is not a printable ASCII character code (character code 32-127),\n\t\t// try to derive it from event.code and match with expected key\n\t\tif (derivedKeysRegex.test(key) && nonAsciiPrintableRegex.test(event.key)) {\n\t\t\treturn event.code.replace(/^(?:Key|Digit|Numpad)/, '') === key.toUpperCase()\n\t\t}\n\n\t\treturn event.key.toLowerCase() === key.toLowerCase()\n\t}\n\n\t/**\n\t * Filter function for the listener\n\t * see https://github.com/vueuse/vueuse/blob/v11.3.0/packages/core/onKeyStroke/index.ts#L21-L32\n\t *\n\t * @param event keyboard event\n\t * @return Whether it satisfies expected value or not\n\t */\n\tconst keyFilter = (event: KeyboardEvent): boolean => {\n\t\tif (typeof keysOrFilter === 'function') {\n\t\t\treturn keysOrFilter(event)\n\t\t} else if (typeof keysOrFilter === 'string') {\n\t\t\treturn validateKeyEvent(event, keysOrFilter)\n\t\t} else if (Array.isArray(keysOrFilter)) {\n\t\t\treturn keysOrFilter.some((key) => validateKeyEvent(event, key))\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\tconst stopKeyDown = onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\teventName: 'keydown',\n\t\tdedupe: true,\n\t\tpassive: !options.prevent,\n\t})\n\n\tconst stopKeyUp = options.push\n\t\t? onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\t\t\teventName: 'keyup',\n\t\t\t\tpassive: !options.prevent,\n\t\t\t})\n\t\t: () => {}\n\n\treturn () => {\n\t\tstopKeyDown()\n\t\tstopKeyUp()\n\t}\n}\n"],"names":["isMac","onKeyStroke"],"mappings":";;;;AAAA,IAAA,IAAA,IAAA;AAOA,MAAM,4BAA2B,MAAA,MAAA,KAAA,OAAO,QAAP,OAAA,SAAA,GAAY,kBAAZ,mBAA2B,6BAA3B,OAAA,SAAA,GAAA,KAAA,EAAA;AACjC,MAAM,mBAAmB;AACzB,MAAM,yBAAyB;AA2C/B,SAAS,kBAAkB,OAA+B;AACzD,MAAI,EAAE,MAAM,kBAAkB,gBAC1B,MAAM,kBAAkB,oBACxB,MAAM,kBAAkB,uBACxB,MAAM,kBAAkB,qBACxB,MAAM,OAAO,mBAAmB;AACnC,WAAO;AAAA,EACR;AAEA,SAAO,SAAS,uBAAuB,YAAY,EAAE,WAAW;AACjE;AAUA,SAAS,aAAa,UAAgC,SAAiD;AACtG,SAAO,CAAC,UAAyB;AAChC,UAAM,iBAAiBA,SAAAA,QAAQ,MAAM,UAAU,MAAM;AACrD,QAAI,mBAAmB,QAAQ,QAAQ,IAAI,GAAG;AAM7C;AAAA,IACD,WAAW,MAAM,WAAW,QAAQ,QAAQ,GAAG,GAAG;AAEjD;AAAA,IACD,WAAW,QAAQ,UAAU,UAAa,MAAM,aAAa,QAAQ,QAAQ,KAAK,GAAG;AAMpF;AAAA,IACD,WAAW,kBAAkB,KAAK,GAAG;AAEpC;AAAA,IACD;AAEA,QAAI,QAAQ,SAAS;AACpB,YAAM,eAAA;AAAA,IACP;AACA,QAAI,QAAQ,MAAM;AACjB,YAAM,gBAAA;AAAA,IACP;AACA,aAAS,KAAK;AAAA,EACf;AACD;AAWO,SAAS,UACf,cACA,WAAiC,MAAM;AAAC,GACxC,UAA4B,CAAA,GAC3B;AACD,MAAI,0BAA0B;AAE7B,WAAO,MAAM;AAAA,IAAC;AAAA,EACf;AASA,QAAM,mBAAmB,CAAC,OAAsB,QAAyB;AAExE,QAAI,MAAM,QAAQ,KAAK;AACtB,aAAO;AAAA,IACR;AAGA,QAAI,QAAQ,eAAe;AAC1B,YAAM,mBAAmB,QAAQ,IAAI,YAAA;AACrC,YAAM,wBAAwB,MAAM,QAAQ,MAAM,IAAI,YAAA;AACtD,UAAI,qBAAqB,uBAAuB;AAC/C,eAAO;AAAA,MACR;AAAA,IACD;AAIA,QAAI,iBAAiB,KAAK,GAAG,KAAK,uBAAuB,KAAK,MAAM,GAAG,GAAG;AACzE,aAAO,MAAM,KAAK,QAAQ,yBAAyB,EAAE,MAAM,IAAI,YAAA;AAAA,IAChE;AAEA,WAAO,MAAM,IAAI,YAAA,MAAkB,IAAI,YAAA;AAAA,EACxC;AASA,QAAM,YAAY,CAAC,UAAkC;AACpD,QAAI,OAAO,iBAAiB,YAAY;AACvC,aAAO,aAAa,KAAK;AAAA,IAC1B,WAAW,OAAO,iBAAiB,UAAU;AAC5C,aAAO,iBAAiB,OAAO,YAAY;AAAA,IAC5C,WAAW,MAAM,QAAQ,YAAY,GAAG;AACvC,aAAO,aAAa,KAAK,CAAC,QAAQ,iBAAiB,OAAO,GAAG,CAAC;AAAA,IAC/D,OAAO;AACN,aAAO;AAAA,IACR;AAAA,EACD;AAEA,QAAM,cAAcC,KAAAA,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IAC3E,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB;AAED,QAAM,YAAY,QAAQ,OACvBA,KAAAA,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IACxD,WAAW;AAAA,IACX,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB,IACA,MAAM;AAAA,EAAC;AAEV,SAAO,MAAM;AACZ,gBAAA;AACA,cAAA;AAAA,EACD;AACD;;"}
1
+ {"version":3,"file":"useHotKey.cjs","sources":["../../src/composables/useHotKey/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { onKeyStroke } from '@vueuse/core'\nimport { isMac } from '../../utils/platform.ts'\n\nconst disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.()\nconst derivedKeysRegex = /^[a-zA-Z0-9]$/\nconst nonAsciiPrintableRegex = /^[^\\x20-\\x7F]$/\n\nexport interface UseHotKeyOptions {\n\t/** Make key filter case sensitive */\n\tcaseSensitive?: boolean\n\n\t/** Prevent default behavior of key stroke */\n\tprevent?: boolean\n\n\t/** Stop the event bubbling */\n\tstop?: boolean\n\n\t/** Also listen for keyup event */\n\tpush?: boolean\n\n\t/**\n\t * If set then the callback is only called when the shift key is (not) pressed.\n\t * When left `undefined` a pressed shift key is ignored (callback is run with and without shift pressed).\n\t */\n\tshift?: boolean\n\n\t/**\n\t * Only run the callback if the control key is (not-)pressed.\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'ctrl' key is NOT pressed.\n\t */\n\tctrl?: boolean\n\n\t/**\n\t * If set the callback is only executed if the alt key is (not-)pressed\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'alt' key is NOT pressed.\n\t */\n\talt?: boolean\n}\n\n/**\n * Check if event target (active element) is editable (allows input from keyboard) or NcModal is open\n * If true, a hot key should not trigger the callback\n *\n * @todo Discuss if we should abort on another interactive elements (button, a, e.t.c)\n *\n * @param event keyboard event\n * @return Whether it should prevent callback\n */\nfunction shouldIgnoreEvent(event: KeyboardEvent): boolean {\n\tif (!(event.target instanceof HTMLElement)\n\t\t|| event.target instanceof HTMLInputElement\n\t\t|| event.target instanceof HTMLTextAreaElement\n\t\t|| event.target instanceof HTMLSelectElement\n\t\t|| event.target.isContentEditable) {\n\t\treturn true\n\t}\n\t/** Abort if any modal/dialog opened */\n\treturn document.getElementsByClassName('modal-mask').length !== 0\n}\n\ntype KeyboardEventHandler = (event: KeyboardEvent) => void\n\n/**\n * Implementation of the event handler.\n *\n * @param callback The callback to run\n * @param options hot key options\n */\nfunction eventHandler(callback: KeyboardEventHandler, options: UseHotKeyOptions): KeyboardEventHandler {\n\treturn (event: KeyboardEvent) => {\n\t\tconst ctrlKeyPressed = isMac ? event.metaKey : event.ctrlKey\n\t\tif (ctrlKeyPressed !== Boolean(options.ctrl)) {\n\t\t\t/**\n\t\t\t * Ctrl is required and not pressed, or the opposite\n\t\t\t * As on macOS 'cmd' key is used instead of 'ctrl' key for most key combinations,\n\t\t\t * 'event.metaKey' should be checked\n\t\t\t */\n\t\t\treturn\n\t\t} else if (event.altKey !== Boolean(options.alt)) {\n\t\t\t// Alt is required and not pressed, or the opposite\n\t\t\treturn\n\t\t} else if (options.shift !== undefined && event.shiftKey !== Boolean(options.shift)) {\n\t\t\t/**\n\t\t\t * Shift is required and not pressed, or the opposite\n\t\t\t * As shift key is used to type capital letters and alternate characters,\n\t\t\t * option should be explicitly defined\n\t\t\t */\n\t\t\treturn\n\t\t} else if (shouldIgnoreEvent(event)) {\n\t\t\t// Keyboard shortcuts are disabled, because active element assumes input\n\t\t\treturn\n\t\t}\n\n\t\tif (options.prevent) {\n\t\t\tevent.preventDefault()\n\t\t}\n\t\tif (options.stop) {\n\t\t\tevent.stopPropagation()\n\t\t}\n\t\tcallback(event)\n\t}\n}\n\n/**\n * Composable to use keyboard shortcuts in the application.\n * It respects the users accessibility configuration (opt-out shortcuts).\n *\n * @param keysOrFilter - keyboard key(s) to listen to, or filter function or pass `true` for listening to all keys\n * @param callback - callback function\n * @param options - composable options\n * @see docs/composables/useHotKey.md\n */\nexport function useHotKey(\n\tkeysOrFilter: true | string | string[] | ((e: KeyboardEvent) => boolean),\n\tcallback: KeyboardEventHandler = () => {},\n\toptions: UseHotKeyOptions = {},\n) {\n\tif (disableKeyboardShortcuts) {\n\t\t// Keyboard shortcuts are disabled\n\t\treturn () => {}\n\t}\n\n\t/**\n\t * Validates event key to expected key\n\t *\n\t * @param event keyboard event\n\t * @param key expected key\n\t * @return whether it satisfies expected value or not\n\t */\n\tconst validateKeyEvent = (event: KeyboardEvent, key: string): boolean => {\n\t\t// If key exactly matches event.key, valid with any caseSensitive option. Do not perform further checks\n\t\tif (event.key === key) {\n\t\t\treturn true\n\t\t}\n\n\t\t// If key and event.key are in different cases, invalid with caseSensitive = true. Do not perform further checks\n\t\tif (options.caseSensitive) {\n\t\t\tconst isKeyInLowerCase = key === key.toLowerCase()\n\t\t\tconst isEventKeyInLowerCase = event.key === event.key.toLowerCase()\n\t\t\tif (isKeyInLowerCase !== isEventKeyInLowerCase) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// If received event.key is not a printable ASCII character code (character code 32-127),\n\t\t// try to derive it from event.code and match with expected key\n\t\tif (derivedKeysRegex.test(key) && nonAsciiPrintableRegex.test(event.key)) {\n\t\t\treturn event.code.replace(/^(?:Key|Digit|Numpad)/, '') === key.toUpperCase()\n\t\t}\n\n\t\treturn event.key.toLowerCase() === key.toLowerCase()\n\t}\n\n\t/**\n\t * Filter function for the listener\n\t * see https://github.com/vueuse/vueuse/blob/v11.3.0/packages/core/onKeyStroke/index.ts#L21-L32\n\t *\n\t * @param event keyboard event\n\t * @return Whether it satisfies expected value or not\n\t */\n\tconst keyFilter = (event: KeyboardEvent): boolean => {\n\t\tif (typeof keysOrFilter === 'function') {\n\t\t\treturn keysOrFilter(event)\n\t\t} else if (typeof keysOrFilter === 'string') {\n\t\t\treturn validateKeyEvent(event, keysOrFilter)\n\t\t} else if (Array.isArray(keysOrFilter)) {\n\t\t\treturn keysOrFilter.some((key) => validateKeyEvent(event, key))\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\tconst stopKeyDown = onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\teventName: 'keydown',\n\t\tdedupe: true,\n\t\tpassive: !options.prevent,\n\t})\n\n\tconst stopKeyUp = options.push\n\t\t? onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\t\t\teventName: 'keyup',\n\t\t\t\tpassive: !options.prevent,\n\t\t\t})\n\t\t: () => {}\n\n\treturn () => {\n\t\tstopKeyDown()\n\t\tstopKeyUp()\n\t}\n}\n"],"names":["isMac","onKeyStroke"],"mappings":";;;;AAOA,MAAM,2BAA2B,OAAO,KAAK,eAAe,2BAAA;AAC5D,MAAM,mBAAmB;AACzB,MAAM,yBAAyB;AA2C/B,SAAS,kBAAkB,OAA+B;AACzD,MAAI,EAAE,MAAM,kBAAkB,gBAC1B,MAAM,kBAAkB,oBACxB,MAAM,kBAAkB,uBACxB,MAAM,kBAAkB,qBACxB,MAAM,OAAO,mBAAmB;AACnC,WAAO;AAAA,EACR;AAEA,SAAO,SAAS,uBAAuB,YAAY,EAAE,WAAW;AACjE;AAUA,SAAS,aAAa,UAAgC,SAAiD;AACtG,SAAO,CAAC,UAAyB;AAChC,UAAM,iBAAiBA,SAAAA,QAAQ,MAAM,UAAU,MAAM;AACrD,QAAI,mBAAmB,QAAQ,QAAQ,IAAI,GAAG;AAM7C;AAAA,IACD,WAAW,MAAM,WAAW,QAAQ,QAAQ,GAAG,GAAG;AAEjD;AAAA,IACD,WAAW,QAAQ,UAAU,UAAa,MAAM,aAAa,QAAQ,QAAQ,KAAK,GAAG;AAMpF;AAAA,IACD,WAAW,kBAAkB,KAAK,GAAG;AAEpC;AAAA,IACD;AAEA,QAAI,QAAQ,SAAS;AACpB,YAAM,eAAA;AAAA,IACP;AACA,QAAI,QAAQ,MAAM;AACjB,YAAM,gBAAA;AAAA,IACP;AACA,aAAS,KAAK;AAAA,EACf;AACD;AAWO,SAAS,UACf,cACA,WAAiC,MAAM;AAAC,GACxC,UAA4B,CAAA,GAC3B;AACD,MAAI,0BAA0B;AAE7B,WAAO,MAAM;AAAA,IAAC;AAAA,EACf;AASA,QAAM,mBAAmB,CAAC,OAAsB,QAAyB;AAExE,QAAI,MAAM,QAAQ,KAAK;AACtB,aAAO;AAAA,IACR;AAGA,QAAI,QAAQ,eAAe;AAC1B,YAAM,mBAAmB,QAAQ,IAAI,YAAA;AACrC,YAAM,wBAAwB,MAAM,QAAQ,MAAM,IAAI,YAAA;AACtD,UAAI,qBAAqB,uBAAuB;AAC/C,eAAO;AAAA,MACR;AAAA,IACD;AAIA,QAAI,iBAAiB,KAAK,GAAG,KAAK,uBAAuB,KAAK,MAAM,GAAG,GAAG;AACzE,aAAO,MAAM,KAAK,QAAQ,yBAAyB,EAAE,MAAM,IAAI,YAAA;AAAA,IAChE;AAEA,WAAO,MAAM,IAAI,YAAA,MAAkB,IAAI,YAAA;AAAA,EACxC;AASA,QAAM,YAAY,CAAC,UAAkC;AACpD,QAAI,OAAO,iBAAiB,YAAY;AACvC,aAAO,aAAa,KAAK;AAAA,IAC1B,WAAW,OAAO,iBAAiB,UAAU;AAC5C,aAAO,iBAAiB,OAAO,YAAY;AAAA,IAC5C,WAAW,MAAM,QAAQ,YAAY,GAAG;AACvC,aAAO,aAAa,KAAK,CAAC,QAAQ,iBAAiB,OAAO,GAAG,CAAC;AAAA,IAC/D,OAAO;AACN,aAAO;AAAA,IACR;AAAA,EACD;AAEA,QAAM,cAAcC,KAAAA,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IAC3E,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB;AAED,QAAM,YAAY,QAAQ,OACvBA,KAAAA,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IACxD,WAAW;AAAA,IACX,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB,IACA,MAAM;AAAA,EAAC;AAEV,SAAO,MAAM;AACZ,gBAAA;AACA,cAAA;AAAA,EACD;AACD;;"}
@@ -1,7 +1,6 @@
1
1
  import { onKeyStroke } from "@vueuse/core";
2
2
  import { i as isMac } from "../chunks/platform-CC2ecGvV.mjs";
3
- var _a, _b, _c;
4
- const disableKeyboardShortcuts = (_c = (_b = (_a = window.OCP) == null ? void 0 : _a.Accessibility) == null ? void 0 : _b.disableKeyboardShortcuts) == null ? void 0 : _c.call(_b);
3
+ const disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.();
5
4
  const derivedKeysRegex = /^[a-zA-Z0-9]$/;
6
5
  const nonAsciiPrintableRegex = /^[^\x20-\x7F]$/;
7
6
  function shouldIgnoreEvent(event) {
@@ -1 +1 @@
1
- {"version":3,"file":"useHotKey.mjs","sources":["../../src/composables/useHotKey/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { onKeyStroke } from '@vueuse/core'\nimport { isMac } from '../../utils/platform.ts'\n\nconst disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.()\nconst derivedKeysRegex = /^[a-zA-Z0-9]$/\nconst nonAsciiPrintableRegex = /^[^\\x20-\\x7F]$/\n\nexport interface UseHotKeyOptions {\n\t/** Make key filter case sensitive */\n\tcaseSensitive?: boolean\n\n\t/** Prevent default behavior of key stroke */\n\tprevent?: boolean\n\n\t/** Stop the event bubbling */\n\tstop?: boolean\n\n\t/** Also listen for keyup event */\n\tpush?: boolean\n\n\t/**\n\t * If set then the callback is only called when the shift key is (not) pressed.\n\t * When left `undefined` a pressed shift key is ignored (callback is run with and without shift pressed).\n\t */\n\tshift?: boolean\n\n\t/**\n\t * Only run the callback if the control key is (not-)pressed.\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'ctrl' key is NOT pressed.\n\t */\n\tctrl?: boolean\n\n\t/**\n\t * If set the callback is only executed if the alt key is (not-)pressed\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'alt' key is NOT pressed.\n\t */\n\talt?: boolean\n}\n\n/**\n * Check if event target (active element) is editable (allows input from keyboard) or NcModal is open\n * If true, a hot key should not trigger the callback\n *\n * @todo Discuss if we should abort on another interactive elements (button, a, e.t.c)\n *\n * @param event keyboard event\n * @return Whether it should prevent callback\n */\nfunction shouldIgnoreEvent(event: KeyboardEvent): boolean {\n\tif (!(event.target instanceof HTMLElement)\n\t\t|| event.target instanceof HTMLInputElement\n\t\t|| event.target instanceof HTMLTextAreaElement\n\t\t|| event.target instanceof HTMLSelectElement\n\t\t|| event.target.isContentEditable) {\n\t\treturn true\n\t}\n\t/** Abort if any modal/dialog opened */\n\treturn document.getElementsByClassName('modal-mask').length !== 0\n}\n\ntype KeyboardEventHandler = (event: KeyboardEvent) => void\n\n/**\n * Implementation of the event handler.\n *\n * @param callback The callback to run\n * @param options hot key options\n */\nfunction eventHandler(callback: KeyboardEventHandler, options: UseHotKeyOptions): KeyboardEventHandler {\n\treturn (event: KeyboardEvent) => {\n\t\tconst ctrlKeyPressed = isMac ? event.metaKey : event.ctrlKey\n\t\tif (ctrlKeyPressed !== Boolean(options.ctrl)) {\n\t\t\t/**\n\t\t\t * Ctrl is required and not pressed, or the opposite\n\t\t\t * As on macOS 'cmd' key is used instead of 'ctrl' key for most key combinations,\n\t\t\t * 'event.metaKey' should be checked\n\t\t\t */\n\t\t\treturn\n\t\t} else if (event.altKey !== Boolean(options.alt)) {\n\t\t\t// Alt is required and not pressed, or the opposite\n\t\t\treturn\n\t\t} else if (options.shift !== undefined && event.shiftKey !== Boolean(options.shift)) {\n\t\t\t/**\n\t\t\t * Shift is required and not pressed, or the opposite\n\t\t\t * As shift key is used to type capital letters and alternate characters,\n\t\t\t * option should be explicitly defined\n\t\t\t */\n\t\t\treturn\n\t\t} else if (shouldIgnoreEvent(event)) {\n\t\t\t// Keyboard shortcuts are disabled, because active element assumes input\n\t\t\treturn\n\t\t}\n\n\t\tif (options.prevent) {\n\t\t\tevent.preventDefault()\n\t\t}\n\t\tif (options.stop) {\n\t\t\tevent.stopPropagation()\n\t\t}\n\t\tcallback(event)\n\t}\n}\n\n/**\n * Composable to use keyboard shortcuts in the application.\n * It respects the users accessibility configuration (opt-out shortcuts).\n *\n * @param keysOrFilter - keyboard key(s) to listen to, or filter function or pass `true` for listening to all keys\n * @param callback - callback function\n * @param options - composable options\n * @see docs/composables/useHotKey.md\n */\nexport function useHotKey(\n\tkeysOrFilter: true | string | string[] | ((e: KeyboardEvent) => boolean),\n\tcallback: KeyboardEventHandler = () => {},\n\toptions: UseHotKeyOptions = {},\n) {\n\tif (disableKeyboardShortcuts) {\n\t\t// Keyboard shortcuts are disabled\n\t\treturn () => {}\n\t}\n\n\t/**\n\t * Validates event key to expected key\n\t *\n\t * @param event keyboard event\n\t * @param key expected key\n\t * @return whether it satisfies expected value or not\n\t */\n\tconst validateKeyEvent = (event: KeyboardEvent, key: string): boolean => {\n\t\t// If key exactly matches event.key, valid with any caseSensitive option. Do not perform further checks\n\t\tif (event.key === key) {\n\t\t\treturn true\n\t\t}\n\n\t\t// If key and event.key are in different cases, invalid with caseSensitive = true. Do not perform further checks\n\t\tif (options.caseSensitive) {\n\t\t\tconst isKeyInLowerCase = key === key.toLowerCase()\n\t\t\tconst isEventKeyInLowerCase = event.key === event.key.toLowerCase()\n\t\t\tif (isKeyInLowerCase !== isEventKeyInLowerCase) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// If received event.key is not a printable ASCII character code (character code 32-127),\n\t\t// try to derive it from event.code and match with expected key\n\t\tif (derivedKeysRegex.test(key) && nonAsciiPrintableRegex.test(event.key)) {\n\t\t\treturn event.code.replace(/^(?:Key|Digit|Numpad)/, '') === key.toUpperCase()\n\t\t}\n\n\t\treturn event.key.toLowerCase() === key.toLowerCase()\n\t}\n\n\t/**\n\t * Filter function for the listener\n\t * see https://github.com/vueuse/vueuse/blob/v11.3.0/packages/core/onKeyStroke/index.ts#L21-L32\n\t *\n\t * @param event keyboard event\n\t * @return Whether it satisfies expected value or not\n\t */\n\tconst keyFilter = (event: KeyboardEvent): boolean => {\n\t\tif (typeof keysOrFilter === 'function') {\n\t\t\treturn keysOrFilter(event)\n\t\t} else if (typeof keysOrFilter === 'string') {\n\t\t\treturn validateKeyEvent(event, keysOrFilter)\n\t\t} else if (Array.isArray(keysOrFilter)) {\n\t\t\treturn keysOrFilter.some((key) => validateKeyEvent(event, key))\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\tconst stopKeyDown = onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\teventName: 'keydown',\n\t\tdedupe: true,\n\t\tpassive: !options.prevent,\n\t})\n\n\tconst stopKeyUp = options.push\n\t\t? onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\t\t\teventName: 'keyup',\n\t\t\t\tpassive: !options.prevent,\n\t\t\t})\n\t\t: () => {}\n\n\treturn () => {\n\t\tstopKeyDown()\n\t\tstopKeyUp()\n\t}\n}\n"],"names":[],"mappings":";;AAAA,IAAA,IAAA,IAAA;AAOA,MAAM,4BAA2B,MAAA,MAAA,KAAA,OAAO,QAAP,OAAA,SAAA,GAAY,kBAAZ,mBAA2B,6BAA3B,OAAA,SAAA,GAAA,KAAA,EAAA;AACjC,MAAM,mBAAmB;AACzB,MAAM,yBAAyB;AA2C/B,SAAS,kBAAkB,OAA+B;AACzD,MAAI,EAAE,MAAM,kBAAkB,gBAC1B,MAAM,kBAAkB,oBACxB,MAAM,kBAAkB,uBACxB,MAAM,kBAAkB,qBACxB,MAAM,OAAO,mBAAmB;AACnC,WAAO;AAAA,EACR;AAEA,SAAO,SAAS,uBAAuB,YAAY,EAAE,WAAW;AACjE;AAUA,SAAS,aAAa,UAAgC,SAAiD;AACtG,SAAO,CAAC,UAAyB;AAChC,UAAM,iBAAiB,QAAQ,MAAM,UAAU,MAAM;AACrD,QAAI,mBAAmB,QAAQ,QAAQ,IAAI,GAAG;AAM7C;AAAA,IACD,WAAW,MAAM,WAAW,QAAQ,QAAQ,GAAG,GAAG;AAEjD;AAAA,IACD,WAAW,QAAQ,UAAU,UAAa,MAAM,aAAa,QAAQ,QAAQ,KAAK,GAAG;AAMpF;AAAA,IACD,WAAW,kBAAkB,KAAK,GAAG;AAEpC;AAAA,IACD;AAEA,QAAI,QAAQ,SAAS;AACpB,YAAM,eAAA;AAAA,IACP;AACA,QAAI,QAAQ,MAAM;AACjB,YAAM,gBAAA;AAAA,IACP;AACA,aAAS,KAAK;AAAA,EACf;AACD;AAWO,SAAS,UACf,cACA,WAAiC,MAAM;AAAC,GACxC,UAA4B,CAAA,GAC3B;AACD,MAAI,0BAA0B;AAE7B,WAAO,MAAM;AAAA,IAAC;AAAA,EACf;AASA,QAAM,mBAAmB,CAAC,OAAsB,QAAyB;AAExE,QAAI,MAAM,QAAQ,KAAK;AACtB,aAAO;AAAA,IACR;AAGA,QAAI,QAAQ,eAAe;AAC1B,YAAM,mBAAmB,QAAQ,IAAI,YAAA;AACrC,YAAM,wBAAwB,MAAM,QAAQ,MAAM,IAAI,YAAA;AACtD,UAAI,qBAAqB,uBAAuB;AAC/C,eAAO;AAAA,MACR;AAAA,IACD;AAIA,QAAI,iBAAiB,KAAK,GAAG,KAAK,uBAAuB,KAAK,MAAM,GAAG,GAAG;AACzE,aAAO,MAAM,KAAK,QAAQ,yBAAyB,EAAE,MAAM,IAAI,YAAA;AAAA,IAChE;AAEA,WAAO,MAAM,IAAI,YAAA,MAAkB,IAAI,YAAA;AAAA,EACxC;AASA,QAAM,YAAY,CAAC,UAAkC;AACpD,QAAI,OAAO,iBAAiB,YAAY;AACvC,aAAO,aAAa,KAAK;AAAA,IAC1B,WAAW,OAAO,iBAAiB,UAAU;AAC5C,aAAO,iBAAiB,OAAO,YAAY;AAAA,IAC5C,WAAW,MAAM,QAAQ,YAAY,GAAG;AACvC,aAAO,aAAa,KAAK,CAAC,QAAQ,iBAAiB,OAAO,GAAG,CAAC;AAAA,IAC/D,OAAO;AACN,aAAO;AAAA,IACR;AAAA,EACD;AAEA,QAAM,cAAc,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IAC3E,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB;AAED,QAAM,YAAY,QAAQ,OACvB,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IACxD,WAAW;AAAA,IACX,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB,IACA,MAAM;AAAA,EAAC;AAEV,SAAO,MAAM;AACZ,gBAAA;AACA,cAAA;AAAA,EACD;AACD;"}
1
+ {"version":3,"file":"useHotKey.mjs","sources":["../../src/composables/useHotKey/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { onKeyStroke } from '@vueuse/core'\nimport { isMac } from '../../utils/platform.ts'\n\nconst disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.()\nconst derivedKeysRegex = /^[a-zA-Z0-9]$/\nconst nonAsciiPrintableRegex = /^[^\\x20-\\x7F]$/\n\nexport interface UseHotKeyOptions {\n\t/** Make key filter case sensitive */\n\tcaseSensitive?: boolean\n\n\t/** Prevent default behavior of key stroke */\n\tprevent?: boolean\n\n\t/** Stop the event bubbling */\n\tstop?: boolean\n\n\t/** Also listen for keyup event */\n\tpush?: boolean\n\n\t/**\n\t * If set then the callback is only called when the shift key is (not) pressed.\n\t * When left `undefined` a pressed shift key is ignored (callback is run with and without shift pressed).\n\t */\n\tshift?: boolean\n\n\t/**\n\t * Only run the callback if the control key is (not-)pressed.\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'ctrl' key is NOT pressed.\n\t */\n\tctrl?: boolean\n\n\t/**\n\t * If set the callback is only executed if the alt key is (not-)pressed\n\t * Undefined will be handled the same as `false` and will only run the callback if the 'alt' key is NOT pressed.\n\t */\n\talt?: boolean\n}\n\n/**\n * Check if event target (active element) is editable (allows input from keyboard) or NcModal is open\n * If true, a hot key should not trigger the callback\n *\n * @todo Discuss if we should abort on another interactive elements (button, a, e.t.c)\n *\n * @param event keyboard event\n * @return Whether it should prevent callback\n */\nfunction shouldIgnoreEvent(event: KeyboardEvent): boolean {\n\tif (!(event.target instanceof HTMLElement)\n\t\t|| event.target instanceof HTMLInputElement\n\t\t|| event.target instanceof HTMLTextAreaElement\n\t\t|| event.target instanceof HTMLSelectElement\n\t\t|| event.target.isContentEditable) {\n\t\treturn true\n\t}\n\t/** Abort if any modal/dialog opened */\n\treturn document.getElementsByClassName('modal-mask').length !== 0\n}\n\ntype KeyboardEventHandler = (event: KeyboardEvent) => void\n\n/**\n * Implementation of the event handler.\n *\n * @param callback The callback to run\n * @param options hot key options\n */\nfunction eventHandler(callback: KeyboardEventHandler, options: UseHotKeyOptions): KeyboardEventHandler {\n\treturn (event: KeyboardEvent) => {\n\t\tconst ctrlKeyPressed = isMac ? event.metaKey : event.ctrlKey\n\t\tif (ctrlKeyPressed !== Boolean(options.ctrl)) {\n\t\t\t/**\n\t\t\t * Ctrl is required and not pressed, or the opposite\n\t\t\t * As on macOS 'cmd' key is used instead of 'ctrl' key for most key combinations,\n\t\t\t * 'event.metaKey' should be checked\n\t\t\t */\n\t\t\treturn\n\t\t} else if (event.altKey !== Boolean(options.alt)) {\n\t\t\t// Alt is required and not pressed, or the opposite\n\t\t\treturn\n\t\t} else if (options.shift !== undefined && event.shiftKey !== Boolean(options.shift)) {\n\t\t\t/**\n\t\t\t * Shift is required and not pressed, or the opposite\n\t\t\t * As shift key is used to type capital letters and alternate characters,\n\t\t\t * option should be explicitly defined\n\t\t\t */\n\t\t\treturn\n\t\t} else if (shouldIgnoreEvent(event)) {\n\t\t\t// Keyboard shortcuts are disabled, because active element assumes input\n\t\t\treturn\n\t\t}\n\n\t\tif (options.prevent) {\n\t\t\tevent.preventDefault()\n\t\t}\n\t\tif (options.stop) {\n\t\t\tevent.stopPropagation()\n\t\t}\n\t\tcallback(event)\n\t}\n}\n\n/**\n * Composable to use keyboard shortcuts in the application.\n * It respects the users accessibility configuration (opt-out shortcuts).\n *\n * @param keysOrFilter - keyboard key(s) to listen to, or filter function or pass `true` for listening to all keys\n * @param callback - callback function\n * @param options - composable options\n * @see docs/composables/useHotKey.md\n */\nexport function useHotKey(\n\tkeysOrFilter: true | string | string[] | ((e: KeyboardEvent) => boolean),\n\tcallback: KeyboardEventHandler = () => {},\n\toptions: UseHotKeyOptions = {},\n) {\n\tif (disableKeyboardShortcuts) {\n\t\t// Keyboard shortcuts are disabled\n\t\treturn () => {}\n\t}\n\n\t/**\n\t * Validates event key to expected key\n\t *\n\t * @param event keyboard event\n\t * @param key expected key\n\t * @return whether it satisfies expected value or not\n\t */\n\tconst validateKeyEvent = (event: KeyboardEvent, key: string): boolean => {\n\t\t// If key exactly matches event.key, valid with any caseSensitive option. Do not perform further checks\n\t\tif (event.key === key) {\n\t\t\treturn true\n\t\t}\n\n\t\t// If key and event.key are in different cases, invalid with caseSensitive = true. Do not perform further checks\n\t\tif (options.caseSensitive) {\n\t\t\tconst isKeyInLowerCase = key === key.toLowerCase()\n\t\t\tconst isEventKeyInLowerCase = event.key === event.key.toLowerCase()\n\t\t\tif (isKeyInLowerCase !== isEventKeyInLowerCase) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// If received event.key is not a printable ASCII character code (character code 32-127),\n\t\t// try to derive it from event.code and match with expected key\n\t\tif (derivedKeysRegex.test(key) && nonAsciiPrintableRegex.test(event.key)) {\n\t\t\treturn event.code.replace(/^(?:Key|Digit|Numpad)/, '') === key.toUpperCase()\n\t\t}\n\n\t\treturn event.key.toLowerCase() === key.toLowerCase()\n\t}\n\n\t/**\n\t * Filter function for the listener\n\t * see https://github.com/vueuse/vueuse/blob/v11.3.0/packages/core/onKeyStroke/index.ts#L21-L32\n\t *\n\t * @param event keyboard event\n\t * @return Whether it satisfies expected value or not\n\t */\n\tconst keyFilter = (event: KeyboardEvent): boolean => {\n\t\tif (typeof keysOrFilter === 'function') {\n\t\t\treturn keysOrFilter(event)\n\t\t} else if (typeof keysOrFilter === 'string') {\n\t\t\treturn validateKeyEvent(event, keysOrFilter)\n\t\t} else if (Array.isArray(keysOrFilter)) {\n\t\t\treturn keysOrFilter.some((key) => validateKeyEvent(event, key))\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\tconst stopKeyDown = onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\teventName: 'keydown',\n\t\tdedupe: true,\n\t\tpassive: !options.prevent,\n\t})\n\n\tconst stopKeyUp = options.push\n\t\t? onKeyStroke(keyFilter, eventHandler(callback, options), {\n\t\t\t\teventName: 'keyup',\n\t\t\t\tpassive: !options.prevent,\n\t\t\t})\n\t\t: () => {}\n\n\treturn () => {\n\t\tstopKeyDown()\n\t\tstopKeyUp()\n\t}\n}\n"],"names":[],"mappings":";;AAOA,MAAM,2BAA2B,OAAO,KAAK,eAAe,2BAAA;AAC5D,MAAM,mBAAmB;AACzB,MAAM,yBAAyB;AA2C/B,SAAS,kBAAkB,OAA+B;AACzD,MAAI,EAAE,MAAM,kBAAkB,gBAC1B,MAAM,kBAAkB,oBACxB,MAAM,kBAAkB,uBACxB,MAAM,kBAAkB,qBACxB,MAAM,OAAO,mBAAmB;AACnC,WAAO;AAAA,EACR;AAEA,SAAO,SAAS,uBAAuB,YAAY,EAAE,WAAW;AACjE;AAUA,SAAS,aAAa,UAAgC,SAAiD;AACtG,SAAO,CAAC,UAAyB;AAChC,UAAM,iBAAiB,QAAQ,MAAM,UAAU,MAAM;AACrD,QAAI,mBAAmB,QAAQ,QAAQ,IAAI,GAAG;AAM7C;AAAA,IACD,WAAW,MAAM,WAAW,QAAQ,QAAQ,GAAG,GAAG;AAEjD;AAAA,IACD,WAAW,QAAQ,UAAU,UAAa,MAAM,aAAa,QAAQ,QAAQ,KAAK,GAAG;AAMpF;AAAA,IACD,WAAW,kBAAkB,KAAK,GAAG;AAEpC;AAAA,IACD;AAEA,QAAI,QAAQ,SAAS;AACpB,YAAM,eAAA;AAAA,IACP;AACA,QAAI,QAAQ,MAAM;AACjB,YAAM,gBAAA;AAAA,IACP;AACA,aAAS,KAAK;AAAA,EACf;AACD;AAWO,SAAS,UACf,cACA,WAAiC,MAAM;AAAC,GACxC,UAA4B,CAAA,GAC3B;AACD,MAAI,0BAA0B;AAE7B,WAAO,MAAM;AAAA,IAAC;AAAA,EACf;AASA,QAAM,mBAAmB,CAAC,OAAsB,QAAyB;AAExE,QAAI,MAAM,QAAQ,KAAK;AACtB,aAAO;AAAA,IACR;AAGA,QAAI,QAAQ,eAAe;AAC1B,YAAM,mBAAmB,QAAQ,IAAI,YAAA;AACrC,YAAM,wBAAwB,MAAM,QAAQ,MAAM,IAAI,YAAA;AACtD,UAAI,qBAAqB,uBAAuB;AAC/C,eAAO;AAAA,MACR;AAAA,IACD;AAIA,QAAI,iBAAiB,KAAK,GAAG,KAAK,uBAAuB,KAAK,MAAM,GAAG,GAAG;AACzE,aAAO,MAAM,KAAK,QAAQ,yBAAyB,EAAE,MAAM,IAAI,YAAA;AAAA,IAChE;AAEA,WAAO,MAAM,IAAI,YAAA,MAAkB,IAAI,YAAA;AAAA,EACxC;AASA,QAAM,YAAY,CAAC,UAAkC;AACpD,QAAI,OAAO,iBAAiB,YAAY;AACvC,aAAO,aAAa,KAAK;AAAA,IAC1B,WAAW,OAAO,iBAAiB,UAAU;AAC5C,aAAO,iBAAiB,OAAO,YAAY;AAAA,IAC5C,WAAW,MAAM,QAAQ,YAAY,GAAG;AACvC,aAAO,aAAa,KAAK,CAAC,QAAQ,iBAAiB,OAAO,GAAG,CAAC;AAAA,IAC/D,OAAO;AACN,aAAO;AAAA,IACR;AAAA,EACD;AAEA,QAAM,cAAc,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IAC3E,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB;AAED,QAAM,YAAY,QAAQ,OACvB,YAAY,WAAW,aAAa,UAAU,OAAO,GAAG;AAAA,IACxD,WAAW;AAAA,IACX,SAAS,CAAC,QAAQ;AAAA,EAAA,CAClB,IACA,MAAM;AAAA,EAAC;AAEV,SAAO,MAAM;AACZ,gBAAA;AACA,cAAA;AAAA,EACD;AACD;"}
@@ -9,10 +9,7 @@ const constants = require("../chunks/constants-C_lA-vcp.cjs");
9
9
  * SPDX-License-Identifier: AGPL-3.0-or-later
10
10
  */
11
11
  function useIsDarkThemeElement(el) {
12
- const element = Vue.computed(() => {
13
- var _a;
14
- return (_a = core.toValue(el)) != null ? _a : document.body;
15
- });
12
+ const element = Vue.computed(() => core.toValue(el) ?? document.body);
16
13
  const isDarkTheme = Vue.ref(Functions_isDarkTheme.checkIfDarkTheme(element.value));
17
14
  const isDarkSystemTheme = core.usePreferredDark();
18
15
  function updateIsDarkTheme() {
@@ -28,7 +25,7 @@ function useIsDarkTheme() {
28
25
  const isDarkTheme = useInternalIsDarkTheme();
29
26
  const enforcedTheme = Vue.inject(constants.INJECTION_KEY_THEME, void 0);
30
27
  return Vue.computed(() => {
31
- if (enforcedTheme == null ? void 0 : enforcedTheme.value) {
28
+ if (enforcedTheme?.value) {
32
29
  return enforcedTheme.value === "dark";
33
30
  }
34
31
  return isDarkTheme.value;
@@ -1 +1 @@
1
- {"version":3,"file":"useIsDarkTheme.cjs","sources":["../../src/composables/useIsDarkTheme/index.ts"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MaybeRefOrGetter } from '@vueuse/core'\nimport type { DeepReadonly, Ref } from 'vue'\n\nimport { createSharedComposable, toValue, useMutationObserver, usePreferredDark } from '@vueuse/core'\nimport { computed, inject, readonly, ref, watch } from 'vue'\nimport { checkIfDarkTheme } from '../../functions/isDarkTheme/index.ts'\nimport { INJECTION_KEY_THEME } from './constants.ts'\n\n/**\n * Check whether the dark theme is enabled on a specific element.\n * If you need to check an entire page, use `useIsDarkTheme` instead for better performance.\n * Reacts on element attributes change and system theme change.\n *\n * @param el - The element to check for the dark theme enabled on (default is `document.body`)\n * @return - computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkThemeElement(el?: MaybeRefOrGetter<HTMLElement>): DeepReadonly<Ref<boolean>> {\n\tconst element = computed(() => toValue(el) ?? document.body)\n\n\tconst isDarkTheme = ref(checkIfDarkTheme(element.value))\n\tconst isDarkSystemTheme = usePreferredDark()\n\n\t/** Update the isDarkTheme */\n\tfunction updateIsDarkTheme() {\n\t\tisDarkTheme.value = checkIfDarkTheme(element.value)\n\t}\n\n\t// Watch for element change to handle data-theme* attributes change\n\tuseMutationObserver(element, updateIsDarkTheme, { attributes: true })\n\t// Watch for ref changes\n\twatch(element, updateIsDarkTheme)\n\t// Watch for system theme change for the default theme\n\twatch(isDarkSystemTheme, updateIsDarkTheme, { immediate: true })\n\n\treturn readonly(isDarkTheme)\n}\n\n/**\n * The real shared composable of the dark theme state.\n * We need to wrap this to allow to react to injected theme changes.\n */\nconst useInternalIsDarkTheme = createSharedComposable(() => useIsDarkThemeElement())\n\n/**\n * Shared composable to check whether the dark theme is enabled on the page.\n *\n * Reacts on body data-theme-* attributes change and system theme change.\n * As well as any enforced theme by the `NcThemeProvider`.\n *\n * @return Computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkTheme(): DeepReadonly<Ref<boolean>> {\n\tconst isDarkTheme = useInternalIsDarkTheme()\n\tconst enforcedTheme = inject(INJECTION_KEY_THEME, undefined)\n\n\treturn computed(() => {\n\t\tif (enforcedTheme?.value) {\n\t\t\treturn enforcedTheme.value === 'dark'\n\t\t}\n\t\treturn isDarkTheme.value\n\t})\n}\n"],"names":["computed","toValue","ref","checkIfDarkTheme","usePreferredDark","useMutationObserver","watch","readonly","createSharedComposable","inject","INJECTION_KEY_THEME"],"mappings":";;;;;;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,sBAAsB,IAAgE;AACrG,QAAM,UAAUA,IAAAA,SAAS,MAAG;AAtB7B,QAAA;AAsBgC,YAAA,KAAAC,aAAQ,EAAE,MAAV,OAAA,KAAe,SAAS;AAAA,EAAA,CAAI;AAE3D,QAAM,cAAcC,IAAAA,IAAIC,sBAAAA,iBAAiB,QAAQ,KAAK,CAAC;AACvD,QAAM,oBAAoBC,KAAAA,iBAAA;AAG1B,WAAS,oBAAoB;AAC5B,gBAAY,QAAQD,uCAAiB,QAAQ,KAAK;AAAA,EACnD;AAGAE,OAAAA,oBAAoB,SAAS,mBAAmB,EAAE,YAAY,MAAM;AAEpEC,MAAAA,MAAM,SAAS,iBAAiB;AAEhCA,MAAAA,MAAM,mBAAmB,mBAAmB,EAAE,WAAW,MAAM;AAE/D,SAAOC,IAAAA,SAAS,WAAW;AAC5B;AAMA,MAAM,yBAAyBC,KAAAA,uBAAuB,MAAM,uBAAuB;AAU5E,SAAS,iBAA6C;AAC5D,QAAM,cAAc,uBAAA;AACpB,QAAM,gBAAgBC,IAAAA,OAAOC,UAAAA,qBAAqB,MAAS;AAE3D,SAAOV,IAAAA,SAAS,MAAM;AACrB,QAAI,+CAAe,OAAO;AACzB,aAAO,cAAc,UAAU;AAAA,IAChC;AACA,WAAO,YAAY;AAAA,EACpB,CAAC;AACF;;;"}
1
+ {"version":3,"file":"useIsDarkTheme.cjs","sources":["../../src/composables/useIsDarkTheme/index.ts"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MaybeRefOrGetter } from '@vueuse/core'\nimport type { DeepReadonly, Ref } from 'vue'\n\nimport { createSharedComposable, toValue, useMutationObserver, usePreferredDark } from '@vueuse/core'\nimport { computed, inject, readonly, ref, watch } from 'vue'\nimport { checkIfDarkTheme } from '../../functions/isDarkTheme/index.ts'\nimport { INJECTION_KEY_THEME } from './constants.ts'\n\n/**\n * Check whether the dark theme is enabled on a specific element.\n * If you need to check an entire page, use `useIsDarkTheme` instead for better performance.\n * Reacts on element attributes change and system theme change.\n *\n * @param el - The element to check for the dark theme enabled on (default is `document.body`)\n * @return - computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkThemeElement(el?: MaybeRefOrGetter<HTMLElement>): DeepReadonly<Ref<boolean>> {\n\tconst element = computed(() => toValue(el) ?? document.body)\n\n\tconst isDarkTheme = ref(checkIfDarkTheme(element.value))\n\tconst isDarkSystemTheme = usePreferredDark()\n\n\t/** Update the isDarkTheme */\n\tfunction updateIsDarkTheme() {\n\t\tisDarkTheme.value = checkIfDarkTheme(element.value)\n\t}\n\n\t// Watch for element change to handle data-theme* attributes change\n\tuseMutationObserver(element, updateIsDarkTheme, { attributes: true })\n\t// Watch for ref changes\n\twatch(element, updateIsDarkTheme)\n\t// Watch for system theme change for the default theme\n\twatch(isDarkSystemTheme, updateIsDarkTheme, { immediate: true })\n\n\treturn readonly(isDarkTheme)\n}\n\n/**\n * The real shared composable of the dark theme state.\n * We need to wrap this to allow to react to injected theme changes.\n */\nconst useInternalIsDarkTheme = createSharedComposable(() => useIsDarkThemeElement())\n\n/**\n * Shared composable to check whether the dark theme is enabled on the page.\n *\n * Reacts on body data-theme-* attributes change and system theme change.\n * As well as any enforced theme by the `NcThemeProvider`.\n *\n * @return Computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkTheme(): DeepReadonly<Ref<boolean>> {\n\tconst isDarkTheme = useInternalIsDarkTheme()\n\tconst enforcedTheme = inject(INJECTION_KEY_THEME, undefined)\n\n\treturn computed(() => {\n\t\tif (enforcedTheme?.value) {\n\t\t\treturn enforcedTheme.value === 'dark'\n\t\t}\n\t\treturn isDarkTheme.value\n\t})\n}\n"],"names":["computed","toValue","ref","checkIfDarkTheme","usePreferredDark","useMutationObserver","watch","readonly","createSharedComposable","inject","INJECTION_KEY_THEME"],"mappings":";;;;;;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,sBAAsB,IAAgE;AACrG,QAAM,UAAUA,IAAAA,SAAS,MAAMC,KAAAA,QAAQ,EAAE,KAAK,SAAS,IAAI;AAE3D,QAAM,cAAcC,IAAAA,IAAIC,sBAAAA,iBAAiB,QAAQ,KAAK,CAAC;AACvD,QAAM,oBAAoBC,KAAAA,iBAAA;AAG1B,WAAS,oBAAoB;AAC5B,gBAAY,QAAQD,uCAAiB,QAAQ,KAAK;AAAA,EACnD;AAGAE,OAAAA,oBAAoB,SAAS,mBAAmB,EAAE,YAAY,MAAM;AAEpEC,MAAAA,MAAM,SAAS,iBAAiB;AAEhCA,MAAAA,MAAM,mBAAmB,mBAAmB,EAAE,WAAW,MAAM;AAE/D,SAAOC,IAAAA,SAAS,WAAW;AAC5B;AAMA,MAAM,yBAAyBC,KAAAA,uBAAuB,MAAM,uBAAuB;AAU5E,SAAS,iBAA6C;AAC5D,QAAM,cAAc,uBAAA;AACpB,QAAM,gBAAgBC,IAAAA,OAAOC,UAAAA,qBAAqB,MAAS;AAE3D,SAAOV,IAAAA,SAAS,MAAM;AACrB,QAAI,eAAe,OAAO;AACzB,aAAO,cAAc,UAAU;AAAA,IAChC;AACA,WAAO,YAAY;AAAA,EACpB,CAAC;AACF;;;"}
@@ -7,10 +7,7 @@ import { I as INJECTION_KEY_THEME } from "../chunks/constants-Bls5liKo.mjs";
7
7
  * SPDX-License-Identifier: AGPL-3.0-or-later
8
8
  */
9
9
  function useIsDarkThemeElement(el) {
10
- const element = computed(() => {
11
- var _a;
12
- return (_a = toValue(el)) != null ? _a : document.body;
13
- });
10
+ const element = computed(() => toValue(el) ?? document.body);
14
11
  const isDarkTheme = ref(checkIfDarkTheme(element.value));
15
12
  const isDarkSystemTheme = usePreferredDark();
16
13
  function updateIsDarkTheme() {
@@ -26,7 +23,7 @@ function useIsDarkTheme() {
26
23
  const isDarkTheme = useInternalIsDarkTheme();
27
24
  const enforcedTheme = inject(INJECTION_KEY_THEME, void 0);
28
25
  return computed(() => {
29
- if (enforcedTheme == null ? void 0 : enforcedTheme.value) {
26
+ if (enforcedTheme?.value) {
30
27
  return enforcedTheme.value === "dark";
31
28
  }
32
29
  return isDarkTheme.value;
@@ -1 +1 @@
1
- {"version":3,"file":"useIsDarkTheme.mjs","sources":["../../src/composables/useIsDarkTheme/index.ts"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MaybeRefOrGetter } from '@vueuse/core'\nimport type { DeepReadonly, Ref } from 'vue'\n\nimport { createSharedComposable, toValue, useMutationObserver, usePreferredDark } from '@vueuse/core'\nimport { computed, inject, readonly, ref, watch } from 'vue'\nimport { checkIfDarkTheme } from '../../functions/isDarkTheme/index.ts'\nimport { INJECTION_KEY_THEME } from './constants.ts'\n\n/**\n * Check whether the dark theme is enabled on a specific element.\n * If you need to check an entire page, use `useIsDarkTheme` instead for better performance.\n * Reacts on element attributes change and system theme change.\n *\n * @param el - The element to check for the dark theme enabled on (default is `document.body`)\n * @return - computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkThemeElement(el?: MaybeRefOrGetter<HTMLElement>): DeepReadonly<Ref<boolean>> {\n\tconst element = computed(() => toValue(el) ?? document.body)\n\n\tconst isDarkTheme = ref(checkIfDarkTheme(element.value))\n\tconst isDarkSystemTheme = usePreferredDark()\n\n\t/** Update the isDarkTheme */\n\tfunction updateIsDarkTheme() {\n\t\tisDarkTheme.value = checkIfDarkTheme(element.value)\n\t}\n\n\t// Watch for element change to handle data-theme* attributes change\n\tuseMutationObserver(element, updateIsDarkTheme, { attributes: true })\n\t// Watch for ref changes\n\twatch(element, updateIsDarkTheme)\n\t// Watch for system theme change for the default theme\n\twatch(isDarkSystemTheme, updateIsDarkTheme, { immediate: true })\n\n\treturn readonly(isDarkTheme)\n}\n\n/**\n * The real shared composable of the dark theme state.\n * We need to wrap this to allow to react to injected theme changes.\n */\nconst useInternalIsDarkTheme = createSharedComposable(() => useIsDarkThemeElement())\n\n/**\n * Shared composable to check whether the dark theme is enabled on the page.\n *\n * Reacts on body data-theme-* attributes change and system theme change.\n * As well as any enforced theme by the `NcThemeProvider`.\n *\n * @return Computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkTheme(): DeepReadonly<Ref<boolean>> {\n\tconst isDarkTheme = useInternalIsDarkTheme()\n\tconst enforcedTheme = inject(INJECTION_KEY_THEME, undefined)\n\n\treturn computed(() => {\n\t\tif (enforcedTheme?.value) {\n\t\t\treturn enforcedTheme.value === 'dark'\n\t\t}\n\t\treturn isDarkTheme.value\n\t})\n}\n"],"names":[],"mappings":";;;;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,sBAAsB,IAAgE;AACrG,QAAM,UAAU,SAAS,MAAG;AAtB7B,QAAA;AAsBgC,YAAA,KAAA,QAAQ,EAAE,MAAV,OAAA,KAAe,SAAS;AAAA,EAAA,CAAI;AAE3D,QAAM,cAAc,IAAI,iBAAiB,QAAQ,KAAK,CAAC;AACvD,QAAM,oBAAoB,iBAAA;AAG1B,WAAS,oBAAoB;AAC5B,gBAAY,QAAQ,iBAAiB,QAAQ,KAAK;AAAA,EACnD;AAGA,sBAAoB,SAAS,mBAAmB,EAAE,YAAY,MAAM;AAEpE,QAAM,SAAS,iBAAiB;AAEhC,QAAM,mBAAmB,mBAAmB,EAAE,WAAW,MAAM;AAE/D,SAAO,SAAS,WAAW;AAC5B;AAMA,MAAM,yBAAyB,uBAAuB,MAAM,uBAAuB;AAU5E,SAAS,iBAA6C;AAC5D,QAAM,cAAc,uBAAA;AACpB,QAAM,gBAAgB,OAAO,qBAAqB,MAAS;AAE3D,SAAO,SAAS,MAAM;AACrB,QAAI,+CAAe,OAAO;AACzB,aAAO,cAAc,UAAU;AAAA,IAChC;AACA,WAAO,YAAY;AAAA,EACpB,CAAC;AACF;"}
1
+ {"version":3,"file":"useIsDarkTheme.mjs","sources":["../../src/composables/useIsDarkTheme/index.ts"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MaybeRefOrGetter } from '@vueuse/core'\nimport type { DeepReadonly, Ref } from 'vue'\n\nimport { createSharedComposable, toValue, useMutationObserver, usePreferredDark } from '@vueuse/core'\nimport { computed, inject, readonly, ref, watch } from 'vue'\nimport { checkIfDarkTheme } from '../../functions/isDarkTheme/index.ts'\nimport { INJECTION_KEY_THEME } from './constants.ts'\n\n/**\n * Check whether the dark theme is enabled on a specific element.\n * If you need to check an entire page, use `useIsDarkTheme` instead for better performance.\n * Reacts on element attributes change and system theme change.\n *\n * @param el - The element to check for the dark theme enabled on (default is `document.body`)\n * @return - computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkThemeElement(el?: MaybeRefOrGetter<HTMLElement>): DeepReadonly<Ref<boolean>> {\n\tconst element = computed(() => toValue(el) ?? document.body)\n\n\tconst isDarkTheme = ref(checkIfDarkTheme(element.value))\n\tconst isDarkSystemTheme = usePreferredDark()\n\n\t/** Update the isDarkTheme */\n\tfunction updateIsDarkTheme() {\n\t\tisDarkTheme.value = checkIfDarkTheme(element.value)\n\t}\n\n\t// Watch for element change to handle data-theme* attributes change\n\tuseMutationObserver(element, updateIsDarkTheme, { attributes: true })\n\t// Watch for ref changes\n\twatch(element, updateIsDarkTheme)\n\t// Watch for system theme change for the default theme\n\twatch(isDarkSystemTheme, updateIsDarkTheme, { immediate: true })\n\n\treturn readonly(isDarkTheme)\n}\n\n/**\n * The real shared composable of the dark theme state.\n * We need to wrap this to allow to react to injected theme changes.\n */\nconst useInternalIsDarkTheme = createSharedComposable(() => useIsDarkThemeElement())\n\n/**\n * Shared composable to check whether the dark theme is enabled on the page.\n *\n * Reacts on body data-theme-* attributes change and system theme change.\n * As well as any enforced theme by the `NcThemeProvider`.\n *\n * @return Computed boolean whether the dark theme is enabled\n */\nexport function useIsDarkTheme(): DeepReadonly<Ref<boolean>> {\n\tconst isDarkTheme = useInternalIsDarkTheme()\n\tconst enforcedTheme = inject(INJECTION_KEY_THEME, undefined)\n\n\treturn computed(() => {\n\t\tif (enforcedTheme?.value) {\n\t\t\treturn enforcedTheme.value === 'dark'\n\t\t}\n\t\treturn isDarkTheme.value\n\t})\n}\n"],"names":[],"mappings":";;;;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,sBAAsB,IAAgE;AACrG,QAAM,UAAU,SAAS,MAAM,QAAQ,EAAE,KAAK,SAAS,IAAI;AAE3D,QAAM,cAAc,IAAI,iBAAiB,QAAQ,KAAK,CAAC;AACvD,QAAM,oBAAoB,iBAAA;AAG1B,WAAS,oBAAoB;AAC5B,gBAAY,QAAQ,iBAAiB,QAAQ,KAAK;AAAA,EACnD;AAGA,sBAAoB,SAAS,mBAAmB,EAAE,YAAY,MAAM;AAEpE,QAAM,SAAS,iBAAiB;AAEhC,QAAM,mBAAmB,mBAAmB,EAAE,WAAW,MAAM;AAE/D,SAAO,SAAS,WAAW;AAC5B;AAMA,MAAM,yBAAyB,uBAAuB,MAAM,uBAAuB;AAU5E,SAAS,iBAA6C;AAC5D,QAAM,cAAc,uBAAA;AACpB,QAAM,gBAAgB,OAAO,qBAAqB,MAAS;AAE3D,SAAO,SAAS,MAAM;AACrB,QAAI,eAAe,OAAO;AACzB,aAAO,cAAc,UAAU;AAAA,IAChC;AACA,WAAO,YAAY;AAAA,EACpB,CAAC;AACF;"}
@@ -13,8 +13,7 @@ function Linkify(text) {
13
13
  });
14
14
  }
15
15
  const directive = (el, binding) => {
16
- var _a;
17
- if (((_a = binding.value) == null ? void 0 : _a.linkify) === true) {
16
+ if (binding.value?.linkify === true) {
18
17
  el.innerHTML = Linkify(binding.value.text);
19
18
  }
20
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Linkify.cjs","sources":["../../src/utils/Linkify.js","../../src/directives/Linkify/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport linkifyStr from 'linkify-string'\n\n/**\n * Linkify text\n *\n * @param {string} text The text to linkify\n * @return {string} The linkified string\n */\nfunction Linkify(text) {\n\treturn linkifyStr(text, {\n\t\tdefaultProtocol: 'https',\n\t\ttarget: '_blank',\n\t\tclassName: 'external linkified',\n\t\tattributes: {\n\t\t\trel: 'nofollow noopener noreferrer',\n\t\t},\n\t})\n}\n\nexport default Linkify\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Directive } from 'vue'\n\nimport Linkify from '../../utils/Linkify.js'\n\nconst directive: Directive = (el, binding) => {\n\tif (binding.value?.linkify === true) {\n\t\tel.innerHTML = Linkify(binding.value.text)\n\t}\n}\n\nexport default directive\n"],"names":["linkifyStr"],"mappings":";;;;AAaA,SAAS,QAAQ,MAAM;AACtB,SAAOA,oBAAAA,QAAW,MAAM;AAAA,IACvB,iBAAiB;AAAA,IACjB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,YAAY;AAAA,MACX,KAAK;AAAA,IACR;AAAA,EACA,CAAE;AACF;ACbA,MAAM,YAAuB,CAAC,IAAI,YAAY;AAT9C,MAAA;AAUC,QAAI,KAAA,QAAQ,UAAR,OAAA,SAAA,GAAe,aAAY,MAAM;AACpC,OAAG,YAAY,QAAQ,QAAQ,MAAM,IAAI;AAAA,EAC1C;AACD;;"}
1
+ {"version":3,"file":"Linkify.cjs","sources":["../../src/utils/Linkify.js","../../src/directives/Linkify/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport linkifyStr from 'linkify-string'\n\n/**\n * Linkify text\n *\n * @param {string} text The text to linkify\n * @return {string} The linkified string\n */\nfunction Linkify(text) {\n\treturn linkifyStr(text, {\n\t\tdefaultProtocol: 'https',\n\t\ttarget: '_blank',\n\t\tclassName: 'external linkified',\n\t\tattributes: {\n\t\t\trel: 'nofollow noopener noreferrer',\n\t\t},\n\t})\n}\n\nexport default Linkify\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Directive } from 'vue'\n\nimport Linkify from '../../utils/Linkify.js'\n\nconst directive: Directive = (el, binding) => {\n\tif (binding.value?.linkify === true) {\n\t\tel.innerHTML = Linkify(binding.value.text)\n\t}\n}\n\nexport default directive\n"],"names":["linkifyStr"],"mappings":";;;;AAaA,SAAS,QAAQ,MAAM;AACtB,SAAOA,oBAAAA,QAAW,MAAM;AAAA,IACvB,iBAAiB;AAAA,IACjB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,YAAY;AAAA,MACX,KAAK;AAAA,IACR;AAAA,EACA,CAAE;AACF;ACbA,MAAM,YAAuB,CAAC,IAAI,YAAY;AAC7C,MAAI,QAAQ,OAAO,YAAY,MAAM;AACpC,OAAG,YAAY,QAAQ,QAAQ,MAAM,IAAI;AAAA,EAC1C;AACD;;"}
@@ -10,8 +10,7 @@ function Linkify(text) {
10
10
  });
11
11
  }
12
12
  const directive = (el, binding) => {
13
- var _a;
14
- if (((_a = binding.value) == null ? void 0 : _a.linkify) === true) {
13
+ if (binding.value?.linkify === true) {
15
14
  el.innerHTML = Linkify(binding.value.text);
16
15
  }
17
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Linkify.mjs","sources":["../../src/utils/Linkify.js","../../src/directives/Linkify/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport linkifyStr from 'linkify-string'\n\n/**\n * Linkify text\n *\n * @param {string} text The text to linkify\n * @return {string} The linkified string\n */\nfunction Linkify(text) {\n\treturn linkifyStr(text, {\n\t\tdefaultProtocol: 'https',\n\t\ttarget: '_blank',\n\t\tclassName: 'external linkified',\n\t\tattributes: {\n\t\t\trel: 'nofollow noopener noreferrer',\n\t\t},\n\t})\n}\n\nexport default Linkify\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Directive } from 'vue'\n\nimport Linkify from '../../utils/Linkify.js'\n\nconst directive: Directive = (el, binding) => {\n\tif (binding.value?.linkify === true) {\n\t\tel.innerHTML = Linkify(binding.value.text)\n\t}\n}\n\nexport default directive\n"],"names":[],"mappings":";AAaA,SAAS,QAAQ,MAAM;AACtB,SAAO,WAAW,MAAM;AAAA,IACvB,iBAAiB;AAAA,IACjB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,YAAY;AAAA,MACX,KAAK;AAAA,IACR;AAAA,EACA,CAAE;AACF;ACbA,MAAM,YAAuB,CAAC,IAAI,YAAY;AAT9C,MAAA;AAUC,QAAI,KAAA,QAAQ,UAAR,OAAA,SAAA,GAAe,aAAY,MAAM;AACpC,OAAG,YAAY,QAAQ,QAAQ,MAAM,IAAI;AAAA,EAC1C;AACD;"}
1
+ {"version":3,"file":"Linkify.mjs","sources":["../../src/utils/Linkify.js","../../src/directives/Linkify/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport linkifyStr from 'linkify-string'\n\n/**\n * Linkify text\n *\n * @param {string} text The text to linkify\n * @return {string} The linkified string\n */\nfunction Linkify(text) {\n\treturn linkifyStr(text, {\n\t\tdefaultProtocol: 'https',\n\t\ttarget: '_blank',\n\t\tclassName: 'external linkified',\n\t\tattributes: {\n\t\t\trel: 'nofollow noopener noreferrer',\n\t\t},\n\t})\n}\n\nexport default Linkify\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Directive } from 'vue'\n\nimport Linkify from '../../utils/Linkify.js'\n\nconst directive: Directive = (el, binding) => {\n\tif (binding.value?.linkify === true) {\n\t\tel.innerHTML = Linkify(binding.value.text)\n\t}\n}\n\nexport default directive\n"],"names":[],"mappings":";AAaA,SAAS,QAAQ,MAAM;AACtB,SAAO,WAAW,MAAM;AAAA,IACvB,iBAAiB;AAAA,IACjB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,YAAY;AAAA,MACX,KAAK;AAAA,IACR;AAAA,EACA,CAAE;AACF;ACbA,MAAM,YAAuB,CAAC,IAAI,YAAY;AAC7C,MAAI,QAAQ,OAAO,YAAY,MAAM;AACpC,OAAG,YAAY,QAAQ,QAAQ,MAAM,IAAI;AAAA,EAC1C;AACD;"}
@@ -2,10 +2,9 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const logger = require("../chunks/logger-3HuiEIF6.cjs");
4
4
  function registerContactsMenuAction(action) {
5
- var _a;
6
- (_a = window._nc_contacts_menu_hooks) != null ? _a : window._nc_contacts_menu_hooks = {};
5
+ window._nc_contacts_menu_hooks ??= {};
7
6
  if (window._nc_contacts_menu_hooks[action.id]) {
8
- logger.logger.error("ContactsMenu action for id ".concat(action.id, " has already been registered"), {
7
+ logger.logger.error(`ContactsMenu action for id ${action.id} has already been registered`, {
9
8
  action
10
9
  });
11
10
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"contactsMenu.cjs","sources":["../../src/functions/contactsMenu/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { logger } from '../../utils/logger.ts'\n\n// Taken from \\OC\\Contacts\\ContactsMenu\\Entry::jsonSerialize\nexport interface ContactsMenuEntry {\n\tid: number | string | null\n\tfullName: string\n\tavatar: string | null\n\ttopAction: object | null\n\tactions: object[]\n\tlastMessage: ''\n\temailAddresses: string[]\n\tprofileTitle: string | null\n\tprofileUrl: string | null\n\tstatus: string | null\n\tstatusMessage: null | string\n\tstatusMessageTimestamp: null | number\n\tstatusIcon: null | string\n\tisUser: boolean\n\tuid: null | string\n}\n\nexport interface ContactsMenuAction {\n\tid: string\n\tdisplayName: (entry: ContactsMenuEntry) => string\n\tenabled: (entry: ContactsMenuEntry) => boolean\n\ticonSvg: (entry: ContactsMenuEntry) => string\n\tcallback: (entry: ContactsMenuEntry) => void\n}\n\n/**\n * Register a contacts and avatar menu action that will invoke the given callback on click.\n *\n * @param action The action to register\n */\nexport function registerContactsMenuAction(action: ContactsMenuAction): void {\n\twindow._nc_contacts_menu_hooks ??= {}\n\n\tif (window._nc_contacts_menu_hooks[action.id]) {\n\t\tlogger.error(`ContactsMenu action for id ${action.id} has already been registered`, {\n\t\t\taction,\n\t\t})\n\t\treturn\n\t}\n\n\twindow._nc_contacts_menu_hooks[action.id] = action\n}\n\n/**\n * Get all registered and enabled contacts menu actions for the given menu entry.\n *\n * @param entry The contacts menu entry object as returned by the backend\n */\nexport function getEnabledContactsMenuActions(entry: ContactsMenuEntry): ContactsMenuAction[] {\n\tif (!window._nc_contacts_menu_hooks) {\n\t\treturn []\n\t}\n\n\treturn Object.values(window._nc_contacts_menu_hooks).filter((action) => action.enabled(entry))\n}\n"],"names":["logger"],"mappings":";;;AAuCO,SAAS,2BAA2B,QAAkC;AAvC7E,MAAA;AAwCC,GAAA,KAAA,OAAO,4BAAP,OAAA,KAAA,OAAO,0BAA4B,CAAA;AAEnC,MAAI,OAAO,wBAAwB,OAAO,EAAE,GAAG;AAC9CA,WAAAA,OAAO,MAAM,8BAA8B,OAAA,OAAO,IAAE,8BAAA,GAAgC;AAAA,MACnF;AAAA,IAAA,CACA;AACD;AAAA,EACD;AAEA,SAAO,wBAAwB,OAAO,EAAE,IAAI;AAC7C;AAOO,SAAS,8BAA8B,OAAgD;AAC7F,MAAI,CAAC,OAAO,yBAAyB;AACpC,WAAO,CAAA;AAAA,EACR;AAEA,SAAO,OAAO,OAAO,OAAO,uBAAuB,EAAE,OAAO,CAAC,WAAW,OAAO,QAAQ,KAAK,CAAC;AAC9F;;;"}
1
+ {"version":3,"file":"contactsMenu.cjs","sources":["../../src/functions/contactsMenu/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { logger } from '../../utils/logger.ts'\n\n// Taken from \\OC\\Contacts\\ContactsMenu\\Entry::jsonSerialize\nexport interface ContactsMenuEntry {\n\tid: number | string | null\n\tfullName: string\n\tavatar: string | null\n\ttopAction: object | null\n\tactions: object[]\n\tlastMessage: ''\n\temailAddresses: string[]\n\tprofileTitle: string | null\n\tprofileUrl: string | null\n\tstatus: string | null\n\tstatusMessage: null | string\n\tstatusMessageTimestamp: null | number\n\tstatusIcon: null | string\n\tisUser: boolean\n\tuid: null | string\n}\n\nexport interface ContactsMenuAction {\n\tid: string\n\tdisplayName: (entry: ContactsMenuEntry) => string\n\tenabled: (entry: ContactsMenuEntry) => boolean\n\ticonSvg: (entry: ContactsMenuEntry) => string\n\tcallback: (entry: ContactsMenuEntry) => void\n}\n\n/**\n * Register a contacts and avatar menu action that will invoke the given callback on click.\n *\n * @param action The action to register\n */\nexport function registerContactsMenuAction(action: ContactsMenuAction): void {\n\twindow._nc_contacts_menu_hooks ??= {}\n\n\tif (window._nc_contacts_menu_hooks[action.id]) {\n\t\tlogger.error(`ContactsMenu action for id ${action.id} has already been registered`, {\n\t\t\taction,\n\t\t})\n\t\treturn\n\t}\n\n\twindow._nc_contacts_menu_hooks[action.id] = action\n}\n\n/**\n * Get all registered and enabled contacts menu actions for the given menu entry.\n *\n * @param entry The contacts menu entry object as returned by the backend\n */\nexport function getEnabledContactsMenuActions(entry: ContactsMenuEntry): ContactsMenuAction[] {\n\tif (!window._nc_contacts_menu_hooks) {\n\t\treturn []\n\t}\n\n\treturn Object.values(window._nc_contacts_menu_hooks).filter((action) => action.enabled(entry))\n}\n"],"names":["logger"],"mappings":";;;AAuCO,SAAS,2BAA2B,QAAkC;AAC5E,SAAO,4BAA4B,CAAA;AAEnC,MAAI,OAAO,wBAAwB,OAAO,EAAE,GAAG;AAC9CA,WAAAA,OAAO,MAAM,8BAA8B,OAAO,EAAE,gCAAgC;AAAA,MACnF;AAAA,IAAA,CACA;AACD;AAAA,EACD;AAEA,SAAO,wBAAwB,OAAO,EAAE,IAAI;AAC7C;AAOO,SAAS,8BAA8B,OAAgD;AAC7F,MAAI,CAAC,OAAO,yBAAyB;AACpC,WAAO,CAAA;AAAA,EACR;AAEA,SAAO,OAAO,OAAO,OAAO,uBAAuB,EAAE,OAAO,CAAC,WAAW,OAAO,QAAQ,KAAK,CAAC;AAC9F;;;"}
@@ -1,9 +1,8 @@
1
1
  import { l as logger } from "../chunks/logger-D3RVzcfQ.mjs";
2
2
  function registerContactsMenuAction(action) {
3
- var _a;
4
- (_a = window._nc_contacts_menu_hooks) != null ? _a : window._nc_contacts_menu_hooks = {};
3
+ window._nc_contacts_menu_hooks ??= {};
5
4
  if (window._nc_contacts_menu_hooks[action.id]) {
6
- logger.error("ContactsMenu action for id ".concat(action.id, " has already been registered"), {
5
+ logger.error(`ContactsMenu action for id ${action.id} has already been registered`, {
7
6
  action
8
7
  });
9
8
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"contactsMenu.mjs","sources":["../../src/functions/contactsMenu/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { logger } from '../../utils/logger.ts'\n\n// Taken from \\OC\\Contacts\\ContactsMenu\\Entry::jsonSerialize\nexport interface ContactsMenuEntry {\n\tid: number | string | null\n\tfullName: string\n\tavatar: string | null\n\ttopAction: object | null\n\tactions: object[]\n\tlastMessage: ''\n\temailAddresses: string[]\n\tprofileTitle: string | null\n\tprofileUrl: string | null\n\tstatus: string | null\n\tstatusMessage: null | string\n\tstatusMessageTimestamp: null | number\n\tstatusIcon: null | string\n\tisUser: boolean\n\tuid: null | string\n}\n\nexport interface ContactsMenuAction {\n\tid: string\n\tdisplayName: (entry: ContactsMenuEntry) => string\n\tenabled: (entry: ContactsMenuEntry) => boolean\n\ticonSvg: (entry: ContactsMenuEntry) => string\n\tcallback: (entry: ContactsMenuEntry) => void\n}\n\n/**\n * Register a contacts and avatar menu action that will invoke the given callback on click.\n *\n * @param action The action to register\n */\nexport function registerContactsMenuAction(action: ContactsMenuAction): void {\n\twindow._nc_contacts_menu_hooks ??= {}\n\n\tif (window._nc_contacts_menu_hooks[action.id]) {\n\t\tlogger.error(`ContactsMenu action for id ${action.id} has already been registered`, {\n\t\t\taction,\n\t\t})\n\t\treturn\n\t}\n\n\twindow._nc_contacts_menu_hooks[action.id] = action\n}\n\n/**\n * Get all registered and enabled contacts menu actions for the given menu entry.\n *\n * @param entry The contacts menu entry object as returned by the backend\n */\nexport function getEnabledContactsMenuActions(entry: ContactsMenuEntry): ContactsMenuAction[] {\n\tif (!window._nc_contacts_menu_hooks) {\n\t\treturn []\n\t}\n\n\treturn Object.values(window._nc_contacts_menu_hooks).filter((action) => action.enabled(entry))\n}\n"],"names":[],"mappings":";AAuCO,SAAS,2BAA2B,QAAkC;AAvC7E,MAAA;AAwCC,GAAA,KAAA,OAAO,4BAAP,OAAA,KAAA,OAAO,0BAA4B,CAAA;AAEnC,MAAI,OAAO,wBAAwB,OAAO,EAAE,GAAG;AAC9C,WAAO,MAAM,8BAA8B,OAAA,OAAO,IAAE,8BAAA,GAAgC;AAAA,MACnF;AAAA,IAAA,CACA;AACD;AAAA,EACD;AAEA,SAAO,wBAAwB,OAAO,EAAE,IAAI;AAC7C;AAOO,SAAS,8BAA8B,OAAgD;AAC7F,MAAI,CAAC,OAAO,yBAAyB;AACpC,WAAO,CAAA;AAAA,EACR;AAEA,SAAO,OAAO,OAAO,OAAO,uBAAuB,EAAE,OAAO,CAAC,WAAW,OAAO,QAAQ,KAAK,CAAC;AAC9F;"}
1
+ {"version":3,"file":"contactsMenu.mjs","sources":["../../src/functions/contactsMenu/index.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { logger } from '../../utils/logger.ts'\n\n// Taken from \\OC\\Contacts\\ContactsMenu\\Entry::jsonSerialize\nexport interface ContactsMenuEntry {\n\tid: number | string | null\n\tfullName: string\n\tavatar: string | null\n\ttopAction: object | null\n\tactions: object[]\n\tlastMessage: ''\n\temailAddresses: string[]\n\tprofileTitle: string | null\n\tprofileUrl: string | null\n\tstatus: string | null\n\tstatusMessage: null | string\n\tstatusMessageTimestamp: null | number\n\tstatusIcon: null | string\n\tisUser: boolean\n\tuid: null | string\n}\n\nexport interface ContactsMenuAction {\n\tid: string\n\tdisplayName: (entry: ContactsMenuEntry) => string\n\tenabled: (entry: ContactsMenuEntry) => boolean\n\ticonSvg: (entry: ContactsMenuEntry) => string\n\tcallback: (entry: ContactsMenuEntry) => void\n}\n\n/**\n * Register a contacts and avatar menu action that will invoke the given callback on click.\n *\n * @param action The action to register\n */\nexport function registerContactsMenuAction(action: ContactsMenuAction): void {\n\twindow._nc_contacts_menu_hooks ??= {}\n\n\tif (window._nc_contacts_menu_hooks[action.id]) {\n\t\tlogger.error(`ContactsMenu action for id ${action.id} has already been registered`, {\n\t\t\taction,\n\t\t})\n\t\treturn\n\t}\n\n\twindow._nc_contacts_menu_hooks[action.id] = action\n}\n\n/**\n * Get all registered and enabled contacts menu actions for the given menu entry.\n *\n * @param entry The contacts menu entry object as returned by the backend\n */\nexport function getEnabledContactsMenuActions(entry: ContactsMenuEntry): ContactsMenuAction[] {\n\tif (!window._nc_contacts_menu_hooks) {\n\t\treturn []\n\t}\n\n\treturn Object.values(window._nc_contacts_menu_hooks).filter((action) => action.enabled(entry))\n}\n"],"names":[],"mappings":";AAuCO,SAAS,2BAA2B,QAAkC;AAC5E,SAAO,4BAA4B,CAAA;AAEnC,MAAI,OAAO,wBAAwB,OAAO,EAAE,GAAG;AAC9C,WAAO,MAAM,8BAA8B,OAAO,EAAE,gCAAgC;AAAA,MACnF;AAAA,IAAA,CACA;AACD;AAAA,EACD;AAEA,SAAO,wBAAwB,OAAO,EAAE,IAAI;AAC7C;AAOO,SAAS,8BAA8B,OAAgD;AAC7F,MAAI,CAAC,OAAO,yBAAyB;AACpC,WAAO,CAAA;AAAA,EACR;AAEA,SAAO,OAAO,OAAO,OAAO,uBAAuB,EAAE,OAAO,CAAC,WAAW,OAAO,QAAQ,KAAK,CAAC;AAC9F;"}
@@ -3,22 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const Vue = require("vue");
4
4
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
5
5
  const Vue__default = /* @__PURE__ */ _interopDefault(Vue);
6
- var __defProp = Object.defineProperty;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
6
  function spawnDialog(dialog, props = {}, optionsOrOnClose = {}, onClose = () => {
23
7
  }) {
24
8
  if (typeof optionsOrOnClose === "function") {
@@ -27,7 +11,7 @@ function spawnDialog(dialog, props = {}, optionsOrOnClose = {}, onClose = () =>
27
11
  }
28
12
  let { container } = optionsOrOnClose;
29
13
  if ("container" in props && typeof props.container === "string") {
30
- container != null ? container : container = props.container;
14
+ container ??= props.container;
31
15
  }
32
16
  const resolvedContainer = typeof container === "string" && document.querySelector(container) || document.body;
33
17
  const element = resolvedContainer.appendChild(document.createElement("div"));
@@ -35,11 +19,12 @@ function spawnDialog(dialog, props = {}, optionsOrOnClose = {}, onClose = () =>
35
19
  el: element,
36
20
  name: "VueDialogHelper",
37
21
  render: (h) => h(dialog, {
38
- props: __spreadValues({
22
+ props: {
39
23
  // If dialog has no `container` prop passing a falsy value does nothing
40
24
  // Otherwise it is expected that `null` disables teleport and mounts dialog in place like NcDialog/NcModal
41
- container: null
42
- }, props),
25
+ container: null,
26
+ ...props
27
+ },
43
28
  on: {
44
29
  close: (...rest) => {
45
30
  onClose(...rest.map((v) => Vue.toRaw(v)));