@nextcloud/vue 9.0.0-rc.3 → 9.0.0-rc.4

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 (278) hide show
  1. package/CHANGELOG.md +70 -7
  2. package/dist/assets/{NcActionText-CWAPsJmz.css → NcActionText-BtzLDZeJ.css} +18 -18
  3. package/dist/assets/{NcActions-DxcpMfrs.css → NcActions-DfCOtp0b.css} +11 -11
  4. package/dist/assets/{NcAppContent-Zgn8-wsd.css → NcAppContent-RmHDNYBp.css} +23 -23
  5. package/dist/assets/{NcAppNavigationItem-B27WFnUV.css → NcAppNavigationItem-B-slGJHZ.css} +31 -31
  6. package/dist/assets/{NcAppNavigationNewItem-BrLekTMb.css → NcAppNavigationNewItem-CYsA6ZGQ.css} +33 -33
  7. package/dist/assets/{NcAppSidebar-PG3qIdkG.css → NcAppSidebar-BeRME1Bx.css} +44 -44
  8. package/dist/assets/{NcAppSidebarTab-BFy7uyWe.css → NcAppSidebarTab-cWhpTGp7.css} +4 -4
  9. package/dist/assets/{NcAvatar-C01qP9VA.css → NcAvatar-g7MoHyFd.css} +24 -24
  10. package/dist/assets/{NcCollectionList-DTJgOfCk.css → NcCollectionList-DVlSPO13.css} +27 -27
  11. package/dist/assets/{NcContent-C12jLe34.css → NcContent-1ivDf2e_.css} +9 -9
  12. package/dist/assets/NcDateTimePicker-_rRYVngX.css +1228 -0
  13. package/dist/assets/{NcEmojiPicker-kxoeGEM5.css → NcEmojiPicker-vTc7_EDA.css} +4 -4
  14. package/dist/assets/{NcIconSvgWrapper-cYxhjYue.css → NcIconSvgWrapper-CJfAwN6-.css} +11 -11
  15. package/dist/assets/{NcListItem-ff6bfJFE.css → NcListItem-BBaZDZQK.css} +44 -44
  16. package/dist/assets/{NcMentionBubble-DLOTFwpl.css → NcMentionBubble-lpms2_3A.css} +9 -9
  17. package/dist/assets/{NcNoteCard-C387qsQO.css → NcNoteCard-DlW6RBOO.css} +9 -9
  18. package/dist/assets/{NcPasswordField-DVV6Eiwf.css → NcPasswordField-D7XrnwDs.css} +2 -2
  19. package/dist/assets/{NcRelatedResourcesPanel-DXfywiqL.css → NcRelatedResourcesPanel-BQkQvMMD.css} +3 -3
  20. package/dist/assets/{NcRichContenteditable-KsmFPJmm.css → NcRichContenteditable-1zTxLjsG.css} +20 -20
  21. package/dist/assets/{NcRichText-Fi_WAwSP.css → NcRichText-cO2UCM_o.css} +86 -84
  22. package/dist/assets/{NcSettingsSection-Dyrgo_fF.css → NcSettingsSection-DLjgl3j1.css} +7 -7
  23. package/dist/assets/{referencePickerModal-CUVCkTmZ.css → referencePickerModal-DIHQ6_wW.css} +20 -20
  24. package/dist/chunks/{NcActionButton-BECWgEPr.mjs → NcActionButton-Bd35_0n4.mjs} +3 -3
  25. package/dist/chunks/{NcActionButton-BECWgEPr.mjs.map → NcActionButton-Bd35_0n4.mjs.map} +1 -1
  26. package/dist/chunks/{NcActionButtonGroup-e4F30E5Z.mjs → NcActionButtonGroup-BVbWDFaC.mjs} +2 -2
  27. package/dist/chunks/{NcActionButtonGroup-e4F30E5Z.mjs.map → NcActionButtonGroup-BVbWDFaC.mjs.map} +1 -1
  28. package/dist/chunks/{NcActionInput-DYLqm7AP.mjs → NcActionInput-B_f8z2fo.mjs} +8 -8
  29. package/dist/chunks/{NcActionInput-DYLqm7AP.mjs.map → NcActionInput-B_f8z2fo.mjs.map} +1 -1
  30. package/dist/chunks/{NcActionText-DJWBefhJ.mjs → NcActionText-16Mj4-P1.mjs} +3 -4
  31. package/dist/chunks/NcActionText-16Mj4-P1.mjs.map +1 -0
  32. package/dist/chunks/{NcActionTextEditable-ByA0z9nO.mjs → NcActionTextEditable-B4nTAiHu.mjs} +3 -3
  33. package/dist/chunks/{NcActionTextEditable-ByA0z9nO.mjs.map → NcActionTextEditable-B4nTAiHu.mjs.map} +1 -1
  34. package/dist/chunks/{NcActions-iwG1Tj-I.mjs → NcActions-BM3DmGLW.mjs} +6 -6
  35. package/dist/chunks/{NcActions-iwG1Tj-I.mjs.map → NcActions-BM3DmGLW.mjs.map} +1 -1
  36. package/dist/chunks/{NcAppContent-B2qF2-YG.mjs → NcAppContent-BZZyPqOo.mjs} +54 -52
  37. package/dist/chunks/NcAppContent-BZZyPqOo.mjs.map +1 -0
  38. package/dist/chunks/{NcAppNavigation-JoRJnwqf.mjs → NcAppNavigation-BmACVQVW.mjs} +2 -2
  39. package/dist/chunks/{NcAppNavigation-JoRJnwqf.mjs.map → NcAppNavigation-BmACVQVW.mjs.map} +1 -1
  40. package/dist/chunks/{NcAppNavigationCaption-DhwvNbx1.mjs → NcAppNavigationCaption-BrCiN8XK.mjs} +2 -2
  41. package/dist/chunks/{NcAppNavigationCaption-DhwvNbx1.mjs.map → NcAppNavigationCaption-BrCiN8XK.mjs.map} +1 -1
  42. package/dist/chunks/{NcAppNavigationItem-B51Guztu.mjs → NcAppNavigationItem-ClySLuSM.mjs} +9 -9
  43. package/dist/chunks/{NcAppNavigationItem-B51Guztu.mjs.map → NcAppNavigationItem-ClySLuSM.mjs.map} +1 -1
  44. package/dist/chunks/{NcAppNavigationNewItem-DyzpvBOb.mjs → NcAppNavigationNewItem-BUgPntuN.mjs} +6 -6
  45. package/dist/chunks/{NcAppNavigationNewItem-DyzpvBOb.mjs.map → NcAppNavigationNewItem-BUgPntuN.mjs.map} +1 -1
  46. package/dist/chunks/{NcAppNavigationSearch-CvHp92E-.mjs → NcAppNavigationSearch-DpjlWi9j.mjs} +3 -3
  47. package/dist/chunks/{NcAppNavigationSearch-CvHp92E-.mjs.map → NcAppNavigationSearch-DpjlWi9j.mjs.map} +1 -1
  48. package/dist/chunks/{NcAppNavigationSettings-iJ84_lwr.mjs → NcAppNavigationSettings-DGATbBqy.mjs} +2 -2
  49. package/dist/chunks/{NcAppNavigationSettings-iJ84_lwr.mjs.map → NcAppNavigationSettings-DGATbBqy.mjs.map} +1 -1
  50. package/dist/chunks/{NcAppNavigationToggle-D3UGt5TV.mjs → NcAppNavigationToggle-D9pouVyS.mjs} +2 -2
  51. package/dist/chunks/{NcAppNavigationToggle-D3UGt5TV.mjs.map → NcAppNavigationToggle-D9pouVyS.mjs.map} +1 -1
  52. package/dist/chunks/{NcAppSettingsDialog-CQnZ29WZ.mjs → NcAppSettingsDialog-Dgh5jydA.mjs} +3 -3
  53. package/dist/chunks/{NcAppSettingsDialog-CQnZ29WZ.mjs.map → NcAppSettingsDialog-Dgh5jydA.mjs.map} +1 -1
  54. package/dist/chunks/{NcAppSidebar-QEkYs8pt.mjs → NcAppSidebar-DWRmX_-Y.mjs} +12 -12
  55. package/dist/chunks/{NcAppSidebar-QEkYs8pt.mjs.map → NcAppSidebar-DWRmX_-Y.mjs.map} +1 -1
  56. package/dist/chunks/{NcAppSidebarTab-DG51ajic.mjs → NcAppSidebarTab-D1RmFRTu.mjs} +5 -5
  57. package/dist/chunks/NcAppSidebarTab-D1RmFRTu.mjs.map +1 -0
  58. package/dist/chunks/{NcAvatar-BadoF6cb.mjs → NcAvatar-PCbT0J_-.mjs} +39 -25
  59. package/dist/chunks/NcAvatar-PCbT0J_-.mjs.map +1 -0
  60. package/dist/chunks/{NcBreadcrumb-BH4XQJ8K.mjs → NcBreadcrumb-D9gRzaYP.mjs} +2 -2
  61. package/dist/chunks/{NcBreadcrumb-BH4XQJ8K.mjs.map → NcBreadcrumb-D9gRzaYP.mjs.map} +1 -1
  62. package/dist/chunks/{NcBreadcrumbs-DyWyrhrJ.mjs → NcBreadcrumbs-DjqDBMn-.mjs} +4 -4
  63. package/dist/chunks/{NcBreadcrumbs-DyWyrhrJ.mjs.map → NcBreadcrumbs-DjqDBMn-.mjs.map} +1 -1
  64. package/dist/chunks/{NcCheckboxRadioSwitch-Di0xbf6d.mjs → NcCheckboxRadioSwitch-D9N_BDHh.mjs} +2 -2
  65. package/dist/chunks/{NcCheckboxRadioSwitch-Di0xbf6d.mjs.map → NcCheckboxRadioSwitch-D9N_BDHh.mjs.map} +1 -1
  66. package/dist/chunks/{NcChip-DfDlpsAh.mjs → NcChip-BPresRp1.mjs} +6 -6
  67. package/dist/chunks/{NcChip-DfDlpsAh.mjs.map → NcChip-BPresRp1.mjs.map} +1 -1
  68. package/dist/chunks/{NcCollectionList-B2PzNHzw.mjs → NcCollectionList-BPDCogsB.mjs} +14 -11
  69. package/dist/chunks/NcCollectionList-BPDCogsB.mjs.map +1 -0
  70. package/dist/chunks/{NcColorPicker-CoteX_0P.mjs → NcColorPicker-BNpZzN-p.mjs} +3 -3
  71. package/dist/chunks/{NcColorPicker-CoteX_0P.mjs.map → NcColorPicker-BNpZzN-p.mjs.map} +1 -1
  72. package/dist/chunks/{NcContent-BImnEnMI.mjs → NcContent-CZKDyVcI.mjs} +8 -6
  73. package/dist/chunks/{NcContent-BImnEnMI.mjs.map → NcContent-CZKDyVcI.mjs.map} +1 -1
  74. package/dist/chunks/{NcDashboardWidget-DJtdcW-W.mjs → NcDashboardWidget-DhZ5c4oF.mjs} +4 -4
  75. package/dist/chunks/{NcDashboardWidget-DJtdcW-W.mjs.map → NcDashboardWidget-DhZ5c4oF.mjs.map} +1 -1
  76. package/dist/chunks/{NcDashboardWidgetItem-CZaWF40u.mjs → NcDashboardWidgetItem-pJ-PctjL.mjs} +4 -4
  77. package/dist/chunks/{NcDashboardWidgetItem-CZaWF40u.mjs.map → NcDashboardWidgetItem-pJ-PctjL.mjs.map} +1 -1
  78. package/dist/chunks/NcDateTime.vue_vue_type_script_setup_true_lang-B0Lci6v0.mjs +36 -0
  79. package/dist/chunks/{NcDateTime.vue_vue_type_script_setup_true_lang-C2VbacBQ.mjs.map → NcDateTime.vue_vue_type_script_setup_true_lang-B0Lci6v0.mjs.map} +1 -1
  80. package/dist/chunks/{NcDateTimePicker-BB--HQog.mjs → NcDateTimePicker-CKOTExmB.mjs} +149 -94
  81. package/dist/chunks/NcDateTimePicker-CKOTExmB.mjs.map +1 -0
  82. package/dist/chunks/{NcDateTimePickerNative-DaPzFiYH.mjs → NcDateTimePickerNative-NVYPDSmf.mjs} +2 -2
  83. package/dist/chunks/{NcDateTimePickerNative-DaPzFiYH.mjs.map → NcDateTimePickerNative-NVYPDSmf.mjs.map} +1 -1
  84. package/dist/chunks/{NcDialog-CXVaeWJf.mjs → NcDialog-DTbCOARa.mjs} +3 -3
  85. package/dist/chunks/{NcDialog-CXVaeWJf.mjs.map → NcDialog-DTbCOARa.mjs.map} +1 -1
  86. package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-DSKWXzqG.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-DaU1luyJ.mjs} +3 -3
  87. package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-DSKWXzqG.mjs.map → NcDialogButton.vue_vue_type_script_setup_true_lang-DaU1luyJ.mjs.map} +1 -1
  88. package/dist/chunks/{NcEmojiPicker-BGO0v-D5.mjs → NcEmojiPicker-DHXabPDE.mjs} +10 -10
  89. package/dist/chunks/{NcEmojiPicker-BGO0v-D5.mjs.map → NcEmojiPicker-DHXabPDE.mjs.map} +1 -1
  90. package/dist/chunks/{NcHeaderMenu-DmpJfS86.mjs → NcHeaderMenu-Bf_rW093.mjs} +2 -2
  91. package/dist/chunks/{NcHeaderMenu-DmpJfS86.mjs.map → NcHeaderMenu-Bf_rW093.mjs.map} +1 -1
  92. package/dist/chunks/{NcIconSvgWrapper-BOiCKv0b.mjs → NcIconSvgWrapper-CprKb_SE.mjs} +4 -4
  93. package/dist/chunks/{NcIconSvgWrapper-BOiCKv0b.mjs.map → NcIconSvgWrapper-CprKb_SE.mjs.map} +1 -1
  94. package/dist/chunks/{NcInputConfirmCancel-B7gAZ7U1.mjs → NcInputConfirmCancel-DCUXeKPz.mjs} +2 -2
  95. package/dist/chunks/{NcInputConfirmCancel-B7gAZ7U1.mjs.map → NcInputConfirmCancel-DCUXeKPz.mjs.map} +1 -1
  96. package/dist/chunks/{NcInputField-DH5ybroK.mjs → NcInputField-BZWRHkmQ.mjs} +3 -3
  97. package/dist/chunks/{NcInputField-DH5ybroK.mjs.map → NcInputField-BZWRHkmQ.mjs.map} +1 -1
  98. package/dist/chunks/{NcListItem-50hUlVlb.mjs → NcListItem-7BHAmqB0.mjs} +5 -5
  99. package/dist/chunks/{NcListItem-50hUlVlb.mjs.map → NcListItem-7BHAmqB0.mjs.map} +1 -1
  100. package/dist/chunks/{NcListItemIcon-BGEA45de.mjs → NcListItemIcon-gkuv5FT8.mjs} +6 -4
  101. package/dist/chunks/{NcListItemIcon-BGEA45de.mjs.map → NcListItemIcon-gkuv5FT8.mjs.map} +1 -1
  102. package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_25f4d6e1_lang-aMwzB20D.mjs +16 -0
  103. package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_25f4d6e1_lang-aMwzB20D.mjs.map +1 -0
  104. package/dist/chunks/{NcModal-CWRw1hyF.mjs → NcModal-CX28vCtF.mjs} +5 -5
  105. package/dist/chunks/{NcModal-CWRw1hyF.mjs.map → NcModal-CX28vCtF.mjs.map} +1 -1
  106. package/dist/chunks/{NcNoteCard-DmhVICGO.mjs → NcNoteCard-oGt6biyJ.mjs} +7 -6
  107. package/dist/chunks/{NcNoteCard-DmhVICGO.mjs.map → NcNoteCard-oGt6biyJ.mjs.map} +1 -1
  108. package/dist/chunks/NcPasswordField-w13_Lpyn.mjs +128 -0
  109. package/dist/chunks/NcPasswordField-w13_Lpyn.mjs.map +1 -0
  110. package/dist/chunks/{NcRelatedResourcesPanel-BUasditW.mjs → NcRelatedResourcesPanel-CpOgjo9h.mjs} +9 -9
  111. package/dist/chunks/{NcRelatedResourcesPanel-BUasditW.mjs.map → NcRelatedResourcesPanel-CpOgjo9h.mjs.map} +1 -1
  112. package/dist/chunks/{NcRichContenteditable-CGP8KN41.mjs → NcRichContenteditable-J9ILu0dF.mjs} +36 -29
  113. package/dist/chunks/NcRichContenteditable-J9ILu0dF.mjs.map +1 -0
  114. package/dist/chunks/{NcRichText-DDllQirJ.mjs → NcRichText-DvbC3aUR.mjs} +7 -9
  115. package/dist/chunks/{NcRichText-DDllQirJ.mjs.map → NcRichText-DvbC3aUR.mjs.map} +1 -1
  116. package/dist/chunks/{NcSelect-Bkg2rrDQ.mjs → NcSelect-D6XzjG4n.mjs} +2 -2
  117. package/dist/chunks/{NcSelect-Bkg2rrDQ.mjs.map → NcSelect-D6XzjG4n.mjs.map} +1 -1
  118. package/dist/chunks/{NcSelectTags-gJMICSS2.mjs → NcSelectTags-SNTGRj-n.mjs} +3 -3
  119. package/dist/chunks/{NcSelectTags-gJMICSS2.mjs.map → NcSelectTags-SNTGRj-n.mjs.map} +1 -1
  120. package/dist/chunks/{NcSelectUsers-mRdIiG7L.mjs → NcSelectUsers-D_eu9Uqb.mjs} +3 -3
  121. package/dist/chunks/{NcSelectUsers-mRdIiG7L.mjs.map → NcSelectUsers-D_eu9Uqb.mjs.map} +1 -1
  122. package/dist/chunks/{NcSettingsInputText-P8cEi0aP.mjs → NcSettingsInputText-D5N9XxkW.mjs} +2 -2
  123. package/dist/chunks/{NcSettingsInputText-P8cEi0aP.mjs.map → NcSettingsInputText-D5N9XxkW.mjs.map} +1 -1
  124. package/dist/chunks/{NcSettingsSection-DkDLjL_G.mjs → NcSettingsSection-93UQoiwe.mjs} +40 -65
  125. package/dist/chunks/NcSettingsSection-93UQoiwe.mjs.map +1 -0
  126. package/dist/chunks/{NcSettingsSelectGroup-BvYxv8aw.mjs → NcSettingsSelectGroup-Dr4IRbi_.mjs} +3 -3
  127. package/dist/chunks/{NcSettingsSelectGroup-BvYxv8aw.mjs.map → NcSettingsSelectGroup-Dr4IRbi_.mjs.map} +1 -1
  128. package/dist/chunks/{NcTextArea-D4hJqp6W.mjs → NcTextArea-CWqnvMl2.mjs} +3 -3
  129. package/dist/chunks/{NcTextArea-D4hJqp6W.mjs.map → NcTextArea-CWqnvMl2.mjs.map} +1 -1
  130. package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-BggEO9Jn.mjs → NcTextField.vue_vue_type_script_setup_true_lang-B65hrkLW.mjs} +5 -5
  131. package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-BggEO9Jn.mjs.map → NcTextField.vue_vue_type_script_setup_true_lang-B65hrkLW.mjs.map} +1 -1
  132. package/dist/chunks/NcThemeProvider.vue_vue_type_script_setup_true_lang-nUDJsDGI.mjs +30 -0
  133. package/dist/chunks/NcThemeProvider.vue_vue_type_script_setup_true_lang-nUDJsDGI.mjs.map +1 -0
  134. package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-C7loAI0C.mjs → NcTimezonePicker.vue_vue_type_script_setup_true_lang-BoH1Njbp.mjs} +3 -3
  135. package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-C7loAI0C.mjs.map → NcTimezonePicker.vue_vue_type_script_setup_true_lang-BoH1Njbp.mjs.map} +1 -1
  136. package/dist/chunks/{NcUserBubble-CKN4C4kP.mjs → NcUserBubble-BW0qu6mW.mjs} +2 -2
  137. package/dist/chunks/{NcUserBubble-CKN4C4kP.mjs.map → NcUserBubble-BW0qu6mW.mjs.map} +1 -1
  138. package/dist/chunks/{NcUserStatusIcon-BX9ILG2r.mjs → NcUserStatusIcon-DqQYA-EE.mjs} +2 -2
  139. package/dist/chunks/{NcUserStatusIcon-BX9ILG2r.mjs.map → NcUserStatusIcon-DqQYA-EE.mjs.map} +1 -1
  140. package/dist/chunks/{_l10n-B4AgnzNC.mjs → _l10n-tXci8WM1.mjs} +37 -43
  141. package/dist/chunks/_l10n-tXci8WM1.mjs.map +1 -0
  142. package/dist/chunks/{colors-fFK6HkHZ.mjs → colors-BaTbJhvg.mjs} +2 -2
  143. package/dist/chunks/{colors-fFK6HkHZ.mjs.map → colors-BaTbJhvg.mjs.map} +1 -1
  144. package/dist/chunks/constants-Bls5liKo.mjs +9 -0
  145. package/dist/chunks/constants-Bls5liKo.mjs.map +1 -0
  146. package/dist/chunks/{index-BF8joS9W.mjs → customPickerElements-CH9vlHLd.mjs} +46 -45
  147. package/dist/chunks/customPickerElements-CH9vlHLd.mjs.map +1 -0
  148. package/dist/chunks/{mdi-CWpCzTmH.mjs → mdi-D6fu5i4r.mjs} +10 -6
  149. package/dist/chunks/{mdi-CWpCzTmH.mjs.map → mdi-D6fu5i4r.mjs.map} +1 -1
  150. package/dist/chunks/{referencePickerModal-uLIBRHIc.mjs → referencePickerModal-DREcDQKg.mjs} +53 -59
  151. package/dist/chunks/referencePickerModal-DREcDQKg.mjs.map +1 -0
  152. package/dist/chunks/{usernameToColor-Bik5PNni.mjs → usernameToColor-2yV_Zdvb.mjs} +2 -2
  153. package/dist/chunks/{usernameToColor-Bik5PNni.mjs.map → usernameToColor-2yV_Zdvb.mjs.map} +1 -1
  154. package/dist/components/NcActionButton/NcActionButton.vue.d.ts +1 -1
  155. package/dist/components/NcActionButton/index.mjs +1 -1
  156. package/dist/components/NcActionButtonGroup/index.mjs +1 -1
  157. package/dist/components/NcActionInput/index.mjs +1 -1
  158. package/dist/components/NcActionText/index.mjs +1 -1
  159. package/dist/components/NcActionTextEditable/NcActionTextEditable.vue.d.ts +1 -1
  160. package/dist/components/NcActionTextEditable/index.mjs +1 -1
  161. package/dist/components/NcActions/index.mjs +1 -1
  162. package/dist/components/NcAppContent/NcAppContent.vue.d.ts +34 -33
  163. package/dist/components/NcAppContent/index.mjs +1 -1
  164. package/dist/components/NcAppNavigation/index.mjs +1 -1
  165. package/dist/components/NcAppNavigationCaption/index.mjs +1 -1
  166. package/dist/components/NcAppNavigationItem/index.mjs +1 -1
  167. package/dist/components/NcAppNavigationNewItem/index.mjs +1 -1
  168. package/dist/components/NcAppNavigationSearch/NcAppNavigationSearch.vue.d.ts +6 -6
  169. package/dist/components/NcAppNavigationSearch/index.mjs +1 -1
  170. package/dist/components/NcAppNavigationSettings/index.mjs +1 -1
  171. package/dist/components/NcAppNavigationToggle/index.mjs +1 -1
  172. package/dist/components/NcAppSettingsDialog/index.mjs +1 -1
  173. package/dist/components/NcAppSidebar/index.mjs +1 -1
  174. package/dist/components/NcAppSidebarTab/NcAppSidebarTab.vue.d.ts +3 -3
  175. package/dist/components/NcAppSidebarTab/index.mjs +1 -1
  176. package/dist/components/NcAvatar/index.mjs +1 -1
  177. package/dist/components/NcBreadcrumb/index.mjs +1 -1
  178. package/dist/components/NcBreadcrumbs/index.mjs +1 -1
  179. package/dist/components/NcButton/NcButton.vue.d.ts +1 -1
  180. package/dist/components/NcCheckboxRadioSwitch/index.mjs +1 -1
  181. package/dist/components/NcChip/index.mjs +1 -1
  182. package/dist/components/NcCollectionList/index.mjs +1 -1
  183. package/dist/components/NcColorPicker/index.mjs +1 -1
  184. package/dist/components/NcContent/index.mjs +1 -1
  185. package/dist/components/NcDashboardWidget/index.mjs +1 -1
  186. package/dist/components/NcDashboardWidgetItem/index.mjs +1 -1
  187. package/dist/components/NcDateTime/index.mjs +1 -1
  188. package/dist/components/NcDateTimePicker/NcDateTimePicker.vue.d.ts +1072 -4
  189. package/dist/components/NcDateTimePicker/index.mjs +1 -1
  190. package/dist/components/NcDateTimePickerNative/NcDateTimePickerNative.vue.d.ts +1 -1
  191. package/dist/components/NcDateTimePickerNative/index.mjs +1 -1
  192. package/dist/components/NcDialog/index.mjs +1 -1
  193. package/dist/components/NcDialogButton/NcDialogButton.vue.d.ts +1 -1
  194. package/dist/components/NcDialogButton/index.mjs +1 -1
  195. package/dist/components/NcEmojiPicker/index.mjs +1 -1
  196. package/dist/components/NcHeaderMenu/index.mjs +1 -1
  197. package/dist/components/NcIconSvgWrapper/NcIconSvgWrapper.vue.d.ts +1 -1
  198. package/dist/components/NcIconSvgWrapper/index.mjs +1 -1
  199. package/dist/components/NcInputField/NcInputField.vue.d.ts +1 -1
  200. package/dist/components/NcInputField/index.mjs +1 -1
  201. package/dist/components/NcListItem/index.mjs +1 -1
  202. package/dist/components/NcListItemIcon/index.mjs +1 -1
  203. package/dist/components/NcLoadingIcon/NcLoadingIcon.vue.d.ts +1 -1
  204. package/dist/components/NcModal/index.mjs +1 -1
  205. package/dist/components/NcNoteCard/index.mjs +1 -1
  206. package/dist/components/NcPasswordField/NcPasswordField.vue.d.ts +10 -7
  207. package/dist/components/NcPasswordField/index.mjs +1 -1
  208. package/dist/components/NcRelatedResourcesPanel/index.mjs +1 -1
  209. package/dist/components/NcRichContenteditable/NcAutoCompleteResult.vue.d.ts +4 -4
  210. package/dist/components/NcRichContenteditable/NcMentionBubble.vue.d.ts +4 -4
  211. package/dist/components/NcRichContenteditable/NcRichContenteditable.vue.d.ts +2 -2
  212. package/dist/components/NcRichContenteditable/index.mjs +1 -1
  213. package/dist/components/NcRichText/index.d.ts +3 -3
  214. package/dist/components/NcRichText/index.mjs +10 -10
  215. package/dist/components/NcSavingIndicatorIcon/NcSavingIndicatorIcon.vue.d.ts +1 -1
  216. package/dist/components/NcSelect/index.mjs +1 -1
  217. package/dist/components/NcSelectTags/index.mjs +1 -1
  218. package/dist/components/NcSelectUsers/index.mjs +1 -1
  219. package/dist/components/NcSettingsInputText/index.mjs +1 -1
  220. package/dist/components/NcSettingsSection/NcSettingsSection.vue.d.ts +40 -34
  221. package/dist/components/NcSettingsSection/index.d.ts +4 -0
  222. package/dist/components/NcSettingsSection/index.mjs +1 -1
  223. package/dist/components/NcSettingsSelectGroup/index.mjs +1 -1
  224. package/dist/components/NcTextArea/index.mjs +1 -1
  225. package/dist/components/NcTextField/NcTextField.vue.d.ts +6 -6
  226. package/dist/components/NcTextField/index.mjs +1 -1
  227. package/dist/components/NcThemeProvider/NcThemeProvider.vue.d.ts +27 -0
  228. package/dist/components/NcThemeProvider/index.d.ts +5 -0
  229. package/dist/components/NcThemeProvider/index.mjs +5 -0
  230. package/dist/components/NcThemeProvider/index.mjs.map +1 -0
  231. package/dist/components/NcTimezonePicker/index.mjs +1 -1
  232. package/dist/components/NcUserBubble/index.mjs +1 -1
  233. package/dist/components/NcUserStatusIcon/index.mjs +1 -1
  234. package/dist/components/index.d.ts +2 -1
  235. package/dist/composables/index.d.ts +1 -1
  236. package/dist/composables/useFormatDateTime/index.d.ts +40 -0
  237. package/dist/composables/useFormatDateTime/index.mjs +49 -0
  238. package/dist/composables/useFormatDateTime/index.mjs.map +1 -0
  239. package/dist/composables/useHotKey/index.mjs +13 -1
  240. package/dist/composables/useHotKey/index.mjs.map +1 -1
  241. package/dist/composables/useIsDarkTheme/constants.d.ts +7 -0
  242. package/dist/composables/useIsDarkTheme/index.d.ts +7 -4
  243. package/dist/composables/useIsDarkTheme/index.mjs +23 -6
  244. package/dist/composables/useIsDarkTheme/index.mjs.map +1 -1
  245. package/dist/functions/reference/customPickerElements.d.ts +48 -13
  246. package/dist/functions/reference/index.d.ts +8 -5
  247. package/dist/functions/reference/index.mjs +7 -7
  248. package/dist/functions/reference/providerHelper.d.ts +26 -15
  249. package/dist/functions/reference/referencePickerModal.d.ts +7 -4
  250. package/dist/functions/reference/widgets.d.ts +47 -28
  251. package/dist/functions/registerReference/index.d.ts +6 -2
  252. package/dist/functions/registerReference/index.mjs +4 -4
  253. package/dist/functions/usernameToColor/index.mjs +1 -1
  254. package/dist/index.mjs +71 -68
  255. package/dist/index.mjs.map +1 -1
  256. package/dist/utils/getAvatarUrl.d.ts +23 -1
  257. package/package.json +2 -2
  258. package/dist/assets/NcDateTimePicker-pmbCzZnb.css +0 -83
  259. package/dist/chunks/NcActionText-DJWBefhJ.mjs.map +0 -1
  260. package/dist/chunks/NcAppContent-B2qF2-YG.mjs.map +0 -1
  261. package/dist/chunks/NcAppSidebarTab-DG51ajic.mjs.map +0 -1
  262. package/dist/chunks/NcAvatar-BadoF6cb.mjs.map +0 -1
  263. package/dist/chunks/NcCollectionList-B2PzNHzw.mjs.map +0 -1
  264. package/dist/chunks/NcDateTime.vue_vue_type_script_setup_true_lang-C2VbacBQ.mjs +0 -31
  265. package/dist/chunks/NcDateTimePicker-BB--HQog.mjs.map +0 -1
  266. package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_c29760cd_lang-CZdrlInz.mjs +0 -13
  267. package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_c29760cd_lang-CZdrlInz.mjs.map +0 -1
  268. package/dist/chunks/NcPasswordField-DY-wDP9m.mjs +0 -211
  269. package/dist/chunks/NcPasswordField-DY-wDP9m.mjs.map +0 -1
  270. package/dist/chunks/NcRichContenteditable-CGP8KN41.mjs.map +0 -1
  271. package/dist/chunks/NcSettingsSection-DkDLjL_G.mjs.map +0 -1
  272. package/dist/chunks/_l10n-B4AgnzNC.mjs.map +0 -1
  273. package/dist/chunks/index-BF8joS9W.mjs.map +0 -1
  274. package/dist/chunks/referencePickerModal-uLIBRHIc.mjs.map +0 -1
  275. package/dist/chunks/useFormatDateTime-DmnI1ENQ.mjs +0 -87
  276. package/dist/chunks/useFormatDateTime-DmnI1ENQ.mjs.map +0 -1
  277. package/dist/composables/useFormatDateTime.d.ts +0 -84
  278. /package/dist/components/NcAppContent/{NcAppDetailsToggle.vue.d.ts → NcAppContentDetailsToggle.vue.d.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcCollectionList-B2PzNHzw.mjs","sources":["../../src/components/NcCollectionList/NcCollectionListItem.vue","../../src/components/NcCollectionList/service.ts","../../src/components/NcCollectionList/useCollections.js","../../src/components/NcCollectionList/NcCollectionList.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<li class=\"collection-list-item\">\n\t\t<NcAvatar :display-name=\"collection.name\" allow-placeholder class=\"collection-avatar\" />\n\t\t<span v-if=\"newName === null\"\n\t\t\tclass=\"collection-item-name\"\n\t\t\ttitle=\"\"\n\t\t\t@click=\"showDetails\">{{ collection.name }}</span>\n\t\t<form v-else :class=\"{'should-shake': error }\" @submit.prevent=\"renameCollection\">\n\t\t\t<input v-model=\"newName\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tautocomplete=\"off\"\n\t\t\t\tautocapitalize=\"off\">\n\t\t\t<input type=\"submit\" value=\"\" class=\"icon-confirm\">\n\t\t</form>\n\t\t<div v-if=\"!detailsOpen && newName === null\" class=\"linked-icons\">\n\t\t\t<component :is=\"getComponent(resource).component\"\n\t\t\t\tv-for=\"resource in resources.slice(0, 2)\"\n\t\t\t\t:key=\"resource.type + '|' + resource.id\"\n\t\t\t\t:title=\"resource.name\"\n\t\t\t\t:to=\"getComponent(resource).to\"\n\t\t\t\t:href=\"getComponent(resource).href\"\n\t\t\t\t:class=\"typeClass(resource)\">\n\t\t\t\t<img :src=\"iconUrl(resource)\" :alt=\"resource.name\">\n\t\t\t</component>\n\t\t</div>\n\n\t\t<span v-if=\"newName === null\" class=\"sharingOptionsGroup\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton icon=\"icon-info\"\n\t\t\t\t\t@click.prevent=\"toggleDetails\">\n\t\t\t\t\t{{ detailsOpen ? t('Hide details') : t('Show details') }}\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton icon=\"icon-rename\"\n\t\t\t\t\t@click.prevent=\"openRename\">\n\t\t\t\t\t{{ t('Rename project') }}\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</span>\n\n\t\t<transition name=\"fade\">\n\t\t\t<div v-if=\"error\" class=\"error\">\n\t\t\t\t{{ error }}\n\t\t\t</div>\n\t\t</transition>\n\t\t<transition name=\"fade\">\n\t\t\t<ul v-if=\"detailsOpen\" class=\"resource-list-details\">\n\t\t\t\t<li v-for=\"resource in resources\"\n\t\t\t\t\t:key=\"resource.type + '|' + resource.id\"\n\t\t\t\t\t:class=\"typeClass(resource)\">\n\t\t\t\t\t<component :is=\"getComponent(resource).component\"\n\t\t\t\t\t\t:to=\"getComponent(resource).to\"\n\t\t\t\t\t\t:href=\"getComponent(resource).href\">\n\t\t\t\t\t\t<img :src=\"iconUrl(resource)\" :alt=\"resource.name\">\n\t\t\t\t\t\t<span class=\"resource-name\">{{ resource.name || '' }}</span>\n\t\t\t\t\t</component>\n\t\t\t\t\t<span class=\"icon-close\" @click=\"removeResource(collection, resource)\" />\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</transition>\n\t</li>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\nimport { getRoute } from '../NcRichText/autolink.ts'\n\nimport NcActions from '../NcActions/index.js'\nimport NcActionButton from '../NcActionButton/index.js'\nimport NcAvatar from '../NcAvatar/index.js'\n\nexport default {\n\tname: 'NcCollectionListItem',\n\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcActions,\n\t\tNcActionButton,\n\t},\n\n\tprops: {\n\t\tcollection: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\terror: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\temits: ['remove-resource', 'rename-collection'],\n\n\tdata() {\n\t\treturn {\n\t\t\tdetailsOpen: false,\n\t\t\tnewName: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tgetIcon() {\n\t\t\treturn (resource) => [resource.iconClass]\n\t\t},\n\n\t\ttypeClass() {\n\t\t\treturn (resource) => 'resource-type-' + resource.type\n\t\t},\n\n\t\tresources() {\n\t\t\t// invalid resources come from server as empty array ([]) and not an object\n\t\t\treturn this.collection.resources?.filter(resource => !Array.isArray(resource)) ?? []\n\t\t},\n\n\t\tgetComponent() {\n\t\t\treturn (resource) => {\n\t\t\t\tconst route = getRoute(this.$router, resource.link)\n\n\t\t\t\treturn route\n\t\t\t\t\t? { component: 'router-link', to: route, href: undefined }\n\t\t\t\t\t: { component: 'a', to: undefined, href: resource.link }\n\t\t\t}\n\t\t},\n\n\t\ticonUrl() {\n\t\t\treturn (resource) => {\n\t\t\t\tif (resource.mimetype) {\n\t\t\t\t\treturn OC.MimeType.getIconUrl(resource.mimetype)\n\t\t\t\t}\n\t\t\t\tif (resource.iconUrl) {\n\t\t\t\t\treturn resource.iconUrl\n\t\t\t\t}\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\ttoggleDetails() {\n\t\t\tthis.detailsOpen = !this.detailsOpen\n\t\t},\n\n\t\tshowDetails() {\n\t\t\tthis.detailsOpen = true\n\t\t},\n\n\t\tremoveResource(collection, resource) {\n\t\t\tthis.$emit('remove-resource', {\n\t\t\t\tcollectionId: collection.id,\n\t\t\t\tresourceType: resource.type,\n\t\t\t\tresourceId: resource.id,\n\t\t\t})\n\t\t},\n\n\t\topenRename() {\n\t\t\tthis.newName = this.collection.name\n\t\t},\n\n\t\trenameCollection() {\n\t\t\tif (this.newName) {\n\t\t\t\tthis.$emit('rename-collection', {\n\t\t\t\t\tcollectionId: this.collection.id,\n\t\t\t\t\tname: this.newName,\n\t\t\t\t})\n\t\t\t}\n\t\t\tthis.newName = null\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .3s ease;\n}\n\n.fade-enter, .fade-leave-to\n\t/* .fade-leave-active below version 2.1.8 */\n{\n\topacity: 0;\n}\n\n.linked-icons {\n\tdisplay: flex;\n\n\timg {\n\t\tpadding: 12px;\n\t\theight: var(--default-clickable-area);\n\t\tdisplay: block;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\topacity: 0.7;\n\n\t\t&:hover {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n.popovermenu {\n\tdisplay: none;\n\n\t&.open {\n\t\tdisplay: block;\n\t}\n}\n\nli.collection-list-item {\n\tflex-wrap: wrap;\n\theight: auto;\n\tcursor: pointer;\n\tmargin-bottom: 0 !important;\n\n\t.collection-avatar {\n\t\tmargin-top: 0;\n\t}\n\n\tform, .collection-item-name {\n\t\tflex-basis: 10%;\n\t\tflex-grow: 1;\n\t\tdisplay: flex;\n\t}\n\n\t.collection-item-name {\n\t\tpadding: 12px 9px;\n\t}\n\n\tinput {\n\t\tmargin-top: 4px;\n\t\tborder-color: var(--color-border-maxcontrast);\n\n\t\t&[type=text] {\n\t\t\tflex-grow: 1;\n\t\t}\n\t}\n\n\t.error {\n\t\tflex-basis: 100%;\n\t\twidth: 100%;\n\t}\n\n\t.resource-list-details {\n\t\tflex-basis: 100%;\n\t\twidth: 100%;\n\n\t\tli {\n\t\t\tdisplay: flex;\n\t\t\tmargin-inline-start: var(--default-clickable-area);\n\t\t\tborder-radius: 3px;\n\t\t\tcursor: pointer;\n\n\t\t\t&:hover {\n\t\t\t\tbackground-color: var(--color-background-dark);\n\t\t\t}\n\n\t\t\ta {\n\t\t\t\tflex-grow: 1;\n\t\t\t\tpadding: 3px;\n\t\t\t\tmax-width: calc(100% - 30px);\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\tspan {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: top;\n\t\t\tmargin-inline-end: 10px;\n\t\t}\n\n\t\tspan.resource-name {\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t\tposition: relative;\n\t\t\tvertical-align: top;\n\t\t\twhite-space: nowrap;\n\t\t\tflex-grow: 1;\n\t\t\tpadding: 4px;\n\t\t}\n\n\t\timg {\n\t\t\twidth: 24px;\n\t\t\theight: 24px;\n\t\t}\n\n\t\t.icon-close {\n\t\t\topacity: .7;\n\n\t\t\t&:hover, &:focus {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.should-shake {\n\tanimation: shake 0.6s 1 linear;\n}\n\n@keyframes shake {\n\t0% {\n\t\ttransform: translate(15px);\n\t}\n\t20% {\n\t\ttransform: translate(-15px);\n\t}\n\t40% {\n\t\ttransform: translate(7px);\n\t}\n\t60% {\n\t\ttransform: translate(-7px);\n\t}\n\t80% {\n\t\ttransform: translate(3px);\n\t}\n\t100% {\n\t\ttransform: translate(0px);\n\t}\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport axios, { type AxiosResponse } from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport type { OCSResponse } from '@nextcloud/typings/ocs'\n\n/**\n * Extracts the OCS data from a response\n * @param response OCS response\n */\nfunction extractOcsData(response: AxiosResponse<OCSResponse>) {\n\treturn response.data.ocs.data\n}\n\n/**\n * Lists all collections\n * @param collectionId Collection ID\n */\nexport function listCollectionService(collectionId: number) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId })).then(extractOcsData)\n}\n\n/**\n * Renames a collection\n * @param collectionId Collection ID\n * @param collectionName New collection name\n */\nexport function renameCollectionService(collectionId: number, collectionName: string) {\n\treturn axios.put(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { collectionName }).then(extractOcsData)\n}\n\n/**\n * Lists all collections for a resource\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function getCollectionsByResourceService(resourceType: string, resourceId: string) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/{resourceType}/{resourceId}', { resourceType, resourceId })).then(extractOcsData)\n}\n\n/**\n * Creates a collection\n * @param resourceType Resource type\n * @param resourceId Resource ID\n * @param name Collection name\n */\nexport function createCollectionService(resourceType: string, resourceId: string, name: string) {\n\treturn axios.post(generateOcsUrl('collaboration/resources/{resourceType}/{resourceId}', { resourceType, resourceId }), { name }).then(extractOcsData)\n}\n\n/**\n * Adds a resource to a collection\n * @param collectionId Collection ID\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function addResourceService(collectionId: number, resourceType: string, resourceId: string) {\n\treturn axios.post(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { resourceType, resourceId }).then(extractOcsData)\n}\n\n/**\n * Removes a resource from a collection\n * @param collectionId Collection ID\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function removeResourceService(collectionId: number, resourceType: string, resourceId: string) {\n\treturn axios.delete(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { params: { resourceType, resourceId } }).then(extractOcsData)\n}\n\n/**\n * Searches for collections\n * @param query Search query\n */\nexport function searchService(query: string) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/collections/search/{query}', { query })).then(extractOcsData)\n}\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { ref } from 'vue'\nimport {\n\trenameCollectionService,\n\tgetCollectionsByResourceService,\n\tcreateCollectionService,\n\taddResourceService,\n\tremoveResourceService,\n} from './service.ts'\n\n/**\n * Use collections composable\n */\nexport function useCollections() {\n\t// State\n\tconst storedCollections = ref([])\n\n\t// Mutations\n\tconst addCollections = (collections) => {\n\t\tstoredCollections.value = collections\n\t}\n\n\tconst addCollection = (collection) => {\n\t\tstoredCollections.value.push(collection)\n\t}\n\n\tconst removeCollection = (collectionId) => {\n\t\tstoredCollections.value = storedCollections.value.filter(item => item.id !== collectionId)\n\t}\n\n\tconst updateCollection = (collection) => {\n\t\tconst index = storedCollections.value.findIndex(item => item.id === collection.id)\n\t\tif (index !== -1) {\n\t\t\tstoredCollections.value[index] = collection\n\t\t} else {\n\t\t\taddCollection(collection)\n\t\t}\n\t}\n\n\t// Actions\n\tconst fetchCollectionsByResource = async ({ resourceType, resourceId }) => {\n\t\tconst collections = await getCollectionsByResourceService(resourceType, resourceId)\n\n\t\taddCollections(collections)\n\t}\n\n\tconst createCollection = async ({ baseResourceType, baseResourceId, resourceType, resourceId, name }) => {\n\t\tconst collection = await createCollectionService(baseResourceType, baseResourceId, name)\n\n\t\taddCollection(collection)\n\t\tawait addResourceToCollection({\n\t\t\tcollectionId: collection.id,\n\t\t\tresourceType,\n\t\t\tresourceId,\n\t\t})\n\t}\n\n\tconst renameCollection = async ({ collectionId, name }) => {\n\t\tconst collection = await renameCollectionService(collectionId, name)\n\n\t\tupdateCollection(collection)\n\t}\n\n\tconst addResourceToCollection = async ({ collectionId, resourceType, resourceId }) => {\n\t\tconst collection = await addResourceService(collectionId, resourceType, String(resourceId))\n\n\t\tupdateCollection(collection)\n\t}\n\n\tconst removeResourceFromCollection = async ({ collectionId, resourceType, resourceId }) => {\n\t\tconst collection = await removeResourceService(collectionId, resourceType, String(resourceId))\n\n\t\tif (collection.resources.length > 0) {\n\t\t\tupdateCollection(collection)\n\t\t} else {\n\t\t\tremoveCollection(collectionId)\n\t\t}\n\t}\n\n\treturn {\n\t\tstoredCollections,\n\t\tfetchCollectionsByResource,\n\t\tcreateCollection,\n\t\trenameCollection,\n\t\taddResourceToCollection,\n\t\tremoveResourceFromCollection,\n\t}\n}\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nProvides a Vue standalone component for Nextcloud Projects feature introduced in Nextcloud 16. Replaces deprecated `nextcloud-vue-collections` library.\n\nProjects feature is deprecated since Nextcloud 25, and superseded by Related resources. See [NcRelatedResourcesPanel](#/Components/NcRelatedResourcesPanel) documentation for more information.\n\n### Usage\n\nTo enable feature in Nextcloud, run following command:\n```sh\nocc config:system:set --value true 'projects.enabled'\n```\n</docs>\n\n<template>\n\t<ul v-if=\"collections && type && id\" id=\"collection-list\" class=\"collection-list\">\n\t\t<li @click=\"showSelect\">\n\t\t\t<div class=\"avatar\">\n\t\t\t\t<span class=\"icon-projects\" />\n\t\t\t</div>\n\t\t\t<div id=\"collection-select-container\">\n\t\t\t\t<NcSelect ref=\"select\"\n\t\t\t\t\tv-model=\"value\"\n\t\t\t\t\t:aria-label-combobox=\"t('Add to a project')\"\n\t\t\t\t\t:options=\"options\"\n\t\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t\tlabel=\"title\"\n\t\t\t\t\t:limit=\"5\"\n\t\t\t\t\t@close=\"isSelectOpen = false\"\n\t\t\t\t\t@open=\"isSelectOpen = true\"\n\t\t\t\t\t@option:selected=\"select\"\n\t\t\t\t\t@search=\"search\">\n\t\t\t\t\t<template #selected-option=\"option\">\n\t\t\t\t\t\t<span class=\"option__desc\">\n\t\t\t\t\t\t\t<span class=\"option__title\">{{ option.title }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #option=\"option\">\n\t\t\t\t\t\t<span class=\"option__wrapper\">\n\t\t\t\t\t\t\t<span v-if=\"option.class\" :class=\"option.class\" class=\"avatar\" />\n\t\t\t\t\t\t\t<NcAvatar v-else-if=\"option.method !== 2\" allow-placeholder :display-name=\"option.title\" />\n\t\t\t\t\t\t\t<span class=\"option__title\">{{ option.title }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<p class=\"hint\">\n\t\t\t\t\t\t{{ t('Connect items to a project to make them easier to find') }}\n\t\t\t\t\t</p>\n\t\t\t\t</NcSelect>\n\t\t\t</div>\n\t\t</li>\n\t\t<transition name=\"fade\">\n\t\t\t<li v-if=\"error\" class=\"error\">\n\t\t\t\t{{ error }}\n\t\t\t</li>\n\t\t</transition>\n\t\t<NcCollectionListItem v-for=\"collection in collections\"\n\t\t\t:key=\"collection.id\"\n\t\t\t:collection=\"collection\"\n\t\t\t:error=\"collectionsError[collection.id]\"\n\t\t\t@rename-collection=\"renameCollectionFromItem\"\n\t\t\t@remove-resource=\"removeResourceFromCollection\" />\n\t</ul>\n</template>\n\n<script>\nimport debounce from 'debounce'\nimport { ref } from 'vue'\nimport { t } from '../../l10n.js'\n\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcSelect from '../NcSelect/index.js'\nimport NcCollectionListItem from './NcCollectionListItem.vue'\n\nimport { useCollections } from './useCollections.js'\nimport { searchService } from './service.ts'\n\nconst METHOD_CREATE_COLLECTION = 0\nconst METHOD_ADD_TO_COLLECTION = 1\n\nexport default {\n\tname: 'NcCollectionList',\n\n\tcomponents: {\n\t\tNcCollectionListItem,\n\t\tNcAvatar,\n\t\tNcSelect,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Resource type identifier\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Unique id of the resource\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Name of the resource\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Whether the component is active (to start fetch resources)\n\t\t */\n\t\tisActive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst {\n\t\t\tstoredCollections,\n\t\t\tfetchCollectionsByResource,\n\t\t\tcreateCollection,\n\t\t\taddResourceToCollection,\n\t\t\tremoveResourceFromCollection,\n\t\t\trenameCollection,\n\t\t} = useCollections()\n\n\t\tconst searchCollections = ref([])\n\t\tconst search = debounce(function(query, loading) {\n\t\t\tif (query !== '') {\n\t\t\t\tloading(true)\n\t\t\t\tsearchService(query).then(collections => {\n\t\t\t\t\tsearchCollections.value = collections\n\t\t\t\t}).catch(e => {\n\t\t\t\t\tconsole.error('Failed to search for collections', e)\n\t\t\t\t}).finally(() => {\n\t\t\t\t\tloading(false)\n\t\t\t\t})\n\t\t\t}\n\t\t}, 500)\n\n\t\treturn {\n\t\t\tstoredCollections,\n\t\t\tfetchCollectionsByResource,\n\t\t\tcreateCollection,\n\t\t\taddResourceToCollection,\n\t\t\tremoveResourceFromCollection,\n\t\t\trenameCollection,\n\t\t\tsearchCollections,\n\t\t\tsearch,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tselectIsOpen: false,\n\t\t\tgeneratingCodes: false,\n\t\t\tcodes: undefined,\n\t\t\tvalue: null,\n\t\t\tmodel: {},\n\t\t\tcollectionsError: {},\n\t\t\terror: null,\n\t\t\tisSelectOpen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcollections() {\n\t\t\treturn this.storedCollections.filter(collection => collection.resources\n\t\t\t\t.some(resource => resource && resource.id === String(this.id) && resource.type === this.type),\n\t\t\t)\n\t\t},\n\n\t\tplaceholder() {\n\t\t\treturn this.isSelectOpen\n\t\t\t\t? t('Type to search for existing projects')\n\t\t\t\t: t('Add to a project')\n\t\t},\n\n\t\toptions() {\n\t\t\tconst options = []\n\t\t\twindow.OCP.Collaboration.getTypes().sort().forEach(type => {\n\t\t\t\toptions.push({\n\t\t\t\t\tmethod: METHOD_CREATE_COLLECTION,\n\t\t\t\t\ttype,\n\t\t\t\t\ttitle: window.OCP.Collaboration.getLabel(type),\n\t\t\t\t\tclass: window.OCP.Collaboration.getIcon(type),\n\t\t\t\t\taction: () => window.OCP.Collaboration.trigger(type),\n\t\t\t\t})\n\t\t\t})\n\t\t\tfor (const index in this.searchCollections) {\n\t\t\t\tif (!this.collections.find(collection => collection.id === this.searchCollections[index].id)) {\n\t\t\t\t\toptions.push({\n\t\t\t\t\t\tmethod: METHOD_ADD_TO_COLLECTION,\n\t\t\t\t\t\ttitle: this.searchCollections[index].name,\n\t\t\t\t\t\tcollectionId: this.searchCollections[index].id,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn options\n\t\t},\n\n\t\tresourceIdentifier() {\n\t\t\treturn {\n\t\t\t\tresourceType: this.type,\n\t\t\t\tresourceId: this.id,\n\t\t\t\tisActive: this.isActive,\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tresourceIdentifier: {\n\t\t\tdeep: true,\n\t\t\timmediate: true,\n\t\t\thandler(resourceIdentifier) {\n\t\t\t\tif (!resourceIdentifier.isActive || !resourceIdentifier.resourceId || !resourceIdentifier.resourceType) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.fetchCollectionsByResource(resourceIdentifier)\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tselect(selectedOption) {\n\t\t\tif (selectedOption.method === METHOD_CREATE_COLLECTION) {\n\t\t\t\tselectedOption.action().then(resourceId => {\n\t\t\t\t\tthis.createCollection({\n\t\t\t\t\t\tbaseResourceType: this.type,\n\t\t\t\t\t\tbaseResourceId: this.id,\n\t\t\t\t\t\tresourceType: selectedOption.type,\n\t\t\t\t\t\tresourceId,\n\t\t\t\t\t\tname: this.name,\n\t\t\t\t\t}).catch((e) => {\n\t\t\t\t\t\tthis.setError(t('Failed to create a project'), e)\n\t\t\t\t\t})\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\tconsole.error('No resource selected', e)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (selectedOption.method === METHOD_ADD_TO_COLLECTION) {\n\t\t\t\tthis.addResourceToCollection({\n\t\t\t\t\tcollectionId: selectedOption.collectionId, resourceType: this.type, resourceId: this.id,\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\tthis.setError(t('Failed to add the item to the project'), e)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.value = null\n\t\t},\n\n\t\tshowSelect() {\n\t\t\tthis.selectIsOpen = true\n\t\t\tthis.$refs.select.$el.focus()\n\t\t},\n\n\t\tsetError(error, e) {\n\t\t\tconsole.error(error, e)\n\t\t\tthis.error = error\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.error = null\n\t\t\t}, 5000)\n\t\t},\n\n\t\trenameCollectionFromItem({ collectionId, name }) {\n\t\t\tthis.renameCollection({ collectionId, name })\n\t\t\t\t.catch((e) => {\n\t\t\t\t\tconsole.error(t('Failed to rename the project'), e)\n\t\t\t\t\tthis.collectionsError[collectionId] = t('Failed to rename the project')\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tthis.collectionsError[collectionId] = null\n\t\t\t\t\t}, 5000)\n\t\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.collection-list * {\n\tbox-sizing: border-box;\n}\n\n.collection-list > li {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 12px;\n\n\t& > .avatar {\n\t\tmargin-top: 0;\n\t}\n}\n\n#collection-select-container {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.v-select {\n\t// NcAvatar in the dropdown\n\tspan.avatar {\n\t\tdisplay: block;\n\t\tpadding: 16px;\n\t\topacity: .7;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\n\t\t&:hover {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\np.hint {\n\tz-index: 1;\n\t// fix alignment\n\tmargin-top: -16px;\n\tpadding: 8px 8px;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: normal;\n}\n\ndiv.avatar {\n\twidth: 32px;\n\theight: 32px;\n\tmargin: 0;\n\tpadding: 8px;\n\tbackground-color: var(--color-background-dark);\n\tmargin-top: 30px;\n}\n\n/** TODO provide white icon in core */\n.icon-projects {\n\tdisplay: block;\n\tpadding: 8px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n}\n\n.option__wrapper {\n\tdisplay: flex;\n\n\t.avatar {\n\t\tdisplay: block;\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tbackground-color: var(--color-background-darker) !important;\n\t}\n\n\t.option__title {\n\t\tpadding: 4px;\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .5s;\n}\n\n.fade-enter, .fade-leave-to {\n\topacity: 0;\n}\n\n</style>\n"],"names":["_sfc_main","_hoisted_1","_hoisted_3","_hoisted_7","_hoisted_8","_openBlock","_createElementBlock","_createVNode","_toDisplayString","_normalizeClass","_withModifiers","_createElementVNode","_hoisted_2","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_withCtx","_createCommentVNode","_hoisted_4","_createTextVNode","_Transition","_hoisted_5","_hoisted_6"],"mappings":";;;;;;;;;;;;;AA2EA,MAAKA,cAAU;AAAA,EACd,MAAM;AAAA,EAEN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAED,OAAO;AAAA,IACN,YAAY;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA,IAED,OAAO;AAAA,MACN,MAAM;A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xD,CA2D+B,eAAU;0BAAvCC,YAKmD,iCAAA;AAAA,QAJjD,KAAK,WAAW;AAAA,QAChB;AAAA,QACA,OAAO,MAAA,iBAAiB,WAAW,EAAE;AAAA,QACrC,oBAAmB,SAAwB;AAAA,QAC3C,kBAAiB,OAA4B;AAAA;;QAhEjDG,mBAAA,IAAA,IAAA;;;"}
@@ -1,31 +0,0 @@
1
- import { defineComponent, toRef, createElementBlock, openBlock, toDisplayString, unref } from "vue";
2
- import { u as useFormatDateTime } from "./useFormatDateTime-DmnI1ENQ.mjs";
3
- const _hoisted_1 = ["data-timestamp", "title", "textContent"];
4
- const _sfc_main = /* @__PURE__ */ defineComponent({
5
- __name: "NcDateTime",
6
- props: {
7
- timestamp: {},
8
- format: { default: () => ({ timeStyle: "medium", dateStyle: "short" }) },
9
- relativeTime: { type: [Boolean, String], default: "long" },
10
- ignoreSeconds: { type: Boolean }
11
- },
12
- setup(__props) {
13
- const props = __props;
14
- const {
15
- formattedTime,
16
- formattedFullTime
17
- } = useFormatDateTime(toRef(() => props.timestamp), props);
18
- return (_ctx, _cache) => {
19
- return openBlock(), createElementBlock("span", {
20
- class: "nc-datetime",
21
- "data-timestamp": _ctx.timestamp,
22
- title: unref(formattedFullTime),
23
- textContent: toDisplayString(unref(formattedTime))
24
- }, null, 8, _hoisted_1);
25
- };
26
- }
27
- });
28
- export {
29
- _sfc_main as _
30
- };
31
- //# sourceMappingURL=NcDateTime.vue_vue_type_script_setup_true_lang-C2VbacBQ.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcDateTimePicker-BB--HQog.mjs","sources":["../../src/components/NcDateTimePicker/NcDateTimePicker.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nIn general it is recommended to use the native date picker (see `NcDateTimePickerNative` which is based on `<input type=\"date\">`).\nBut some use cases are not covered by the native date selector, like selecting ranges or selecting a timezone.\nFor those cases this component can be used.\n\n### General examples\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<fieldset class=\"type-select\">\n\t\t\t<legend>Picker mode</legend>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"date\">Date</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"datetime\">Date and time</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"week\">Week</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"month\">Month</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"year\">Year</NcCheckboxRadioSwitch>\n\t\t</fieldset>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\t:type />\n\t\t<span>{{ time }}</span>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttype: 'date',\n\t\t\ttime: new Date('2022-10-10 10:10:10'),\n\t\t}\n\t},\n}\n</script>\n<style scoped>\n.wrapper {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.type-select {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n}\n</style>\n```\n\n### Example with confirm button\n\nBy default the date is applied as soon as you select the day in the calendar.\nSometimes - especially when selecting date and time - it is required to only emit the selected date when the flow is finished.\nFor this the `confirm` prop can be used, this will add a confirmation button to the selector.\n\n```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\ttype=\"datetime\"\n\t\t\tconfirm />\n\t\t{{ time }}\n\t</span>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttime: null,\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n### Range picker\n\nThe most common use case for the `NcDateTimePicker` is picking a range, as this is not supported by the native date picker.\n\nWhen selecting the range picker type, the model value type will change from `Date` to `[Date, Date]`.\nMeaning an array with two dates is used, the first date is the range start and the second date is the range end.\n\n```vue\n<template>\n\t<div>\n\t\t<fieldset class=\"type-select\">\n\t\t\t<legend>Picker mode</legend>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"date-range\">Date</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"time-range\">Time</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"datetime-range\">Date and time</NcCheckboxRadioSwitch>\n\t\t</fieldset>\n\n\t\t<NcDateTimePicker\n\t\t\t:key=\"type\"\n\t\t\tv-model=\"time\"\n\t\t\t:type />\n\t\t<div>\n\t\t\t<div>Start: {{ formatDate(time[0]) }}</div>\n\t\t\t<div>End: {{ formatDate(time[1]) }}</div>\n\t\t</div>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttime: [new Date(2025, 3, 18, 12, 30), new Date(2025, 3, 21, 13, 30)],\n\t\t\ttype: 'date-range',\n\t\t}\n\t},\n\tmethods: {\n\t\tformatDate(date) {\n\t\t\tconst dateString = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`\n\t\t\tconst timeString = `${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`\n\t\t\tif (this.type === 'date-range') {\n\t\t\t\treturn dateString\n\t\t\t} else if (this.type === 'time-range') {\n\t\t\t\treturn timeString\n\t\t\t}\n\t\t\treturn `${dateString} ${timeString}`\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.type-select {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n}\n</style>\n```\n\n### Time zone aware date picker\n\nThe datepicker can optionally include a picker for the preferred time zone. The selected time does not factor in the\npicked time zone, but you will have to convert it yourself when necessary.\n\n```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\ttype=\"datetime\"\n\t\t\tshow-timezone-select\n\t\t\tv-model:timezone-id=\"tz\" /><br>\n\t\t{{ time }} | {{ tz }}\n\t</span>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttime: undefined,\n\t\t\ttz: 'Europe/Berlin',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<script setup lang=\"ts\">\nimport type {\n\t// The emitted object for time picker\n\tTimeObj as LibraryTimeObject,\n\t// The accepted model value\n\tModelValue as LibraryModelValue,\n\tVueDatePickerProps,\n} from '@vuepic/vue-datepicker'\n\nimport {\n\tmdiCalendarBlank,\n\tmdiChevronDown,\n\tmdiChevronLeft,\n\tmdiChevronRight,\n\tmdiChevronUp,\n\tmdiClock,\n\tmdiClose,\n} from '@mdi/js'\nimport {\n\tgetFirstDay,\n\tgetDayNames,\n\tgetDayNamesMin,\n\tgetCanonicalLocale,\n} from '@nextcloud/l10n'\nimport { computed } from 'vue'\nimport { t } from '../../l10n.js'\n\nimport VueDatePicker from '@vuepic/vue-datepicker'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport NcTimezonePicker from '../NcTimezonePicker/NcTimezonePicker.vue'\n\ntype LibraryFormatOptions = VueDatePickerProps['format']\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * If set to true the menu will be placed on the `<body>`\n\t * instead of default placement on the picker.\n\t */\n\tappendToBody?: boolean\n\n\t/**\n\t * Aria label for the input box.\n\t *\n\t * @default 'Datepicker input'\n\t */\n\tariaLabel?: string\n\n\t/**\n\t * Aria label for the date picker menu.\n\t *\n\t * @default 'Datepicker menu'\n\t */\n\tariaLabelMenu?: string\n\n\t/**\n\t * Allow to clear the input.\n\t *\n\t * @default false\n\t */\n\tclearable?: boolean\n\n\t/**\n\t * Do not auto-apply the date but require clicking the confirmation button.\n\t * @default false\n\t */\n\tconfirm?: boolean\n\n\t/**\n\t * Preview format for the picker input field.\n\t * Can either be a string of Unicode tokens or a function that takes a Date object\n\t * or for range picker an array of two dates, and returns the formatted date as string.\n\t *\n\t * @default Intl.DateTimeFormat is used to format dates and times\n\t * @see https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n\t */\n\tformat?: string | ((date: Date) => string) | ((dates: [Date, Date]) => string)\n\n\t/**\n\t * The locale to use for formatting the shown dates.\n\t * By default the users current Nextcloud locale is used.\n\t */\n\tlocale?: string\n\n\t/**\n\t * Default increment step for minutes in the time picker.\n\t * @default 10\n\t */\n\tminuteStep?: number\n\n\t/**\n\t * The value to initialize, but also two-way bind the selected date. The date is – like the `Date` object in\n\t * JavaScript – tied to UTC. The selected time zone does not have an influence of the selected time and date\n\t * value. You have to translate the time yourself when you want to factor in time zones.\n\t *\n\t * When using the range picker then an array containing the start and end date needs to be passed.\n\t */\n\tmodelValue?: Date | [Date, Date]\n\n\t/**\n\t * Optional custom placeholder for the input box.\n\t */\n\tplaceholder?: string\n\n\t/**\n\t * Include a timezone picker within the menu.\n\t * Please note that the dates are still bound to the locale timezone\n\t * and any conversion needs to be done by the app itself.\n\t *\n\t * @default false\n\t */\n\tshowTimezoneSelect?: boolean\n\n\t/**\n\t * Show the ISO week numbers within the calendar.\n\t *\n\t * @default false\n\t */\n\tshowWeekNumber?: boolean\n\n\t/**\n\t * Type of the picker.\n\t * There is some special handling for ranges as those types require a `[Date, Date]` model value.\n\t * - The 'date-range' type will enable a range picker for dates\n\t * - The 'time-range' allows picking a time range.\n\t * - The 'datetime-range' allows picking dates with times assigned.\n\t *\n\t * @default 'date'\n\t */\n\ttype?: 'date' | 'datetime' | 'time' | 'week' | 'month' | 'year' | 'date-range' | 'time-range' | 'datetime-range'\n}>(), {\n\tariaLabel: t('Datepicker input'),\n\tariaLabelMenu: t('Datepicker menu'),\n\tformat: undefined,\n\tlocale: getCanonicalLocale(),\n\tminuteStep: 10,\n\ttimezoneId: 'UTC',\n\tmodelValue: undefined,\n\t// set by fallbackPlaceholder\n\tplaceholder: undefined,\n\ttype: 'date',\n})\n\n/**\n * The preselected IANA time zone ID for the time zone picker,\n * only relevant in combination with `show-timezone-select`.\n * The prop supports two-way binding through v-model directive.\n *\n * @example `Europe/Berlin`\n * @default 'UTC'\n */\nconst timezoneId = defineModel<string>('timezoneId', { default: 'UTC' })\n\nconst emit = defineEmits<{\n\t/**\n\t * If range picker is enabled then an array containing start and end date are emitted.\n\t * Otherwise the selected date is emitted.\n\t * `null` is emitted if `clearable` is set to `true` and the value was cleared.\n\t */\n\t'update:modelValue': [Date | [Date, Date] | null]\n\t'update:timezoneId': [string]\n}>()\n\n/**\n * Mapping of the model-value prop to the format expected by the library.\n * We do not directly pass the prop and adjust the interface to not transparently wrap the library.\n * This has show as beeing a pain in the past when we need to switch underlying libraries.\n */\nconst value = computed<LibraryModelValue>(() => {\n\tif (props.modelValue === undefined && props.clearable) {\n\t\treturn null\n\t}\n\n\tif (props.type === 'week') {\n\t\tconst date = props.modelValue instanceof Date ? props.modelValue : new Date()\n\t\tconst end = new Date(date)\n\t\tend.setUTCDate(date.getUTCDate() + 6)\n\t\treturn [date, end]\n\t} else if (props.type === 'year') {\n\t\tconst date = props.modelValue instanceof Date ? props.modelValue : new Date()\n\t\treturn date.getUTCFullYear()\n\t} else if (props.type === 'month') {\n\t\tconst date = props.modelValue instanceof Date ? props.modelValue : new Date()\n\t\treturn { year: date.getUTCFullYear(), month: date.getUTCMonth() }\n\t} else if (props.type === 'time' || props.type === 'time-range') {\n\t\tconst time = [props.modelValue ?? (props.type === 'time-range' ? [new Date(), new Date()] : new Date())].flat()\n\t\t// default time range is 1 hour\n\t\tif (props.modelValue === undefined && props.type === 'time-range') {\n\t\t\ttime[1].setHours(time[1].getHours() + 1)\n\t\t}\n\t\tconst timeValue = time.map((date) => ({\n\t\t\thours: date.getHours(),\n\t\t\tminutes: date.getMinutes(),\n\t\t\tseconds: date.getSeconds(),\n\t\t} as LibraryTimeObject))\n\t\treturn props.type === 'time' ? timeValue[0] : timeValue\n\t} else if (props.type.endsWith('-range')) {\n\t\tif (props.modelValue === undefined) {\n\t\t\tconst start = new Date()\n\t\t\tconst end = new Date(start)\n\t\t\tend.setUTCDate(start.getUTCDate() + 7)\n\t\t\treturn [start, end]\n\t\t}\n\t\treturn props.modelValue\n\t}\n\n\t// no special handling for other types needed\n\treturn props.modelValue ?? new Date()\n})\n\nconst placeholderFallback = computed(() => {\n\tif (props.type === 'date') {\n\t\treturn t('Select date')\n\t} else if (props.type === 'time') {\n\t\treturn t('Select time')\n\t} else if (props.type === 'datetime') {\n\t\treturn t('Select date and time')\n\t} else if (props.type === 'week') {\n\t\treturn t('Select week')\n\t} else if (props.type === 'month') {\n\t\treturn t('Select month')\n\t} else if (props.type === 'year') {\n\t\treturn t('Select year')\n\t} else if (props.type.endsWith('-range')) {\n\t\treturn t('Select time range')\n\t}\n\t// should not be reached\n\treturn t('Select date and time')\n})\n\n/**\n * The date (time) formatting to be used by the library.\n * We use the provided format if possible, otherwise we provide a formatting function\n * which uses the browsers Intl API to format the date / time in the current users locale.\n */\nconst realFormat = computed<LibraryFormatOptions>(() => {\n\tif (props.format) {\n\t\t// we can cast the type here as in this case its either string\n\t\t// function `(Date) => string` or `([Date, Date]) => string` where we cast to `(Date[]) => string` here.\n\t\treturn props.format as LibraryFormatOptions\n\t} else if (props.type === 'week') {\n\t\t// cannot format weeks with Intl.\n\t\treturn 'RR-II'\n\t}\n\n\tlet formatter: Intl.DateTimeFormat | undefined\n\tif (props.type === 'date' || props.type === 'date-range') {\n\t\tformatter = new Intl.DateTimeFormat(getCanonicalLocale(), { dateStyle: 'medium' })\n\t} else if (props.type === 'time' || props.type === 'time-range') {\n\t\tformatter = new Intl.DateTimeFormat(getCanonicalLocale(), { timeStyle: 'short' })\n\t} else if (props.type === 'datetime' || props.type === 'datetime-range') {\n\t\tformatter = new Intl.DateTimeFormat(getCanonicalLocale(), { dateStyle: 'medium', timeStyle: 'short' })\n\t} else if (props.type === 'month') {\n\t\tformatter = new Intl.DateTimeFormat(getCanonicalLocale(), { year: 'numeric', month: '2-digit' })\n\t} else if (props.type === 'year') {\n\t\tformatter = new Intl.DateTimeFormat(getCanonicalLocale(), { year: 'numeric' })\n\t}\n\n\tif (formatter) {\n\t\treturn (input: Date | [Date, Date]) => Array.isArray(input)\n\t\t\t? formatter.formatRange(input[0], input[1])\n\t\t\t: formatter.format(input)\n\t}\n\n\t// fallback to default formatting\n\treturn undefined\n})\n\nconst pickerType = computed(() => ({\n\ttimePicker: props.type === 'time' || props.type === 'time-range',\n\tyearPicker: props.type === 'year',\n\tmonthPicker: props.type === 'month',\n\tweekPicker: props.type === 'week',\n\trange: props.type.endsWith('-range') && {\n\t\t// do not use partial ranges (meaning after selecting the start [Date, null] will be emitted)\n\t\t// if this is needed someday we can enable it,\n\t\t// but its not covered by our component interface (props / events) documentation so just disabled for now.\n\t\tpartialRange: false,\n\t},\n\tenableTimePicker: !(props.type === 'date' || props.type === 'date-range'),\n\tflow: props.type === 'datetime'\n\t\t? ['calendar', 'time'] as ['calendar', 'time']\n\t\t: undefined,\n}))\n\n/**\n * Called on model value update of the library.\n * @param value The value emitted from the underlying library\n */\nfunction onUpdateModelValue(value: LibraryModelValue): void {\n\tif (value === null) {\n\t\treturn emit('update:modelValue', null)\n\t}\n\n\tif (props.type === 'time') {\n\t\t// time is provided as an object\n\t\temit('update:modelValue', formatLibraryTime(value as LibraryTimeObject))\n\t} else if (props.type === 'time-range') {\n\t\t// same as time but as an array with two elements\n\t\tconst start = formatLibraryTime(value[0])\n\t\tconst end = formatLibraryTime(value[1])\n\t\t// ensure end is beyond the start\n\t\tif (end.getTime() < start.getTime()) {\n\t\t\tend.setDate(end.getDate() + 1)\n\t\t}\n\t\temit('update:modelValue', [start, end])\n\t} else if (props.type === 'month') {\n\t\t// month is emitted as an object with month and year attribute\n\t\tconst data = value as { month: number, year: number }\n\t\temit('update:modelValue', new Date(data.year, data.month, 1))\n\t} else if (props.type === 'year') {\n\t\t// Years are emitted as the numeric year e.g. 2022\n\t\temit('update:modelValue', new Date(value as number, 0))\n\t} else if (props.type === 'week') {\n\t\t// weeks are emitted as [Date, Date]\n\t\temit('update:modelValue', value[0])\n\t} else {\n\t\t// otherwise it already emits the correct format\n\t\temit('update:modelValue', value as Date | [Date, Date])\n\t}\n}\n\n/**\n * Format a vuepick time object to native JS Date object.\n *\n * @param time - The library time value object\n */\nfunction formatLibraryTime(time: LibraryTimeObject): Date {\n\tconst date = new Date()\n\tdate.setHours(time.hours)\n\tdate.setMinutes(time.minutes)\n\tdate.setSeconds(time.seconds)\n\treturn date\n}\n\n// Localization\n\nconst dayNames = getDayNamesMin()\n\nconst weekStart = getFirstDay()\n\n// TRANSLATORS: A very short abbrevation used as a heading for \"week number\"\nconst weekNumName = t('W')\n\nconst ariaLabels = computed(() => ({\n\ttoggleOverlay: t('Toggle overlay'),\n\tmenu: props.ariaLabelMenu,\n\tinput: props.ariaLabel,\n\topenTimePicker: t('Open time picker'),\n\tcloseTimePicker: t('Close time Picker'),\n\tincrementValue: (type: 'hours' | 'minutes' | 'seconds') => {\n\t\tif (type === 'hours') {\n\t\t\treturn t('Increment hours')\n\t\t} else if (type === 'minutes') {\n\t\t\treturn t('Increment minutes')\n\t\t}\n\t\treturn t('Increment seconds')\n\t},\n\tdecrementValue: (type: 'hours' | 'minutes' | 'seconds') => {\n\t\tif (type === 'hours') {\n\t\t\treturn t('Decrement hours')\n\t\t} else if (type === 'minutes') {\n\t\t\treturn t('Decrement minutes')\n\t\t}\n\t\treturn t('Decrement seconds')\n\t},\n\topenTpOverlay: (type: 'hours' | 'minutes' | 'seconds') => {\n\t\tif (type === 'hours') {\n\t\t\treturn t('Open hours overlay')\n\t\t} else if (type === 'minutes') {\n\t\t\treturn t('Open minutes overlay')\n\t\t}\n\t\treturn t('Open seconds overlay')\n\t},\n\tamPmButton: t('Switch AM/PM mode'),\n\topenYearsOverlay: t('Open years overlay'),\n\topenMonthsOverlay: t('Open months overlay'),\n\tnextMonth: t('Next month'),\n\tprevMonth: t('Previous month'),\n\tnextYear: t('Next year'),\n\tprevYear: t('Previous year'),\n\tweekDay: (day: number) => getDayNames()[day],\n\tclearInput: t('Clear value'),\n\tcalendarIcon: t('Calendar icon'),\n\ttimePicker: t('Time picker'),\n\tmonthPicker: (overlay: boolean) => overlay ? t('Month picker overlay') : t('Month picker'),\n\tyearPicker: (overlay: boolean) => overlay ? t('Year picker overlay') : t('Year picker'),\n}))\n</script>\n\n<template>\n\t<VueDatePicker :aria-labels\n\t\t:auto-apply=\"!confirm\"\n\t\tclass=\"vue-date-time-picker\"\n\t\t:cancel-text=\"t('Cancel')\"\n\t\t:clearable\n\t\t:day-names\n\t\t:placeholder=\"placeholder ?? placeholderFallback\"\n\t\t:format=\"realFormat\"\n\t\t:locale\n\t\t:minutes-increment=\"minuteStep\"\n\t\t:model-value=\"value\"\n\t\t:now-button-label=\"t('Now')\"\n\t\t:select-text=\"t('Pick')\"\n\t\tsix-weeks=\"fair\"\n\t\t:teleport=\"appendToBody || undefined\"\n\t\ttext-input\n\t\t:week-num-name\n\t\t:week-numbers=\"showWeekNumber ? { type: 'iso' } : undefined\"\n\t\t:week-start\n\t\tv-bind=\"pickerType\"\n\t\t@update:model-value=\"onUpdateModelValue\">\n\t\t<template #input-icon>\n\t\t\t<NcIconSvgWrapper :path=\"mdiCalendarBlank\" :size=\"20\" />\n\t\t</template>\n\t\t<template #clear-icon>\n\t\t\t<NcIconSvgWrapper inline :path=\"mdiClose\" :size=\"20\" />\n\t\t</template>\n\t\t<template #clock-icon>\n\t\t\t<NcIconSvgWrapper inline :path=\"mdiClock\" :size=\"20\" />\n\t\t</template>\n\t\t<template #arrow-left>\n\t\t\t<NcIconSvgWrapper inline :path=\"mdiChevronLeft\" :size=\"20\" />\n\t\t</template>\n\t\t<template #arrow-right>\n\t\t\t<NcIconSvgWrapper inline :path=\"mdiChevronRight\" :size=\"20\" />\n\t\t</template>\n\t\t<template #arrow-down>\n\t\t\t<NcIconSvgWrapper inline :path=\"mdiChevronDown\" :size=\"20\" />\n\t\t</template>\n\t\t<template #arrow-up>\n\t\t\t<NcIconSvgWrapper inline :path=\"mdiChevronUp\" :size=\"20\" />\n\t\t</template>\n\t\t<template v-if=\"showTimezoneSelect\" #action-extra>\n\t\t\t<NcTimezonePicker v-model=\"timezoneId\"\n\t\t\t\tclass=\"vue-date-time-picker__timezone\"\n\t\t\t\t:append-to-body=\"false\"\n\t\t\t\t:input-label=\"t('Timezone')\" />\n\t\t</template>\n\t</VueDatePicker>\n</template>\n\n<style scoped lang=\"scss\">\n@import '@vuepic/vue-datepicker/dist/main.css';\n\n.vue-date-time-picker {\n\t--dp-border-radius: var(--border-radius-element);\n\t--dp-input-icon-padding: var(--default-clickable-area);\n\n\t.vue-date-time-picker__timezone {\n\t\tmin-width: unset;\n\t\twidth: 100%;\n\t}\n\n\t:deep(.icon-vue) {\n\t\topacity: 1 !important;\n\t}\n\n\t// time selector button should have consistent padding\n\t:deep(.dp--tp-wrap),\n\t:deep(.dp__action_extra) {\n\t\tpadding: var(--dp-menu-padding);\n\t\tpadding-top: 0;\n\t}\n\n\t:deep(.dp__overlay.dp--overlay-absolute) {\n\t\tpadding: var(--dp-menu-padding);\n\n\t\t.dp__btn.dp__button.dp__button_bottom {\n\t\t\tinset-block-end: 6px;\n\t\t}\n\t}\n\n\t:deep(.dp__btn.dp__button.dp__button_bottom),\n\t:deep(.dp--tp-wrap .dp__button) {\n\t\twidth: 100%;\n\t}\n\n\t:deep(.dp__btn.dp__button.dp__overlay_action) {\n\t\twidth: calc(100% - 16px);\n\t}\n\n\t// fix issues caused by Nextcloud server styles\n\t:deep(input) {\n\t\tpadding-inline-start: var(--dp-input-icon-padding) !important;\n\t}\n\t:deep(.dp__btn) {\n\t\tpadding: calc((var(--default-clickable-area) - 20px) / 2);\n\t\tmargin: 0;\n\t}\n\t:deep(.dp__inner_nav) {\n\t\theight: fit-content;\n\t\twidth: fit-content;\n\t}\n\n\t// Fix server styles causing buttons to be primary colored\n\t:deep(.dp--header-wrap .dp__btn:not(.dp__button_bottom)),\n\t:deep(.dp__time_col .dp__btn) {\n\t\tbackground-color: var(--color-main-background);\n\n\t\t&:hover {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t}\n\t}\n\n\t// Server styles cause the month and year to be fit-content -> fixing it to be max size.\n\t:deep(.dp__month_year_select) {\n\t\tflex: 1;\n\t}\n\t:deep(.dp--time-overlay-btn) {\n\t\tfont-size: calc(2 * var(--default-font-size)) !important;\n\t}\n\n\t// Adjust padding to prevent horizontal scrolling in time selection\n\t:deep(.dp__time_input .dp__time_col_reg_block) {\n\t\tpadding: 0 calc(4 * var(--default-grid-baseline));\n\t}\n\n\t&.dp__theme_dark,\n\t&.dp__theme_light,\n\t:deep(.dp__theme_dark),\n\t:deep(.dp__theme_light) {\n\t\t--dp-background-color: var(--color-main-background);\n\t\t--dp-text-color: var(--color-main-text);\n\t\t--dp-hover-color: var(--color-background-hover);\n\t\t--dp-hover-text-color: var(--color-main-text);\n\t\t--dp-hover-icon-color: var(--color-main-text);\n\t\t--dp-primary-color: var(--color-primary-element);\n\t\t--dp-primary-disabled-color: var(--color-primary-element-hover);\n\t\t--dp-primary-text-color: var(--color-primary-element-text);\n\t\t--dp-secondary-color: var(--color-text-maxcontrast); // this is used for \"disabled\" dates\n\t\t--dp-border-color: var(--color-border);\n\t\t--dp-menu-border-color: var(--color-border-dark);\n\t\t--dp-border-color-hover: var(--color-border-maxcontrast);\n\t\t--dp-border-color-focus: var(--color-border-maxcontrast);\n\t\t--dp-disabled-color: var(--color-background-dark);\n\t\t--dp-disabled-color-text: var(--color-text-maxcontrast);\n\t\t--dp-scroll-bar-background: var(--color-scrollbar);\n\t\t--dp-scroll-bar-color: var(--color-scrollbar);\n\t\t--dp-success-color: var(--color-success);\n\t\t--dp-success-color-disabled: var(--color-success-hover);\n\t\t--dp-icon-color: var(--color-main-text);\n\t\t--dp-danger-color: var(--color-error);\n\t\t--dp-marker-color: var(--color-error);\n\t\t--dp-tooltip-color: var(--color-main-text);\n\t\t--dp-highlight-color: var(--color-main-text);\n\t}\n}\n</style>\n"],"names":["_useModel","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwMA,UAAM,QAAQ;AAqHR,UAAA,aAAaA,kBAAoB,YAAgC;AAEvE,UAAM,OAAO;AAeP,UAAA,QAAQ,SAA4B,MAAM;AAC/C,UAAI,MAAM,eAAe,UAAa,MAAM,WAAW;AAC/C,eAAA;AAAA,MAAA;AAGJ,UAAA,MAAM,SAAS,QAAQ;AAC1B,cAAM,OAAO,MAAM,sBAAsB,OAAO,MAAM,iCAAiB,KAAK;AACtE,cAAA,MAAM,IAAI,KAAK,IAAI;AACzB,YAAI,WAAW,KAAK,WAAW,IAAI,CAAC;AAC7B,eAAA,CAAC,MAAM,GAAG;AAAA,MAAA,WACP,MAAM,SAAS,QAAQ;AACjC,cAAM,OAAO,MAAM,sBAAsB,OAAO,MAAM,iCAAiB,KAAK;AAC5E,eAAO,KAAK,eAAe;AAAA,MAAA,WACjB,MAAM,SAAS,SAAS;AAClC,cAAM,OAAO,MAAM,sBAAsB,OAAO,MAAM,iCAAiB,KAAK;AACrE,eAAA,EAAE,MAAM,KAAK,kBAAkB,OAAO,KAAK,cAAc;AAAA,MAAA,WACtD,MAAM,SAAS,UAAU,MAAM,SAAS,cAAc;AAChE,cAAM,OAAO,CAAC,MAAM,eAAe,MAAM,SAAS,eAAe,CAAC,oBAAI,KAAQ,GAAA,oBAAI,MAAM,wBAAQ,KAAK,EAAE,EAAE,KAAK;AAE9G,YAAI,MAAM,eAAe,UAAa,MAAM,SAAS,cAAc;AAC7D,eAAA,CAAC,EAAE,SAAS,KAAK,CAAC,EAAE,aAAa,CAAC;AAAA,QAAA;AAExC,cAAM,YAAY,KAAK,IAAI,CAAC,UAAU;AAAA,UACrC,OAAO,KAAK,SAAS;AAA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AAA;AAE7B,eAAO,EAAE,mBAAmB;AAAA,MAC7B;AAAA,MACA,gBAAgB,CAAC,SAA0C;AAC1D,YAAI,SAAS,SAAS;AACrB,iBAAO,EAAE,iBAAiB;AAAA,QAAA,WAChB,SAAS,WAAW;AAC9B,iBAAO,EAAE,mBAAmB;AAAA,QAAA;AAE7B,eAAO,EAAE,mBAAmB;AAAA,MAC7B;AAAA,MACA,eAAe,CAAC,SAA0C;AACzD,YAAI,SAAS,SAAS;AACrB,iBAAO,EAAE,oBAAoB;AAAA,QAAA,WACnB,SAAS,WAAW;AAC9B,iBAAO,EAAE,sBAAsB;AAAA,QAAA;AAEhC,eAAO,EAAE,sBAAsB;AAAA,MAChC;AAAA,MACA,YAAY,EAAE,mBAAmB;AAAA,MACjC,kBAAkB,EAAE,oBAAoB;AAAA,MACxC,mBAAmB,EAAE,qBAAqB;AAAA,MAC1C,WAAW,EAAE,YAAY;AAAA,MACzB,WAAW,EAAE,gBAAgB;AAAA,MAC7B,UAAU,EAAE,WAAW;AAAA,MACvB,UAAU,EAAE,eAAe;AAAA,MAC3B,SAAS,CAAC,QAAgB,YAAA,EAAc,GAAG;AAAA,MAC3C,YAAY,EAAE,aAAa;AAAA,MAC3B,cAAc,EAAE,eAAe;AAAA,MAC/B,YAAY,EAAE,aAAa;AAAA,MAC3B,aAAa,CAAC,YAAqB,UAAU,EAAE,sBAAsB,IAAI,EAAE,cAAc;AAAA,MACzF,YAAY,CAAC,YAAqB,UAAU,EAAE,qBAAqB,IAAI,EAAE,aAAa;AAAA,IAAA,EACrF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,13 +0,0 @@
1
- import '../assets/NcMentionBubble-DLOTFwpl.css';
2
- import { generateUrl } from "@nextcloud/router";
3
- const getAvatarUrl = (user, size, isGuest) => {
4
- const darkTheme = window.getComputedStyle(document.body).getPropertyValue("--background-invert-if-dark") === "invert(100%)";
5
- return generateUrl("/avatar" + (isGuest ? "/guest" : "") + "/{user}/{size}" + (darkTheme ? "/dark" : ""), {
6
- user,
7
- size
8
- });
9
- };
10
- export {
11
- getAvatarUrl as g
12
- };
13
- //# sourceMappingURL=NcMentionBubble.vue_vue_type_style_index_0_scoped_c29760cd_lang-CZdrlInz.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcMentionBubble.vue_vue_type_style_index_0_scoped_c29760cd_lang-CZdrlInz.mjs","sources":["../../src/utils/getAvatarUrl.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateUrl } from '@nextcloud/router'\n\nexport const getAvatarUrl = (user: string, size: number | string, isGuest?: boolean): string => {\n\tconst darkTheme = window.getComputedStyle(document.body)\n\t\t.getPropertyValue('--background-invert-if-dark') === 'invert(100%)'\n\n\treturn generateUrl('/avatar' + (isGuest ? '/guest' : '') + '/{user}/{size}' + (darkTheme ? '/dark' : ''), {\n\t\tuser,\n\t\tsize,\n\t})\n}\n"],"names":[],"mappings":";AAOO,MAAM,eAAe,CAAC,MAAc,MAAuB,YAA8B;AACzF,QAAA,YAAY,OAAO,iBAAiB,SAAS,IAAI,EACrD,iBAAiB,6BAA6B,MAAM;AAE/C,SAAA,YAAY,aAAa,UAAU,WAAW,MAAM,oBAAoB,YAAY,UAAU,KAAK;AAAA,IACzG;AAAA,IACA;AAAA,EAAA,CACA;AACF;"}
@@ -1,211 +0,0 @@
1
- import '../assets/NcPasswordField-DVV6Eiwf.css';
2
- import { createElementBlock, openBlock, mergeProps, createElementVNode, createCommentVNode, toDisplayString, defineComponent, mergeModels, useModel, watch, useTemplateRef, ref, computed, createBlock, unref, createSlots, withCtx, renderSlot } from "vue";
3
- import debounce from "debounce";
4
- import axios from "@nextcloud/axios";
5
- import { getCapabilities } from "@nextcloud/capabilities";
6
- import { generateOcsUrl } from "@nextcloud/router";
7
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
8
- import { N as NcInputField } from "./NcInputField-DH5ybroK.mjs";
9
- import { r as register, a as t } from "./_l10n-B4AgnzNC.mjs";
10
- import { l as logger } from "./logger-D3RVzcfQ.mjs";
11
- const _sfc_main$2 = {
12
- name: "EyeIcon",
13
- emits: ["click"],
14
- props: {
15
- title: {
16
- type: String
17
- },
18
- fillColor: {
19
- type: String,
20
- default: "currentColor"
21
- },
22
- size: {
23
- type: Number,
24
- default: 24
25
- }
26
- }
27
- };
28
- const _hoisted_1$1 = ["aria-hidden", "aria-label"];
29
- const _hoisted_2$1 = ["fill", "width", "height"];
30
- const _hoisted_3$1 = { d: "M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z" };
31
- const _hoisted_4$1 = { key: 0 };
32
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
33
- return openBlock(), createElementBlock("span", mergeProps(_ctx.$attrs, {
34
- "aria-hidden": $props.title ? null : "true",
35
- "aria-label": $props.title,
36
- class: "material-design-icon eye-icon",
37
- role: "img",
38
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
39
- }), [
40
- (openBlock(), createElementBlock("svg", {
41
- fill: $props.fillColor,
42
- class: "material-design-icon__svg",
43
- width: $props.size,
44
- height: $props.size,
45
- viewBox: "0 0 24 24"
46
- }, [
47
- createElementVNode("path", _hoisted_3$1, [
48
- $props.title ? (openBlock(), createElementBlock("title", _hoisted_4$1, toDisplayString($props.title), 1)) : createCommentVNode("", true)
49
- ])
50
- ], 8, _hoisted_2$1))
51
- ], 16, _hoisted_1$1);
52
- }
53
- const Eye = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1]]);
54
- const _sfc_main$1 = {
55
- name: "EyeOffIcon",
56
- emits: ["click"],
57
- props: {
58
- title: {
59
- type: String
60
- },
61
- fillColor: {
62
- type: String,
63
- default: "currentColor"
64
- },
65
- size: {
66
- type: Number,
67
- default: 24
68
- }
69
- }
70
- };
71
- const _hoisted_1 = ["aria-hidden", "aria-label"];
72
- const _hoisted_2 = ["fill", "width", "height"];
73
- const _hoisted_3 = { d: "M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z" };
74
- const _hoisted_4 = { key: 0 };
75
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
76
- return openBlock(), createElementBlock("span", mergeProps(_ctx.$attrs, {
77
- "aria-hidden": $props.title ? null : "true",
78
- "aria-label": $props.title,
79
- class: "material-design-icon eye-off-icon",
80
- role: "img",
81
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
82
- }), [
83
- (openBlock(), createElementBlock("svg", {
84
- fill: $props.fillColor,
85
- class: "material-design-icon__svg",
86
- width: $props.size,
87
- height: $props.size,
88
- viewBox: "0 0 24 24"
89
- }, [
90
- createElementVNode("path", _hoisted_3, [
91
- $props.title ? (openBlock(), createElementBlock("title", _hoisted_4, toDisplayString($props.title), 1)) : createCommentVNode("", true)
92
- ])
93
- ], 8, _hoisted_2))
94
- ], 16, _hoisted_1);
95
- }
96
- const EyeOff = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
97
- register();
98
- const _sfc_main = /* @__PURE__ */ defineComponent({
99
- __name: "NcPasswordField",
100
- props: /* @__PURE__ */ mergeModels({
101
- class: {},
102
- inputClass: { default: "" },
103
- id: {},
104
- label: {},
105
- labelOutside: { type: Boolean },
106
- placeholder: {},
107
- showTrailingButton: { type: Boolean, default: true },
108
- success: { type: Boolean },
109
- error: { type: Boolean },
110
- helperText: {},
111
- disabled: { type: Boolean },
112
- pill: { type: Boolean },
113
- checkPasswordStrength: { type: Boolean },
114
- minlength: { default: void 0 },
115
- asText: { type: Boolean }
116
- }, {
117
- "modelValue": { default: "" },
118
- "modelModifiers": {}
119
- }),
120
- emits: /* @__PURE__ */ mergeModels(["valid", "invalid"], ["update:modelValue"]),
121
- setup(__props, { expose: __expose, emit: __emit }) {
122
- const props = __props;
123
- const modelValue = useModel(__props, "modelValue");
124
- watch(modelValue, debounce(checkPassword, 500));
125
- const emit = __emit;
126
- __expose({
127
- focus,
128
- select
129
- });
130
- const { password_policy: passwordPolicy } = getCapabilities();
131
- const inputField = useTemplateRef("inputField");
132
- const isPasswordHidden = ref(true);
133
- const internalHelpMessage = ref("");
134
- const isValid = ref();
135
- const propsToForward = computed(() => {
136
- const all = { ...props };
137
- delete all.checkPasswordStrength;
138
- delete all.minlength;
139
- delete all.asText;
140
- delete all.error;
141
- delete all.helperText;
142
- delete all.inputClass;
143
- delete all.success;
144
- return all;
145
- });
146
- async function checkPassword() {
147
- if (!props.checkPasswordStrength) {
148
- return;
149
- }
150
- try {
151
- const { data } = await axios.post(generateOcsUrl("apps/password_policy/api/v1/validate"), { password: modelValue.value });
152
- isValid.value = data.ocs.data.passed;
153
- if (data.ocs.data.passed) {
154
- internalHelpMessage.value = t("Password is secure");
155
- emit("valid");
156
- return;
157
- }
158
- internalHelpMessage.value = data.ocs.data.reason;
159
- emit("invalid");
160
- } catch (error) {
161
- logger.error("Password policy returned an error", { error });
162
- }
163
- }
164
- function focus(options) {
165
- inputField.value.focus(options);
166
- }
167
- function select() {
168
- inputField.value.select();
169
- }
170
- return (_ctx, _cache) => {
171
- return openBlock(), createBlock(NcInputField, mergeProps(propsToForward.value, {
172
- ref_key: "inputField",
173
- ref: inputField,
174
- modelValue: modelValue.value,
175
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
176
- error: _ctx.error || isValid.value === false,
177
- "helper-text": _ctx.helperText || internalHelpMessage.value,
178
- "input-class": [_ctx.inputClass, { "password-field__input--secure-text": isPasswordHidden.value && _ctx.asText }],
179
- minlength: _ctx.minlength ?? unref(passwordPolicy)?.minLength ?? 0,
180
- success: _ctx.success || isValid.value === true,
181
- "trailing-button-label": isPasswordHidden.value ? unref(t)("Show password") : unref(t)("Hide password"),
182
- type: isPasswordHidden.value && !_ctx.asText ? "password" : "text",
183
- onTrailingButtonClick: _cache[1] || (_cache[1] = ($event) => isPasswordHidden.value = !isPasswordHidden.value)
184
- }), createSlots({
185
- "trailing-button-icon": withCtx(() => [
186
- isPasswordHidden.value ? (openBlock(), createBlock(Eye, {
187
- key: 0,
188
- size: 18
189
- })) : (openBlock(), createBlock(EyeOff, {
190
- key: 1,
191
- size: 18
192
- }))
193
- ]),
194
- _: 2
195
- }, [
196
- !!_ctx.$slots.icon ? {
197
- name: "icon",
198
- fn: withCtx(() => [
199
- renderSlot(_ctx.$slots, "icon", {}, void 0, true)
200
- ]),
201
- key: "0"
202
- } : void 0
203
- ]), 1040, ["modelValue", "error", "helper-text", "input-class", "minlength", "success", "trailing-button-label", "type"]);
204
- };
205
- }
206
- });
207
- const NcPasswordField = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-124ce5f5"]]);
208
- export {
209
- NcPasswordField as N
210
- };
211
- //# sourceMappingURL=NcPasswordField-DY-wDP9m.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcPasswordField-DY-wDP9m.mjs","sources":["../../node_modules/vue-material-design-icons/Eye.vue","../../node_modules/vue-material-design-icons/EyeOff.vue","../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-off-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeOffIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField v-model=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField v-model=\"text2\"\n\t\t\t\tid=\"textField\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField v-model=\"text3\"\n\t\t\t\tid=\"textField2\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField v-model=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\">\n\t\t\t<template #icon>\n\t\t\t\t<Lock :size=\"20\" />\n\t\t\t</template>\n\t\t</NcPasswordField>\n\n\t\t<NcPasswordField v-model=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\n\t\t<NcPasswordField :value.sync=\"text6\"\n\t\t\tlabel=\"Secret token\"\n\t\t\tas-text />\n\t</div>\n</template>\n<script>\nimport Lock from 'vue-material-design-icons/Lock'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t\ttext6: 'secret-token',\n\t\t}\n\t},\n\n\tcomponents: {\n\t\tLock,\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\tgap: 14px;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsToForward\"\n\t\tref=\"inputField\"\n\t\tv-model=\"modelValue\"\n\t\t:error=\"error || isValid === false\"\n\t\t:helper-text=\"helperText || internalHelpMessage\"\n\t\t:input-class=\"[inputClass, { 'password-field__input--secure-text': isPasswordHidden && asText }]\"\n\t\t:minlength=\"minlength ?? passwordPolicy?.minLength ?? 0\"\n\t\t:success=\"success || isValid === true\"\n\t\t:trailing-button-label=\"isPasswordHidden ? t('Show password') : t('Hide password')\"\n\t\t:type=\"isPasswordHidden && !asText ? 'password' : 'text'\"\n\t\t@trailing-button-click=\"isPasswordHidden = !isPasswordHidden\">\n\t\t<template v-if=\"!!$slots.icon\" #icon>\n\t\t\t<!-- @slot Leading icon -->\n\t\t\t<slot name=\"icon\" />\n\t\t</template>\n\t\t<template #trailing-button-icon>\n\t\t\t<Eye v-if=\"isPasswordHidden\" :size=\"18\" />\n\t\t\t<EyeOff v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script setup lang=\"ts\">\nimport type { NcInputFieldProps } from '../NcInputField/NcInputField.vue'\nimport type { Writable } from '../../utils/VueTypes.ts'\n\nimport debounce from 'debounce'\nimport axios from '@nextcloud/axios'\nimport { getCapabilities } from '@nextcloud/capabilities'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { computed, ref, useTemplateRef, watch } from 'vue'\nimport Eye from 'vue-material-design-icons/Eye.vue'\nimport EyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport { t } from '../../l10n.js'\nimport logger from '../../utils/logger.ts'\n\nconst props = withDefaults(defineProps<Omit<NcInputFieldProps, 'trailingButtonLabel' | 'type'> & {\n\t/**\n\t * Check if the user entered a valid password using the password_policy\n\t * app if available.\n\t *\n\t * Warning: this doesn't replace server side checking and will do nothing\n\t * if the password_policy app is disabled.\n\t */\n\tcheckPasswordStrength?: boolean\n\n\t/**\n\t * The minlength property defines the minimum number of characters\n\t * (as UTF-16 code units) the user can enter.\n\t */\n\tminlength?: number\n\n\t/**\n\t * Render as input[type=text] that looks like password field.\n\t * Allows to avoid unwanted password-specific browser behavior,\n\t * such as save or generate password prompt.\n\t * Useful for secret token fields.\n\t * Note: autocomplete=\"off\" is ignored by most browsers.\n\t */\n\tasText?: boolean\n}>(), {\n\tinputClass: '',\n\tminlength: undefined,\n\t// overwrite default\n\tshowTrailingButton: true,\n})\n\nconst modelValue = defineModel<string>('modelValue', { default: '' })\nwatch(modelValue, debounce(checkPassword, 500))\n\nconst emit = defineEmits<{\n\tvalid: []\n\tinvalid: []\n}>()\n\n// public API\ndefineExpose({\n\tfocus,\n\tselect,\n})\n\n// password policy\ninterface PasswordPolicy {\n\t/**\n\t * The URLs to the password_policy app methods\n\t */\n\tapi: {\n\t\t/**\n\t\t * The URL to the password generator\n\t\t */\n\t\tgenerate: string\n\n\t\t/**\n\t\t * The URL to the password validator\n\t\t */\n\t\tvalidate: string\n\t}\n\n\t/**\n\t * Whether to enforce non common passwords\n\t */\n\tenforceNonCommonPassword: boolean\n\n\t/**\n\t * Whether to enforce numeric characters\n\t */\n\tenforceNumericCharacters: boolean\n\n\t/**\n\t * Whether to enforce special characters\n\t */\n\tenforceSpecialCharacters: boolean\n\n\t/**\n\t * Whether to enforce upper and lower case\n\t */\n\tenforceUpperLowerCase: boolean\n\n\t/**\n\t * The minimum length of the password\n\t */\n\tminLength: number\n}\n\nconst { password_policy: passwordPolicy } = getCapabilities() as { password_policy?: PasswordPolicy }\n\n// internal state\nconst inputField = useTemplateRef('inputField')\n\nconst isPasswordHidden = ref(true)\nconst internalHelpMessage = ref('')\nconst isValid = ref<boolean>()\n\nconst propsToForward = computed<Partial<NcInputFieldProps>>(() => {\n\tconst all = { ...props } as Partial<Writable<typeof props>>\n\t// our props\n\tdelete all.checkPasswordStrength\n\tdelete all.minlength\n\tdelete all.asText\n\t// other props already set in template\n\tdelete all.error\n\tdelete all.helperText\n\tdelete all.inputClass\n\tdelete all.success\n\n\treturn all satisfies Partial<NcInputFieldProps>\n})\n\n/**\n * Validate the entered password.\n * If available this method will use the password-policy app API to validate the password.\n */\nasync function checkPassword() {\n\tif (!props.checkPasswordStrength) {\n\t\treturn\n\t}\n\n\ttry {\n\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password: modelValue.value })\n\t\tisValid.value = data.ocs.data.passed\n\t\tif (data.ocs.data.passed) {\n\t\t\tinternalHelpMessage.value = t('Password is secure')\n\t\t\t/**\n\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t * password entered is valid.\n\t\t\t */\n\t\t\temit('valid')\n\t\t\treturn\n\t\t}\n\n\t\tinternalHelpMessage.value = data.ocs.data.reason\n\t\t/**\n\t\t * Triggers when the internal password_policy detect that the\n\t\t * password entered is invalid.\n\t\t */\n\t\temit('invalid')\n\t} catch (error) {\n\t\tlogger.error('Password policy returned an error', { error })\n\t}\n}\n\n/**\n * Focus the input element\n *\n * @param options - Focus options\n * @public\n */\nfunction focus(options?: FocusOptions) {\n\tinputField.value!.focus(options)\n}\n\n/**\n * Select all the text in the input\n *\n * @public\n */\nfunction select() {\n\tinputField.value!.select()\n}\n</script>\n\n<style lang=\"scss\" scoped>\n:deep(.password-field__input--secure-text) {\n\t// Emulate password field look\n\t// This is not a part of the standard but well supported\n\t-webkit-text-security: disc;\n}\n</style>\n"],"names":["_sfc_main","_hoisted_1","_hoisted_2","_hoisted_3","_createElementBlock","_mergeProps","_createElementVNode","_hoisted_4","_createCommentVNode","_useModel"],"mappings":";;;;;;;;;AAoBA,MAAKA,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,IACP;AAAA,IACD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IACD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AACF;AApCA,MAAAC,eAAA,CAAA,eAAA,YAAA;AAAA,MAAAC,eAAA,CAAA,QAAA,SAAA,QAAA;AAYY,MAAAC,eAAA,EAAA,GAAE,oPAAmP;uBAZjQ,KAAA,EAAA;;sBACEC,mBAeO,QAfPC,WAAc,KAAM,QAAA;AAAA,IACb,eAAa,OAAK,QAAA,OAAA;AAAA,IAClB,cAAY,OAAK;AAAA,IAClB,OAAM;AAAA,IACN,MAAK;AAAA,IACJ,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAE,KAA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