@nextcloud/vue 9.0.0-alpha.0 → 9.0.0-alpha.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.
- package/CHANGELOG.md +47 -1
- package/dist/Components/NcActionButton.cjs +1 -1
- package/dist/Components/NcActionButton.mjs +1 -1
- package/dist/Components/NcActionButtonGroup.cjs +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +1 -1
- package/dist/Components/NcActionCheckbox.cjs +1 -1
- package/dist/Components/NcActionCheckbox.mjs +1 -1
- package/dist/Components/NcActionInput.cjs +1 -1
- package/dist/Components/NcActionInput.mjs +1 -1
- package/dist/Components/NcActionLink.cjs +1 -1
- package/dist/Components/NcActionLink.mjs +1 -1
- package/dist/Components/NcActionRadio.cjs +1 -1
- package/dist/Components/NcActionRadio.mjs +1 -1
- package/dist/Components/NcActionRouter.cjs +1 -1
- package/dist/Components/NcActionRouter.mjs +1 -1
- package/dist/Components/NcActionText.cjs +1 -1
- package/dist/Components/NcActionText.mjs +1 -1
- package/dist/Components/NcActionTextEditable.cjs +1 -1
- package/dist/Components/NcActionTextEditable.mjs +1 -1
- package/dist/Components/NcActions.cjs +1 -1
- package/dist/Components/NcActions.mjs +1 -1
- package/dist/Components/NcAppContent.cjs +1 -1
- package/dist/Components/NcAppContent.mjs +1 -1
- package/dist/Components/NcAppNavigation.cjs +1 -1
- package/dist/Components/NcAppNavigation.mjs +1 -1
- package/dist/Components/NcAppNavigationCaption.cjs +1 -1
- package/dist/Components/NcAppNavigationCaption.mjs +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +1 -1
- package/dist/Components/NcAppNavigationNew.cjs +1 -1
- package/dist/Components/NcAppNavigationNew.mjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +1 -1
- package/dist/Components/NcAppSettingsSection.cjs +1 -1
- package/dist/Components/NcAppSettingsSection.mjs +1 -1
- package/dist/Components/NcAppSidebar.cjs +1 -1
- package/dist/Components/NcAppSidebar.mjs +1 -1
- package/dist/Components/NcAppSidebarTab.cjs +1 -1
- package/dist/Components/NcAppSidebarTab.mjs +1 -1
- package/dist/Components/NcAvatar.cjs +1 -1
- package/dist/Components/NcAvatar.mjs +1 -1
- package/dist/Components/NcBreadcrumb.cjs +1 -1
- package/dist/Components/NcBreadcrumb.mjs +1 -1
- package/dist/Components/NcBreadcrumbs.cjs +1 -1
- package/dist/Components/NcBreadcrumbs.mjs +1 -1
- package/dist/Components/NcButton.cjs +1 -1
- package/dist/Components/NcButton.mjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
- package/dist/Components/NcColorPicker.cjs +1 -1
- package/dist/Components/NcColorPicker.mjs +1 -1
- package/dist/Components/NcContent.cjs +1 -1
- package/dist/Components/NcContent.mjs +1 -1
- package/dist/Components/NcDashboardWidget.cjs +1 -1
- package/dist/Components/NcDashboardWidget.mjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
- package/dist/Components/NcDateTime.cjs +1 -1
- package/dist/Components/NcDateTime.mjs +1 -1
- package/dist/Components/NcDateTimePicker.cjs +1 -1
- package/dist/Components/NcDateTimePicker.mjs +1 -1
- package/dist/Components/NcDateTimePickerNative.cjs +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +1 -1
- package/dist/Components/NcDialog.cjs +1 -1
- package/dist/Components/NcDialog.mjs +1 -1
- package/dist/Components/NcDialogButton.cjs +1 -1
- package/dist/Components/NcDialogButton.mjs +1 -1
- package/dist/Components/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcHeaderMenu.cjs +1 -1
- package/dist/Components/NcHeaderMenu.mjs +1 -1
- package/dist/Components/NcIconSvgWrapper.cjs +1 -1
- package/dist/Components/NcIconSvgWrapper.mjs +1 -1
- package/dist/Components/NcInputField.cjs +1 -1
- package/dist/Components/NcInputField.mjs +1 -1
- package/dist/Components/NcListItem.cjs +1 -1
- package/dist/Components/NcListItem.mjs +1 -1
- package/dist/Components/NcListItemIcon.cjs +1 -1
- package/dist/Components/NcListItemIcon.mjs +1 -1
- package/dist/Components/NcModal.cjs +12 -11
- package/dist/Components/NcModal.cjs.map +1 -1
- package/dist/Components/NcModal.mjs +37 -36
- package/dist/Components/NcModal.mjs.map +1 -1
- package/dist/Components/NcNoteCard.cjs +1 -1
- package/dist/Components/NcNoteCard.mjs +1 -1
- package/dist/Components/NcPasswordField.cjs +1 -1
- package/dist/Components/NcPasswordField.mjs +1 -1
- package/dist/Components/NcPopover.cjs +1 -1
- package/dist/Components/NcPopover.mjs +1 -1
- package/dist/Components/NcProgressBar.cjs +1 -1
- package/dist/Components/NcProgressBar.mjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
- package/dist/Components/NcRichContenteditable.cjs +1 -1
- package/dist/Components/NcRichContenteditable.mjs +2 -2
- package/dist/Components/NcRichText.cjs +1 -1
- package/dist/Components/NcRichText.mjs +3 -3
- package/dist/Components/NcSelect.cjs +1 -1
- package/dist/Components/NcSelect.mjs +1 -1
- package/dist/Components/NcSelectTags.cjs +1 -1
- package/dist/Components/NcSelectTags.mjs +1 -1
- package/dist/Components/NcSettingsInputText.cjs +1 -1
- package/dist/Components/NcSettingsInputText.mjs +1 -1
- package/dist/Components/NcSettingsSection.cjs +1 -1
- package/dist/Components/NcSettingsSection.mjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
- package/dist/Components/NcTextArea.cjs +1 -1
- package/dist/Components/NcTextArea.mjs +1 -1
- package/dist/Components/NcTextField.cjs +1 -1
- package/dist/Components/NcTextField.mjs +1 -1
- package/dist/Components/NcTimezonePicker.cjs +1 -1
- package/dist/Components/NcTimezonePicker.mjs +1 -1
- package/dist/Components/NcUserBubble.cjs +1 -1
- package/dist/Components/NcUserBubble.mjs +1 -1
- package/dist/Components/NcUserStatusIcon.cjs +1 -1
- package/dist/Components/NcUserStatusIcon.mjs +1 -1
- package/dist/Components/NcVNodes.cjs +4 -3
- package/dist/Components/NcVNodes.cjs.map +1 -1
- package/dist/Components/NcVNodes.mjs +4 -3
- package/dist/Components/NcVNodes.mjs.map +1 -1
- package/dist/Directives/Linkify.cjs +5 -4
- package/dist/Directives/Linkify.cjs.map +1 -1
- package/dist/Directives/Linkify.mjs +6 -5
- package/dist/Directives/Linkify.mjs.map +1 -1
- package/dist/Functions/emoji.cjs +1 -1
- package/dist/Functions/emoji.mjs +1 -1
- package/dist/Functions/usernameToColor.cjs +1 -1
- package/dist/Functions/usernameToColor.mjs +1 -1
- package/dist/Mixins/richEditor.cjs +1 -1
- package/dist/Mixins/richEditor.mjs +1 -1
- package/dist/assets/{NcActionButton-p7spK21h.css → NcActionButton-De4wlKZH.css} +17 -17
- package/dist/assets/{NcActions-cEMOhd0g.css → NcActions-PR-7NI_x.css} +12 -12
- package/dist/assets/{NcAppContent--D5zvLsb.css → NcAppContent-kIkHd4VN.css} +1 -0
- package/dist/assets/{NcAppNavigationItem-V2jQd3bm.css → NcAppNavigationItem-_MHs9DEv.css} +14 -7
- package/dist/assets/{NcAppNavigationNewItem-MQBvffq9.css → NcAppNavigationNewItem-ue-H4LQY.css} +14 -7
- package/dist/assets/{NcAppNavigationToggle-egZffUzR.css → NcAppNavigationToggle-VrntFGdJ.css} +3 -3
- package/dist/assets/{NcAppSettingsDialog-F29bz2Yx.css → NcAppSettingsDialog-HOydlmNi.css} +16 -17
- package/dist/assets/{NcAppSidebar-QQPSZPo9.css → NcAppSidebar-UFABwmpX.css} +44 -44
- package/dist/assets/{NcAvatar-qgACiUer.css → NcAvatar-DCUiVghV.css} +27 -27
- package/dist/assets/{NcBreadcrumbs-liWjT068.css → NcBreadcrumbs-VKFJ9HrE.css} +7 -7
- package/dist/assets/{NcButton-fqTN6SJK.css → NcButton-rKJYdkZn.css} +43 -43
- package/dist/assets/{NcCheckboxRadioSwitch-P71iLdgD.css → NcCheckboxRadioSwitch-dNV4KgTO.css} +49 -47
- package/dist/assets/{NcColorPicker-88MDZrB0.css → NcColorPicker-FiFz1rof.css} +24 -24
- package/dist/assets/{NcContent-ZG2BJ837.css → NcContent-3Fl9j87E.css} +9 -9
- package/dist/assets/{NcDateTimePicker-SsDztIsS.css → NcDateTimePicker-CC5ocPIo.css} +10 -10
- package/dist/assets/{NcDateTimePickerNative-QBosiBWA.css → NcDateTimePickerNative-BeREqSH_.css} +19 -7
- package/dist/assets/{NcDialog-9-cx1V0y.css → NcDialog-IM0YIgKq.css} +30 -19
- package/dist/assets/{NcEmojiPicker-KRMyqbWg.css → NcEmojiPicker-nDpi1GKA.css} +6 -5
- package/dist/assets/{NcHeaderMenu-j8h_puZT.css → NcHeaderMenu-kKraSlS3.css} +15 -15
- package/dist/assets/{NcInputField-42mSa1zm.css → NcInputField-qx4Me7uJ.css} +39 -38
- package/dist/assets/{NcListItem--i7b67QY.css → NcListItem-RylkggkP.css} +49 -49
- package/dist/assets/{NcModal-DzsqMWSJ.css → NcModal-lgvjJTYz.css} +65 -65
- package/dist/assets/{NcNoteCard-OTfZqVvP.css → NcNoteCard-f0NZpwjL.css} +7 -7
- package/dist/assets/{NcRichContenteditable-nUZdQSMZ.css → NcRichContenteditable--bkjerM1.css} +13 -12
- package/dist/assets/{NcTextArea-6akBm4Ks.css → NcTextArea-Eqv_-5FR.css} +24 -23
- package/dist/assets/{referencePickerModal-G-NTZHL1.css → referencePickerModal-k5G-IS2z.css} +2 -2
- package/dist/chunks/{AlertCircleOutline-Q4EgxGNm.mjs → AlertCircleOutline-1fsF7za7.mjs} +6 -6
- package/dist/chunks/AlertCircleOutline-1fsF7za7.mjs.map +1 -0
- package/dist/chunks/{AlertCircleOutline-aU4Cu4IM.cjs → AlertCircleOutline-M7wVqz_-.cjs} +1 -1
- package/dist/chunks/AlertCircleOutline-M7wVqz_-.cjs.map +1 -0
- package/dist/chunks/{ArrowLeft-4DZMGcXE.cjs → ArrowLeft-arUkZZ3U.cjs} +4 -4
- package/dist/chunks/ArrowLeft-arUkZZ3U.cjs.map +1 -0
- package/dist/chunks/{ArrowLeft-LlLrrfss.mjs → ArrowLeft-uvAzhtxD.mjs} +4 -4
- package/dist/chunks/ArrowLeft-uvAzhtxD.mjs.map +1 -0
- package/dist/chunks/{ArrowRight-Fk_qtqpW.mjs → ArrowRight-6gYTXvBH.mjs} +4 -4
- package/dist/chunks/ArrowRight-6gYTXvBH.mjs.map +1 -0
- package/dist/chunks/{ArrowRight-mI4Fw0h2.cjs → ArrowRight-UxW1qyeX.cjs} +5 -5
- package/dist/chunks/ArrowRight-UxW1qyeX.cjs.map +1 -0
- package/dist/chunks/{Check-SlTPuUzR.cjs → Check-fwcsc82n.cjs} +4 -4
- package/dist/chunks/Check-fwcsc82n.cjs.map +1 -0
- package/dist/chunks/{Check-hentWFPd.mjs → Check-tQl0Vp18.mjs} +6 -6
- package/dist/chunks/Check-tQl0Vp18.mjs.map +1 -0
- package/dist/chunks/{ChevronDown-7w1_NWAd.cjs → ChevronDown-8tkFE94e.cjs} +4 -4
- package/dist/chunks/ChevronDown-8tkFE94e.cjs.map +1 -0
- package/dist/chunks/{ChevronDown-hP8YKVnf.mjs → ChevronDown-BxTx7hZm.mjs} +1 -1
- package/dist/chunks/ChevronDown-BxTx7hZm.mjs.map +1 -0
- package/dist/chunks/{ChevronRight-iDcqZ2Ih.cjs → ChevronRight-7GGKl2bX.cjs} +2 -2
- package/dist/chunks/ChevronRight-7GGKl2bX.cjs.map +1 -0
- package/dist/chunks/{ChevronRight-xEIO1OE7.mjs → ChevronRight-gF2cX9Cu.mjs} +4 -4
- package/dist/chunks/ChevronRight-gF2cX9Cu.mjs.map +1 -0
- package/dist/chunks/{Close-2nENZfbn.cjs → Close-e2vDvDm2.cjs} +7 -7
- package/dist/chunks/Close-e2vDvDm2.cjs.map +1 -0
- package/dist/chunks/{Close-4lZze_oD.mjs → Close-hKJ11hky.mjs} +5 -5
- package/dist/chunks/Close-hKJ11hky.mjs.map +1 -0
- package/dist/chunks/{DotsHorizontal-2GCivGee.mjs → DotsHorizontal-JfmEIGBo.mjs} +4 -4
- package/dist/chunks/DotsHorizontal-JfmEIGBo.mjs.map +1 -0
- package/dist/chunks/{DotsHorizontal-Ehuu1q0g.cjs → DotsHorizontal-z8LXg-4B.cjs} +4 -4
- package/dist/chunks/DotsHorizontal-z8LXg-4B.cjs.map +1 -0
- package/dist/chunks/{GenColors-avBT67Zu.mjs → GenColors-L7jWucCS.mjs} +3 -3
- package/dist/chunks/{GenColors-avBT67Zu.mjs.map → GenColors-L7jWucCS.mjs.map} +1 -1
- package/dist/chunks/{GenColors-ojnUsIA8.cjs → GenColors-vx_p2Tvw.cjs} +3 -3
- package/dist/chunks/{GenColors-ojnUsIA8.cjs.map → GenColors-vx_p2Tvw.cjs.map} +1 -1
- package/dist/chunks/{NcActionButton-TAhaLmwa.mjs → NcActionButton-VnbqrtOY.mjs} +15 -13
- package/dist/chunks/NcActionButton-VnbqrtOY.mjs.map +1 -0
- package/dist/chunks/{NcActionButton-G4OSfyii.cjs → NcActionButton-sJpgOVU9.cjs} +19 -17
- package/dist/chunks/NcActionButton-sJpgOVU9.cjs.map +1 -0
- package/dist/chunks/{NcActionButtonGroup-jTRjqpYM.cjs → NcActionButtonGroup-5PPiueIz.cjs} +2 -2
- package/dist/chunks/{NcActionButtonGroup-jTRjqpYM.cjs.map → NcActionButtonGroup-5PPiueIz.cjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-0hif9Dcf.mjs → NcActionButtonGroup-oFPVvd4U.mjs} +2 -2
- package/dist/chunks/{NcActionButtonGroup-0hif9Dcf.mjs.map → NcActionButtonGroup-oFPVvd4U.mjs.map} +1 -1
- package/dist/chunks/{NcActionCheckbox-PWAridhc.mjs → NcActionCheckbox-5-bIAzkC.mjs} +1 -1
- package/dist/chunks/{NcActionCheckbox-PWAridhc.mjs.map → NcActionCheckbox-5-bIAzkC.mjs.map} +1 -1
- package/dist/chunks/{NcActionCheckbox-Z4Wc9828.cjs → NcActionCheckbox-CUXJQss6.cjs} +1 -1
- package/dist/chunks/{NcActionCheckbox-Z4Wc9828.cjs.map → NcActionCheckbox-CUXJQss6.cjs.map} +1 -1
- package/dist/chunks/{NcActionInput-GuwDt73G.cjs → NcActionInput-of1oXP_n.cjs} +2 -2
- package/dist/chunks/{NcActionInput-GuwDt73G.cjs.map → NcActionInput-of1oXP_n.cjs.map} +1 -1
- package/dist/chunks/{NcActionInput-7-f1OPr6.mjs → NcActionInput-zg13uJ6x.mjs} +8 -8
- package/dist/chunks/{NcActionInput-7-f1OPr6.mjs.map → NcActionInput-zg13uJ6x.mjs.map} +1 -1
- package/dist/chunks/{NcActionLink-QLFtD_iF.cjs → NcActionLink-eBaRU5qY.cjs} +2 -2
- package/dist/chunks/{NcActionLink-QLFtD_iF.cjs.map → NcActionLink-eBaRU5qY.cjs.map} +1 -1
- package/dist/chunks/{NcActionLink-YllmwOrF.mjs → NcActionLink-pscYsQ_3.mjs} +2 -2
- package/dist/chunks/{NcActionLink-YllmwOrF.mjs.map → NcActionLink-pscYsQ_3.mjs.map} +1 -1
- package/dist/chunks/{NcActionRadio-DSBghCIA.mjs → NcActionRadio-1QLxEcfl.mjs} +1 -1
- package/dist/chunks/{NcActionRadio-DSBghCIA.mjs.map → NcActionRadio-1QLxEcfl.mjs.map} +1 -1
- package/dist/chunks/{NcActionRadio-1U50276u.cjs → NcActionRadio-3UkRsS6r.cjs} +1 -1
- package/dist/chunks/{NcActionRadio-1U50276u.cjs.map → NcActionRadio-3UkRsS6r.cjs.map} +1 -1
- package/dist/chunks/{NcActionRouter-vBYCxyc1.mjs → NcActionRouter-BsOXVKlY.mjs} +2 -2
- package/dist/chunks/{NcActionRouter-vBYCxyc1.mjs.map → NcActionRouter-BsOXVKlY.mjs.map} +1 -1
- package/dist/chunks/{NcActionRouter-Vg-BSvq7.cjs → NcActionRouter-c6pYto3T.cjs} +2 -2
- package/dist/chunks/{NcActionRouter-Vg-BSvq7.cjs.map → NcActionRouter-c6pYto3T.cjs.map} +1 -1
- package/dist/chunks/{NcActionText-p3Ew3r1G.mjs → NcActionText-9Ti6bh1b.mjs} +2 -2
- package/dist/chunks/{NcActionText-p3Ew3r1G.mjs.map → NcActionText-9Ti6bh1b.mjs.map} +1 -1
- package/dist/chunks/{NcActionText-aWTbDRVH.cjs → NcActionText-Sw_tMRaW.cjs} +2 -2
- package/dist/chunks/{NcActionText-aWTbDRVH.cjs.map → NcActionText-Sw_tMRaW.cjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-RUh3BjpU.cjs → NcActionTextEditable-faJIAtYw.cjs} +2 -2
- package/dist/chunks/{NcActionTextEditable-RUh3BjpU.cjs.map → NcActionTextEditable-faJIAtYw.cjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-PAn8Dpv4.mjs → NcActionTextEditable-xPb_cTMW.mjs} +3 -3
- package/dist/chunks/{NcActionTextEditable-PAn8Dpv4.mjs.map → NcActionTextEditable-xPb_cTMW.mjs.map} +1 -1
- package/dist/chunks/{NcActions-6Yv0De7D.mjs → NcActions-76CtOBCq.mjs} +160 -114
- package/dist/chunks/NcActions-76CtOBCq.mjs.map +1 -0
- package/dist/chunks/{NcActions-VJy75Dj8.cjs → NcActions-YpbmJ7hS.cjs} +160 -115
- package/dist/chunks/NcActions-YpbmJ7hS.cjs.map +1 -0
- package/dist/chunks/{NcAppContent-rV1EGzGY.mjs → NcAppContent-Tw5gNorr.mjs} +6 -6
- package/dist/chunks/{NcAppContent-rV1EGzGY.mjs.map → NcAppContent-Tw5gNorr.mjs.map} +1 -1
- package/dist/chunks/{NcAppContent-khCUrgDu.cjs → NcAppContent-mHc-Ms2b.cjs} +5 -5
- package/dist/chunks/{NcAppContent-khCUrgDu.cjs.map → NcAppContent-mHc-Ms2b.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-wvBM1j2_.mjs → NcAppNavigation-sY7HaHMv.mjs} +1 -1
- package/dist/chunks/{NcAppNavigation-wvBM1j2_.mjs.map → NcAppNavigation-sY7HaHMv.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-qnc3o3YP.cjs → NcAppNavigation-yEZ-RJA2.cjs} +1 -1
- package/dist/chunks/{NcAppNavigation-qnc3o3YP.cjs.map → NcAppNavigation-yEZ-RJA2.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-6SpoIhcW.cjs → NcAppNavigationCaption-XpbVXYKV.cjs} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-6SpoIhcW.cjs.map → NcAppNavigationCaption-XpbVXYKV.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-wnBg9gYq.mjs → NcAppNavigationCaption-pcyV3wRO.mjs} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-wnBg9gYq.mjs.map → NcAppNavigationCaption-pcyV3wRO.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-VR6oSt2q.mjs → NcAppNavigationItem-JLYTEgEH.mjs} +22 -22
- package/dist/chunks/NcAppNavigationItem-JLYTEgEH.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationItem-6kzsp9I8.cjs → NcAppNavigationItem-NE1UdZkS.cjs} +6 -6
- package/dist/chunks/NcAppNavigationItem-NE1UdZkS.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationNew-AamR4VD3.mjs → NcAppNavigationNew-6ZAJS_DY.mjs} +1 -1
- package/dist/chunks/{NcAppNavigationNew-AamR4VD3.mjs.map → NcAppNavigationNew-6ZAJS_DY.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNew-ae4GCKxx.cjs → NcAppNavigationNew-hmJL2IDR.cjs} +1 -1
- package/dist/chunks/{NcAppNavigationNew-ae4GCKxx.cjs.map → NcAppNavigationNew-hmJL2IDR.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-sZ0DdaXr.cjs → NcAppNavigationNewItem-MjsbS_dO.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-sZ0DdaXr.cjs.map → NcAppNavigationNewItem-MjsbS_dO.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-tSH06MX2.mjs → NcAppNavigationNewItem-NzRL8Uwy.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-tSH06MX2.mjs.map → NcAppNavigationNewItem-NzRL8Uwy.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-mYqB3vRb.cjs → NcAppNavigationSettings-DPeH305A.cjs} +2 -2
- package/dist/chunks/NcAppNavigationSettings-DPeH305A.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationSettings-giVx2sHN.mjs → NcAppNavigationSettings-LR3QCvNr.mjs} +2 -2
- package/dist/chunks/NcAppNavigationSettings-LR3QCvNr.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationToggle-DBCPaseG.mjs → NcAppNavigationToggle-SEvIEY16.mjs} +29 -20
- package/dist/chunks/NcAppNavigationToggle-SEvIEY16.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationToggle-cRUPsHZH.cjs → NcAppNavigationToggle-sXvQDqok.cjs} +17 -8
- package/dist/chunks/NcAppNavigationToggle-sXvQDqok.cjs.map +1 -0
- package/dist/chunks/{NcAppSettingsDialog-WvDTWMwC.cjs → NcAppSettingsDialog-HnYa47vg.cjs} +51 -44
- package/dist/chunks/{NcAppSettingsDialog-90cJBaTf.mjs.map → NcAppSettingsDialog-HnYa47vg.cjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-90cJBaTf.mjs → NcAppSettingsDialog-nbTWBbti.mjs} +65 -58
- package/dist/chunks/{NcAppSettingsDialog-WvDTWMwC.cjs.map → NcAppSettingsDialog-nbTWBbti.mjs.map} +1 -1
- package/dist/chunks/NcAppSettingsSection-LHcKgBpz.cjs +54 -0
- package/dist/chunks/{NcAppSettingsSection-wLClE1lO.cjs.map → NcAppSettingsSection-LHcKgBpz.cjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsSection-WcupJObJ.mjs → NcAppSettingsSection-a0Un2ZRv.mjs} +18 -15
- package/dist/chunks/{NcAppSettingsSection-WcupJObJ.mjs.map → NcAppSettingsSection-a0Un2ZRv.mjs.map} +1 -1
- package/dist/chunks/NcAppSidebar-Tvy0LplS.cjs +712 -0
- package/dist/chunks/NcAppSidebar-Tvy0LplS.cjs.map +1 -0
- package/dist/chunks/NcAppSidebar-xWMj1EI8.mjs +731 -0
- package/dist/chunks/NcAppSidebar-xWMj1EI8.mjs.map +1 -0
- package/dist/chunks/{NcAppSidebarTab-BeWt8Sdt.cjs → NcAppSidebarTab-oPHofCKq.cjs} +15 -14
- package/dist/chunks/{NcAppSidebarTab-BeWt8Sdt.cjs.map → NcAppSidebarTab-oPHofCKq.cjs.map} +1 -1
- package/dist/chunks/{NcAppSidebarTab--7BkDK9T.mjs → NcAppSidebarTab-sMoFkDTb.mjs} +13 -12
- package/dist/chunks/{NcAppSidebarTab--7BkDK9T.mjs.map → NcAppSidebarTab-sMoFkDTb.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-paLjF9Tc.mjs → NcAvatar-JsMCceHU.mjs} +110 -100
- package/dist/chunks/NcAvatar-JsMCceHU.mjs.map +1 -0
- package/dist/chunks/{NcAvatar-1MXwkOA2.cjs → NcAvatar-uPVG9WWg.cjs} +133 -123
- package/dist/chunks/NcAvatar-uPVG9WWg.cjs.map +1 -0
- package/dist/chunks/{NcBreadcrumb-X45pwcLq.cjs → NcBreadcrumb-7q3EEfcO.cjs} +3 -3
- package/dist/chunks/{NcBreadcrumb-X45pwcLq.cjs.map → NcBreadcrumb-7q3EEfcO.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-gB_hnDG_.mjs → NcBreadcrumb-Fr7J33Qv.mjs} +5 -5
- package/dist/chunks/{NcBreadcrumb-gB_hnDG_.mjs.map → NcBreadcrumb-Fr7J33Qv.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-Y8LRE6xz.cjs → NcBreadcrumbs-XVIsLfXn.cjs} +100 -96
- package/dist/chunks/NcBreadcrumbs-XVIsLfXn.cjs.map +1 -0
- package/dist/chunks/{NcBreadcrumbs-N7-Jj_ry.mjs → NcBreadcrumbs-ozezYXlM.mjs} +114 -110
- package/dist/chunks/NcBreadcrumbs-ozezYXlM.mjs.map +1 -0
- package/dist/chunks/{NcButton-Uxh-oARg.cjs → NcButton-7UKtzkX5.cjs} +73 -66
- package/dist/chunks/NcButton-7UKtzkX5.cjs.map +1 -0
- package/dist/chunks/{NcButton-nCkJxwsi.mjs → NcButton-YOXv3gFY.mjs} +73 -66
- package/dist/chunks/NcButton-YOXv3gFY.mjs.map +1 -0
- package/dist/chunks/{NcCheckboxRadioSwitch-Hi5ocuhB.cjs → NcCheckboxRadioSwitch-IA6Ssm8K.cjs} +22 -22
- package/dist/chunks/NcCheckboxRadioSwitch-IA6Ssm8K.cjs.map +1 -0
- package/dist/chunks/{NcCheckboxRadioSwitch-RgFq8ZUL.mjs → NcCheckboxRadioSwitch-NwTx_zgG.mjs} +80 -80
- package/dist/chunks/NcCheckboxRadioSwitch-NwTx_zgG.mjs.map +1 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_48c28b96_lang-togIrFzp.cjs +3 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_48c28b96_lang-togIrFzp.cjs.map +1 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_48c28b96_lang-yghIE9RS.mjs +3 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_48c28b96_lang-yghIE9RS.mjs.map +1 -0
- package/dist/chunks/{NcColorPicker-hS0KYrLP.mjs → NcColorPicker-DNy0FRJb.mjs} +42 -35
- package/dist/chunks/{NcColorPicker-hS0KYrLP.mjs.map → NcColorPicker-DNy0FRJb.mjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-rE3Dd7s7.cjs → NcColorPicker-i9PgTYBd.cjs} +26 -19
- package/dist/chunks/{NcColorPicker-rE3Dd7s7.cjs.map → NcColorPicker-i9PgTYBd.cjs.map} +1 -1
- package/dist/chunks/NcContent-HdbQCleH.mjs +111 -0
- package/dist/chunks/{NcContent-fGj1oSM5.cjs.map → NcContent-HdbQCleH.mjs.map} +1 -1
- package/dist/chunks/NcContent-MOEEa0z1.cjs +103 -0
- package/dist/chunks/{NcContent-CUWR0V-w.mjs.map → NcContent-MOEEa0z1.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-DC4_9Yv_.mjs → NcDashboardWidget-JGkvqDWC.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidget-DC4_9Yv_.mjs.map → NcDashboardWidget-JGkvqDWC.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-fnhMGIb6.cjs → NcDashboardWidget-qHSuK2yd.cjs} +1 -1
- package/dist/chunks/{NcDashboardWidget-fnhMGIb6.cjs.map → NcDashboardWidget-qHSuK2yd.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-0jGJ_5Nx.cjs → NcDashboardWidgetItem-fl92G4Pt.cjs} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-0jGJ_5Nx.cjs.map → NcDashboardWidgetItem-fl92G4Pt.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-TD0N9xlv.mjs → NcDashboardWidgetItem-oQGp29KO.mjs} +3 -3
- package/dist/chunks/{NcDashboardWidgetItem-TD0N9xlv.mjs.map → NcDashboardWidgetItem-oQGp29KO.mjs.map} +1 -1
- package/dist/chunks/{NcDateTime-EnQV6T52.mjs → NcDateTime-JYO8uPbb.mjs} +1 -1
- package/dist/chunks/{NcDateTime-EnQV6T52.mjs.map → NcDateTime-JYO8uPbb.mjs.map} +1 -1
- package/dist/chunks/{NcDateTime-m_WZoAvd.cjs → NcDateTime-T52KrH65.cjs} +1 -1
- package/dist/chunks/{NcDateTime-m_WZoAvd.cjs.map → NcDateTime-T52KrH65.cjs.map} +1 -1
- package/dist/chunks/{NcDateTimePicker-4edYzlVf.cjs → NcDateTimePicker-X2pCnTer.cjs} +36 -34
- package/dist/chunks/NcDateTimePicker-X2pCnTer.cjs.map +1 -0
- package/dist/chunks/{NcDateTimePicker-GHt3kJ7B.mjs → NcDateTimePicker-ahgVldMQ.mjs} +55 -53
- package/dist/chunks/NcDateTimePicker-ahgVldMQ.mjs.map +1 -0
- package/dist/chunks/{NcDateTimePickerNative-nDQjZSiZ.mjs → NcDateTimePickerNative-3Xru7_OT.mjs} +12 -12
- package/dist/chunks/{NcDateTimePickerNative-nDQjZSiZ.mjs.map → NcDateTimePickerNative-3Xru7_OT.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePickerNative-m30hv5MT.cjs → NcDateTimePickerNative-xSITuvpX.cjs} +13 -13
- package/dist/chunks/{NcDateTimePickerNative-m30hv5MT.cjs.map → NcDateTimePickerNative-xSITuvpX.cjs.map} +1 -1
- package/dist/chunks/{NcDialog-qsI2VY8S.cjs → NcDialog-BYXi2emF.cjs} +26 -24
- package/dist/chunks/NcDialog-BYXi2emF.cjs.map +1 -0
- package/dist/chunks/{NcDialog-eZWcoYL9.mjs → NcDialog-rTTTdaH3.mjs} +36 -34
- package/dist/chunks/NcDialog-rTTTdaH3.mjs.map +1 -0
- package/dist/chunks/NcDialogButton-37TPbyFs.cjs +73 -0
- package/dist/chunks/{NcDialogButton-Dou0EAc_.cjs.map → NcDialogButton-37TPbyFs.cjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-R-zAILHz.mjs → NcDialogButton-ax4NTfDU.mjs} +21 -20
- package/dist/chunks/{NcDialogButton-R-zAILHz.mjs.map → NcDialogButton-ax4NTfDU.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-84m02Stk.mjs → NcEmojiPicker-oWZ5anxp.mjs} +74 -71
- package/dist/chunks/NcEmojiPicker-oWZ5anxp.mjs.map +1 -0
- package/dist/chunks/{NcEmojiPicker-hxiKGEHb.cjs → NcEmojiPicker-tOE2N9VS.cjs} +68 -65
- package/dist/chunks/NcEmojiPicker-tOE2N9VS.cjs.map +1 -0
- package/dist/chunks/{NcHeaderMenu-yJJ4FWin.mjs → NcHeaderMenu-67JCzTGo.mjs} +44 -42
- package/dist/chunks/{NcHeaderMenu-Eo6rZDeL.cjs.map → NcHeaderMenu-67JCzTGo.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-Eo6rZDeL.cjs → NcHeaderMenu-TvFFSvGS.cjs} +30 -28
- package/dist/chunks/{NcHeaderMenu-yJJ4FWin.mjs.map → NcHeaderMenu-TvFFSvGS.cjs.map} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-gQnsseD2.mjs → NcIconSvgWrapper-ACaaN_pS.mjs} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-gQnsseD2.mjs.map → NcIconSvgWrapper-ACaaN_pS.mjs.map} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-rDMSblV4.cjs → NcIconSvgWrapper-_hHu9P_M.cjs} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-rDMSblV4.cjs.map → NcIconSvgWrapper-_hHu9P_M.cjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-3c-uWUuw.cjs → NcInputConfirmCancel-DYlc289d.cjs} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-3c-uWUuw.cjs.map → NcInputConfirmCancel-DYlc289d.cjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-cDJ5_L-Z.mjs → NcInputConfirmCancel-lmWu4ouW.mjs} +4 -4
- package/dist/chunks/{NcInputConfirmCancel-cDJ5_L-Z.mjs.map → NcInputConfirmCancel-lmWu4ouW.mjs.map} +1 -1
- package/dist/chunks/{NcInputField-9PAE2ONE.mjs → NcInputField-6pRWha3h.mjs} +7 -7
- package/dist/chunks/{NcInputField-dP-QARJo.cjs.map → NcInputField-6pRWha3h.mjs.map} +1 -1
- package/dist/chunks/{NcInputField-dP-QARJo.cjs → NcInputField-6vveMrmf.cjs} +5 -5
- package/dist/chunks/{NcInputField-9PAE2ONE.mjs.map → NcInputField-6vveMrmf.cjs.map} +1 -1
- package/dist/chunks/{NcListItem-iWTR4IZZ.cjs → NcListItem-3QDILDKr.cjs} +55 -53
- package/dist/chunks/NcListItem-3QDILDKr.cjs.map +1 -0
- package/dist/chunks/{NcListItem-gdczIybY.mjs → NcListItem-vkgu6Biu.mjs} +63 -61
- package/dist/chunks/NcListItem-vkgu6Biu.mjs.map +1 -0
- package/dist/chunks/{NcListItemIcon-XsKTtITp.mjs → NcListItemIcon-130Lt3dW.mjs} +32 -31
- package/dist/chunks/{NcListItemIcon-XsKTtITp.mjs.map → NcListItemIcon-130Lt3dW.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-FeNwaJy4.cjs → NcListItemIcon-dOvFvjqI.cjs} +29 -28
- package/dist/chunks/{NcListItemIcon-FeNwaJy4.cjs.map → NcListItemIcon-dOvFvjqI.cjs.map} +1 -1
- package/dist/chunks/{NcNoteCard-joOYqjyF.mjs → NcNoteCard-MnmgJvKD.mjs} +41 -39
- package/dist/chunks/NcNoteCard-MnmgJvKD.mjs.map +1 -0
- package/dist/chunks/{NcNoteCard-IAgTi5HW.cjs → NcNoteCard-ujnbiyLI.cjs} +20 -18
- package/dist/chunks/NcNoteCard-ujnbiyLI.cjs.map +1 -0
- package/dist/chunks/{NcPasswordField-QA6kIMu2.cjs → NcPasswordField-8rboJv29.cjs} +21 -21
- package/dist/chunks/NcPasswordField-8rboJv29.cjs.map +1 -0
- package/dist/chunks/{NcPasswordField-8NI5u7lk.mjs → NcPasswordField-RHelr3R-.mjs} +27 -27
- package/dist/chunks/NcPasswordField-RHelr3R-.mjs.map +1 -0
- package/dist/chunks/{NcPopover-sVfBFdPh.cjs → NcPopover-J0pw-klF.cjs} +31 -32
- package/dist/chunks/NcPopover-J0pw-klF.cjs.map +1 -0
- package/dist/chunks/{NcPopover-HwP68PjO.mjs → NcPopover-XgOWyuQF.mjs} +46 -47
- package/dist/chunks/NcPopover-XgOWyuQF.mjs.map +1 -0
- package/dist/chunks/{NcProgressBar-KvtCwl-0.mjs → NcProgressBar-1EANJyYJ.mjs} +2 -2
- package/dist/chunks/{NcProgressBar-KvtCwl-0.mjs.map → NcProgressBar-1EANJyYJ.mjs.map} +1 -1
- package/dist/chunks/{NcProgressBar-3p3Phbcw.cjs → NcProgressBar-zsehqkEw.cjs} +2 -2
- package/dist/chunks/{NcProgressBar-3p3Phbcw.cjs.map → NcProgressBar-zsehqkEw.cjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel--UoHihRf.mjs → NcRelatedResourcesPanel-NqDuh_7F.mjs} +24 -20
- package/dist/chunks/{NcRelatedResourcesPanel--UoHihRf.mjs.map → NcRelatedResourcesPanel-NqDuh_7F.mjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-oTY2g2gt.cjs → NcRelatedResourcesPanel-QgNIHnCY.cjs} +45 -41
- package/dist/chunks/{NcRelatedResourcesPanel-oTY2g2gt.cjs.map → NcRelatedResourcesPanel-QgNIHnCY.cjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-0x4AmYZf.cjs → NcRichContenteditable-L8aEJNGb.cjs} +28 -25
- package/dist/chunks/{NcRichContenteditable-rSquEMs2.mjs.map → NcRichContenteditable-L8aEJNGb.cjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-rSquEMs2.mjs → NcRichContenteditable-W0BnJp3x.mjs} +31 -28
- package/dist/chunks/{NcRichContenteditable-0x4AmYZf.cjs.map → NcRichContenteditable-W0BnJp3x.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-S8FLpGCe.cjs → NcRichText-91v7gJEe.cjs} +66 -54
- package/dist/chunks/NcRichText-91v7gJEe.cjs.map +1 -0
- package/dist/chunks/{NcRichText-_MNRVaQB.mjs → NcRichText-RTwlrmhz.mjs} +95 -83
- package/dist/chunks/NcRichText-RTwlrmhz.mjs.map +1 -0
- package/dist/chunks/{NcSelect-w_Gt1U72.mjs → NcSelect-HmmLuUCp.mjs} +63 -58
- package/dist/chunks/{NcSelect-9cM-OGdn.cjs.map → NcSelect-HmmLuUCp.mjs.map} +1 -1
- package/dist/chunks/{NcSelect-9cM-OGdn.cjs → NcSelect-P2FpWJBr.cjs} +46 -41
- package/dist/chunks/{NcSelect-w_Gt1U72.mjs.map → NcSelect-P2FpWJBr.cjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-vm5Fx2H5.cjs → NcSelectTags-HX8YbYwd.cjs} +2 -11
- package/dist/chunks/{NcSelectTags-vm5Fx2H5.cjs.map → NcSelectTags-HX8YbYwd.cjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-6F9oTRUw.mjs → NcSelectTags-ZoLcdmHG.mjs} +3 -12
- package/dist/chunks/{NcSelectTags-6F9oTRUw.mjs.map → NcSelectTags-ZoLcdmHG.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-KTYvd9zc.mjs → NcSettingsInputText-9TVSwO_s.mjs} +1 -1
- package/dist/chunks/{NcSettingsInputText-KTYvd9zc.mjs.map → NcSettingsInputText-9TVSwO_s.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-wY_R_c6S.cjs → NcSettingsInputText-oJ_c6sMr.cjs} +1 -1
- package/dist/chunks/{NcSettingsInputText-wY_R_c6S.cjs.map → NcSettingsInputText-oJ_c6sMr.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-2TP0NQPH.cjs → NcSettingsSection-W7Ieq32P.cjs} +7 -7
- package/dist/chunks/NcSettingsSection-W7Ieq32P.cjs.map +1 -0
- package/dist/chunks/{NcSettingsSection-dEPaFL2w.mjs → NcSettingsSection-bpmpu801.mjs} +2 -2
- package/dist/chunks/NcSettingsSection-bpmpu801.mjs.map +1 -0
- package/dist/chunks/{NcSettingsSelectGroup-JfvkEnNr.mjs → NcSettingsSelectGroup-HFDYgsw-.mjs} +5 -5
- package/dist/chunks/{NcSettingsSelectGroup-JfvkEnNr.mjs.map → NcSettingsSelectGroup-HFDYgsw-.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-p8cgn6pv.cjs → NcSettingsSelectGroup-UnB2ao3D.cjs} +4 -4
- package/dist/chunks/{NcSettingsSelectGroup-p8cgn6pv.cjs.map → NcSettingsSelectGroup-UnB2ao3D.cjs.map} +1 -1
- package/dist/chunks/{NcTextArea-hNPj4rEs.cjs → NcTextArea-QIkvyzz7.cjs} +7 -7
- package/dist/chunks/{NcTextArea-hNPj4rEs.cjs.map → NcTextArea-QIkvyzz7.cjs.map} +1 -1
- package/dist/chunks/{NcTextArea-dRgNOiSU.mjs → NcTextArea-SeSiP6Dy.mjs} +6 -6
- package/dist/chunks/{NcTextArea-dRgNOiSU.mjs.map → NcTextArea-SeSiP6Dy.mjs.map} +1 -1
- package/dist/chunks/{NcTextField-avDV7Ry_.mjs → NcTextField-qqwMB07_.mjs} +19 -19
- package/dist/chunks/NcTextField-qqwMB07_.mjs.map +1 -0
- package/dist/chunks/{NcTextField-bz_keSKF.cjs → NcTextField-zi19KqEm.cjs} +2 -2
- package/dist/chunks/NcTextField-zi19KqEm.cjs.map +1 -0
- package/dist/chunks/NcTimezonePicker-EPCmHeHy.mjs +3790 -0
- package/dist/chunks/{NcTimezonePicker-wLjOcbbU.mjs.map → NcTimezonePicker-EPCmHeHy.mjs.map} +1 -1
- package/dist/chunks/NcTimezonePicker-f6X4yiuj.cjs +3783 -0
- package/dist/chunks/{NcTimezonePicker-YNWJXRnl.cjs.map → NcTimezonePicker-f6X4yiuj.cjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-fA1TQtnx.mjs → NcUserBubble-Jw-rOju8.mjs} +17 -16
- package/dist/chunks/{NcUserBubble-fA1TQtnx.mjs.map → NcUserBubble-Jw-rOju8.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-epl-RDQa.cjs → NcUserBubble-NZeBFOmo.cjs} +23 -22
- package/dist/chunks/{NcUserBubble-epl-RDQa.cjs.map → NcUserBubble-NZeBFOmo.cjs.map} +1 -1
- package/dist/chunks/NcUserStatusIcon-b0xt-g7X.cjs +146 -0
- package/dist/chunks/{NcUserStatusIcon-swCHU0tl.cjs.map → NcUserStatusIcon-b0xt-g7X.cjs.map} +1 -1
- package/dist/chunks/NcUserStatusIcon-hmLq9dti.mjs +154 -0
- package/dist/chunks/{NcUserStatusIcon--z2VUZIt.mjs.map → NcUserStatusIcon-hmLq9dti.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-4ppIHwI4.cjs → ScopeComponent-Gzz2FMnQ.cjs} +1 -1
- package/dist/chunks/{ScopeComponent-4ppIHwI4.cjs.map → ScopeComponent-Gzz2FMnQ.cjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-KbEZrKGJ.mjs → ScopeComponent-mG7CSpxl.mjs} +1 -1
- package/dist/chunks/{ScopeComponent-KbEZrKGJ.mjs.map → ScopeComponent-mG7CSpxl.mjs.map} +1 -1
- package/dist/chunks/_l10n-Fl7RzbcZ.cjs +64 -0
- package/dist/chunks/_l10n-Fl7RzbcZ.cjs.map +1 -0
- package/dist/chunks/_l10n-uuAvfQgY.mjs +66 -0
- package/dist/chunks/_l10n-uuAvfQgY.mjs.map +1 -0
- package/dist/chunks/{actionGlobal-kyAHPMcH.cjs → actionGlobal-Cx6Fi9Pj.cjs} +4 -3
- package/dist/chunks/{actionGlobal-1onxXJwM.mjs.map → actionGlobal-Cx6Fi9Pj.cjs.map} +1 -1
- package/dist/chunks/{actionGlobal-1onxXJwM.mjs → actionGlobal-pi4JQ0yh.mjs} +4 -3
- package/dist/chunks/{actionGlobal-kyAHPMcH.cjs.map → actionGlobal-pi4JQ0yh.mjs.map} +1 -1
- package/dist/chunks/{actionText-WQ07UNmt.cjs → actionText-H_SIpDkO.cjs} +1 -1
- package/dist/chunks/{actionText-WQ07UNmt.cjs.map → actionText-H_SIpDkO.cjs.map} +1 -1
- package/dist/chunks/{actionText-IqPIFk1D.mjs → actionText-yZ-YQ_fz.mjs} +1 -1
- package/dist/chunks/{actionText-IqPIFk1D.mjs.map → actionText-yZ-YQ_fz.mjs.map} +1 -1
- package/dist/chunks/{emoji-mJIuLpNR.cjs → emoji-NrWIXNZ4.cjs} +7 -6
- package/dist/chunks/{emoji-mJIuLpNR.cjs.map → emoji-NrWIXNZ4.cjs.map} +1 -1
- package/dist/chunks/{emoji-tllD0Rvt.mjs → emoji-mEkenm2t.mjs} +4 -3
- package/dist/chunks/{emoji-tllD0Rvt.mjs.map → emoji-mEkenm2t.mjs.map} +1 -1
- package/dist/chunks/{index-NP8hZQhr.cjs → index-6mzaBTml.cjs} +8 -10
- package/dist/chunks/{index-NP8hZQhr.cjs.map → index-6mzaBTml.cjs.map} +1 -1
- package/dist/chunks/{index-hX7KRzaJ.mjs → index-clpvFjGU.mjs} +8 -10
- package/dist/chunks/{index-hX7KRzaJ.mjs.map → index-clpvFjGU.mjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-9sd4Ftja.mjs → referencePickerModal-Fu9pQBdT.mjs} +188 -173
- package/dist/chunks/referencePickerModal-Fu9pQBdT.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-gCkuVbeM.cjs → referencePickerModal-JVKOIVTG.cjs} +143 -128
- package/dist/chunks/referencePickerModal-JVKOIVTG.cjs.map +1 -0
- package/dist/chunks/{usernameToColor-t95If_mB.mjs → usernameToColor-YCPAFxlc.mjs} +1 -1
- package/dist/chunks/{usernameToColor-t95If_mB.mjs.map → usernameToColor-YCPAFxlc.mjs.map} +1 -1
- package/dist/chunks/{usernameToColor--FE9Dq8h.cjs → usernameToColor-r5M5P032.cjs} +1 -1
- package/dist/chunks/{usernameToColor--FE9Dq8h.cjs.map → usernameToColor-r5M5P032.cjs.map} +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +64 -64
- package/dist/src/components/NcActionButton/NcActionButton.vue.d.ts +8 -4
- package/dist/src/components/NcActions/NcActions.vue.d.ts +29 -7
- package/dist/src/components/NcAppNavigationToggle/NcAppNavigationToggle.vue.d.ts +14 -0
- package/dist/src/components/NcBreadcrumbs/NcBreadcrumbs.vue.d.ts +2 -3
- package/dist/src/components/NcButton/NcButton.vue.d.ts +1 -0
- package/dist/src/components/NcListItem/NcListItem.vue.d.ts +1 -1
- package/dist/src/components/NcRichText/NcReferenceList.vue.d.ts +9 -0
- package/dist/src/components/NcRichText/NcRichText.vue.d.ts +1 -1
- package/dist/vendor.LICENSE.txt +1 -1
- package/package.json +4 -3
- package/dist/chunks/AlertCircleOutline-Q4EgxGNm.mjs.map +0 -1
- package/dist/chunks/AlertCircleOutline-aU4Cu4IM.cjs.map +0 -1
- package/dist/chunks/ArrowLeft-4DZMGcXE.cjs.map +0 -1
- package/dist/chunks/ArrowLeft-LlLrrfss.mjs.map +0 -1
- package/dist/chunks/ArrowRight-Fk_qtqpW.mjs.map +0 -1
- package/dist/chunks/ArrowRight-mI4Fw0h2.cjs.map +0 -1
- package/dist/chunks/Check-SlTPuUzR.cjs.map +0 -1
- package/dist/chunks/Check-hentWFPd.mjs.map +0 -1
- package/dist/chunks/ChevronDown-7w1_NWAd.cjs.map +0 -1
- package/dist/chunks/ChevronDown-hP8YKVnf.mjs.map +0 -1
- package/dist/chunks/ChevronRight-iDcqZ2Ih.cjs.map +0 -1
- package/dist/chunks/ChevronRight-xEIO1OE7.mjs.map +0 -1
- package/dist/chunks/Close-2nENZfbn.cjs.map +0 -1
- package/dist/chunks/Close-4lZze_oD.mjs.map +0 -1
- package/dist/chunks/DotsHorizontal-2GCivGee.mjs.map +0 -1
- package/dist/chunks/DotsHorizontal-Ehuu1q0g.cjs.map +0 -1
- package/dist/chunks/NcActionButton-G4OSfyii.cjs.map +0 -1
- package/dist/chunks/NcActionButton-TAhaLmwa.mjs.map +0 -1
- package/dist/chunks/NcActions-6Yv0De7D.mjs.map +0 -1
- package/dist/chunks/NcActions-VJy75Dj8.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-6kzsp9I8.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-VR6oSt2q.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSettings-giVx2sHN.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSettings-mYqB3vRb.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationToggle-DBCPaseG.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationToggle-cRUPsHZH.cjs.map +0 -1
- package/dist/chunks/NcAppSettingsSection-wLClE1lO.cjs +0 -51
- package/dist/chunks/NcAppSidebar-19vWkj82.cjs +0 -706
- package/dist/chunks/NcAppSidebar-19vWkj82.cjs.map +0 -1
- package/dist/chunks/NcAppSidebar-yjd-HiUO.mjs +0 -725
- package/dist/chunks/NcAppSidebar-yjd-HiUO.mjs.map +0 -1
- package/dist/chunks/NcAvatar-1MXwkOA2.cjs.map +0 -1
- package/dist/chunks/NcAvatar-paLjF9Tc.mjs.map +0 -1
- package/dist/chunks/NcBreadcrumbs-N7-Jj_ry.mjs.map +0 -1
- package/dist/chunks/NcBreadcrumbs-Y8LRE6xz.cjs.map +0 -1
- package/dist/chunks/NcButton-Uxh-oARg.cjs.map +0 -1
- package/dist/chunks/NcButton-nCkJxwsi.mjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch-Hi5ocuhB.cjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch-RgFq8ZUL.mjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_c3135eb8_lang-RYt-H2PA.cjs +0 -3
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_c3135eb8_lang-RYt-H2PA.cjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_c3135eb8_lang-kB-352LR.mjs +0 -3
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_c3135eb8_lang-kB-352LR.mjs.map +0 -1
- package/dist/chunks/NcContent-CUWR0V-w.mjs +0 -156
- package/dist/chunks/NcContent-fGj1oSM5.cjs +0 -148
- package/dist/chunks/NcDateTimePicker-4edYzlVf.cjs.map +0 -1
- package/dist/chunks/NcDateTimePicker-GHt3kJ7B.mjs.map +0 -1
- package/dist/chunks/NcDialog-eZWcoYL9.mjs.map +0 -1
- package/dist/chunks/NcDialog-qsI2VY8S.cjs.map +0 -1
- package/dist/chunks/NcDialogButton-Dou0EAc_.cjs +0 -72
- package/dist/chunks/NcEmojiPicker-84m02Stk.mjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-hxiKGEHb.cjs.map +0 -1
- package/dist/chunks/NcListItem-gdczIybY.mjs.map +0 -1
- package/dist/chunks/NcListItem-iWTR4IZZ.cjs.map +0 -1
- package/dist/chunks/NcNoteCard-IAgTi5HW.cjs.map +0 -1
- package/dist/chunks/NcNoteCard-joOYqjyF.mjs.map +0 -1
- package/dist/chunks/NcPasswordField-8NI5u7lk.mjs.map +0 -1
- package/dist/chunks/NcPasswordField-QA6kIMu2.cjs.map +0 -1
- package/dist/chunks/NcPopover-HwP68PjO.mjs.map +0 -1
- package/dist/chunks/NcPopover-sVfBFdPh.cjs.map +0 -1
- package/dist/chunks/NcRichText-S8FLpGCe.cjs.map +0 -1
- package/dist/chunks/NcRichText-_MNRVaQB.mjs.map +0 -1
- package/dist/chunks/NcSettingsSection-2TP0NQPH.cjs.map +0 -1
- package/dist/chunks/NcSettingsSection-dEPaFL2w.mjs.map +0 -1
- package/dist/chunks/NcTextField-avDV7Ry_.mjs.map +0 -1
- package/dist/chunks/NcTextField-bz_keSKF.cjs.map +0 -1
- package/dist/chunks/NcTimezonePicker-YNWJXRnl.cjs +0 -7202
- package/dist/chunks/NcTimezonePicker-wLjOcbbU.mjs +0 -7209
- package/dist/chunks/NcUserStatusIcon--z2VUZIt.mjs +0 -171
- package/dist/chunks/NcUserStatusIcon-swCHU0tl.cjs +0 -163
- package/dist/chunks/_l10n-JmazR_zZ.mjs +0 -66
- package/dist/chunks/_l10n-JmazR_zZ.mjs.map +0 -1
- package/dist/chunks/_l10n-wK0o0jNS.cjs +0 -64
- package/dist/chunks/_l10n-wK0o0jNS.cjs.map +0 -1
- package/dist/chunks/referencePickerModal-9sd4Ftja.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-gCkuVbeM.cjs.map +0 -1
package/dist/chunks/{NcDashboardWidgetItem-0jGJ_5Nx.cjs → NcDashboardWidgetItem-fl92G4Pt.cjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var x = require("../assets/NcDashboardWidgetItem-S7fELANA.css");
|
|
2
|
-
const d = require("./NcAvatar-
|
|
2
|
+
const d = require("./NcAvatar-uPVG9WWg.cjs"), m = require("./NcActions-YpbmJ7hS.cjs"), v = require("./NcActionButton-sJpgOVU9.cjs"), e = require("vue"), f = require("./_plugin-vue_export-helper-xG2iG1wl.cjs"), g = {
|
|
3
3
|
name: "NcDashboardWidgetItem",
|
|
4
4
|
components: {
|
|
5
5
|
NcAvatar: d.NcAvatar,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDashboardWidgetItem-
|
|
1
|
+
{"version":3,"file":"NcDashboardWidgetItem-fl92G4Pt.cjs","sources":["../../src/components/NcDashboardWidgetItem/NcDashboardWidgetItem.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Julien Veyssier <eneiluj@posteo.net>\n -\n - @author Julien Veyssier <eneiluj@posteo.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\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 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: flex-start;\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-left: 8px;\n\t\tmax-height: 44px;\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\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: 27px -3px 0px -7px;\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-left: auto;\n\tmargin-right: auto;\n}\n.popover-container {\n\twidth: 100%;\n\theight: 0px;\n}\n*/\n</style>\n"],"names":["_sfc_main","NcAvatar","NcActions","NcActionButton","event","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_cache","$event","$data","$options","vue","$props","_ctx","m","menuItemId"],"mappings":";kNA+EAA,IAAA;AAAA;;IAGE,UAAAC,EAAA;AAAA,IACA,WAAAC,EAAA;AAAA,IACA,gBAAAC,EAAA;AAAA;EAGD,OAAA;AAAA;AAAA;AAAA;AAAA,IAIC,IAAA;AAAA,MACC,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA;;;;;;MAOA,SAAA;AAAA;;;;;;MAOA,SAAA;AAAA;;;;IAKD,gBAAA;AAAA;MAEC,SAAA;AAAA;;;;IAKD,gBAAA;AAAA;;;;;;IAOA,gBAA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mBAAA,MAAA,EAAA,OAAAC,EAAA,SAAA,GAAAD,EAAA,gBAAAC,EAAA,QAAA,GAAA,GAAAP,CAAA;AAAA;YAGM,OAAA;AAAA,YAAiB,OAAAO,EAAA;AAAA,UACnB,GAAAD,EAAA,gBAAAC,EAAA,OAAA,GAAA,GAAAN,CAAA;AAAA;;;UAGsB,cAAAM,EAAA;AAAA;UA1D9B,SAAAD,EAAA,QAAA,MAAA;AAAA,YA4DIA,EAAA,WAAAE,EAAA,QAAA,WAAA,CAAA,GAAA,MAAA;AAAA,eACCF,EAAA,UAAA,EAAA,GAAAA,EAAA,mBAAAA,EAAA,UAAA,MAAAA,EAAA,WAAAC,EAAA,UAAA,CAAAE,GAAAC;gBACE,KAAAA;AAAA;gBAEA,qBAAA;AAAA,gBACA,SAAAJ,EAAA,cAAA,CAAAH,MAAAK,EAAA,MAAAE,GAAAL,EAAA,IAAA,GAAA,CAAA,WAAA,MAAA,CAAA;AAAA;gBAjEP,SAAAC,EAAA,QAAA,MAAA;AAAA;;;;;;;iCAAAA,EAAA,mBAAA,IAAA,EAAA;AAAA;;;;;;;"}
|
package/dist/chunks/{NcDashboardWidgetItem-TD0N9xlv.mjs → NcDashboardWidgetItem-oQGp29KO.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../assets/NcDashboardWidgetItem-S7fELANA.css";
|
|
2
|
-
import { N as U } from "./NcAvatar-
|
|
3
|
-
import { N } from "./NcActions-
|
|
4
|
-
import { N as k } from "./NcActionButton-
|
|
2
|
+
import { N as U } from "./NcAvatar-JsMCceHU.mjs";
|
|
3
|
+
import { N } from "./NcActions-76CtOBCq.mjs";
|
|
4
|
+
import { N as k } from "./NcActionButton-VnbqrtOY.mjs";
|
|
5
5
|
import { resolveComponent as i, openBlock as r, createElementBlock as s, createBlock as l, resolveDynamicComponent as x, normalizeClass as I, withCtx as c, renderSlot as f, createVNode as b, createCommentVNode as g, createElementVNode as u, toDisplayString as d, Fragment as C, renderList as M, withModifiers as T, createTextVNode as A } from "vue";
|
|
6
6
|
import { _ as S } from "./_plugin-vue_export-helper-hUChTQA_.mjs";
|
|
7
7
|
const B = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDashboardWidgetItem-
|
|
1
|
+
{"version":3,"file":"NcDashboardWidgetItem-oQGp29KO.mjs","sources":["../../src/components/NcDashboardWidgetItem/NcDashboardWidgetItem.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Julien Veyssier <eneiluj@posteo.net>\n -\n - @author Julien Veyssier <eneiluj@posteo.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\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 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: flex-start;\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-left: 8px;\n\t\tmax-height: 44px;\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\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: 27px -3px 0px -7px;\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-left: auto;\n\tmargin-right: auto;\n}\n.popover-container {\n\twidth: 100%;\n\theight: 0px;\n}\n*/\n</style>\n"],"names":["_sfc_main","NcAvatar","NcActions","NcActionButton","event","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_cache","$event","$data","$options","withCtx","$props","createCommentVNode","createElementVNode","toDisplayString","renderSlot","_ctx","openBlock","createElementBlock","Fragment","renderList","m","menuItemId","withModifiers"],"mappings":";;;;;;AA+EA,MAAAA,IAAA;AAAA;;IAGE,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,gBAAAC;AAAA;EAGD,OAAA;AAAA;AAAA;AAAA;AAAA,IAIC,IAAA;AAAA,MACC,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA;;;;;;MAOA,SAAA;AAAA;;;;;;MAOA,SAAA;AAAA;;;;IAKD,gBAAA;AAAA;MAEC,SAAA;AAAA;;;;IAKD,gBAAA;AAAA;;;;;;IAOA,gBAAA;AAAA;MAEC,SAAA;AAAA;;;;IAKD,UAAA;AAAA;;;;;;IAOA,SAAA;AAAA;;;;;;IAOA,UAAA;AAAA;;;;;;;;;;;EAcD,OAAA;AACC,WAAA;AAAA;IAEA;AAAA;EAGD,UAAA;AAAA,IACC,OAAA;AACC,aAAA;AAAA;;;QAIC,gBAAA,KAAA;AAAA,QACA,gBAAA,KAAA;AAAA;QAEA,SAAA,KAAA;AAAA,MACD;AAAA;IAED,UAAA;AACC,aAAA,OAAA,KAAA,KAAA,QAAA,EAAA,WAAA,KAAA,CAAA,CAAA,KAAA,OAAA;AAAA;IAED,iBAAA;;;;EAKD,SAAA;AAAA,IACC,YAAAC,GAAA;AACC,MAAAA,EAAA,OAAA,QAAA,cAAA,KACCA,EAAA,eAAA;AAAA;;AAIJ,GAlMAC,IAAA,CAAA,KAAA,GAkDQC,IAAA,EAAA,OAAA,gBAAA,GAlDRC,IAAA,CAAA,OAAA,GAAAC,IAAA,CAAA,OAAA;;;;IA+BO,aAAAC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAAC,EAAA,UAAA;AAAA,IAA4B,cAAAF,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAAC,EAAA,UAAA;AAAA;;;;;MAK/B,SAAAC,EAAA;AAAA;MApCJ,SAAAC,EAAA,MAAA;AAAA;UAsCwB,WAAAC,EAAA;AAAA,UAAwB,gBAAAA,EAAA;AAAA;;YAClC,OAAA;AAAA,YACR,MAAA;AAAA,YACA,KAAAA,EAAA;AAAA,YACA,MAAAA,EAAA;AAAA,YACA,cAAAA,EAAA;AAAA,YACA,oBAAA,CAAAF,EAAA;AAAA;;;;UAGF,OAAA;AAAA,UACA,KAAA;AAAA,UACC,KAAAE,EAAA;AAAA,QAjDL,GAAA,MAAA,GAAAT,CAAA,KAAAU,EAAA,IAAA,EAAA;AAAA,QAkDGC,EAAA,OAAAV,GAAA;AAAA,UACCU,EAAA,MAAA,EAAA,OAAAF,EAAA,SAAA,GAAAG,EAAAH,EAAA,QAAA,GAAA,GAAAP,CAAA;AAAA;YAGM,OAAA;AAAA,YAAiB,OAAAO,EAAA;AAAA,UACnB,GAAAG,EAAAH,EAAA,OAAA,GAAA,GAAAN,CAAA;AAAA;;;UAGsB,cAAAM,EAAA;AAAA;UA1D9B,SAAAD,EAAA,MAAA;AAAA,YA4DIK,EAAAC,EAAA,QAAA,WAAA,CAAA,GAAA,MAAA;AAAA,eACCC,EAAA,EAAA,GAAAC,EAAAC,GAAA,MAAAC,EAAAT,EAAA,UAAA,CAAAU,GAAAC;gBACE,KAAAA;AAAA;gBAEA,qBAAA;AAAA,gBACA,SAAAC,EAAA,CAAAhB,MAAAS,EAAA,MAAAM,GAAAb,EAAA,IAAA,GAAA,CAAA,WAAA,MAAA,CAAA;AAAA;gBAjEP,SAAAC,EAAA,MAAA;AAAA;;;;;;;iCAAAE,EAAA,IAAA,EAAA;AAAA;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as T, unref as f, computed as s, watch as y, onMounted as _, onUnmounted as D, openBlock as S, createElementBlock as b, toDisplayString as F } from "vue";
|
|
2
2
|
import { getCanonicalLocale as g } from "@nextcloud/l10n";
|
|
3
|
-
import { r as I, j as N, a as d } from "./_l10n-
|
|
3
|
+
import { r as I, j as N, a as d } from "./_l10n-uuAvfQgY.mjs";
|
|
4
4
|
import { _ as k } from "./_plugin-vue_export-helper-hUChTQA_.mjs";
|
|
5
5
|
I(N);
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDateTime-EnQV6T52.mjs","sources":["../../src/composables/useFormatDateTime.js","../../src/components/NcDateTime/NcDateTime.vue"],"sourcesContent":["/**\n * @copyright Copyright (c) 2024 Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { getCanonicalLocale } from '@nextcloud/l10n'\nimport { computed, onUnmounted, ref, onMounted, watch, unref } from 'vue'\nimport { t } from '../l10n.js'\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\n/**\n * Composable for formatting time stamps using current users locale\n *\n * @param {Date | number | import('vue').Ref<Date> | import('vue').Ref<number>} timestamp Current timestamp\n * @param {object} opts Optional options\n * @param {Intl.DateTimeFormatOptions} opts.format The format used for displaying, or if relative time is used the format used for the title (optional)\n * @param {boolean} opts.ignoreSeconds Ignore seconds when displaying the relative time and just show `a few seconds ago`\n * @param {false | 'long' | 'short' | 'narrow'} opts.relativeTime Wether to display the timestamp as time from now (optional)\n */\nexport function useFormatDateTime(timestamp = Date.now(), opts = {}) {\n\t// Current time as Date.now is not reactive\n\tconst currentTime = ref(Date.now())\n\t// The interval ID for the window\n\tlet intervalId = null\n\n\tconst options = ref({\n\t\ttimeStyle: 'medium',\n\t\tdateStyle: 'short',\n\t\trelativeTime: 'long',\n\t\tignoreSeconds: false,\n\t\t...unref(opts),\n\t})\n\tconst wrappedOptions = computed(() => ({ ...unref(opts), ...options.value }))\n\n\t/** ECMA Date object of the timestamp */\n\tconst date = computed(() => new Date(unref(timestamp)))\n\n\tconst formattedFullTime = computed(() => {\n\t\tconst formatter = new Intl.DateTimeFormat(getCanonicalLocale(), wrappedOptions.value.format)\n\t\treturn formatter.format(date.value)\n\t})\n\n\t/** Time string formatted for main text */\n\tconst formattedTime = computed(() => {\n\t\tif (wrappedOptions.value.relativeTime !== false) {\n\t\t\tconst formatter = new Intl.RelativeTimeFormat(getCanonicalLocale(), { numeric: 'auto', style: wrappedOptions.value.relativeTime })\n\n\t\t\tconst diff = date.value - currentTime.value\n\t\t\tconst seconds = diff / 1000\n\t\t\tif (Math.abs(seconds) <= 90) {\n\t\t\t\tif (wrappedOptions.value.ignoreSeconds) {\n\t\t\t\t\treturn FEW_SECONDS_AGO[wrappedOptions.value.relativeTime]\n\t\t\t\t} else {\n\t\t\t\t\treturn formatter.format(Math.round(seconds), 'second')\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst minutes = seconds / 60\n\t\t\tif (Math.abs(minutes) <= 90) {\n\t\t\t\treturn formatter.format(Math.round(minutes), 'minute')\n\t\t\t}\n\t\t\tconst hours = minutes / 60\n\t\t\tif (Math.abs(hours) <= 24) {\n\t\t\t\treturn formatter.format(Math.round(hours), 'hour')\n\t\t\t}\n\t\t\tconst days = hours / 24\n\t\t\tif (Math.abs(days) <= 6) {\n\t\t\t\treturn formatter.format(Math.round(days), 'day')\n\t\t\t}\n\t\t\tconst weeks = days / 7\n\t\t\tif (Math.abs(weeks) <= 4) {\n\t\t\t\treturn formatter.format(Math.round(weeks), 'week')\n\t\t\t}\n\t\t\tconst months = days / 30\n\t\t\tif (Math.abs(months) <= 12) {\n\t\t\t\treturn formatter.format(Math.round(months), 'month')\n\t\t\t}\n\t\t\treturn formatter.format(Math.round(days / 365), 'year')\n\t\t}\n\t\treturn formattedFullTime\n\t})\n\n\t// Set or clear interval if relative time is dis/enabled\n\twatch([wrappedOptions], (opts) => {\n\t\twindow.clearInterval(intervalId)\n\t\tintervalId = undefined\n\t\tif (opts.relativeTime) {\n\t\t\tintervalId = window.setInterval(() => { currentTime.value = new Date() }, 1000)\n\t\t}\n\t})\n\n\t// Start the interval for setting the current time if relative time is enabled\n\tonMounted(() => {\n\t\tif (wrappedOptions.value.relativeTime !== false) {\n\t\t\tintervalId = window.setInterval(() => { currentTime.value = new Date() }, 1000)\n\t\t}\n\t})\n\n\t// ensure interval is cleared\n\tonUnmounted(() => {\n\t\twindow.clearInterval(intervalId)\n\t})\n\n\treturn {\n\t\tformattedTime,\n\t\tformattedFullTime,\n\t\toptions,\n\t}\n}\n","<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\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\">{{ formattedTime }}</span>\n</template>\n\n<script>\nimport { computed } from 'vue'\nimport { useFormatDateTime } from '../../composables/useFormatDateTime.js'\n\nexport default {\n\tname: 'NcDateTime',\n\n\tprops: {\n\t\t/**\n\t\t * The timestamp to display, either an unix timestamp (in milliseconds) or a Date object\n\t\t */\n\t\ttimestamp: {\n\t\t\ttype: [Date, Number],\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * The format used for displaying, or if relative time is used the format used for the title (optional)\n\t\t *\n\t\t * @type {Intl.DateTimeFormatOptions}\n\t\t */\n\t\tformat: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ timeStyle: 'medium', dateStyle: 'short' }),\n\t\t},\n\t\t/**\n\t\t * Wether to display the timestamp as time from now (optional)\n\t\t *\n\t\t * - `false`: Disable relative time\n\t\t * - `'long'`: Long text, like *2 seconds ago* (default)\n\t\t * - `'short'`: Short text, like *2 sec. ago*\n\t\t * - `'narrow'`: Even shorter text (same as `'short'` on some languages)\n\t\t */\n\t\trelativeTime: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: 'long',\n\t\t\tvalidator: (v) => v === false || ['long', 'short', 'narrow'].includes(v),\n\t\t},\n\t\t/**\n\t\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t\t */\n\t\tignoreSeconds: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\tconst timestamp = computed(() => props.timestamp)\n\t\tconst { formattedTime, formattedFullTime } = useFormatDateTime(timestamp, props)\n\t\treturn {\n\t\t\tformattedTime,\n\t\t\tformattedFullTime,\n\t\t}\n\t},\n}\n</script>\n"],"names":["FEW_SECONDS_AGO","t","useFormatDateTime","timestamp","opts","currentTime","ref","intervalId","options","unref","wrappedOptions","computed","date","formattedFullTime","getCanonicalLocale","formattedTime","formatter","seconds","minutes","hours","days","weeks","months","watch","onMounted","onUnmounted","_sfc_main","v","props","_hoisted_1","_createElementBlock","$props","$setup","_toDisplayString"],"mappings":";;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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MACP,MAAM;AAAA,MACN,SAAS,OAAO,EAAE,WAAW,UAAU,WAAW,QAAQ;AAAA,IAC1D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,cAAc;AAAA,MACb,MAAM,CAAC,SAAS,MAAM;AAAA,MACtB,SAAS;AAAA,MACT,WAAW,CAACC,MAAMA,MAAM,MAAS,CAAC,QAAQ,SAAS,QAAQ,EAAE,SAASA,CAAC;AAAA,IACvE;AAAA;AAAA;AAAA;AAAA,IAID,eAAe;AAAA,MACd,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA,EACD;AAAA,EAED,MAAMC,GAAO;AACZ,UAAMzB,IAAYQ,EAAS,MAAMiB,EAAM,SAAS,GAC1C,EAAE,eAAAb,GAAe,mBAAAF,EAAkB,IAAIX,EAAkBC,GAAWyB,CAAK;AAC/E,WAAO;AAAA,MACN,eAAAb;AAAA,MACA,mBAAAF;AAAA,IACD;AAAA,EACA;AACF,GAxKAgB,IAAA,CAAA,kBAAA,OAAA;;cA6GCC,EAEsD,QAAA;AAAA,IAFhD,OAAM;AAAA,IACV,kBAAgBC,EAAS;AAAA,IACzB,OAAOC,EAAiB;AAAA,EAAK,GAAAC,EAAAD,EAAA,aAAa,GA/G7C,GAAAH,CAAA;;;"}
|
|
1
|
+
{"version":3,"file":"NcDateTime-JYO8uPbb.mjs","sources":["../../src/composables/useFormatDateTime.js","../../src/components/NcDateTime/NcDateTime.vue"],"sourcesContent":["/**\n * @copyright Copyright (c) 2024 Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { getCanonicalLocale } from '@nextcloud/l10n'\nimport { computed, onUnmounted, ref, onMounted, watch, unref } from 'vue'\nimport { t } from '../l10n.js'\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\n/**\n * Composable for formatting time stamps using current users locale\n *\n * @param {Date | number | import('vue').Ref<Date> | import('vue').Ref<number>} timestamp Current timestamp\n * @param {object} opts Optional options\n * @param {Intl.DateTimeFormatOptions} opts.format The format used for displaying, or if relative time is used the format used for the title (optional)\n * @param {boolean} opts.ignoreSeconds Ignore seconds when displaying the relative time and just show `a few seconds ago`\n * @param {false | 'long' | 'short' | 'narrow'} opts.relativeTime Wether to display the timestamp as time from now (optional)\n */\nexport function useFormatDateTime(timestamp = Date.now(), opts = {}) {\n\t// Current time as Date.now is not reactive\n\tconst currentTime = ref(Date.now())\n\t// The interval ID for the window\n\tlet intervalId = null\n\n\tconst options = ref({\n\t\ttimeStyle: 'medium',\n\t\tdateStyle: 'short',\n\t\trelativeTime: 'long',\n\t\tignoreSeconds: false,\n\t\t...unref(opts),\n\t})\n\tconst wrappedOptions = computed(() => ({ ...unref(opts), ...options.value }))\n\n\t/** ECMA Date object of the timestamp */\n\tconst date = computed(() => new Date(unref(timestamp)))\n\n\tconst formattedFullTime = computed(() => {\n\t\tconst formatter = new Intl.DateTimeFormat(getCanonicalLocale(), wrappedOptions.value.format)\n\t\treturn formatter.format(date.value)\n\t})\n\n\t/** Time string formatted for main text */\n\tconst formattedTime = computed(() => {\n\t\tif (wrappedOptions.value.relativeTime !== false) {\n\t\t\tconst formatter = new Intl.RelativeTimeFormat(getCanonicalLocale(), { numeric: 'auto', style: wrappedOptions.value.relativeTime })\n\n\t\t\tconst diff = date.value - currentTime.value\n\t\t\tconst seconds = diff / 1000\n\t\t\tif (Math.abs(seconds) <= 90) {\n\t\t\t\tif (wrappedOptions.value.ignoreSeconds) {\n\t\t\t\t\treturn FEW_SECONDS_AGO[wrappedOptions.value.relativeTime]\n\t\t\t\t} else {\n\t\t\t\t\treturn formatter.format(Math.round(seconds), 'second')\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst minutes = seconds / 60\n\t\t\tif (Math.abs(minutes) <= 90) {\n\t\t\t\treturn formatter.format(Math.round(minutes), 'minute')\n\t\t\t}\n\t\t\tconst hours = minutes / 60\n\t\t\tif (Math.abs(hours) <= 24) {\n\t\t\t\treturn formatter.format(Math.round(hours), 'hour')\n\t\t\t}\n\t\t\tconst days = hours / 24\n\t\t\tif (Math.abs(days) <= 6) {\n\t\t\t\treturn formatter.format(Math.round(days), 'day')\n\t\t\t}\n\t\t\tconst weeks = days / 7\n\t\t\tif (Math.abs(weeks) <= 4) {\n\t\t\t\treturn formatter.format(Math.round(weeks), 'week')\n\t\t\t}\n\t\t\tconst months = days / 30\n\t\t\tif (Math.abs(months) <= 12) {\n\t\t\t\treturn formatter.format(Math.round(months), 'month')\n\t\t\t}\n\t\t\treturn formatter.format(Math.round(days / 365), 'year')\n\t\t}\n\t\treturn formattedFullTime\n\t})\n\n\t// Set or clear interval if relative time is dis/enabled\n\twatch([wrappedOptions], (opts) => {\n\t\twindow.clearInterval(intervalId)\n\t\tintervalId = undefined\n\t\tif (opts.relativeTime) {\n\t\t\tintervalId = window.setInterval(() => { currentTime.value = new Date() }, 1000)\n\t\t}\n\t})\n\n\t// Start the interval for setting the current time if relative time is enabled\n\tonMounted(() => {\n\t\tif (wrappedOptions.value.relativeTime !== false) {\n\t\t\tintervalId = window.setInterval(() => { currentTime.value = new Date() }, 1000)\n\t\t}\n\t})\n\n\t// ensure interval is cleared\n\tonUnmounted(() => {\n\t\twindow.clearInterval(intervalId)\n\t})\n\n\treturn {\n\t\tformattedTime,\n\t\tformattedFullTime,\n\t\toptions,\n\t}\n}\n","<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\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\">{{ formattedTime }}</span>\n</template>\n\n<script>\nimport { computed } from 'vue'\nimport { useFormatDateTime } from '../../composables/useFormatDateTime.js'\n\nexport default {\n\tname: 'NcDateTime',\n\n\tprops: {\n\t\t/**\n\t\t * The timestamp to display, either an unix timestamp (in milliseconds) or a Date object\n\t\t */\n\t\ttimestamp: {\n\t\t\ttype: [Date, Number],\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * The format used for displaying, or if relative time is used the format used for the title (optional)\n\t\t *\n\t\t * @type {Intl.DateTimeFormatOptions}\n\t\t */\n\t\tformat: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ timeStyle: 'medium', dateStyle: 'short' }),\n\t\t},\n\t\t/**\n\t\t * Wether to display the timestamp as time from now (optional)\n\t\t *\n\t\t * - `false`: Disable relative time\n\t\t * - `'long'`: Long text, like *2 seconds ago* (default)\n\t\t * - `'short'`: Short text, like *2 sec. ago*\n\t\t * - `'narrow'`: Even shorter text (same as `'short'` on some languages)\n\t\t */\n\t\trelativeTime: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: 'long',\n\t\t\tvalidator: (v) => v === false || ['long', 'short', 'narrow'].includes(v),\n\t\t},\n\t\t/**\n\t\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t\t */\n\t\tignoreSeconds: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\tconst timestamp = computed(() => props.timestamp)\n\t\tconst { formattedTime, formattedFullTime } = useFormatDateTime(timestamp, props)\n\t\treturn {\n\t\t\tformattedTime,\n\t\t\tformattedFullTime,\n\t\t}\n\t},\n}\n</script>\n"],"names":["FEW_SECONDS_AGO","t","useFormatDateTime","timestamp","opts","currentTime","ref","intervalId","options","unref","wrappedOptions","computed","date","formattedFullTime","getCanonicalLocale","formattedTime","formatter","seconds","minutes","hours","days","weeks","months","watch","onMounted","onUnmounted","_sfc_main","v","props","_hoisted_1","_createElementBlock","$props","$setup","_toDisplayString"],"mappings":";;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BA,MAAMA,IAAkB;AAAA,EACvB,MAAMC,EAAE,mBAAmB;AAAA,EAC3B,OAAOA,EAAE,aAAa;AAAA;AAAA,EACtB,QAAQA,EAAE,UAAU;AAAA;AACrB;AAWO,SAASC,EAAkBC,IAAY,KAAK,IAAG,GAAIC,IAAO,CAAA,GAAI;AAEpE,QAAMC,IAAcC,EAAI,KAAK,IAAG,CAAE;AAElC,MAAIC,IAAa;AAEjB,QAAMC,IAAUF,EAAI;AAAA,IACnB,WAAW;AAAA,IACX,WAAW;AAAA,IACX,cAAc;AAAA,IACd,eAAe;AAAA,IACf,GAAGG,EAAML,CAAI;AAAA,EACf,CAAE,GACKM,IAAiBC,EAAS,OAAO,EAAE,GAAGF,EAAML,CAAI,GAAG,GAAGI,EAAQ,MAAK,EAAG,GAGtEI,IAAOD,EAAS,MAAM,IAAI,KAAKF,EAAMN,CAAS,CAAC,CAAC,GAEhDU,IA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,IACD;AAAA,EACA;AACF,GAxKAgB,IAAA,CAAA,kBAAA,OAAA;;cA6GCC,EAEsD,QAAA;AAAA,IAFhD,OAAM;AAAA,IACV,kBAAgBC,EAAS;AAAA,IACzB,OAAOC,EAAiB;AAAA,EAAK,GAAAC,EAAAD,EAAA,aAAa,GA/G7C,GAAAH,CAAA;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const e = require("vue"), w = require("@nextcloud/l10n"), m = require("./_l10n-
|
|
2
|
+
const e = require("vue"), w = require("@nextcloud/l10n"), m = require("./_l10n-Fl7RzbcZ.cjs"), _ = require("./_plugin-vue_export-helper-xG2iG1wl.cjs");
|
|
3
3
|
m.register(m.t2);
|
|
4
4
|
/**
|
|
5
5
|
* @copyright Copyright (c) 2024 Ferdinand Thiessen <opensource@fthiessen.de>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDateTime-m_WZoAvd.cjs","sources":["../../src/composables/useFormatDateTime.js","../../src/components/NcDateTime/NcDateTime.vue"],"sourcesContent":["/**\n * @copyright Copyright (c) 2024 Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { getCanonicalLocale } from '@nextcloud/l10n'\nimport { computed, onUnmounted, ref, onMounted, watch, unref } from 'vue'\nimport { t } from '../l10n.js'\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\n/**\n * Composable for formatting time stamps using current users locale\n *\n * @param {Date | number | import('vue').Ref<Date> | import('vue').Ref<number>} timestamp Current timestamp\n * @param {object} opts Optional options\n * @param {Intl.DateTimeFormatOptions} opts.format The format used for displaying, or if relative time is used the format used for the title (optional)\n * @param {boolean} opts.ignoreSeconds Ignore seconds when displaying the relative time and just show `a few seconds ago`\n * @param {false | 'long' | 'short' | 'narrow'} opts.relativeTime Wether to display the timestamp as time from now (optional)\n */\nexport function useFormatDateTime(timestamp = Date.now(), opts = {}) {\n\t// Current time as Date.now is not reactive\n\tconst currentTime = ref(Date.now())\n\t// The interval ID for the window\n\tlet intervalId = null\n\n\tconst options = ref({\n\t\ttimeStyle: 'medium',\n\t\tdateStyle: 'short',\n\t\trelativeTime: 'long',\n\t\tignoreSeconds: false,\n\t\t...unref(opts),\n\t})\n\tconst wrappedOptions = computed(() => ({ ...unref(opts), ...options.value }))\n\n\t/** ECMA Date object of the timestamp */\n\tconst date = computed(() => new Date(unref(timestamp)))\n\n\tconst formattedFullTime = computed(() => {\n\t\tconst formatter = new Intl.DateTimeFormat(getCanonicalLocale(), wrappedOptions.value.format)\n\t\treturn formatter.format(date.value)\n\t})\n\n\t/** Time string formatted for main text */\n\tconst formattedTime = computed(() => {\n\t\tif (wrappedOptions.value.relativeTime !== false) {\n\t\t\tconst formatter = new Intl.RelativeTimeFormat(getCanonicalLocale(), { numeric: 'auto', style: wrappedOptions.value.relativeTime })\n\n\t\t\tconst diff = date.value - currentTime.value\n\t\t\tconst seconds = diff / 1000\n\t\t\tif (Math.abs(seconds) <= 90) {\n\t\t\t\tif (wrappedOptions.value.ignoreSeconds) {\n\t\t\t\t\treturn FEW_SECONDS_AGO[wrappedOptions.value.relativeTime]\n\t\t\t\t} else {\n\t\t\t\t\treturn formatter.format(Math.round(seconds), 'second')\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst minutes = seconds / 60\n\t\t\tif (Math.abs(minutes) <= 90) {\n\t\t\t\treturn formatter.format(Math.round(minutes), 'minute')\n\t\t\t}\n\t\t\tconst hours = minutes / 60\n\t\t\tif (Math.abs(hours) <= 24) {\n\t\t\t\treturn formatter.format(Math.round(hours), 'hour')\n\t\t\t}\n\t\t\tconst days = hours / 24\n\t\t\tif (Math.abs(days) <= 6) {\n\t\t\t\treturn formatter.format(Math.round(days), 'day')\n\t\t\t}\n\t\t\tconst weeks = days / 7\n\t\t\tif (Math.abs(weeks) <= 4) {\n\t\t\t\treturn formatter.format(Math.round(weeks), 'week')\n\t\t\t}\n\t\t\tconst months = days / 30\n\t\t\tif (Math.abs(months) <= 12) {\n\t\t\t\treturn formatter.format(Math.round(months), 'month')\n\t\t\t}\n\t\t\treturn formatter.format(Math.round(days / 365), 'year')\n\t\t}\n\t\treturn formattedFullTime\n\t})\n\n\t// Set or clear interval if relative time is dis/enabled\n\twatch([wrappedOptions], (opts) => {\n\t\twindow.clearInterval(intervalId)\n\t\tintervalId = undefined\n\t\tif (opts.relativeTime) {\n\t\t\tintervalId = window.setInterval(() => { currentTime.value = new Date() }, 1000)\n\t\t}\n\t})\n\n\t// Start the interval for setting the current time if relative time is enabled\n\tonMounted(() => {\n\t\tif (wrappedOptions.value.relativeTime !== false) {\n\t\t\tintervalId = window.setInterval(() => { currentTime.value = new Date() }, 1000)\n\t\t}\n\t})\n\n\t// ensure interval is cleared\n\tonUnmounted(() => {\n\t\twindow.clearInterval(intervalId)\n\t})\n\n\treturn {\n\t\tformattedTime,\n\t\tformattedFullTime,\n\t\toptions,\n\t}\n}\n","<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\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\">{{ formattedTime }}</span>\n</template>\n\n<script>\nimport { computed } from 'vue'\nimport { useFormatDateTime } from '../../composables/useFormatDateTime.js'\n\nexport default {\n\tname: 'NcDateTime',\n\n\tprops: {\n\t\t/**\n\t\t * The timestamp to display, either an unix timestamp (in milliseconds) or a Date object\n\t\t */\n\t\ttimestamp: {\n\t\t\ttype: [Date, Number],\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * The format used for displaying, or if relative time is used the format used for the title (optional)\n\t\t *\n\t\t * @type {Intl.DateTimeFormatOptions}\n\t\t */\n\t\tformat: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ timeStyle: 'medium', dateStyle: 'short' }),\n\t\t},\n\t\t/**\n\t\t * Wether to display the timestamp as time from now (optional)\n\t\t *\n\t\t * - `false`: Disable relative time\n\t\t * - `'long'`: Long text, like *2 seconds ago* (default)\n\t\t * - `'short'`: Short text, like *2 sec. ago*\n\t\t * - `'narrow'`: Even shorter text (same as `'short'` on some languages)\n\t\t */\n\t\trelativeTime: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: 'long',\n\t\t\tvalidator: (v) => v === false || ['long', 'short', 'narrow'].includes(v),\n\t\t},\n\t\t/**\n\t\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t\t */\n\t\tignoreSeconds: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\tconst timestamp = computed(() => props.timestamp)\n\t\tconst { formattedTime, formattedFullTime } = useFormatDateTime(timestamp, props)\n\t\treturn {\n\t\t\tformattedTime,\n\t\t\tformattedFullTime,\n\t\t}\n\t},\n}\n</script>\n"],"names":["FEW_SECONDS_AGO","t","useFormatDateTime","timestamp","opts","currentTime","ref","intervalId","options","unref","wrappedOptions","computed","date","formattedFullTime","getCanonicalLocale","formattedTime","formatter","seconds","minutes","hours","days","weeks","months","watch","onMounted","onUnmounted","_sfc_main","v","props","_hoisted_1","_createElementBlock","$props","$setup","_toDisplayString"],"mappings":";;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BA,MAAMA,IAAkB;AAAA,EACvB,MAAMC,EAAC,EAAC,mBAAmB;AAAA,EAC3B,OAAOA,EAAC,EAAC,aAAa;AAAA;AAAA,EACtB,QAAQA,EAAC,EAAC,UAAU;AAAA;AACrB;AAWO,SAASC,EAAkBC,IAAY,KAAK,IAAG,GAAIC,IAAO,CAAA,GAAI;AAEpE,QAAMC,IAAcC,EAAAA,IAAI,KAAK,IAAG,CAAE;AAElC,MAAIC,IAAa;AAEjB,QAAMC,IAAUF,EAAAA,IAAI;AAAA,IACnB,WAAW;AAAA,IACX,WAAW;AAAA,IACX,cAAc;AAAA,IACd,eAAe;AAAA,IACf,GAAGG,EAAAA,MAAML,CAAI;AAAA,EACf,CAAE,GACKM,IAAiBC,WAAS,OAAO,EAAE,GAAGF,EAAAA,MAAML,CAAI,GAAG,GAAGI,EAAQ,MAAK,EAAG,GAGtEI,IAAOD,EAAAA,SAAS,MAAM,IAAI,KAAKF,EAAK,MAACN,CAAS,CAAC,CAAC,GAEhDU,IAAoBF,EAAAA,SAAS,MAChB,IAAI,KAAK,eAAeG,EAAkB,mBAAA,GAAIJ,EAAe,MAAM,MAAM,EAC1E,OAAOE,EAAK,KAAK,CAClC,GAGKG,IAAgBJ,EAAAA,SAAS,MAAM;AACpC,QAAID,EAAe,MAAM,iBAAiB,IAAO;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AAAA,IACzB,OAAOC,EAAiB;AAAA,EAAK,GAAAC,EAAAA,gBAAAD,EAAA,aAAa,GA/G7C,GAAAH,CAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcDateTime-T52KrH65.cjs","sources":["../../src/composables/useFormatDateTime.js","../../src/components/NcDateTime/NcDateTime.vue"],"sourcesContent":["/**\n * @copyright Copyright (c) 2024 Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { getCanonicalLocale } from '@nextcloud/l10n'\nimport { computed, onUnmounted, ref, onMounted, watch, unref } from 'vue'\nimport { t } from '../l10n.js'\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\n/**\n * Composable for formatting time stamps using current users locale\n *\n * @param {Date | number | import('vue').Ref<Date> | import('vue').Ref<number>} timestamp Current timestamp\n * @param {object} opts Optional options\n * @param {Intl.DateTimeFormatOptions} opts.format The format used for displaying, or if relative time is used the format used for the title (optional)\n * @param {boolean} opts.ignoreSeconds Ignore seconds when displaying the relative time and just show `a few seconds ago`\n * @param {false | 'long' | 'short' | 'narrow'} opts.relativeTime Wether to display the timestamp as time from now (optional)\n */\nexport function useFormatDateTime(timestamp = Date.now(), opts = {}) {\n\t// Current time as Date.now is not reactive\n\tconst currentTime = ref(Date.now())\n\t// The interval ID for the window\n\tlet intervalId = null\n\n\tconst options = ref({\n\t\ttimeStyle: 'medium',\n\t\tdateStyle: 'short',\n\t\trelativeTime: 'long',\n\t\tignoreSeconds: false,\n\t\t...unref(opts),\n\t})\n\tconst wrappedOptions = computed(() => ({ ...unref(opts), ...options.value }))\n\n\t/** ECMA Date object of the timestamp */\n\tconst date = computed(() => new Date(unref(timestamp)))\n\n\tconst formattedFullTime = computed(() => {\n\t\tconst formatter = new Intl.DateTimeFormat(getCanonicalLocale(), wrappedOptions.value.format)\n\t\treturn formatter.format(date.value)\n\t})\n\n\t/** Time string formatted for main text */\n\tconst formattedTime = computed(() => {\n\t\tif (wrappedOptions.value.relativeTime !== false) {\n\t\t\tconst formatter = new Intl.RelativeTimeFormat(getCanonicalLocale(), { numeric: 'auto', style: wrappedOptions.value.relativeTime })\n\n\t\t\tconst diff = date.value - currentTime.value\n\t\t\tconst seconds = diff / 1000\n\t\t\tif (Math.abs(seconds) <= 90) {\n\t\t\t\tif (wrappedOptions.value.ignoreSeconds) {\n\t\t\t\t\treturn FEW_SECONDS_AGO[wrappedOptions.value.relativeTime]\n\t\t\t\t} else {\n\t\t\t\t\treturn formatter.format(Math.round(seconds), 'second')\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst minutes = seconds / 60\n\t\t\tif (Math.abs(minutes) <= 90) {\n\t\t\t\treturn formatter.format(Math.round(minutes), 'minute')\n\t\t\t}\n\t\t\tconst hours = minutes / 60\n\t\t\tif (Math.abs(hours) <= 24) {\n\t\t\t\treturn formatter.format(Math.round(hours), 'hour')\n\t\t\t}\n\t\t\tconst days = hours / 24\n\t\t\tif (Math.abs(days) <= 6) {\n\t\t\t\treturn formatter.format(Math.round(days), 'day')\n\t\t\t}\n\t\t\tconst weeks = days / 7\n\t\t\tif (Math.abs(weeks) <= 4) {\n\t\t\t\treturn formatter.format(Math.round(weeks), 'week')\n\t\t\t}\n\t\t\tconst months = days / 30\n\t\t\tif (Math.abs(months) <= 12) {\n\t\t\t\treturn formatter.format(Math.round(months), 'month')\n\t\t\t}\n\t\t\treturn formatter.format(Math.round(days / 365), 'year')\n\t\t}\n\t\treturn formattedFullTime\n\t})\n\n\t// Set or clear interval if relative time is dis/enabled\n\twatch([wrappedOptions], (opts) => {\n\t\twindow.clearInterval(intervalId)\n\t\tintervalId = undefined\n\t\tif (opts.relativeTime) {\n\t\t\tintervalId = window.setInterval(() => { currentTime.value = new Date() }, 1000)\n\t\t}\n\t})\n\n\t// Start the interval for setting the current time if relative time is enabled\n\tonMounted(() => {\n\t\tif (wrappedOptions.value.relativeTime !== false) {\n\t\t\tintervalId = window.setInterval(() => { currentTime.value = new Date() }, 1000)\n\t\t}\n\t})\n\n\t// ensure interval is cleared\n\tonUnmounted(() => {\n\t\twindow.clearInterval(intervalId)\n\t})\n\n\treturn {\n\t\tformattedTime,\n\t\tformattedFullTime,\n\t\toptions,\n\t}\n}\n","<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\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\">{{ formattedTime }}</span>\n</template>\n\n<script>\nimport { computed } from 'vue'\nimport { useFormatDateTime } from '../../composables/useFormatDateTime.js'\n\nexport default {\n\tname: 'NcDateTime',\n\n\tprops: {\n\t\t/**\n\t\t * The timestamp to display, either an unix timestamp (in milliseconds) or a Date object\n\t\t */\n\t\ttimestamp: {\n\t\t\ttype: [Date, Number],\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * The format used for displaying, or if relative time is used the format used for the title (optional)\n\t\t *\n\t\t * @type {Intl.DateTimeFormatOptions}\n\t\t */\n\t\tformat: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ timeStyle: 'medium', dateStyle: 'short' }),\n\t\t},\n\t\t/**\n\t\t * Wether to display the timestamp as time from now (optional)\n\t\t *\n\t\t * - `false`: Disable relative time\n\t\t * - `'long'`: Long text, like *2 seconds ago* (default)\n\t\t * - `'short'`: Short text, like *2 sec. ago*\n\t\t * - `'narrow'`: Even shorter text (same as `'short'` on some languages)\n\t\t */\n\t\trelativeTime: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: 'long',\n\t\t\tvalidator: (v) => v === false || ['long', 'short', 'narrow'].includes(v),\n\t\t},\n\t\t/**\n\t\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t\t */\n\t\tignoreSeconds: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\tconst timestamp = computed(() => props.timestamp)\n\t\tconst { formattedTime, formattedFullTime } = useFormatDateTime(timestamp, props)\n\t\treturn {\n\t\t\tformattedTime,\n\t\t\tformattedFullTime,\n\t\t}\n\t},\n}\n</script>\n"],"names":["FEW_SECONDS_AGO","t","useFormatDateTime","timestamp","opts","currentTime","ref","intervalId","options","unref","wrappedOptions","computed","date","formattedFullTime","getCanonicalLocale","formattedTime","formatter","seconds","minutes","hours","days","weeks","months","watch","onMounted","onUnmounted","_sfc_main","v","props","_hoisted_1","_createElementBlock","$props","$setup","_toDisplayString"],"mappings":";;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BA,MAAMA,IAAkB;AAAA,EACvB,MAAMC,EA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A;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,QAAQ;AAAA,MACP,MAAM;AAAA,MACN,SAAS,OAAO,EAAE,WAAW,UAAU,WAAW,QAAQ;AAAA,IAC1D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,cAAc;AAAA,MACb,MAAM,CAAC,SAAS,MAAM;AAAA,MACtB,SAAS;AAAA,MACT,WAAW,CAACC,MAAMA,MAAM,MAAS,CAAC,QAAQ,SAAS,QAAQ,EAAE,SAASA,CAAC;AAAA,IACvE;AAAA;AAAA;AAAA;AAAA,IAID,eAAe;AAAA,MACd,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA,EACD;AAAA,EAED,MAAMC,GAAO;AACZ,UAAMzB,IAAYQ,EAAAA,SAAS,MAAMiB,EAAM,SAAS,GAC1C,EAAE,eAAAb,GAAe,mBAAAF,EAAkB,IAAIX,EAAkBC,GAAWyB,CAAK;AAC/E,WAAO;AAAA,MACN,eAAAb;AAAA,MACA,mBAAAF;AAAA,IACD;AAAA,EACA;AACF,GAxKAgB,IAAA,CAAA,kBAAA,OAAA;;wBA6GCC,EAEsD,mBAAA,QAAA;AAAA,IAFhD,OAAM;AAAA,IACV,kBAAgBC,EAAS;AAAA,IACzB,OAAOC,EAAiB;AAAA,EAAK,GAAAC,EAAAA,gBAAAD,EAAA,aAAa,GA/G7C,GAAAH,CAAA;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var j = require("../assets/NcDateTimePicker-
|
|
2
|
-
const n = require("./_l10n-
|
|
1
|
+
var j = require("../assets/NcDateTimePicker-CC5ocPIo.css");
|
|
2
|
+
const n = require("./_l10n-Fl7RzbcZ.cjs"), y = require("./GenRandomId-ULxaMkkr.cjs"), w = require("./NcTimezonePicker-f6X4yiuj.cjs"), v = require("./NcPopover-J0pw-klF.cjs"), z = require("./ScopeComponent-Gzz2FMnQ.cjs"), t = require("vue"), d = require("./_plugin-vue_export-helper-xG2iG1wl.cjs"), i = require("@nextcloud/l10n"), D = require("vue-datepicker-next"), M = (e) => e && e.__esModule ? e : { default: e }, P = /* @__PURE__ */ M(D);
|
|
3
3
|
n.register(n.t32);
|
|
4
4
|
const b = {
|
|
5
5
|
name: "CalendarBlankIcon",
|
|
@@ -18,13 +18,13 @@ const b = {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}, N = ["aria-hidden", "aria-label"], _ = ["fill", "width", "height"], S = { d: "M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1" }, B = { key: 0 };
|
|
21
|
-
function T(e, a, o,
|
|
21
|
+
function T(e, a, o, r, c, m) {
|
|
22
22
|
return t.openBlock(), t.createElementBlock("span", t.mergeProps(e.$attrs, {
|
|
23
|
-
"aria-hidden":
|
|
23
|
+
"aria-hidden": o.title ? null : !0,
|
|
24
24
|
"aria-label": o.title,
|
|
25
25
|
class: "material-design-icon calendar-blank-icon",
|
|
26
26
|
role: "img",
|
|
27
|
-
onClick: a[0] || (a[0] = (
|
|
27
|
+
onClick: a[0] || (a[0] = (s) => e.$emit("click", s))
|
|
28
28
|
}), [
|
|
29
29
|
(t.openBlock(), t.createElementBlock("svg", {
|
|
30
30
|
fill: o.fillColor,
|
|
@@ -39,7 +39,7 @@ function T(e, a, o, s, d, m) {
|
|
|
39
39
|
], 8, _))
|
|
40
40
|
], 16, N);
|
|
41
41
|
}
|
|
42
|
-
const V = /* @__PURE__ */
|
|
42
|
+
const V = /* @__PURE__ */ d._export_sfc(b, [["render", T]]), H = {
|
|
43
43
|
name: "WebIcon",
|
|
44
44
|
emits: ["click"],
|
|
45
45
|
props: {
|
|
@@ -56,13 +56,13 @@ const V = /* @__PURE__ */ c._export_sfc(b, [["render", T]]), H = {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}, Y = ["aria-hidden", "aria-label"], $ = ["fill", "width", "height"], E = { d: "M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" }, I = { key: 0 };
|
|
59
|
-
function U(e, a, o,
|
|
59
|
+
function U(e, a, o, r, c, m) {
|
|
60
60
|
return t.openBlock(), t.createElementBlock("span", t.mergeProps(e.$attrs, {
|
|
61
|
-
"aria-hidden":
|
|
61
|
+
"aria-hidden": o.title ? null : !0,
|
|
62
62
|
"aria-label": o.title,
|
|
63
63
|
class: "material-design-icon web-icon",
|
|
64
64
|
role: "img",
|
|
65
|
-
onClick: a[0] || (a[0] = (
|
|
65
|
+
onClick: a[0] || (a[0] = (s) => e.$emit("click", s))
|
|
66
66
|
}), [
|
|
67
67
|
(t.openBlock(), t.createElementBlock("svg", {
|
|
68
68
|
fill: o.fillColor,
|
|
@@ -77,7 +77,7 @@ function U(e, a, o, s, d, m) {
|
|
|
77
77
|
], 8, $))
|
|
78
78
|
], 16, Y);
|
|
79
79
|
}
|
|
80
|
-
const W = /* @__PURE__ */
|
|
80
|
+
const W = /* @__PURE__ */ d._export_sfc(H, [["render", U]]), u = {
|
|
81
81
|
date: "YYYY-MM-DD",
|
|
82
82
|
datetime: "YYYY-MM-DD H:mm:ss",
|
|
83
83
|
year: "YYYY",
|
|
@@ -161,7 +161,7 @@ const W = /* @__PURE__ */ c._export_sfc(H, [["render", U]]), u = {
|
|
|
161
161
|
],
|
|
162
162
|
setup() {
|
|
163
163
|
return {
|
|
164
|
-
timezoneDialogHeaderId:
|
|
164
|
+
timezoneDialogHeaderId: "timezone-dialog-header-".concat(y.GenRandomId())
|
|
165
165
|
};
|
|
166
166
|
},
|
|
167
167
|
data() {
|
|
@@ -180,13 +180,13 @@ const W = /* @__PURE__ */ c._export_sfc(H, [["render", U]]), u = {
|
|
|
180
180
|
defaultLang() {
|
|
181
181
|
return {
|
|
182
182
|
formatLocale: {
|
|
183
|
-
months:
|
|
184
|
-
monthsShort:
|
|
185
|
-
weekdays:
|
|
186
|
-
weekdaysShort:
|
|
187
|
-
weekdaysMin:
|
|
183
|
+
months: i.getMonthNames(),
|
|
184
|
+
monthsShort: i.getMonthNamesShort(),
|
|
185
|
+
weekdays: i.getDayNames(),
|
|
186
|
+
weekdaysShort: i.getDayNamesShort(),
|
|
187
|
+
weekdaysMin: i.getDayNamesMin(),
|
|
188
188
|
// 0 = sunday, 1 = monday
|
|
189
|
-
firstDayOfWeek:
|
|
189
|
+
firstDayOfWeek: i.getFirstDay()
|
|
190
190
|
},
|
|
191
191
|
monthFormat: "MMM"
|
|
192
192
|
};
|
|
@@ -206,21 +206,23 @@ const W = /* @__PURE__ */ c._export_sfc(H, [["render", U]]), u = {
|
|
|
206
206
|
* @return {string}
|
|
207
207
|
*/
|
|
208
208
|
formatTypeMap() {
|
|
209
|
-
|
|
209
|
+
var e;
|
|
210
|
+
return (e = u[this.type]) != null ? e : u.date;
|
|
210
211
|
},
|
|
211
212
|
/**
|
|
212
213
|
* The formatter used for the vue-datepicker to fix nextcloud-libraries/nextcloud-vue#5044
|
|
213
214
|
*/
|
|
214
215
|
internalFormatter() {
|
|
216
|
+
var a;
|
|
215
217
|
return {
|
|
216
|
-
getWeek: (
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
const
|
|
220
|
-
return Math.ceil(((
|
|
218
|
+
getWeek: (o) => {
|
|
219
|
+
const r = new Date(Date.UTC(o.getFullYear(), o.getMonth(), o.getDate()));
|
|
220
|
+
r.setUTCDate(r.getUTCDate() + 4 - (r.getUTCDay() || 7));
|
|
221
|
+
const c = new Date(Date.UTC(r.getUTCFullYear(), 0, 1));
|
|
222
|
+
return Math.ceil(((r - c) / 864e5 + 1) / 7);
|
|
221
223
|
},
|
|
222
224
|
// allow to override it by users using the `formatter` prop
|
|
223
|
-
...this.formatter
|
|
225
|
+
...(a = this.formatter) != null ? a : {}
|
|
224
226
|
};
|
|
225
227
|
}
|
|
226
228
|
},
|
|
@@ -254,8 +256,8 @@ const W = /* @__PURE__ */ c._export_sfc(H, [["render", U]]), u = {
|
|
|
254
256
|
}
|
|
255
257
|
}
|
|
256
258
|
}), F = ["aria-labelledby"], A = { class: "timezone-popover-wrapper__label" }, L = ["id"];
|
|
257
|
-
function O(e, a, o,
|
|
258
|
-
const
|
|
259
|
+
function O(e, a, o, r, c, m) {
|
|
260
|
+
const s = t.resolveComponent("Web"), h = t.resolveComponent("NcTimezonePicker"), f = t.resolveComponent("NcPopover"), k = t.resolveComponent("CalendarBlank"), g = t.resolveComponent("DatePicker");
|
|
259
261
|
return t.openBlock(), t.createBlock(g, {
|
|
260
262
|
ref: "datepicker",
|
|
261
263
|
"append-to-body": e.appendToBody,
|
|
@@ -271,24 +273,24 @@ function O(e, a, o, s, d, m) {
|
|
|
271
273
|
value: e.modelValue,
|
|
272
274
|
onSelectYear: e.handleSelectYear,
|
|
273
275
|
onSelectMonth: e.handleSelectMonth,
|
|
274
|
-
"onUpdate:value": a[2] || (a[2] = (
|
|
276
|
+
"onUpdate:value": a[2] || (a[2] = (l) => e.$emit("update:modelValue", l))
|
|
275
277
|
}, t.createSlots({
|
|
276
278
|
"icon-calendar": t.withCtx(() => [
|
|
277
279
|
e.showTimezoneSelect ? (t.openBlock(), t.createBlock(f, {
|
|
278
280
|
key: 0,
|
|
279
281
|
shown: e.showTimezonePopover,
|
|
280
|
-
"onUpdate:shown": a[1] || (a[1] = (
|
|
282
|
+
"onUpdate:shown": a[1] || (a[1] = (l) => e.showTimezonePopover = l),
|
|
281
283
|
"popup-role": "dialog",
|
|
282
284
|
"popover-base-class": "timezone-select__popper"
|
|
283
285
|
}, {
|
|
284
|
-
trigger: t.withCtx(({ attrs:
|
|
286
|
+
trigger: t.withCtx(({ attrs: l }) => [
|
|
285
287
|
t.createElementVNode("button", t.mergeProps({
|
|
286
288
|
class: ["datetime-picker-inline-icon", { "datetime-picker-inline-icon--highlighted": e.highlightTimezone }]
|
|
287
|
-
},
|
|
289
|
+
}, l, {
|
|
288
290
|
onMousedown: t.withModifiers(() => {
|
|
289
291
|
}, ["stop", "prevent"])
|
|
290
292
|
}), [
|
|
291
|
-
t.createVNode(
|
|
293
|
+
t.createVNode(s, { size: 20 })
|
|
292
294
|
], 16)
|
|
293
295
|
]),
|
|
294
296
|
default: t.withCtx(() => [
|
|
@@ -302,7 +304,7 @@ function O(e, a, o, s, d, m) {
|
|
|
302
304
|
t.createVNode(h, {
|
|
303
305
|
"model-value": e.tzVal,
|
|
304
306
|
class: "timezone-popover-wrapper__timezone-select",
|
|
305
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
307
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => e.$emit("update:timezone-id", l))
|
|
306
308
|
}, null, 8, ["model-value"])
|
|
307
309
|
], 8, F)
|
|
308
310
|
]),
|
|
@@ -314,7 +316,7 @@ function O(e, a, o, s, d, m) {
|
|
|
314
316
|
]),
|
|
315
317
|
_: 2
|
|
316
318
|
}, [
|
|
317
|
-
t.renderList(e.$slots, (
|
|
319
|
+
t.renderList(e.$slots, (l, p) => ({
|
|
318
320
|
name: p,
|
|
319
321
|
fn: t.withCtx((C) => [
|
|
320
322
|
t.renderSlot(e.$slots, p, t.normalizeProps(t.guardReactiveProps(C)), void 0, !0)
|
|
@@ -322,5 +324,5 @@ function O(e, a, o, s, d, m) {
|
|
|
322
324
|
}))
|
|
323
325
|
]), 1032, ["append-to-body", "clearable", "format", "formatter", "lang", "minute-step", "placeholder", "popup-class", "show-week-number", "type", "value", "onSelectYear", "onSelectMonth"]);
|
|
324
326
|
}
|
|
325
|
-
const R = /* @__PURE__ */
|
|
327
|
+
const R = /* @__PURE__ */ d._export_sfc(q, [["render", O], ["__scopeId", "data-v-5cf80a29"]]);
|
|
326
328
|
exports.NcDateTimePicker = R;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcDateTimePicker-X2pCnTer.cjs","sources":["../../node_modules/vue-material-design-icons/CalendarBlank.vue","../../node_modules/vue-material-design-icons/Web.vue","../../src/components/NcDateTimePicker/NcDateTimePicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : true\"\n :aria-label=\"title\"\n class=\"material-design-icon calendar-blank-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"CalendarBlankIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : true\"\n :aria-label=\"title\"\n class=\"material-design-icon web-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"WebIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n> We're wrapping the awesome datepicker library here https://github.com/mengxiong10/vue-datepicker-next\n> Please check there for all the available options.\n\n### Defaults\n- cleareable: false\n- minute-step: 10\n\n### Example\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{{ time }}\n\t</span>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttime: new Date('2022-10-10 10:10:10'),\n\t\t}\n\t},\n}\n</script>\n```\n\n### Example with confirm button\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```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\trange\n\t\t\ttype=\"date\" />\n\t\t{{ time }}\n\t</span>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttime: null,\n\t\t}\n\t},\n}\n</script>\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\t:show-timezone-select=\"true\"\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<template>\n\t<DatePicker ref=\"datepicker\"\n\t\t:append-to-body=\"appendToBody\"\n\t\t:clearable=\"clearable\"\n\t\t:format=\"format ? format : formatTypeMap\"\n\t\t:formatter=\"internalFormatter\"\n\t\t:lang=\"lang ? lang : defaultLang\"\n\t\t:minute-step=\"minuteStep\"\n\t\t:placeholder=\"placeholder ? placeholder : defaultPlaceholder\"\n\t\t:popup-class=\"{ 'show-week-number': showWeekNumber }\"\n\t\t:show-week-number=\"showWeekNumber\"\n\t\t:type=\"type\"\n\t\t:value=\"modelValue\"\n\t\t@select-year=\"handleSelectYear\"\n\t\t@select-month=\"handleSelectMonth\"\n\t\t@update:value=\"$emit('update:modelValue', $event)\">\n\t\t<template #icon-calendar>\n\t\t\t<NcPopover v-if=\"showTimezoneSelect\"\n\t\t\t\tv-model:shown=\"showTimezonePopover\"\n\t\t\t\tpopup-role=\"dialog\"\n\t\t\t\tpopover-base-class=\"timezone-select__popper\">\n\t\t\t\t<template #trigger=\"{ attrs }\">\n\t\t\t\t\t<button class=\"datetime-picker-inline-icon\"\n\t\t\t\t\t\t:class=\"{'datetime-picker-inline-icon--highlighted': highlightTimezone}\"\n\t\t\t\t\t\tv-bind=\"attrs\"\n\t\t\t\t\t\t@mousedown.stop.prevent=\"() => {}\">\n\t\t\t\t\t\t<Web :size=\"20\" />\n\t\t\t\t\t</button>\n\t\t\t\t</template>\n\n\t\t\t\t<div role=\"dialog\"\n\t\t\t\t\t:aria-labelledby=\"timezoneDialogHeaderId\">\n\t\t\t\t\t<div class=\"timezone-popover-wrapper__label\">\n\t\t\t\t\t\t<strong :id=\"timezoneDialogHeaderId\">\n\t\t\t\t\t\t\t{{ t('Please select a time zone:') }}\n\t\t\t\t\t\t</strong>\n\t\t\t\t\t</div>\n\t\t\t\t\t<NcTimezonePicker :model-value=\"tzVal\"\n\t\t\t\t\t\tclass=\"timezone-popover-wrapper__timezone-select\"\n\t\t\t\t\t\t@update:model-value=\"$emit('update:timezone-id', $event)\" />\n\t\t\t\t</div>\n\t\t\t</NcPopover>\n\t\t\t<CalendarBlank v-else :size=\"20\" />\n\t\t</template>\n\t\t<template v-for=\"(_, slot) of $slots\" #[slot]=\"scope\">\n\t\t\t<slot :name=\"slot\" v-bind=\"scope\" />\n\t\t</template>\n\t</DatePicker>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport NcTimezonePicker from '../NcTimezonePicker/index.js'\nimport NcPopover from '../NcPopover/index.js'\nimport ScopeComponent from '../../utils/ScopeComponent.js'\n\nimport CalendarBlank from 'vue-material-design-icons/CalendarBlank.vue'\nimport Web from 'vue-material-design-icons/Web.vue'\n\nimport {\n\tgetFirstDay,\n\tgetDayNames,\n\tgetDayNamesShort,\n\tgetDayNamesMin,\n\tgetMonthNames,\n\tgetMonthNamesShort,\n} from '@nextcloud/l10n'\n\nimport DatePicker from 'vue-datepicker-next'\nimport './index.scss'\n\nconst formatMap = {\n\tdate: 'YYYY-MM-DD',\n\tdatetime: 'YYYY-MM-DD H:mm:ss',\n\tyear: 'YYYY',\n\tmonth: 'YYYY-MM',\n\ttime: 'H:mm:ss',\n\tweek: 'w',\n}\n\nexport default ScopeComponent({\n\tname: 'NcDateTimePicker',\n\n\tcomponents: {\n\t\tCalendarBlank,\n\t\tDatePicker,\n\t\tNcPopover,\n\t\tNcTimezonePicker,\n\t\tWeb,\n\t},\n\n\tprops: {\n\t\tclearable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\tminuteStep: {\n\t\t\ttype: Number,\n\t\t\tdefault: 10,\n\t\t},\n\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date',\n\t\t},\n\n\t\tformat: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\tformatter: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\tlang: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value to initialize, but also two-way bind the selected date. The date is – like the `Date` object in\n\t\t * JavaScript – tied to UTC. The selected time zone does not have an influence of the selected time and date\n\t\t * value. You have to translate the time yourself when you want to factor in time zones.\n\t\t */\n\t\t// eslint-disable-next-line\n\t\tmodelValue: {\n\t\t\tdefault: () => new Date(),\n\t\t},\n\n\t\t/**\n\t\t * The preselected IANA time zone ID for the time zone picker, only relevant in combination with `:show-timezone-select=\"true\"`. Example: `Europe/Berlin`. The prop supports two-way binding through v-model directive.\n\t\t */\n\t\ttimezoneId: {\n\t\t\ttype: String,\n\t\t\tdefault: 'UTC',\n\t\t},\n\n\t\tshowTimezoneSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\thighlightTimezone: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\tappendToBody: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\tshowWeekNumber: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:modelValue',\n\t\t'update:timezone-id',\n\t],\n\n\tsetup() {\n\t\treturn {\n\t\t\ttimezoneDialogHeaderId: `timezone-dialog-header-${GenRandomId()}`,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tshowTimezonePopover: false,\n\t\t\ttzVal: this.timezoneId,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Datepicker language\n\t\t * https://github.com/mengxiong10/vue2-datepicker/blob/master/locale.md\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tdefaultLang() {\n\t\t\treturn {\n\t\t\t\tformatLocale: {\n\t\t\t\t\tmonths: getMonthNames(),\n\t\t\t\t\tmonthsShort: getMonthNamesShort(),\n\t\t\t\t\tweekdays: getDayNames(),\n\t\t\t\t\tweekdaysShort: getDayNamesShort(),\n\t\t\t\t\tweekdaysMin: getDayNamesMin(),\n\t\t\t\t\t// 0 = sunday, 1 = monday\n\t\t\t\t\tfirstDayOfWeek: getFirstDay(),\n\t\t\t\t},\n\t\t\t\tmonthFormat: 'MMM',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Translated placeholder\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tdefaultPlaceholder() {\n\t\t\tif (this.type === 'time') {\n\t\t\t\treturn t('Pick a time')\n\t\t\t}\n\t\t\tif (this.type === 'month') {\n\t\t\t\treturn t('Pick a month')\n\t\t\t}\n\t\t\tif (this.type === 'year') {\n\t\t\t\treturn t('Pick a year')\n\t\t\t}\n\t\t\tif (this.type === 'week') {\n\t\t\t\treturn t('Pick a week')\n\t\t\t}\n\t\t\tif (this.type === 'date') {\n\t\t\t\treturn t('Pick a date')\n\t\t\t}\n\t\t\treturn t('Pick a date and a time')\n\t\t},\n\n\t\t/**\n\t\t * If format is not provided, try to match the type\n\t\t * or fallback to 'date'\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tformatTypeMap() {\n\t\t\treturn formatMap[this.type] ?? formatMap.date\n\t\t},\n\n\t\t/**\n\t\t * The formatter used for the vue-datepicker to fix nextcloud-libraries/nextcloud-vue#5044\n\t\t */\n\t\tinternalFormatter() {\n\t\t\t/**\n\t\t\t * Get the ISO week number of the date\n\t\t\t * @param {Date} date The date to format\n\t\t\t */\n\t\t\tconst getWeek = (date) => {\n\t\t\t\t// Adjust to nearest Thursday\n\t\t\t\tconst firstThursday = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()))\n\t\t\t\tfirstThursday.setUTCDate(firstThursday.getUTCDate() + 4 - (firstThursday.getUTCDay() || 7))\n\n\t\t\t\tconst yearStart = new Date(Date.UTC(firstThursday.getUTCFullYear(), 0, 1))\n\n\t\t\t\t// Full weeks to nearest Thursday\n\t\t\t\treturn Math.ceil((((firstThursday - yearStart) / 86400000) + 1) / 7)\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tgetWeek,\n\t\t\t\t// allow to override it by users using the `formatter` prop\n\t\t\t\t...(this.formatter ?? {}),\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\thandleSelectYear(year) {\n\t\t\tconst value = this.$refs.datepicker.currentValue\n\t\t\tif (value) {\n\t\t\t\ttry {\n\t\t\t\t\tconst date = new Date(new Date(value).setFullYear(year))\n\t\t\t\t\tthis.$refs.datepicker.selectDate(date)\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('Invalid value', value, year)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\thandleSelectMonth(month) {\n\t\t\tconst value = this.$refs.datepicker.currentValue\n\t\t\tif (value) {\n\t\t\t\ttry {\n\t\t\t\t\tconst date = new Date(new Date(value).setMonth(month))\n\t\t\t\t\tthis.$refs.datepicker.selectDate(date)\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('Invalid value', value, month)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Toggles the visibility of the time zone popover\n\t\t */\n\t\ttoggleTimezonePopover() {\n\t\t\tif (!this.showTimezoneSelect) {\n\t\t\t\t// Just a click on the icon, but not for time zones -> ignore\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.showTimezonePopover = !this.showTimezonePopover\n\t\t},\n\t},\n})\n\n</script>\n\n<style lang=\"scss\" scoped>\n.mx-datepicker :deep(.mx-input-wrapper .mx-input) {\n\tbackground-clip: border-box;\n}\n\n.datetime-picker-inline-icon {\n\topacity: .3;\n\tborder: none;\n\tbackground-color: transparent;\n\tborder-radius: 0;\n\tpadding: 0 !important;\n\tmargin: 0;\n\n\t&--highlighted {\n\t\topacity: .7;\n\t}\n\n\t&:focus,\n\t&:hover {\n\t\topacity: 1;\n\t}\n}\n</style>\n\n<style lang=\"scss\">\n// We overwrite the popover base class, so we can style\n// the popover for the timezone select only.\n.v-popper--theme-dropdown.v-popper__popper.timezone-select__popper .v-popper__wrapper {\n\tborder-radius: var(--border-radius-large);\n\n\t.v-popper__inner {\n\t\tpadding: 4px;\n\t\tborder-radius: var(--border-radius-large);\n\n\t\t.timezone-popover-wrapper {\n\t\t\t&__label {\n\t\t\t\tpadding: 4px 0;\n\t\t\t\tpadding-left: 14px; // Left-align with NcSelect text\n\t\t\t}\n\n\t\t\t// We overwrite the border radius of the input to account for the popover border-radius minus the padding\n\t\t\t&__timezone-select.v-select {\n\t\t\t\t.vs__dropdown-toggle {\n\t\t\t\t\tborder-radius: calc(var(--border-radius-large) - 4px);\n\t\t\t\t}\n\n\t\t\t\t&.vs--open {\n\t\t\t\t\t.vs__dropdown-toggle {\n\t\t\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t\t\t}\n\t\t\t\t\t&.select--drop-up .vs__dropdown-toggle {\n\t\t\t\t\t\tborder-radius: 0 0 calc(var(--border-radius-large) - 4px) calc(var(--border-radius-large) - 4px);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n// TODO: This should be scoped or targeted by a specific selector, but the NcSelect component does not allow this yet.\n.vs__dropdown-menu--floating {\n\t// Higher z-index than the popover in which the NcSelect is located.\n\tz-index: 100001;\n}\n</style>\n"],"names":["_sfc_main$2","_hoisted_1$2","_hoisted_2$2","_hoisted_3$2","$props","vue","_sfc_main$1","_hoisted_1$1","_hoisted_2$1","_hoisted_3$1","formatMap","_sfc_main","ScopeComponent","NcPopover","NcTimezonePicker","Web","GenRandomId","l10n","_l10n","_a","date","firstThursday","yearStart","value","year","month","_hoisted_1","_hoisted_2","_hoisted_3","_ctx","_cache","$event","_","slot","scope"],"mappings":";;;AAoBA,MAAAA,IAAA;AAAA;EAEE,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACE,OAAA;AAAA;;;;MAKE,SAAA;AAAA;;;MAIA,SAAA;AAAA,IACF;AAAA,EACF;AACF,GApCAC,IAAA,CAAA,eAAA,YAAA,GAAAC,IAAA,CAAA,QAAA,SAAA,QAAA,GAYYC,IAAA,EAAA,GAAA,mHAAA;;;IAVH,eAAAC,EAAA,QAAA,OAAA;AAAA,IACA,cAAAA,EAAA;AAAA,IACD,OAAA;AAAA,IACA,MAAA;AAAA;;;MAEE,MAAAA,EAAA;AAAA,MACD,OAAA;AAAA,MACC,OAAAA,EAAA;AAAA,MACA,QAAAA,EAAA;AAAA,MACD,SAAA;AAAA;MACHC,EAAA,mBAAA,QAAAF,GAAA;AAAA,qGAZNE,EAAA,mBAAA,IAAA,EAAA;AAAA;IAAA,GAAA,GAAAH,CAAA;AAAA,EAAA,GAAA,IAAAD,CAAA;;6DCoBAK,IAAA;AAAA,EACE,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACE,OAAA;AAAA;;;;MAKE,SAAA;AAAA;;;MAIA,SAAA;AAAA,IACF;AAAA,EACF;AACF,GApCAC,IAAA,CAAA,eAAA,YAAA,GAAAC,IAAA,CAAA,QAAA,SAAA,QAAA,GAYYC,IAAA,EAAA,GAAA,u5BAAA;;;IAVH,eAAAL,EAAA,QAAA,OAAA;AAAA,IACA,cAAAA,EAAA;AAAA,IACD,OAAA;AAAA,IACA,MA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