@nextcloud/vue 9.0.0-alpha.8 → 9.0.0-rc.1

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 (365) hide show
  1. package/CHANGELOG.md +99 -12
  2. package/dist/assets/{NcActionButton-d8aZCq9u.css → NcActionButton-DfdRrSEu.css} +16 -16
  3. package/dist/assets/{NcActionCheckbox-tMIOGziy.css → NcActionCheckbox--lTDnNsx.css} +12 -12
  4. package/dist/assets/{NcActionInput-C-rQsTEA.css → NcActionInput-BNWL2Q-3.css} +62 -62
  5. package/dist/assets/{NcActionLink-jSPFFKV8.css → NcActionLink-C9_ycPLF.css} +12 -12
  6. package/dist/assets/{NcActionRadio-xdrmoEIq.css → NcActionRadio-DnAjyubC.css} +12 -12
  7. package/dist/assets/{NcActionRouter-qNNqBZab.css → NcActionRouter-CVsc7Ezc.css} +15 -15
  8. package/dist/assets/{NcActionText-0XNfku_2.css → NcActionText-C7y7Pe6P.css} +17 -17
  9. package/dist/assets/{NcActionTextEditable-ZlNtR_B_.css → NcActionTextEditable-OBnWSj_T.css} +60 -60
  10. package/dist/assets/{NcAppContent-CLu_1q4O.css → NcAppContent-CvTesBem.css} +23 -23
  11. package/dist/assets/{NcAppNavigationItem-aVy0uQwf.css → NcAppNavigationItem-Cq6ZYdmT.css} +30 -30
  12. package/dist/assets/{NcAppNavigationNewItem-rCrG0Uuo.css → NcAppNavigationNewItem-CsqJ6c8v.css} +32 -32
  13. package/dist/assets/{NcAppSettingsDialog-DZfD_UEa.css → NcAppSettingsDialog-DMWosHw9.css} +10 -10
  14. package/dist/assets/{NcAppSidebar-GFQ62pY2.css → NcAppSidebar-DejDBLy4.css} +75 -63
  15. package/dist/assets/{NcAvatar-DUKfNDGL.css → NcAvatar-UxFZ39EC.css} +24 -24
  16. package/dist/assets/{NcButton-wmjlEdLP.css → NcButton-DbE0wInI.css} +68 -64
  17. package/dist/assets/{NcCheckboxRadioSwitch-uwXbP_jb.css → NcCheckboxRadioSwitch-sqQXUuVB.css} +45 -44
  18. package/dist/assets/{NcChip-CKtzzrlA.css → NcChip-C-0jMpNk.css} +9 -9
  19. package/dist/assets/{NcDashboardWidget-xV4o6Cen.css → NcDashboardWidget-BEYk4O95.css} +12 -12
  20. package/dist/assets/NcDateTimePicker-pmbCzZnb.css +83 -0
  21. package/dist/assets/{NcDialog-Dkeikssh.css → NcDialog-bP7Jt0ZE.css} +15 -15
  22. package/dist/assets/{NcEmptyContent-D1O466rM.css → NcEmptyContent-BqnUPzZQ.css} +9 -9
  23. package/dist/assets/{NcHeaderButton-BPIasMkw.css → NcHeaderButton-Ct8k0yDh.css} +7 -7
  24. package/dist/assets/{NcHeaderMenu-ZmtqwEYA.css → NcHeaderMenu-zo6kw_jn.css} +11 -11
  25. package/dist/assets/{NcIconSvgWrapper-DQFhmjCC.css → NcIconSvgWrapper-BO9Dme5J.css} +14 -8
  26. package/dist/assets/{NcListItem-Byw-ayOI.css → NcListItem-D6F_oFLK.css} +44 -44
  27. package/dist/assets/{NcMentionBubble-BL05HUeF.css → NcMentionBubble-CB5c5ue2.css} +10 -9
  28. package/dist/assets/{NcPopover-ChETNAVH.css → NcPopover-zFjgXDlM.css} +13 -0
  29. package/dist/assets/{NcRichContenteditable-Bxi-Ki0j.css → NcRichContenteditable-CkyUKlIz.css} +31 -28
  30. package/dist/assets/{NcRichText-Dvt8jvWN.css → NcRichText-BbVi69cc.css} +87 -89
  31. package/dist/assets/{NcSelect-B6DUjUdl.css → NcSelect-BCBpQnFL.css} +0 -3
  32. package/dist/assets/{index-Du_FXiPy.css → index-CjPwAJ46.css} +68 -69
  33. package/dist/assets/index-D9L0rgJk.css +4 -0
  34. package/dist/assets/{referencePickerModal-CkGgDb19.css → referencePickerModal-DAD-jv3F.css} +23 -23
  35. package/dist/chunks/{NcActionButton-BdQ_qmvW.mjs → NcActionButton-BZEDhdCm.mjs} +48 -6
  36. package/dist/chunks/NcActionButton-BZEDhdCm.mjs.map +1 -0
  37. package/dist/chunks/{NcActionButtonGroup-TitZerDl.mjs → NcActionButtonGroup-VJlvSBVZ.mjs} +2 -2
  38. package/dist/chunks/{NcActionButtonGroup-TitZerDl.mjs.map → NcActionButtonGroup-VJlvSBVZ.mjs.map} +1 -1
  39. package/dist/chunks/{NcActionCheckbox-CUYbo1rw.mjs → NcActionCheckbox-DLPDTACR.mjs} +3 -3
  40. package/dist/chunks/{NcActionCheckbox-CUYbo1rw.mjs.map → NcActionCheckbox-DLPDTACR.mjs.map} +1 -1
  41. package/dist/chunks/{NcActionInput-TI648L3V.mjs → NcActionInput-D1R71Reh.mjs} +10 -10
  42. package/dist/chunks/{NcActionInput-TI648L3V.mjs.map → NcActionInput-D1R71Reh.mjs.map} +1 -1
  43. package/dist/chunks/{NcActionLink-cQlsviu9.mjs → NcActionLink-BTIApspK.mjs} +3 -3
  44. package/dist/chunks/{NcActionLink-cQlsviu9.mjs.map → NcActionLink-BTIApspK.mjs.map} +1 -1
  45. package/dist/chunks/{NcActionRadio-tORL1qPt.mjs → NcActionRadio-CPoWB58D.mjs} +3 -3
  46. package/dist/chunks/{NcActionRadio-tORL1qPt.mjs.map → NcActionRadio-CPoWB58D.mjs.map} +1 -1
  47. package/dist/chunks/{NcActionRouter-Bw1tpEZt.mjs → NcActionRouter-DATNpU_e.mjs} +3 -3
  48. package/dist/chunks/{NcActionRouter-Bw1tpEZt.mjs.map → NcActionRouter-DATNpU_e.mjs.map} +1 -1
  49. package/dist/chunks/{NcActionText-VLCHOiIy.mjs → NcActionText-3mJjsJz_.mjs} +3 -3
  50. package/dist/chunks/{NcActionText-VLCHOiIy.mjs.map → NcActionText-3mJjsJz_.mjs.map} +1 -1
  51. package/dist/chunks/{NcActionTextEditable-nTbwgRy2.mjs → NcActionTextEditable-Dv1_bMFY.mjs} +3 -3
  52. package/dist/chunks/NcActionTextEditable-Dv1_bMFY.mjs.map +1 -0
  53. package/dist/chunks/{NcActions-CgKHXNbF.mjs → NcActions-2UedVnLW.mjs} +19 -6
  54. package/dist/chunks/NcActions-2UedVnLW.mjs.map +1 -0
  55. package/dist/chunks/{NcAppContent-C4gBVRQs.mjs → NcAppContent-Bdlo1JwI.mjs} +19 -21
  56. package/dist/chunks/NcAppContent-Bdlo1JwI.mjs.map +1 -0
  57. package/dist/chunks/{NcAppNavigation-DbRpHbi9.mjs → NcAppNavigation-BHLzIgKf.mjs} +2 -2
  58. package/dist/chunks/{NcAppNavigation-DbRpHbi9.mjs.map → NcAppNavigation-BHLzIgKf.mjs.map} +1 -1
  59. package/dist/chunks/{NcAppNavigationCaption-R_UZ7iKw.mjs → NcAppNavigationCaption-D1_4GAVS.mjs} +2 -2
  60. package/dist/chunks/{NcAppNavigationCaption-R_UZ7iKw.mjs.map → NcAppNavigationCaption-D1_4GAVS.mjs.map} +1 -1
  61. package/dist/chunks/{NcAppNavigationItem-CxYtFEhV.mjs → NcAppNavigationItem-Cxzp2qW7.mjs} +69 -69
  62. package/dist/chunks/{NcAppNavigationItem-CxYtFEhV.mjs.map → NcAppNavigationItem-Cxzp2qW7.mjs.map} +1 -1
  63. package/dist/chunks/{NcAppNavigationNew-sMVo_IoL.mjs → NcAppNavigationNew-BUQgcKdv.mjs} +2 -2
  64. package/dist/chunks/{NcAppNavigationNew-sMVo_IoL.mjs.map → NcAppNavigationNew-BUQgcKdv.mjs.map} +1 -1
  65. package/dist/chunks/{NcAppNavigationNewItem-CJZcL6GH.mjs → NcAppNavigationNewItem-BNFUFCCJ.mjs} +4 -4
  66. package/dist/chunks/{NcAppNavigationNewItem-CJZcL6GH.mjs.map → NcAppNavigationNewItem-BNFUFCCJ.mjs.map} +1 -1
  67. package/dist/chunks/{NcAppNavigationSearch-Dbhh-Vtw.mjs → NcAppNavigationSearch-B7w1J5K3.mjs} +3 -3
  68. package/dist/chunks/{NcAppNavigationSearch-Dbhh-Vtw.mjs.map → NcAppNavigationSearch-B7w1J5K3.mjs.map} +1 -1
  69. package/dist/chunks/{NcAppNavigationSettings-Bfo3EWk_.mjs → NcAppNavigationSettings-aTOqq_-d.mjs} +3 -3
  70. package/dist/chunks/{NcAppNavigationSettings-Bfo3EWk_.mjs.map → NcAppNavigationSettings-aTOqq_-d.mjs.map} +1 -1
  71. package/dist/chunks/{NcAppNavigationToggle-Ys-PjFo3.mjs → NcAppNavigationToggle-CSD4yx6Z.mjs} +3 -3
  72. package/dist/chunks/{NcAppNavigationToggle-Ys-PjFo3.mjs.map → NcAppNavigationToggle-CSD4yx6Z.mjs.map} +1 -1
  73. package/dist/chunks/{NcAppSettingsDialog-Cc-OdY9a.mjs → NcAppSettingsDialog-DJhRLDT2.mjs} +8 -8
  74. package/dist/chunks/{NcAppSettingsDialog-Cc-OdY9a.mjs.map → NcAppSettingsDialog-DJhRLDT2.mjs.map} +1 -1
  75. package/dist/chunks/{NcAppSidebar-Dgwj8O_Z.mjs → NcAppSidebar-Dnb5U9gv.mjs} +285 -272
  76. package/dist/chunks/NcAppSidebar-Dnb5U9gv.mjs.map +1 -0
  77. package/dist/chunks/NcAppSidebarHeader.vue_vue_type_script_setup_true_lang-0j0aFDeK.mjs +30 -0
  78. package/dist/chunks/NcAppSidebarHeader.vue_vue_type_script_setup_true_lang-0j0aFDeK.mjs.map +1 -0
  79. package/dist/chunks/{NcAvatar-CA8y4d-c.mjs → NcAvatar-Cg9PDzho.mjs} +36 -14
  80. package/dist/chunks/NcAvatar-Cg9PDzho.mjs.map +1 -0
  81. package/dist/chunks/{NcBreadcrumb-DSjIxTeU.mjs → NcBreadcrumb-DpW0HXlg.mjs} +3 -3
  82. package/dist/chunks/{NcBreadcrumb-DSjIxTeU.mjs.map → NcBreadcrumb-DpW0HXlg.mjs.map} +1 -1
  83. package/dist/chunks/{NcBreadcrumbs-jPvP6Cmo.mjs → NcBreadcrumbs-CbQjZLpZ.mjs} +6 -7
  84. package/dist/chunks/{NcBreadcrumbs-jPvP6Cmo.mjs.map → NcBreadcrumbs-CbQjZLpZ.mjs.map} +1 -1
  85. package/dist/chunks/NcButton-Byg8-ta1.mjs +102 -0
  86. package/dist/chunks/NcButton-Byg8-ta1.mjs.map +1 -0
  87. package/dist/chunks/{NcCheckboxRadioSwitch-CWU_M_ui.mjs → NcCheckboxRadioSwitch-BmzUQ-WN.mjs} +29 -27
  88. package/dist/chunks/NcCheckboxRadioSwitch-BmzUQ-WN.mjs.map +1 -0
  89. package/dist/chunks/{NcChip-C3U2HYR9.mjs → NcChip-BQRPT42V.mjs} +10 -13
  90. package/dist/chunks/NcChip-BQRPT42V.mjs.map +1 -0
  91. package/dist/chunks/{NcCollectionList-BtHsipae.mjs → NcCollectionList-CUlNTcYX.mjs} +6 -6
  92. package/dist/chunks/{NcCollectionList-BtHsipae.mjs.map → NcCollectionList-CUlNTcYX.mjs.map} +1 -1
  93. package/dist/chunks/{NcColorPicker-BI-Is4nj.mjs → NcColorPicker-DGwM1Zki.mjs} +5 -5
  94. package/dist/chunks/{NcColorPicker-BI-Is4nj.mjs.map → NcColorPicker-DGwM1Zki.mjs.map} +1 -1
  95. package/dist/chunks/{NcContent-BcF6f3N-.mjs → NcContent-BhN8SiS1.mjs} +4 -4
  96. package/dist/chunks/{NcContent-BcF6f3N-.mjs.map → NcContent-BhN8SiS1.mjs.map} +1 -1
  97. package/dist/chunks/{NcDashboardWidget-1rVqTzgV.mjs → NcDashboardWidget-CC2pZ6GI.mjs} +7 -7
  98. package/dist/chunks/{NcDashboardWidget-1rVqTzgV.mjs.map → NcDashboardWidget-CC2pZ6GI.mjs.map} +1 -1
  99. package/dist/chunks/{NcDashboardWidgetItem-7RXY5EKJ.mjs → NcDashboardWidgetItem-BsHwLKh3.mjs} +4 -4
  100. package/dist/chunks/{NcDashboardWidgetItem-7RXY5EKJ.mjs.map → NcDashboardWidgetItem-BsHwLKh3.mjs.map} +1 -1
  101. package/dist/chunks/{NcDateTime.vue_vue_type_script_setup_true_lang-DtP-oauZ.mjs → NcDateTime.vue_vue_type_script_setup_true_lang-CKX0mNnP.mjs} +2 -2
  102. package/dist/chunks/{NcDateTime.vue_vue_type_script_setup_true_lang-DtP-oauZ.mjs.map → NcDateTime.vue_vue_type_script_setup_true_lang-CKX0mNnP.mjs.map} +1 -1
  103. package/dist/chunks/{NcDateTimePicker-BzfuHym4.mjs → NcDateTimePicker-BM9F_PSI.mjs} +79 -37
  104. package/dist/chunks/NcDateTimePicker-BM9F_PSI.mjs.map +1 -0
  105. package/dist/chunks/{NcDateTimePickerNative-Dake1IML.mjs → NcDateTimePickerNative-DoGQFKev.mjs} +2 -2
  106. package/dist/chunks/{NcDateTimePickerNative-Dake1IML.mjs.map → NcDateTimePickerNative-DoGQFKev.mjs.map} +1 -1
  107. package/dist/chunks/{NcDialog-_pc2BPHU.mjs → NcDialog-CbXsHgYI.mjs} +7 -7
  108. package/dist/chunks/NcDialog-CbXsHgYI.mjs.map +1 -0
  109. package/dist/chunks/NcDialogButton.vue_vue_type_script_setup_true_lang-DR0Yn-dH.mjs +69 -0
  110. package/dist/chunks/NcDialogButton.vue_vue_type_script_setup_true_lang-DR0Yn-dH.mjs.map +1 -0
  111. package/dist/chunks/{NcEmojiPicker-CWbez_of.mjs → NcEmojiPicker-B0y1ZY5N.mjs} +7 -7
  112. package/dist/chunks/{NcEmojiPicker-CWbez_of.mjs.map → NcEmojiPicker-B0y1ZY5N.mjs.map} +1 -1
  113. package/dist/chunks/NcEmptyContent-CBWBkBL8.mjs +56 -0
  114. package/dist/chunks/NcEmptyContent-CBWBkBL8.mjs.map +1 -0
  115. package/dist/chunks/{NcHeaderButton-BsstEWtv.mjs → NcHeaderButton-BXfTpkIm.mjs} +4 -4
  116. package/dist/chunks/{NcHeaderButton-BsstEWtv.mjs.map → NcHeaderButton-BXfTpkIm.mjs.map} +1 -1
  117. package/dist/chunks/{NcHeaderMenu-ZzoCwPvX.mjs → NcHeaderMenu-D-WDQIHd.mjs} +5 -5
  118. package/dist/chunks/{NcHeaderMenu-ZzoCwPvX.mjs.map → NcHeaderMenu-D-WDQIHd.mjs.map} +1 -1
  119. package/dist/chunks/{NcIconSvgWrapper-BYTrkA66.mjs → NcIconSvgWrapper-DZBRQNfG.mjs} +34 -21
  120. package/dist/chunks/NcIconSvgWrapper-DZBRQNfG.mjs.map +1 -0
  121. package/dist/chunks/{NcInputConfirmCancel-CX56m05a.mjs → NcInputConfirmCancel-CUJM5y0h.mjs} +3 -3
  122. package/dist/chunks/{NcInputConfirmCancel-CX56m05a.mjs.map → NcInputConfirmCancel-CUJM5y0h.mjs.map} +1 -1
  123. package/dist/chunks/{NcInputField-DdZlDVwQ.mjs → NcInputField-BBS1E7r-.mjs} +2 -2
  124. package/dist/chunks/{NcInputField-DdZlDVwQ.mjs.map → NcInputField-BBS1E7r-.mjs.map} +1 -1
  125. package/dist/chunks/{NcListItem-DF8Yv05m.mjs → NcListItem-Bx_uxyFR.mjs} +5 -5
  126. package/dist/chunks/{NcListItem-DF8Yv05m.mjs.map → NcListItem-Bx_uxyFR.mjs.map} +1 -1
  127. package/dist/chunks/{NcListItemIcon-nzw_x2Q5.mjs → NcListItemIcon-CytWJM69.mjs} +4 -4
  128. package/dist/chunks/{NcListItemIcon-nzw_x2Q5.mjs.map → NcListItemIcon-CytWJM69.mjs.map} +1 -1
  129. package/dist/chunks/{NcMentionBubble.vue_vue_type_style_index_0_scoped_6c8d0da9_lang-DYJMHclV.mjs → NcMentionBubble.vue_vue_type_style_index_0_scoped_5b8f093f_lang-DZbkIMTW.mjs} +2 -2
  130. package/dist/chunks/{NcMentionBubble.vue_vue_type_style_index_0_scoped_6c8d0da9_lang-DYJMHclV.mjs.map → NcMentionBubble.vue_vue_type_style_index_0_scoped_5b8f093f_lang-DZbkIMTW.mjs.map} +1 -1
  131. package/dist/chunks/{NcPasswordField-BnnlEhT1.mjs → NcPasswordField-Cac3cpVY.mjs} +3 -3
  132. package/dist/chunks/{NcPasswordField-BnnlEhT1.mjs.map → NcPasswordField-Cac3cpVY.mjs.map} +1 -1
  133. package/dist/chunks/{NcPopover-C3ZoyUjc.mjs → NcPopover-CzrFCS-2.mjs} +155 -27
  134. package/dist/chunks/NcPopover-CzrFCS-2.mjs.map +1 -0
  135. package/dist/chunks/{NcRelatedResourcesPanel-D2YLEouH.mjs → NcRelatedResourcesPanel-BBKk-jjB.mjs} +4 -4
  136. package/dist/chunks/{NcRelatedResourcesPanel-D2YLEouH.mjs.map → NcRelatedResourcesPanel-BBKk-jjB.mjs.map} +1 -1
  137. package/dist/chunks/{NcRichContenteditable-B16VJW0Y.mjs → NcRichContenteditable-gt56b0Uw.mjs} +210 -45
  138. package/dist/chunks/NcRichContenteditable-gt56b0Uw.mjs.map +1 -0
  139. package/dist/chunks/{NcRichText-4jIBSmap.mjs → NcRichText-CMRNgGQw.mjs} +8 -8
  140. package/dist/chunks/{NcRichText-4jIBSmap.mjs.map → NcRichText-CMRNgGQw.mjs.map} +1 -1
  141. package/dist/chunks/NcSavingIndicatorIcon.vue_vue_type_script_setup_true_lang-DlRBo3QU.mjs +58 -0
  142. package/dist/chunks/NcSavingIndicatorIcon.vue_vue_type_script_setup_true_lang-DlRBo3QU.mjs.map +1 -0
  143. package/dist/chunks/{NcSelect-CAx_ixPU.mjs → NcSelect-DFMnY4fI.mjs} +25 -68
  144. package/dist/chunks/NcSelect-DFMnY4fI.mjs.map +1 -0
  145. package/dist/chunks/{NcSelectTags-UXzC7lDz.mjs → NcSelectTags-BpFmhbdp.mjs} +3 -3
  146. package/dist/chunks/{NcSelectTags-UXzC7lDz.mjs.map → NcSelectTags-BpFmhbdp.mjs.map} +1 -1
  147. package/dist/chunks/{NcSettingsInputText-BEHu3xAI.mjs → NcSettingsInputText-CMBC7DaG.mjs} +3 -3
  148. package/dist/chunks/{NcSettingsInputText-BEHu3xAI.mjs.map → NcSettingsInputText-CMBC7DaG.mjs.map} +1 -1
  149. package/dist/chunks/{NcSettingsSection-X7f0W7vZ.mjs → NcSettingsSection-Crla6NXM.mjs} +2 -2
  150. package/dist/chunks/{NcSettingsSection-X7f0W7vZ.mjs.map → NcSettingsSection-Crla6NXM.mjs.map} +1 -1
  151. package/dist/chunks/{NcSettingsSelectGroup-DfrKchOy.mjs → NcSettingsSelectGroup-BOv1UgHX.mjs} +4 -4
  152. package/dist/chunks/{NcSettingsSelectGroup-DfrKchOy.mjs.map → NcSettingsSelectGroup-BOv1UgHX.mjs.map} +1 -1
  153. package/dist/chunks/{NcTextField-BTzKCPza.mjs → NcTextField-Dzv_qpmt.mjs} +4 -4
  154. package/dist/chunks/{NcTextField-BTzKCPza.mjs.map → NcTextField-Dzv_qpmt.mjs.map} +1 -1
  155. package/dist/chunks/NcTimezonePicker.vue_vue_type_script_setup_true_lang-BK7HxZja.mjs +98 -0
  156. package/dist/chunks/NcTimezonePicker.vue_vue_type_script_setup_true_lang-BK7HxZja.mjs.map +1 -0
  157. package/dist/chunks/{NcUserBubble-Dgzog0Ps.mjs → NcUserBubble-CnsRuBNe.mjs} +3 -3
  158. package/dist/chunks/{NcUserBubble-Dgzog0Ps.mjs.map → NcUserBubble-CnsRuBNe.mjs.map} +1 -1
  159. package/dist/chunks/{NcUserStatusIcon-DvYiEs2L.mjs → NcUserStatusIcon-M_93a-z6.mjs} +3 -3
  160. package/dist/chunks/{NcUserStatusIcon-DvYiEs2L.mjs.map → NcUserStatusIcon-M_93a-z6.mjs.map} +1 -1
  161. package/dist/chunks/NcVNodes.vue_vue_type_script_lang-BqUHinRZ.mjs +23 -0
  162. package/dist/chunks/NcVNodes.vue_vue_type_script_lang-BqUHinRZ.mjs.map +1 -0
  163. package/dist/chunks/{ScopeComponent-BWZEma4R.mjs → ScopeComponent-Cr_cohWX.mjs} +2 -2
  164. package/dist/chunks/{ScopeComponent-BWZEma4R.mjs.map → ScopeComponent-Cr_cohWX.mjs.map} +1 -1
  165. package/dist/chunks/{_l10n-7kR7gXFc.mjs → _l10n-dinIMiE_.mjs} +63 -67
  166. package/dist/chunks/_l10n-dinIMiE_.mjs.map +1 -0
  167. package/dist/chunks/{colors-BJbWzaQ-.mjs → colors-AMTxjrbV.mjs} +2 -2
  168. package/dist/chunks/{colors-BJbWzaQ-.mjs.map → colors-AMTxjrbV.mjs.map} +1 -1
  169. package/dist/chunks/{referencePickerModal-BpNnwC_g.mjs → referencePickerModal-CMgdGDsm.mjs} +11 -11
  170. package/dist/chunks/{referencePickerModal-BpNnwC_g.mjs.map → referencePickerModal-CMgdGDsm.mjs.map} +1 -1
  171. package/dist/chunks/{useFormatDateTime-B5sWtJdj.mjs → useFormatDateTime-lk3QDXbQ.mjs} +2 -2
  172. package/dist/chunks/{useFormatDateTime-B5sWtJdj.mjs.map → useFormatDateTime-lk3QDXbQ.mjs.map} +1 -1
  173. package/dist/chunks/{usernameToColor-CzXWY0j4.mjs → usernameToColor-CmB20TBI.mjs} +2 -2
  174. package/dist/chunks/{usernameToColor-CzXWY0j4.mjs.map → usernameToColor-CmB20TBI.mjs.map} +1 -1
  175. package/dist/components/NcActionButton/NcActionButton.vue.d.ts +3 -3
  176. package/dist/components/NcActionButton/index.mjs +1 -1
  177. package/dist/components/NcActionButtonGroup/index.mjs +1 -1
  178. package/dist/components/NcActionCheckbox/NcActionCheckbox.vue.d.ts +1 -1
  179. package/dist/components/NcActionCheckbox/index.mjs +1 -1
  180. package/dist/components/NcActionInput/index.mjs +1 -1
  181. package/dist/components/NcActionLink/index.mjs +1 -1
  182. package/dist/components/NcActionRadio/NcActionRadio.vue.d.ts +1 -1
  183. package/dist/components/NcActionRadio/index.mjs +1 -1
  184. package/dist/components/NcActionRouter/NcActionRouter.vue.d.ts +2 -2
  185. package/dist/components/NcActionRouter/index.mjs +1 -1
  186. package/dist/components/NcActionText/index.mjs +1 -1
  187. package/dist/components/NcActionTextEditable/index.mjs +1 -1
  188. package/dist/components/NcActions/index.mjs +1 -1
  189. package/dist/components/NcAppContent/index.mjs +1 -1
  190. package/dist/components/NcAppNavigation/index.mjs +1 -1
  191. package/dist/components/NcAppNavigationCaption/index.mjs +1 -1
  192. package/dist/components/NcAppNavigationItem/index.mjs +1 -1
  193. package/dist/components/NcAppNavigationNew/index.mjs +1 -1
  194. package/dist/components/NcAppNavigationNewItem/index.mjs +1 -1
  195. package/dist/components/NcAppNavigationSearch/index.mjs +1 -1
  196. package/dist/components/NcAppNavigationSettings/NcAppNavigationSettings.vue.d.ts +3 -10
  197. package/dist/components/NcAppNavigationSettings/index.mjs +1 -1
  198. package/dist/components/NcAppNavigationToggle/index.mjs +1 -1
  199. package/dist/components/NcAppSettingsDialog/index.mjs +1 -1
  200. package/dist/components/NcAppSidebar/NcAppSidebarTabs.vue.d.ts +7 -3
  201. package/dist/components/NcAppSidebar/index.mjs +1 -1
  202. package/dist/components/NcAppSidebarHeader/NcAppSidebarHeader.vue.d.ts +18 -0
  203. package/dist/components/NcAppSidebarHeader/index.d.ts +5 -0
  204. package/dist/components/NcAppSidebarHeader/index.mjs +5 -0
  205. package/dist/{mixins/richEditor → components/NcAppSidebarHeader}/index.mjs.map +1 -1
  206. package/dist/components/NcAppSidebarTab/NcAppSidebarTab.vue.d.ts +1 -1
  207. package/dist/components/NcAvatar/index.mjs +1 -1
  208. package/dist/components/NcBlurHash/NcBlurHash.vue.d.ts +6 -13
  209. package/dist/components/NcBreadcrumb/index.mjs +1 -1
  210. package/dist/components/NcBreadcrumbs/index.mjs +1 -1
  211. package/dist/components/NcButton/NcButton.vue.d.ts +102 -238
  212. package/dist/components/NcButton/index.d.ts +2 -2
  213. package/dist/components/NcButton/index.mjs +1 -4
  214. package/dist/components/NcCheckboxRadioSwitch/index.mjs +1 -1
  215. package/dist/components/NcChip/NcChip.vue.d.ts +36 -38
  216. package/dist/components/NcChip/index.mjs +1 -1
  217. package/dist/components/NcCollectionList/index.mjs +1 -1
  218. package/dist/components/NcColorPicker/index.mjs +1 -1
  219. package/dist/components/NcContent/index.mjs +1 -1
  220. package/dist/components/NcCounterBubble/NcCounterBubble.vue.d.ts +1 -1
  221. package/dist/components/NcDashboardWidget/index.mjs +1 -1
  222. package/dist/components/NcDashboardWidgetItem/index.mjs +1 -1
  223. package/dist/components/NcDateTime/NcDateTime.vue.d.ts +2 -31
  224. package/dist/components/NcDateTime/index.mjs +1 -1
  225. package/dist/components/NcDateTimePicker/NcDateTimePicker.vue.d.ts +49 -60
  226. package/dist/components/NcDateTimePicker/index.mjs +1 -1
  227. package/dist/components/NcDateTimePickerNative/index.mjs +1 -1
  228. package/dist/components/NcDialog/NcDialog.vue.d.ts +55 -129
  229. package/dist/components/NcDialog/index.mjs +1 -1
  230. package/dist/components/NcDialogButton/NcDialogButton.vue.d.ts +33 -109
  231. package/dist/components/NcDialogButton/index.mjs +1 -1
  232. package/dist/components/NcEmojiPicker/index.mjs +1 -1
  233. package/dist/components/NcEmptyContent/NcEmptyContent.vue.d.ts +58 -28
  234. package/dist/components/NcEmptyContent/index.d.ts +4 -0
  235. package/dist/components/NcEmptyContent/index.mjs +1 -1
  236. package/dist/components/NcHeaderButton/NcHeaderButton.vue.d.ts +4 -13
  237. package/dist/components/NcHeaderButton/index.mjs +1 -1
  238. package/dist/components/NcHeaderMenu/index.mjs +1 -1
  239. package/dist/components/NcIconSvgWrapper/NcIconSvgWrapper.vue.d.ts +19 -10
  240. package/dist/components/NcIconSvgWrapper/index.mjs +1 -1
  241. package/dist/components/NcInputField/index.mjs +1 -1
  242. package/dist/components/NcListItem/index.mjs +1 -1
  243. package/dist/components/NcListItemIcon/index.mjs +1 -1
  244. package/dist/components/NcLoadingIcon/NcLoadingIcon.vue.d.ts +1 -1
  245. package/dist/components/NcModal/index.mjs +52 -48
  246. package/dist/components/NcModal/index.mjs.map +1 -1
  247. package/dist/components/NcPasswordField/index.mjs +1 -1
  248. package/dist/components/NcPopover/index.mjs +1 -1
  249. package/dist/components/NcRelatedResourcesPanel/index.mjs +1 -1
  250. package/dist/components/NcRichContenteditable/NcAutoCompleteResult.vue.d.ts +2 -2
  251. package/dist/components/NcRichContenteditable/NcMentionBubble.vue.d.ts +2 -2
  252. package/dist/components/NcRichContenteditable/NcRichContenteditable.vue.d.ts +347 -0
  253. package/dist/components/NcRichContenteditable/index.mjs +3 -4
  254. package/dist/components/NcRichContenteditable/index.mjs.map +1 -1
  255. package/dist/components/NcRichText/NcReferencePicker/NcProviderList.vue.d.ts +215 -0
  256. package/dist/components/NcRichText/NcReferencePicker/NcSearch.vue.d.ts +289 -0
  257. package/dist/components/NcRichText/index.mjs +3 -3
  258. package/dist/components/NcSavingIndicatorIcon/NcSavingIndicatorIcon.vue.d.ts +13 -56
  259. package/dist/components/NcSavingIndicatorIcon/index.d.ts +4 -0
  260. package/dist/components/NcSavingIndicatorIcon/index.mjs +2 -2
  261. package/dist/components/NcSelect/NcSelect.vue.d.ts +121 -0
  262. package/dist/components/NcSelect/index.mjs +1 -1
  263. package/dist/components/NcSelectTags/NcSelectTags.vue.d.ts +205 -0
  264. package/dist/components/NcSelectTags/index.mjs +1 -1
  265. package/dist/components/NcSelectUsers/NcSelectUsers.vue.d.ts +117 -0
  266. package/dist/components/NcSelectUsers/index.d.ts +5 -0
  267. package/dist/components/NcSelectUsers/index.mjs +73 -0
  268. package/dist/components/NcSelectUsers/index.mjs.map +1 -0
  269. package/dist/components/NcSettingsInputText/NcSettingsInputText.vue.d.ts +1 -1
  270. package/dist/components/NcSettingsInputText/index.mjs +1 -1
  271. package/dist/components/NcSettingsSection/index.mjs +1 -1
  272. package/dist/components/NcSettingsSelectGroup/NcSettingsSelectGroup.vue.d.ts +265 -0
  273. package/dist/components/NcSettingsSelectGroup/index.mjs +1 -1
  274. package/dist/components/NcTextArea/NcTextArea.vue.d.ts +5 -5
  275. package/dist/components/NcTextField/index.mjs +1 -1
  276. package/dist/components/NcTimezonePicker/NcTimezonePicker.vue.d.ts +23 -0
  277. package/dist/components/NcTimezonePicker/index.d.ts +5 -0
  278. package/dist/components/NcTimezonePicker/index.mjs +2 -2
  279. package/dist/components/NcTimezonePicker/timezoneDataProviderService.d.ts +5 -1
  280. package/dist/components/NcUserBubble/index.mjs +1 -1
  281. package/dist/components/NcUserStatusIcon/index.mjs +1 -1
  282. package/dist/components/NcVNodes/NcVNodes.vue.d.ts +8 -3
  283. package/dist/components/NcVNodes/index.d.ts +4 -0
  284. package/dist/components/NcVNodes/index.mjs +2 -21
  285. package/dist/components/NcVNodes/index.mjs.map +1 -1
  286. package/dist/components/index.d.ts +5 -4
  287. package/dist/directives/Focus/index.d.ts +2 -3
  288. package/dist/directives/Focus/index.mjs +1 -2
  289. package/dist/directives/Focus/index.mjs.map +1 -1
  290. package/dist/directives/index.d.ts +1 -2
  291. package/dist/functions/contactsMenu/index.d.ts +40 -0
  292. package/dist/functions/contactsMenu/index.mjs +22 -0
  293. package/dist/functions/contactsMenu/index.mjs.map +1 -0
  294. package/dist/functions/dialog/index.d.ts +29 -13
  295. package/dist/functions/dialog/index.mjs +27 -18
  296. package/dist/functions/dialog/index.mjs.map +1 -1
  297. package/dist/functions/index.d.ts +1 -0
  298. package/dist/functions/reference/index.mjs +1 -1
  299. package/dist/functions/usernameToColor/index.mjs +1 -1
  300. package/dist/index.d.ts +0 -1
  301. package/dist/index.mjs +97 -98
  302. package/dist/index.mjs.map +1 -1
  303. package/package.json +21 -13
  304. package/dist/assets/NcDateTimePicker-AIJmp5dC.css +0 -81
  305. package/dist/assets/index-DQ4Plm4r.css +0 -89
  306. package/dist/chunks/ChevronLeft-FfC-tiIS.mjs +0 -49
  307. package/dist/chunks/ChevronLeft-FfC-tiIS.mjs.map +0 -1
  308. package/dist/chunks/NcActionButton-BdQ_qmvW.mjs.map +0 -1
  309. package/dist/chunks/NcActionTextEditable-nTbwgRy2.mjs.map +0 -1
  310. package/dist/chunks/NcActions-CgKHXNbF.mjs.map +0 -1
  311. package/dist/chunks/NcAppContent-C4gBVRQs.mjs.map +0 -1
  312. package/dist/chunks/NcAppSidebar-Dgwj8O_Z.mjs.map +0 -1
  313. package/dist/chunks/NcAvatar-CA8y4d-c.mjs.map +0 -1
  314. package/dist/chunks/NcButton-BHLqKKYP.mjs +0 -308
  315. package/dist/chunks/NcButton-BHLqKKYP.mjs.map +0 -1
  316. package/dist/chunks/NcCheckboxRadioSwitch-CWU_M_ui.mjs.map +0 -1
  317. package/dist/chunks/NcChip-C3U2HYR9.mjs.map +0 -1
  318. package/dist/chunks/NcDateTimePicker-BzfuHym4.mjs.map +0 -1
  319. package/dist/chunks/NcDialog-_pc2BPHU.mjs.map +0 -1
  320. package/dist/chunks/NcDialogButton.vue_vue_type_script_setup_true_lang-BKrJ_xd8.mjs +0 -119
  321. package/dist/chunks/NcDialogButton.vue_vue_type_script_setup_true_lang-BKrJ_xd8.mjs.map +0 -1
  322. package/dist/chunks/NcEmptyContent-BQnIrQQn.mjs +0 -68
  323. package/dist/chunks/NcEmptyContent-BQnIrQQn.mjs.map +0 -1
  324. package/dist/chunks/NcIconSvgWrapper-BYTrkA66.mjs.map +0 -1
  325. package/dist/chunks/NcPopover-C3ZoyUjc.mjs.map +0 -1
  326. package/dist/chunks/NcRichContenteditable-B16VJW0Y.mjs.map +0 -1
  327. package/dist/chunks/NcSavingIndicatorIcon-icWy8J5x.mjs +0 -80
  328. package/dist/chunks/NcSavingIndicatorIcon-icWy8J5x.mjs.map +0 -1
  329. package/dist/chunks/NcSelect-CAx_ixPU.mjs.map +0 -1
  330. package/dist/chunks/NcTimezonePicker-CMoUk4sZ.mjs +0 -188
  331. package/dist/chunks/NcTimezonePicker-CMoUk4sZ.mjs.map +0 -1
  332. package/dist/chunks/_l10n-7kR7gXFc.mjs.map +0 -1
  333. package/dist/chunks/index--u6iHwFv.mjs +0 -184
  334. package/dist/chunks/index--u6iHwFv.mjs.map +0 -1
  335. package/dist/components/NcActions/NcActions.vue.d.ts +0 -544
  336. package/dist/components/NcAppNavigation/NcAppNavigation.vue.d.ts +0 -215
  337. package/dist/components/NcAppNavigationCaption/NcAppNavigationCaption.vue.d.ts +0 -379
  338. package/dist/components/NcAppNavigationItem/NcAppNavigationIconCollapsible.vue.d.ts +0 -161
  339. package/dist/components/NcAppNavigationItem/NcAppNavigationItem.vue.d.ts +0 -1310
  340. package/dist/components/NcAppNavigationItem/NcInputConfirmCancel.vue.d.ts +0 -195
  341. package/dist/components/NcAppNavigationNew/NcAppNavigationNew.vue.d.ts +0 -195
  342. package/dist/components/NcAppNavigationNewItem/NcAppNavigationNewItem.vue.d.ts +0 -316
  343. package/dist/components/NcAppNavigationSearch/NcAppNavigationSearch.vue.d.ts +0 -389
  344. package/dist/components/NcAppNavigationToggle/NcAppNavigationToggle.vue.d.ts +0 -173
  345. package/dist/components/NcBreadcrumb/NcBreadcrumb.vue.d.ts +0 -717
  346. package/dist/components/NcBreadcrumbs/NcBreadcrumbs.vue.d.ts +0 -1330
  347. package/dist/components/NcButton/types.d.ts +0 -30
  348. package/dist/components/NcContent/NcContent.vue.d.ts +0 -227
  349. package/dist/components/NcEmojiPicker/NcEmojiPicker.vue.d.ts +0 -642
  350. package/dist/components/NcHeaderMenu/NcHeaderMenu.vue.d.ts +0 -245
  351. package/dist/components/NcInputField/NcInputField.vue.d.ts +0 -419
  352. package/dist/components/NcListItem/NcListItem.vue.d.ts +0 -714
  353. package/dist/components/NcRelatedResourcesPanel/NcRelatedResourcesPanel.vue.d.ts +0 -553
  354. package/dist/components/NcRelatedResourcesPanel/NcResource.vue.d.ts +0 -173
  355. package/dist/components/NcRelatedResourcesPanel/NcTeamResources.vue.d.ts +0 -241
  356. package/dist/components/NcRichText/NcReferenceList.vue.d.ts +0 -292
  357. package/dist/components/NcRichText/NcReferencePicker/NcRawLinkInput.vue.d.ts +0 -606
  358. package/dist/components/NcRichText/NcReferenceWidget.vue.d.ts +0 -211
  359. package/dist/components/NcRichText/NcRichText.vue.d.ts +0 -409
  360. package/dist/components/NcTextField/NcTextField.vue.d.ts +0 -314
  361. package/dist/components/NcTimezonePicker/timezone.d.ts +0 -14
  362. package/dist/directives/Tooltip/index.d.ts +0 -3
  363. package/dist/directives/Tooltip/index.mjs +0 -12
  364. package/dist/directives/Tooltip/index.mjs.map +0 -1
  365. package/dist/mixins/richEditor/index.mjs +0 -10
@@ -1 +1 @@
1
- {"version":3,"file":"NcDashboardWidget-1rVqTzgV.mjs","sources":["../../src/components/NcDashboardWidget/NcDashboardWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n## Usage\n\n### Simplest example with custom item\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Showing items and a half empty content message\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-items-and-empty-content=\"true\"\n\t\t:half-empty-content-message=\"'No unread items'\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Complete example using NcDashboardWidgetItem\n\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-more-url=\"'https://nextcloud.com'\"\n\t\t:item-menu=\"itemMenu\"\n\t\t@hide=\"onHide\"\n\t\t@markDone=\"onMarkDone\">\n\n\t\t<template #empty-content>\n\t\t\tNothing to display\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tid: '1',\n\t\ttargetUrl: 'https://target.org',\n\t\tavatarUrl: 'https://avatar.url/img.png',\n\t\tavatarUsername: 'Robert',\n\t\tavatarIsNoUser: true,\n\t\toverlayIconUrl: '/svg/core/actions/sound?color=000',\n\t\tmainText: 'First item text',\n\t\tsubText: 'First item subtext',\n\t},\n\t{\n\t\tid: '2',\n\t\ttargetUrl: 'https://other-target.org',\n\t\tavatarUrl: 'https://other-avatar.url/img.png',\n\t\toverlayIconUrl: '/svg/core/actions/add?color=000',\n\t\tmainText: 'Second item text',\n\t\tsubText: 'Second item subtext',\n\t},\n]\nconst myItemMenu = {\n\t// triggers an event named \"markDone\" when clicked\n\t'markDone': {\n\t\ttext: 'Mark as done',\n\t\ticon: 'icon-checkmark',\n\t},\n\t// triggers an event named \"hide\" when clicked\n\t'hide': {\n\t\ttext: 'Hide',\n\t\ticon: 'icon-toggle',\n\t},\n}\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems,\n\t\t\titemMenu: myItemMenu,\n\t\t\tloading: true,\n\t\t}\n\t},\n\tmethods: {\n\t\tonMoreClick() {\n\t\t\tconsole.log('more clicked')\n\t\t\tconst win = window.open('https://wherever.you.want', '_blank')\n\t\t\twin.focus()\n\t\t},\n\t\tonHide(item) {\n\t\t\tconsole.log('user wants to hide item ' + item.id)\n\t\t\t// do what you want\n\t\t},\n\t\tonMarkDone(item) {\n\t\t\tconsole.log('user wants to mark item ' + item.id + ' as done')\n\t\t\t// do what you want\n\t\t},\n\t},\n}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"dashboard-widget\">\n\t\t<!-- This element is shown if we have items, but want to show a general message as well.\n\t\tCan be used e.g. to show \"No mentions\" on top of the item list. -->\n\t\t<NcEmptyContent v-if=\"showHalfEmptyContentArea\"\n\t\t\t:description=\"halfEmptyContentString\"\n\t\t\tclass=\"half-screen\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot The icon to show in the half empty content area. -->\n\t\t\t\t<slot name=\"halfEmptyContentIcon\">\n\t\t\t\t\t<Check />\n\t\t\t\t</slot>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\t\t<!-- The list of items to show. -->\n\t\t<ul>\n\t\t\t<li v-for=\"item in displayedItems\" :key=\"item.id\">\n\t\t\t\t<!-- @slot The default slot can be optionally overridden. It contains the template of one item. -->\n\t\t\t\t<slot name=\"default\" :item=\"item\">\n\t\t\t\t\t<NcDashboardWidgetItem v-bind=\"item\"\n\t\t\t\t\t\t:item-menu=\"itemMenu\"\n\t\t\t\t\t\tv-on=\"handlers\" />\n\t\t\t\t</slot>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- While the widget is loading, we show a list of placeholder items. -->\n\t\t<div v-if=\"loading\">\n\t\t\t<div v-for=\"i in 7\" :key=\"i\" class=\"item-list__entry\">\n\t\t\t\t<NcAvatar class=\"item-avatar\" :size=\"44\" />\n\t\t\t\t<div class=\"item__details\">\n\t\t\t\t\t<h3>&nbsp;</h3>\n\t\t\t\t\t<p class=\"message\">\n&nbsp;\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- @slot Slot for showing information in case of an empty item list. -->\n\t\t<slot v-else-if=\"items.length === 0\" name=\"empty-content\">\n\t\t\t<NcEmptyContent v-if=\"emptyContentMessage\"\n\t\t\t\t:description=\"emptyContentMessage\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<!-- @slot The icon to show in the empty content area. -->\n\t\t\t\t\t<slot name=\"emptyContentIcon\" />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</slot>\n\t\t<!-- A \"show more\" link, e.g. to navigate to the main app belonging to this widget. -->\n\t\t<a v-else-if=\"showMore\"\n\t\t\t:href=\"showMoreUrl\"\n\t\t\ttarget=\"_blank\"\n\t\t\tclass=\"more\"\n\t\t\ttabindex=\"0\">\n\t\t\t{{ showMoreLabel }}\n\t\t</a>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcDashboardWidgetItem from '../NcDashboardWidgetItem/index.js'\nimport NcEmptyContent from '../NcEmptyContent/index.js'\n\nimport Check from 'vue-material-design-icons/Check.vue'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcDashboardWidget',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcDashboardWidgetItem,\n\t\tNcEmptyContent,\n\t\tCheck,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * An array containing the items to show (specific structure must be respected,\n\t\t * except if you override item rendering in the default slot).\n\t\t */\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => { return [] },\n\t\t},\n\t\t/**\n\t\t * If this is set, a \"show more\" text is displayed on the widget's bottom.\n\t\t * It's a link pointing to this URL.\n\t\t */\n\t\tshowMoreUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text of show more button.\n\t\t *\n\t\t * Expected to be in the form \"More {itemName} …\"\n\t\t */\n\t\tshowMoreLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('More items …'),\n\t\t},\n\t\t/**\n\t\t * A boolean to put the widget in a loading state.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each item.\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\t\t/**\n\t\t * Whether both the items and the empty content message are shown.\n\t\t * Usefull for e.g. showing \"No mentions\" and a list of elements.\n\t\t */\n\t\tshowItemsAndEmptyContent: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * The text to show in the empty content area.\n\t\t */\n\t\temptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text to show in the half empty content area.\n\t\t */\n\t\thalfEmptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t// forward menu events to my parent\n\t\thandlers() {\n\t\t\tconst h = {}\n\t\t\tfor (const evName in this.itemMenu) {\n\t\t\t\th[evName] = (it) => {\n\t\t\t\t\tthis.$emit(evName, it)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn h\n\t\t},\n\t\tdisplayedItems() {\n\t\t\tconst nbItems = (this.showMoreUrl && this.items.length >= this.maxItemNumber)\n\t\t\t\t? this.maxItemNumber - 1\n\t\t\t\t: this.maxItemNumber\n\t\t\treturn this.items.slice(0, nbItems)\n\t\t},\n\n\t\tshowHalfEmptyContentArea() {\n\t\t\treturn this.showItemsAndEmptyContent && this.halfEmptyContentString && this.items.length !== 0\n\t\t},\n\n\t\thalfEmptyContentString() {\n\t\t\treturn this.halfEmptyContentMessage || this.emptyContentMessage\n\t\t},\n\n\t\tmaxItemNumber() {\n\t\t\treturn this.showItemsAndEmptyContent ? 5 : 7\n\t\t},\n\n\t\tshowMore() {\n\t\t\treturn this.showMoreUrl && this.items.length >= this.maxItemNumber\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.dashboard-widget :deep(.empty-content) {\n\ttext-align: center;\n\tpadding-top: 5vh;\n\t&.half-screen {\n\t\tpadding-top: 0;\n\t\tmargin-bottom: 1vh;\n\t}\n}\n\n.more {\n\tdisplay: block;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: 60px;\n\tcursor: pointer;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t\tcolor: var(--color-main-text);\n\t}\n}\n\n/* skeleton */\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tpadding: 8px;\n\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-block: auto;\n\t\tbackground-color: var(--color-background-dark) !important;\n\t}\n\t.item__details {\n\t\tpadding-inline-start: 8px;\n\t\tmax-height: var(--default-clickable-area);\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 80%;\n\t\t\theight: 15px;\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createBlock","_renderSlot","_createVNode","_createCommentVNode","_createElementVNode","_Fragment","_renderList","_mergeProps","_toHandlers","_toDisplayString"],"mappings":";;;;;;;;AA+NA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKN,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS,MAAM;AAAE,eAAO;MAAI;AAAA,IAC5B;AAAA;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,eAAe;AAAA,MACd,MAAM;AAAA,MACN,SAAS,EAAE,cAAc;AAAA,IACzB;AAAA;AAAA;AAAA;AAAA,IAID,SAAS;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,UAAU;AAAA,MACT,MAAM;AAAA,MACN,SAAS,MAAM;AAAE,eAAO;MAAI;AAAA,IAC5B;AAAA;AAAA;AAAA;AAAA;AAAA,IAKD,0BAA0B;AAAA,MACzB,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,qBAAqB;AAAA,MACpB,MAAM;AAAA,MACN,SAAS;AAA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nB,GAAA,UAAA,KAAAN,mBAAA,IAAA,IAAA;AAAA;;;"}
1
+ {"version":3,"file":"NcDashboardWidget-CC2pZ6GI.mjs","sources":["../../src/components/NcDashboardWidget/NcDashboardWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n## Usage\n\n### Simplest example with custom item\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Showing items and a half empty content message\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-items-and-empty-content=\"true\"\n\t\t:half-empty-content-message=\"'No unread items'\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Complete example using NcDashboardWidgetItem\n\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-more-url=\"'https://nextcloud.com'\"\n\t\t:item-menu=\"itemMenu\"\n\t\t@hide=\"onHide\"\n\t\t@markDone=\"onMarkDone\">\n\n\t\t<template #empty-content>\n\t\t\tNothing to display\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tid: '1',\n\t\ttargetUrl: 'https://target.org',\n\t\tavatarUrl: 'https://avatar.url/img.png',\n\t\tavatarUsername: 'Robert',\n\t\tavatarIsNoUser: true,\n\t\toverlayIconUrl: '/svg/core/actions/sound?color=000',\n\t\tmainText: 'First item text',\n\t\tsubText: 'First item subtext',\n\t},\n\t{\n\t\tid: '2',\n\t\ttargetUrl: 'https://other-target.org',\n\t\tavatarUrl: 'https://other-avatar.url/img.png',\n\t\toverlayIconUrl: '/svg/core/actions/add?color=000',\n\t\tmainText: 'Second item text',\n\t\tsubText: 'Second item subtext',\n\t},\n]\nconst myItemMenu = {\n\t// triggers an event named \"markDone\" when clicked\n\t'markDone': {\n\t\ttext: 'Mark as done',\n\t\ticon: 'icon-checkmark',\n\t},\n\t// triggers an event named \"hide\" when clicked\n\t'hide': {\n\t\ttext: 'Hide',\n\t\ticon: 'icon-toggle',\n\t},\n}\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems,\n\t\t\titemMenu: myItemMenu,\n\t\t\tloading: true,\n\t\t}\n\t},\n\tmethods: {\n\t\tonMoreClick() {\n\t\t\tconsole.log('more clicked')\n\t\t\tconst win = window.open('https://wherever.you.want', '_blank')\n\t\t\twin.focus()\n\t\t},\n\t\tonHide(item) {\n\t\t\tconsole.log('user wants to hide item ' + item.id)\n\t\t\t// do what you want\n\t\t},\n\t\tonMarkDone(item) {\n\t\t\tconsole.log('user wants to mark item ' + item.id + ' as done')\n\t\t\t// do what you want\n\t\t},\n\t},\n}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"dashboard-widget\">\n\t\t<!-- This element is shown if we have items, but want to show a general message as well.\n\t\tCan be used e.g. to show \"No mentions\" on top of the item list. -->\n\t\t<NcEmptyContent v-if=\"showHalfEmptyContentArea\"\n\t\t\t:description=\"halfEmptyContentString\"\n\t\t\tclass=\"half-screen\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot The icon to show in the half empty content area. -->\n\t\t\t\t<slot name=\"halfEmptyContentIcon\">\n\t\t\t\t\t<Check />\n\t\t\t\t</slot>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\t\t<!-- The list of items to show. -->\n\t\t<ul>\n\t\t\t<li v-for=\"item in displayedItems\" :key=\"item.id\">\n\t\t\t\t<!-- @slot The default slot can be optionally overridden. It contains the template of one item. -->\n\t\t\t\t<slot name=\"default\" :item=\"item\">\n\t\t\t\t\t<NcDashboardWidgetItem v-bind=\"item\"\n\t\t\t\t\t\t:item-menu=\"itemMenu\"\n\t\t\t\t\t\tv-on=\"handlers\" />\n\t\t\t\t</slot>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- While the widget is loading, we show a list of placeholder items. -->\n\t\t<div v-if=\"loading\">\n\t\t\t<div v-for=\"i in 7\" :key=\"i\" class=\"item-list__entry\">\n\t\t\t\t<NcAvatar class=\"item-avatar\" :size=\"44\" />\n\t\t\t\t<div class=\"item__details\">\n\t\t\t\t\t<h3>&nbsp;</h3>\n\t\t\t\t\t<p class=\"message\">\n&nbsp;\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- @slot Slot for showing information in case of an empty item list. -->\n\t\t<slot v-else-if=\"items.length === 0\" name=\"empty-content\">\n\t\t\t<NcEmptyContent v-if=\"emptyContentMessage\"\n\t\t\t\t:description=\"emptyContentMessage\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<!-- @slot The icon to show in the empty content area. -->\n\t\t\t\t\t<slot name=\"emptyContentIcon\" />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</slot>\n\t\t<!-- A \"show more\" link, e.g. to navigate to the main app belonging to this widget. -->\n\t\t<a v-else-if=\"showMore\"\n\t\t\t:href=\"showMoreUrl\"\n\t\t\ttarget=\"_blank\"\n\t\t\tclass=\"more\"\n\t\t\ttabindex=\"0\">\n\t\t\t{{ showMoreLabel }}\n\t\t</a>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcDashboardWidgetItem from '../NcDashboardWidgetItem/index.js'\nimport NcEmptyContent from '../NcEmptyContent/index.ts'\n\nimport Check from 'vue-material-design-icons/Check.vue'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcDashboardWidget',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcDashboardWidgetItem,\n\t\tNcEmptyContent,\n\t\tCheck,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * An array containing the items to show (specific structure must be respected,\n\t\t * except if you override item rendering in the default slot).\n\t\t */\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => { return [] },\n\t\t},\n\t\t/**\n\t\t * If this is set, a \"show more\" text is displayed on the widget's bottom.\n\t\t * It's a link pointing to this URL.\n\t\t */\n\t\tshowMoreUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text of show more button.\n\t\t *\n\t\t * Expected to be in the form \"More {itemName} …\"\n\t\t */\n\t\tshowMoreLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('More items …'),\n\t\t},\n\t\t/**\n\t\t * A boolean to put the widget in a loading state.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each item.\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\t\t/**\n\t\t * Whether both the items and the empty content message are shown.\n\t\t * Usefull for e.g. showing \"No mentions\" and a list of elements.\n\t\t */\n\t\tshowItemsAndEmptyContent: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * The text to show in the empty content area.\n\t\t */\n\t\temptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text to show in the half empty content area.\n\t\t */\n\t\thalfEmptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t// forward menu events to my parent\n\t\thandlers() {\n\t\t\tconst h = {}\n\t\t\tfor (const evName in this.itemMenu) {\n\t\t\t\th[evName] = (it) => {\n\t\t\t\t\tthis.$emit(evName, it)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn h\n\t\t},\n\t\tdisplayedItems() {\n\t\t\tconst nbItems = (this.showMoreUrl && this.items.length >= this.maxItemNumber)\n\t\t\t\t? this.maxItemNumber - 1\n\t\t\t\t: this.maxItemNumber\n\t\t\treturn this.items.slice(0, nbItems)\n\t\t},\n\n\t\tshowHalfEmptyContentArea() {\n\t\t\treturn this.showItemsAndEmptyContent && this.halfEmptyContentString && this.items.length !== 0\n\t\t},\n\n\t\thalfEmptyContentString() {\n\t\t\treturn this.halfEmptyContentMessage || this.emptyContentMessage\n\t\t},\n\n\t\tmaxItemNumber() {\n\t\t\treturn this.showItemsAndEmptyContent ? 5 : 7\n\t\t},\n\n\t\tshowMore() {\n\t\t\treturn this.showMoreUrl && this.items.length >= this.maxItemNumber\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.dashboard-widget :deep(.empty-content) {\n\ttext-align: center;\n\tpadding-top: 5vh;\n\t&.half-screen {\n\t\tpadding-top: 0;\n\t\tmargin-bottom: 1vh;\n\t}\n}\n\n.more {\n\tdisplay: block;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: 60px;\n\tcursor: pointer;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t\tcolor: var(--color-main-text);\n\t}\n}\n\n/* skeleton */\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tpadding: 8px;\n\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-block: auto;\n\t\tbackground-color: var(--color-background-dark) !important;\n\t}\n\t.item__details {\n\t\tpadding-inline-start: 8px;\n\t\tmax-height: var(--default-clickable-area);\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 80%;\n\t\t\theight: 15px;\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createBlock","_renderSlot","_createVNode","_createCommentVNode","_createElementVNode","_Fragment","_renderList","_mergeProps","_toHandlers","_toDisplayString"],"mappings":";;;;;;;;AA+NA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKN,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS,MAAM;AAAE,eAAO;MAAI;AAAA,IAC5B;AAAA;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,eAAe;AAAA,MACd,MAAM;AAAA,MACN,SAAS,EAAE,cAAc;AAAA,IACzB;AAAA;AAAA;AAAA;AAAA,IAID,SAAS;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,UAAU;AAAA,MACT,MAAM;AAAA,MACN,SAAS,MAAM;AAAE,eAAO;MAAI;AAAA,IAC5B;AAAA;AAAA;AAAA;AAAA;AAAA,IAKD,0BAA0B;AAAA,MACzB,MAAM;AA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,OAAW;AAAA,MAClB,QAAO;AAAA,MACP,OAAM;AAAA,MACN,UAAS;AAAA,IACN,GAAAU,gBAAA,OAAA,aAAa,GAjNnB,GAAA,UAAA,KAAAN,mBAAA,IAAA,IAAA;AAAA;;;"}
@@ -1,7 +1,7 @@
1
1
  import '../assets/NcDashboardWidgetItem-B8_6-_k8.css';
2
- import { N as NcAvatar } from "./NcAvatar-CA8y4d-c.mjs";
3
- import { N as NcActions } from "./NcActions-CgKHXNbF.mjs";
4
- import { N as NcActionButton } from "./NcActionButton-BdQ_qmvW.mjs";
2
+ import { N as NcAvatar } from "./NcAvatar-Cg9PDzho.mjs";
3
+ import { N as NcActions } from "./NcActions-2UedVnLW.mjs";
4
+ import { N as NcActionButton } from "./NcActionButton-BZEDhdCm.mjs";
5
5
  import { resolveComponent, createElementBlock, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot, createCommentVNode, createElementVNode, createVNode, toDisplayString, Fragment, renderList, withModifiers, createTextVNode } from "vue";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
7
7
  const _sfc_main = {
@@ -195,4 +195,4 @@ const NcDashboardWidgetItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render",
195
195
  export {
196
196
  NcDashboardWidgetItem as N
197
197
  };
198
- //# sourceMappingURL=NcDashboardWidgetItem-7RXY5EKJ.mjs.map
198
+ //# sourceMappingURL=NcDashboardWidgetItem-BsHwLKh3.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcDashboardWidgetItem-7RXY5EKJ.mjs","sources":["../../src/components/NcDashboardWidgetItem/NcDashboardWidgetItem.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component is meant to be used inside a DashboardWidget component.\n\n</docs>\n\n<template>\n\t<div @mouseover=\"hovered = true\" @mouseleave=\"hovered = false\">\n\t\t<component :is=\"targetUrl ? 'a' : 'div'\"\n\t\t\t:href=\"targetUrl || undefined\"\n\t\t\t:target=\"targetUrl ? '_blank' : undefined\"\n\t\t\t:class=\"{ 'item-list__entry': true, 'item-list__entry--has-actions-menu': gotMenu }\"\n\t\t\t@click=\"onLinkClick\">\n\t\t\t<!-- @slot Slot for passing a user avatar. -->\n\t\t\t<slot name=\"avatar\" :avatar-url=\"avatarUrl\" :avatar-username=\"avatarUsername\">\n\t\t\t\t<NcAvatar class=\"item-avatar\"\n\t\t\t\t\t:size=\"44\"\n\t\t\t\t\t:url=\"avatarUrl\"\n\t\t\t\t\t:user=\"avatarUsername\"\n\t\t\t\t\t:is-no-user=\"avatarIsNoUser\"\n\t\t\t\t\t:show-user-status=\"!gotOverlayIcon\" />\n\t\t\t</slot>\n\t\t\t<img v-if=\"overlayIconUrl\"\n\t\t\t\tclass=\"item-icon\"\n\t\t\t\talt=\"\"\n\t\t\t\t:src=\"overlayIconUrl\">\n\t\t\t<div class=\"item__details\">\n\t\t\t\t<h3 :title=\"mainText\">\n\t\t\t\t\t{{ mainText }}\n\t\t\t\t</h3>\n\t\t\t\t<span v-if=\"subText !== ''\" class=\"message\" :title=\"subText\">\n\t\t\t\t\t{{ subText }}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<NcActions v-if=\"gotMenu\" :force-menu=\"forceMenu\">\n\t\t\t\t<!-- @slot This slot can be used to provide actions for each dashboard widget item. -->\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcActionButton v-for=\"(m, menuItemId) in itemMenu\"\n\t\t\t\t\t\t:key=\"menuItemId\"\n\t\t\t\t\t\t:icon=\"m.icon\"\n\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t@click.prevent.stop=\"$emit(menuItemId, item)\">\n\t\t\t\t\t\t{{ m.text }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</slot>\n\t\t\t</NcActions>\n\t\t</component>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcActions from '../NcActions/index.js'\nimport NcActionButton from '../NcActionButton/index.js'\n\nexport default {\n\tname: 'NcDashboardWidgetItem',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcActions,\n\t\tNcActionButton,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The item id (optional)\n\t\t */\n\t\tid: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * The item element is a link to this URL (optional)\n\t\t */\n\t\ttargetUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Where to get the avatar image. (optional) Used if avatarUsername is not defined.\n\t\t */\n\t\tavatarUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Name to provide to the Avatar. (optional) Used if avatarUrl is not defined.\n\t\t */\n\t\tavatarUsername: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Is the avatarUsername not a user's name? (optional, false by default)\n\t\t */\n\t\tavatarIsNoUser: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Small icon to display on the bottom-right corner of the avatar (optional)\n\t\t */\n\t\toverlayIconUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Item main text (mandatory)\n\t\t */\n\t\tmainText: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * Item subline text (optional)\n\t\t */\n\t\tsubText: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each items (optional)\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\n\t\t/**\n\t\t * Specify whether the 3 dot menu is forced when only one action is present\n\t\t */\n\t\tforceMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\thovered: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\titem() {\n\t\t\treturn {\n\t\t\t\tid: this.id,\n\t\t\t\ttargetUrl: this.targetUrl,\n\t\t\t\tavatarUrl: this.avatarUrl,\n\t\t\t\tavatarUsername: this.avatarUsername,\n\t\t\t\toverlayIconUrl: this.overlayIconUrl,\n\t\t\t\tmainText: this.mainText,\n\t\t\t\tsubText: this.subText,\n\t\t\t}\n\t\t},\n\t\tgotMenu() {\n\t\t\treturn Object.keys(this.itemMenu).length !== 0 || !!this.$slots.actions\n\t\t},\n\t\tgotOverlayIcon() {\n\t\t\treturn this.overlayIconUrl && this.overlayIconUrl !== ''\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonLinkClick(event) {\n\t\t\tif (event.target.closest('.action-item')) {\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: relative;\n\tpadding: 8px;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t}\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-top: auto;\n\t\tmargin-bottom: auto;\n\t}\n\t.item__details {\n\t\tpadding-inline-start: 8px;\n\t\tmax-height: fit-content;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tmin-height: var(--default-clickable-area);\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.message span {\n\t\t\twidth: 10px;\n\t\t\tdisplay: inline-block;\n\t\t\tmargin-bottom: -3px;\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 100%;\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\n\t.item-icon {\n\t\tposition: relative;\n\t\twidth: 14px;\n\t\theight: 14px;\n\t\tmargin-top: 25px;\n\t\tmargin-inline: -10px -2px;\n\t}\n\n\tbutton.primary {\n\t\tpadding: 21px;\n\t\tmargin: 0;\n\t}\n}\n/*\n.content-popover {\n\theight: 0px;\n\twidth: 0px;\n\tmargin-inline: auto;\n}\n.popover-container {\n\twidth: 100%;\n\theight: 0px;\n}\n*/\n</style>\n"],"names":["_createElementBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_withCtx","_renderSlot","_createVNode","_createCommentVNode","_createElementVNode","_toDisplayString","_openBlock","_Fragment","_renderList","_withModifiers","_createTextVNode"],"mappings":";;;;;AA8DA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,IAAI;AAAA,MACH,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,WAAW;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,WAAW;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,gBAAgB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,gBAAgB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,gBAAgB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,UAAU;AAAA,MACT,MAAM;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MAAM,EAAE;AAAA,kBACR,qBAAmB;AAAA,kBACnB,SAhDPY,cAgD2B,YAAA,KAAA,MAAM,YAAY,SAAI,IAAA,GAAA,CAAA,WAAA,MAAA,CAAA;AAAA;kBAhDjD,SAAAT,QAiDM,MAAY;AAAA,oBAjDlBU,gBAiDSL,gBAAA,EAAE,IAAI,GAAA,CAAA;AAAA;kBAjDf,GAAA;AAAA;;;;UAAA,GAAA;AAAA,iCAAAF,mBAAA,IAAA,IAAA;AAAA;MAAA,GAAA;AAAA;;;;"}
1
+ {"version":3,"file":"NcDashboardWidgetItem-BsHwLKh3.mjs","sources":["../../src/components/NcDashboardWidgetItem/NcDashboardWidgetItem.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component is meant to be used inside a DashboardWidget component.\n\n</docs>\n\n<template>\n\t<div @mouseover=\"hovered = true\" @mouseleave=\"hovered = false\">\n\t\t<component :is=\"targetUrl ? 'a' : 'div'\"\n\t\t\t:href=\"targetUrl || undefined\"\n\t\t\t:target=\"targetUrl ? '_blank' : undefined\"\n\t\t\t:class=\"{ 'item-list__entry': true, 'item-list__entry--has-actions-menu': gotMenu }\"\n\t\t\t@click=\"onLinkClick\">\n\t\t\t<!-- @slot Slot for passing a user avatar. -->\n\t\t\t<slot name=\"avatar\" :avatar-url=\"avatarUrl\" :avatar-username=\"avatarUsername\">\n\t\t\t\t<NcAvatar class=\"item-avatar\"\n\t\t\t\t\t:size=\"44\"\n\t\t\t\t\t:url=\"avatarUrl\"\n\t\t\t\t\t:user=\"avatarUsername\"\n\t\t\t\t\t:is-no-user=\"avatarIsNoUser\"\n\t\t\t\t\t:show-user-status=\"!gotOverlayIcon\" />\n\t\t\t</slot>\n\t\t\t<img v-if=\"overlayIconUrl\"\n\t\t\t\tclass=\"item-icon\"\n\t\t\t\talt=\"\"\n\t\t\t\t:src=\"overlayIconUrl\">\n\t\t\t<div class=\"item__details\">\n\t\t\t\t<h3 :title=\"mainText\">\n\t\t\t\t\t{{ mainText }}\n\t\t\t\t</h3>\n\t\t\t\t<span v-if=\"subText !== ''\" class=\"message\" :title=\"subText\">\n\t\t\t\t\t{{ subText }}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<NcActions v-if=\"gotMenu\" :force-menu=\"forceMenu\">\n\t\t\t\t<!-- @slot This slot can be used to provide actions for each dashboard widget item. -->\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcActionButton v-for=\"(m, menuItemId) in itemMenu\"\n\t\t\t\t\t\t:key=\"menuItemId\"\n\t\t\t\t\t\t:icon=\"m.icon\"\n\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t@click.prevent.stop=\"$emit(menuItemId, item)\">\n\t\t\t\t\t\t{{ m.text }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</slot>\n\t\t\t</NcActions>\n\t\t</component>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcActions from '../NcActions/index.js'\nimport NcActionButton from '../NcActionButton/index.js'\n\nexport default {\n\tname: 'NcDashboardWidgetItem',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcActions,\n\t\tNcActionButton,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The item id (optional)\n\t\t */\n\t\tid: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * The item element is a link to this URL (optional)\n\t\t */\n\t\ttargetUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Where to get the avatar image. (optional) Used if avatarUsername is not defined.\n\t\t */\n\t\tavatarUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Name to provide to the Avatar. (optional) Used if avatarUrl is not defined.\n\t\t */\n\t\tavatarUsername: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Is the avatarUsername not a user's name? (optional, false by default)\n\t\t */\n\t\tavatarIsNoUser: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Small icon to display on the bottom-right corner of the avatar (optional)\n\t\t */\n\t\toverlayIconUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Item main text (mandatory)\n\t\t */\n\t\tmainText: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * Item subline text (optional)\n\t\t */\n\t\tsubText: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each items (optional)\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\n\t\t/**\n\t\t * Specify whether the 3 dot menu is forced when only one action is present\n\t\t */\n\t\tforceMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\thovered: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\titem() {\n\t\t\treturn {\n\t\t\t\tid: this.id,\n\t\t\t\ttargetUrl: this.targetUrl,\n\t\t\t\tavatarUrl: this.avatarUrl,\n\t\t\t\tavatarUsername: this.avatarUsername,\n\t\t\t\toverlayIconUrl: this.overlayIconUrl,\n\t\t\t\tmainText: this.mainText,\n\t\t\t\tsubText: this.subText,\n\t\t\t}\n\t\t},\n\t\tgotMenu() {\n\t\t\treturn Object.keys(this.itemMenu).length !== 0 || !!this.$slots.actions\n\t\t},\n\t\tgotOverlayIcon() {\n\t\t\treturn this.overlayIconUrl && this.overlayIconUrl !== ''\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonLinkClick(event) {\n\t\t\tif (event.target.closest('.action-item')) {\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: relative;\n\tpadding: 8px;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t}\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-top: auto;\n\t\tmargin-bottom: auto;\n\t}\n\t.item__details {\n\t\tpadding-inline-start: 8px;\n\t\tmax-height: fit-content;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tmin-height: var(--default-clickable-area);\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.message span {\n\t\t\twidth: 10px;\n\t\t\tdisplay: inline-block;\n\t\t\tmargin-bottom: -3px;\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 100%;\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\n\t.item-icon {\n\t\tposition: relative;\n\t\twidth: 14px;\n\t\theight: 14px;\n\t\tmargin-top: 25px;\n\t\tmargin-inline: -10px -2px;\n\t}\n\n\tbutton.primary {\n\t\tpadding: 21px;\n\t\tmargin: 0;\n\t}\n}\n/*\n.content-popover {\n\theight: 0px;\n\twidth: 0px;\n\tmargin-inline: auto;\n}\n.popover-container {\n\twidth: 100%;\n\theight: 0px;\n}\n*/\n</style>\n"],"names":["_createElementBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_withCtx","_renderSlot","_createVNode","_createCommentVNode","_createElementVNode","_toDisplayString","_openBlock","_Fragment","_renderList","_withModifiers","_createTextVNode"],"mappings":";;;;;AA8DA,MAAK,YAAU;AAAA,EACd,MAAM;AAA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IAAA,IAAA;AAAA,QAiCGC,mBAOM,OAPN,YAOM;AAAA,UANLA,mBAEK,QAFA,OAAO,OAAQ,SAAA,GAAAC,gBAChB,eAAQ,GAnChB,GAAA,UAAA;AAAA,UAqCgB,OAAO,YAAA,mBAAnBT,mBAEO,QAAA;AAAA,YAvCX,KAAA;AAAA,YAqCgC,OAAM;AAAA,YAAW,OAAO,OAAO;AAAA,UACvD,GAAAS,gBAAA,OAAA,OAAO,GAtCf,GAAA,UAAA,KAAAF,mBAAA,IAAA,IAAA;AAAA;QAyCoB,SAAO,wBAAxBN,YAWY,sBAAA;AAAA,UApDf,KAAA;AAAA,UAyC8B,cAAY,OAAS;AAAA;UAzCnD,SAAAG,QA2CI,MAQO;AAAA,YARPC,WAQO,4BARP,MAQO;AAAA,eAPNK,UAAA,IAAA,GAAAV,mBAMiBW,gBAlDtBC,WA4C+C,OAAA,UA5C/C,CA4C6B,GAAG,eAAU;oCAArCX,YAMiB,2BAAA;AAAA,kBALf,KAAK;AAAA,kBACL,MAAM,EAAE;AAAA,kBACR,qBAAmB;AAAA,kBACnB,SAhDPY,cAgD2B,YAAA,KAAA,MAAM,YAAY,SAAI,IAAA,GAAA,CAAA,WAAA,MAAA,CAAA;AAAA;kBAhDjD,SAAAT,QAiDM,MAAY;AAAA,oBAjDlBU,gBAiDSL,gBAAA,EAAE,IAAI,GAAA,CAAA;AAAA;kBAjDf,GAAA;AAAA;;;;UAAA,GAAA;AAAA,iCAAAF,mBAAA,IAAA,IAAA;AAAA;MAAA,GAAA;AAAA;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, toRef, createElementBlock, openBlock, toDisplayString, unref } from "vue";
2
- import { u as useFormatDateTime } from "./useFormatDateTime-B5sWtJdj.mjs";
2
+ import { u as useFormatDateTime } from "./useFormatDateTime-lk3QDXbQ.mjs";
3
3
  const _hoisted_1 = ["data-timestamp", "title", "textContent"];
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "NcDateTime",
@@ -28,4 +28,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  export {
29
29
  _sfc_main as _
30
30
  };
31
- //# sourceMappingURL=NcDateTime.vue_vue_type_script_setup_true_lang-DtP-oauZ.mjs.map
31
+ //# sourceMappingURL=NcDateTime.vue_vue_type_script_setup_true_lang-CKX0mNnP.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcDateTime.vue_vue_type_script_setup_true_lang-DtP-oauZ.mjs","sources":["../../src/components/NcDateTime/NcDateTime.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis components purpose is to display a timestamp in the users local time format.\nIt also supports relative time, for examples *6 seconds ago*.\n\n#### Standard usage\n\nWithout any optional parameters the timestamp is displayed as a relative datetime and a title with the full date is added.\n\n```vue\n<template>\n\t<NcDateTime :timestamp=\"timestamp\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Ignore seconds\n\nIf you do not want the seconds to be counted up until minutes are reached you can simply use the `ignore-seconds` property.\n\n```vue\n<template>\n\t<NcDateTime :timestamp=\"timestamp\" :ignore-seconds=\"true\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Custom date or time format\n\nThe component allows to format the full date for the title by settings the `format` property.\nIt is also possible to disable relative time by setting the `relativeTime` property to `false`.\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Short relative time</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" relative-time=\"short\" />\n\n\t\t<h4>Custom title format</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" :format=\"timeFormat\" />\n\n\t\t<h4>Without relative time</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" :format=\"timeFormat\" :relative-time=\"false\" />\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t\t/** For allowed formats see the Intl.DateTimeFormat options */\n\t\t\t\ttimeFormat: {\n\t\t\t\t\tdateStyle: 'short',\n\t\t\t\t\ttimeStyle: 'full'\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style>\nh4 {\n\tfont-weight: bold;\n\tmargin-top: 12px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<span class=\"nc-datetime\"\n\t\t:data-timestamp=\"timestamp\"\n\t\t:title=\"formattedFullTime\"\n\t\tv-text=\"formattedTime\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { toRef } from 'vue'\nimport { useFormatDateTime } from '../../composables/useFormatDateTime.ts'\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * The timestamp to display, either an unix timestamp (in milliseconds) or a Date object\n\t */\n\ttimestamp: Date | number\n\n\t/**\n\t * The format used for displaying, or if relative time is used the format used for the title (optional)\n\t */\n\tformat?: Intl.DateTimeFormatOptions\n\n\t/**\n\t * Wether to display the timestamp as time from now (optional)\n\t *\n\t * - `false`: Disable relative time\n\t * - `'long'`: Long text, like *2 seconds ago* (default)\n\t * - `'short'`: Short text, like *2 sec. ago*\n\t * - `'narrow'`: Even shorter text (same as `'short'` on some languages)\n\t */\n\trelativeTime?: false | 'long' | 'short' | 'narrow'\n\n\t/**\n\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t */\n\tignoreSeconds?: boolean\n}>(), {\n\tformat: () => ({ timeStyle: 'medium', dateStyle: 'short' }),\n\trelativeTime: 'long',\n})\n\nconst {\n\tformattedTime,\n\tformattedFullTime,\n} = useFormatDateTime(toRef(() => props.timestamp), props)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;AAsGA,UAAM,QAAQ;AA8BR,UAAA;AAAA,MACL;AAAA,MACA;AAAA,IAAA,IACG,kBAAkB,MAAM,MAAM,MAAM,SAAS,GAAG,KAAK;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcDateTime.vue_vue_type_script_setup_true_lang-CKX0mNnP.mjs","sources":["../../src/components/NcDateTime/NcDateTime.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis components purpose is to display a timestamp in the users local time format.\nIt also supports relative time, for examples *6 seconds ago*.\n\n#### Standard usage\n\nWithout any optional parameters the timestamp is displayed as a relative datetime and a title with the full date is added.\n\n```vue\n<template>\n\t<NcDateTime :timestamp=\"timestamp\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Ignore seconds\n\nIf you do not want the seconds to be counted up until minutes are reached you can simply use the `ignore-seconds` property.\n\n```vue\n<template>\n\t<NcDateTime :timestamp=\"timestamp\" :ignore-seconds=\"true\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Custom date or time format\n\nThe component allows to format the full date for the title by settings the `format` property.\nIt is also possible to disable relative time by setting the `relativeTime` property to `false`.\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Short relative time</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" relative-time=\"short\" />\n\n\t\t<h4>Custom title format</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" :format=\"timeFormat\" />\n\n\t\t<h4>Without relative time</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" :format=\"timeFormat\" :relative-time=\"false\" />\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t\t/** For allowed formats see the Intl.DateTimeFormat options */\n\t\t\t\ttimeFormat: {\n\t\t\t\t\tdateStyle: 'short',\n\t\t\t\t\ttimeStyle: 'full'\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style>\nh4 {\n\tfont-weight: bold;\n\tmargin-top: 12px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<span class=\"nc-datetime\"\n\t\t:data-timestamp=\"timestamp\"\n\t\t:title=\"formattedFullTime\"\n\t\tv-text=\"formattedTime\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { toRef } from 'vue'\nimport { useFormatDateTime } from '../../composables/useFormatDateTime.ts'\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * The timestamp to display, either an unix timestamp (in milliseconds) or a Date object\n\t */\n\ttimestamp: Date | number\n\n\t/**\n\t * The format used for displaying, or if relative time is used the format used for the title (optional)\n\t */\n\tformat?: Intl.DateTimeFormatOptions\n\n\t/**\n\t * Wether to display the timestamp as time from now (optional)\n\t *\n\t * - `false`: Disable relative time\n\t * - `'long'`: Long text, like *2 seconds ago* (default)\n\t * - `'short'`: Short text, like *2 sec. ago*\n\t * - `'narrow'`: Even shorter text (same as `'short'` on some languages)\n\t */\n\trelativeTime?: false | 'long' | 'short' | 'narrow'\n\n\t/**\n\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t */\n\tignoreSeconds?: boolean\n}>(), {\n\tformat: () => ({ timeStyle: 'medium', dateStyle: 'short' }),\n\trelativeTime: 'long',\n})\n\nconst {\n\tformattedTime,\n\tformattedFullTime,\n} = useFormatDateTime(toRef(() => props.timestamp), props)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;AAsGA,UAAM,QAAQ;AA8BR,UAAA;AAAA,MACL;AAAA,MACA;AAAA,IAAA,IACG,kBAAkB,MAAM,MAAM,MAAM,SAAS,GAAG,KAAK;;;;;;;;;;;"}
@@ -1,29 +1,29 @@
1
- import '../assets/NcDateTimePicker-AIJmp5dC.css';
1
+ import '../assets/NcDateTimePicker-pmbCzZnb.css';
2
2
  import { defineComponent, mergeModels, useModel, computed, createBlock, openBlock, unref, mergeProps, createSlots, withCtx, createVNode } from "vue";
3
3
  import { m as mdiChevronUp, a as mdiChevronDown, b as mdiChevronRight, c as mdiChevronLeft, d as mdiClock, e as mdiClose, f as mdiCalendarBlank } from "./mdi-zYpVOORa.mjs";
4
- import { getDayNamesMin, getFirstDay, getDayNames, getCanonicalLocale } from "@nextcloud/l10n";
5
- import { r as register, a as t } from "./_l10n-7kR7gXFc.mjs";
4
+ import { getCanonicalLocale, getDayNamesMin, getFirstDay, getDayNames } from "@nextcloud/l10n";
5
+ import { r as register, a as t } from "./_l10n-dinIMiE_.mjs";
6
6
  import VueDatePicker from "@vuepic/vue-datepicker";
7
- import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-BYTrkA66.mjs";
8
- import { N as NcTimezonePicker } from "./NcTimezonePicker-CMoUk4sZ.mjs";
7
+ import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-DZBRQNfG.mjs";
8
+ import { _ as _sfc_main$1 } from "./NcTimezonePicker.vue_vue_type_script_setup_true_lang-BK7HxZja.mjs";
9
9
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
10
10
  register();
11
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
12
12
  __name: "NcDateTimePicker",
13
13
  props: /* @__PURE__ */ mergeModels({
14
+ appendToBody: { type: Boolean },
14
15
  ariaLabel: { default: t("Datepicker input") },
15
16
  ariaLabelMenu: { default: t("Datepicker menu") },
16
17
  clearable: { type: Boolean },
17
18
  confirm: { type: Boolean },
18
- minuteStep: { default: 10 },
19
- format: { default: void 0 },
19
+ format: { type: [String, Function], default: void 0 },
20
20
  locale: { default: getCanonicalLocale() },
21
+ minuteStep: { default: 10 },
21
22
  modelValue: { default: void 0 },
22
23
  placeholder: { default: void 0 },
23
24
  showTimezoneSelect: { type: Boolean },
24
- type: { default: "date" },
25
- appendToBody: { type: Boolean },
26
- showWeekNumber: { type: Boolean }
25
+ showWeekNumber: { type: Boolean },
26
+ type: { default: "date" }
27
27
  }, {
28
28
  "timezoneId": { default: "UTC" },
29
29
  "timezoneIdModifiers": {}
@@ -35,14 +35,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35
35
  const emit = __emit;
36
36
  const value = computed(() => {
37
37
  if (props.modelValue === void 0 && props.clearable) {
38
- return props.modelValue;
38
+ return null;
39
39
  }
40
40
  if (props.type === "week") {
41
41
  const date = props.modelValue instanceof Date ? props.modelValue : /* @__PURE__ */ new Date();
42
42
  const end = new Date(date);
43
43
  end.setUTCDate(date.getUTCDate() + 6);
44
44
  return [date, end];
45
- } else if (props.type.startsWith("range")) {
45
+ } else if (props.type === "year") {
46
+ const date = props.modelValue instanceof Date ? props.modelValue : /* @__PURE__ */ new Date();
47
+ return date.getUTCFullYear();
48
+ } else if (props.type === "month") {
49
+ const date = props.modelValue instanceof Date ? props.modelValue : /* @__PURE__ */ new Date();
50
+ return { year: date.getUTCFullYear(), month: date.getUTCMonth() };
51
+ } else if (props.type === "time" || props.type === "time-range") {
52
+ const time = [props.modelValue ?? (props.type === "time-range" ? [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()] : /* @__PURE__ */ new Date())].flat();
53
+ if (props.modelValue === void 0 && props.type === "time-range") {
54
+ time[1].setHours(time[1].getHours() + 1);
55
+ }
56
+ const timeValue = time.map((date) => ({
57
+ hours: date.getHours(),
58
+ minutes: date.getMinutes(),
59
+ seconds: date.getSeconds()
60
+ }));
61
+ return props.type === "time" ? timeValue[0] : timeValue;
62
+ } else if (props.type.endsWith("-range")) {
46
63
  if (props.modelValue === void 0) {
47
64
  const start = /* @__PURE__ */ new Date();
48
65
  const end = new Date(start);
@@ -50,12 +67,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
67
  return [start, end];
51
68
  }
52
69
  return props.modelValue;
53
- } else if (props.type === "year") {
54
- const date = props.modelValue instanceof Date ? props.modelValue : /* @__PURE__ */ new Date();
55
- return date.getUTCFullYear();
56
- } else if (props.type === "month") {
57
- const date = props.modelValue instanceof Date ? props.modelValue : /* @__PURE__ */ new Date();
58
- return { year: date.getUTCFullYear(), month: date.getUTCMonth() };
59
70
  }
60
71
  return props.modelValue ?? /* @__PURE__ */ new Date();
61
72
  });
@@ -72,7 +83,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
72
83
  return t("Select month");
73
84
  } else if (props.type === "year") {
74
85
  return t("Select year");
75
- } else if (props.type.startsWith("range")) {
86
+ } else if (props.type.endsWith("-range")) {
76
87
  return t("Select time range");
77
88
  }
78
89
  return t("Select date and time");
@@ -80,39 +91,70 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
80
91
  const realFormat = computed(() => {
81
92
  if (props.format) {
82
93
  return props.format;
83
- } else if (props.type === "datetime" || props.type === "range-datetime") {
84
- return "yyyy-MM-dd HH:mm";
85
- } else if (props.type === "date" || props.type === "range") {
86
- return "yyyy-MM-dd";
87
94
  } else if (props.type === "week") {
88
95
  return "RR-II";
96
+ }
97
+ let formatter;
98
+ if (props.type === "date" || props.type === "date-range") {
99
+ formatter = new Intl.DateTimeFormat(getCanonicalLocale(), { dateStyle: "medium" });
100
+ } else if (props.type === "time" || props.type === "time-range") {
101
+ formatter = new Intl.DateTimeFormat(getCanonicalLocale(), { timeStyle: "short" });
102
+ } else if (props.type === "datetime" || props.type === "datetime-range") {
103
+ formatter = new Intl.DateTimeFormat(getCanonicalLocale(), { dateStyle: "medium", timeStyle: "short" });
89
104
  } else if (props.type === "month") {
90
- return "yyyy-MM";
105
+ formatter = new Intl.DateTimeFormat(getCanonicalLocale(), { year: "numeric", month: "2-digit" });
91
106
  } else if (props.type === "year") {
92
- return "yyyy";
107
+ formatter = new Intl.DateTimeFormat(getCanonicalLocale(), { year: "numeric" });
108
+ }
109
+ if (formatter) {
110
+ return (input) => Array.isArray(input) ? formatter.formatRange(input[0], input[1]) : formatter.format(input);
93
111
  }
94
112
  return void 0;
95
113
  });
96
114
  const pickerType = computed(() => ({
97
- timePicker: props.type === "time",
115
+ timePicker: props.type === "time" || props.type === "time-range",
98
116
  yearPicker: props.type === "year",
99
117
  monthPicker: props.type === "month",
100
118
  weekPicker: props.type === "week",
101
- range: props.type.startsWith("range"),
102
- enableTimePicker: !(props.type === "date" || props.type === "range"),
119
+ range: props.type.endsWith("-range") && {
120
+ // do not use partial ranges (meaning after selecting the start [Date, null] will be emitted)
121
+ // if this is needed someday we can enable it,
122
+ // but its not covered by our component interface (props / events) documentation so just disabled for now.
123
+ partialRange: false
124
+ },
125
+ enableTimePicker: !(props.type === "date" || props.type === "date-range"),
103
126
  flow: props.type === "datetime" ? ["calendar", "time"] : void 0
104
127
  }));
105
128
  function onUpdateModelValue(value2) {
106
- let date = value2;
107
- if (props.type === "month") {
129
+ if (value2 === null) {
130
+ return emit("update:modelValue", null);
131
+ }
132
+ if (props.type === "time") {
133
+ emit("update:modelValue", formatLibraryTime(value2));
134
+ } else if (props.type === "time-range") {
135
+ const start = formatLibraryTime(value2[0]);
136
+ const end = formatLibraryTime(value2[1]);
137
+ if (end.getTime() < start.getTime()) {
138
+ end.setDate(end.getDate() + 1);
139
+ }
140
+ emit("update:modelValue", [start, end]);
141
+ } else if (props.type === "month") {
108
142
  const data = value2;
109
- date = new Date(data.year, data.month, 1);
143
+ emit("update:modelValue", new Date(data.year, data.month, 1));
110
144
  } else if (props.type === "year") {
111
- date = new Date(value2, 0);
145
+ emit("update:modelValue", new Date(value2, 0));
112
146
  } else if (props.type === "week") {
113
- date = value2[0];
147
+ emit("update:modelValue", value2[0]);
148
+ } else {
149
+ emit("update:modelValue", value2);
114
150
  }
115
- emit("update:modelValue", date);
151
+ }
152
+ function formatLibraryTime(time) {
153
+ const date = /* @__PURE__ */ new Date();
154
+ date.setHours(time.hours);
155
+ date.setMinutes(time.minutes);
156
+ date.setSeconds(time.seconds);
157
+ return date;
116
158
  }
117
159
  const dayNames = getDayNamesMin();
118
160
  const weekStart = getFirstDay();
@@ -236,7 +278,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
236
278
  _ctx.showTimezoneSelect ? {
237
279
  name: "action-extra",
238
280
  fn: withCtx(() => [
239
- createVNode(NcTimezonePicker, {
281
+ createVNode(_sfc_main$1, {
240
282
  modelValue: timezoneId.value,
241
283
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => timezoneId.value = $event),
242
284
  class: "vue-date-time-picker__timezone",
@@ -250,8 +292,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
250
292
  };
251
293
  }
252
294
  });
253
- const NcDateTimePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-eeb02d1e"]]);
295
+ const NcDateTimePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-629e70a5"]]);
254
296
  export {
255
297
  NcDateTimePicker as N
256
298
  };
257
- //# sourceMappingURL=NcDateTimePicker-BzfuHym4.mjs.map
299
+ //# sourceMappingURL=NcDateTimePicker-BM9F_PSI.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcDateTimePicker-BM9F_PSI.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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C;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,6 +1,6 @@
1
1
  import '../assets/NcDateTimePickerNative-CdHLvH4A.css';
2
2
  import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
3
- import { S as ScopeComponent } from "./ScopeComponent-BWZEma4R.mjs";
3
+ import { S as ScopeComponent } from "./ScopeComponent-Cr_cohWX.mjs";
4
4
  import { createElementBlock, openBlock, createElementVNode, normalizeClass, toDisplayString, mergeProps } from "vue";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
6
6
  const inputDateTypes = ["date", "datetime-local", "month", "time", "week"];
@@ -200,4 +200,4 @@ const NcDateTimePickerNative = /* @__PURE__ */ _export_sfc(_sfc_main, [["render"
200
200
  export {
201
201
  NcDateTimePickerNative as N
202
202
  };
203
- //# sourceMappingURL=NcDateTimePickerNative-Dake1IML.mjs.map
203
+ //# sourceMappingURL=NcDateTimePickerNative-DoGQFKev.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcDateTimePickerNative-Dake1IML.mjs","sources":["../../src/components/NcDateTimePickerNative/NcDateTimePickerNative.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis components provides a wrapper around the native browser datetime picker. <br>\nThis is an input with some type of date e.g. https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type=datetime-local). <br>\nAll available types are: 'date', 'datetime-local', 'month', 'time' and 'week', please check them here: https://html.spec.whatwg.org/multipage/input.html# <br>\n\n### Examples\n\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<hr/>\n\t\t<div class=\"flex\">\n\t\t\t<NcSelect v-bind=\"props\" v-model=\"type\" />\n\t\t\t<NcDateTimePickerNative\n\t\t\t\tv-model=\"value\"\n\t\t\t\t:label=\"label\"\n\t\t\t\t:type=\"type\" />\n\t\t</div>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tprops: {\n\t\t\t\t\tclearable: false,\n\t\t\t\t\tinputLabel: 'Picker type',\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t'date',\n\t\t\t\t\t\t'datetime-local',\n\t\t\t\t\t\t'month',\n\t\t\t\t\t\t'time',\n\t\t\t\t\t\t'week',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\ttype: 'datetime-local',\n\t\t\t\tvalue: new Date(),\n\t\t\t\tlabel: 'Select a new date or time',\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style scoped>\n.flex {\n\tdisplay: flex;\n\tgap: 4px;\n}\n</style>\n```\n\n#### Usage: type='datetime-local' with min date and max date\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<NcDateTimePickerNative\n\t\t\tv-model=\"value\"\n\t\t\t:min=\"yesterdayDate\"\n\t\t\t:max=\"someDate\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"datetime-local\" />\n\t</div>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvalue: new Date(),\n\t\t\t\tlabel: 'Please select a new date',\n\t\t\t\tyesterdayDate: new Date(new Date().setDate(new Date().getDate() - 1)),\n\t\t\t\tsomeDate: new Date(new Date().setDate(new Date().getDate() + 7)),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"native-datetime-picker\">\n\t\t<label class=\"native-datetime-picker--label\"\n\t\t\t:class=\"{ 'hidden-visually': hideLabel }\"\n\t\t\t:for=\"id\">\n\t\t\t{{ label }}\n\t\t</label>\n\t\t<input :id=\"id\"\n\t\t\tclass=\"native-datetime-picker--input\"\n\t\t\t:class=\"inputClass\"\n\t\t\t:type=\"type\"\n\t\t\t:value=\"formattedValue\"\n\t\t\t:min=\"formattedMin\"\n\t\t\t:max=\"formattedMax\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@input=\"onInput\">\n\t</div>\n</template>\n\n<script>\nimport { createElementId } from '../../utils/createElementId.js'\nimport ScopeComponent from '../../utils/ScopeComponent.js'\n\nconst inputDateTypes = ['date', 'datetime-local', 'month', 'time', 'week']\n\nexport default ScopeComponent({\n\tname: 'NcDateTimePickerNative',\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * The date is – like the `Date` object in JavaScript – tied to UTC.\n\t\t * The selected time zone does not have an influence of the selected time and date value.\n\t\t * You have to translate the time yourself when you want to factor in time zones.\n\t\t * Pass null to clear the input field.\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: Date,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the input field\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => createElementId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\t\t/**\n\t\t * type attribute of the input field\n\t\t * default type: String\n\t\t * The type of the input element, it can be `date`, `datetime-local`, `month`, `time`, `week`\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date',\n\t\t\tvalidate: (name) => inputDateTypes.includes(name),\n\t\t},\n\t\t/**\n\t\t * text inside the label element\n\t\t * default type: String\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: 'Please choose a date',\n\t\t},\n\t\t/**\n\t\t * min attribute of the input field\n\t\t * default type: null\n\t\t */\n\t\tmin: {\n\t\t\ttype: [Date, Boolean],\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * max attribute of the input field\n\t\t * default type: null\n\t\t */\n\t\tmax: {\n\t\t\ttype: [Date, Boolean],\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Flag to hide the label\n\t\t * default type: String\n\t\t * The hidden input label for accessibility purposes.\n\t\t */\n\t\thideLabel: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Class to add to the input field.\n\t\t * Necessary to use NcDateTimePickerNative in the NcActionInput component.\n\t\t */\n\t\tinputClass: {\n\t\t\ttype: [Object, String],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:modelValue',\n\t],\n\n\tcomputed: {\n\t\tformattedValue() {\n\t\t\treturn this.formatValue(this.modelValue)\n\t\t},\n\t\tformattedMin() {\n\t\t\tif (this.min) {\n\t\t\t\treturn this.formatValue(this.min)\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\tformattedMax() {\n\t\t\tif (this.max) {\n\t\t\t\treturn this.formatValue(this.max)\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Handle the input event\n\t\t *\n\t\t * @param {InputEvent} $event input event payload\n\t\t * @return {Date|null} new chosen Date() or null\n\t\t */\n\t\tonInput($event) {\n\t\t\tif (isNaN($event.target.valueAsNumber)) {\n\t\t\t\t/**\n\t\t\t\t * Emitted when the input value changes\n\t\t\t\t *\n\t\t\t\t * @return {null} null value\n\t\t\t\t */\n\t\t\t\treturn this.$emit('update:modelValue', null)\n\t\t\t}\n\t\t\tif (this.type === 'time') {\n\t\t\t\tconst time = $event.target.value\n\t\t\t\tif (this.modelValue === '' || this.modelValue === null) {\n\t\t\t\t\t// this case is because of Chrome bug\n\t\t\t\t\tconst { yyyy, MM, dd } = this.getReadableDate(new Date())\n\t\t\t\t\t/**\n\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t *\n\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t */\n\t\t\t\t\treturn this.$emit('update:modelValue', new Date(`${yyyy}-${MM}-${dd}T${time}`))\n\t\t\t\t}\n\t\t\t\tconst { yyyy, MM, dd } = this.getReadableDate(this.modelValue)\n\t\t\t\t/**\n\t\t\t\t * Emitted when the input value changes\n\t\t\t\t *\n\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t */\n\t\t\t\treturn this.$emit('update:modelValue', new Date(`${yyyy}-${MM}-${dd}T${time}`))\n\t\t\t} else if (this.type === 'month') {\n\t\t\t\tconst MM = (new Date($event.target.value).getMonth() + 1).toString().padStart(2, '0')\n\t\t\t\tif (this.modelValue === '' || this.modelValue === null) {\n\t\t\t\t\tconst { yyyy, dd, hh, mm } = this.getReadableDate(new Date())\n\t\t\t\t\t/**\n\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t *\n\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t */\n\t\t\t\t\treturn this.$emit('update:modelValue', new Date(`${yyyy}-${MM}-${dd}T${hh}:${mm}`))\n\t\t\t\t}\n\t\t\t\tconst { yyyy, dd, hh, mm } = this.getReadableDate(this.modelValue)\n\t\t\t\t/**\n\t\t\t\t * Emitted when the input value changes\n\t\t\t\t *\n\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t */\n\t\t\t\treturn this.$emit('update:modelValue', new Date(`${yyyy}-${MM}-${dd}T${hh}:${mm}`))\n\t\t\t}\n\t\t\tconst timezoneOffsetSeconds = new Date($event.target.valueAsNumber).getTimezoneOffset() * 1000 * 60\n\t\t\tconst inputDateWithTimezone = $event.target.valueAsNumber + timezoneOffsetSeconds\n\t\t\t/**\n\t\t\t * Emitted when the input value changes\n\t\t\t *\n\t\t\t * @return {Date} new chosen Date()\n\t\t\t */\n\t\t\treturn this.$emit('update:modelValue', new Date(inputDateWithTimezone))\n\t\t},\n\t\t/**\n\t\t * Returns Object with string values of a Date\n\t\t *\n\t\t * @param {Date} value The selected value\n\t\t * @return {object|undefined}\n\t\t */\n\t\tgetReadableDate(value) {\n\t\t\tif (value instanceof Date) {\n\t\t\t\tconst yyyy = value.getFullYear().toString().padStart(4, '0')\n\t\t\t\tconst MM = (value.getMonth() + 1).toString().padStart(2, '0')\n\t\t\t\tconst dd = value.getDate().toString().padStart(2, '0')\n\t\t\t\tconst hh = value.getHours().toString().padStart(2, '0')\n\t\t\t\tconst mm = value.getMinutes().toString().padStart(2, '0')\n\n\t\t\t\treturn { yyyy, MM, dd, hh, mm }\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Returns preformatted value for the input field\n\t\t *\n\t\t * @param {Date} value The selected value\n\t\t * @return {string|undefined}\n\t\t */\n\t\tformatValue(value) {\n\t\t\tif (value instanceof Date) {\n\t\t\t\tconst { yyyy, MM, dd, hh, mm } = this.getReadableDate(value)\n\t\t\t\tif (this.type === 'datetime-local') {\n\t\t\t\t\treturn `${yyyy}-${MM}-${dd}T${hh}:${mm}`\n\t\t\t\t} else if (this.type === 'date') {\n\t\t\t\t\treturn `${yyyy}-${MM}-${dd}`\n\t\t\t\t} else if (this.type === 'month') {\n\t\t\t\t\treturn `${yyyy}-${MM}`\n\t\t\t\t} else if (this.type === 'time') {\n\t\t\t\t\treturn `${hh}:${mm}`\n\t\t\t\t} else if (this.type === 'week') {\n\t\t\t\t\tconst startDate = new Date(yyyy, 0, 1)\n\t\t\t\t\tconst daysSinceBeginningOfYear = Math.floor((value - startDate)\n\t\t\t\t\t\t/ (24 * 60 * 60 * 1000))\n\t\t\t\t\tconst weekNumber = Math.ceil(daysSinceBeginningOfYear / 7)\n\t\t\t\t\treturn `${yyyy}-W${weekNumber}`\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\t},\n})\n</script>\n\n<style lang=\"scss\" scoped>\n\t.native-datetime-picker {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\n\t.native-datetime-picker .native-datetime-picker--label {\n\t\tmargin-block-end: 2px;\n\t}\n\n\t.native-datetime-picker .native-datetime-picker--input {\n\t\t// If border width differs between focused and unfocused we need to compensate to prevent jumping\n\t\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t\twidth: 100%;\n\t\tflex: 0 0 auto;\n\t\tmargin: 0;\n\t\tpadding-inline-start: calc(var(--border-radius-large) + var(--input-border-width-offset));\n\t\tpadding-inline-end: calc(var(--default-grid-baseline) + var(--input-border-width-offset));\n\t\tborder: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);\n\n\t\t&:active:not([disabled]),\n\t\t&:hover:not([disabled]),\n\t\t&:focus:not([disabled]),\n\t\t&:focus-within:not([disabled]) {\n\t\t\tborder-color: var(--color-main-text);\n\t\t\tborder-width: var(--border-width-input-focused, 2px);\n\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\t\t\t// Reset padding offset when focused\n\t\t\t--input-border-width-offset: 0px;\n\t\t}\n\t}\n\n\t[data-theme-light],\n\t[data-themes*=light] {\n\t\t.native-datetime-picker--input {\n\t\t\tcolor-scheme: light;\n\t\t}\n\t}\n\n\t[data-theme-dark],\n\t[data-themes*=dark] {\n\t\t.native-datetime-picker--input {\n\t\t\tcolor-scheme: dark;\n\t\t}\n\t}\n\n\t[data-theme-default],\n\t[data-themes*=default] {\n\t\t@media (prefers-color-scheme: light) {\n\t\t\t.native-datetime-picker--input {\n\t\t\t\tcolor-scheme: light;\n\t\t\t}\n\t\t}\n\t\t@media (prefers-color-scheme: dark) {\n\t\t\t.native-datetime-picker--input {\n\t\t\t\tcolor-scheme: dark;\n\t\t\t}\n\t\t}\n\t}\n</style>\n"],"names":["yyyy","MM","dd","hh","mm","_openBlock","_createElementBlock","_createElementVNode","_normalizeClass","_toDisplayString","_mergeProps"],"mappings":";;;;AAgHA,MAAM,iBAAiB,CAAC,QAAQ,kBAAkB,SAAS,QAAQ,MAAM;AAEzE,MAAK,YAAa,eAAY;AAAA,EAC7B,MAAM;AAAA,EACN,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAON,YAAY;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAKD,IAAI;AAAA,MACH,MAAM;AAAA,MACN,SAAS,MAAM,gBAAiB;AAAA,MAChC,WAAW,QAAM,GAAG,KAAK,MAAM;AAAA,IAC/B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,MAAM;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU,CAAC,SAAS,eAAe,SAAS,IAAI;AAAA,IAChD;AAAA;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA;AAAA,IAKD,KAAK;AAAA,MACJ,MAAM,CAAC,MAAM,OAAO;AAAA,MACpB,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA;AAAA,IAKD,KAAK;AAAA,MACJ,MAAM,CAAC,MAAM,OAAO;AAAA,MACpB,SAAS;AAAA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AAA,UAAA;AAAA,IAgGEF,mBAQkB,SARlBG,WAQkB;AAAA,MARV,IAAI,KAAE;AAAA,MACb,OAAK,CAAC,iCACE,KAAU,UAAA;AAAA,MACjB,MAAM,KAAI;AAAA,MACV,OAAO,KAAc;AAAA,MACrB,KAAK,KAAY;AAAA,MACjB,KAAK,KAAY;AAAA,OACV,KAAM,QAAA;AAAA,MACb,gDAAO,KAAO,WAAA,KAAA,QAAA,GAAA,IAAA;AAAA,IAxGlB,CAAA,GAAA,MAAA,IAAA,UAAA;AAAA;;;"}
1
+ {"version":3,"file":"NcDateTimePickerNative-DoGQFKev.mjs","sources":["../../src/components/NcDateTimePickerNative/NcDateTimePickerNative.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis components provides a wrapper around the native browser datetime picker. <br>\nThis is an input with some type of date e.g. https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type=datetime-local). <br>\nAll available types are: 'date', 'datetime-local', 'month', 'time' and 'week', please check them here: https://html.spec.whatwg.org/multipage/input.html# <br>\n\n### Examples\n\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<hr/>\n\t\t<div class=\"flex\">\n\t\t\t<NcSelect v-bind=\"props\" v-model=\"type\" />\n\t\t\t<NcDateTimePickerNative\n\t\t\t\tv-model=\"value\"\n\t\t\t\t:label=\"label\"\n\t\t\t\t:type=\"type\" />\n\t\t</div>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tprops: {\n\t\t\t\t\tclearable: false,\n\t\t\t\t\tinputLabel: 'Picker type',\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t'date',\n\t\t\t\t\t\t'datetime-local',\n\t\t\t\t\t\t'month',\n\t\t\t\t\t\t'time',\n\t\t\t\t\t\t'week',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\ttype: 'datetime-local',\n\t\t\t\tvalue: new Date(),\n\t\t\t\tlabel: 'Select a new date or time',\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style scoped>\n.flex {\n\tdisplay: flex;\n\tgap: 4px;\n}\n</style>\n```\n\n#### Usage: type='datetime-local' with min date and max date\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<NcDateTimePickerNative\n\t\t\tv-model=\"value\"\n\t\t\t:min=\"yesterdayDate\"\n\t\t\t:max=\"someDate\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"datetime-local\" />\n\t</div>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvalue: new Date(),\n\t\t\t\tlabel: 'Please select a new date',\n\t\t\t\tyesterdayDate: new Date(new Date().setDate(new Date().getDate() - 1)),\n\t\t\t\tsomeDate: new Date(new Date().setDate(new Date().getDate() + 7)),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"native-datetime-picker\">\n\t\t<label class=\"native-datetime-picker--label\"\n\t\t\t:class=\"{ 'hidden-visually': hideLabel }\"\n\t\t\t:for=\"id\">\n\t\t\t{{ label }}\n\t\t</label>\n\t\t<input :id=\"id\"\n\t\t\tclass=\"native-datetime-picker--input\"\n\t\t\t:class=\"inputClass\"\n\t\t\t:type=\"type\"\n\t\t\t:value=\"formattedValue\"\n\t\t\t:min=\"formattedMin\"\n\t\t\t:max=\"formattedMax\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@input=\"onInput\">\n\t</div>\n</template>\n\n<script>\nimport { createElementId } from '../../utils/createElementId.js'\nimport ScopeComponent from '../../utils/ScopeComponent.js'\n\nconst inputDateTypes = ['date', 'datetime-local', 'month', 'time', 'week']\n\nexport default ScopeComponent({\n\tname: 'NcDateTimePickerNative',\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * The date is – like the `Date` object in JavaScript – tied to UTC.\n\t\t * The selected time zone does not have an influence of the selected time and date value.\n\t\t * You have to translate the time yourself when you want to factor in time zones.\n\t\t * Pass null to clear the input field.\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: Date,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the input field\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => createElementId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\t\t/**\n\t\t * type attribute of the input field\n\t\t * default type: String\n\t\t * The type of the input element, it can be `date`, `datetime-local`, `month`, `time`, `week`\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date',\n\t\t\tvalidate: (name) => inputDateTypes.includes(name),\n\t\t},\n\t\t/**\n\t\t * text inside the label element\n\t\t * default type: String\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: 'Please choose a date',\n\t\t},\n\t\t/**\n\t\t * min attribute of the input field\n\t\t * default type: null\n\t\t */\n\t\tmin: {\n\t\t\ttype: [Date, Boolean],\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * max attribute of the input field\n\t\t * default type: null\n\t\t */\n\t\tmax: {\n\t\t\ttype: [Date, Boolean],\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Flag to hide the label\n\t\t * default type: String\n\t\t * The hidden input label for accessibility purposes.\n\t\t */\n\t\thideLabel: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Class to add to the input field.\n\t\t * Necessary to use NcDateTimePickerNative in the NcActionInput component.\n\t\t */\n\t\tinputClass: {\n\t\t\ttype: [Object, String],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:modelValue',\n\t],\n\n\tcomputed: {\n\t\tformattedValue() {\n\t\t\treturn this.formatValue(this.modelValue)\n\t\t},\n\t\tformattedMin() {\n\t\t\tif (this.min) {\n\t\t\t\treturn this.formatValue(this.min)\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\tformattedMax() {\n\t\t\tif (this.max) {\n\t\t\t\treturn this.formatValue(this.max)\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Handle the input event\n\t\t *\n\t\t * @param {InputEvent} $event input event payload\n\t\t * @return {Date|null} new chosen Date() or null\n\t\t */\n\t\tonInput($event) {\n\t\t\tif (isNaN($event.target.valueAsNumber)) {\n\t\t\t\t/**\n\t\t\t\t * Emitted when the input value changes\n\t\t\t\t *\n\t\t\t\t * @return {null} null value\n\t\t\t\t */\n\t\t\t\treturn this.$emit('update:modelValue', null)\n\t\t\t}\n\t\t\tif (this.type === 'time') {\n\t\t\t\tconst time = $event.target.value\n\t\t\t\tif (this.modelValue === '' || this.modelValue === null) {\n\t\t\t\t\t// this case is because of Chrome bug\n\t\t\t\t\tconst { yyyy, MM, dd } = this.getReadableDate(new Date())\n\t\t\t\t\t/**\n\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t *\n\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t */\n\t\t\t\t\treturn this.$emit('update:modelValue', new Date(`${yyyy}-${MM}-${dd}T${time}`))\n\t\t\t\t}\n\t\t\t\tconst { yyyy, MM, dd } = this.getReadableDate(this.modelValue)\n\t\t\t\t/**\n\t\t\t\t * Emitted when the input value changes\n\t\t\t\t *\n\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t */\n\t\t\t\treturn this.$emit('update:modelValue', new Date(`${yyyy}-${MM}-${dd}T${time}`))\n\t\t\t} else if (this.type === 'month') {\n\t\t\t\tconst MM = (new Date($event.target.value).getMonth() + 1).toString().padStart(2, '0')\n\t\t\t\tif (this.modelValue === '' || this.modelValue === null) {\n\t\t\t\t\tconst { yyyy, dd, hh, mm } = this.getReadableDate(new Date())\n\t\t\t\t\t/**\n\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t *\n\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t */\n\t\t\t\t\treturn this.$emit('update:modelValue', new Date(`${yyyy}-${MM}-${dd}T${hh}:${mm}`))\n\t\t\t\t}\n\t\t\t\tconst { yyyy, dd, hh, mm } = this.getReadableDate(this.modelValue)\n\t\t\t\t/**\n\t\t\t\t * Emitted when the input value changes\n\t\t\t\t *\n\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t */\n\t\t\t\treturn this.$emit('update:modelValue', new Date(`${yyyy}-${MM}-${dd}T${hh}:${mm}`))\n\t\t\t}\n\t\t\tconst timezoneOffsetSeconds = new Date($event.target.valueAsNumber).getTimezoneOffset() * 1000 * 60\n\t\t\tconst inputDateWithTimezone = $event.target.valueAsNumber + timezoneOffsetSeconds\n\t\t\t/**\n\t\t\t * Emitted when the input value changes\n\t\t\t *\n\t\t\t * @return {Date} new chosen Date()\n\t\t\t */\n\t\t\treturn this.$emit('update:modelValue', new Date(inputDateWithTimezone))\n\t\t},\n\t\t/**\n\t\t * Returns Object with string values of a Date\n\t\t *\n\t\t * @param {Date} value The selected value\n\t\t * @return {object|undefined}\n\t\t */\n\t\tgetReadableDate(value) {\n\t\t\tif (value instanceof Date) {\n\t\t\t\tconst yyyy = value.getFullYear().toString().padStart(4, '0')\n\t\t\t\tconst MM = (value.getMonth() + 1).toString().padStart(2, '0')\n\t\t\t\tconst dd = value.getDate().toString().padStart(2, '0')\n\t\t\t\tconst hh = value.getHours().toString().padStart(2, '0')\n\t\t\t\tconst mm = value.getMinutes().toString().padStart(2, '0')\n\n\t\t\t\treturn { yyyy, MM, dd, hh, mm }\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Returns preformatted value for the input field\n\t\t *\n\t\t * @param {Date} value The selected value\n\t\t * @return {string|undefined}\n\t\t */\n\t\tformatValue(value) {\n\t\t\tif (value instanceof Date) {\n\t\t\t\tconst { yyyy, MM, dd, hh, mm } = this.getReadableDate(value)\n\t\t\t\tif (this.type === 'datetime-local') {\n\t\t\t\t\treturn `${yyyy}-${MM}-${dd}T${hh}:${mm}`\n\t\t\t\t} else if (this.type === 'date') {\n\t\t\t\t\treturn `${yyyy}-${MM}-${dd}`\n\t\t\t\t} else if (this.type === 'month') {\n\t\t\t\t\treturn `${yyyy}-${MM}`\n\t\t\t\t} else if (this.type === 'time') {\n\t\t\t\t\treturn `${hh}:${mm}`\n\t\t\t\t} else if (this.type === 'week') {\n\t\t\t\t\tconst startDate = new Date(yyyy, 0, 1)\n\t\t\t\t\tconst daysSinceBeginningOfYear = Math.floor((value - startDate)\n\t\t\t\t\t\t/ (24 * 60 * 60 * 1000))\n\t\t\t\t\tconst weekNumber = Math.ceil(daysSinceBeginningOfYear / 7)\n\t\t\t\t\treturn `${yyyy}-W${weekNumber}`\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\t},\n})\n</script>\n\n<style lang=\"scss\" scoped>\n\t.native-datetime-picker {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\n\t.native-datetime-picker .native-datetime-picker--label {\n\t\tmargin-block-end: 2px;\n\t}\n\n\t.native-datetime-picker .native-datetime-picker--input {\n\t\t// If border width differs between focused and unfocused we need to compensate to prevent jumping\n\t\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t\twidth: 100%;\n\t\tflex: 0 0 auto;\n\t\tmargin: 0;\n\t\tpadding-inline-start: calc(var(--border-radius-large) + var(--input-border-width-offset));\n\t\tpadding-inline-end: calc(var(--default-grid-baseline) + var(--input-border-width-offset));\n\t\tborder: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);\n\n\t\t&:active:not([disabled]),\n\t\t&:hover:not([disabled]),\n\t\t&:focus:not([disabled]),\n\t\t&:focus-within:not([disabled]) {\n\t\t\tborder-color: var(--color-main-text);\n\t\t\tborder-width: var(--border-width-input-focused, 2px);\n\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\t\t\t// Reset padding offset when focused\n\t\t\t--input-border-width-offset: 0px;\n\t\t}\n\t}\n\n\t[data-theme-light],\n\t[data-themes*=light] {\n\t\t.native-datetime-picker--input {\n\t\t\tcolor-scheme: light;\n\t\t}\n\t}\n\n\t[data-theme-dark],\n\t[data-themes*=dark] {\n\t\t.native-datetime-picker--input {\n\t\t\tcolor-scheme: dark;\n\t\t}\n\t}\n\n\t[data-theme-default],\n\t[data-themes*=default] {\n\t\t@media (prefers-color-scheme: light) {\n\t\t\t.native-datetime-picker--input {\n\t\t\t\tcolor-scheme: light;\n\t\t\t}\n\t\t}\n\t\t@media (prefers-color-scheme: dark) {\n\t\t\t.native-datetime-picker--input {\n\t\t\t\tcolor-scheme: dark;\n\t\t\t}\n\t\t}\n\t}\n</style>\n"],"names":["yyyy","MM","dd","hh","mm","_openBlock","_createElementBlock","_createElementVNode","_normalizeClass","_toDisplayString","_mergeProps"],"mappings":";;;;AAgHA,MAAM,iBAAiB,CAAC,QAAQ,kBAAkB,SAAS,QAAQ,MAAM;AAEzE,MAAK,YAAa,eAAY;AAAA,EAC7B,MAAM;AAAA,EACN,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAON,YAAY;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAKD,IAAI;AAAA,MACH,MAAM;AAAA,MACN,SAAS,MAAM,gBAAiB;AAAA,MAChC,WAAW,QAAM,GAAG,KAAK,MAAM;AAAA,IAC/B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,MAAM;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU,CAAC,SAAS,eAAe,SAAS,IAAI;AAAA,IAChD;AAAA;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA;A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YAeM;AAAA,IAdLC,mBAIQ,SAAA;AAAA,MAJD,OA3FTC,eAAA,CA2Fe,iCAA+B,EAAA,mBACd,KAAS,UAAA,CAAA,CAAA;AAAA,MACrC,KAAK,KAAE;AAAA,IACL,GAAAC,gBAAA,KAAA,KAAK,GA9FX,IAAA,UAAA;AAAA,IAgGEF,mBAQkB,SARlBG,WAQkB;AAAA,MARV,IAAI,KAAE;AAAA,MACb,OAAK,CAAC,iCACE,KAAU,UAAA;AAAA,MACjB,MAAM,KAAI;AAAA,MACV,OAAO,KAAc;AAAA,MACrB,KAAK,KAAY;AAAA,MACjB,KAAK,KAAY;AAAA,OACV,KAAM,QAAA;AAAA,MACb,gDAAO,KAAO,WAAA,KAAA,QAAA,GAAA,IAAA;AAAA,IAxGlB,CAAA,GAAA,MAAA,IAAA,UAAA;AAAA;;;"}
@@ -1,8 +1,8 @@
1
- import '../assets/NcDialog-Dkeikssh.css';
1
+ import '../assets/NcDialog-bP7Jt0ZE.css';
2
2
  import { useElementSize } from "@vueuse/core";
3
3
  import { defineComponent, ref, computed, resolveComponent, createBlock, createCommentVNode, openBlock, mergeProps, withCtx, createElementVNode, toDisplayString, resolveDynamicComponent, toHandlers, normalizeClass, createElementBlock, renderSlot, Fragment, renderList } from "vue";
4
4
  import NcModal from "../components/NcModal/index.mjs";
5
- import { _ as _sfc_main$1 } from "./NcDialogButton.vue_vue_type_script_setup_true_lang-BKrJ_xd8.mjs";
5
+ import { _ as _sfc_main$1 } from "./NcDialogButton.vue_vue_type_script_setup_true_lang-DR0Yn-dH.mjs";
6
6
  import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
7
7
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
8
8
  const _sfc_main = defineComponent({
@@ -166,7 +166,7 @@ const _sfc_main = defineComponent({
166
166
  default: ""
167
167
  }
168
168
  },
169
- emits: ["closing", "update:open", "submit"],
169
+ emits: ["closing", "update:open", "reset", "submit"],
170
170
  setup(props, { emit, slots }) {
171
171
  const wrapper = ref();
172
172
  const { width: dialogWidth } = useElementSize(wrapper, { width: 900, height: 0 });
@@ -208,10 +208,10 @@ const _sfc_main = defineComponent({
208
208
  handleClosing(result);
209
209
  window.setTimeout(() => handleClosed(), 300);
210
210
  }
211
- const handleClosing = (result) => {
211
+ function handleClosing(result) {
212
212
  showModal.value = false;
213
213
  emit("closing", result);
214
- };
214
+ }
215
215
  const handleClosed = () => {
216
216
  showModal.value = true;
217
217
  emit("update:open", false);
@@ -312,8 +312,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
312
312
  _: 3
313
313
  }, 16, ["onClose"])) : createCommentVNode("", true);
314
314
  }
315
- const NcDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-67fc9e13"]]);
315
+ const NcDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3709d2d3"]]);
316
316
  export {
317
317
  NcDialog as N
318
318
  };
319
- //# sourceMappingURL=NcDialog-_pc2BPHU.mjs.map
319
+ //# sourceMappingURL=NcDialog-CbXsHgYI.mjs.map