@nextcloud/vue 8.24.0 → 8.25.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 +49 -0
- package/README.md +2 -2
- 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/NcActionInput.cjs +1 -1
- package/dist/Components/NcActionInput.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/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSearch.cjs +1 -1
- package/dist/Components/NcAppNavigationSearch.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/NcAppSidebar.cjs +1 -1
- package/dist/Components/NcAppSidebar.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/NcCheckboxRadioSwitch.cjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
- package/dist/Components/NcChip.cjs +6 -6
- package/dist/Components/NcChip.cjs.map +1 -1
- package/dist/Components/NcChip.mjs +5 -5
- package/dist/Components/NcChip.mjs.map +1 -1
- package/dist/Components/NcCollectionList.cjs +1 -1
- package/dist/Components/NcCollectionList.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 +47 -21
- package/dist/Components/NcDateTimePicker.cjs.map +1 -1
- package/dist/Components/NcDateTimePicker.mjs +47 -21
- package/dist/Components/NcDateTimePicker.mjs.map +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/NcIconSvgWrapper.cjs +1 -1
- package/dist/Components/NcIconSvgWrapper.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 +21 -21
- package/dist/Components/NcModal.cjs.map +1 -1
- package/dist/Components/NcModal.mjs +21 -21
- package/dist/Components/NcModal.mjs.map +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/NcRelatedResourcesPanel.cjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
- package/dist/Components/NcRichContenteditable.cjs +1 -1
- package/dist/Components/NcRichContenteditable.mjs +1 -1
- package/dist/Components/NcRichText.cjs +2 -2
- 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/NcSelectUsers.cjs +4 -0
- package/dist/Components/NcSelectUsers.cjs.map +1 -0
- package/dist/Components/NcSelectUsers.mjs +5 -0
- package/dist/Components/NcSelectUsers.mjs.map +1 -0
- 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/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/Directives/Tooltip.cjs +1 -1
- package/dist/Directives/Tooltip.cjs.map +1 -1
- package/dist/Directives/Tooltip.mjs +4 -4
- package/dist/Directives/Tooltip.mjs.map +1 -1
- package/dist/Functions/reference.cjs +1 -1
- package/dist/Functions/reference.mjs +1 -1
- package/dist/Functions/usernameToColor.cjs +1 -1
- package/dist/Functions/usernameToColor.mjs +1 -1
- package/dist/assets/{NcAppContent-JfRwJlWK.css → NcAppContent-DswTJB9n.css} +4 -4
- package/dist/assets/{NcAvatar-Cc-2PM1F.css → NcAvatar-BvPk6o_F.css} +24 -24
- package/dist/assets/{NcDateTimePicker-D07hGMOZ.css → NcDateTimePicker-HmPjr-d7.css} +12 -12
- package/dist/assets/{NcIconSvgWrapper-BxyhLaB5.css → NcIconSvgWrapper-BiNW6Guv.css} +8 -4
- package/dist/assets/{NcModal-DXN1C02T.css → NcModal-BS5vtogq.css} +68 -69
- package/dist/assets/{NcPopover-DpakVVxI.css → NcPopover-Dx28oc68.css} +13 -0
- package/dist/assets/{NcRichContenteditable-BV6g3dmd.css → NcRichContenteditable-BbOjh6i7.css} +31 -28
- package/dist/assets/NcSelectUsers-BoxBQpbA.css +4 -0
- package/dist/assets/{Tooltip-DQ4Plm4r.css → Tooltip-C-QZMStp.css} +7 -9
- package/dist/chunks/{GenColors-CV4Niqso.cjs → GenColors-7bkY5Nwl.cjs} +2 -2
- package/dist/chunks/{GenColors-CV4Niqso.cjs.map → GenColors-7bkY5Nwl.cjs.map} +1 -1
- package/dist/chunks/{GenColors-NALDypHH.mjs → GenColors-S7frO84b.mjs} +2 -2
- package/dist/chunks/{GenColors-NALDypHH.mjs.map → GenColors-S7frO84b.mjs.map} +1 -1
- package/dist/chunks/{NcActionButton-ChQFsL4S.cjs → NcActionButton-CXeEXQLT.cjs} +37 -5
- package/dist/chunks/NcActionButton-CXeEXQLT.cjs.map +1 -0
- package/dist/chunks/{NcActionButton-BFxArTsE.mjs → NcActionButton-Gpv56vuS.mjs} +37 -5
- package/dist/chunks/NcActionButton-Gpv56vuS.mjs.map +1 -0
- package/dist/chunks/{NcActionButtonGroup-BSFS4BYN.cjs → NcActionButtonGroup-BMy3W9fG.cjs} +2 -2
- package/dist/chunks/{NcActionButtonGroup-BSFS4BYN.cjs.map → NcActionButtonGroup-BMy3W9fG.cjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-B5OcRwWQ.mjs → NcActionButtonGroup-BteTNhIn.mjs} +2 -2
- package/dist/chunks/{NcActionButtonGroup-B5OcRwWQ.mjs.map → NcActionButtonGroup-BteTNhIn.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-DghifYMn.cjs → NcActionInput-BqyC5dsN.cjs} +6 -6
- package/dist/chunks/{NcActionInput-DghifYMn.cjs.map → NcActionInput-BqyC5dsN.cjs.map} +1 -1
- package/dist/chunks/{NcActionInput-DXiL7Phe.mjs → NcActionInput-QO_UKY2v.mjs} +6 -6
- package/dist/chunks/{NcActionInput-DXiL7Phe.mjs.map → NcActionInput-QO_UKY2v.mjs.map} +1 -1
- package/dist/chunks/{NcActions-C_H0APKA.mjs → NcActions-CucWK-m-.mjs} +3 -3
- package/dist/chunks/{NcActions-C_H0APKA.mjs.map → NcActions-CucWK-m-.mjs.map} +1 -1
- package/dist/chunks/{NcActions-C_gPnk6X.cjs → NcActions-DEXtGQeq.cjs} +3 -3
- package/dist/chunks/{NcActions-C_gPnk6X.cjs.map → NcActions-DEXtGQeq.cjs.map} +1 -1
- package/dist/chunks/{NcAppContent-PC4RbdhU.cjs → NcAppContent-D__4-2XM.cjs} +8 -13
- package/dist/chunks/NcAppContent-D__4-2XM.cjs.map +1 -0
- package/dist/chunks/{NcAppContent-DiOscHZ8.mjs → NcAppContent-_x1Bvwg-.mjs} +8 -13
- package/dist/chunks/NcAppContent-_x1Bvwg-.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-B9Dd0YBs.cjs → NcAppNavigation-DBfTz6qV.cjs} +2 -2
- package/dist/chunks/{NcAppNavigation-B9Dd0YBs.cjs.map → NcAppNavigation-DBfTz6qV.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-DD1CfV7A.mjs → NcAppNavigation-H8Gvbq5E.mjs} +2 -2
- package/dist/chunks/{NcAppNavigation-DD1CfV7A.mjs.map → NcAppNavigation-H8Gvbq5E.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-8NN7iPkz.mjs → NcAppNavigationCaption-C0Fkd9G7.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-8NN7iPkz.mjs.map → NcAppNavigationCaption-C0Fkd9G7.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-CuKecXh9.cjs → NcAppNavigationCaption-CIrXtXSn.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-CuKecXh9.cjs.map → NcAppNavigationCaption-CIrXtXSn.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-B50v2lmS.mjs → NcAppNavigationItem-CDut0DWY.mjs} +6 -6
- package/dist/chunks/{NcAppNavigationItem-B50v2lmS.mjs.map → NcAppNavigationItem-CDut0DWY.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-B2LzgJUC.cjs → NcAppNavigationItem-CV-XN8Ym.cjs} +6 -6
- package/dist/chunks/{NcAppNavigationItem-B2LzgJUC.cjs.map → NcAppNavigationItem-CV-XN8Ym.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-bRz_V5Y1.cjs → NcAppNavigationNewItem-BLek0JRU.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-bRz_V5Y1.cjs.map → NcAppNavigationNewItem-BLek0JRU.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-B7_0fFTF.mjs → NcAppNavigationNewItem-DGjgp78o.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-B7_0fFTF.mjs.map → NcAppNavigationNewItem-DGjgp78o.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-B-HqHu3j.cjs → NcAppNavigationSearch-BblolNaS.cjs} +3 -3
- package/dist/chunks/{NcAppNavigationSearch-B-HqHu3j.cjs.map → NcAppNavigationSearch-BblolNaS.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-ChGonQL8.mjs → NcAppNavigationSearch-DTW6CtnU.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationSearch-ChGonQL8.mjs.map → NcAppNavigationSearch-DTW6CtnU.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-9nG2gY_9.mjs → NcAppNavigationSettings-C0QuEMmn.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationSettings-9nG2gY_9.mjs.map → NcAppNavigationSettings-C0QuEMmn.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-C--IJ1A2.cjs → NcAppNavigationSettings-lfJvt3vG.cjs} +3 -3
- package/dist/chunks/{NcAppNavigationSettings-C--IJ1A2.cjs.map → NcAppNavigationSettings-lfJvt3vG.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-FxOt_DlD.cjs → NcAppNavigationToggle-CUGOWggc.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationToggle-FxOt_DlD.cjs.map → NcAppNavigationToggle-CUGOWggc.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-CJ5N3NI4.mjs → NcAppNavigationToggle-CjPJB2s3.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationToggle-CJ5N3NI4.mjs.map → NcAppNavigationToggle-CjPJB2s3.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-C2rBRxUv.mjs → NcAppSettingsDialog-Dl-kMSpe.mjs} +4 -4
- package/dist/chunks/{NcAppSettingsDialog-C2rBRxUv.mjs.map → NcAppSettingsDialog-Dl-kMSpe.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-CSLft-a9.cjs → NcAppSettingsDialog-K3yVenLs.cjs} +4 -4
- package/dist/chunks/{NcAppSettingsDialog-CSLft-a9.cjs.map → NcAppSettingsDialog-K3yVenLs.cjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-19hVcGhv.mjs → NcAppSidebar-C5fqF8Ll.mjs} +4 -4
- package/dist/chunks/{NcAppSidebar-19hVcGhv.mjs.map → NcAppSidebar-C5fqF8Ll.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-DVvZYd17.cjs → NcAppSidebar-MYr8K1cN.cjs} +4 -4
- package/dist/chunks/{NcAppSidebar-DVvZYd17.cjs.map → NcAppSidebar-MYr8K1cN.cjs.map} +1 -1
- package/dist/chunks/{NcAvatar--JVA_B6Y.cjs → NcAvatar-C3s9tDzi.cjs} +12 -14
- package/dist/chunks/{NcAvatar--JVA_B6Y.cjs.map → NcAvatar-C3s9tDzi.cjs.map} +1 -1
- package/dist/chunks/{NcAvatar-DwORvUjC.mjs → NcAvatar-Db8tkJt9.mjs} +12 -14
- package/dist/chunks/{NcAvatar-DwORvUjC.mjs.map → NcAvatar-Db8tkJt9.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-B0ve-OJl.cjs → NcBreadcrumb-C2vGhFLp.cjs} +2 -2
- package/dist/chunks/{NcBreadcrumb-B0ve-OJl.cjs.map → NcBreadcrumb-C2vGhFLp.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-DPF3ELzz.mjs → NcBreadcrumb-CuKf9Utm.mjs} +2 -2
- package/dist/chunks/{NcBreadcrumb-DPF3ELzz.mjs.map → NcBreadcrumb-CuKf9Utm.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-C_XQLT-h.cjs → NcBreadcrumbs-BYnhLIRo.cjs} +4 -4
- package/dist/chunks/{NcBreadcrumbs-C_XQLT-h.cjs.map → NcBreadcrumbs-BYnhLIRo.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-CL_IHuT9.mjs → NcBreadcrumbs-DR2_1tNR.mjs} +4 -4
- package/dist/chunks/{NcBreadcrumbs-CL_IHuT9.mjs.map → NcBreadcrumbs-DR2_1tNR.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-DOxX6fqr.cjs → NcCheckboxRadioSwitch-DbK49DI7.cjs} +2 -2
- package/dist/chunks/{NcCheckboxRadioSwitch-DOxX6fqr.cjs.map → NcCheckboxRadioSwitch-DbK49DI7.cjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-BaMf0PDd.mjs → NcCheckboxRadioSwitch-Di9rSADK.mjs} +2 -2
- package/dist/chunks/{NcCheckboxRadioSwitch-BaMf0PDd.mjs.map → NcCheckboxRadioSwitch-Di9rSADK.mjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-DyZNTQFW.cjs → NcCollectionList-Co7MVk82.cjs} +6 -6
- package/dist/chunks/{NcCollectionList-DyZNTQFW.cjs.map → NcCollectionList-Co7MVk82.cjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-iHUm6owG.mjs → NcCollectionList-N169E0Rf.mjs} +6 -6
- package/dist/chunks/{NcCollectionList-iHUm6owG.mjs.map → NcCollectionList-N169E0Rf.mjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-CKIoVhox.cjs → NcColorPicker-BD9YqGfy.cjs} +4 -4
- package/dist/chunks/{NcColorPicker-CKIoVhox.cjs.map → NcColorPicker-BD9YqGfy.cjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-av-NHSU7.mjs → NcColorPicker-BzSsZRm3.mjs} +4 -4
- package/dist/chunks/{NcColorPicker-av-NHSU7.mjs.map → NcColorPicker-BzSsZRm3.mjs.map} +1 -1
- package/dist/chunks/{NcContent-EFEXh_OO.cjs → NcContent-4X_oNYtW.cjs} +3 -3
- package/dist/chunks/{NcContent-EFEXh_OO.cjs.map → NcContent-4X_oNYtW.cjs.map} +1 -1
- package/dist/chunks/{NcContent-uiwRXAwA.mjs → NcContent-BHl5YDYI.mjs} +3 -3
- package/dist/chunks/{NcContent-uiwRXAwA.mjs.map → NcContent-BHl5YDYI.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-3kbcJvFx.cjs → NcDashboardWidget-CInFASK-.cjs} +4 -4
- package/dist/chunks/{NcDashboardWidget-3kbcJvFx.cjs.map → NcDashboardWidget-CInFASK-.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-DDaM0QjK.mjs → NcDashboardWidget-DwWee7mc.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidget-DDaM0QjK.mjs.map → NcDashboardWidget-DwWee7mc.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-C44gZwCP.mjs → NcDashboardWidgetItem-Csgi1gF2.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-C44gZwCP.mjs.map → NcDashboardWidgetItem-Csgi1gF2.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-DOzM3reO.cjs → NcDashboardWidgetItem-IkaGY5B0.cjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-DOzM3reO.cjs.map → NcDashboardWidgetItem-IkaGY5B0.cjs.map} +1 -1
- package/dist/chunks/{NcDateTime-BfJVNppR.mjs → NcDateTime-BR6BBvML.mjs} +2 -2
- package/dist/chunks/{NcDateTime-BfJVNppR.mjs.map → NcDateTime-BR6BBvML.mjs.map} +1 -1
- package/dist/chunks/{NcDateTime-DNnBHGEQ.cjs → NcDateTime-C-kLQayi.cjs} +2 -2
- package/dist/chunks/{NcDateTime-DNnBHGEQ.cjs.map → NcDateTime-C-kLQayi.cjs.map} +1 -1
- package/dist/chunks/{NcDialog-DbCdhtw7.cjs → NcDialog-BjLJB7fW.cjs} +2 -2
- package/dist/chunks/{NcDialog-DbCdhtw7.cjs.map → NcDialog-BjLJB7fW.cjs.map} +1 -1
- package/dist/chunks/{NcDialog-D3Z5tp_6.mjs → NcDialog-D2lwwZL-.mjs} +2 -2
- package/dist/chunks/{NcDialog-D3Z5tp_6.mjs.map → NcDialog-D2lwwZL-.mjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-BhPydgMe.mjs → NcDialogButton-BB56HcBl.mjs} +3 -3
- package/dist/chunks/{NcDialogButton-BhPydgMe.mjs.map → NcDialogButton-BB56HcBl.mjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-CYsTKE2g.cjs → NcDialogButton-ByvLH63s.cjs} +3 -3
- package/dist/chunks/{NcDialogButton-CYsTKE2g.cjs.map → NcDialogButton-ByvLH63s.cjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-DPHhky3J.cjs → NcEmojiPicker-BLBi5V-V.cjs} +7 -7
- package/dist/chunks/{NcEmojiPicker-DPHhky3J.cjs.map → NcEmojiPicker-BLBi5V-V.cjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-C5HYxVqp.mjs → NcEmojiPicker-DyBFXXm7.mjs} +7 -7
- package/dist/chunks/{NcEmojiPicker-C5HYxVqp.mjs.map → NcEmojiPicker-DyBFXXm7.mjs.map} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-B_eOG2sZ.cjs → NcIconSvgWrapper-BlucK1g3.cjs} +27 -16
- package/dist/chunks/NcIconSvgWrapper-BlucK1g3.cjs.map +1 -0
- package/dist/chunks/{NcIconSvgWrapper-CHmdAuhg.mjs → NcIconSvgWrapper-RKuZn260.mjs} +28 -17
- package/dist/chunks/NcIconSvgWrapper-RKuZn260.mjs.map +1 -0
- package/dist/chunks/{NcInputConfirmCancel-CvV0tE6s.mjs → NcInputConfirmCancel-CacBXLGS.mjs} +2 -2
- package/dist/chunks/{NcInputConfirmCancel-CvV0tE6s.mjs.map → NcInputConfirmCancel-CacBXLGS.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-DRhv_CTt.cjs → NcInputConfirmCancel-lVLFwBA4.cjs} +2 -2
- package/dist/chunks/{NcInputConfirmCancel-DRhv_CTt.cjs.map → NcInputConfirmCancel-lVLFwBA4.cjs.map} +1 -1
- package/dist/chunks/{NcListItem-D5XlkLgC.cjs → NcListItem-B1cSkFFh.cjs} +2 -2
- package/dist/chunks/{NcListItem-D5XlkLgC.cjs.map → NcListItem-B1cSkFFh.cjs.map} +1 -1
- package/dist/chunks/{NcListItem-CA4CzIW8.mjs → NcListItem-BGoyHTZy.mjs} +2 -2
- package/dist/chunks/{NcListItem-CA4CzIW8.mjs.map → NcListItem-BGoyHTZy.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-DhENqcJ-.mjs → NcListItemIcon-BG5v_qys.mjs} +3 -3
- package/dist/chunks/{NcListItemIcon-DhENqcJ-.mjs.map → NcListItemIcon-BG5v_qys.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-DIJ0vvYv.cjs → NcListItemIcon-CF64acsf.cjs} +3 -3
- package/dist/chunks/{NcListItemIcon-DIJ0vvYv.cjs.map → NcListItemIcon-CF64acsf.cjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-DXJ93Wpz.cjs → NcPasswordField-BCzIotoB.cjs} +2 -2
- package/dist/chunks/{NcPasswordField-DXJ93Wpz.cjs.map → NcPasswordField-BCzIotoB.cjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-zMKko5oa.mjs → NcPasswordField-CTKHRVC4.mjs} +2 -2
- package/dist/chunks/{NcPasswordField-zMKko5oa.mjs.map → NcPasswordField-CTKHRVC4.mjs.map} +1 -1
- package/dist/chunks/{NcPopover-CA2Dalxs.cjs → NcPopover-Djf9_BrD.cjs} +2 -2
- package/dist/chunks/{NcPopover-CA2Dalxs.cjs.map → NcPopover-Djf9_BrD.cjs.map} +1 -1
- package/dist/chunks/{NcPopover-C9KlPo4Z.mjs → NcPopover-m0hDmALa.mjs} +2 -2
- package/dist/chunks/{NcPopover-C9KlPo4Z.mjs.map → NcPopover-m0hDmALa.mjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-X4vhm8hy.cjs → NcRelatedResourcesPanel-B-y_Wan4.cjs} +5 -5
- package/dist/chunks/{NcRelatedResourcesPanel-X4vhm8hy.cjs.map → NcRelatedResourcesPanel-B-y_Wan4.cjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-BxBE_1N3.mjs → NcRelatedResourcesPanel-CmiW_ds0.mjs} +5 -5
- package/dist/chunks/{NcRelatedResourcesPanel-BxBE_1N3.mjs.map → NcRelatedResourcesPanel-CmiW_ds0.mjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-CC4jGcJn.cjs → NcRichContenteditable-C6HRESuM.cjs} +22 -31
- package/dist/chunks/NcRichContenteditable-C6HRESuM.cjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-Ct8cG0U6.mjs → NcRichContenteditable-CE1hvtcT.mjs} +22 -31
- package/dist/chunks/NcRichContenteditable-CE1hvtcT.mjs.map +1 -0
- package/dist/chunks/{NcRichText-h1RHm2bK.mjs → NcRichText-D6qJ5S5v.mjs} +3 -3
- package/dist/chunks/{NcRichText-h1RHm2bK.mjs.map → NcRichText-D6qJ5S5v.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-Ck9Sk6wk.cjs → NcRichText-Oqj-vWQP.cjs} +3 -3
- package/dist/chunks/{NcRichText-Ck9Sk6wk.cjs.map → NcRichText-Oqj-vWQP.cjs.map} +1 -1
- package/dist/chunks/{NcSelect-vJq9dZPb.cjs → NcSelect-FLFfISt6.cjs} +25 -8
- package/dist/chunks/NcSelect-FLFfISt6.cjs.map +1 -0
- package/dist/chunks/{NcSelect-DrtYueu1.mjs → NcSelect-TmGBPLzc.mjs} +25 -8
- package/dist/chunks/NcSelect-TmGBPLzc.mjs.map +1 -0
- package/dist/chunks/{NcSelectTags-DvVm-C1N.cjs → NcSelectTags-BIEfsajL.cjs} +3 -3
- package/dist/chunks/{NcSelectTags-DvVm-C1N.cjs.map → NcSelectTags-BIEfsajL.cjs.map} +1 -1
- package/dist/chunks/{NcSelectTags--4zU4C41.mjs → NcSelectTags-li-HYR2n.mjs} +3 -3
- package/dist/chunks/{NcSelectTags--4zU4C41.mjs.map → NcSelectTags-li-HYR2n.mjs.map} +1 -1
- package/dist/chunks/NcSelectUsers-BQO_sQJ8.mjs +188 -0
- package/dist/chunks/NcSelectUsers-BQO_sQJ8.mjs.map +1 -0
- package/dist/chunks/NcSelectUsers-yQZZACfZ.cjs +187 -0
- package/dist/chunks/NcSelectUsers-yQZZACfZ.cjs.map +1 -0
- package/dist/chunks/{NcSettingsInputText-8EcoOEIo.cjs → NcSettingsInputText-BU1_SHOq.cjs} +3 -3
- package/dist/chunks/{NcSettingsInputText-8EcoOEIo.cjs.map → NcSettingsInputText-BU1_SHOq.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-DKscbkn_.mjs → NcSettingsInputText-t1FMnLKA.mjs} +3 -3
- package/dist/chunks/{NcSettingsInputText-DKscbkn_.mjs.map → NcSettingsInputText-t1FMnLKA.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-DW5u2qWg.cjs → NcSettingsSection-Dcdxs1IN.cjs} +2 -2
- package/dist/chunks/{NcSettingsSection-DW5u2qWg.cjs.map → NcSettingsSection-Dcdxs1IN.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-DP3xDXrA.mjs → NcSettingsSection-EC3SmiDX.mjs} +2 -2
- package/dist/chunks/{NcSettingsSection-DP3xDXrA.mjs.map → NcSettingsSection-EC3SmiDX.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-DmnTgIg5.cjs → NcSettingsSelectGroup-BZCbUSci.cjs} +4 -4
- package/dist/chunks/{NcSettingsSelectGroup-DmnTgIg5.cjs.map → NcSettingsSelectGroup-BZCbUSci.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-DHuru8HO.mjs → NcSettingsSelectGroup-dzvfki-M.mjs} +4 -4
- package/dist/chunks/{NcSettingsSelectGroup-DHuru8HO.mjs.map → NcSettingsSelectGroup-dzvfki-M.mjs.map} +1 -1
- package/dist/chunks/{NcTextField-DpLIIKYI.mjs → NcTextField-DRANdaIf.mjs} +3 -3
- package/dist/chunks/{NcTextField-DpLIIKYI.mjs.map → NcTextField-DRANdaIf.mjs.map} +1 -1
- package/dist/chunks/{NcTextField-rilWP68p.cjs → NcTextField-Uk5iD8o2.cjs} +3 -3
- package/dist/chunks/{NcTextField-rilWP68p.cjs.map → NcTextField-Uk5iD8o2.cjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-CGuLj6Bs.mjs → NcTimezonePicker-C17Rji1h.mjs} +4 -4
- package/dist/chunks/{NcTimezonePicker-CGuLj6Bs.mjs.map → NcTimezonePicker-C17Rji1h.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-CQkZVQOW.cjs → NcTimezonePicker-DZ4evH1Q.cjs} +4 -4
- package/dist/chunks/{NcTimezonePicker-CQkZVQOW.cjs.map → NcTimezonePicker-DZ4evH1Q.cjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-Du4ecEXq.cjs → NcUserBubble-Cu4Jzq9u.cjs} +3 -3
- package/dist/chunks/{NcUserBubble-Du4ecEXq.cjs.map → NcUserBubble-Cu4Jzq9u.cjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-X7NIiLjg.mjs → NcUserBubble-cO5krePG.mjs} +3 -3
- package/dist/chunks/{NcUserBubble-X7NIiLjg.mjs.map → NcUserBubble-cO5krePG.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-D1Mw6nKB.mjs → NcUserStatusIcon-WEKmuaoU.mjs} +3 -3
- package/dist/chunks/{NcUserStatusIcon-D1Mw6nKB.mjs.map → NcUserStatusIcon-WEKmuaoU.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-Cy942iqr.cjs → NcUserStatusIcon-cs42Lzdd.cjs} +3 -3
- package/dist/chunks/{NcUserStatusIcon-Cy942iqr.cjs.map → NcUserStatusIcon-cs42Lzdd.cjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-Dw8Duyxn.mjs → ScopeComponent-B97avXP9.mjs} +2 -2
- package/dist/chunks/{ScopeComponent-Dw8Duyxn.mjs.map → ScopeComponent-B97avXP9.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-Uz_pNcsJ.cjs → ScopeComponent-CrVWjyKO.cjs} +2 -2
- package/dist/chunks/{ScopeComponent-Uz_pNcsJ.cjs.map → ScopeComponent-CrVWjyKO.cjs.map} +1 -1
- package/dist/chunks/{_l10n-DINju8Lo.cjs → _l10n-BiiXtYiP.cjs} +22 -18
- package/dist/chunks/{_l10n-DINju8Lo.cjs.map → _l10n-BiiXtYiP.cjs.map} +1 -1
- package/dist/chunks/{_l10n-DKne-gFg.mjs → _l10n-Dt0m9Fxw.mjs} +70 -66
- package/dist/chunks/_l10n-Dt0m9Fxw.mjs.map +1 -0
- package/dist/chunks/mdi-CZJxQPz6.mjs +9 -0
- package/dist/chunks/mdi-CZJxQPz6.mjs.map +1 -0
- package/dist/chunks/mdi-Da9VuUVq.cjs +8 -0
- package/dist/chunks/mdi-Da9VuUVq.cjs.map +1 -0
- package/dist/chunks/{referencePickerModal-DTLuXI-A.mjs → referencePickerModal-CMKHbYwz.mjs} +6 -6
- package/dist/chunks/{referencePickerModal-DTLuXI-A.mjs.map → referencePickerModal-CMKHbYwz.mjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-CIO6RuJz.cjs → referencePickerModal-TV83KedC.cjs} +6 -6
- package/dist/chunks/{referencePickerModal-CIO6RuJz.cjs.map → referencePickerModal-TV83KedC.cjs.map} +1 -1
- package/dist/chunks/{usernameToColor-DLOoqQAF.mjs → usernameToColor-DJfepfog.mjs} +2 -2
- package/dist/chunks/{usernameToColor-DLOoqQAF.mjs.map → usernameToColor-DJfepfog.mjs.map} +1 -1
- package/dist/chunks/{usernameToColor-BiO_8cQo.cjs → usernameToColor-mqInDrGv.cjs} +2 -2
- package/dist/chunks/{usernameToColor-BiO_8cQo.cjs.map → usernameToColor-mqInDrGv.cjs.map} +1 -1
- package/dist/index.cjs +48 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +50 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/ChevronLeft-BK4j9oVH.mjs +0 -38
- package/dist/chunks/ChevronLeft-BK4j9oVH.mjs.map +0 -1
- package/dist/chunks/ChevronLeft-CAiEPWc5.cjs +0 -37
- package/dist/chunks/ChevronLeft-CAiEPWc5.cjs.map +0 -1
- package/dist/chunks/NcActionButton-BFxArTsE.mjs.map +0 -1
- package/dist/chunks/NcActionButton-ChQFsL4S.cjs.map +0 -1
- package/dist/chunks/NcAppContent-DiOscHZ8.mjs.map +0 -1
- package/dist/chunks/NcAppContent-PC4RbdhU.cjs.map +0 -1
- package/dist/chunks/NcIconSvgWrapper-B_eOG2sZ.cjs.map +0 -1
- package/dist/chunks/NcIconSvgWrapper-CHmdAuhg.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-CC4jGcJn.cjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-Ct8cG0U6.mjs.map +0 -1
- package/dist/chunks/NcSelect-DrtYueu1.mjs.map +0 -1
- package/dist/chunks/NcSelect-vJq9dZPb.cjs.map +0 -1
- package/dist/chunks/_l10n-DKne-gFg.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const NcCollectionList = require("../chunks/NcCollectionList-
|
|
2
|
+
const NcCollectionList = require("../chunks/NcCollectionList-Co7MVk82.cjs");
|
|
3
3
|
module.exports = NcCollectionList.NcCollectionList;
|
|
4
4
|
//# sourceMappingURL=NcCollectionList.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const NcDashboardWidget = require("../chunks/NcDashboardWidget-
|
|
2
|
+
const NcDashboardWidget = require("../chunks/NcDashboardWidget-CInFASK-.cjs");
|
|
3
3
|
module.exports = NcDashboardWidget.NcDashboardWidget;
|
|
4
4
|
//# sourceMappingURL=NcDashboardWidget.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const NcDashboardWidgetItem = require("../chunks/NcDashboardWidgetItem-
|
|
2
|
+
const NcDashboardWidgetItem = require("../chunks/NcDashboardWidgetItem-IkaGY5B0.cjs");
|
|
3
3
|
module.exports = NcDashboardWidgetItem.NcDashboardWidgetItem;
|
|
4
4
|
//# sourceMappingURL=NcDashboardWidgetItem.cjs.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
require('../assets/NcDateTimePicker-
|
|
1
|
+
require('../assets/NcDateTimePicker-HmPjr-d7.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const _l10n = require("../chunks/_l10n-
|
|
3
|
+
const _l10n = require("../chunks/_l10n-BiiXtYiP.cjs");
|
|
4
4
|
const GenRandomId = require("../chunks/GenRandomId-BQDud3d4.cjs");
|
|
5
5
|
const useModelMigration = require("../chunks/useModelMigration-D5zhrNXr.cjs");
|
|
6
|
-
const NcTimezonePicker = require("../chunks/NcTimezonePicker-
|
|
7
|
-
const NcPopover = require("../chunks/NcPopover-
|
|
6
|
+
const NcTimezonePicker = require("../chunks/NcTimezonePicker-DZ4evH1Q.cjs");
|
|
7
|
+
const NcPopover = require("../chunks/NcPopover-Djf9_BrD.cjs");
|
|
8
8
|
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
9
9
|
const l10n = require("@nextcloud/l10n");
|
|
10
10
|
const DatePicker = require("vue2-datepicker");
|
|
11
|
-
const ScopeComponent = require("../chunks/ScopeComponent-
|
|
11
|
+
const ScopeComponent = require("../chunks/ScopeComponent-CrVWjyKO.cjs");
|
|
12
12
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
13
13
|
const DatePicker__default = /* @__PURE__ */ _interopDefault(DatePicker);
|
|
14
|
-
_l10n.register(_l10n.
|
|
14
|
+
_l10n.register(_l10n.t37);
|
|
15
15
|
const _sfc_main$2 = {
|
|
16
16
|
name: "CalendarBlankIcon",
|
|
17
17
|
emits: ["click"],
|
|
@@ -109,14 +109,25 @@ const _sfc_main = {
|
|
|
109
109
|
type: Number,
|
|
110
110
|
default: 10
|
|
111
111
|
},
|
|
112
|
+
/**
|
|
113
|
+
* Since 8.25.0: Support 'date-range', 'time-range' and 'datetime-range' values.
|
|
114
|
+
*/
|
|
112
115
|
type: {
|
|
113
116
|
type: String,
|
|
114
|
-
default: "date"
|
|
117
|
+
default: "date",
|
|
118
|
+
validator: (type) => ["date", "time", "datetime", "week", "month", "year", "date-range", "time-range", "datetime-range"].includes(type)
|
|
115
119
|
},
|
|
120
|
+
/**
|
|
121
|
+
* Either `moment.js` formatting tokens or a function taking a Date object and returning a string.
|
|
122
|
+
* Warning: In v9 this will change the accepted token format to standardized Unicode tokens instead!
|
|
123
|
+
*/
|
|
116
124
|
format: {
|
|
117
|
-
type: String,
|
|
125
|
+
type: [String, Function],
|
|
118
126
|
default: null
|
|
119
127
|
},
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated use `format` instead
|
|
130
|
+
*/
|
|
120
131
|
formatter: {
|
|
121
132
|
type: Object,
|
|
122
133
|
default: null
|
|
@@ -168,6 +179,13 @@ const _sfc_main = {
|
|
|
168
179
|
placeholder: {
|
|
169
180
|
type: String,
|
|
170
181
|
default: null
|
|
182
|
+
},
|
|
183
|
+
/**
|
|
184
|
+
* @deprecated use the 'date-range' or 'datetime-range' type instead.
|
|
185
|
+
*/
|
|
186
|
+
range: {
|
|
187
|
+
type: Boolean,
|
|
188
|
+
default: false
|
|
171
189
|
}
|
|
172
190
|
},
|
|
173
191
|
emits: [
|
|
@@ -195,6 +213,9 @@ const _sfc_main = {
|
|
|
195
213
|
};
|
|
196
214
|
},
|
|
197
215
|
computed: {
|
|
216
|
+
realType() {
|
|
217
|
+
return this.type.split("-")[0];
|
|
218
|
+
},
|
|
198
219
|
/**
|
|
199
220
|
* Datepicker language
|
|
200
221
|
* https://github.com/mengxiong10/vue2-datepicker/blob/master/locale.md
|
|
@@ -221,31 +242,34 @@ const _sfc_main = {
|
|
|
221
242
|
* @return {string}
|
|
222
243
|
*/
|
|
223
244
|
defaultPlaceholder() {
|
|
224
|
-
if (this.
|
|
245
|
+
if (this.realType === "time") {
|
|
225
246
|
return _l10n.t("Pick a time");
|
|
226
247
|
}
|
|
227
|
-
if (this.
|
|
248
|
+
if (this.realType === "month") {
|
|
228
249
|
return _l10n.t("Pick a month");
|
|
229
250
|
}
|
|
230
|
-
if (this.
|
|
251
|
+
if (this.realType === "year") {
|
|
231
252
|
return _l10n.t("Pick a year");
|
|
232
253
|
}
|
|
233
|
-
if (this.
|
|
254
|
+
if (this.realType === "week") {
|
|
234
255
|
return _l10n.t("Pick a week");
|
|
235
256
|
}
|
|
236
|
-
if (this.
|
|
257
|
+
if (this.realType === "date") {
|
|
237
258
|
return _l10n.t("Pick a date");
|
|
238
259
|
}
|
|
239
260
|
return _l10n.t("Pick a date and a time");
|
|
240
261
|
},
|
|
241
262
|
/**
|
|
242
|
-
*
|
|
243
|
-
* or fallback to 'date'
|
|
244
|
-
*
|
|
245
|
-
* @return {string}
|
|
263
|
+
* Is the range picker enabled
|
|
246
264
|
*/
|
|
247
|
-
|
|
248
|
-
return
|
|
265
|
+
internalRange() {
|
|
266
|
+
return this.range || this.type.endsWith("-range");
|
|
267
|
+
},
|
|
268
|
+
internalFormat() {
|
|
269
|
+
if (this.format && typeof this.format === "string") {
|
|
270
|
+
return this.format;
|
|
271
|
+
}
|
|
272
|
+
return formatMap[this.realType] || formatMap.date;
|
|
249
273
|
},
|
|
250
274
|
/**
|
|
251
275
|
* The formatter used for the vue-datepicker to fix nextcloud-libraries/nextcloud-vue#5044
|
|
@@ -259,6 +283,8 @@ const _sfc_main = {
|
|
|
259
283
|
};
|
|
260
284
|
return {
|
|
261
285
|
getWeek,
|
|
286
|
+
// wrape the format if it is a function
|
|
287
|
+
...typeof this.format === "function" ? { stringify: this.format } : {},
|
|
262
288
|
// allow to override it by users using the `formatter` prop
|
|
263
289
|
...this.formatter ?? {}
|
|
264
290
|
};
|
|
@@ -301,7 +327,7 @@ const _sfc_main = {
|
|
|
301
327
|
};
|
|
302
328
|
var _sfc_render = function render3() {
|
|
303
329
|
var _vm = this, _c = _vm._self._c;
|
|
304
|
-
return _c("DatePicker", _vm._g(_vm._b({ ref: "datepicker", attrs: { "append-to-body": _vm.appendToBody, "clearable": _vm.clearable, "format": _vm.
|
|
330
|
+
return _c("DatePicker", _vm._g(_vm._b({ ref: "datepicker", attrs: { "append-to-body": _vm.appendToBody, "clearable": _vm.clearable, "format": _vm.internalFormat, "formatter": _vm.internalFormatter, "lang": _vm.lang ? _vm.lang : _vm.defaultLang, "minute-step": _vm.minuteStep, "placeholder": _vm.placeholder ? _vm.placeholder : _vm.defaultPlaceholder, "popup-class": { "show-week-number": _vm.showWeekNumber }, "range": _vm.internalRange, "show-week-number": _vm.showWeekNumber, "type": _vm.realType, "value": _vm.model }, on: { "select-year": _vm.handleSelectYear, "select-month": _vm.handleSelectMonth, "input": function($event) {
|
|
305
331
|
_vm.model = $event;
|
|
306
332
|
} }, scopedSlots: _vm._u([{ key: "icon-calendar", fn: function() {
|
|
307
333
|
return [_vm.showTimezoneSelect ? _c("NcPopover", { attrs: { "popup-role": "dialog", "shown": _vm.showTimezonePopover, "popover-base-class": "timezone-select__popper" }, on: { "update:shown": function($event) {
|
|
@@ -331,7 +357,7 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
331
357
|
_sfc_staticRenderFns,
|
|
332
358
|
false,
|
|
333
359
|
null,
|
|
334
|
-
"
|
|
360
|
+
"9cec8c69"
|
|
335
361
|
);
|
|
336
362
|
const NcDateTimePicker = __component__.exports;
|
|
337
363
|
ScopeComponent.ScopeComponent(NcDateTimePicker);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDateTimePicker.cjs","sources":["../../node_modules/vue-material-design-icons/CalendarBlank.vue","../../node_modules/vue-material-design-icons/Web.vue","../../src/components/NcDateTimePicker/NcDateTimePicker.vue","../../src/components/NcDateTimePicker/index.js"],"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 - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n> We're wrapping the awesome datepicker library here https://github.com/mengxiong10/vue2-datepicker\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\t:timezone-id.sync=\"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=\"model\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@select-year=\"handleSelectYear\"\n\t\t@select-month=\"handleSelectMonth\"\n\t\t@input=\"model = $event\">\n\t\t<template #icon-calendar>\n\t\t\t<NcPopover v-if=\"showTimezoneSelect\"\n\t\t\t\tpopup-role=\"dialog\"\n\t\t\t\t:shown.sync=\"showTimezonePopover\"\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 v-model=\"tzVal\"\n\t\t\t\t\t\tclass=\"timezone-popover-wrapper__timezone-select\"\n\t\t\t\t\t\t@input=\"$emit('update:timezone-id', arguments[0])\" />\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 $scopedSlots\" #[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'\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\n\nimport NcTimezonePicker from '../NcTimezonePicker/index.js'\nimport NcPopover from '../NcPopover/index.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 'vue2-datepicker'\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 {\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\tinheritAttrs: false,\n\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\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 * Removed in v9 - use `modelValue` (`v-model`) instead\n\t\t * @deprecated\n\t\t */\n\t\t// eslint-disable-next-line\n\t\tvalue: {\n\t\t\tdefault: undefined,\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 the .sync modifier.\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/**\n\t\t * Removed in v9 - use `update:modelValue` (`v-model`) instead\n\t\t * @deprecated\n\t\t */\n\t\t'update:value',\n\t\t'update:modelValue',\n\t\t/** Same as update:modelValue for Vue 2 compatibility */\n\t\t'update:model-value',\n\t\t'update:timezone-id',\n\t],\n\n\tsetup() {\n\t\tconst model = useModelMigration('value', 'update:value')\n\t\treturn {\n\t\t\tmodel,\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: 'MMMM',\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</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&.select {\n\t\t\t\t\tmin-width: 246px;\n\t\t\t\t\tleft: -8px !important;\n\t\t\t\t}\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 !important;\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport './index.scss'\nimport NcDateTimePicker from './NcDateTimePicker.vue'\nimport ScopeComponent from '../../utils/ScopeComponent.js'\n\nScopeComponent(NcDateTimePicker)\n\nexport default NcDateTimePicker\n"],"names":["_sfc_main","DatePicker","NcPopover","NcTimezonePicker","useModelMigration","GenRandomId","getMonthNames","getMonthNamesShort","getDayNames","getDayNamesShort","getDayNamesMin","getFirstDay","t","ScopeComponent"],"mappings":";;;;;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;AChBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA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AAA,IAAA,KAAA,IAAA,KAAA,KAAA,EAAA,SAAA,KAAA,CAAA;AACA,eAAA,MAAA,WAAA,WAAA,IAAA;AAAA,QACA,SAAA,OAAA;AACA,kBAAA,MAAA,iBAAA,OAAA,KAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,wBAAA;AACA,UAAA,CAAA,KAAA,oBAAA;AAEA;AAAA,MACA;AAEA,WAAA,sBAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChbAC,eAAAA,eAAe,gBAAgB;;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"NcDateTimePicker.cjs","sources":["../../node_modules/vue-material-design-icons/CalendarBlank.vue","../../node_modules/vue-material-design-icons/Web.vue","../../src/components/NcDateTimePicker/NcDateTimePicker.vue","../../src/components/NcDateTimePicker/index.js"],"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 - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n> In version 8 we were wrapping the awesome [vue2 datepicker library](https://github.com/mengxiong10/vue2-datepicker),\n> were you could use all of there options even with this component.\n> In version 9 and above this component will no longer be a transparent wrapper,\n> as such only the documented properties below will work.\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\ttype=\"date-range\" />\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\t:timezone-id.sync=\"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=\"internalFormat\"\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:range=\"internalRange\"\n\t\t:show-week-number=\"showWeekNumber\"\n\t\t:type=\"realType\"\n\t\t:value=\"model\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@select-year=\"handleSelectYear\"\n\t\t@select-month=\"handleSelectMonth\"\n\t\t@input=\"model = $event\">\n\t\t<template #icon-calendar>\n\t\t\t<NcPopover v-if=\"showTimezoneSelect\"\n\t\t\t\tpopup-role=\"dialog\"\n\t\t\t\t:shown.sync=\"showTimezonePopover\"\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 v-model=\"tzVal\"\n\t\t\t\t\t\tclass=\"timezone-popover-wrapper__timezone-select\"\n\t\t\t\t\t\t@input=\"$emit('update:timezone-id', arguments[0])\" />\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 $scopedSlots\" #[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'\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\n\nimport NcTimezonePicker from '../NcTimezonePicker/index.js'\nimport NcPopover from '../NcPopover/index.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 'vue2-datepicker'\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 {\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\tinheritAttrs: false,\n\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\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\t/**\n\t\t * Since 8.25.0: Support 'date-range', 'time-range' and 'datetime-range' values.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date',\n\t\t\tvalidator: (type) => ['date', 'time', 'datetime', 'week', 'month', 'year', 'date-range', 'time-range', 'datetime-range'].includes(type),\n\t\t},\n\n\t\t/**\n\t\t * Either `moment.js` formatting tokens or a function taking a Date object and returning a string.\n\t\t * Warning: In v9 this will change the accepted token format to standardized Unicode tokens instead!\n\t\t */\n\t\tformat: {\n\t\t\ttype: [String, Function],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * @deprecated use `format` instead\n\t\t */\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 * Removed in v9 - use `modelValue` (`v-model`) instead\n\t\t * @deprecated\n\t\t */\n\t\t// eslint-disable-next-line\n\t\tvalue: {\n\t\t\tdefault: undefined,\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 the .sync modifier.\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\n\t\t/**\n\t\t * @deprecated use the 'date-range' or 'datetime-range' type instead.\n\t\t */\n\t\trange: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t/**\n\t\t * Removed in v9 - use `update:modelValue` (`v-model`) instead\n\t\t * @deprecated\n\t\t */\n\t\t'update:value',\n\t\t'update:modelValue',\n\t\t/** Same as update:modelValue for Vue 2 compatibility */\n\t\t'update:model-value',\n\t\t'update:timezone-id',\n\t],\n\n\tsetup() {\n\t\tconst model = useModelMigration('value', 'update:value')\n\t\treturn {\n\t\t\tmodel,\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\trealType() {\n\t\t\treturn this.type.split('-')[0]\n\t\t},\n\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: 'MMMM',\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.realType === 'time') {\n\t\t\t\treturn t('Pick a time')\n\t\t\t}\n\t\t\tif (this.realType === 'month') {\n\t\t\t\treturn t('Pick a month')\n\t\t\t}\n\t\t\tif (this.realType === 'year') {\n\t\t\t\treturn t('Pick a year')\n\t\t\t}\n\t\t\tif (this.realType === 'week') {\n\t\t\t\treturn t('Pick a week')\n\t\t\t}\n\t\t\tif (this.realType === '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 * Is the range picker enabled\n\t\t */\n\t\tinternalRange() {\n\t\t\treturn this.range || this.type.endsWith('-range')\n\t\t},\n\n\t\tinternalFormat() {\n\t\t\tif (this.format && typeof this.format === 'string') {\n\t\t\t\treturn this.format\n\t\t\t}\n\t\t\treturn formatMap[this.realType] || 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// wrape the format if it is a function\n\t\t\t\t...(typeof this.format === 'function' ? { stringify: this.format } : {}),\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</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&.select {\n\t\t\t\t\tmin-width: 246px;\n\t\t\t\t\tleft: -8px !important;\n\t\t\t\t}\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 !important;\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport './index.scss'\nimport NcDateTimePicker from './NcDateTimePicker.vue'\nimport ScopeComponent from '../../utils/ScopeComponent.js'\n\nScopeComponent(NcDateTimePicker)\n\nexport default NcDateTimePicker\n"],"names":["_sfc_main","DatePicker","NcPopover","NcTimezonePicker","useModelMigration","GenRandomId","getMonthNames","getMonthNamesShort","getDayNames","getDayNamesShort","getDayNamesMin","getFirstDay","t","ScopeComponent"],"mappings":";;;;;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;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assets/NcDateTimePicker-HmPjr-d7.css';
|
|
2
|
+
import { r as register, K as t37, a as t } from "../chunks/_l10n-Dt0m9Fxw.mjs";
|
|
3
3
|
import { G as GenRandomId } from "../chunks/GenRandomId-CMooMQt0.mjs";
|
|
4
4
|
import { u as useModelMigration } from "../chunks/useModelMigration-EhAWvqDD.mjs";
|
|
5
|
-
import { N as NcTimezonePicker } from "../chunks/NcTimezonePicker-
|
|
6
|
-
import { N as NcPopover } from "../chunks/NcPopover-
|
|
5
|
+
import { N as NcTimezonePicker } from "../chunks/NcTimezonePicker-C17Rji1h.mjs";
|
|
6
|
+
import { N as NcPopover } from "../chunks/NcPopover-m0hDmALa.mjs";
|
|
7
7
|
import { n as normalizeComponent } from "../chunks/_plugin-vue2_normalizer-DU4iP6Vu.mjs";
|
|
8
8
|
import { getFirstDay, getDayNamesMin, getDayNamesShort, getDayNames, getMonthNamesShort, getMonthNames } from "@nextcloud/l10n";
|
|
9
9
|
import DatePicker from "vue2-datepicker";
|
|
10
|
-
import { S as ScopeComponent } from "../chunks/ScopeComponent-
|
|
11
|
-
register(
|
|
10
|
+
import { S as ScopeComponent } from "../chunks/ScopeComponent-B97avXP9.mjs";
|
|
11
|
+
register(t37);
|
|
12
12
|
const _sfc_main$2 = {
|
|
13
13
|
name: "CalendarBlankIcon",
|
|
14
14
|
emits: ["click"],
|
|
@@ -106,14 +106,25 @@ const _sfc_main = {
|
|
|
106
106
|
type: Number,
|
|
107
107
|
default: 10
|
|
108
108
|
},
|
|
109
|
+
/**
|
|
110
|
+
* Since 8.25.0: Support 'date-range', 'time-range' and 'datetime-range' values.
|
|
111
|
+
*/
|
|
109
112
|
type: {
|
|
110
113
|
type: String,
|
|
111
|
-
default: "date"
|
|
114
|
+
default: "date",
|
|
115
|
+
validator: (type) => ["date", "time", "datetime", "week", "month", "year", "date-range", "time-range", "datetime-range"].includes(type)
|
|
112
116
|
},
|
|
117
|
+
/**
|
|
118
|
+
* Either `moment.js` formatting tokens or a function taking a Date object and returning a string.
|
|
119
|
+
* Warning: In v9 this will change the accepted token format to standardized Unicode tokens instead!
|
|
120
|
+
*/
|
|
113
121
|
format: {
|
|
114
|
-
type: String,
|
|
122
|
+
type: [String, Function],
|
|
115
123
|
default: null
|
|
116
124
|
},
|
|
125
|
+
/**
|
|
126
|
+
* @deprecated use `format` instead
|
|
127
|
+
*/
|
|
117
128
|
formatter: {
|
|
118
129
|
type: Object,
|
|
119
130
|
default: null
|
|
@@ -165,6 +176,13 @@ const _sfc_main = {
|
|
|
165
176
|
placeholder: {
|
|
166
177
|
type: String,
|
|
167
178
|
default: null
|
|
179
|
+
},
|
|
180
|
+
/**
|
|
181
|
+
* @deprecated use the 'date-range' or 'datetime-range' type instead.
|
|
182
|
+
*/
|
|
183
|
+
range: {
|
|
184
|
+
type: Boolean,
|
|
185
|
+
default: false
|
|
168
186
|
}
|
|
169
187
|
},
|
|
170
188
|
emits: [
|
|
@@ -192,6 +210,9 @@ const _sfc_main = {
|
|
|
192
210
|
};
|
|
193
211
|
},
|
|
194
212
|
computed: {
|
|
213
|
+
realType() {
|
|
214
|
+
return this.type.split("-")[0];
|
|
215
|
+
},
|
|
195
216
|
/**
|
|
196
217
|
* Datepicker language
|
|
197
218
|
* https://github.com/mengxiong10/vue2-datepicker/blob/master/locale.md
|
|
@@ -218,31 +239,34 @@ const _sfc_main = {
|
|
|
218
239
|
* @return {string}
|
|
219
240
|
*/
|
|
220
241
|
defaultPlaceholder() {
|
|
221
|
-
if (this.
|
|
242
|
+
if (this.realType === "time") {
|
|
222
243
|
return t("Pick a time");
|
|
223
244
|
}
|
|
224
|
-
if (this.
|
|
245
|
+
if (this.realType === "month") {
|
|
225
246
|
return t("Pick a month");
|
|
226
247
|
}
|
|
227
|
-
if (this.
|
|
248
|
+
if (this.realType === "year") {
|
|
228
249
|
return t("Pick a year");
|
|
229
250
|
}
|
|
230
|
-
if (this.
|
|
251
|
+
if (this.realType === "week") {
|
|
231
252
|
return t("Pick a week");
|
|
232
253
|
}
|
|
233
|
-
if (this.
|
|
254
|
+
if (this.realType === "date") {
|
|
234
255
|
return t("Pick a date");
|
|
235
256
|
}
|
|
236
257
|
return t("Pick a date and a time");
|
|
237
258
|
},
|
|
238
259
|
/**
|
|
239
|
-
*
|
|
240
|
-
* or fallback to 'date'
|
|
241
|
-
*
|
|
242
|
-
* @return {string}
|
|
260
|
+
* Is the range picker enabled
|
|
243
261
|
*/
|
|
244
|
-
|
|
245
|
-
return
|
|
262
|
+
internalRange() {
|
|
263
|
+
return this.range || this.type.endsWith("-range");
|
|
264
|
+
},
|
|
265
|
+
internalFormat() {
|
|
266
|
+
if (this.format && typeof this.format === "string") {
|
|
267
|
+
return this.format;
|
|
268
|
+
}
|
|
269
|
+
return formatMap[this.realType] || formatMap.date;
|
|
246
270
|
},
|
|
247
271
|
/**
|
|
248
272
|
* The formatter used for the vue-datepicker to fix nextcloud-libraries/nextcloud-vue#5044
|
|
@@ -256,6 +280,8 @@ const _sfc_main = {
|
|
|
256
280
|
};
|
|
257
281
|
return {
|
|
258
282
|
getWeek,
|
|
283
|
+
// wrape the format if it is a function
|
|
284
|
+
...typeof this.format === "function" ? { stringify: this.format } : {},
|
|
259
285
|
// allow to override it by users using the `formatter` prop
|
|
260
286
|
...this.formatter ?? {}
|
|
261
287
|
};
|
|
@@ -298,7 +324,7 @@ const _sfc_main = {
|
|
|
298
324
|
};
|
|
299
325
|
var _sfc_render = function render3() {
|
|
300
326
|
var _vm = this, _c = _vm._self._c;
|
|
301
|
-
return _c("DatePicker", _vm._g(_vm._b({ ref: "datepicker", attrs: { "append-to-body": _vm.appendToBody, "clearable": _vm.clearable, "format": _vm.
|
|
327
|
+
return _c("DatePicker", _vm._g(_vm._b({ ref: "datepicker", attrs: { "append-to-body": _vm.appendToBody, "clearable": _vm.clearable, "format": _vm.internalFormat, "formatter": _vm.internalFormatter, "lang": _vm.lang ? _vm.lang : _vm.defaultLang, "minute-step": _vm.minuteStep, "placeholder": _vm.placeholder ? _vm.placeholder : _vm.defaultPlaceholder, "popup-class": { "show-week-number": _vm.showWeekNumber }, "range": _vm.internalRange, "show-week-number": _vm.showWeekNumber, "type": _vm.realType, "value": _vm.model }, on: { "select-year": _vm.handleSelectYear, "select-month": _vm.handleSelectMonth, "input": function($event) {
|
|
302
328
|
_vm.model = $event;
|
|
303
329
|
} }, scopedSlots: _vm._u([{ key: "icon-calendar", fn: function() {
|
|
304
330
|
return [_vm.showTimezoneSelect ? _c("NcPopover", { attrs: { "popup-role": "dialog", "shown": _vm.showTimezonePopover, "popover-base-class": "timezone-select__popper" }, on: { "update:shown": function($event) {
|
|
@@ -328,7 +354,7 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
|
328
354
|
_sfc_staticRenderFns,
|
|
329
355
|
false,
|
|
330
356
|
null,
|
|
331
|
-
"
|
|
357
|
+
"9cec8c69"
|
|
332
358
|
);
|
|
333
359
|
const NcDateTimePicker = __component__.exports;
|
|
334
360
|
ScopeComponent(NcDateTimePicker);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDateTimePicker.mjs","sources":["../../node_modules/vue-material-design-icons/CalendarBlank.vue","../../node_modules/vue-material-design-icons/Web.vue","../../src/components/NcDateTimePicker/NcDateTimePicker.vue","../../src/components/NcDateTimePicker/index.js"],"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 - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n> We're wrapping the awesome datepicker library here https://github.com/mengxiong10/vue2-datepicker\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\t:timezone-id.sync=\"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=\"model\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@select-year=\"handleSelectYear\"\n\t\t@select-month=\"handleSelectMonth\"\n\t\t@input=\"model = $event\">\n\t\t<template #icon-calendar>\n\t\t\t<NcPopover v-if=\"showTimezoneSelect\"\n\t\t\t\tpopup-role=\"dialog\"\n\t\t\t\t:shown.sync=\"showTimezonePopover\"\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 v-model=\"tzVal\"\n\t\t\t\t\t\tclass=\"timezone-popover-wrapper__timezone-select\"\n\t\t\t\t\t\t@input=\"$emit('update:timezone-id', arguments[0])\" />\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 $scopedSlots\" #[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'\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\n\nimport NcTimezonePicker from '../NcTimezonePicker/index.js'\nimport NcPopover from '../NcPopover/index.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 'vue2-datepicker'\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 {\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\tinheritAttrs: false,\n\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\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 * Removed in v9 - use `modelValue` (`v-model`) instead\n\t\t * @deprecated\n\t\t */\n\t\t// eslint-disable-next-line\n\t\tvalue: {\n\t\t\tdefault: undefined,\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 the .sync modifier.\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/**\n\t\t * Removed in v9 - use `update:modelValue` (`v-model`) instead\n\t\t * @deprecated\n\t\t */\n\t\t'update:value',\n\t\t'update:modelValue',\n\t\t/** Same as update:modelValue for Vue 2 compatibility */\n\t\t'update:model-value',\n\t\t'update:timezone-id',\n\t],\n\n\tsetup() {\n\t\tconst model = useModelMigration('value', 'update:value')\n\t\treturn {\n\t\t\tmodel,\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: 'MMMM',\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</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&.select {\n\t\t\t\t\tmin-width: 246px;\n\t\t\t\t\tleft: -8px !important;\n\t\t\t\t}\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 !important;\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport './index.scss'\nimport NcDateTimePicker from './NcDateTimePicker.vue'\nimport ScopeComponent from '../../utils/ScopeComponent.js'\n\nScopeComponent(NcDateTimePicker)\n\nexport default NcDateTimePicker\n"],"names":["_sfc_main"],"mappings":";;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;AChBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACiJA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AACA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;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EAAA;AAEA,cAAA,YAAA,IAAA,KAAA,KAAA,IAAA,cAAA,eAAA,GAAA,GAAA,CAAA,CAAA;AAGA,eAAA,KAAA,OAAA,gBAAA,aAAA,QAAA,KAAA,CAAA;AAAA,MACA;AAEA,aAAA;AAAA,QACA;AAAA;AAAA,QAEA,GAAA,KAAA,aAAA;MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA;AAAA,IAEA,iBAAA,MAAA;AACA,YAAA,QAAA,KAAA,MAAA,WAAA;AACA,UAAA,OAAA;AACA,YAAA;AACA,gBAAA,OAAA,IAAA,KAAA,IAAA,KAAA,KAAA,EAAA,YAAA,IAAA,CAAA;AACA,eAAA,MAAA,WAAA,WAAA,IAAA;AAAA,QACA,SAAA,OAAA;AACA,kBAAA,MAAA,iBAAA,OAAA,IAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,kBAAA,OAAA;AACA,YAAA,QAAA,KAAA,MAAA,WAAA;AACA,UAAA,OAAA;AACA,YAAA;AACA,gBAAA,OAAA,IAAA,KAAA,IAAA,KAAA,KAAA,EAAA,SAAA,KAAA,CAAA;AACA,eAAA,MAAA,WAAA,WAAA,IAAA;AAAA,QACA,SAAA,OAAA;AACA,kBAAA,MAAA,iBAAA,OAAA,KAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,wBAAA;AACA,UAAA,CAAA,KAAA,oBAAA;AAEA;AAAA,MACA;AAEA,WAAA,sBAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChbA,eAAe,gBAAgB;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"NcDateTimePicker.mjs","sources":["../../node_modules/vue-material-design-icons/CalendarBlank.vue","../../node_modules/vue-material-design-icons/Web.vue","../../src/components/NcDateTimePicker/NcDateTimePicker.vue","../../src/components/NcDateTimePicker/index.js"],"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 - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n> In version 8 we were wrapping the awesome [vue2 datepicker library](https://github.com/mengxiong10/vue2-datepicker),\n> were you could use all of there options even with this component.\n> In version 9 and above this component will no longer be a transparent wrapper,\n> as such only the documented properties below will work.\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\ttype=\"date-range\" />\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\t:timezone-id.sync=\"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=\"internalFormat\"\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:range=\"internalRange\"\n\t\t:show-week-number=\"showWeekNumber\"\n\t\t:type=\"realType\"\n\t\t:value=\"model\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@select-year=\"handleSelectYear\"\n\t\t@select-month=\"handleSelectMonth\"\n\t\t@input=\"model = $event\">\n\t\t<template #icon-calendar>\n\t\t\t<NcPopover v-if=\"showTimezoneSelect\"\n\t\t\t\tpopup-role=\"dialog\"\n\t\t\t\t:shown.sync=\"showTimezonePopover\"\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 v-model=\"tzVal\"\n\t\t\t\t\t\tclass=\"timezone-popover-wrapper__timezone-select\"\n\t\t\t\t\t\t@input=\"$emit('update:timezone-id', arguments[0])\" />\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 $scopedSlots\" #[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'\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\n\nimport NcTimezonePicker from '../NcTimezonePicker/index.js'\nimport NcPopover from '../NcPopover/index.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 'vue2-datepicker'\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 {\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\tinheritAttrs: false,\n\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\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\t/**\n\t\t * Since 8.25.0: Support 'date-range', 'time-range' and 'datetime-range' values.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date',\n\t\t\tvalidator: (type) => ['date', 'time', 'datetime', 'week', 'month', 'year', 'date-range', 'time-range', 'datetime-range'].includes(type),\n\t\t},\n\n\t\t/**\n\t\t * Either `moment.js` formatting tokens or a function taking a Date object and returning a string.\n\t\t * Warning: In v9 this will change the accepted token format to standardized Unicode tokens instead!\n\t\t */\n\t\tformat: {\n\t\t\ttype: [String, Function],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * @deprecated use `format` instead\n\t\t */\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 * Removed in v9 - use `modelValue` (`v-model`) instead\n\t\t * @deprecated\n\t\t */\n\t\t// eslint-disable-next-line\n\t\tvalue: {\n\t\t\tdefault: undefined,\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 the .sync modifier.\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\n\t\t/**\n\t\t * @deprecated use the 'date-range' or 'datetime-range' type instead.\n\t\t */\n\t\trange: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t/**\n\t\t * Removed in v9 - use `update:modelValue` (`v-model`) instead\n\t\t * @deprecated\n\t\t */\n\t\t'update:value',\n\t\t'update:modelValue',\n\t\t/** Same as update:modelValue for Vue 2 compatibility */\n\t\t'update:model-value',\n\t\t'update:timezone-id',\n\t],\n\n\tsetup() {\n\t\tconst model = useModelMigration('value', 'update:value')\n\t\treturn {\n\t\t\tmodel,\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\trealType() {\n\t\t\treturn this.type.split('-')[0]\n\t\t},\n\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: 'MMMM',\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.realType === 'time') {\n\t\t\t\treturn t('Pick a time')\n\t\t\t}\n\t\t\tif (this.realType === 'month') {\n\t\t\t\treturn t('Pick a month')\n\t\t\t}\n\t\t\tif (this.realType === 'year') {\n\t\t\t\treturn t('Pick a year')\n\t\t\t}\n\t\t\tif (this.realType === 'week') {\n\t\t\t\treturn t('Pick a week')\n\t\t\t}\n\t\t\tif (this.realType === '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 * Is the range picker enabled\n\t\t */\n\t\tinternalRange() {\n\t\t\treturn this.range || this.type.endsWith('-range')\n\t\t},\n\n\t\tinternalFormat() {\n\t\t\tif (this.format && typeof this.format === 'string') {\n\t\t\t\treturn this.format\n\t\t\t}\n\t\t\treturn formatMap[this.realType] || 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// wrape the format if it is a function\n\t\t\t\t...(typeof this.format === 'function' ? { stringify: this.format } : {}),\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</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&.select {\n\t\t\t\t\tmin-width: 246px;\n\t\t\t\t\tleft: -8px !important;\n\t\t\t\t}\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 !important;\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport './index.scss'\nimport NcDateTimePicker from './NcDateTimePicker.vue'\nimport ScopeComponent from '../../utils/ScopeComponent.js'\n\nScopeComponent(NcDateTimePicker)\n\nexport default NcDateTimePicker\n"],"names":["_sfc_main"],"mappings":";;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;AChBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACmJA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AACA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;A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AA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,wBAAA;AACA,UAAA,CAAA,KAAA,oBAAA;AAEA;AAAA,MACA;AAEA,WAAA,sBAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/cA,eAAe,gBAAgB;","x_google_ignoreList":[0,1]}
|
|
@@ -3,7 +3,7 @@ require('../assets/NcDateTimePickerNative-DVGEymgr.css');
|
|
|
3
3
|
const useModelMigration = require("../chunks/useModelMigration-D5zhrNXr.cjs");
|
|
4
4
|
const GenRandomId = require("../chunks/GenRandomId-BQDud3d4.cjs");
|
|
5
5
|
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
6
|
-
const ScopeComponent = require("../chunks/ScopeComponent-
|
|
6
|
+
const ScopeComponent = require("../chunks/ScopeComponent-CrVWjyKO.cjs");
|
|
7
7
|
const inputDateTypes = ["date", "datetime-local", "month", "time", "week"];
|
|
8
8
|
const _sfc_main = {
|
|
9
9
|
name: "NcDateTimePickerNative",
|
|
@@ -2,7 +2,7 @@ import '../assets/NcDateTimePickerNative-DVGEymgr.css';
|
|
|
2
2
|
import { u as useModelMigration } from "../chunks/useModelMigration-EhAWvqDD.mjs";
|
|
3
3
|
import { G as GenRandomId } from "../chunks/GenRandomId-CMooMQt0.mjs";
|
|
4
4
|
import { n as normalizeComponent } from "../chunks/_plugin-vue2_normalizer-DU4iP6Vu.mjs";
|
|
5
|
-
import { S as ScopeComponent } from "../chunks/ScopeComponent-
|
|
5
|
+
import { S as ScopeComponent } from "../chunks/ScopeComponent-B97avXP9.mjs";
|
|
6
6
|
const inputDateTypes = ["date", "datetime-local", "month", "time", "week"];
|
|
7
7
|
const _sfc_main = {
|
|
8
8
|
name: "NcDateTimePickerNative",
|