@nextcloud/vue 9.3.2 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/assets/NcActionCheckbox-DLJQfCUI.css +127 -0
- package/dist/assets/{NcActionInput-BxRA_Skn.css → NcActionInput-BO4gR6sg.css} +65 -65
- package/dist/assets/NcActionRadio-Bd4RFH-l.css +127 -0
- package/dist/assets/{NcAppContent-HF21N7dO.css → NcAppContent-zKcAQ2bt.css} +19 -19
- package/dist/assets/{NcAppNavigationItem-D97Onpd9.css → NcAppNavigationItem-qicc4X_c.css} +36 -36
- package/dist/assets/{NcAppNavigationSearch-BH8hBjGe.css → NcAppNavigationSearch-Bpd_RlYz.css} +5 -5
- package/dist/assets/{NcAppNavigationSettings-Bt0dnsjR.css → NcAppNavigationSettings-BmfpoWXN.css} +6 -6
- package/dist/assets/{NcAppSettingsDialog-CapZ_qNk.css → NcAppSettingsDialog-Ckc0OWTs.css} +13 -13
- package/dist/assets/{NcAppSettingsShortcutsSection-CRO4RakN.css → NcAppSettingsShortcutsSection-BonG0SgH.css} +1 -1
- package/dist/assets/{NcAppSidebar-krHtMwId.css → NcAppSidebar-Ci7hXMpX.css} +57 -57
- package/dist/assets/{NcAssistantButton-owGSr0s0.css → NcAssistantButton-BmD9GrOw.css} +9 -9
- package/dist/assets/{NcAssistantContent-Ban7n3Bg.css → NcAssistantContent-7THxd33X.css} +3 -3
- package/dist/assets/{NcAssistantIcon--1biUGYh.css → NcAssistantIcon-CxXrcBfu.css} +4 -4
- package/dist/assets/{NcAvatar-f8SJKMDw.css → NcAvatar-CuPj3fbb.css} +24 -24
- package/dist/assets/{NcBlurHash-7aGtE-_T.css → NcBlurHash-tWUPu9Oh.css} +2 -2
- package/dist/assets/{NcBreadcrumb-CHjeSh0y.css → NcBreadcrumb-D9N_qB_o.css} +15 -15
- package/dist/assets/{NcBreadcrumbs-DYfGaSjT.css → NcBreadcrumbs-5gl8Syfa.css} +6 -6
- package/dist/assets/{NcCheckboxRadioSwitch-DpYt0YbL.css → NcCheckboxRadioSwitch-BBLFj8M-.css} +36 -36
- package/dist/assets/{NcChip-DZ8dUSFy.css → NcChip-DbSI4mFP.css} +12 -12
- package/dist/assets/{NcCollectionList-C7OiUQQ-.css → NcCollectionList-e5JFvzqX.css} +42 -42
- package/dist/assets/{NcColorPicker-CO_Jq2Ow.css → NcColorPicker-CCanY5eB.css} +31 -31
- package/dist/assets/{NcDashboardWidget-DFY9GRrd.css → NcDashboardWidget-nZuIL1UN.css} +12 -12
- package/dist/assets/{NcDashboardWidgetItem-DPVZ3Oso.css → NcDashboardWidgetItem-DpVmEBwQ.css} +12 -12
- package/dist/assets/{NcDateTimePicker-D6xbEbaC.css → NcDateTimePicker-HT1ZTE-Z.css} +234 -234
- package/dist/assets/{NcDialog-D3fAX1Fs.css → NcDialog-BSV74Bru.css} +15 -15
- package/dist/assets/{NcEmojiPicker-B7xDz_8U.css → NcEmojiPicker-vNKR9S87.css} +122 -122
- package/dist/assets/{NcFormBox-D-kcijXp.css → NcFormBox-CRdHJkrd.css} +11 -11
- package/dist/assets/{NcFormBoxButton-C6EvdLK4.css → NcFormBoxButton-BWfU7d2r.css} +2 -2
- package/dist/assets/{NcFormBoxItem-BfXKp9xJ.css → NcFormBoxItem-CATNOTQx.css} +13 -13
- package/dist/assets/{NcFormBoxSwitch-DScgbxtv.css → NcFormBoxSwitch-Cn-MBAzZ.css} +2 -2
- package/dist/assets/{NcFormGroup-BrD0Scm7.css → NcFormGroup-BjWhd5Ky.css} +7 -7
- package/dist/assets/{NcHotkey-4yi1Hobg.css → NcHotkey-CvuY7fQJ.css} +8 -8
- package/dist/assets/{NcHotkeyList-gAZN0WIu.css → NcHotkeyList-Braxeyah.css} +2 -2
- package/dist/assets/{NcIconToggleSwitch-C29S_5Rp.css → NcIconToggleSwitch-saytabt5.css} +4 -4
- package/dist/assets/{NcInputField-B9DSDOEd.css → NcInputField-D7X6Iz5N.css} +1 -1
- package/dist/assets/{NcKbd-BGW1_Jb7.css → NcKbd-BeQpGp0b.css} +3 -3
- package/dist/assets/{NcListItem-CZnKmy9X.css → NcListItem-CWa6A_FV.css} +41 -41
- package/dist/assets/{NcListItemIcon-aquns6B7.css → NcListItemIcon-DJRcmlo1.css} +13 -13
- package/dist/assets/{NcModal-Du-f0B7Y.css → NcModal-bYmoCrzo.css} +58 -58
- package/dist/assets/{NcPasswordField-BCJ0LHSS.css → NcPasswordField-ftYon3Xm.css} +2 -2
- package/dist/assets/{NcPopover-CZ3pMU6Y.css → NcPopover-P1fheee2.css} +14 -14
- package/dist/assets/{NcRadioGroup-1zpSX8V5.css → NcRadioGroup-BoFb0R8S.css} +2 -2
- package/dist/assets/{NcRadioGroupButton-DRZ1_-yY.css → NcRadioGroupButton-kVqVEDKS.css} +11 -11
- package/dist/assets/{NcRelatedResourcesPanel-DYB-wrU0.css → NcRelatedResourcesPanel-D1efpH8E.css} +3 -3
- package/dist/assets/{NcRichContenteditable-BuaWt3Xn.css → NcRichContenteditable-C4KtXEvK.css} +17 -17
- package/dist/assets/{NcRichText-RvICaxkO.css → NcRichText-3BHy89Ls.css} +2 -2
- package/dist/assets/{NcSelect-ZnE_MlqV.css → NcSelect-CvDEQAjD.css} +1 -1
- package/dist/assets/NcSelectUsers-zQin7DzE.css +4 -0
- package/dist/assets/{NcSettingsSelectGroup-BxvEAWNm.css → NcSettingsSelectGroup-D_fSrafm.css} +2 -2
- package/dist/assets/{NcTextArea-nivEqHE-.css → NcTextArea-_-yGXq-j.css} +1 -1
- package/dist/assets/{NcUserBubble-B3Jad98g.css → NcUserBubble-DFUmBxeb.css} +8 -8
- package/dist/assets/{referencePickerModal-DWMAMaU3.css → referencePickerModal-CpzDUJ5f.css} +36 -36
- package/dist/chunks/{NcActionButton-BHXE4UKQ.mjs → NcActionButton-DNXoAooH.mjs} +2 -2
- package/dist/chunks/{NcActionButton-BHXE4UKQ.mjs.map → NcActionButton-DNXoAooH.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-B2MGnwK_.mjs → NcActionButtonGroup-C4oY8x5z.mjs} +2 -2
- package/dist/chunks/{NcActionButtonGroup-B2MGnwK_.mjs.map → NcActionButtonGroup-C4oY8x5z.mjs.map} +1 -1
- package/dist/chunks/NcActionCheckbox-DeHAMd23.mjs +122 -0
- package/dist/chunks/NcActionCheckbox-DeHAMd23.mjs.map +1 -0
- package/dist/chunks/{NcActionInput-D1uLWx4N.mjs → NcActionInput-Cgazb3df.mjs} +32 -32
- package/dist/chunks/NcActionInput-Cgazb3df.mjs.map +1 -0
- package/dist/chunks/NcActionRadio-DILn0DxW.mjs +120 -0
- package/dist/chunks/NcActionRadio-DILn0DxW.mjs.map +1 -0
- package/dist/chunks/{NcActionTextEditable-DAMWWXnR.mjs → NcActionTextEditable-DL4idmon.mjs} +2 -2
- package/dist/chunks/{NcActionTextEditable-DAMWWXnR.mjs.map → NcActionTextEditable-DL4idmon.mjs.map} +1 -1
- package/dist/chunks/{NcActions-4R7icatI.mjs → NcActions-CCXgfwjS.mjs} +3 -3
- package/dist/chunks/{NcActions-4R7icatI.mjs.map → NcActions-CCXgfwjS.mjs.map} +1 -1
- package/dist/chunks/{NcAppContent-DFbY2ERd.mjs → NcAppContent-DHTZAiBV.mjs} +11 -11
- package/dist/chunks/NcAppContent-DHTZAiBV.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-CjnufbC2.mjs → NcAppNavigation--KrbROgq.mjs} +3 -3
- package/dist/chunks/{NcAppNavigation-CjnufbC2.mjs.map → NcAppNavigation--KrbROgq.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-DiLoiMN5.mjs → NcAppNavigationCaption-Dj1-JWNN.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-DiLoiMN5.mjs.map → NcAppNavigationCaption-Dj1-JWNN.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-B307vBI9.mjs → NcAppNavigationItem-DhsEitgm.mjs} +11 -11
- package/dist/chunks/NcAppNavigationItem-DhsEitgm.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationNewItem-DYH3Gimz.mjs → NcAppNavigationNewItem-DhSxNT1C.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-DYH3Gimz.mjs.map → NcAppNavigationNewItem-DhSxNT1C.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-Bi367hd4.mjs → NcAppNavigationSearch-BHsw27kG.mjs} +9 -9
- package/dist/chunks/NcAppNavigationSearch-BHsw27kG.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationSettings-CaTjgcVj.mjs → NcAppNavigationSettings-sbSJX76f.mjs} +15 -15
- package/dist/chunks/NcAppNavigationSettings-sbSJX76f.mjs.map +1 -0
- package/dist/chunks/{NcAppSettingsDialog-NlVP7Fo7.mjs → NcAppSettingsDialog-Bg2wk6rG.mjs} +13 -13
- package/dist/chunks/NcAppSettingsDialog-Bg2wk6rG.mjs.map +1 -0
- package/dist/chunks/{NcAppSettingsShortcutsSection-DDmDMMsF.mjs → NcAppSettingsShortcutsSection-D--3hFzE.mjs} +4 -4
- package/dist/chunks/{NcAppSettingsShortcutsSection-DDmDMMsF.mjs.map → NcAppSettingsShortcutsSection-D--3hFzE.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-as8lzUZp.mjs → NcAppSidebar-BnTLeCUs.mjs} +15 -15
- package/dist/chunks/NcAppSidebar-BnTLeCUs.mjs.map +1 -0
- package/dist/chunks/{NcAssistantButton-DqXCpiMp.mjs → NcAssistantButton-DRcoUE6a.mjs} +11 -11
- package/dist/chunks/{NcAssistantButton-DqXCpiMp.mjs.map → NcAssistantButton-DRcoUE6a.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantContent-Boi-0v_0.mjs → NcAssistantContent-BR3lWBWC.mjs} +5 -5
- package/dist/chunks/{NcAssistantContent-Boi-0v_0.mjs.map → NcAssistantContent-BR3lWBWC.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantIcon-PMYKxGuH.mjs → NcAssistantIcon-DsJh5rb7.mjs} +7 -7
- package/dist/chunks/{NcAssistantIcon-PMYKxGuH.mjs.map → NcAssistantIcon-DsJh5rb7.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-S8EJR2BK.mjs → NcAvatar-xQb0quUq.mjs} +9 -9
- package/dist/chunks/NcAvatar-xQb0quUq.mjs.map +1 -0
- package/dist/chunks/{NcBlurHash-BiFktE2N.mjs → NcBlurHash-Cp7enp4q.mjs} +9 -9
- package/dist/chunks/{NcBlurHash-BiFktE2N.mjs.map → NcBlurHash-Cp7enp4q.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-ChYVw5CP.mjs → NcBreadcrumb-D-e0UGiz.mjs} +8 -8
- package/dist/chunks/NcBreadcrumb-D-e0UGiz.mjs.map +1 -0
- package/dist/chunks/{NcBreadcrumbs-DHS31Ax7.mjs → NcBreadcrumbs-CGztlUEK.mjs} +6 -6
- package/dist/chunks/{NcBreadcrumbs-DHS31Ax7.mjs.map → NcBreadcrumbs-CGztlUEK.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-DisCqPZK.mjs → NcCheckboxRadioSwitch-ChNSuhe6.mjs} +15 -15
- package/dist/chunks/NcCheckboxRadioSwitch-ChNSuhe6.mjs.map +1 -0
- package/dist/chunks/{NcChip-QHPd3nMF.mjs → NcChip-CaOkERH3.mjs} +10 -10
- package/dist/chunks/NcChip-CaOkERH3.mjs.map +1 -0
- package/dist/chunks/{NcCollectionList-ByFl0-ca.mjs → NcCollectionList-Dme-TR38.mjs} +15 -15
- package/dist/chunks/NcCollectionList-Dme-TR38.mjs.map +1 -0
- package/dist/chunks/{NcColorPicker-DpSDaGrh.mjs → NcColorPicker-5Pw0z8WG.mjs} +12 -12
- package/dist/chunks/NcColorPicker-5Pw0z8WG.mjs.map +1 -0
- package/dist/chunks/{NcContent-BrRHLO19.mjs → NcContent-DOmmHvxx.mjs} +2 -2
- package/dist/chunks/{NcContent-BrRHLO19.mjs.map → NcContent-DOmmHvxx.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-CIUrPOLo.mjs → NcDashboardWidget-Ddt4Ze_7.mjs} +7 -7
- package/dist/chunks/NcDashboardWidget-Ddt4Ze_7.mjs.map +1 -0
- package/dist/chunks/{NcDashboardWidgetItem-DdYM1QYk.mjs → NcDashboardWidgetItem-Cu-899WY.mjs} +12 -12
- package/dist/chunks/NcDashboardWidgetItem-Cu-899WY.mjs.map +1 -0
- package/dist/chunks/{NcDateTimePicker-DtQaoKbG.mjs → NcDateTimePicker-CF8TMzyS.mjs} +69 -25
- package/dist/chunks/NcDateTimePicker-CF8TMzyS.mjs.map +1 -0
- package/dist/chunks/{NcDateTimePickerNative-Dr8_mGlQ.mjs → NcDateTimePickerNative-DvvKjw_h.mjs} +2 -2
- package/dist/chunks/{NcDateTimePickerNative-Dr8_mGlQ.mjs.map → NcDateTimePickerNative-DvvKjw_h.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-BTmnYNeo.mjs → NcDialog-Cnd9YBlk.mjs} +6 -7
- package/dist/chunks/{NcDialog-BTmnYNeo.mjs.map → NcDialog-Cnd9YBlk.mjs.map} +1 -1
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-CYpktNKA.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-BnCX7Duz.mjs} +2 -2
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-CYpktNKA.mjs.map → NcDialogButton.vue_vue_type_script_setup_true_lang-BnCX7Duz.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-U5k_zceS.mjs → NcEmojiPicker-DpA4_bLX.mjs} +24 -24
- package/dist/chunks/NcEmojiPicker-DpA4_bLX.mjs.map +1 -0
- package/dist/chunks/{NcFormBox-CkgY7Tif.mjs → NcFormBox-BYjllt0m.mjs} +7 -7
- package/dist/chunks/NcFormBox-BYjllt0m.mjs.map +1 -0
- package/dist/chunks/{NcFormBoxButton-Bptd324P.mjs → NcFormBoxButton-RDIKiZIH.mjs} +9 -9
- package/dist/chunks/NcFormBoxButton-RDIKiZIH.mjs.map +1 -0
- package/dist/chunks/{NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DhnfC18v.mjs → NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-KhOQ1B7a.mjs} +4 -4
- package/dist/chunks/NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-KhOQ1B7a.mjs.map +1 -0
- package/dist/chunks/{NcFormBoxItem-vnU0KmUL.mjs → NcFormBoxItem-BAAPOa6z.mjs} +10 -10
- package/dist/chunks/NcFormBoxItem-BAAPOa6z.mjs.map +1 -0
- package/dist/chunks/{NcFormBoxSwitch-DGcRJH9Q.mjs → NcFormBoxSwitch-m9uRjJzl.mjs} +6 -6
- package/dist/chunks/{NcFormBoxSwitch-DGcRJH9Q.mjs.map → NcFormBoxSwitch-m9uRjJzl.mjs.map} +1 -1
- package/dist/chunks/{NcFormGroup-CnSfPFey.mjs → NcFormGroup-Bf8Mme1o.mjs} +9 -9
- package/dist/chunks/{NcFormGroup-CnSfPFey.mjs.map → NcFormGroup-Bf8Mme1o.mjs.map} +1 -1
- package/dist/chunks/{NcHotkey-BMbdzaIs.mjs → NcHotkey-CrVhA2O_.mjs} +7 -7
- package/dist/chunks/{NcHotkey-BMbdzaIs.mjs.map → NcHotkey-CrVhA2O_.mjs.map} +1 -1
- package/dist/chunks/{NcHotkeyList-67NnF26Y.mjs → NcHotkeyList-BhA2GxR9.mjs} +5 -5
- package/dist/chunks/{NcHotkeyList-67NnF26Y.mjs.map → NcHotkeyList-BhA2GxR9.mjs.map} +1 -1
- package/dist/chunks/{NcIconToggleSwitch-DNEYngCw.mjs → NcIconToggleSwitch-CSrdR61T.mjs} +4 -4
- package/dist/chunks/{NcIconToggleSwitch-DNEYngCw.mjs.map → NcIconToggleSwitch-CSrdR61T.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-DjMO3Xyv.mjs → NcInputConfirmCancel-x3Xhif7e.mjs} +2 -2
- package/dist/chunks/{NcInputConfirmCancel-DjMO3Xyv.mjs.map → NcInputConfirmCancel-x3Xhif7e.mjs.map} +1 -1
- package/dist/chunks/{NcInputField-D7Nv5QhT.mjs → NcInputField-tt_Gi9ja.mjs} +3 -3
- package/dist/chunks/{NcInputField-D7Nv5QhT.mjs.map → NcInputField-tt_Gi9ja.mjs.map} +1 -1
- package/dist/chunks/{NcKbd-CZdynD1d.mjs → NcKbd-DF1Ugt3x.mjs} +5 -5
- package/dist/chunks/{NcKbd-CZdynD1d.mjs.map → NcKbd-DF1Ugt3x.mjs.map} +1 -1
- package/dist/chunks/{NcListItem-Bx93C7tP.mjs → NcListItem-BnLZJxLv.mjs} +6 -6
- package/dist/chunks/NcListItem-BnLZJxLv.mjs.map +1 -0
- package/dist/chunks/{NcListItemIcon-IJLXY-te.mjs → NcListItemIcon-DLmp04cL.mjs} +9 -9
- package/dist/chunks/NcListItemIcon-DLmp04cL.mjs.map +1 -0
- package/dist/chunks/{NcModal-DSCYMxfe.mjs → NcModal-PlfVmTTk.mjs} +7 -7
- package/dist/chunks/NcModal-PlfVmTTk.mjs.map +1 -0
- package/dist/chunks/{NcNoteCard-BUg07N13.mjs → NcNoteCard-Cok_4Fld.mjs} +2 -2
- package/dist/chunks/{NcNoteCard-BUg07N13.mjs.map → NcNoteCard-Cok_4Fld.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-CTuWpUWd.mjs → NcPasswordField-DYF18Cdo.mjs} +10 -10
- package/dist/chunks/{NcPasswordField-CTuWpUWd.mjs.map → NcPasswordField-DYF18Cdo.mjs.map} +1 -1
- package/dist/chunks/{NcPopover-C-MTaPCs.mjs → NcPopover-OqcYrWOx.mjs} +17 -17
- package/dist/chunks/NcPopover-OqcYrWOx.mjs.map +1 -0
- package/dist/chunks/{NcRadioGroup-HorQ2m39.mjs → NcRadioGroup-Bjl3n_1z.mjs} +8 -8
- package/dist/chunks/NcRadioGroup-Bjl3n_1z.mjs.map +1 -0
- package/dist/chunks/{NcRadioGroupButton-CAisx7g4.mjs → NcRadioGroupButton-Bul-9Tl1.mjs} +7 -7
- package/dist/chunks/{NcRadioGroupButton-CAisx7g4.mjs.map → NcRadioGroupButton-Bul-9Tl1.mjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-Dtxd3-o1.mjs → NcRelatedResourcesPanel-Dzp_b_xS.mjs} +7 -7
- package/dist/chunks/NcRelatedResourcesPanel-Dzp_b_xS.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-Bq1NOBCE.mjs → NcRichContenteditable-BgsA20P4.mjs} +21 -21
- package/dist/chunks/{NcRichContenteditable-Bq1NOBCE.mjs.map → NcRichContenteditable-BgsA20P4.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-B6VwyPUp.mjs → NcRichText-H-0TWixL.mjs} +8 -8
- package/dist/chunks/NcRichText-H-0TWixL.mjs.map +1 -0
- package/dist/chunks/{NcSelect-Cc9_a8nG.mjs → NcSelect-rH_0zphV.mjs} +6 -6
- package/dist/chunks/NcSelect-rH_0zphV.mjs.map +1 -0
- package/dist/chunks/{NcSelectTags-JyyA4W_e.mjs → NcSelectTags-DPJzQw5S.mjs} +6 -6
- package/dist/chunks/NcSelectTags-DPJzQw5S.mjs.map +1 -0
- package/dist/chunks/{NcSelectUsers-CiTKYuOb.mjs → NcSelectUsers-DbOv_9kW.mjs} +9 -9
- package/dist/chunks/{NcSelectUsers-CiTKYuOb.mjs.map → NcSelectUsers-DbOv_9kW.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-BcLE6UnZ.mjs → NcSettingsSection-EAR0ylbd.mjs} +2 -2
- package/dist/chunks/{NcSettingsSection-BcLE6UnZ.mjs.map → NcSettingsSection-EAR0ylbd.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-CUU-GWYl.mjs → NcSettingsSelectGroup-BS2sLZQO.mjs} +10 -10
- package/dist/chunks/NcSettingsSelectGroup-BS2sLZQO.mjs.map +1 -0
- package/dist/chunks/{NcTextArea-2CifgNom.mjs → NcTextArea-CWA3KOiC.mjs} +3 -3
- package/dist/chunks/{NcTextArea-2CifgNom.mjs.map → NcTextArea-CWA3KOiC.mjs.map} +1 -1
- package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-BfjSL2EJ.mjs → NcTextField.vue_vue_type_script_setup_true_lang-Cv9c1EWI.mjs} +4 -4
- package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-BfjSL2EJ.mjs.map → NcTextField.vue_vue_type_script_setup_true_lang-Cv9c1EWI.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-BffYEppS.mjs → NcTimezonePicker.vue_vue_type_script_setup_true_lang-t72lL380.mjs} +4 -4
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-BffYEppS.mjs.map → NcTimezonePicker.vue_vue_type_script_setup_true_lang-t72lL380.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-CiB-Lu5C.mjs → NcUserBubble-DlY4DCgO.mjs} +11 -11
- package/dist/chunks/{NcUserBubble-CiB-Lu5C.mjs.map → NcUserBubble-DlY4DCgO.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-BgElapLh.mjs → NcUserStatusIcon-lVNMmh5G.mjs} +2 -2
- package/dist/chunks/{NcUserStatusIcon-BgElapLh.mjs.map → NcUserStatusIcon-lVNMmh5G.mjs.map} +1 -1
- package/dist/chunks/{_l10n-CgsPi8nC.mjs → _l10n-BSFzy-71.mjs} +23 -23
- package/dist/chunks/_l10n-BSFzy-71.mjs.map +1 -0
- package/dist/chunks/{colors-CL_wvNtd.mjs → colors-DhRGyJCn.mjs} +11 -31
- package/dist/chunks/colors-DhRGyJCn.mjs.map +1 -0
- package/dist/chunks/{mdi-DvQxv1t7.mjs → mdi-CpchYUUV.mjs} +33 -25
- package/dist/chunks/{mdi-DvQxv1t7.mjs.map → mdi-CpchYUUV.mjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-CDHqLZC-.mjs → referencePickerModal-VfCXswe3.mjs} +28 -28
- package/dist/chunks/referencePickerModal-VfCXswe3.mjs.map +1 -0
- package/dist/chunks/{useCopy-D3yAxBJi.mjs → useCopy-D-6Kls-z.mjs} +3 -3
- package/dist/chunks/{useCopy-D3yAxBJi.mjs.map → useCopy-D-6Kls-z.mjs.map} +1 -1
- package/dist/components/NcActionButton/index.mjs +1 -1
- package/dist/components/NcActionButtonGroup/index.mjs +1 -1
- package/dist/components/NcActionCheckbox/NcActionCheckbox.vue.d.ts +27 -16
- package/dist/components/NcActionCheckbox/index.mjs +1 -1
- package/dist/components/NcActionInput/NcActionInput.vue.d.ts +11 -0
- package/dist/components/NcActionInput/index.mjs +1 -1
- package/dist/components/NcActionRadio/NcActionRadio.vue.d.ts +26 -17
- package/dist/components/NcActionRadio/index.mjs +1 -1
- package/dist/components/NcActionTextEditable/index.mjs +1 -1
- package/dist/components/NcActions/index.mjs +1 -1
- package/dist/components/NcAppContent/index.mjs +1 -1
- package/dist/components/NcAppNavigation/index.mjs +1 -1
- package/dist/components/NcAppNavigationCaption/index.mjs +1 -1
- package/dist/components/NcAppNavigationItem/index.mjs +1 -1
- package/dist/components/NcAppNavigationNewItem/index.mjs +1 -1
- package/dist/components/NcAppNavigationSearch/index.mjs +1 -1
- package/dist/components/NcAppNavigationSettings/index.mjs +1 -1
- package/dist/components/NcAppSettingsDialog/index.mjs +1 -1
- package/dist/components/NcAppSettingsSectionShortcuts/index.mjs +1 -1
- package/dist/components/NcAppSettingsShortcutsSection/index.mjs +1 -1
- package/dist/components/NcAppSidebar/index.mjs +1 -1
- package/dist/components/NcAssistantButton/index.mjs +1 -1
- package/dist/components/NcAssistantContent/index.mjs +1 -1
- package/dist/components/NcAssistantIcon/index.mjs +1 -1
- package/dist/components/NcAvatar/index.mjs +1 -1
- package/dist/components/NcBlurHash/index.mjs +1 -1
- package/dist/components/NcBreadcrumb/index.mjs +1 -1
- package/dist/components/NcBreadcrumbs/index.mjs +1 -1
- package/dist/components/NcCheckboxRadioSwitch/index.mjs +1 -1
- package/dist/components/NcChip/index.mjs +1 -1
- package/dist/components/NcCollectionList/index.mjs +1 -1
- package/dist/components/NcColorPicker/index.mjs +1 -1
- package/dist/components/NcContent/index.mjs +1 -1
- package/dist/components/NcDashboardWidget/index.mjs +1 -1
- package/dist/components/NcDashboardWidgetItem/index.mjs +1 -1
- package/dist/components/NcDateTimePicker/NcDateTimePicker.vue.d.ts +19 -0
- package/dist/components/NcDateTimePicker/index.mjs +1 -1
- package/dist/components/NcDateTimePickerNative/index.mjs +1 -1
- package/dist/components/NcDialog/index.mjs +1 -1
- package/dist/components/NcDialogButton/index.mjs +1 -1
- package/dist/components/NcEmojiPicker/NcEmojiPicker.vue.d.ts +1 -2
- package/dist/components/NcEmojiPicker/index.mjs +1 -1
- package/dist/components/NcFormBox/index.mjs +1 -1
- package/dist/components/NcFormBoxButton/index.mjs +1 -1
- package/dist/components/NcFormBoxCopyButton/index.mjs +1 -1
- package/dist/components/NcFormBoxSwitch/index.mjs +1 -1
- package/dist/components/NcFormGroup/index.mjs +1 -1
- package/dist/components/NcHotkey/index.mjs +1 -1
- package/dist/components/NcHotkeyList/index.mjs +1 -1
- package/dist/components/NcInputField/index.mjs +1 -1
- package/dist/components/NcKbd/index.mjs +1 -1
- package/dist/components/NcListItem/index.mjs +1 -1
- package/dist/components/NcListItemIcon/index.mjs +1 -1
- package/dist/components/NcModal/index.mjs +1 -1
- package/dist/components/NcNoteCard/index.mjs +1 -1
- package/dist/components/NcPasswordField/index.mjs +1 -1
- package/dist/components/NcPopover/index.mjs +1 -1
- package/dist/components/NcRadioGroup/index.mjs +1 -1
- package/dist/components/NcRadioGroupButton/index.mjs +1 -1
- package/dist/components/NcRelatedResourcesPanel/index.mjs +1 -1
- package/dist/components/NcRichContenteditable/index.mjs +1 -1
- package/dist/components/NcRichText/index.mjs +3 -3
- package/dist/components/NcSelect/index.mjs +1 -1
- package/dist/components/NcSelectTags/index.mjs +1 -1
- package/dist/components/NcSelectUsers/index.mjs +1 -1
- package/dist/components/NcSettingsSection/index.mjs +1 -1
- package/dist/components/NcSettingsSelectGroup/index.mjs +1 -1
- package/dist/components/NcTextArea/index.mjs +1 -1
- package/dist/components/NcTextField/index.mjs +1 -1
- package/dist/components/NcTimezonePicker/index.mjs +1 -1
- package/dist/components/NcUserBubble/index.mjs +1 -1
- package/dist/components/NcUserStatusIcon/index.mjs +1 -1
- package/dist/composables/useFormatDateTime/index.mjs +1 -1
- package/dist/functions/reference/index.mjs +1 -1
- package/dist/functions/usernameToColor/index.mjs +1 -1
- package/dist/index.mjs +67 -67
- package/package.json +10 -10
- package/dist/assets/NcActionCheckbox-BeT6fCCy.css +0 -80
- package/dist/assets/NcActionRadio-DgdLD238.css +0 -79
- package/dist/assets/NcSelectUsers-BWhtNRbI.css +0 -4
- package/dist/chunks/NcActionCheckbox-BTHrh-Mu.mjs +0 -127
- package/dist/chunks/NcActionCheckbox-BTHrh-Mu.mjs.map +0 -1
- package/dist/chunks/NcActionInput-D1uLWx4N.mjs.map +0 -1
- package/dist/chunks/NcActionRadio-BM24rDbc.mjs +0 -136
- package/dist/chunks/NcActionRadio-BM24rDbc.mjs.map +0 -1
- package/dist/chunks/NcAppContent-DFbY2ERd.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-B307vBI9.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSearch-Bi367hd4.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSettings-CaTjgcVj.mjs.map +0 -1
- package/dist/chunks/NcAppSettingsDialog-NlVP7Fo7.mjs.map +0 -1
- package/dist/chunks/NcAppSidebar-as8lzUZp.mjs.map +0 -1
- package/dist/chunks/NcAvatar-S8EJR2BK.mjs.map +0 -1
- package/dist/chunks/NcBreadcrumb-ChYVw5CP.mjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch-DisCqPZK.mjs.map +0 -1
- package/dist/chunks/NcChip-QHPd3nMF.mjs.map +0 -1
- package/dist/chunks/NcCollectionList-ByFl0-ca.mjs.map +0 -1
- package/dist/chunks/NcColorPicker-DpSDaGrh.mjs.map +0 -1
- package/dist/chunks/NcDashboardWidget-CIUrPOLo.mjs.map +0 -1
- package/dist/chunks/NcDashboardWidgetItem-DdYM1QYk.mjs.map +0 -1
- package/dist/chunks/NcDateTimePicker-DtQaoKbG.mjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-U5k_zceS.mjs.map +0 -1
- package/dist/chunks/NcFormBox-CkgY7Tif.mjs.map +0 -1
- package/dist/chunks/NcFormBoxButton-Bptd324P.mjs.map +0 -1
- package/dist/chunks/NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DhnfC18v.mjs.map +0 -1
- package/dist/chunks/NcFormBoxItem-vnU0KmUL.mjs.map +0 -1
- package/dist/chunks/NcListItem-Bx93C7tP.mjs.map +0 -1
- package/dist/chunks/NcListItemIcon-IJLXY-te.mjs.map +0 -1
- package/dist/chunks/NcModal-DSCYMxfe.mjs.map +0 -1
- package/dist/chunks/NcPopover-C-MTaPCs.mjs.map +0 -1
- package/dist/chunks/NcRadioGroup-HorQ2m39.mjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-Dtxd3-o1.mjs.map +0 -1
- package/dist/chunks/NcRichText-B6VwyPUp.mjs.map +0 -1
- package/dist/chunks/NcSelect-Cc9_a8nG.mjs.map +0 -1
- package/dist/chunks/NcSelectTags-JyyA4W_e.mjs.map +0 -1
- package/dist/chunks/NcSettingsSelectGroup-CUU-GWYl.mjs.map +0 -1
- package/dist/chunks/_l10n-CgsPi8nC.mjs.map +0 -1
- package/dist/chunks/colors-CL_wvNtd.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-CDHqLZC-.mjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import '../assets/NcDashboardWidget-
|
|
1
|
+
import '../assets/NcDashboardWidget-nZuIL1UN.css';
|
|
2
2
|
import { createElementBlock, openBlock, mergeProps, createElementVNode, createCommentVNode, toDisplayString, resolveComponent, createBlock, renderSlot, withCtx, createVNode, Fragment, renderList, toHandlers } from "vue";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
4
|
-
import { r as register, z as t35, a as t } from "./_l10n-
|
|
5
|
-
import { N as NcAvatar } from "./NcAvatar-
|
|
6
|
-
import { N as NcDashboardWidgetItem } from "./NcDashboardWidgetItem-
|
|
4
|
+
import { r as register, z as t35, a as t } from "./_l10n-BSFzy-71.mjs";
|
|
5
|
+
import { N as NcAvatar } from "./NcAvatar-xQb0quUq.mjs";
|
|
6
|
+
import { N as NcDashboardWidgetItem } from "./NcDashboardWidgetItem-Cu-899WY.mjs";
|
|
7
7
|
import { N as NcEmptyContent } from "./NcEmptyContent-B8-90BSI.mjs";
|
|
8
8
|
const _sfc_main$1 = {
|
|
9
9
|
name: "CheckIcon",
|
|
@@ -180,7 +180,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
180
180
|
key: item.id
|
|
181
181
|
}, [
|
|
182
182
|
renderSlot(_ctx.$slots, "default", { item }, () => [
|
|
183
|
-
createVNode(_component_NcDashboardWidgetItem, mergeProps({ ref_for: true }, item, {
|
|
183
|
+
createVNode(_component_NcDashboardWidgetItem, mergeProps({ ref_for: true }, item, { itemMenu: $props.itemMenu }, toHandlers($options.handlers)), null, 16, ["itemMenu"])
|
|
184
184
|
], true)
|
|
185
185
|
]);
|
|
186
186
|
}), 128))
|
|
@@ -220,8 +220,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
220
220
|
}, toDisplayString($props.showMoreLabel), 9, _hoisted_3)) : createCommentVNode("", true)
|
|
221
221
|
]);
|
|
222
222
|
}
|
|
223
|
-
const NcDashboardWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
223
|
+
const NcDashboardWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8dabc003"]]);
|
|
224
224
|
export {
|
|
225
225
|
NcDashboardWidget as N
|
|
226
226
|
};
|
|
227
|
-
//# sourceMappingURL=NcDashboardWidget-
|
|
227
|
+
//# sourceMappingURL=NcDashboardWidget-Ddt4Ze_7.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcDashboardWidget-Ddt4Ze_7.mjs","sources":["../../node_modules/vue-material-design-icons/Check.vue","../../src/components/NcDashboardWidget/NcDashboardWidget.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon check-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=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"CheckIcon\",\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: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n## Usage\n\n### Simplest example with custom item\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Showing items and a half empty content message\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-items-and-empty-content=\"true\"\n\t\t:half-empty-content-message=\"'No unread items'\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Complete example using NcDashboardWidgetItem\n\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-more-url=\"'https://nextcloud.com'\"\n\t\t:item-menu=\"itemMenu\"\n\t\t@hide=\"onHide\"\n\t\t@markDone=\"onMarkDone\">\n\n\t\t<template #empty-content>\n\t\t\tNothing to display\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tid: '1',\n\t\ttargetUrl: 'https://example.tld',\n\t\tavatarUrl: 'https://example.tld/img.png',\n\t\tavatarUsername: 'Robert',\n\t\tavatarIsNoUser: true,\n\t\toverlayIconUrl: '/svg/core/actions/sound?color=000',\n\t\tmainText: 'First item text',\n\t\tsubText: 'First item subtext',\n\t},\n\t{\n\t\tid: '2',\n\t\ttargetUrl: 'https://example.tld',\n\t\tavatarUrl: 'https://example.tld/img.jpg',\n\t\toverlayIconUrl: '/svg/core/actions/add?color=000',\n\t\tmainText: 'Second item text',\n\t\tsubText: 'Second item subtext',\n\t},\n]\nconst myItemMenu = {\n\t// triggers an event named \"markDone\" when clicked\n\t'markDone': {\n\t\ttext: 'Mark as done',\n\t\ticon: 'icon-checkmark',\n\t},\n\t// triggers an event named \"hide\" when clicked\n\t'hide': {\n\t\ttext: 'Hide',\n\t\ticon: 'icon-toggle',\n\t},\n}\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems,\n\t\t\titemMenu: myItemMenu,\n\t\t\tloading: true,\n\t\t}\n\t},\n\tmethods: {\n\t\tonMoreClick() {\n\t\t\tconsole.log('more clicked')\n\t\t\tconst win = window.open('https://wherever.you.want', '_blank')\n\t\t\twin.focus()\n\t\t},\n\t\tonHide(item) {\n\t\t\tconsole.log('user wants to hide item ' + item.id)\n\t\t\t// do what you want\n\t\t},\n\t\tonMarkDone(item) {\n\t\t\tconsole.log('user wants to mark item ' + item.id + ' as done')\n\t\t\t// do what you want\n\t\t},\n\t},\n}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"dashboard-widget\">\n\t\t<!-- This element is shown if we have items, but want to show a general message as well.\n\t\tCan be used e.g. to show \"No mentions\" on top of the item list. -->\n\t\t<NcEmptyContent\n\t\t\tv-if=\"showHalfEmptyContentArea\"\n\t\t\t:description=\"halfEmptyContentString\"\n\t\t\tclass=\"half-screen\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot The icon to show in the half empty content area. -->\n\t\t\t\t<slot name=\"halfEmptyContentIcon\">\n\t\t\t\t\t<Check />\n\t\t\t\t</slot>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\t\t<!-- The list of items to show. -->\n\t\t<ul>\n\t\t\t<li v-for=\"item in displayedItems\" :key=\"item.id\">\n\t\t\t\t<!-- @slot The default slot can be optionally overridden. It contains the template of one item. -->\n\t\t\t\t<slot name=\"default\" :item=\"item\">\n\t\t\t\t\t<NcDashboardWidgetItem\n\t\t\t\t\t\tv-bind=\"item\"\n\t\t\t\t\t\t:itemMenu=\"itemMenu\"\n\t\t\t\t\t\tv-on=\"handlers\" />\n\t\t\t\t</slot>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- While the widget is loading, we show a list of placeholder items. -->\n\t\t<div v-if=\"loading\">\n\t\t\t<div v-for=\"i in 7\" :key=\"i\" class=\"item-list__entry\">\n\t\t\t\t<NcAvatar class=\"item-avatar\" :size=\"44\" />\n\t\t\t\t<div class=\"item__details\">\n\t\t\t\t\t<h3> </h3>\n\t\t\t\t\t<p class=\"message\">\n \n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- @slot Slot for showing information in case of an empty item list. -->\n\t\t<slot v-else-if=\"items.length === 0\" name=\"empty-content\">\n\t\t\t<NcEmptyContent\n\t\t\t\tv-if=\"emptyContentMessage\"\n\t\t\t\t:description=\"emptyContentMessage\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<!-- @slot The icon to show in the empty content area. -->\n\t\t\t\t\t<slot name=\"emptyContentIcon\" />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</slot>\n\t\t<!-- A \"show more\" link, e.g. to navigate to the main app belonging to this widget. -->\n\t\t<a\n\t\t\tv-else-if=\"showMore\"\n\t\t\t:href=\"showMoreUrl\"\n\t\t\ttarget=\"_blank\"\n\t\t\tclass=\"more\"\n\t\t\ttabindex=\"0\">\n\t\t\t{{ showMoreLabel }}\n\t\t</a>\n\t</div>\n</template>\n\n<script>\nimport Check from 'vue-material-design-icons/Check.vue'\nimport { t } from '../../l10n.ts'\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcDashboardWidgetItem from '../NcDashboardWidgetItem/index.js'\nimport NcEmptyContent from '../NcEmptyContent/index.ts'\n\nexport default {\n\tname: 'NcDashboardWidget',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcDashboardWidgetItem,\n\t\tNcEmptyContent,\n\t\tCheck,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * An array containing the items to show (specific structure must be respected,\n\t\t * except if you override item rendering in the default slot).\n\t\t */\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => { return [] },\n\t\t},\n\n\t\t/**\n\t\t * If this is set, a \"show more\" text is displayed on the widget's bottom.\n\t\t * It's a link pointing to this URL.\n\t\t */\n\t\tshowMoreUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The text of show more button.\n\t\t *\n\t\t * Expected to be in the form \"More {itemName} …\"\n\t\t */\n\t\tshowMoreLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('More items …'),\n\t\t},\n\n\t\t/**\n\t\t * A boolean to put the widget in a loading state.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each item.\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\n\t\t/**\n\t\t * Whether both the items and the empty content message are shown.\n\t\t * Usefull for e.g. showing \"No mentions\" and a list of elements.\n\t\t */\n\t\tshowItemsAndEmptyContent: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The text to show in the empty content area.\n\t\t */\n\t\temptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The text to show in the half empty content area.\n\t\t */\n\t\thalfEmptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t// forward menu events to my parent\n\t\thandlers() {\n\t\t\tconst h = {}\n\t\t\tfor (const evName in this.itemMenu) {\n\t\t\t\th[evName] = (it) => {\n\t\t\t\t\tthis.$emit(evName, it)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn h\n\t\t},\n\n\t\tdisplayedItems() {\n\t\t\tconst nbItems = (this.showMoreUrl && this.items.length >= this.maxItemNumber)\n\t\t\t\t? this.maxItemNumber - 1\n\t\t\t\t: this.maxItemNumber\n\t\t\treturn this.items.slice(0, nbItems)\n\t\t},\n\n\t\tshowHalfEmptyContentArea() {\n\t\t\treturn this.showItemsAndEmptyContent && this.halfEmptyContentString && this.items.length !== 0\n\t\t},\n\n\t\thalfEmptyContentString() {\n\t\t\treturn this.halfEmptyContentMessage || this.emptyContentMessage\n\t\t},\n\n\t\tmaxItemNumber() {\n\t\t\treturn this.showItemsAndEmptyContent ? 5 : 7\n\t\t},\n\n\t\tshowMore() {\n\t\t\treturn this.showMoreUrl && this.items.length >= this.maxItemNumber\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.dashboard-widget :deep(.empty-content) {\n\ttext-align: center;\n\tpadding-top: 5vh;\n\t&.half-screen {\n\t\tpadding-top: 0;\n\t\tmargin-bottom: 1vh;\n\t}\n}\n\n.more {\n\tdisplay: block;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: 60px;\n\tcursor: pointer;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-element);\n\t\tcolor: var(--color-main-text);\n\t}\n}\n\n/* skeleton */\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tpadding: 8px;\n\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-block: auto;\n\t\tbackground-color: var(--color-background-dark) !important;\n\t}\n\t.item__details {\n\t\tpadding-inline-start: 8px;\n\t\tmax-height: var(--default-clickable-area);\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 80%;\n\t\t\theight: 15px;\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_createElementVNode","_openBlock","_createBlock","_renderSlot","_createVNode","_Fragment","_renderList","_toHandlers"],"mappings":";;;;;;AAoBA,MAAKA,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA;IAER,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;AAxBY,MAAAC,eAAA,EAAA,GAAE,0DAAyD;;;sBAXrEC,mBAeO,QAfPC,WAAc,KAAA,QAAM;AAAA,IACb,eAAa,OAAA,QAAK,OAAA;AAAA,IAClB,cAAY,OAAA;AAAA,IACb,OAAM;AAAA,IACN,MAAK;AAAA,IACJ,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAE,KAAA,MAAK,SAAU,MAAM;AAAA;kBACjCD,mBAQM,OAAA;AAAA,MARA,MAAM,OAAA;AAAA,MACP,OAAM;AAAA,MACL,OAAO,OAAA;AAAA,MACP,QAAQ,OAAA;AAAA,MACT,SAAQ;AAAA;MACXE,mBAEO,QAFPH,cAEO;AAAA,QADQ,OAAA,SAAbI,UAAA,GAAAH,mBAAuC,qCAAhB,OAAA,KAAK,GAAA,CAAA;;;;;;;ACoNpC,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;EAGD,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKN,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS,MAAM;AAAE,eAAO,CAAA;AAAA,MAAG;AAAA;;;;;IAO5B,aAAa;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA;;;;;;IAQV,eAAe;AAAA,MACd,MAAM;AAAA,MACN,SAAS,EAAE,cAAc;AAAA;;;;IAM1B,SAAS;AAAA,M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
1
|
-
import '../assets/NcDashboardWidgetItem-
|
|
2
|
-
import { N as NcActionButton } from "./NcActionButton-
|
|
3
|
-
import { N as NcActions } from "./NcActions-
|
|
4
|
-
import { N as NcAvatar } from "./NcAvatar-
|
|
1
|
+
import '../assets/NcDashboardWidgetItem-DpVmEBwQ.css';
|
|
2
|
+
import { N as NcActionButton } from "./NcActionButton-DNXoAooH.mjs";
|
|
3
|
+
import { N as NcActions } from "./NcActions-CCXgfwjS.mjs";
|
|
4
|
+
import { N as NcAvatar } from "./NcAvatar-xQb0quUq.mjs";
|
|
5
5
|
import { resolveComponent, createElementBlock, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot, createCommentVNode, createElementVNode, createVNode, toDisplayString, Fragment, renderList, withModifiers, createTextVNode } from "vue";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
7
7
|
const _sfc_main = {
|
|
@@ -145,9 +145,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
145
145
|
size: 44,
|
|
146
146
|
url: $props.avatarUrl,
|
|
147
147
|
user: $props.avatarUsername,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}, null, 8, ["url", "user", "
|
|
148
|
+
isNoUser: $props.avatarIsNoUser,
|
|
149
|
+
hideStatus: $options.gotOverlayIcon
|
|
150
|
+
}, null, 8, ["url", "user", "isNoUser", "hideStatus"])
|
|
151
151
|
], true),
|
|
152
152
|
$props.overlayIconUrl ? (openBlock(), createElementBlock("img", {
|
|
153
153
|
key: 0,
|
|
@@ -165,7 +165,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
165
165
|
]),
|
|
166
166
|
$options.gotMenu ? (openBlock(), createBlock(_component_NcActions, {
|
|
167
167
|
key: 1,
|
|
168
|
-
|
|
168
|
+
forceMenu: $props.forceMenu
|
|
169
169
|
}, {
|
|
170
170
|
default: withCtx(() => [
|
|
171
171
|
renderSlot(_ctx.$slots, "actions", {}, () => [
|
|
@@ -173,7 +173,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
173
173
|
return openBlock(), createBlock(_component_NcActionButton, {
|
|
174
174
|
key: menuItemId,
|
|
175
175
|
icon: m.icon,
|
|
176
|
-
|
|
176
|
+
closeAfterClick: true,
|
|
177
177
|
onClick: withModifiers(($event) => _ctx.$emit(menuItemId, $options.item), ["prevent", "stop"])
|
|
178
178
|
}, {
|
|
179
179
|
default: withCtx(() => [
|
|
@@ -185,14 +185,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
185
185
|
], true)
|
|
186
186
|
]),
|
|
187
187
|
_: 3
|
|
188
|
-
}, 8, ["
|
|
188
|
+
}, 8, ["forceMenu"])) : createCommentVNode("", true)
|
|
189
189
|
]),
|
|
190
190
|
_: 3
|
|
191
191
|
}, 8, ["href", "target", "class", "onClick"]))
|
|
192
192
|
], 32);
|
|
193
193
|
}
|
|
194
|
-
const NcDashboardWidgetItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
194
|
+
const NcDashboardWidgetItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2c8b617b"]]);
|
|
195
195
|
export {
|
|
196
196
|
NcDashboardWidgetItem as N
|
|
197
197
|
};
|
|
198
|
-
//# sourceMappingURL=NcDashboardWidgetItem-
|
|
198
|
+
//# sourceMappingURL=NcDashboardWidgetItem-Cu-899WY.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcDashboardWidgetItem-Cu-899WY.mjs","sources":["../../src/components/NcDashboardWidgetItem/NcDashboardWidgetItem.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component is meant to be used inside a DashboardWidget component.\n\n</docs>\n\n<template>\n\t<div @mouseover=\"hovered = true\" @mouseleave=\"hovered = false\">\n\t\t<component\n\t\t\t:is=\"targetUrl ? 'a' : 'div'\"\n\t\t\t:href=\"targetUrl || undefined\"\n\t\t\t:target=\"targetUrl ? '_blank' : undefined\"\n\t\t\tclass=\"item-list__entry\"\n\t\t\t:class=\"{ 'item-list__entry--has-actions-menu': gotMenu }\"\n\t\t\t@click=\"onLinkClick\">\n\t\t\t<!-- @slot Slot for passing a user avatar. -->\n\t\t\t<slot name=\"avatar\" :avatarUrl=\"avatarUrl\" :avatarUsername=\"avatarUsername\">\n\t\t\t\t<NcAvatar\n\t\t\t\t\tclass=\"item-avatar\"\n\t\t\t\t\t:size=\"44\"\n\t\t\t\t\t:url=\"avatarUrl\"\n\t\t\t\t\t:user=\"avatarUsername\"\n\t\t\t\t\t:isNoUser=\"avatarIsNoUser\"\n\t\t\t\t\t:hideStatus=\"gotOverlayIcon\" />\n\t\t\t</slot>\n\t\t\t<img\n\t\t\t\tv-if=\"overlayIconUrl\"\n\t\t\t\tclass=\"item-icon\"\n\t\t\t\talt=\"\"\n\t\t\t\t:src=\"overlayIconUrl\">\n\t\t\t<div class=\"item__details\">\n\t\t\t\t<h3 :title=\"mainText\">\n\t\t\t\t\t{{ mainText }}\n\t\t\t\t</h3>\n\t\t\t\t<span v-if=\"subText !== ''\" class=\"message\" :title=\"subText\">\n\t\t\t\t\t{{ subText }}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<NcActions v-if=\"gotMenu\" :forceMenu=\"forceMenu\">\n\t\t\t\t<!-- @slot This slot can be used to provide actions for each dashboard widget item. -->\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\tv-for=\"(m, menuItemId) in itemMenu\"\n\t\t\t\t\t\t:key=\"menuItemId\"\n\t\t\t\t\t\t:icon=\"m.icon\"\n\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t@click.prevent.stop=\"$emit(menuItemId, item)\">\n\t\t\t\t\t\t{{ m.text }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</slot>\n\t\t\t</NcActions>\n\t\t</component>\n\t</div>\n</template>\n\n<script>\nimport NcActionButton from '../NcActionButton/index.js'\nimport NcActions from '../NcActions/index.js'\nimport NcAvatar from '../NcAvatar/index.js'\n\nexport default {\n\tname: 'NcDashboardWidgetItem',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcActions,\n\t\tNcActionButton,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The item id (optional)\n\t\t */\n\t\tid: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The item element is a link to this URL (optional)\n\t\t */\n\t\ttargetUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Where to get the avatar image. (optional) Used if avatarUsername is not defined.\n\t\t */\n\t\tavatarUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Name to provide to the Avatar. (optional) Used if avatarUrl is not defined.\n\t\t */\n\t\tavatarUsername: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Is the avatarUsername not a user's name? (optional, false by default)\n\t\t */\n\t\tavatarIsNoUser: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Small icon to display on the bottom-right corner of the avatar (optional)\n\t\t */\n\t\toverlayIconUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Item main text (mandatory)\n\t\t */\n\t\tmainText: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Item subline text (optional)\n\t\t */\n\t\tsubText: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each items (optional)\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\n\t\t/**\n\t\t * Specify whether the 3 dot menu is forced when only one action is present\n\t\t */\n\t\tforceMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\thovered: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\titem() {\n\t\t\treturn {\n\t\t\t\tid: this.id,\n\t\t\t\ttargetUrl: this.targetUrl,\n\t\t\t\tavatarUrl: this.avatarUrl,\n\t\t\t\tavatarUsername: this.avatarUsername,\n\t\t\t\toverlayIconUrl: this.overlayIconUrl,\n\t\t\t\tmainText: this.mainText,\n\t\t\t\tsubText: this.subText,\n\t\t\t}\n\t\t},\n\n\t\tgotMenu() {\n\t\t\treturn Object.keys(this.itemMenu).length !== 0 || !!this.$slots.actions\n\t\t},\n\n\t\tgotOverlayIcon() {\n\t\t\treturn this.overlayIconUrl && this.overlayIconUrl !== ''\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonLinkClick(event) {\n\t\t\tif (event.target.closest('.action-item')) {\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: relative;\n\tpadding: 8px;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-element);\n\t}\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-top: auto;\n\t\tmargin-bottom: auto;\n\t}\n\t.item__details {\n\t\tpadding-inline-start: 8px;\n\t\tmax-height: fit-content;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tmin-height: var(--default-clickable-area);\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.message span {\n\t\t\twidth: 10px;\n\t\t\tdisplay: inline-block;\n\t\t\tmargin-bottom: -3px;\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 100%;\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\n\t.item-icon {\n\t\tposition: relative;\n\t\twidth: 14px;\n\t\theight: 14px;\n\t\tmargin-top: 25px;\n\t\tmargin-inline: -10px -2px;\n\t}\n\n\tbutton.primary {\n\t\tpadding: 21px;\n\t\tmargin: 0;\n\t}\n}\n/*\n.content-popover {\n\theight: 0px;\n\twidth: 0px;\n\tmargin-inline: auto;\n}\n.popover-container {\n\twidth: 100%;\n\theight: 0px;\n}\n*/\n</style>\n"],"names":["_createElementBlock","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_renderSlot","_createVNode","_createElementVNode","_Fragment","_renderList","_withModifiers","_createTextVNode","_toDisplayString"],"mappings":";;;;;AAmEA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA;EAGD,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,IAAI;AAAA,MACH,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA;;;;IAMV,WAAW;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMV,WAAW;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMV,gBAAgB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMV,gBAAgB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMV,gBAAgB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMV,UAAU;AAAA,MACT,MAAM;AAAA,MACN,UAAU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ef, computed, createElementBlock, openBlock, createVNode, createBlock, unref, mergeProps, createSlots, withCtx, createTextVNode, toDisplayString, Teleport, createElementVNode } from "vue";
|
|
3
|
-
import {
|
|
3
|
+
import { x as mdiChevronUp, y as mdiChevronDown, c as mdiChevronRight, z as mdiChevronLeft, A as mdiClock, B as mdiCalendarBlank, b as mdiClose } from "./mdi-CpchYUUV.mjs";
|
|
4
4
|
import { getCanonicalLocale, getFirstDay, getDayNamesMin, getDayNames } from "@nextcloud/l10n";
|
|
5
5
|
import VueDatePicker from "@vuepic/vue-datepicker";
|
|
6
6
|
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-BvLanNaW.mjs";
|
|
7
|
-
import { _ as _sfc_main$1 } from "./NcTimezonePicker.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { r as register, y as t13, a as t } from "./_l10n-
|
|
7
|
+
import { _ as _sfc_main$1 } from "./NcTimezonePicker.vue_vue_type_script_setup_true_lang-t72lL380.mjs";
|
|
8
|
+
import { r as register, y as t13, a as t } from "./_l10n-BSFzy-71.mjs";
|
|
9
9
|
import { N as NcButton } from "./NcButton-CzpKEx4V.mjs";
|
|
10
10
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
11
11
|
register(t13);
|
|
@@ -24,17 +24,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
confirm: { type: Boolean },
|
|
25
25
|
format: { type: [String, Function], default: void 0 },
|
|
26
26
|
locale: { default: getCanonicalLocale() },
|
|
27
|
+
max: { default: void 0 },
|
|
28
|
+
min: { default: void 0 },
|
|
27
29
|
minuteStep: { default: 10 },
|
|
28
30
|
modelValue: { default: null },
|
|
29
31
|
placeholder: { default: void 0 },
|
|
30
32
|
showTimezoneSelect: { type: Boolean },
|
|
31
33
|
showWeekNumber: { type: Boolean },
|
|
32
|
-
type: { default: "date" }
|
|
34
|
+
type: { default: "date" },
|
|
35
|
+
inline: { type: Boolean, default: false }
|
|
33
36
|
}, {
|
|
34
37
|
"timezoneId": { default: "UTC" },
|
|
35
38
|
"timezoneIdModifiers": {}
|
|
36
39
|
}),
|
|
37
|
-
emits: /* @__PURE__ */ mergeModels(["update:modelValue", "update:timezoneId"], ["update:timezoneId"]),
|
|
40
|
+
emits: /* @__PURE__ */ mergeModels(["update:modelValue", "update:timezoneId", "blur"], ["update:timezoneId"]),
|
|
38
41
|
setup(__props, { emit: __emit }) {
|
|
39
42
|
const timezoneId = useModel(__props, "timezoneId");
|
|
40
43
|
const props = __props;
|
|
@@ -142,6 +145,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
142
145
|
enableTimePicker: !(props.type === "date" || props.type === "date-range"),
|
|
143
146
|
flow: props.type === "datetime" ? ["calendar", "time"] : void 0
|
|
144
147
|
}));
|
|
148
|
+
const minTime = computed(() => props.min && { hours: props.min.getHours(), minutes: props.min.getMinutes(), seconds: props.min.getSeconds() });
|
|
149
|
+
const maxTime = computed(() => props.max && { hours: props.max.getHours(), minutes: props.max.getMinutes(), seconds: props.max.getSeconds() });
|
|
145
150
|
function onUpdateModelValue(value2) {
|
|
146
151
|
if (value2 === null) {
|
|
147
152
|
return emit("update:modelValue", null);
|
|
@@ -229,30 +234,69 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
229
234
|
function cancelSelection() {
|
|
230
235
|
pickerInstance.value.closeMenu();
|
|
231
236
|
}
|
|
237
|
+
const calcMinMaxTime = computed(() => {
|
|
238
|
+
if (props.type === "datetime") {
|
|
239
|
+
return {
|
|
240
|
+
minDate: props.min,
|
|
241
|
+
maxDate: props.max,
|
|
242
|
+
minTime: props.min && value.value && sameDay(props.min, value.value) ? minTime.value : void 0,
|
|
243
|
+
maxTime: props.max && value.value && sameDay(props.max, value.value) ? maxTime.value : void 0
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
if (props.type === "datetime-range") {
|
|
247
|
+
return {
|
|
248
|
+
minDate: props.min,
|
|
249
|
+
maxDate: props.max,
|
|
250
|
+
minTime: props.min && value.value ? sameDay(props.min, value.value[0]) ? minTime.value : void 0 : void 0,
|
|
251
|
+
maxTime: props.max && value.value ? sameDay(props.max, value.value[1]) ? maxTime.value : void 0 : void 0
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
if (props.type === "time" || props.type === "time-range") {
|
|
255
|
+
return {
|
|
256
|
+
minTime: props.min ? minTime.value : void 0,
|
|
257
|
+
maxTime: props.max ? maxTime.value : void 0
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
return {
|
|
261
|
+
minDate: props.min,
|
|
262
|
+
maxDate: props.max
|
|
263
|
+
};
|
|
264
|
+
});
|
|
265
|
+
function sameDay(a, b) {
|
|
266
|
+
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
267
|
+
}
|
|
232
268
|
return (_ctx, _cache) => {
|
|
233
269
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
234
270
|
createVNode(unref(VueDatePicker), mergeProps({
|
|
235
271
|
ref: "picker",
|
|
236
272
|
"aria-labels": ariaLabels.value,
|
|
237
|
-
|
|
273
|
+
autoApply: !_ctx.confirm,
|
|
238
274
|
class: ["vue-date-time-picker", { "vue-date-time-picker--clearable": _ctx.clearable }],
|
|
239
|
-
|
|
275
|
+
cancelText: unref(t)("Cancel"),
|
|
240
276
|
clearable: _ctx.clearable,
|
|
241
|
-
|
|
277
|
+
dayNames,
|
|
242
278
|
placeholder: _ctx.placeholder ?? placeholderFallback.value,
|
|
243
279
|
format: realFormat.value,
|
|
244
280
|
locale: _ctx.locale,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
281
|
+
minDate: calcMinMaxTime.value.minDate,
|
|
282
|
+
maxDate: calcMinMaxTime.value.maxDate,
|
|
283
|
+
minTime: calcMinMaxTime.value.minTime,
|
|
284
|
+
maxTime: calcMinMaxTime.value.maxTime,
|
|
285
|
+
minutesIncrement: _ctx.minuteStep,
|
|
286
|
+
modelValue: value.value,
|
|
287
|
+
nowButtonLabel: unref(t)("Now"),
|
|
288
|
+
selectText: unref(t)("Pick"),
|
|
289
|
+
sixWeeks: "fair",
|
|
290
|
+
inline: _ctx.inline,
|
|
250
291
|
teleport: _ctx.appendToBody ? targetElement.value || void 0 : false,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}, pickerType.value, {
|
|
292
|
+
textInput: "",
|
|
293
|
+
weekNumName: unref(weekNumName),
|
|
294
|
+
weekNumbers: _ctx.showWeekNumber ? { type: "iso" } : void 0,
|
|
295
|
+
weekStart: unref(weekStart)
|
|
296
|
+
}, pickerType.value, {
|
|
297
|
+
"onUpdate:modelValue": onUpdateModelValue,
|
|
298
|
+
onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur"))
|
|
299
|
+
}), createSlots({
|
|
256
300
|
"action-buttons": withCtx(() => [
|
|
257
301
|
createVNode(unref(NcButton), {
|
|
258
302
|
size: "small",
|
|
@@ -341,13 +385,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
341
385
|
modelValue: timezoneId.value,
|
|
342
386
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => timezoneId.value = $event),
|
|
343
387
|
class: "vue-date-time-picker__timezone",
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}, null, 8, ["modelValue", "
|
|
388
|
+
appendToBody: false,
|
|
389
|
+
inputLabel: unref(t)("Time zone")
|
|
390
|
+
}, null, 8, ["modelValue", "inputLabel"])
|
|
347
391
|
]),
|
|
348
392
|
key: "0"
|
|
349
393
|
} : void 0
|
|
350
|
-
]), 1040, ["aria-labels", "
|
|
394
|
+
]), 1040, ["aria-labels", "autoApply", "class", "cancelText", "clearable", "placeholder", "format", "locale", "minDate", "maxDate", "minTime", "maxTime", "minutesIncrement", "modelValue", "nowButtonLabel", "selectText", "inline", "teleport", "weekNumName", "weekNumbers", "weekStart"]),
|
|
351
395
|
(openBlock(), createBlock(Teleport, {
|
|
352
396
|
to: "body",
|
|
353
397
|
disabled: !_ctx.appendToBody
|
|
@@ -358,8 +402,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
358
402
|
};
|
|
359
403
|
}
|
|
360
404
|
});
|
|
361
|
-
const NcDateTimePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
405
|
+
const NcDateTimePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e6654786"]]);
|
|
362
406
|
export {
|
|
363
407
|
NcDateTimePicker as N
|
|
364
408
|
};
|
|
365
|
-
//# sourceMappingURL=NcDateTimePicker-
|
|
409
|
+
//# sourceMappingURL=NcDateTimePicker-CF8TMzyS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcDateTimePicker-CF8TMzyS.mjs","sources":["../../src/components/NcDateTimePicker/NcDateTimePicker.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nIn general it is recommended to use the native date picker (see `NcDateTimePickerNative` which is based on `<input type=\"date\">`).\nBut some use cases are not covered by the native date selector, like selecting ranges or selecting a timezone.\nFor those cases this component can be used.\n\n### General examples\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<fieldset class=\"type-select\">\n\t\t\t<legend>Picker mode</legend>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"date\">Date</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"datetime\">Date and time</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"week\">Week</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"month\">Month</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"year\">Year</NcCheckboxRadioSwitch>\n\t\t</fieldset>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\t:type />\n\t\t<span>{{ time }}</span>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttype: 'date',\n\t\t\ttime: new Date('2022-10-10 10:10:10'),\n\t\t}\n\t},\n}\n</script>\n<style scoped>\n.wrapper {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.type-select {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n}\n</style>\n```\n\n### Example with confirm button\n\nBy default the date is applied as soon as you select the day in the calendar.\nSometimes - especially when selecting date and time - it is required to only emit the selected date when the flow is finished.\nFor this the `confirm` prop can be used, this will add a confirmation button to the selector.\n\n```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\ttype=\"datetime\"\n\t\t\tconfirm />\n\t\t{{ time }}\n\t</span>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttime: null,\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n### Range picker\n\nThe most common use case for the `NcDateTimePicker` is picking a range, as this is not supported by the native date picker.\n\nWhen selecting the range picker type, the model value type will change from `Date` to `[Date, Date]`.\nMeaning an array with two dates is used, the first date is the range start and the second date is the range end.\n\n```vue\n<template>\n\t<div>\n\t\t<fieldset class=\"type-select\">\n\t\t\t<legend>Picker mode</legend>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"date-range\">Date</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"time-range\">Time</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"type\" type=\"radio\" value=\"datetime-range\">Date and time</NcCheckboxRadioSwitch>\n\t\t</fieldset>\n\n\t\t<NcDateTimePicker\n\t\t\t:key=\"type\"\n\t\t\tv-model=\"time\"\n\t\t\t:type />\n\t\t<div>\n\t\t\t<div>Start: {{ formatDate(time[0]) }}</div>\n\t\t\t<div>End: {{ formatDate(time[1]) }}</div>\n\t\t</div>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttime: [new Date(2025, 3, 18, 12, 30), new Date(2025, 3, 21, 13, 30)],\n\t\t\ttype: 'date-range',\n\t\t}\n\t},\n\tmethods: {\n\t\tformatDate(date) {\n\t\t\tconst dateString = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`\n\t\t\tconst timeString = `${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`\n\t\t\tif (this.type === 'date-range') {\n\t\t\t\treturn dateString\n\t\t\t} else if (this.type === 'time-range') {\n\t\t\t\treturn timeString\n\t\t\t}\n\t\t\treturn `${dateString} ${timeString}`\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.type-select {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n}\n</style>\n```\n\n### Time zone aware date picker\n\nThe datepicker can optionally include a picker for the preferred time zone. The selected time does not factor in the\npicked time zone, but you will have to convert it yourself when necessary.\n\n```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\ttype=\"datetime\"\n\t\t\tshow-timezone-select\n\t\t\tv-model:timezone-id=\"tz\" /><br>\n\t\t{{ time }} | {{ tz }}\n\t</span>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttime: undefined,\n\t\t\ttz: 'Europe/Berlin',\n\t\t}\n\t},\n}\n</script>\n```\n\n### Restricting to a specific time range\n\nYou can optionally restrict the selectable time range, for example from 08:00 on Monday to 20:00 on Sunday of the current week.\nThis example shows how the `min` and `max` properties are applied to different picker types.\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Date and time</h4>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"selectedDatetime\"\n\t\t\ttype=\"datetime\"\n\t\t\t:min=\"min\"\n\t\t\t:max=\"max\" />\n\t\t<p>Selected: {{ selectedDatetime }}</p>\n\n\t\t<h4>Date range</h4>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"selectedDateRange\"\n\t\t\ttype=\"date-range\"\n\t\t\t:min=\"min\"\n\t\t\t:max=\"max\" />\n\t\t<p>Selected: {{ selectedDateRange }}</p>\n\n\t\t<h4>Date and time range</h4>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"selectedDatetimeRange\"\n\t\t\ttype=\"datetime-range\"\n\t\t\t:min=\"min\"\n\t\t\t:max=\"max\" />\n\t\t<p>Selected: {{ selectedDatetimeRange }}</p>\n\n\t\t<h4>Time range</h4>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"selectedTimeRange\"\n\t\t\ttype=\"time-range\"\n\t\t\t:min=\"min\"\n\t\t\t:max=\"max\" />\n\t\t<p>Selected: {{ selectedTimeRange }}</p>\n\n\t\t<h4>Time</h4>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"selectedTime\"\n\t\t\ttype=\"time\"\n\t\t\t:min=\"min\"\n\t\t\t:max=\"max\" />\n\t\t<p>Selected: {{ selectedTime }}</p>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\tconst now = new Date()\n\t\tconst day = now.getDay()\n\t\tconst daysSinceMonday = (day + 6) % 7\n\n\t\tconst startOfWeek = new Date(now)\n\t\tstartOfWeek.setDate(now.getDate() - daysSinceMonday)\n\t\tstartOfWeek.setHours(8, 0, 0, 0)\n\n\t\tconst endOfWeek = new Date(startOfWeek)\n\t\tendOfWeek.setDate(startOfWeek.getDate() + 6)\n\t\tendOfWeek.setHours(20, 0, 0, 0)\n\n\t\treturn {\n\t\t\tselectedDatetime: null,\n\t\t\tselectedDateRange: null,\n\t\t\tselectedDatetimeRange: null,\n\t\t\tselectedTimeRange: null,\n\t\t\tselectedTime: null,\n\t\t\tmin: startOfWeek,\n\t\t\tmax: endOfWeek,\n\t\t}\n\t},\n}\n</script>\n```\n\n### Inline calendar\n\nRenders the calendar inline (without the text input) inside your parent component.\n\n```vue\n<template>\n\t<div>\n\t\t<NcDateTimePicker v-model=\"date\" inline />\n\t\t<p>Selected: {{ date }}</p>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn { date: new Date() }\n\t},\n}\n</script>\n```\n</docs>\n\n<script setup lang=\"ts\">\nimport type {\n\t// The accepted model value\n\tModelValue as LibraryModelValue,\n\t// The emitted object for time picker\n\tTimeObj as LibraryTimeObject,\n\tVueDatePickerProps,\n} from '@vuepic/vue-datepicker'\n\nimport {\n\tmdiCalendarBlank,\n\tmdiChevronDown,\n\tmdiChevronLeft,\n\tmdiChevronRight,\n\tmdiChevronUp,\n\tmdiClock,\n\tmdiClose,\n} from '@mdi/js'\nimport {\n\tgetCanonicalLocale,\n\tgetDayNames,\n\tgetDayNamesMin,\n\tgetFirstDay,\n} from '@nextcloud/l10n'\nimport VueDatePicker from '@vuepic/vue-datepicker'\nimport { computed, useTemplateRef } from 'vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport NcTimezonePicker from '../NcTimezonePicker/NcTimezonePicker.vue'\nimport { t } from '../../l10n.ts'\nimport NcButton from '../NcButton/index.ts'\n\ntype LibraryFormatOptions = VueDatePickerProps['format']\n\n/**\n * The preselected IANA time zone ID for the time zone picker,\n * only relevant in combination with `show-timezone-select`.\n * The prop supports two-way binding through v-model directive.\n *\n * @example `Europe/Berlin`\n * @default 'UTC'\n */\nconst timezoneId = defineModel<string>('timezoneId', { default: 'UTC' })\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * If set to true the menu will be placed on the `<body>`\n\t * instead of default placement on the picker.\n\t */\n\tappendToBody?: boolean\n\n\t/**\n\t * Aria label for the input box.\n\t *\n\t * @default 'Datepicker input'\n\t */\n\tariaLabel?: string\n\n\t/**\n\t * Aria label for the date picker menu.\n\t *\n\t * @default 'Datepicker menu'\n\t */\n\tariaLabelMenu?: string\n\n\t/**\n\t * Allow to clear the input.\n\t *\n\t * @default false\n\t */\n\tclearable?: boolean\n\n\t/**\n\t * Do not auto-apply the date but require clicking the confirmation button.\n\t *\n\t * @default false\n\t */\n\tconfirm?: boolean\n\n\t/**\n\t * Preview format for the picker input field.\n\t * Can either be a string of Unicode tokens or a function that takes a Date object\n\t * or for range picker an array of two dates, and returns the formatted date as string.\n\t *\n\t * @default Intl.DateTimeFormat is used to format dates and times\n\t * @see https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n\t */\n\tformat?: string | ((date: Date) => string) | ((dates: [Date, Date]) => string)\n\n\t/**\n\t * The locale to use for formatting the shown dates.\n\t * By default the users current Nextcloud locale is used.\n\t */\n\tlocale?: string\n\n\t/**\n\t * The maximum date that can be selected.\n\t */\n\tmax?: Date\n\n\t/**\n\t * The minimum date that can be selected.\n\t */\n\tmin?: Date\n\n\t/**\n\t * Default increment step for minutes in the time picker.\n\t *\n\t * @default 10\n\t */\n\tminuteStep?: number\n\n\t/**\n\t * The value to initialize, but also two-way bind the selected date. The date is – like the `Date` object in\n\t * JavaScript – tied to UTC. The selected time zone does not have an influence of the selected time and date\n\t * value. You have to translate the time yourself when you want to factor in time zones.\n\t *\n\t * When using the range picker then an array containing the start and end date needs to be passed.\n\t */\n\tmodelValue?: Date | [Date, Date] | null\n\n\t/**\n\t * Optional custom placeholder for the input box.\n\t */\n\tplaceholder?: string\n\n\t/**\n\t * Include a timezone picker within the menu.\n\t * Please note that the dates are still bound to the locale timezone\n\t * and any conversion needs to be done by the app itself.\n\t *\n\t * @default false\n\t */\n\tshowTimezoneSelect?: boolean\n\n\t/**\n\t * Show the ISO week numbers within the calendar.\n\t *\n\t * @default false\n\t */\n\tshowWeekNumber?: boolean\n\n\t/**\n\t * Type of the picker.\n\t * There is some special handling for ranges as those types require a `[Date, Date]` model value.\n\t * - The 'date-range' type will enable a range picker for dates\n\t * - The 'time-range' allows picking a time range.\n\t * - The 'datetime-range' allows picking dates with times assigned.\n\t *\n\t * @default 'date'\n\t */\n\ttype?: 'date' | 'datetime' | 'time' | 'week' | 'month' | 'year' | 'date-range' | 'time-range' | 'datetime-range'\n\n\t/**\n\t * Render the calendar inline (no input field).\n\t *\n\t * @default false\n\t */\n\tinline?: boolean\n}>(), {\n\tariaLabel: t('Datepicker input'),\n\tariaLabelMenu: t('Datepicker menu'),\n\tformat: undefined,\n\tlocale: getCanonicalLocale(),\n\tmax: undefined,\n\tmin: undefined,\n\tminuteStep: 10,\n\ttimezoneId: 'UTC',\n\tmodelValue: null,\n\t// set by fallbackPlaceholder\n\tplaceholder: undefined,\n\ttype: 'date',\n\tinline: false,\n})\n\nconst emit = defineEmits<{\n\t/**\n\t * If range picker is enabled then an array containing start and end date are emitted.\n\t * Otherwise the selected date is emitted.\n\t * `null` is emitted if `clearable` is set to `true` and the value was cleared.\n\t */\n\t'update:modelValue': [Date | [Date, Date] | null]\n\t'update:timezoneId': [string]\n\t/**\n\t * Input blur\n\t */\n\tblur: []\n}>()\n\nconst targetElement = useTemplateRef('target')\nconst pickerInstance = useTemplateRef('picker')\n\n/**\n * Mapping of the model-value prop to the format expected by the library.\n * We do not directly pass the prop and adjust the interface to not transparently wrap the library.\n * This has show as beeing a pain in the past when we need to switch underlying libraries.\n */\nconst value = computed<LibraryModelValue>(() => {\n\tif (props.modelValue === null && props.clearable) {\n\t\treturn null\n\t}\n\n\tif (props.type === 'week') {\n\t\tconst date = props.modelValue instanceof Date ? props.modelValue : new Date()\n\t\tconst end = new Date(date)\n\t\tend.setUTCDate(date.getUTCDate() + 6)\n\t\treturn [date, end]\n\t} else if (props.type === 'year') {\n\t\tconst date = props.modelValue instanceof Date ? props.modelValue : new Date()\n\t\treturn date.getUTCFullYear()\n\t} else if (props.type === 'month') {\n\t\tconst date = props.modelValue instanceof Date ? props.modelValue : new Date()\n\t\treturn { year: date.getUTCFullYear(), month: date.getUTCMonth() }\n\t} else if (props.type === 'time') {\n\t\tconst time = props.modelValue instanceof Date ? props.modelValue : new Date()\n\t\treturn {\n\t\t\thours: time.getHours(),\n\t\t\tminutes: time.getMinutes(),\n\t\t\tseconds: time.getSeconds(),\n\t\t} satisfies LibraryTimeObject\n\t} else if (props.type === 'time-range') {\n\t\tconst time = [props.modelValue].flat()\n\t\tif (time.length !== 2) {\n\t\t\tconst start = new Date()\n\t\t\tconst end = new Date(start)\n\t\t\tend.setHours(end.getHours() + 1)\n\t\t\ttime.splice(0, 2, start, end)\n\t\t}\n\n\t\treturn (time as [Date, Date]).map((date) => ({\n\t\t\thours: date.getHours(),\n\t\t\tminutes: date.getMinutes(),\n\t\t\tseconds: date.getSeconds(),\n\t\t} as LibraryTimeObject))\n\t} else if (props.type.endsWith('-range')) {\n\t\tif (props.modelValue === undefined) {\n\t\t\tconst start = new Date()\n\t\t\tconst end = new Date(start)\n\t\t\tend.setUTCDate(start.getUTCDate() + 7)\n\t\t\treturn [start, end]\n\t\t}\n\t\treturn props.modelValue\n\t}\n\n\t// no special handling for other types needed\n\treturn props.modelValue ?? new Date()\n})\n\nconst placeholderFallback = computed(() => {\n\tif (props.type === 'date') {\n\t\treturn t('Select date')\n\t} else if (props.type === 'time') {\n\t\treturn t('Select time')\n\t} else if (props.type === 'datetime') {\n\t\treturn t('Select date and time')\n\t} else if (props.type === 'week') {\n\t\treturn t('Select week')\n\t} else if (props.type === 'month') {\n\t\treturn t('Select month')\n\t} else if (props.type === 'year') {\n\t\treturn t('Select year')\n\t} else if (props.type.endsWith('-range')) {\n\t\treturn t('Select time range')\n\t}\n\t// should not be reached\n\treturn t('Select date and time')\n})\n\n/**\n * The date (time) formatting to be used by the library.\n * We use the provided format if possible, otherwise we provide a formatting function\n * which uses the browsers Intl API to format the date / time in the current users locale.\n */\nconst realFormat = computed<LibraryFormatOptions>(() => {\n\tif (props.format) {\n\t\t// we can cast the type here as in this case its either string\n\t\t// function `(Date) => string` or `([Date, Date]) => string` where we cast to `(Date[]) => string` here.\n\t\treturn props.format as LibraryFormatOptions\n\t} else if (props.type === 'week') {\n\t\t// cannot format weeks with Intl.\n\t\treturn 'RR-II'\n\t}\n\n\tlet formatter: Intl.DateTimeFormat | undefined\n\tif (props.type === 'date' || props.type === 'date-range') {\n\t\tformatter = new Intl.DateTimeFormat(getCanonicalLocale(), { dateStyle: 'medium' })\n\t} else if (props.type === 'time' || props.type === 'time-range') {\n\t\tformatter = new Intl.DateTimeFormat(getCanonicalLocale(), { timeStyle: 'short' })\n\t} else if (props.type === 'datetime' || props.type === 'datetime-range') {\n\t\tformatter = new Intl.DateTimeFormat(getCanonicalLocale(), { dateStyle: 'medium', timeStyle: 'short' })\n\t} else if (props.type === 'month') {\n\t\tformatter = new Intl.DateTimeFormat(getCanonicalLocale(), { year: 'numeric', month: '2-digit' })\n\t} else if (props.type === 'year') {\n\t\tformatter = new Intl.DateTimeFormat(getCanonicalLocale(), { year: 'numeric' })\n\t}\n\n\tif (formatter) {\n\t\treturn (input: Date | [Date, Date]) => Array.isArray(input)\n\t\t\t? formatter.formatRange(input[0], input[1])\n\t\t\t: formatter.format(input)\n\t}\n\n\t// fallback to default formatting\n\treturn undefined\n})\n\nconst pickerType = computed(() => ({\n\ttimePicker: props.type === 'time' || props.type === 'time-range',\n\tyearPicker: props.type === 'year',\n\tmonthPicker: props.type === 'month',\n\tweekPicker: props.type === 'week',\n\trange: props.type.endsWith('-range') && {\n\t\t// do not use partial ranges (meaning after selecting the start [Date, null] will be emitted)\n\t\t// if this is needed someday we can enable it,\n\t\t// but its not covered by our component interface (props / events) documentation so just disabled for now.\n\t\tpartialRange: false,\n\t},\n\tenableTimePicker: !(props.type === 'date' || props.type === 'date-range'),\n\tflow: props.type === 'datetime'\n\t\t? ['calendar', 'time'] as ['calendar', 'time']\n\t\t: undefined,\n}))\n\n// Convert min/max Date into VueDatePicker's time object shape\nconst minTime = computed(() => props.min && { hours: props.min.getHours(), minutes: props.min.getMinutes(), seconds: props.min.getSeconds() })\nconst maxTime = computed(() => props.max && { hours: props.max.getHours(), minutes: props.max.getMinutes(), seconds: props.max.getSeconds() })\n\n/**\n * Called on model value update of the library.\n *\n * @param value The value emitted from the underlying library\n */\nfunction onUpdateModelValue(value: LibraryModelValue): void {\n\tif (value === null) {\n\t\treturn emit('update:modelValue', null)\n\t}\n\n\tif (props.type === 'time') {\n\t\t// time is provided as an object\n\t\temit('update:modelValue', formatLibraryTime(value as LibraryTimeObject))\n\t} else if (props.type === 'time-range') {\n\t\t// same as time but as an array with two elements\n\t\tconst start = formatLibraryTime(value[0])\n\t\tconst end = formatLibraryTime(value[1])\n\t\t// ensure end is beyond the start\n\t\tif (end.getTime() < start.getTime()) {\n\t\t\tend.setDate(end.getDate() + 1)\n\t\t}\n\t\temit('update:modelValue', [start, end])\n\t} else if (props.type === 'month') {\n\t\t// month is emitted as an object with month and year attribute\n\t\tconst data = value as { month: number, year: number }\n\t\temit('update:modelValue', new Date(data.year, data.month, 1))\n\t} else if (props.type === 'year') {\n\t\t// Years are emitted as the numeric year e.g. 2022\n\t\temit('update:modelValue', new Date(value as number, 0))\n\t} else if (props.type === 'week') {\n\t\t// weeks are emitted as [Date, Date]\n\t\temit('update:modelValue', value[0])\n\t} else {\n\t\t// otherwise it already emits the correct format\n\t\temit('update:modelValue', value as Date | [Date, Date])\n\t}\n}\n\n/**\n * Format a vuepick time object to native JS Date object.\n *\n * @param time - The library time value object\n */\nfunction formatLibraryTime(time: LibraryTimeObject): Date {\n\tconst date = new Date()\n\tdate.setHours(time.hours)\n\tdate.setMinutes(time.minutes)\n\tdate.setSeconds(time.seconds)\n\treturn date\n}\n\n// Localization\n\nconst weekStart = getFirstDay()\n\nconst dayNames = [...getDayNamesMin()]\n// see https://github.com/Vuepic/vue-datepicker/issues/1159\nfor (let i = 0; i < weekStart; i++) {\n\tdayNames.push(dayNames.shift() as string)\n}\n\n// TRANSLATORS: A very short abbrevation used as a heading for \"week number\"\nconst weekNumName = t('W')\n\nconst ariaLabels = computed(() => ({\n\ttoggleOverlay: t('Toggle overlay'),\n\tmenu: props.ariaLabelMenu,\n\tinput: props.ariaLabel,\n\topenTimePicker: t('Open time picker'),\n\tcloseTimePicker: t('Close time Picker'),\n\tincrementValue: (type: 'hours' | 'minutes' | 'seconds') => {\n\t\tif (type === 'hours') {\n\t\t\treturn t('Increment hours')\n\t\t} else if (type === 'minutes') {\n\t\t\treturn t('Increment minutes')\n\t\t}\n\t\treturn t('Increment seconds')\n\t},\n\tdecrementValue: (type: 'hours' | 'minutes' | 'seconds') => {\n\t\tif (type === 'hours') {\n\t\t\treturn t('Decrement hours')\n\t\t} else if (type === 'minutes') {\n\t\t\treturn t('Decrement minutes')\n\t\t}\n\t\treturn t('Decrement seconds')\n\t},\n\topenTpOverlay: (type: 'hours' | 'minutes' | 'seconds') => {\n\t\tif (type === 'hours') {\n\t\t\treturn t('Open hours overlay')\n\t\t} else if (type === 'minutes') {\n\t\t\treturn t('Open minutes overlay')\n\t\t}\n\t\treturn t('Open seconds overlay')\n\t},\n\tamPmButton: t('Switch AM/PM mode'),\n\topenYearsOverlay: t('Open years overlay'),\n\topenMonthsOverlay: t('Open months overlay'),\n\tnextMonth: t('Next month'),\n\tprevMonth: t('Previous month'),\n\tnextYear: t('Next year'),\n\tprevYear: t('Previous year'),\n\tweekDay: (day: number) => getDayNames()[day],\n\tclearInput: t('Clear value'),\n\tcalendarIcon: t('Calendar icon'),\n\ttimePicker: t('Time picker'),\n\tmonthPicker: (overlay: boolean) => overlay ? t('Month picker overlay') : t('Month picker'),\n\tyearPicker: (overlay: boolean) => overlay ? t('Year picker overlay') : t('Year picker'),\n}))\n\n/**\n * Select the current value.\n * This is used by the confirmation button if `confirmation` was set.\n */\nfunction selectDate() {\n\tpickerInstance.value!.selectDate()\n}\n\n/**\n * Cancel the current selection by closing the overlay.\n * This is used by the confirmation button if `confirmation` was set.\n */\nfunction cancelSelection() {\n\tpickerInstance.value!.closeMenu()\n}\n\n/**\n * Calculate the min/max time restrictions based on the selected date(s) and provided min/max dates.\n */\nconst calcMinMaxTime = computed(() => {\n\tif (props.type === 'datetime') {\n\t\treturn {\n\t\t\tminDate: props.min,\n\t\t\tmaxDate: props.max,\n\t\t\tminTime: props.min && value.value && sameDay(props.min, value.value as Date) ? minTime.value : undefined,\n\t\t\tmaxTime: props.max && value.value && sameDay(props.max, value.value as Date) ? maxTime.value : undefined,\n\t\t}\n\t}\n\n\tif (props.type === 'datetime-range') {\n\t\treturn {\n\t\t\tminDate: props.min,\n\t\t\tmaxDate: props.max,\n\t\t\tminTime: props.min && value.value ? (sameDay(props.min, value.value[0] as Date) ? minTime.value : undefined) : undefined,\n\t\t\tmaxTime: props.max && value.value ? (sameDay(props.max, value.value[1] as Date) ? maxTime.value : undefined) : undefined,\n\t\t}\n\t}\n\n\tif (props.type === 'time' || props.type === 'time-range') {\n\t\treturn {\n\t\t\tminTime: props.min ? minTime.value : undefined,\n\t\t\tmaxTime: props.max ? maxTime.value : undefined,\n\t\t}\n\t}\n\n\treturn {\n\t\tminDate: props.min,\n\t\tmaxDate: props.max,\n\t}\n})\n\n/**\n * Check if two dates are on the same day.\n *\n * @param a - First date\n * @param b - Second date\n */\nfunction sameDay(a: Date, b: Date): boolean {\n\treturn (\n\t\ta.getFullYear() === b.getFullYear()\n\t\t&& a.getMonth() === b.getMonth()\n\t\t&& a.getDate() === b.getDate()\n\t)\n}\n</script>\n\n<template>\n\t<div class=\"vue-date-time-picker__wrapper\">\n\t\t<VueDatePicker\n\t\t\tref=\"picker\"\n\t\t\t:aria-labels\n\t\t\t:autoApply=\"!confirm\"\n\t\t\tclass=\"vue-date-time-picker\"\n\t\t\t:class=\"{ 'vue-date-time-picker--clearable': clearable }\"\n\t\t\t:cancelText=\"t('Cancel')\"\n\t\t\t:clearable\n\t\t\t:dayNames\n\t\t\t:placeholder=\"placeholder ?? placeholderFallback\"\n\t\t\t:format=\"realFormat\"\n\t\t\t:locale\n\t\t\t:minDate=\"calcMinMaxTime.minDate\"\n\t\t\t:maxDate=\"calcMinMaxTime.maxDate\"\n\t\t\t:minTime=\"calcMinMaxTime.minTime\"\n\t\t\t:maxTime=\"calcMinMaxTime.maxTime\"\n\t\t\t:minutesIncrement=\"minuteStep\"\n\t\t\t:modelValue=\"value\"\n\t\t\t:nowButtonLabel=\"t('Now')\"\n\t\t\t:selectText=\"t('Pick')\"\n\t\t\tsixWeeks=\"fair\"\n\t\t\t:inline\n\t\t\t:teleport=\"appendToBody ? (targetElement || undefined) : false\"\n\t\t\ttextInput\n\t\t\t:weekNumName\n\t\t\t:weekNumbers=\"showWeekNumber ? { type: 'iso' } : undefined\"\n\t\t\t:weekStart\n\t\t\tv-bind=\"pickerType\"\n\t\t\t@update:modelValue=\"onUpdateModelValue\"\n\t\t\t@blur=\"emit('blur')\">\n\t\t\t<template #action-buttons>\n\t\t\t\t<NcButton size=\"small\" variant=\"tertiary\" @click=\"cancelSelection\">\n\t\t\t\t\t{{ t('Cancel') }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton size=\"small\" variant=\"primary\" @click=\"selectDate\">\n\t\t\t\t\t{{ t('Pick') }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t\t<template #clear-icon=\"{ clear }\">\n\t\t\t\t<NcButton\n\t\t\t\t\t:aria-label=\"t('Clear value')\"\n\t\t\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t\t\t@click=\"clear\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper inline :path=\"mdiClose\" :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t\t<template #input-icon>\n\t\t\t\t<NcIconSvgWrapper :path=\"mdiCalendarBlank\" :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template #clock-icon>\n\t\t\t\t<NcIconSvgWrapper inline :path=\"mdiClock\" :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template #arrow-left>\n\t\t\t\t<NcIconSvgWrapper inline :path=\"mdiChevronLeft\" :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template #arrow-right>\n\t\t\t\t<NcIconSvgWrapper inline :path=\"mdiChevronRight\" :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template #arrow-down>\n\t\t\t\t<NcIconSvgWrapper inline :path=\"mdiChevronDown\" :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template #arrow-up>\n\t\t\t\t<NcIconSvgWrapper inline :path=\"mdiChevronUp\" :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"showTimezoneSelect\" #action-extra>\n\t\t\t\t<NcTimezonePicker\n\t\t\t\t\tv-model=\"timezoneId\"\n\t\t\t\t\tclass=\"vue-date-time-picker__timezone\"\n\t\t\t\t\t:appendToBody=\"false\"\n\t\t\t\t\t:inputLabel=\"t('Time zone')\" />\n\t\t\t</template>\n\t\t</VueDatePicker>\n\t\t<Teleport to=\"body\" :disabled=\"!appendToBody\">\n\t\t\t<div ref=\"target\" class=\"vue-date-time-picker__wrapper vue-date-time-picker__wrapper--teleport\" />\n\t\t</Teleport>\n\t</div>\n</template>\n\n<style scoped lang=\"scss\">\n@use \"sass:meta\";\n\n.vue-date-time-picker__wrapper {\n\t// This is under :root in @vuepic/vue-datepicker/dist/main.css, so importing it scoped won't work\n\t--dp-common-transition: all var(--animation-quick) ease-in;\n\t--dp-menu-padding: 6px 8px;\n\t--dp-animation-duration: var(--animation-quick);\n\t--dp-menu-appear-transition-timing: cubic-bezier(.4, 0, 1, 1);\n\t--dp-transition-timing: ease-out;\n\t--dp-action-row-transtion: all 0.2s ease-in;\n\t--dp-font-family: var(--font-face);\n\t--dp-border-radius: var(--border-radius-element);\n\t--dp-cell-border-radius: var(--border-radius-small);\n\t--dp-transition-length: 22px;\n\t--dp-transition-timing-general: var(--animation-quick);\n\t--dp-button-height: var(--default-clickable-area);\n\t--dp-month-year-row-height: var(--default-clickable-area);\n\t--dp-month-year-row-button-size: var(--clickable-area-small);\n\t--dp-button-icon-height: 20px;\n\t--dp-calendar-wrap-padding: 0 5px;\n\t--dp-cell-size: var(--default-clickable-area);\n\t--dp-cell-padding: 5px;\n\t--dp-common-padding: 10px;\n\t--dp-input-icon-padding: var(--default-clickable-area);\n\t--dp-input-padding: 6px 12px;\n\t--dp-menu-min-width: 260px;\n\t--dp-action-buttons-padding: 1px 6px;\n\t--dp-row-margin: 5px 0;\n\t--dp-calendar-header-cell-padding: 0.5rem;\n\t--dp-multi-calendars-spacing: 10px;\n\t--dp-overlay-col-padding: 3px;\n\t--dp-time-inc-dec-button-size: var(--default-clickable-area);\n\t--dp-font-size: 1rem;\n\t--dp-preview-font-size: var(--font-size-small);\n\t--dp-time-font-size: 2rem;\n\t--dp-action-button-height: var(--clickable-area-small);\n\t--dp-action-row-padding: 8px;\n\t--dp-direction: ltr;\n\n\t// We need to import the vuepic styles, but at least scoped to our class and scope\n\t// plain @import does not work as this will scope all styles imported.\n\t:deep() {\n\t\t@include meta.load-css('@vuepic/vue-datepicker/dist/main.css');\n\t}\n\n\t// When rendered as part of NcActionInput, should be lifted above the NcPopover (99999 < 100000)\n\t&.vue-date-time-picker__wrapper--teleport :deep(.dp--menu-wrapper) {\n\t\tz-index: 100001;\n\t}\n\n\t.vue-date-time-picker--clearable :deep(.dp__input) {\n\t\tpadding-inline-end: var(--default-clickable-area);\n\t}\n\n\t.vue-date-time-picker__timezone {\n\t\tmin-width: unset;\n\t\twidth: 100%;\n\t}\n\n\t:deep(.icon-vue) {\n\t\t// we enforce full opacity to not create a11y issues with contrast\n\t\topacity: 1 !important;\n\t}\n\n\t// time selector button should have consistent padding\n\t:deep(.dp--tp-wrap),\n\t:deep(.dp__action_extra) {\n\t\tpadding: var(--dp-menu-padding);\n\t\tpadding-top: 0;\n\t}\n\n\t:deep(.dp__overlay.dp--overlay-absolute) {\n\t\tpadding: var(--dp-menu-padding);\n\n\t\t.dp__btn.dp__button.dp__button_bottom {\n\t\t\tinset-block-end: 6px;\n\t\t}\n\t}\n\n\t:deep(.dp__btn.dp__button.dp__button_bottom),\n\t:deep(.dp--tp-wrap .dp__button) {\n\t\twidth: 100%;\n\t}\n\n\t:deep(.dp__btn.dp__button.dp__overlay_action) {\n\t\twidth: calc(100% - 16px);\n\t}\n\n\t// fix issues caused by Nextcloud server styles\n\t:deep(input) {\n\t\tpadding-inline-start: var(--dp-input-icon-padding) !important;\n\t}\n\t:deep(.dp__btn) {\n\t\tmargin: 0;\n\t}\n\t:deep(.dp__inner_nav) {\n\t\theight: fit-content;\n\t\twidth: fit-content;\n\t}\n\n\t// make the bottom page toggle stand out better\n\t:deep(.dp__btn.dp__button.dp__button_bottom) {\n\t\tcolor: var(--color-primary-element-light);\n\t\tbackground-color: var(--color-primary-element-light);\n\t}\n\n\t// Fix server styles causing buttons to be primary colored\n\t:deep(.dp--header-wrap .dp__btn:not(.dp__button_bottom)),\n\t:deep(.dp__time_col .dp__btn) {\n\t\tbackground-color: var(--color-main-background);\n\n\t\t&:hover {\n\t\t\tbackground: var(--dp-hover-color);\n\t\t\tcolor: var(--dp-hover-icon-color);\n\t\t}\n\t}\n\n\t// Server styles cause the month and year to be fit-content -> fixing it to be max size.\n\t:deep(.dp__month_year_select) {\n\t\tflex: 1;\n\t}\n\t:deep(.dp--time-overlay-btn) {\n\t\tfont-size: calc(2 * var(--default-font-size)) !important;\n\t}\n\n\t// Adjust padding to prevent horizontal scrolling in time selection\n\t:deep(.dp__time_input .dp__time_col_reg_block) {\n\t\tpadding: 0 calc(4 * var(--default-grid-baseline));\n\t}\n\n\t.vue-date-time-picker.dp__theme_dark,\n\t.vue-date-time-picker.dp__theme_light,\n\t:deep(.dp__theme_dark),\n\t:deep(.dp__theme_light) {\n\t\t--dp-background-color: var(--color-main-background);\n\t\t--dp-text-color: var(--color-main-text);\n\t\t--dp-hover-color: var(--color-primary-element-light-hover);\n\t\t--dp-hover-text-color: var(--color-primary-element-light-text);\n\t\t--dp-hover-icon-color: var(--color-primary-element-light-text);\n\t\t--dp-primary-color: var(--color-primary-element);\n\t\t--dp-primary-disabled-color: var(--color-primary-element-hover);\n\t\t--dp-primary-text-color: var(--color-primary-element-text);\n\t\t--dp-secondary-color: var(--color-text-maxcontrast); // this is used for \"disabled\" dates\n\t\t--dp-border-color: var(--color-border);\n\t\t--dp-menu-border-color: var(--color-border-dark);\n\t\t--dp-border-color-hover: var(--color-border-maxcontrast);\n\t\t--dp-border-color-focus: var(--color-border-maxcontrast);\n\t\t--dp-disabled-color: var(--color-background-dark);\n\t\t--dp-disabled-color-text: var(--color-text-maxcontrast);\n\t\t--dp-scroll-bar-background: var(--color-scrollbar);\n\t\t--dp-scroll-bar-color: var(--color-scrollbar);\n\t\t--dp-success-color: var(--color-success);\n\t\t--dp-success-color-disabled: var(--color-success-hover);\n\t\t--dp-icon-color: var(--color-main-text);\n\t\t--dp-danger-color: var(--color-error);\n\t\t--dp-marker-color: var(--color-text-error, var(--color-error));\n\t\t--dp-tooltip-color: var(--color-main-text);\n\t\t--dp-highlight-color: var(--color-main-text);\n\t}\n}\n</style>\n"],"names":["_useModel","value","_openBlock","_createElementBlock","_createVNode","_unref","_mergeProps","confirm","clearable","placeholder","locale","minuteStep","inline","appendToBody","showWeekNumber","_withCtx","showTimezoneSelect","NcTimezonePicker","_createBlock","_Teleport","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkTA,UAAM,aAAaA,kBAAoB,YAAgC;AAEvE,UAAM,QAAQ;AAmId,UAAM,OAAO;AAcb,UAAM,gBAAgB,eAAe,QAAQ;AAC7C,UAAM,iBAAiB,eAAe,QAAQ;AAO9C,UAAM,QAAQ,SAA4B,MAAM;AAC/C,UAAI,MAAM,eAAe,QAAQ,MAAM,WAAW;AACjD,eAAO;AAAA,MACR;AAEA,UAAI,MAAM,SAAS,QAAQ;AAC1B,cAAM,OAAO,MAAM,sBAAsB,OAAO,MAAM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AAQ,WAAWN,KAAAA;AAAAA,QAAAA;UAC/BO,mBAAkG,OAAlG,YAAkG,MAAA,GAAA;AAAA,QAAA;;;;;;"}
|
package/dist/chunks/{NcDateTimePickerNative-Dr8_mGlQ.mjs → NcDateTimePickerNative-DvvKjw_h.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/NcDateTimePickerNative-BP6eg8aU.css';
|
|
2
2
|
import { defineComponent, mergeModels, useModel, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, toDisplayString, mergeProps } from "vue";
|
|
3
|
-
import { r as register, x as t39, a as t } from "./_l10n-
|
|
3
|
+
import { r as register, x as t39, a as t } from "./_l10n-BSFzy-71.mjs";
|
|
4
4
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
6
6
|
register(t39);
|
|
@@ -97,4 +97,4 @@ const NcDateTimePickerNative = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scope
|
|
|
97
97
|
export {
|
|
98
98
|
NcDateTimePickerNative as N
|
|
99
99
|
};
|
|
100
|
-
//# sourceMappingURL=NcDateTimePickerNative-
|
|
100
|
+
//# sourceMappingURL=NcDateTimePickerNative-DvvKjw_h.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDateTimePickerNative-Dr8_mGlQ.mjs","sources":["../../src/components/NcDateTimePickerNative/NcDateTimePickerNative.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis components provides a wrapper around the native browser datetime picker. <br>\nThis is an input with some type of date e.g. https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type=datetime-local). <br>\nAll available types are: 'date', 'datetime-local', 'month', 'time' and 'week', please check them here: https://html.spec.whatwg.org/multipage/input.html# <br>\n\n### Examples\n\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<hr/>\n\t\t<div class=\"flex\">\n\t\t\t<NcSelect v-bind=\"props\" v-model=\"type\" />\n\t\t\t<NcDateTimePickerNative\n\t\t\t\tv-model=\"value\"\n\t\t\t\t:label=\"label\"\n\t\t\t\t:type=\"type\" />\n\t\t</div>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tprops: {\n\t\t\t\t\tclearable: false,\n\t\t\t\t\tinputLabel: 'Picker type',\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t'date',\n\t\t\t\t\t\t'datetime-local',\n\t\t\t\t\t\t'month',\n\t\t\t\t\t\t'time',\n\t\t\t\t\t\t'week',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\ttype: 'datetime-local',\n\t\t\t\tvalue: new Date(),\n\t\t\t\tlabel: 'Select a new date or time',\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style scoped>\n.flex {\n\tdisplay: flex;\n\tgap: 4px;\n}\n</style>\n```\n\n#### Usage: type='datetime-local' with min date and max date\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<NcDateTimePickerNative\n\t\t\tv-model=\"value\"\n\t\t\t:min=\"yesterdayDate\"\n\t\t\t:max=\"someDate\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"datetime-local\" />\n\t</div>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvalue: new Date(),\n\t\t\t\tlabel: 'Please select a new date',\n\t\t\t\tyesterdayDate: new Date(new Date().setDate(new Date().getDate() - 1)),\n\t\t\t\tsomeDate: new Date(new Date().setDate(new Date().getDate() + 7)),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<script setup lang=\"ts\">\nimport type { VueClassType } from '../../utils/VueTypes.ts'\n\nimport { computed } from 'vue'\nimport { t } from '../../l10n.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\n\ndefineOptions({ inheritAttrs: false })\n\n/**\n * The date is – like the `Date` object in JavaScript – tied to UTC.\n * The selected time zone does not have an influence of the selected time and date value.\n * You have to translate the time yourself when you want to factor in time zones.\n * Pass null to clear the input field.\n */\nconst modelValue = defineModel<Date | null>({ default: null })\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * HTML class of the element\n\t */\n\tclass?: VueClassType\n\n\t/**\n\t * ID of the input element\n\t */\n\tid?: string\n\n\t/**\n\t * Class to add to the input field.\n\t * Necessary to use NcDateTimePickerNative in the NcActionInput component.\n\t */\n\tinputClass?: VueClassType\n\n\t/**\n\t * type attribute of the input field\n\t * default type: String\n\t * The type of the input element, it can be `date`, `datetime-local`, `month`, `time`, `week`\n\t */\n\ttype?: 'date' | 'datetime-local' | 'month' | 'time' | 'week'\n\n\t/**\n\t * Visual label of the input\n\t */\n\tlabel?: string\n\n\t/**\n\t * min attribute of the input field\n\t */\n\tmin?: Date | null\n\n\t/**\n\t * max attribute of the input field\n\t */\n\tmax?: Date | null\n\n\t/**\n\t * Flag to hide the label.\n\t * The hidden input label for accessibility purposes.\n\t */\n\thideLabel?: boolean\n}>(), {\n\tclass: undefined,\n\tid: () => createElementId(),\n\tinputClass: '',\n\tlabel: () => t('Please choose a date'),\n\tmax: null,\n\tmin: null,\n\tmodelValue: null,\n\ttype: 'date',\n})\n\nconst formattedValue = computed(() => modelValue.value ? formatValue(modelValue.value) : '')\nconst formattedMax = computed(() => props.max ? formatValue(props.max) : undefined)\nconst formattedMin = computed(() => props.min ? formatValue(props.min) : undefined)\n\n/**\n * Returns Object with string values of a Date\n *\n * @param value - The selected value\n */\nfunction getReadableDate(value: Date) {\n\tconst yyyy = value.getFullYear().toString().padStart(4, '0')\n\tconst MM = (value.getMonth() + 1).toString().padStart(2, '0')\n\tconst dd = value.getDate().toString().padStart(2, '0')\n\tconst hh = value.getHours().toString().padStart(2, '0')\n\tconst mm = value.getMinutes().toString().padStart(2, '0')\n\n\treturn { yyyy, MM, dd, hh, mm }\n}\n\n/**\n * Returns preformatted value for the input field\n *\n * @param value - The selected value\n */\nfunction formatValue(value: Date): string {\n\tconst { yyyy, MM, dd, hh, mm } = getReadableDate(value)\n\tif (props.type === 'datetime-local') {\n\t\treturn `${yyyy}-${MM}-${dd}T${hh}:${mm}`\n\t} else if (props.type === 'date') {\n\t\treturn `${yyyy}-${MM}-${dd}`\n\t} else if (props.type === 'month') {\n\t\treturn `${yyyy}-${MM}`\n\t} else if (props.type === 'time') {\n\t\treturn `${hh}:${mm}`\n\t} else if (props.type === 'week') {\n\t\tconst startDate = new Date(Number.parseInt(yyyy), 0, 1)\n\t\tconst daysSinceBeginningOfYear = Math.floor((value.getTime() - startDate.getTime())\n\t\t\t/ (24 * 60 * 60 * 1000))\n\t\tconst weekNumber = Math.ceil(daysSinceBeginningOfYear / 7)\n\t\treturn `${yyyy}-W${weekNumber}`\n\t}\n\treturn ''\n}\n\n/**\n * Handle the input event\n *\n * @param event - The input event payload\n */\nfunction onInput(event: Event): void {\n\tconst input = event.target as HTMLInputElement\n\tif (!input || isNaN(input.valueAsNumber)) {\n\t\tmodelValue.value = null\n\t} else if (props.type === 'time') {\n\t\tconst time = input.value\n\n\t\tconst { yyyy, MM, dd } = getReadableDate(modelValue.value || new Date())\n\t\tmodelValue.value = new Date(`${yyyy}-${MM}-${dd}T${time}`)\n\t} else if (props.type === 'month') {\n\t\tconst MM = (new Date(input.value).getMonth() + 1).toString().padStart(2, '0')\n\t\tconst { yyyy, dd, hh, mm } = getReadableDate(modelValue.value || new Date())\n\t\tmodelValue.value = new Date(`${yyyy}-${MM}-${dd}T${hh}:${mm}`)\n\t} else {\n\t\tconst timezoneOffsetSeconds = new Date(input.valueAsNumber).getTimezoneOffset() * 1000 * 60\n\t\tconst inputDateWithTimezone = input.valueAsNumber + timezoneOffsetSeconds\n\t\tmodelValue.value = new Date(inputDateWithTimezone)\n\t}\n}\n</script>\n\n<template>\n\t<div class=\"native-datetime-picker\" :class=\"$props.class\">\n\t\t<label\n\t\t\tclass=\"native-datetime-picker__label\"\n\t\t\t:class=\"{ 'hidden-visually': hideLabel }\"\n\t\t\t:for=\"id\">\n\t\t\t{{ label }}\n\t\t</label>\n\t\t<input\n\t\t\t:id\n\t\t\tclass=\"native-datetime-picker__input\"\n\t\t\t:class=\"inputClass\"\n\t\t\t:type\n\t\t\t:value=\"formattedValue\"\n\t\t\t:min=\"formattedMin\"\n\t\t\t:max=\"formattedMax\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@input=\"onInput\">\n\t</div>\n</template>\n\n<style lang=\"scss\" scoped>\n.native-datetime-picker {\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t.native-datetime-picker__label {\n\t\tmargin-block-end: 2px;\n\t}\n\n\t.native-datetime-picker__input {\n\t\t// If border width differs between focused and unfocused we need to compensate to prevent jumping\n\t\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t\twidth: 100%;\n\t\tflex: 0 0 auto;\n\t\tmargin: 0;\n\t\tpadding-inline-start: calc(var(--border-radius-element) + var(--input-border-width-offset));\n\t\tpadding-inline-end: calc(var(--default-grid-baseline) + var(--input-border-width-offset));\n\t\tborder: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);\n\n\t\t&:active:not([disabled]),\n\t\t&:hover:not([disabled]),\n\t\t&:focus:not([disabled]),\n\t\t&:focus-within:not([disabled]) {\n\t\t\tborder-color: var(--color-main-text);\n\t\t\tborder-width: var(--border-width-input-focused, 2px);\n\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\t\t\t// Reset padding offset when focused\n\t\t\t--input-border-width-offset: 0px;\n\t\t}\n\t}\n}\n\n[data-theme-light],\n[data-themes*=light] {\n\t.native-datetime-picker__input {\n\t\tcolor-scheme: light;\n\t}\n}\n\n[data-theme-dark],\n[data-themes*=dark] {\n\t.native-datetime-picker__input {\n\t\tcolor-scheme: dark;\n\t}\n}\n\n[data-theme-default],\n[data-themes*=default] {\n\t@media (prefers-color-scheme: light) {\n\t\t.native-datetime-picker__input {\n\t\t\tcolor-scheme: light;\n\t\t}\n\t}\n\t@media (prefers-color-scheme: dark) {\n\t\t.native-datetime-picker__input {\n\t\t\tcolor-scheme: dark;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_useModel","_createElementBlock","_normalizeClass","$props","_createElementVNode","hideLabel","id","label","_mergeProps","inputClass","type","$attrs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAwGA,UAAM,aAAaA,SAAwB,SAAA,YAAkB;AAE7D,UAAM,QAAQ;AAuDd,UAAM,iBAAiB,SAAS,MAAM,WAAW,QAAQ,YAAY,WAAW,KAAK,IAAI,EAAE;AAC3F,UAAM,eAAe,SAAS,MAAM,MAAM,MAAM,YAAY,MAAM,GAAG,IAAI,MAAS;AAClF,UAAM,eAAe,SAAS,MAAM,MAAM,MAAM,YAAY,MAAM,GAAG,IAAI,MAAS;AAOlF,aAAS,gBAAgB,OAAa;AACrC,YAAM,OAAO,MAAM,YAAA,EAAc,WAAW,SAAS,GAAG,GAAG;AAC3D,YAAM,MAAM,MAAM,SAAA,IAAa,GAAG,WAAW,SAAS,GAAG,GAAG;AAC5D,YAAM,KAAK,MAAM,QAAA,EAAU,WAAW,SAAS,GAAG,GAAG;AACrD,YAAM,KAAK,MAAM,SAAA,EAAW,WAAW,SAAS,GAAG,GAAG;AACtD,YAAM,KAAK,MAAM,WAAA,EAAa,WAAW,SAAS,GAAG,GAAG;AAExD,aAAO,EAAE,MAAM,IAAI,IAAI,IAAI,GAAA;AAAA,IAC5B;AAOA,aAAS,YAAY,OAAqB;AACzC,YAAM,EAAE,MAAM,IAAI,IAAI,IAAI,GAAA,IAAO,gBAAgB,KAAK;AACtD,UAAI,MAAM,SAAS,kBAAkB;AACpC,eAAO,GAAG,IAAI,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;AAAA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,wBAAwB,IAAI,KAAK,MAAM,aAAa,EAAE,kBAAA,IAAsB,MAAO;AACzF,cAAM,wBAAwB,MAAM,gBAAgB;AACpD,mBAAW,QAAQ,IAAI,KAAK,qBAAqB;AAAA,MAClD;AAAA,IACD;;0BAICC,mBAiBM,OAAA;AAAA,QAjBD,OAAKC,eAAA,CAAC,0BAAiCC,KAAAA,OAAO,KAAK,CAAA;AAAA,MAAA;QACvDC,mBAKQ,SAAA;AAAA,UAJP,OAAKF,eAAA,CAAC,iCAA+B,EAAA,mBACRG,KAAAA,UAAAA,CAAS,CAAA;AAAA,UACrC,KAAKC,KAAAA;AAAAA,QAAAA,mBACHC,KAAAA,KAAK,GAAA,IAAA,UAAA;AAAA,QAETH,mBASkB,SATlBI,WASkB;AAAA,UARhB,IAAAF,KAAAA;AAAAA,UACD,OAAK,CAAC,iCACEG,KAAAA,UAAU;AAAA,UACjB,MAAAC,KAAAA;AAAAA,UACA,OAAO,eAAA;AAAA,UACP,KAAK,aAAA;AAAA,UACL,KAAK,aAAA;AAAA,QAAA,GACEC,KAAAA,QAAM,EACb,SAAc,GAAA,MAAA,IAAA,UAAA;AAAA,MAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcDateTimePickerNative-DvvKjw_h.mjs","sources":["../../src/components/NcDateTimePickerNative/NcDateTimePickerNative.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis components provides a wrapper around the native browser datetime picker. <br>\nThis is an input with some type of date e.g. https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type=datetime-local). <br>\nAll available types are: 'date', 'datetime-local', 'month', 'time' and 'week', please check them here: https://html.spec.whatwg.org/multipage/input.html# <br>\n\n### Examples\n\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<hr/>\n\t\t<div class=\"flex\">\n\t\t\t<NcSelect v-bind=\"props\" v-model=\"type\" />\n\t\t\t<NcDateTimePickerNative\n\t\t\t\tv-model=\"value\"\n\t\t\t\t:label=\"label\"\n\t\t\t\t:type=\"type\" />\n\t\t</div>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tprops: {\n\t\t\t\t\tclearable: false,\n\t\t\t\t\tinputLabel: 'Picker type',\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t'date',\n\t\t\t\t\t\t'datetime-local',\n\t\t\t\t\t\t'month',\n\t\t\t\t\t\t'time',\n\t\t\t\t\t\t'week',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\ttype: 'datetime-local',\n\t\t\t\tvalue: new Date(),\n\t\t\t\tlabel: 'Select a new date or time',\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style scoped>\n.flex {\n\tdisplay: flex;\n\tgap: 4px;\n}\n</style>\n```\n\n#### Usage: type='datetime-local' with min date and max date\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<NcDateTimePickerNative\n\t\t\tv-model=\"value\"\n\t\t\t:min=\"yesterdayDate\"\n\t\t\t:max=\"someDate\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"datetime-local\" />\n\t</div>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvalue: new Date(),\n\t\t\t\tlabel: 'Please select a new date',\n\t\t\t\tyesterdayDate: new Date(new Date().setDate(new Date().getDate() - 1)),\n\t\t\t\tsomeDate: new Date(new Date().setDate(new Date().getDate() + 7)),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<script setup lang=\"ts\">\nimport type { VueClassType } from '../../utils/VueTypes.ts'\n\nimport { computed } from 'vue'\nimport { t } from '../../l10n.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\n\ndefineOptions({ inheritAttrs: false })\n\n/**\n * The date is – like the `Date` object in JavaScript – tied to UTC.\n * The selected time zone does not have an influence of the selected time and date value.\n * You have to translate the time yourself when you want to factor in time zones.\n * Pass null to clear the input field.\n */\nconst modelValue = defineModel<Date | null>({ default: null })\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * HTML class of the element\n\t */\n\tclass?: VueClassType\n\n\t/**\n\t * ID of the input element\n\t */\n\tid?: string\n\n\t/**\n\t * Class to add to the input field.\n\t * Necessary to use NcDateTimePickerNative in the NcActionInput component.\n\t */\n\tinputClass?: VueClassType\n\n\t/**\n\t * type attribute of the input field\n\t * default type: String\n\t * The type of the input element, it can be `date`, `datetime-local`, `month`, `time`, `week`\n\t */\n\ttype?: 'date' | 'datetime-local' | 'month' | 'time' | 'week'\n\n\t/**\n\t * Visual label of the input\n\t */\n\tlabel?: string\n\n\t/**\n\t * min attribute of the input field\n\t */\n\tmin?: Date | null\n\n\t/**\n\t * max attribute of the input field\n\t */\n\tmax?: Date | null\n\n\t/**\n\t * Flag to hide the label.\n\t * The hidden input label for accessibility purposes.\n\t */\n\thideLabel?: boolean\n}>(), {\n\tclass: undefined,\n\tid: () => createElementId(),\n\tinputClass: '',\n\tlabel: () => t('Please choose a date'),\n\tmax: null,\n\tmin: null,\n\tmodelValue: null,\n\ttype: 'date',\n})\n\nconst formattedValue = computed(() => modelValue.value ? formatValue(modelValue.value) : '')\nconst formattedMax = computed(() => props.max ? formatValue(props.max) : undefined)\nconst formattedMin = computed(() => props.min ? formatValue(props.min) : undefined)\n\n/**\n * Returns Object with string values of a Date\n *\n * @param value - The selected value\n */\nfunction getReadableDate(value: Date) {\n\tconst yyyy = value.getFullYear().toString().padStart(4, '0')\n\tconst MM = (value.getMonth() + 1).toString().padStart(2, '0')\n\tconst dd = value.getDate().toString().padStart(2, '0')\n\tconst hh = value.getHours().toString().padStart(2, '0')\n\tconst mm = value.getMinutes().toString().padStart(2, '0')\n\n\treturn { yyyy, MM, dd, hh, mm }\n}\n\n/**\n * Returns preformatted value for the input field\n *\n * @param value - The selected value\n */\nfunction formatValue(value: Date): string {\n\tconst { yyyy, MM, dd, hh, mm } = getReadableDate(value)\n\tif (props.type === 'datetime-local') {\n\t\treturn `${yyyy}-${MM}-${dd}T${hh}:${mm}`\n\t} else if (props.type === 'date') {\n\t\treturn `${yyyy}-${MM}-${dd}`\n\t} else if (props.type === 'month') {\n\t\treturn `${yyyy}-${MM}`\n\t} else if (props.type === 'time') {\n\t\treturn `${hh}:${mm}`\n\t} else if (props.type === 'week') {\n\t\tconst startDate = new Date(Number.parseInt(yyyy), 0, 1)\n\t\tconst daysSinceBeginningOfYear = Math.floor((value.getTime() - startDate.getTime())\n\t\t\t/ (24 * 60 * 60 * 1000))\n\t\tconst weekNumber = Math.ceil(daysSinceBeginningOfYear / 7)\n\t\treturn `${yyyy}-W${weekNumber}`\n\t}\n\treturn ''\n}\n\n/**\n * Handle the input event\n *\n * @param event - The input event payload\n */\nfunction onInput(event: Event): void {\n\tconst input = event.target as HTMLInputElement\n\tif (!input || isNaN(input.valueAsNumber)) {\n\t\tmodelValue.value = null\n\t} else if (props.type === 'time') {\n\t\tconst time = input.value\n\n\t\tconst { yyyy, MM, dd } = getReadableDate(modelValue.value || new Date())\n\t\tmodelValue.value = new Date(`${yyyy}-${MM}-${dd}T${time}`)\n\t} else if (props.type === 'month') {\n\t\tconst MM = (new Date(input.value).getMonth() + 1).toString().padStart(2, '0')\n\t\tconst { yyyy, dd, hh, mm } = getReadableDate(modelValue.value || new Date())\n\t\tmodelValue.value = new Date(`${yyyy}-${MM}-${dd}T${hh}:${mm}`)\n\t} else {\n\t\tconst timezoneOffsetSeconds = new Date(input.valueAsNumber).getTimezoneOffset() * 1000 * 60\n\t\tconst inputDateWithTimezone = input.valueAsNumber + timezoneOffsetSeconds\n\t\tmodelValue.value = new Date(inputDateWithTimezone)\n\t}\n}\n</script>\n\n<template>\n\t<div class=\"native-datetime-picker\" :class=\"$props.class\">\n\t\t<label\n\t\t\tclass=\"native-datetime-picker__label\"\n\t\t\t:class=\"{ 'hidden-visually': hideLabel }\"\n\t\t\t:for=\"id\">\n\t\t\t{{ label }}\n\t\t</label>\n\t\t<input\n\t\t\t:id\n\t\t\tclass=\"native-datetime-picker__input\"\n\t\t\t:class=\"inputClass\"\n\t\t\t:type\n\t\t\t:value=\"formattedValue\"\n\t\t\t:min=\"formattedMin\"\n\t\t\t:max=\"formattedMax\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@input=\"onInput\">\n\t</div>\n</template>\n\n<style lang=\"scss\" scoped>\n.native-datetime-picker {\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t.native-datetime-picker__label {\n\t\tmargin-block-end: 2px;\n\t}\n\n\t.native-datetime-picker__input {\n\t\t// If border width differs between focused and unfocused we need to compensate to prevent jumping\n\t\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t\twidth: 100%;\n\t\tflex: 0 0 auto;\n\t\tmargin: 0;\n\t\tpadding-inline-start: calc(var(--border-radius-element) + var(--input-border-width-offset));\n\t\tpadding-inline-end: calc(var(--default-grid-baseline) + var(--input-border-width-offset));\n\t\tborder: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);\n\n\t\t&:active:not([disabled]),\n\t\t&:hover:not([disabled]),\n\t\t&:focus:not([disabled]),\n\t\t&:focus-within:not([disabled]) {\n\t\t\tborder-color: var(--color-main-text);\n\t\t\tborder-width: var(--border-width-input-focused, 2px);\n\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\t\t\t// Reset padding offset when focused\n\t\t\t--input-border-width-offset: 0px;\n\t\t}\n\t}\n}\n\n[data-theme-light],\n[data-themes*=light] {\n\t.native-datetime-picker__input {\n\t\tcolor-scheme: light;\n\t}\n}\n\n[data-theme-dark],\n[data-themes*=dark] {\n\t.native-datetime-picker__input {\n\t\tcolor-scheme: dark;\n\t}\n}\n\n[data-theme-default],\n[data-themes*=default] {\n\t@media (prefers-color-scheme: light) {\n\t\t.native-datetime-picker__input {\n\t\t\tcolor-scheme: light;\n\t\t}\n\t}\n\t@media (prefers-color-scheme: dark) {\n\t\t.native-datetime-picker__input {\n\t\t\tcolor-scheme: dark;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_useModel","_createElementBlock","_normalizeClass","$props","_createElementVNode","hideLabel","id","label","_mergeProps","inputClass","type","$attrs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAwGA,UAAM,aAAaA,SAAwB,SAAA,YAAkB;AAE7D,UAAM,QAAQ;AAuDd,UAAM,iBAAiB,SAAS,MAAM,WAAW,QAAQ,YAAY,WAAW,KAAK,IAAI,EAAE;AAC3F,UAAM,eAAe,SAAS,MAAM,MAAM,MAAM,YAAY,MAAM,GAAG,IAAI,MAAS;AAClF,UAAM,eAAe,SAAS,MAAM,MAAM,MAAM,YAAY,MAAM,GAAG,IAAI,MAAS;AAOlF,aAAS,gBAAgB,OAAa;AACrC,YAAM,OAAO,MAAM,YAAA,EAAc,WAAW,SAAS,GAAG,GAAG;AAC3D,YAAM,MAAM,MAAM,SAAA,IAAa,GAAG,WAAW,SAAS,GAAG,GAAG;AAC5D,YAAM,KAAK,MAAM,QAAA,EAAU,WAAW,SAAS,GAAG,GAAG;AACrD,YAAM,KAAK,MAAM,SAAA,EAAW,WAAW,SAAS,GAAG,GAAG;AACtD,YAAM,KAAK,MAAM,WAAA,EAAa,WAAW,SAAS,GAAG,GAAG;AAExD,aAAO,EAAE,MAAM,IAAI,IAAI,IAAI,GAAA;AAAA,IAC5B;AAOA,aAAS,YAAY,OAAqB;AACzC,YAAM,EAAE,MAAM,IAAI,IAAI,IAAI,GAAA,IAAO,gBAAgB,KAAK;AACtD,UAAI,MAAM,SAAS,kBAAkB;AACpC,eAAO,GAAG,IAAI,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;AAAA,MACvC,WAAW,MAAM,SAAS,QAAQ;AACjC,eAAO,GAAG,IAAI,IAAI,EAAE,IAAI,EAAE;AAAA,MAC3B,WAAW,MAAM,SAA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AAQ,IAAI,KAAK,qBAAqB;AAAA,MAClD;AAAA,IACD;;0BAICC,mBAiBM,OAAA;AAAA,QAjBD,OAAKC,eAAA,CAAC,0BAAiCC,KAAAA,OAAO,KAAK,CAAA;AAAA,MAAA;QACvDC,mBAKQ,SAAA;AAAA,UAJP,OAAKF,eAAA,CAAC,iCAA+B,EAAA,mBACRG,KAAAA,UAAAA,CAAS,CAAA;AAAA,UACrC,KAAKC,KAAAA;AAAAA,QAAAA,mBACHC,KAAAA,KAAK,GAAA,IAAA,UAAA;AAAA,QAETH,mBASkB,SATlBI,WASkB;AAAA,UARhB,IAAAF,KAAAA;AAAAA,UACD,OAAK,CAAC,iCACEG,KAAAA,UAAU;AAAA,UACjB,MAAAC,KAAAA;AAAAA,UACA,OAAO,eAAA;AAAA,UACP,KAAK,aAAA;AAAA,UACL,KAAK,aAAA;AAAA,QAAA,GACEC,KAAAA,QAAM,EACb,SAAc,GAAA,MAAA,IAAA,UAAA;AAAA,MAAA;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import '../assets/NcDialog-
|
|
1
|
+
import '../assets/NcDialog-BSV74Bru.css';
|
|
2
2
|
import { defineComponent, mergeModels, useModel, useSlots, useTemplateRef, computed, ref, createBlock, createCommentVNode, openBlock, unref, mergeProps, withCtx, createElementVNode, toDisplayString, resolveDynamicComponent, toHandlers, normalizeClass, createElementBlock, renderSlot, Fragment, renderList } from "vue";
|
|
3
3
|
import { useElementSize } from "@vueuse/core";
|
|
4
4
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
5
|
-
import { _ as _sfc_main$1 } from "./NcDialogButton.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { N as NcModal } from "./NcModal-
|
|
5
|
+
import { _ as _sfc_main$1 } from "./NcDialogButton.vue_vue_type_script_setup_true_lang-BnCX7Duz.mjs";
|
|
6
|
+
import { N as NcModal } from "./NcModal-PlfVmTTk.mjs";
|
|
7
7
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
8
8
|
const _hoisted_1 = ["id", "textContent"];
|
|
9
9
|
const _hoisted_2 = ["aria-label", "aria-labelledby"];
|
|
@@ -105,8 +105,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
105
105
|
return open.value ? (openBlock(), createBlock(unref(NcModal), mergeProps({
|
|
106
106
|
key: 0,
|
|
107
107
|
class: "dialog__modal",
|
|
108
|
-
"
|
|
109
|
-
"disable-swipe": ""
|
|
108
|
+
disableSwipe: ""
|
|
110
109
|
}, modalProps.value, {
|
|
111
110
|
onClose: handleClosed,
|
|
112
111
|
"onUpdate:show": _cache[0] || (_cache[0] = ($event) => handleClosing())
|
|
@@ -160,8 +159,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
160
159
|
};
|
|
161
160
|
}
|
|
162
161
|
});
|
|
163
|
-
const NcDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
162
|
+
const NcDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-24e91b99"]]);
|
|
164
163
|
export {
|
|
165
164
|
NcDialog as N
|
|
166
165
|
};
|
|
167
|
-
//# sourceMappingURL=NcDialog-
|
|
166
|
+
//# sourceMappingURL=NcDialog-Cnd9YBlk.mjs.map
|