@nextcloud/vue 9.0.0-alpha.7 → 9.0.0-alpha.8
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 +228 -138
- package/README.md +9 -5
- package/dist/assets/{NcActionButton-CVjVxm7I.css → NcActionButton-d8aZCq9u.css} +16 -16
- package/dist/assets/{NcActionCaption-BNDtcWJ7.css → NcActionCaption-DnG2OyWa.css} +2 -2
- package/dist/assets/{NcActionCheckbox-CnTyr-NN.css → NcActionCheckbox-tMIOGziy.css} +12 -12
- package/dist/assets/{NcActionInput-D19t1QsM.css → NcActionInput-C-rQsTEA.css} +62 -62
- package/dist/assets/{NcActionLink-DA3ebr8W.css → NcActionLink-jSPFFKV8.css} +12 -12
- package/dist/assets/{NcActionRadio-C7Kqlz6k.css → NcActionRadio-xdrmoEIq.css} +12 -12
- package/dist/assets/{NcActionRouter-BtJqkgqu.css → NcActionRouter-qNNqBZab.css} +15 -15
- package/dist/assets/{NcActionText-FHEPUweO.css → NcActionText-0XNfku_2.css} +17 -17
- package/dist/assets/{NcActionTextEditable-DzNRmwkV.css → NcActionTextEditable-ZlNtR_B_.css} +60 -60
- package/dist/assets/{NcActions-BepWTc-7.css → NcActions-D7gPHaUE.css} +11 -11
- package/dist/assets/{NcAppContent-BZ3rplmb.css → NcAppContent-CLu_1q4O.css} +24 -24
- package/dist/assets/{NcAppNavigation-_K9H-MtG.css → NcAppNavigation-BXItV5BV.css} +13 -13
- package/dist/assets/{NcAppNavigationItem-PKTHyQue.css → NcAppNavigationItem-aVy0uQwf.css} +34 -34
- package/dist/assets/{NcAppNavigationNew-L_VNZNL4.css → NcAppNavigationNew-Ba3wWpcY.css} +3 -3
- package/dist/assets/{NcAppNavigationSearch-Bsr4esEc.css → NcAppNavigationSearch-BAzhDRd7.css} +6 -6
- package/dist/assets/{NcAppNavigationToggle-By3_rHPL.css → NcAppNavigationToggle-DnTKNSH7.css} +3 -3
- package/dist/assets/{NcAppSettingsDialog-c8Xj_A-1.css → NcAppSettingsDialog-DZfD_UEa.css} +11 -11
- package/dist/assets/{NcAppSidebar-g99AGRiQ.css → NcAppSidebar-GFQ62pY2.css} +61 -61
- package/dist/assets/{NcAvatar-Bg20-FW4.css → NcAvatar-DUKfNDGL.css} +26 -26
- package/dist/assets/{NcBreadcrumb-r0TATv9A.css → NcBreadcrumb-CV3DgRKn.css} +15 -15
- package/dist/assets/{NcBreadcrumbs-Bbd8rdwH.css → NcBreadcrumbs-D2wff82k.css} +6 -6
- package/dist/assets/{NcButton-C50FLvfa.css → NcButton-wmjlEdLP.css} +48 -49
- package/dist/assets/{NcCheckboxRadioSwitch-jfJIoM4m.css → NcCheckboxRadioSwitch-uwXbP_jb.css} +42 -42
- package/dist/assets/{NcChip-BWWUudAH.css → NcChip-CKtzzrlA.css} +9 -9
- package/dist/assets/{NcCollectionList-COXbQt16.css → NcCollectionList-DTJgOfCk.css} +29 -29
- package/dist/assets/{NcColorPicker-3h8DrL_S.css → NcColorPicker-Clz7MjCA.css} +29 -29
- package/dist/assets/{NcContent-BgziefsK.css → NcContent-aXaYSfjS.css} +10 -10
- package/dist/assets/{NcDashboardWidget-Cdxxd7ei.css → NcDashboardWidget-xV4o6Cen.css} +14 -15
- package/dist/assets/NcDateTimePicker-AIJmp5dC.css +81 -0
- package/dist/assets/{NcDateTimePickerNative-pbWtBuzt.css → NcDateTimePickerNative-CdHLvH4A.css} +13 -13
- package/dist/assets/{NcDialog-DL7A_udP.css → NcDialog-Dkeikssh.css} +15 -15
- package/dist/assets/{NcEllipsisedOption-DGr9_bIL.css → NcEllipsisedOption-D-IsjXWc.css} +5 -5
- package/dist/assets/{NcEmojiPicker-Bfk2pnZE.css → NcEmojiPicker-DnMU8iEd.css} +5 -5
- package/dist/assets/{NcEmptyContent-DZSuQ2yE.css → NcEmptyContent-D1O466rM.css} +9 -9
- package/dist/assets/{NcHeaderButton-cVjCMSVn.css → NcHeaderButton-BPIasMkw.css} +7 -7
- package/dist/assets/{NcHeaderMenu-QJK2rMK3.css → NcHeaderMenu-ZmtqwEYA.css} +11 -11
- package/dist/assets/{NcInputConfirmCancel-D46m8Alt.css → NcInputConfirmCancel-9YyvRYjw.css} +6 -6
- package/dist/assets/{NcInputField-CRvNH5sg.css → NcInputField-B8J2uFD4.css} +32 -32
- package/dist/assets/{NcListItem-BEfZK5UK.css → NcListItem-Byw-ayOI.css} +44 -44
- package/dist/assets/{NcListItemIcon-E21VFJqd.css → NcListItemIcon-Bnr-Z-SO.css} +14 -14
- package/dist/assets/{NcPasswordField-Bl9fhgy-.css → NcPasswordField-z9gbKnov.css} +2 -2
- package/dist/assets/{NcRelatedResourcesPanel-Chjd8iT7.css → NcRelatedResourcesPanel-DXfywiqL.css} +23 -23
- package/dist/assets/{NcRichContenteditable-BwHgQWPX.css → NcRichContenteditable-Bxi-Ki0j.css} +10 -10
- package/dist/assets/{NcRichText-fo4QE8--.css → NcRichText-Dvt8jvWN.css} +83 -83
- package/dist/assets/{NcSelect-GdIw6cIy.css → NcSelect-B6DUjUdl.css} +2 -2
- package/dist/assets/{NcSettingsInputText-BTOyFeAK.css → NcSettingsInputText-B-V6Y4MD.css} +7 -7
- package/dist/assets/{NcSettingsSelectGroup-DhyosmOr.css → NcSettingsSelectGroup-DZcNr_Dq.css} +2 -2
- package/dist/assets/{NcTextArea-BfSGN55r.css → NcTextArea-DHr9DPOJ.css} +20 -20
- package/dist/assets/{index-BRaTLqzR.css → index-Du_FXiPy.css} +61 -61
- package/dist/assets/{referencePickerModal-Cy43S4js.css → referencePickerModal-CkGgDb19.css} +8 -8
- package/dist/chunks/AlertCircleOutline-DVzpKQVu.mjs +1 -0
- package/dist/chunks/ArrowLeft-CanHG70H.mjs +1 -0
- package/dist/chunks/ArrowRight-DQT24Cb-.mjs +1 -0
- package/dist/chunks/Check-5i4xKnkl.mjs +1 -0
- package/dist/chunks/ChevronDown-FiGpp0KT.mjs +1 -0
- package/dist/chunks/ChevronLeft-FfC-tiIS.mjs +1 -0
- package/dist/chunks/ChevronRight-LvtA5_hq.mjs +1 -0
- package/dist/chunks/ChevronUp-DPXFp1ss.mjs +1 -0
- package/dist/chunks/{Close-idsVwGrC.mjs → Close-D6ngJ4t9.mjs} +3 -2
- package/dist/chunks/{Close-idsVwGrC.mjs.map → Close-D6ngJ4t9.mjs.map} +1 -1
- package/dist/chunks/DotsHorizontal-AMVAlTNH.mjs +1 -0
- package/dist/chunks/{NcActionButton-DBFJTCO5.mjs → NcActionButton-BdQ_qmvW.mjs} +6 -4
- package/dist/chunks/{NcActionButton-DBFJTCO5.mjs.map → NcActionButton-BdQ_qmvW.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-nwHeJeV7.mjs → NcActionButtonGroup-TitZerDl.mjs} +6 -4
- package/dist/chunks/NcActionButtonGroup-TitZerDl.mjs.map +1 -0
- package/dist/chunks/{NcActionCaption-DmOKI_Kc.mjs → NcActionCaption-Fumfjzxj.mjs} +5 -3
- package/dist/chunks/NcActionCaption-Fumfjzxj.mjs.map +1 -0
- package/dist/chunks/{NcActionCheckbox-yPCmA5vr.mjs → NcActionCheckbox-CUYbo1rw.mjs} +7 -5
- package/dist/chunks/NcActionCheckbox-CUYbo1rw.mjs.map +1 -0
- package/dist/chunks/{NcActionInput-DTzVHmHn.mjs → NcActionInput-TI648L3V.mjs} +12 -11
- package/dist/chunks/NcActionInput-TI648L3V.mjs.map +1 -0
- package/dist/chunks/{NcActionLink-CG3cKif-.mjs → NcActionLink-cQlsviu9.mjs} +6 -4
- package/dist/chunks/NcActionLink-cQlsviu9.mjs.map +1 -0
- package/dist/chunks/{NcActionRadio-BWPi0DII.mjs → NcActionRadio-tORL1qPt.mjs} +7 -5
- package/dist/chunks/NcActionRadio-tORL1qPt.mjs.map +1 -0
- package/dist/chunks/{NcActionRouter-C7VSuJLq.mjs → NcActionRouter-Bw1tpEZt.mjs} +6 -4
- package/dist/chunks/NcActionRouter-Bw1tpEZt.mjs.map +1 -0
- package/dist/chunks/NcActionSeparator-Doekl1NX.mjs +1 -0
- package/dist/chunks/{NcActionText-ByD1mFXe.mjs → NcActionText-VLCHOiIy.mjs} +6 -4
- package/dist/chunks/NcActionText-VLCHOiIy.mjs.map +1 -0
- package/dist/chunks/{NcActionTextEditable-DLKA6lfe.mjs → NcActionTextEditable-nTbwgRy2.mjs} +7 -6
- package/dist/chunks/NcActionTextEditable-nTbwgRy2.mjs.map +1 -0
- package/dist/chunks/{NcActions-DxTtucKk.mjs → NcActions-CgKHXNbF.mjs} +49 -37
- package/dist/chunks/NcActions-CgKHXNbF.mjs.map +1 -0
- package/dist/chunks/{NcAppContent-Cu9zhNK3.mjs → NcAppContent-C4gBVRQs.mjs} +67 -16
- package/dist/chunks/NcAppContent-C4gBVRQs.mjs.map +1 -0
- package/dist/chunks/NcAppContentDetails-DsEEBJ0U.mjs +1 -0
- package/dist/chunks/NcAppContentList-DnLY_sWw.mjs +1 -0
- package/dist/chunks/{NcAppNavigation-BxUvXgeG.mjs → NcAppNavigation-DbRpHbi9.mjs} +4 -3
- package/dist/chunks/{NcAppNavigation-BxUvXgeG.mjs.map → NcAppNavigation-DbRpHbi9.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-S_2Jmwqr.mjs → NcAppNavigationCaption-R_UZ7iKw.mjs} +2 -1
- package/dist/chunks/{NcAppNavigationCaption-S_2Jmwqr.mjs.map → NcAppNavigationCaption-R_UZ7iKw.mjs.map} +1 -1
- package/dist/chunks/NcAppNavigationIconBullet-B1kc4u65.mjs +1 -0
- package/dist/chunks/{NcAppNavigationItem-C7bIZuo2.mjs → NcAppNavigationItem-CxYtFEhV.mjs} +16 -15
- package/dist/chunks/NcAppNavigationItem-CxYtFEhV.mjs.map +1 -0
- package/dist/chunks/NcAppNavigationList-DX_Yo23V.mjs +1 -0
- package/dist/chunks/{NcAppNavigationNew-BO-Llutk.mjs → NcAppNavigationNew-sMVo_IoL.mjs} +11 -6
- package/dist/chunks/NcAppNavigationNew-sMVo_IoL.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationNewItem-D7CYmmOm.mjs → NcAppNavigationNewItem-CJZcL6GH.mjs} +2 -1
- package/dist/chunks/{NcAppNavigationNewItem-D7CYmmOm.mjs.map → NcAppNavigationNewItem-CJZcL6GH.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-DLbzvkkq.mjs → NcAppNavigationSearch-Dbhh-Vtw.mjs} +7 -6
- package/dist/chunks/NcAppNavigationSearch-Dbhh-Vtw.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationSettings-vM8ajNNK.mjs → NcAppNavigationSettings-Bfo3EWk_.mjs} +5 -4
- package/dist/chunks/NcAppNavigationSettings-Bfo3EWk_.mjs.map +1 -0
- package/dist/chunks/NcAppNavigationSpacer-CzBLuQL8.mjs +1 -0
- package/dist/chunks/{NcAppNavigationToggle-DBtf139E.mjs → NcAppNavigationToggle-Ys-PjFo3.mjs} +9 -8
- package/dist/chunks/NcAppNavigationToggle-Ys-PjFo3.mjs.map +1 -0
- package/dist/chunks/{NcAppSettingsDialog-CdFUuydh.mjs → NcAppSettingsDialog-Cc-OdY9a.mjs} +5 -4
- package/dist/chunks/{NcAppSettingsDialog-CdFUuydh.mjs.map → NcAppSettingsDialog-Cc-OdY9a.mjs.map} +1 -1
- package/dist/chunks/NcAppSettingsSection-CssmXyZ0.mjs +1 -0
- package/dist/chunks/{NcAppSidebar-Dav-iGv2.mjs → NcAppSidebar-Dgwj8O_Z.mjs} +26 -25
- package/dist/chunks/NcAppSidebar-Dgwj8O_Z.mjs.map +1 -0
- package/dist/chunks/NcAppSidebarTab-DG51ajic.mjs +1 -0
- package/dist/chunks/{NcAvatar-A1YnlIoN.mjs → NcAvatar-CA8y4d-c.mjs} +34 -34
- package/dist/chunks/NcAvatar-CA8y4d-c.mjs.map +1 -0
- package/dist/chunks/NcBlurHash-BiFktE2N.mjs +1 -0
- package/dist/chunks/NcBlurHash-BiFktE2N.mjs.map +1 -1
- package/dist/chunks/{NcBreadcrumb-D5cRcQg5.mjs → NcBreadcrumb-DSjIxTeU.mjs} +21 -17
- package/dist/chunks/NcBreadcrumb-DSjIxTeU.mjs.map +1 -0
- package/dist/chunks/{NcBreadcrumbs-CnWT9rE5.mjs → NcBreadcrumbs-jPvP6Cmo.mjs} +10 -9
- package/dist/chunks/NcBreadcrumbs-jPvP6Cmo.mjs.map +1 -0
- package/dist/chunks/{NcButton-QmfEsvXC.mjs → NcButton-BHLqKKYP.mjs} +63 -53
- package/dist/chunks/NcButton-BHLqKKYP.mjs.map +1 -0
- package/dist/chunks/{NcCheckboxRadioSwitch-Ctdu7_UC.mjs → NcCheckboxRadioSwitch-CWU_M_ui.mjs} +7 -6
- package/dist/chunks/NcCheckboxRadioSwitch-CWU_M_ui.mjs.map +1 -0
- package/dist/chunks/{NcChip-BnD-EmBn.mjs → NcChip-C3U2HYR9.mjs} +21 -60
- package/dist/chunks/NcChip-C3U2HYR9.mjs.map +1 -0
- package/dist/chunks/{NcCollectionList-9YfN6xAi.mjs → NcCollectionList-BtHsipae.mjs} +9 -8
- package/dist/chunks/NcCollectionList-BtHsipae.mjs.map +1 -0
- package/dist/chunks/{NcColorPicker-DQqAv2wB.mjs → NcColorPicker-BI-Is4nj.mjs} +14 -13
- package/dist/chunks/NcColorPicker-BI-Is4nj.mjs.map +1 -0
- package/dist/chunks/{NcContent-CsDFFKvH.mjs → NcContent-BcF6f3N-.mjs} +8 -7
- package/dist/chunks/{NcContent-CsDFFKvH.mjs.map → NcContent-BcF6f3N-.mjs.map} +1 -1
- package/dist/chunks/NcCounterBubble-6B_JNUUS.mjs +1 -0
- package/dist/chunks/{NcDashboardWidget-ROT13m5A.mjs → NcDashboardWidget-1rVqTzgV.mjs} +8 -7
- package/dist/chunks/{NcDashboardWidget-ROT13m5A.mjs.map → NcDashboardWidget-1rVqTzgV.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-DoYOYxck.mjs → NcDashboardWidgetItem-7RXY5EKJ.mjs} +4 -3
- package/dist/chunks/{NcDashboardWidgetItem-DoYOYxck.mjs.map → NcDashboardWidgetItem-7RXY5EKJ.mjs.map} +1 -1
- package/dist/chunks/NcDateTime.vue_vue_type_script_setup_true_lang-DtP-oauZ.mjs +31 -0
- package/dist/chunks/NcDateTime.vue_vue_type_script_setup_true_lang-DtP-oauZ.mjs.map +1 -0
- package/dist/chunks/NcDateTimePicker-BzfuHym4.mjs +257 -0
- package/dist/chunks/NcDateTimePicker-BzfuHym4.mjs.map +1 -0
- package/dist/chunks/{NcDateTimePickerNative-Dbc6pBXk.mjs → NcDateTimePickerNative-Dake1IML.mjs} +6 -5
- package/dist/chunks/NcDateTimePickerNative-Dake1IML.mjs.map +1 -0
- package/dist/chunks/{NcDialog-B81mllwn.mjs → NcDialog-_pc2BPHU.mjs} +12 -11
- package/dist/chunks/NcDialog-_pc2BPHU.mjs.map +1 -0
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-DgWqkSL7.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-BKrJ_xd8.mjs} +22 -23
- package/dist/chunks/NcDialogButton.vue_vue_type_script_setup_true_lang-BKrJ_xd8.mjs.map +1 -0
- package/dist/chunks/{NcEllipsisedOption-D4OggsNq.mjs → NcEllipsisedOption-4k07kvEr.mjs} +5 -4
- package/dist/chunks/NcEllipsisedOption-4k07kvEr.mjs.map +1 -0
- package/dist/chunks/{NcEmojiPicker-DKGBXunS.mjs → NcEmojiPicker-CWbez_of.mjs} +18 -14
- package/dist/chunks/NcEmojiPicker-CWbez_of.mjs.map +1 -0
- package/dist/chunks/{NcEmptyContent-D-wBvEi4.mjs → NcEmptyContent-BQnIrQQn.mjs} +3 -2
- package/dist/chunks/NcEmptyContent-BQnIrQQn.mjs.map +1 -0
- package/dist/chunks/NcGuestContent-iQpV7mLC.mjs +1 -0
- package/dist/chunks/{NcHeaderButton-Cq62USyt.mjs → NcHeaderButton-BsstEWtv.mjs} +9 -8
- package/dist/chunks/{NcHeaderButton-Cq62USyt.mjs.map → NcHeaderButton-BsstEWtv.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-BRiroRYT.mjs → NcHeaderMenu-ZzoCwPvX.mjs} +13 -14
- package/dist/chunks/NcHeaderMenu-ZzoCwPvX.mjs.map +1 -0
- package/dist/chunks/{NcHighlight-BHtRIzqk.mjs → NcHighlight-Cu4UfEEO.mjs} +11 -7
- package/dist/chunks/NcHighlight-Cu4UfEEO.mjs.map +1 -0
- package/dist/chunks/NcIconSvgWrapper-BYTrkA66.mjs +1 -0
- package/dist/chunks/{NcInputConfirmCancel-xnrPAGac.mjs → NcInputConfirmCancel-CX56m05a.mjs} +19 -18
- package/dist/chunks/NcInputConfirmCancel-CX56m05a.mjs.map +1 -0
- package/dist/chunks/{NcInputField-CzC820tG.mjs → NcInputField-DdZlDVwQ.mjs} +7 -6
- package/dist/chunks/NcInputField-DdZlDVwQ.mjs.map +1 -0
- package/dist/chunks/{NcListItem-DFLsabmR.mjs → NcListItem-DF8Yv05m.mjs} +4 -3
- package/dist/chunks/NcListItem-DF8Yv05m.mjs.map +1 -0
- package/dist/chunks/{NcListItemIcon-BK9GBjoD.mjs → NcListItemIcon-nzw_x2Q5.mjs} +5 -4
- package/dist/chunks/{NcListItemIcon-BK9GBjoD.mjs.map → NcListItemIcon-nzw_x2Q5.mjs.map} +1 -1
- package/dist/chunks/NcLoadingIcon-CsMn1bFR.mjs +1 -0
- package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_6c8d0da9_lang-DYJMHclV.mjs +1 -0
- package/dist/chunks/NcNoteCard-XoSOund1.mjs +1 -0
- package/dist/chunks/{NcPasswordField-BLHAdm-k.mjs → NcPasswordField-BnnlEhT1.mjs} +6 -5
- package/dist/chunks/{NcPasswordField-BLHAdm-k.mjs.map → NcPasswordField-BnnlEhT1.mjs.map} +1 -1
- package/dist/chunks/{NcPopover-D4D97Y3j.mjs → NcPopover-C3ZoyUjc.mjs} +7 -2
- package/dist/chunks/NcPopover-C3ZoyUjc.mjs.map +1 -0
- package/dist/chunks/NcProgressBar-Bx8bMkd4.mjs +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-DsuNT9hM.mjs → NcRelatedResourcesPanel-D2YLEouH.mjs} +13 -12
- package/dist/chunks/NcRelatedResourcesPanel-D2YLEouH.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-BkSojqgy.mjs → NcRichContenteditable-B16VJW0Y.mjs} +18 -18
- package/dist/chunks/NcRichContenteditable-B16VJW0Y.mjs.map +1 -0
- package/dist/chunks/NcRichText-4jIBSmap.mjs +3673 -0
- package/dist/chunks/NcRichText-4jIBSmap.mjs.map +1 -0
- package/dist/chunks/NcSavingIndicatorIcon-icWy8J5x.mjs +1 -0
- package/dist/chunks/{NcSelect-B61ik8an.mjs → NcSelect-CAx_ixPU.mjs} +11 -10
- package/dist/chunks/NcSelect-CAx_ixPU.mjs.map +1 -0
- package/dist/chunks/{NcSelectTags-Dx3nG6jx.mjs → NcSelectTags-UXzC7lDz.mjs} +4 -3
- package/dist/chunks/{NcSelectTags-Dx3nG6jx.mjs.map → NcSelectTags-UXzC7lDz.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-B5FrLCL9.mjs → NcSettingsInputText-BEHu3xAI.mjs} +6 -5
- package/dist/chunks/NcSettingsInputText-BEHu3xAI.mjs.map +1 -0
- package/dist/chunks/{NcSettingsSection-CAdn6gS9.mjs → NcSettingsSection-X7f0W7vZ.mjs} +3 -2
- package/dist/chunks/{NcSettingsSection-CAdn6gS9.mjs.map → NcSettingsSection-X7f0W7vZ.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-CKIbxms2.mjs → NcSettingsSelectGroup-DfrKchOy.mjs} +8 -7
- package/dist/chunks/NcSettingsSelectGroup-DfrKchOy.mjs.map +1 -0
- package/dist/chunks/{NcTextArea-C-PMlEbl.mjs → NcTextArea-DKHjCur8.mjs} +5 -4
- package/dist/chunks/NcTextArea-DKHjCur8.mjs.map +1 -0
- package/dist/chunks/{NcTextField-CNV42Zey.mjs → NcTextField-BTzKCPza.mjs} +6 -5
- package/dist/chunks/{NcTextField-CNV42Zey.mjs.map → NcTextField-BTzKCPza.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-tZmX1Qp4.mjs → NcTimezonePicker-CMoUk4sZ.mjs} +8 -7
- package/dist/chunks/NcTimezonePicker-CMoUk4sZ.mjs.map +1 -0
- package/dist/chunks/{NcUserBubble-MfDc1YR2.mjs → NcUserBubble-Dgzog0Ps.mjs} +3 -2
- package/dist/chunks/{NcUserBubble-MfDc1YR2.mjs.map → NcUserBubble-Dgzog0Ps.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-vtnkNASH.mjs → NcUserStatusIcon-DvYiEs2L.mjs} +2 -1
- package/dist/chunks/{NcUserStatusIcon-vtnkNASH.mjs.map → NcUserStatusIcon-DvYiEs2L.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-DgRMJomt.mjs → ScopeComponent-BWZEma4R.mjs} +2 -1
- package/dist/chunks/{ScopeComponent-DgRMJomt.mjs.map → ScopeComponent-BWZEma4R.mjs.map} +1 -1
- package/dist/chunks/_l10n-7kR7gXFc.mjs +132 -0
- package/dist/chunks/_l10n-7kR7gXFc.mjs.map +1 -0
- package/dist/chunks/_plugin-vue_export-helper-1tPrXgE0.mjs +1 -0
- package/dist/chunks/actionGlobal-BZFdtdJL.mjs +1 -0
- package/dist/chunks/{actionText-aI0owku1.mjs → actionText-BiV1_BZX.mjs} +8 -13
- package/dist/chunks/actionText-BiV1_BZX.mjs.map +1 -0
- package/dist/chunks/autolink-CKPk5rzg.mjs +1 -0
- package/dist/chunks/{GenColors-G1ZRJcz5.mjs → colors-BJbWzaQ-.mjs} +28 -22
- package/dist/chunks/colors-BJbWzaQ-.mjs.map +1 -0
- package/dist/chunks/createElementId-DhjFt1I9.mjs +8 -0
- package/dist/chunks/createElementId-DhjFt1I9.mjs.map +1 -0
- package/dist/chunks/emoji-BY_D0V5K.mjs +1 -0
- package/dist/chunks/focusTrap-DmkaYJTC.mjs +1 -0
- package/dist/chunks/{index-wLgC9ACl.mjs → index--u6iHwFv.mjs} +3 -2
- package/dist/chunks/{index-wLgC9ACl.mjs.map → index--u6iHwFv.mjs.map} +1 -1
- package/dist/chunks/index-BF8joS9W.mjs +1 -0
- package/dist/chunks/logger-D3RVzcfQ.mjs +1 -0
- package/dist/chunks/logger-D3RVzcfQ.mjs.map +1 -1
- package/dist/chunks/mdi-zYpVOORa.mjs +17 -0
- package/dist/chunks/mdi-zYpVOORa.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-CzI44bxD.mjs → referencePickerModal-BpNnwC_g.mjs} +17 -17
- package/dist/chunks/{referencePickerModal-CzI44bxD.mjs.map → referencePickerModal-BpNnwC_g.mjs.map} +1 -1
- package/dist/chunks/rtl-v0UOPAM7.mjs +1 -0
- package/dist/chunks/{useFormatDateTime-Cvc8YJRE.mjs → useFormatDateTime-B5sWtJdj.mjs} +2 -1
- package/dist/chunks/{useFormatDateTime-Cvc8YJRE.mjs.map → useFormatDateTime-B5sWtJdj.mjs.map} +1 -1
- package/dist/chunks/useNcActions-CiGWxAJE.mjs +7 -0
- package/dist/chunks/useNcActions-CiGWxAJE.mjs.map +1 -0
- package/dist/chunks/useTrapStackControl-b3A_383w.mjs +1 -0
- package/dist/chunks/usernameToColor-CzXWY0j4.mjs +22 -0
- package/dist/chunks/usernameToColor-CzXWY0j4.mjs.map +1 -0
- package/dist/components/NcActionButton/NcActionButton.vue.d.ts +5 -0
- package/dist/components/NcActionButton/index.mjs +2 -1
- package/dist/components/NcActionButtonGroup/index.mjs +2 -1
- package/dist/components/NcActionCaption/index.mjs +2 -1
- package/dist/components/NcActionCheckbox/index.mjs +2 -1
- package/dist/components/NcActionInput/index.mjs +2 -1
- package/dist/components/NcActionLink/index.mjs +2 -1
- package/dist/components/NcActionRadio/index.mjs +2 -1
- package/dist/components/NcActionRouter/NcActionRouter.vue.d.ts +5 -0
- package/dist/components/NcActionRouter/index.mjs +2 -1
- package/dist/components/NcActionSeparator/index.mjs +1 -0
- package/dist/components/NcActionText/NcActionText.vue.d.ts +5 -0
- package/dist/components/NcActionText/index.mjs +2 -1
- package/dist/components/NcActionTextEditable/NcActionTextEditable.vue.d.ts +5 -0
- package/dist/components/NcActionTextEditable/index.mjs +2 -1
- package/dist/components/NcActions/NcActions.vue.d.ts +52 -40
- package/dist/components/NcActions/index.mjs +2 -1
- package/dist/components/NcActions/useNcActions.d.ts +3 -0
- package/dist/components/NcAppContent/index.mjs +2 -1
- package/dist/components/NcAppContentDetails/index.mjs +1 -0
- package/dist/components/NcAppContentList/index.mjs +1 -0
- package/dist/components/NcAppNavigation/NcAppNavigation.vue.d.ts +16 -15
- package/dist/components/NcAppNavigation/index.mjs +2 -1
- package/dist/components/NcAppNavigationCaption/NcAppNavigationCaption.vue.d.ts +34 -30
- package/dist/components/NcAppNavigationCaption/index.mjs +2 -1
- package/dist/components/NcAppNavigationIconBullet/index.mjs +1 -0
- package/dist/components/NcAppNavigationItem/NcAppNavigationIconCollapsible.vue.d.ts +16 -15
- package/dist/components/NcAppNavigationItem/NcAppNavigationItem.vue.d.ts +94 -83
- package/dist/components/NcAppNavigationItem/NcInputConfirmCancel.vue.d.ts +25 -24
- package/dist/components/NcAppNavigationItem/index.mjs +2 -1
- package/dist/components/NcAppNavigationList/index.mjs +1 -0
- package/dist/components/NcAppNavigationNew/NcAppNavigationNew.vue.d.ts +27 -18
- package/dist/components/NcAppNavigationNew/index.mjs +2 -1
- package/dist/components/NcAppNavigationNewItem/NcAppNavigationNewItem.vue.d.ts +18 -17
- package/dist/components/NcAppNavigationNewItem/index.mjs +2 -1
- package/dist/components/NcAppNavigationSearch/NcAppNavigationSearch.vue.d.ts +16 -15
- package/dist/components/NcAppNavigationSearch/index.mjs +2 -1
- package/dist/components/NcAppNavigationSettings/index.mjs +2 -1
- package/dist/components/NcAppNavigationSpacer/index.mjs +1 -0
- package/dist/components/NcAppNavigationToggle/NcAppNavigationToggle.vue.d.ts +16 -15
- package/dist/components/NcAppNavigationToggle/index.mjs +2 -1
- package/dist/components/NcAppSettingsDialog/index.mjs +2 -1
- package/dist/components/NcAppSettingsSection/index.mjs +1 -0
- package/dist/components/NcAppSidebar/index.mjs +2 -1
- package/dist/components/NcAppSidebarTab/index.mjs +1 -0
- package/dist/components/NcAvatar/index.mjs +2 -1
- package/dist/components/NcBlurHash/index.mjs +1 -0
- package/dist/components/NcBreadcrumb/NcBreadcrumb.vue.d.ts +70 -64
- package/dist/components/NcBreadcrumb/index.mjs +2 -1
- package/dist/components/NcBreadcrumbs/NcBreadcrumbs.vue.d.ts +97 -77
- package/dist/components/NcBreadcrumbs/index.mjs +2 -1
- package/dist/components/NcButton/NcButton.vue.d.ts +42 -38
- package/dist/components/NcButton/index.mjs +4 -3
- package/dist/components/NcButton/types.d.ts +2 -2
- package/dist/components/NcCheckboxRadioSwitch/index.mjs +2 -1
- package/dist/components/NcChip/NcChip.vue.d.ts +57 -92
- package/dist/components/NcChip/index.mjs +2 -1
- package/dist/components/NcCollectionList/index.mjs +2 -1
- package/dist/components/NcColorPicker/index.mjs +2 -1
- package/dist/components/NcContent/NcContent.vue.d.ts +16 -15
- package/dist/components/NcContent/index.mjs +2 -1
- package/dist/components/NcCounterBubble/index.mjs +1 -0
- package/dist/components/NcDashboardWidget/index.mjs +2 -1
- package/dist/components/NcDashboardWidgetItem/index.mjs +2 -1
- package/dist/components/NcDateTime/NcDateTime.vue.d.ts +56 -1
- package/dist/components/NcDateTime/index.d.ts +4 -0
- package/dist/components/NcDateTime/index.mjs +3 -2
- package/dist/components/NcDateTimePicker/NcDateTimePicker.vue.d.ts +116 -1
- package/dist/components/NcDateTimePicker/index.d.ts +4 -0
- package/dist/components/NcDateTimePicker/index.mjs +2 -1
- package/dist/components/NcDateTimePickerNative/index.mjs +2 -1
- package/dist/components/NcDialog/NcDialog.vue.d.ts +45 -48
- package/dist/components/NcDialog/index.mjs +2 -1
- package/dist/components/NcDialogButton/NcDialogButton.vue.d.ts +37 -33
- package/dist/components/NcDialogButton/index.mjs +2 -1
- package/dist/components/NcEllipsisedOption/index.mjs +2 -1
- package/dist/components/NcEmojiPicker/NcEmojiPicker.vue.d.ts +33 -31
- package/dist/components/NcEmojiPicker/index.mjs +2 -1
- package/dist/components/NcEmptyContent/index.mjs +2 -1
- package/dist/components/NcGuestContent/index.mjs +1 -0
- package/dist/components/NcHeaderButton/index.mjs +2 -1
- package/dist/components/NcHeaderMenu/NcHeaderMenu.vue.d.ts +24 -22
- package/dist/components/NcHeaderMenu/index.mjs +2 -1
- package/dist/components/NcHighlight/index.mjs +2 -1
- package/dist/components/NcIconSvgWrapper/index.mjs +1 -0
- package/dist/components/NcInputField/NcInputField.vue.d.ts +16 -15
- package/dist/components/NcInputField/index.mjs +2 -1
- package/dist/components/NcListItem/NcListItem.vue.d.ts +34 -30
- package/dist/components/NcListItem/index.mjs +2 -1
- package/dist/components/NcListItemIcon/index.mjs +2 -1
- package/dist/components/NcLoadingIcon/index.mjs +1 -0
- package/dist/components/NcModal/index.mjs +34 -31
- package/dist/components/NcModal/index.mjs.map +1 -1
- package/dist/components/NcNoteCard/index.mjs +1 -0
- package/dist/components/NcPasswordField/index.mjs +2 -1
- package/dist/components/NcPopover/index.mjs +2 -1
- package/dist/components/NcProgressBar/index.mjs +1 -0
- package/dist/components/NcRelatedResourcesPanel/NcRelatedResourcesPanel.vue.d.ts +32 -30
- package/dist/components/NcRelatedResourcesPanel/NcResource.vue.d.ts +16 -15
- package/dist/components/NcRelatedResourcesPanel/NcTeamResources.vue.d.ts +16 -15
- package/dist/components/NcRelatedResourcesPanel/index.mjs +2 -1
- package/dist/components/NcRichContenteditable/index.mjs +3 -2
- package/dist/components/NcRichText/NcReferenceList.vue.d.ts +17 -16
- package/dist/components/NcRichText/NcReferencePicker/NcRawLinkInput.vue.d.ts +33 -31
- package/dist/components/NcRichText/NcReferenceWidget.vue.d.ts +17 -16
- package/dist/components/NcRichText/NcRichText.vue.d.ts +17 -16
- package/dist/components/NcRichText/index.mjs +4 -3
- package/dist/components/NcSavingIndicatorIcon/index.mjs +1 -0
- package/dist/components/NcSelect/index.mjs +2 -1
- package/dist/components/NcSelectTags/index.mjs +2 -1
- package/dist/components/NcSettingsInputText/index.mjs +2 -1
- package/dist/components/NcSettingsSection/index.mjs +2 -1
- package/dist/components/NcSettingsSelectGroup/index.mjs +2 -1
- package/dist/components/NcTextArea/index.mjs +2 -1
- package/dist/components/NcTextField/NcTextField.vue.d.ts +16 -15
- package/dist/components/NcTextField/index.mjs +2 -1
- package/dist/components/NcTimezonePicker/index.mjs +2 -1
- package/dist/components/NcUserBubble/index.mjs +2 -1
- package/dist/components/NcUserStatusIcon/index.mjs +2 -1
- package/dist/components/NcVNodes/index.mjs +1 -0
- package/dist/composables/index.d.ts +6 -2
- package/dist/composables/useHotKey/index.mjs +1 -0
- package/dist/composables/useIsDarkTheme/index.mjs +1 -0
- package/dist/composables/useIsFullscreen/index.d.ts +3 -4
- package/dist/composables/useIsFullscreen/index.mjs +4 -1
- package/dist/composables/useIsFullscreen/index.mjs.map +1 -1
- package/dist/composables/useIsMobile/index.d.ts +9 -14
- package/dist/composables/useIsMobile/index.mjs +1 -2
- package/dist/composables/useIsMobile/index.mjs.map +1 -1
- package/dist/directives/Focus/index.mjs +1 -0
- package/dist/directives/Linkify/index.d.ts +2 -1
- package/dist/directives/Linkify/index.mjs +38 -10
- package/dist/directives/Linkify/index.mjs.map +1 -1
- package/dist/directives/Tooltip/index.mjs +1 -0
- package/dist/directives/index.d.ts +1 -1
- package/dist/functions/a11y/index.mjs +1 -0
- package/dist/functions/dialog/index.mjs +1 -0
- package/dist/functions/emoji/index.mjs +1 -0
- package/dist/functions/isDarkTheme/index.mjs +1 -0
- package/dist/functions/preloadImage/index.mjs +1 -0
- package/dist/functions/reference/index.mjs +2 -1
- package/dist/functions/registerReference/index.mjs +1 -0
- package/dist/functions/usernameToColor/index.d.ts +5 -1
- package/dist/functions/usernameToColor/index.mjs +2 -1
- package/dist/functions/usernameToColor/usernameToColor.d.ts +4 -9
- package/dist/index.mjs +114 -114
- package/dist/mixins/actionText.d.ts +6 -0
- package/dist/mixins/richEditor/index.mjs +2 -1
- package/dist/utils/appName.d.ts +5 -0
- package/dist/utils/colors.d.ts +34 -0
- package/dist/utils/createElementId.d.ts +7 -0
- package/dist/utils/findRanges.d.ts +16 -0
- package/dist/utils/isSlotPopulated.d.ts +1 -2
- package/dist/utils/linkify.d.ts +8 -0
- package/dist/utils/logger.d.ts +4 -0
- package/dist/vendor.LICENSE.txt +128 -0
- package/package.json +27 -21
- package/dist/assets/NcDateTimePicker-CRb2xZzf.css +0 -918
- package/dist/chunks/GenColors-G1ZRJcz5.mjs.map +0 -1
- package/dist/chunks/GenRandomId-CMooMQt0.mjs +0 -6
- package/dist/chunks/GenRandomId-CMooMQt0.mjs.map +0 -1
- package/dist/chunks/NcActionButtonGroup-nwHeJeV7.mjs.map +0 -1
- package/dist/chunks/NcActionCaption-DmOKI_Kc.mjs.map +0 -1
- package/dist/chunks/NcActionCheckbox-yPCmA5vr.mjs.map +0 -1
- package/dist/chunks/NcActionInput-DTzVHmHn.mjs.map +0 -1
- package/dist/chunks/NcActionLink-CG3cKif-.mjs.map +0 -1
- package/dist/chunks/NcActionRadio-BWPi0DII.mjs.map +0 -1
- package/dist/chunks/NcActionRouter-C7VSuJLq.mjs.map +0 -1
- package/dist/chunks/NcActionText-ByD1mFXe.mjs.map +0 -1
- package/dist/chunks/NcActionTextEditable-DLKA6lfe.mjs.map +0 -1
- package/dist/chunks/NcActions-DxTtucKk.mjs.map +0 -1
- package/dist/chunks/NcAppContent-Cu9zhNK3.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-C7bIZuo2.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationNew-BO-Llutk.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSearch-DLbzvkkq.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSettings-vM8ajNNK.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationToggle-DBtf139E.mjs.map +0 -1
- package/dist/chunks/NcAppSidebar-Dav-iGv2.mjs.map +0 -1
- package/dist/chunks/NcAvatar-A1YnlIoN.mjs.map +0 -1
- package/dist/chunks/NcBreadcrumb-D5cRcQg5.mjs.map +0 -1
- package/dist/chunks/NcBreadcrumbs-CnWT9rE5.mjs.map +0 -1
- package/dist/chunks/NcButton-QmfEsvXC.mjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch-Ctdu7_UC.mjs.map +0 -1
- package/dist/chunks/NcChip-BnD-EmBn.mjs.map +0 -1
- package/dist/chunks/NcCollectionList-9YfN6xAi.mjs.map +0 -1
- package/dist/chunks/NcColorPicker-DQqAv2wB.mjs.map +0 -1
- package/dist/chunks/NcDateTime-D3snW0sN.mjs +0 -65
- package/dist/chunks/NcDateTime-D3snW0sN.mjs.map +0 -1
- package/dist/chunks/NcDateTimePicker-DUPn2UCM.mjs +0 -377
- package/dist/chunks/NcDateTimePicker-DUPn2UCM.mjs.map +0 -1
- package/dist/chunks/NcDateTimePickerNative-Dbc6pBXk.mjs.map +0 -1
- package/dist/chunks/NcDialog-B81mllwn.mjs.map +0 -1
- package/dist/chunks/NcDialogButton.vue_vue_type_script_setup_true_lang-DgWqkSL7.mjs.map +0 -1
- package/dist/chunks/NcEllipsisedOption-D4OggsNq.mjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-DKGBXunS.mjs.map +0 -1
- package/dist/chunks/NcEmptyContent-D-wBvEi4.mjs.map +0 -1
- package/dist/chunks/NcHeaderMenu-BRiroRYT.mjs.map +0 -1
- package/dist/chunks/NcHighlight-BHtRIzqk.mjs.map +0 -1
- package/dist/chunks/NcInputConfirmCancel-xnrPAGac.mjs.map +0 -1
- package/dist/chunks/NcInputField-CzC820tG.mjs.map +0 -1
- package/dist/chunks/NcListItem-DFLsabmR.mjs.map +0 -1
- package/dist/chunks/NcPopover-D4D97Y3j.mjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-DsuNT9hM.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-BkSojqgy.mjs.map +0 -1
- package/dist/chunks/NcRichText-Cn583bql.mjs +0 -414
- package/dist/chunks/NcRichText-Cn583bql.mjs.map +0 -1
- package/dist/chunks/NcSelect-B61ik8an.mjs.map +0 -1
- package/dist/chunks/NcSettingsInputText-B5FrLCL9.mjs.map +0 -1
- package/dist/chunks/NcSettingsSelectGroup-CKIbxms2.mjs.map +0 -1
- package/dist/chunks/NcTextArea-C-PMlEbl.mjs.map +0 -1
- package/dist/chunks/NcTimezonePicker-tZmX1Qp4.mjs.map +0 -1
- package/dist/chunks/_l10n-BEP_UzXI.mjs +0 -133
- package/dist/chunks/_l10n-BEP_UzXI.mjs.map +0 -1
- package/dist/chunks/actionText-aI0owku1.mjs.map +0 -1
- package/dist/chunks/usernameToColor-B_Q_sS3j.mjs +0 -26
- package/dist/chunks/usernameToColor-B_Q_sS3j.mjs.map +0 -1
- package/dist/utils/FindRanges.d.ts +0 -13
- package/dist/utils/GenColors.d.ts +0 -28
- package/dist/utils/GenRandomId.d.ts +0 -6
- package/dist/utils/GetChildren.d.ts +0 -13
- package/dist/utils/GetParent.d.ts +0 -13
- package/dist/utils/Linkify.d.ts +0 -8
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import '../assets/NcCollectionList-
|
|
1
|
+
import '../assets/NcCollectionList-DTJgOfCk.css';
|
|
2
2
|
import debounce from "debounce";
|
|
3
3
|
import { resolveComponent, createElementBlock, openBlock, createVNode, createCommentVNode, toDisplayString, withModifiers, normalizeClass, withDirectives, createElementVNode, vModelText, Fragment, renderList, createBlock, resolveDynamicComponent, withCtx, createTextVNode, Transition, ref } from "vue";
|
|
4
|
-
import { r as register,
|
|
5
|
-
import { N as NcAvatar } from "./NcAvatar-
|
|
6
|
-
import { N as NcSelect } from "./NcSelect-
|
|
4
|
+
import { r as register, E as t6, F as t27, a as t } from "./_l10n-7kR7gXFc.mjs";
|
|
5
|
+
import { N as NcAvatar } from "./NcAvatar-CA8y4d-c.mjs";
|
|
6
|
+
import { N as NcSelect } from "./NcSelect-CAx_ixPU.mjs";
|
|
7
7
|
import { g as getRoute } from "./autolink-CKPk5rzg.mjs";
|
|
8
|
-
import { N as NcActions } from "./NcActions-
|
|
9
|
-
import { N as NcActionButton } from "./NcActionButton-
|
|
8
|
+
import { N as NcActions } from "./NcActions-CgKHXNbF.mjs";
|
|
9
|
+
import { N as NcActionButton } from "./NcActionButton-BdQ_qmvW.mjs";
|
|
10
10
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
11
11
|
import axios from "@nextcloud/axios";
|
|
12
12
|
import { generateOcsUrl } from "@nextcloud/router";
|
|
13
13
|
register(t6);
|
|
14
|
-
register(
|
|
14
|
+
register(t27);
|
|
15
15
|
const _sfc_main$1 = {
|
|
16
16
|
name: "NcCollectionListItem",
|
|
17
17
|
components: {
|
|
@@ -231,7 +231,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
231
231
|
})
|
|
232
232
|
]);
|
|
233
233
|
}
|
|
234
|
-
const NcCollectionListItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
234
|
+
const NcCollectionListItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-e65bd4dd"]]);
|
|
235
235
|
function extractOcsData(response) {
|
|
236
236
|
return response.data.ocs.data;
|
|
237
237
|
}
|
|
@@ -583,3 +583,4 @@ const NcCollectionList = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc
|
|
|
583
583
|
export {
|
|
584
584
|
NcCollectionList as N
|
|
585
585
|
};
|
|
586
|
+
//# sourceMappingURL=NcCollectionList-BtHsipae.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcCollectionList-BtHsipae.mjs","sources":["../../src/components/NcCollectionList/NcCollectionListItem.vue","../../src/components/NcCollectionList/service.ts","../../src/components/NcCollectionList/useCollections.js","../../src/components/NcCollectionList/NcCollectionList.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<li class=\"collection-list-item\">\n\t\t<NcAvatar :display-name=\"collection.name\" allow-placeholder class=\"collection-avatar\" />\n\t\t<span v-if=\"newName === null\"\n\t\t\tclass=\"collection-item-name\"\n\t\t\ttitle=\"\"\n\t\t\t@click=\"showDetails\">{{ collection.name }}</span>\n\t\t<form v-else :class=\"{'should-shake': error }\" @submit.prevent=\"renameCollection\">\n\t\t\t<input v-model=\"newName\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tautocomplete=\"off\"\n\t\t\t\tautocapitalize=\"off\">\n\t\t\t<input type=\"submit\" value=\"\" class=\"icon-confirm\">\n\t\t</form>\n\t\t<div v-if=\"!detailsOpen && newName === null\" class=\"linked-icons\">\n\t\t\t<component :is=\"getComponent(resource).component\"\n\t\t\t\tv-for=\"resource in resources.slice(0, 2)\"\n\t\t\t\t:key=\"resource.type + '|' + resource.id\"\n\t\t\t\t:title=\"resource.name\"\n\t\t\t\t:to=\"getComponent(resource).to\"\n\t\t\t\t:href=\"getComponent(resource).href\"\n\t\t\t\t:class=\"typeClass(resource)\">\n\t\t\t\t<img :src=\"iconUrl(resource)\" :alt=\"resource.name\">\n\t\t\t</component>\n\t\t</div>\n\n\t\t<span v-if=\"newName === null\" class=\"sharingOptionsGroup\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton icon=\"icon-info\"\n\t\t\t\t\t@click.prevent=\"toggleDetails\">\n\t\t\t\t\t{{ detailsOpen ? t('Hide details') : t('Show details') }}\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton icon=\"icon-rename\"\n\t\t\t\t\t@click.prevent=\"openRename\">\n\t\t\t\t\t{{ t('Rename project') }}\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</span>\n\n\t\t<transition name=\"fade\">\n\t\t\t<div v-if=\"error\" class=\"error\">\n\t\t\t\t{{ error }}\n\t\t\t</div>\n\t\t</transition>\n\t\t<transition name=\"fade\">\n\t\t\t<ul v-if=\"detailsOpen\" class=\"resource-list-details\">\n\t\t\t\t<li v-for=\"resource in resources\"\n\t\t\t\t\t:key=\"resource.type + '|' + resource.id\"\n\t\t\t\t\t:class=\"typeClass(resource)\">\n\t\t\t\t\t<component :is=\"getComponent(resource).component\"\n\t\t\t\t\t\t:to=\"getComponent(resource).to\"\n\t\t\t\t\t\t:href=\"getComponent(resource).href\">\n\t\t\t\t\t\t<img :src=\"iconUrl(resource)\" :alt=\"resource.name\">\n\t\t\t\t\t\t<span class=\"resource-name\">{{ resource.name || '' }}</span>\n\t\t\t\t\t</component>\n\t\t\t\t\t<span class=\"icon-close\" @click=\"removeResource(collection, resource)\" />\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</transition>\n\t</li>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\nimport { getRoute } from '../NcRichText/autolink.ts'\n\nimport NcActions from '../NcActions/index.js'\nimport NcActionButton from '../NcActionButton/index.js'\nimport NcAvatar from '../NcAvatar/index.js'\n\nexport default {\n\tname: 'NcCollectionListItem',\n\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcActions,\n\t\tNcActionButton,\n\t},\n\n\tprops: {\n\t\tcollection: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\terror: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\temits: ['remove-resource', 'rename-collection'],\n\n\tdata() {\n\t\treturn {\n\t\t\tdetailsOpen: false,\n\t\t\tnewName: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tgetIcon() {\n\t\t\treturn (resource) => [resource.iconClass]\n\t\t},\n\n\t\ttypeClass() {\n\t\t\treturn (resource) => 'resource-type-' + resource.type\n\t\t},\n\n\t\tresources() {\n\t\t\t// invalid resources come from server as empty array ([]) and not an object\n\t\t\treturn this.collection.resources?.filter(resource => !Array.isArray(resource)) ?? []\n\t\t},\n\n\t\tgetComponent() {\n\t\t\treturn (resource) => {\n\t\t\t\tconst route = getRoute(this.$router, resource.link)\n\n\t\t\t\treturn route\n\t\t\t\t\t? { component: 'router-link', to: route, href: undefined }\n\t\t\t\t\t: { component: 'a', to: undefined, href: resource.link }\n\t\t\t}\n\t\t},\n\n\t\ticonUrl() {\n\t\t\treturn (resource) => {\n\t\t\t\tif (resource.mimetype) {\n\t\t\t\t\treturn OC.MimeType.getIconUrl(resource.mimetype)\n\t\t\t\t}\n\t\t\t\tif (resource.iconUrl) {\n\t\t\t\t\treturn resource.iconUrl\n\t\t\t\t}\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\ttoggleDetails() {\n\t\t\tthis.detailsOpen = !this.detailsOpen\n\t\t},\n\n\t\tshowDetails() {\n\t\t\tthis.detailsOpen = true\n\t\t},\n\n\t\tremoveResource(collection, resource) {\n\t\t\tthis.$emit('remove-resource', {\n\t\t\t\tcollectionId: collection.id,\n\t\t\t\tresourceType: resource.type,\n\t\t\t\tresourceId: resource.id,\n\t\t\t})\n\t\t},\n\n\t\topenRename() {\n\t\t\tthis.newName = this.collection.name\n\t\t},\n\n\t\trenameCollection() {\n\t\t\tif (this.newName) {\n\t\t\t\tthis.$emit('rename-collection', {\n\t\t\t\t\tcollectionId: this.collection.id,\n\t\t\t\t\tname: this.newName,\n\t\t\t\t})\n\t\t\t}\n\t\t\tthis.newName = null\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .3s ease;\n}\n\n.fade-enter, .fade-leave-to\n\t/* .fade-leave-active below version 2.1.8 */\n{\n\topacity: 0;\n}\n\n.linked-icons {\n\tdisplay: flex;\n\n\timg {\n\t\tpadding: 12px;\n\t\theight: var(--default-clickable-area);\n\t\tdisplay: block;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\topacity: 0.7;\n\n\t\t&:hover {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n.popovermenu {\n\tdisplay: none;\n\n\t&.open {\n\t\tdisplay: block;\n\t}\n}\n\nli.collection-list-item {\n\tflex-wrap: wrap;\n\theight: auto;\n\tcursor: pointer;\n\tmargin-bottom: 0 !important;\n\n\t.collection-avatar {\n\t\tmargin-top: 0;\n\t}\n\n\tform, .collection-item-name {\n\t\tflex-basis: 10%;\n\t\tflex-grow: 1;\n\t\tdisplay: flex;\n\t}\n\n\t.collection-item-name {\n\t\tpadding: 12px 9px;\n\t}\n\n\tinput {\n\t\tmargin-top: 4px;\n\t\tborder-color: var(--color-border-maxcontrast);\n\n\t\t&[type=text] {\n\t\t\tflex-grow: 1;\n\t\t}\n\t}\n\n\t.error {\n\t\tflex-basis: 100%;\n\t\twidth: 100%;\n\t}\n\n\t.resource-list-details {\n\t\tflex-basis: 100%;\n\t\twidth: 100%;\n\n\t\tli {\n\t\t\tdisplay: flex;\n\t\t\tmargin-inline-start: var(--default-clickable-area);\n\t\t\tborder-radius: 3px;\n\t\t\tcursor: pointer;\n\n\t\t\t&:hover {\n\t\t\t\tbackground-color: var(--color-background-dark);\n\t\t\t}\n\n\t\t\ta {\n\t\t\t\tflex-grow: 1;\n\t\t\t\tpadding: 3px;\n\t\t\t\tmax-width: calc(100% - 30px);\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\tspan {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: top;\n\t\t\tmargin-inline-end: 10px;\n\t\t}\n\n\t\tspan.resource-name {\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t\tposition: relative;\n\t\t\tvertical-align: top;\n\t\t\twhite-space: nowrap;\n\t\t\tflex-grow: 1;\n\t\t\tpadding: 4px;\n\t\t}\n\n\t\timg {\n\t\t\twidth: 24px;\n\t\t\theight: 24px;\n\t\t}\n\n\t\t.icon-close {\n\t\t\topacity: .7;\n\n\t\t\t&:hover, &:focus {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.should-shake {\n\tanimation: shake 0.6s 1 linear;\n}\n\n@keyframes shake {\n\t0% {\n\t\ttransform: translate(15px);\n\t}\n\t20% {\n\t\ttransform: translate(-15px);\n\t}\n\t40% {\n\t\ttransform: translate(7px);\n\t}\n\t60% {\n\t\ttransform: translate(-7px);\n\t}\n\t80% {\n\t\ttransform: translate(3px);\n\t}\n\t100% {\n\t\ttransform: translate(0px);\n\t}\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport axios, { type AxiosResponse } from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport type { OCSResponse } from '@nextcloud/typings/ocs'\n\n/**\n * Extracts the OCS data from a response\n * @param response OCS response\n */\nfunction extractOcsData(response: AxiosResponse<OCSResponse>) {\n\treturn response.data.ocs.data\n}\n\n/**\n * Lists all collections\n * @param collectionId Collection ID\n */\nexport function listCollectionService(collectionId: number) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId })).then(extractOcsData)\n}\n\n/**\n * Renames a collection\n * @param collectionId Collection ID\n * @param collectionName New collection name\n */\nexport function renameCollectionService(collectionId: number, collectionName: string) {\n\treturn axios.put(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { collectionName }).then(extractOcsData)\n}\n\n/**\n * Lists all collections for a resource\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function getCollectionsByResourceService(resourceType: string, resourceId: string) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/{resourceType}/{resourceId}', { resourceType, resourceId })).then(extractOcsData)\n}\n\n/**\n * Creates a collection\n * @param resourceType Resource type\n * @param resourceId Resource ID\n * @param name Collection name\n */\nexport function createCollectionService(resourceType: string, resourceId: string, name: string) {\n\treturn axios.post(generateOcsUrl('collaboration/resources/{resourceType}/{resourceId}', { resourceType, resourceId }), { name }).then(extractOcsData)\n}\n\n/**\n * Adds a resource to a collection\n * @param collectionId Collection ID\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function addResourceService(collectionId: number, resourceType: string, resourceId: string) {\n\treturn axios.post(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { resourceType, resourceId }).then(extractOcsData)\n}\n\n/**\n * Removes a resource from a collection\n * @param collectionId Collection ID\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function removeResourceService(collectionId: number, resourceType: string, resourceId: string) {\n\treturn axios.delete(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { params: { resourceType, resourceId } }).then(extractOcsData)\n}\n\n/**\n * Searches for collections\n * @param query Search query\n */\nexport function searchService(query: string) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/collections/search/{query}', { query })).then(extractOcsData)\n}\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { ref } from 'vue'\nimport {\n\trenameCollectionService,\n\tgetCollectionsByResourceService,\n\tcreateCollectionService,\n\taddResourceService,\n\tremoveResourceService,\n} from './service.ts'\n\n/**\n * Use collections composable\n */\nexport function useCollections() {\n\t// State\n\tconst storedCollections = ref([])\n\n\t// Mutations\n\tconst addCollections = (collections) => {\n\t\tstoredCollections.value = collections\n\t}\n\n\tconst addCollection = (collection) => {\n\t\tstoredCollections.value.push(collection)\n\t}\n\n\tconst removeCollection = (collectionId) => {\n\t\tstoredCollections.value = storedCollections.value.filter(item => item.id !== collectionId)\n\t}\n\n\tconst updateCollection = (collection) => {\n\t\tconst index = storedCollections.value.findIndex(item => item.id === collection.id)\n\t\tif (index !== -1) {\n\t\t\tstoredCollections.value[index] = collection\n\t\t} else {\n\t\t\taddCollection(collection)\n\t\t}\n\t}\n\n\t// Actions\n\tconst fetchCollectionsByResource = async ({ resourceType, resourceId }) => {\n\t\tconst collections = await getCollectionsByResourceService(resourceType, resourceId)\n\n\t\taddCollections(collections)\n\t}\n\n\tconst createCollection = async ({ baseResourceType, baseResourceId, resourceType, resourceId, name }) => {\n\t\tconst collection = await createCollectionService(baseResourceType, baseResourceId, name)\n\n\t\taddCollection(collection)\n\t\tawait addResourceToCollection({\n\t\t\tcollectionId: collection.id,\n\t\t\tresourceType,\n\t\t\tresourceId,\n\t\t})\n\t}\n\n\tconst renameCollection = async ({ collectionId, name }) => {\n\t\tconst collection = await renameCollectionService(collectionId, name)\n\n\t\tupdateCollection(collection)\n\t}\n\n\tconst addResourceToCollection = async ({ collectionId, resourceType, resourceId }) => {\n\t\tconst collection = await addResourceService(collectionId, resourceType, String(resourceId))\n\n\t\tupdateCollection(collection)\n\t}\n\n\tconst removeResourceFromCollection = async ({ collectionId, resourceType, resourceId }) => {\n\t\tconst collection = await removeResourceService(collectionId, resourceType, String(resourceId))\n\n\t\tif (collection.resources.length > 0) {\n\t\t\tupdateCollection(collection)\n\t\t} else {\n\t\t\tremoveCollection(collectionId)\n\t\t}\n\t}\n\n\treturn {\n\t\tstoredCollections,\n\t\tfetchCollectionsByResource,\n\t\tcreateCollection,\n\t\trenameCollection,\n\t\taddResourceToCollection,\n\t\tremoveResourceFromCollection,\n\t}\n}\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nProvides a Vue standalone component for Nextcloud Projects feature introduced in Nextcloud 16. Replaces deprecated `nextcloud-vue-collections` library.\n\nProjects feature is deprecated since Nextcloud 25, and superseded by Related resources. See [NcRelatedResourcesPanel](#/Components/NcRelatedResourcesPanel) documentation for more information.\n\n### Usage\n\nTo enable feature in Nextcloud, run following command:\n```sh\nocc config:system:set --value true 'projects.enabled'\n```\n</docs>\n\n<template>\n\t<ul v-if=\"collections && type && id\" id=\"collection-list\" class=\"collection-list\">\n\t\t<li @click=\"showSelect\">\n\t\t\t<div class=\"avatar\">\n\t\t\t\t<span class=\"icon-projects\" />\n\t\t\t</div>\n\t\t\t<div id=\"collection-select-container\">\n\t\t\t\t<NcSelect ref=\"select\"\n\t\t\t\t\tv-model=\"value\"\n\t\t\t\t\t:aria-label-combobox=\"t('Add to a project')\"\n\t\t\t\t\t:options=\"options\"\n\t\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t\tlabel=\"title\"\n\t\t\t\t\t:limit=\"5\"\n\t\t\t\t\t@close=\"isSelectOpen = false\"\n\t\t\t\t\t@open=\"isSelectOpen = true\"\n\t\t\t\t\t@option:selected=\"select\"\n\t\t\t\t\t@search=\"search\">\n\t\t\t\t\t<template #selected-option=\"option\">\n\t\t\t\t\t\t<span class=\"option__desc\">\n\t\t\t\t\t\t\t<span class=\"option__title\">{{ option.title }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #option=\"option\">\n\t\t\t\t\t\t<span class=\"option__wrapper\">\n\t\t\t\t\t\t\t<span v-if=\"option.class\" :class=\"option.class\" class=\"avatar\" />\n\t\t\t\t\t\t\t<NcAvatar v-else-if=\"option.method !== 2\" allow-placeholder :display-name=\"option.title\" />\n\t\t\t\t\t\t\t<span class=\"option__title\">{{ option.title }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<p class=\"hint\">\n\t\t\t\t\t\t{{ t('Connect items to a project to make them easier to find') }}\n\t\t\t\t\t</p>\n\t\t\t\t</NcSelect>\n\t\t\t</div>\n\t\t</li>\n\t\t<transition name=\"fade\">\n\t\t\t<li v-if=\"error\" class=\"error\">\n\t\t\t\t{{ error }}\n\t\t\t</li>\n\t\t</transition>\n\t\t<NcCollectionListItem v-for=\"collection in collections\"\n\t\t\t:key=\"collection.id\"\n\t\t\t:collection=\"collection\"\n\t\t\t:error=\"collectionsError[collection.id]\"\n\t\t\t@rename-collection=\"renameCollectionFromItem\"\n\t\t\t@remove-resource=\"removeResourceFromCollection\" />\n\t</ul>\n</template>\n\n<script>\nimport debounce from 'debounce'\nimport { ref } from 'vue'\nimport { t } from '../../l10n.js'\n\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcSelect from '../NcSelect/index.js'\nimport NcCollectionListItem from './NcCollectionListItem.vue'\n\nimport { useCollections } from './useCollections.js'\nimport { searchService } from './service.ts'\n\nconst METHOD_CREATE_COLLECTION = 0\nconst METHOD_ADD_TO_COLLECTION = 1\n\nexport default {\n\tname: 'NcCollectionList',\n\n\tcomponents: {\n\t\tNcCollectionListItem,\n\t\tNcAvatar,\n\t\tNcSelect,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Resource type identifier\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Unique id of the resource\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Name of the resource\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Whether the component is active (to start fetch resources)\n\t\t */\n\t\tisActive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst {\n\t\t\tstoredCollections,\n\t\t\tfetchCollectionsByResource,\n\t\t\tcreateCollection,\n\t\t\taddResourceToCollection,\n\t\t\tremoveResourceFromCollection,\n\t\t\trenameCollection,\n\t\t} = useCollections()\n\n\t\tconst searchCollections = ref([])\n\t\tconst search = debounce(function(query, loading) {\n\t\t\tif (query !== '') {\n\t\t\t\tloading(true)\n\t\t\t\tsearchService(query).then(collections => {\n\t\t\t\t\tsearchCollections.value = collections\n\t\t\t\t}).catch(e => {\n\t\t\t\t\tconsole.error('Failed to search for collections', e)\n\t\t\t\t}).finally(() => {\n\t\t\t\t\tloading(false)\n\t\t\t\t})\n\t\t\t}\n\t\t}, 500)\n\n\t\treturn {\n\t\t\tstoredCollections,\n\t\t\tfetchCollectionsByResource,\n\t\t\tcreateCollection,\n\t\t\taddResourceToCollection,\n\t\t\tremoveResourceFromCollection,\n\t\t\trenameCollection,\n\t\t\tsearchCollections,\n\t\t\tsearch,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tselectIsOpen: false,\n\t\t\tgeneratingCodes: false,\n\t\t\tcodes: undefined,\n\t\t\tvalue: null,\n\t\t\tmodel: {},\n\t\t\tcollectionsError: {},\n\t\t\terror: null,\n\t\t\tisSelectOpen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcollections() {\n\t\t\treturn this.storedCollections.filter(collection => collection.resources\n\t\t\t\t.some(resource => resource && resource.id === String(this.id) && resource.type === this.type),\n\t\t\t)\n\t\t},\n\n\t\tplaceholder() {\n\t\t\treturn this.isSelectOpen\n\t\t\t\t? t('Type to search for existing projects')\n\t\t\t\t: t('Add to a project')\n\t\t},\n\n\t\toptions() {\n\t\t\tconst options = []\n\t\t\twindow.OCP.Collaboration.getTypes().sort().forEach(type => {\n\t\t\t\toptions.push({\n\t\t\t\t\tmethod: METHOD_CREATE_COLLECTION,\n\t\t\t\t\ttype,\n\t\t\t\t\ttitle: window.OCP.Collaboration.getLabel(type),\n\t\t\t\t\tclass: window.OCP.Collaboration.getIcon(type),\n\t\t\t\t\taction: () => window.OCP.Collaboration.trigger(type),\n\t\t\t\t})\n\t\t\t})\n\t\t\tfor (const index in this.searchCollections) {\n\t\t\t\tif (!this.collections.find(collection => collection.id === this.searchCollections[index].id)) {\n\t\t\t\t\toptions.push({\n\t\t\t\t\t\tmethod: METHOD_ADD_TO_COLLECTION,\n\t\t\t\t\t\ttitle: this.searchCollections[index].name,\n\t\t\t\t\t\tcollectionId: this.searchCollections[index].id,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn options\n\t\t},\n\n\t\tresourceIdentifier() {\n\t\t\treturn {\n\t\t\t\tresourceType: this.type,\n\t\t\t\tresourceId: this.id,\n\t\t\t\tisActive: this.isActive,\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tresourceIdentifier: {\n\t\t\tdeep: true,\n\t\t\timmediate: true,\n\t\t\thandler(resourceIdentifier) {\n\t\t\t\tif (!resourceIdentifier.isActive || !resourceIdentifier.resourceId || !resourceIdentifier.resourceType) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.fetchCollectionsByResource(resourceIdentifier)\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tselect(selectedOption) {\n\t\t\tif (selectedOption.method === METHOD_CREATE_COLLECTION) {\n\t\t\t\tselectedOption.action().then(resourceId => {\n\t\t\t\t\tthis.createCollection({\n\t\t\t\t\t\tbaseResourceType: this.type,\n\t\t\t\t\t\tbaseResourceId: this.id,\n\t\t\t\t\t\tresourceType: selectedOption.type,\n\t\t\t\t\t\tresourceId,\n\t\t\t\t\t\tname: this.name,\n\t\t\t\t\t}).catch((e) => {\n\t\t\t\t\t\tthis.setError(t('Failed to create a project'), e)\n\t\t\t\t\t})\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\tconsole.error('No resource selected', e)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (selectedOption.method === METHOD_ADD_TO_COLLECTION) {\n\t\t\t\tthis.addResourceToCollection({\n\t\t\t\t\tcollectionId: selectedOption.collectionId, resourceType: this.type, resourceId: this.id,\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\tthis.setError(t('Failed to add the item to the project'), e)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.value = null\n\t\t},\n\n\t\tshowSelect() {\n\t\t\tthis.selectIsOpen = true\n\t\t\tthis.$refs.select.$el.focus()\n\t\t},\n\n\t\tsetError(error, e) {\n\t\t\tconsole.error(error, e)\n\t\t\tthis.error = error\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.error = null\n\t\t\t}, 5000)\n\t\t},\n\n\t\trenameCollectionFromItem({ collectionId, name }) {\n\t\t\tthis.renameCollection({ collectionId, name })\n\t\t\t\t.catch((e) => {\n\t\t\t\t\tconsole.error(t('Failed to rename the project'), e)\n\t\t\t\t\tthis.collectionsError[collectionId] = t('Failed to rename the project')\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tthis.collectionsError[collectionId] = null\n\t\t\t\t\t}, 5000)\n\t\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.collection-list * {\n\tbox-sizing: border-box;\n}\n\n.collection-list > li {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 12px;\n\n\t& > .avatar {\n\t\tmargin-top: 0;\n\t}\n}\n\n#collection-select-container {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.v-select {\n\t// NcAvatar in the dropdown\n\tspan.avatar {\n\t\tdisplay: block;\n\t\tpadding: 16px;\n\t\topacity: .7;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\n\t\t&:hover {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\np.hint {\n\tz-index: 1;\n\t// fix alignment\n\tmargin-top: -16px;\n\tpadding: 8px 8px;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: normal;\n}\n\ndiv.avatar {\n\twidth: 32px;\n\theight: 32px;\n\tmargin: 0;\n\tpadding: 8px;\n\tbackground-color: var(--color-background-dark);\n\tmargin-top: 30px;\n}\n\n/** TODO provide white icon in core */\n.icon-projects {\n\tdisplay: block;\n\tpadding: 8px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n}\n\n.option__wrapper {\n\tdisplay: flex;\n\n\t.avatar {\n\t\tdisplay: block;\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tbackground-color: var(--color-background-darker) !important;\n\t}\n\n\t.option__title {\n\t\tpadding: 4px;\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .5s;\n}\n\n.fade-enter, .fade-leave-to {\n\topacity: 0;\n}\n\n</style>\n"],"names":["_sfc_main","_hoisted_1","_hoisted_3","_hoisted_7","_hoisted_8","_openBlock","_createElementBlock","_createVNode","_toDisplayString","_normalizeClass","_withModifiers","_createElementVNode","_hoisted_2","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_withCtx","_createCommentVNode","_hoisted_4","_createTextVNode","_Transition","_hoisted_5","_hoisted_6"],"mappings":";;;;;;;;;;;;;AA2EA,MAAKA,cAAU;AAAA,EACd,MAAM;AAAA,EAEN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAED,OAAO;AAAA,IACN,YAAY;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA,IAED,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA,EACD;AAAA,EAED,OAAO,CAAC,mBAAmB,mBAAmB;AAAA,EAE9C,OAAO;AACN,WAAO;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACV;AAAA,EACA;AAAA,EAED,UAAU;AAAA,IACT,UAAU;AACT,aAAO,CAAC,aAAa,CAAC,SAAS,SAAS;AAAA,IACxC;AAAA,IAED,YAAY;AACX,aAAO,CAAC,aAAa,mBAAmB,SAAS;AAAA,IACjD;AAAA,IAED,YAAY;AAEX,aAAO,KAAK,WAAW,WAAW,OAAO,cAAY,CAAC,MAAM,QAAQ,QAAQ,CAAC,KAAK,CAAA;AAAA,IAClF;AAAA,IAED,eAAe;AACd,aAAO,CAAC,aAAa;AACpB,cAAM,QAAQ,SAAS,KAAK,SAAS,SAAS,IAAI;AAElD,eAAO,QACJ,EAAE,WAAW,eAAe,IAAI,OAAO,MAAM,OAAU,IACvD,EAAE,WAAW,KAAK,IAAI,QAAW,MAAM,SAAS,KAAK;AAA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AA,gBA5ClG,KAAA;AAAA,gBA4CiD,qBAAA;AAAA,gBAAmB,gBAAc,OAAO;AAAA,+CA5CzFG,mBAAA,IAAA,IAAA;AAAA,cA6COP,mBAAqD,QAArD,YAA+BH,gBAAA,OAAO,KAAK,GAAA,CAAA;AAAA;;UA7ClD,SAAAS,QAgDK,MAEI;AAAA,YAFJN,mBAEI,KAFJ,YAEIH,gBADA,SAAC,EAAA,wDAAA,CAAA,GAAA,CAAA;AAAA;UAjDV,GAAA;AAAA;;;IAsDED,YAIac,YAAA,EAJD,MAAK,OAAM,GAAA;AAAA,MAtDzB,SAAAJ,QAuDG,MAEK;AAAA,QAFK,MAAK,sBAAfX,mBAEK,MAFL,YAEKE,gBADD,MAAK,KAAA,GAAA,CAAA,KAxDZU,mBAAA,IAAA,IAAA;AAAA;MAAA,GAAA;AAAA;KA2DEb,UAAA,IAAA,GAAAC,mBAKmDO,UAhErD,MAAAC,WA2D6C,SAAW,aA3DxD,CA2D+B,eAAU;0BAAvCC,YAKmD,iCAAA;AAAA,QAJjD,KAAK,WAAW;AAAA,QAChB;AAAA,QACA,OAAO,MAAA,iBAAiB,WAAW,EAAE;AAAA,QACrC,oBAAmB,SAAwB;AAAA,QAC3C,kBAAiB,OAA4B;AAAA;;QAhEjDG,mBAAA,IAAA,IAAA;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import '../assets/NcColorPicker-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import '../assets/NcColorPicker-Clz7MjCA.css';
|
|
2
|
+
import { Chrome } from "@ckpack/vue-color";
|
|
3
|
+
import { defineComponent, resolveComponent, createBlock, openBlock, withCtx, createElementVNode, normalizeClass, createVNode, createElementBlock, createCommentVNode, Transition, Fragment, renderList, normalizeStyle, createTextVNode, toDisplayString, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
4
|
+
import { d as defaultPalette } from "./colors-BJbWzaQ-.mjs";
|
|
5
|
+
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
6
|
+
import { r as register, i as t1, a as t } from "./_l10n-7kR7gXFc.mjs";
|
|
7
7
|
import { A as ArrowLeft } from "./ArrowLeft-CanHG70H.mjs";
|
|
8
8
|
import { C as Check } from "./Check-5i4xKnkl.mjs";
|
|
9
9
|
import { D as DotsHorizontal } from "./DotsHorizontal-AMVAlTNH.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { N as NcButton } from "./NcButton-BHLqKKYP.mjs";
|
|
11
|
+
import { N as NcPopover } from "./NcPopover-C3ZoyUjc.mjs";
|
|
12
12
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
13
13
|
register(t1);
|
|
14
14
|
const HEX_REGEX = /^#([a-f0-9]{3}|[a-f0-9]{6})$/i;
|
|
@@ -89,7 +89,7 @@ const _sfc_main = defineComponent({
|
|
|
89
89
|
}));
|
|
90
90
|
},
|
|
91
91
|
uid() {
|
|
92
|
-
return
|
|
92
|
+
return createElementId();
|
|
93
93
|
},
|
|
94
94
|
contrastColor() {
|
|
95
95
|
const black = "#000000";
|
|
@@ -234,8 +234,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
234
234
|
!_ctx.paletteOnly ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
235
235
|
_ctx.advanced ? (openBlock(), createBlock(_component_NcButton, {
|
|
236
236
|
key: 0,
|
|
237
|
-
type: "tertiary",
|
|
238
237
|
"aria-label": _ctx.ariaBack,
|
|
238
|
+
variant: "tertiary",
|
|
239
239
|
onClick: _ctx.handleBack
|
|
240
240
|
}, {
|
|
241
241
|
icon: withCtx(() => [
|
|
@@ -244,8 +244,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
244
244
|
_: 1
|
|
245
245
|
}, 8, ["aria-label", "onClick"])) : (openBlock(), createBlock(_component_NcButton, {
|
|
246
246
|
key: 1,
|
|
247
|
-
type: "tertiary",
|
|
248
247
|
"aria-label": _ctx.ariaMore,
|
|
248
|
+
variant: "tertiary",
|
|
249
249
|
onClick: _ctx.handleMoreSettings
|
|
250
250
|
}, {
|
|
251
251
|
icon: withCtx(() => [
|
|
@@ -254,7 +254,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
254
254
|
_: 1
|
|
255
255
|
}, 8, ["aria-label", "onClick"])),
|
|
256
256
|
createVNode(_component_NcButton, {
|
|
257
|
-
|
|
257
|
+
variant: "primary",
|
|
258
258
|
onClick: ($event) => _ctx.handleConfirm(slotProps.hide)
|
|
259
259
|
}, {
|
|
260
260
|
default: withCtx(() => [
|
|
@@ -268,7 +268,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
268
268
|
_: 3
|
|
269
269
|
}, 8, ["container", "onApplyHide"]);
|
|
270
270
|
}
|
|
271
|
-
const NcColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
271
|
+
const NcColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-180efb02"]]);
|
|
272
272
|
export {
|
|
273
273
|
NcColorPicker as N
|
|
274
274
|
};
|
|
275
|
+
//# sourceMappingURL=NcColorPicker-BI-Is4nj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcColorPicker-BI-Is4nj.mjs","sources":["../../src/components/NcColorPicker/NcColorPicker.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 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 allows the user to choose a color. It consists of 2\nactual pickers:\n\n- One simple picker with a predefined palette of colors;\n- One more advanced picker that provides the full color spectrum;\n\n### Usage\n\n* Using v-model and passing in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<NcColorPicker v-model=\"color\" :palette=\"customPalette\">\n\t\t\t<NcButton> Click Me for a custom palette </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\tcustomPalette: [\n\t\t\t\t'#E40303',\n\t\t\t\t'#FF8C00',\n\t\t\t\t'#FFED00',\n\t\t\t\t'#008026',\n\t\t\t\t'#24408E',\n\t\t\t\t'#732982',\n\t\t\t\t'#5BCEFA',\n\t\t\t\t'#F5A9B8',\n\t\t\t\t'#FFFFFF',\n\t\t\t\t'#F5A9B8',\n\t\t\t\t'#5BCEFA',\n\t\t\t],\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Using v-model for both color and open state and emitting an event that updates the color\n\n```vue\n<template>\n\t<div class=\"container1\">\n\t\t<NcButton @click=\"open = !open\"> Click Me </NcButton>\n\t\t<NcColorPicker v-model=\"color\" v-model:shown=\"open\" v-slot=\"{ attrs }\">\n\t\t\t<div v-bind=\"attrs\" :style=\"{'background-color': color}\" class=\"color1\" />\n\t\t</NcColorPicker>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\topen: false\n\t\t}\n\t}\n}\n</script>\n<style>\n.container1 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color1 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Using advanced fields including HEX, RGB, and HSL:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\"\n\t\t\t:advanced-fields=\"true\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9'\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcPopover popup-role=\"dialog\"\n\t\t:container=\"container\"\n\t\t@apply-hide=\"handleClose\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<template #default=\"slotProps\">\n\t\t\t<div role=\"dialog\"\n\t\t\t\tclass=\"color-picker\"\n\t\t\t\taria-modal=\"true\"\n\t\t\t\t:aria-label=\"t('Color picker')\"\n\t\t\t\t:class=\"{ 'color-picker--advanced-fields': advanced && advancedFields }\">\n\t\t\t\t<Transition name=\"slide\" mode=\"out-in\">\n\t\t\t\t\t<div v-if=\"!advanced\" class=\"color-picker__simple\">\n\t\t\t\t\t\t<label v-for=\"({ color, name }, index) in normalizedPalette\"\n\t\t\t\t\t\t\t:key=\"index\"\n\t\t\t\t\t\t\t:style=\"{ backgroundColor: color }\"\n\t\t\t\t\t\t\tclass=\"color-picker__simple-color-circle\"\n\t\t\t\t\t\t\t:class=\"{ 'color-picker__simple-color-circle--active' : color === currentColor }\">\n\t\t\t\t\t\t\t<Check v-if=\"color === currentColor\" :size=\"20\" :fill-color=\"contrastColor\" />\n\t\t\t\t\t\t\t<input type=\"radio\"\n\t\t\t\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\t\t\t\t:aria-label=\"name\"\n\t\t\t\t\t\t\t\t:name=\"`color-picker-${uid}`\"\n\t\t\t\t\t\t\t\t:checked=\"color === currentColor\"\n\t\t\t\t\t\t\t\t@click=\"pickColor(color)\">\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Chrome v-else\n\t\t\t\t\t\tv-model=\"currentColor\"\n\t\t\t\t\t\tclass=\"color-picker__advanced\"\n\t\t\t\t\t\t:disable-alpha=\"true\"\n\t\t\t\t\t\t:disable-fields=\"!advancedFields\"\n\t\t\t\t\t\t@update:model-value=\"pickColor\" />\n\t\t\t\t</Transition>\n\t\t\t\t<div v-if=\"!paletteOnly\" class=\"color-picker__navigation\">\n\t\t\t\t\t<NcButton v-if=\"advanced\"\n\t\t\t\t\t\t:aria-label=\"ariaBack\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"handleBack\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<ArrowLeft :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton v-else\n\t\t\t\t\t\t:aria-label=\"ariaMore\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"handleMoreSettings\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<DotsHorizontal :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton variant=\"primary\"\n\t\t\t\t\t\t@click=\"handleConfirm(slotProps.hide)\">\n\t\t\t\t\t\t{{ t('Choose') }}\n\t\t\t\t\t</NcButton>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</template>\n\t</NcPopover>\n</template>\n\n<script>\nimport { Chrome } from '@ckpack/vue-color'\nimport { defineComponent } from 'vue'\nimport { defaultPalette } from '../../utils/colors.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { t } from '../../l10n.js'\n\nimport ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'\nimport NcButton from '../NcButton/index.ts'\nimport NcPopover from '../NcPopover/index.js'\n\nconst HEX_REGEX = /^#([a-f0-9]{3}|[a-f0-9]{6})$/i\n\nexport default defineComponent({\n\tname: 'NcColorPicker',\n\n\tcomponents: {\n\t\tArrowLeft,\n\t\tCheck,\n\t\tChrome,\n\t\tDotsHorizontal,\n\t\tNcButton,\n\t\tNcPopover,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * A HEX color that represents the initial value of the picker\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Set to `true` to enable advanced fields including HEX, RGB, and HSL\n\t\t */\n\t\tadvancedFields: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Limit selectable colors to only the provided palette\n\t\t */\n\t\tpaletteOnly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Provide a custom array of colors to show.\n\t\t * Can be either an array of string hexadecimal colors,\n\t\t * or an array of object with a `color` property with hexadecimal color string,\n\t\t * and a `name` property for accessibility.\n\t\t *\n\t\t * @type {string[] | {color: string, name: string}[]}\n\t\t */\n\t\tpalette: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [...defaultPalette],\n\t\t\tvalidator: (palette) => palette.every(item =>\n\t\t\t\t(typeof item === 'string' && HEX_REGEX.test(item))\n\t\t\t\t|| (typeof item === 'object' && item.color && HEX_REGEX.test(item.color)),\n\t\t\t),\n\t\t},\n\n\t\t/**\n\t\t * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\n\temits: [\n\t\t'submit',\n\t\t'close',\n\t\t'update:open',\n\t\t'update:modelValue',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tcurrentColor: this.modelValue,\n\t\t\tadvanced: false,\n\t\t\tariaBack: t('Back'),\n\t\t\tariaMore: t('More options'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tnormalizedPalette() {\n\t\t\treturn this.palette.map((item) => ({\n\t\t\t\tcolor: typeof item === 'object' ? item.color : item,\n\t\t\t\tname: typeof item === 'object' && item.name\n\t\t\t\t\t? item.name\n\t\t\t\t\t: t('A color with a HEX value {hex}', { hex: item.color }),\n\t\t\t}))\n\t\t},\n\n\t\tuid() {\n\t\t\treturn createElementId()\n\t\t},\n\t\tcontrastColor() {\n\t\t\tconst black = '#000000'\n\t\t\tconst white = '#FFFFFF'\n\t\t\treturn (this.calculateLuma(this.currentColor) > 0.5) ? black : white\n\t\t},\n\t},\n\n\twatch: {\n\t\tmodelValue(color) {\n\t\t\tthis.currentColor = color\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Submit a picked colour and close picker\n\t\t * @param {Function} hideCallback callback to close popover\n\t\t */\n\t\thandleConfirm(hideCallback) {\n\t\t\t/**\n\t\t\t * Emits a hexadecimal string e.g. '#ffffff'\n\t\t\t */\n\t\t\tthis.$emit('submit', this.currentColor)\n\t\t\thideCallback()\n\n\t\t\tthis.advanced = false\n\t\t},\n\t\thandleClose() {\n\t\t\t/**\n\t\t\t * Emitted after picker close\n\t\t\t */\n\t\t\tthis.$emit('close')\n\t\t\tthis.$emit('update:open', false)\n\t\t},\n\n\t\t/**\n\t\t * Inner navigations\n\t\t */\n\t\thandleBack() {\n\t\t\tthis.advanced = false\n\t\t},\n\t\thandleMoreSettings() {\n\t\t\tthis.advanced = true\n\t\t},\n\n\t\t/**\n\t\t * Pick a colour\n\t\t *\n\t\t * @param {string} color the picked color\n\t\t */\n\t\tpickColor(color) {\n\t\t\tif (typeof color !== 'string') {\n\t\t\t\tcolor = this.currentColor.hex\n\t\t\t}\n\t\t\tthis.currentColor = color\n\n\t\t\t/**\n\t\t\t * Emits a hexadecimal string e.g. '#ffffff'\n\t\t\t */\n\t\t\tthis.$emit('update:modelValue', color)\n\n\t\t},\n\n\t\t/**\n\t\t * Calculate luminance of provided hex color\n\t\t *\n\t\t * @param {string} color the hex color\n\t\t */\n\t\t calculateLuma(color) {\n\t\t\tconst [red, green, blue] = this.hexToRGB(color)\n\t\t\treturn (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255\n\t\t},\n\n\t\t/**\n\t\t * Convert hex color to RGB\n\t\t *\n\t\t * @param {string} hex the hex color\n\t\t */\n\t\t hexToRGB(hex) {\n\t\t\tconst result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex)\n\t\t\treturn result\n\t\t\t\t? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)]\n\t\t\t\t: null\n\t\t},\n\t},\n})\n\n</script>\n\n<style lang=\"scss\" scoped>\n.color-picker {\n\tdisplay: flex;\n\toverflow: hidden;\n\talign-content: flex-end;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\twidth: 176px;\n\tpadding: 8px;\n\tborder-radius: 3px;\n\n\t&--advanced-fields {\n\t\twidth: 264px;\n\t}\n\n\t&__simple {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, var(--default-clickable-area));\n\t\tgrid-auto-rows: var(--default-clickable-area);\n\n\t\t&-color-circle {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: calc(var(--default-clickable-area) - 10px);\n\t\t\theight: calc(var(--default-clickable-area) - 10px);\n\t\t\tmin-height: calc(var(--default-clickable-area) - 10px);\n\t\t\tmargin: auto;\n\t\t\tpadding: 0;\n\t\t\tcolor: white;\n\t\t\tborder: 1px solid rgba(0, 0, 0, 0.25);\n\t\t\tborder-radius: 50%;\n\t\t\tfont-size: 16px;\n\t\t\t&:focus-within {\n\t\t\t\toutline: 2px solid var(--color-main-text);\n\t\t\t}\n\t\t\t&:hover {\n\t\t\t\topacity: .6;\n\t\t\t}\n\t\t\t&--active {\n\t\t\t\twidth: calc(var(--default-clickable-area) - 6px);\n\t\t\t\theight: calc(var(--default-clickable-area) - 6px);\n\t\t\t\tmin-height: calc(var(--default-clickable-area) - 6px);\n\t\t\t\ttransition: all 100ms ease-in-out;\n\t\t\t\topacity: 1 !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__advanced {\n\t\tbox-shadow: none !important;\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\t\tmargin-top: 10px;\n\t}\n}\n\n:deep() .vc {\n\t&-chrome {\n\t\twidth: unset;\n\t\tbackground-color: var(--color-main-background);\n\n\t\t&-color-wrap {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\n\t\t&-active-color {\n\t\t\tborder-radius: 17px;\n\t\t}\n\n\t\t&-body {\n\t\t\tpadding: 14px 0 0 0;\n\t\t\tbackground-color: var(--color-main-background);\n\n\t\t\t.vc-input__input {\n\t\t\t\t--input-border-radius: var(--border-radius-element, var(--border-radius-large));\n\t\t\t\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t\t\t\twidth: 100%;\n\t\t\t\theight: var(--default-clickable-area);\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding-inline: calc(var(--border-radius-large) + var(--input-border-width-offset));\n\t\t\t\tpadding-block: var(--input-border-width-offset);\n\t\t\t\tborder: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);\n\t\t\t\tborder-radius: var(--input-border-radius);\n\t\t\t\tfont-size: var(--default-font-size);\n\t\t\t\tcolor: var(--color-main-text);\n\t\t\t\tbox-shadow: none;\n\n\t\t\t\t&:active:not([disabled]),\n\t\t\t\t&:hover:not([disabled]),\n\t\t\t\t&:focus:not([disabled]) {\n\t\t\t\t\t// Reset padding offset when focused\n\t\t\t\t\t--input-border-width-offset: 0px;\n\t\t\t\t\tborder-color: var(--color-main-text);\n\t\t\t\t\tborder-width: var(--border-width-input-focused, 2px);\n\t\t\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\n\t\t\t\t\t& + .vc-input__label {\n\t\t\t\t\t\tcolor: var(--color-main-text);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vc-input__label {\n\t\t\t\tposition: absolute;\n\t\t\t\tinset-inline: var(--border-width-input-focused, 2px);\n\t\t\t\tinset-block-start: calc(-1.5 * var(--font-size-small, 13px) / 2);\n\t\t\t\tmax-width: fit-content;\n\t\t\t\tmargin-inline: calc(var(--border-radius-large) - var(--default-grid-baseline));\n\t\t\t\tmargin-block: 0;\n\t\t\t\tpadding-inline: var(--default-grid-baseline);\n\t\t\t\tfont-family: var(--font-face);\n\t\t\t\tfont-size: var(--font-size-small, 13px);\n\t\t\t\tline-height: 1.5;\n\t\t\t\tfont-weight: 500;\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t\tbackground-color: var(--color-main-background);\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t}\n\n\t\t&-toggle-btn {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\twidth: var(--default-clickable-area);\n\t\t\theight: var(--default-clickable-area);\n\t\t\tmargin-inline-start: 6px;\n\t\t\tfilter: var(--background-invert-if-dark);\n\t\t}\n\n\t\t&-toggle-icon {\n\t\t\twidth: 24px;\n\t\t\theight: 24px;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t&-toggle-icon-highlight {\n\t\t\twidth: var(--default-clickable-area);\n\t\t\theight: var(--default-clickable-area);\n\t\t\tinset: 0;\n\t\t}\n\n\t\t&-saturation {\n\t\t\t&-wrap {\n\t\t\t\tborder-radius: 3px;\n\t\t\t}\n\n\t\t\t&-circle {\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.slide {\n\t&-enter-from {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-to {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave-from {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave-to {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-active,\n\t&-leave-active {\n\t\ttransition: all 50ms ease-in-out;\n\t}\n}\n\n</style>\n"],"names":["_createBlock","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps","_createElementVNode","_normalizeClass","_createVNode","_Transition","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeStyle","_createCommentVNode","_createTextVNode","_toDisplayString"],"mappings":";;;;;;;;;;;;AAsNA,MAAM,YAAY;AAElB,MAAK,YAAa,gBAAa;AAAA,EAC9B,MAAM;AAAA,EAEN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,YAAY;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,gBAAgB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,SAAS;AAAA,MACR,MAAM;AAAA,MACN,SAAS,MAAM,CAAC,GAAG,cAAc;AAAA,MACjC,WAAW,CAAC,YAAY,QAAQ;AAAA,QAAM,UACpC,OAAO,SAAS,YAAY,UAAU,KAAK,IAAI,KAC5C,OAAO,SAAS,YAAY,KAAK,SAAS,UAAU,KAAK,KAAK,KAAK;AAAA,MACvE;AAAA,IACD;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACV,MAAM,CAAC,QAAQ,QAAQ,SAAS,OAAO;AAAA,MACvC,SAAS;AAAA,IAC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BAAA;AAAA,YA9LhB,KAAA;AAAA,YAwLO,cAAY,KAAQ;AAAA,YACrB,SAAQ;AAAA,YACP,SAAO,KAAkB;AAAA;YACf,cACV,MAA6B;AAAA,cAA7BO,YAA6B,2BAAA,EAAZ,MAAM,GAAE,CAAA;AAAA;YA5LhC,GAAA;AAAA;UA+LKA,YAGW,qBAAA;AAAA,YAHD,SAAQ;AAAA,YAChB,SAAO,YAAA,KAAA,cAAc,UAAU,IAAI;AAAA;YAhM1C,SAAAN,QAiMM,MAAiB;AAAA,cAjMvBc,gBAAAC,gBAiMS,KAAC,EAAA,QAAA,CAAA,GAAA,CAAA;AAAA;YAjMV,GAAA;AAAA;cAAAF,mBAAA,IAAA,IAAA;AAAA,MAAA,GAAA,IAAA,UAAA;AAAA;IAAA,GAAA;AAAA;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import '../assets/NcContent-
|
|
1
|
+
import '../assets/NcContent-aXaYSfjS.css';
|
|
2
2
|
import { emit } from "@nextcloud/event-bus";
|
|
3
3
|
import { useIsMobile } from "../composables/useIsMobile/index.mjs";
|
|
4
|
-
import { r as register,
|
|
5
|
-
import { N as NcButton } from "./NcButton-
|
|
4
|
+
import { r as register, A as t29, a as t } from "./_l10n-7kR7gXFc.mjs";
|
|
5
|
+
import { N as NcButton } from "./NcButton-BHLqKKYP.mjs";
|
|
6
6
|
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-BYTrkA66.mjs";
|
|
7
7
|
import { resolveComponent, createElementBlock, openBlock, normalizeClass, createBlock, renderSlot, Teleport, createElementVNode, withDirectives, toDisplayString, createVNode, withModifiers, withCtx, createTextVNode, vShow } from "vue";
|
|
8
8
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
9
|
-
register(
|
|
9
|
+
register(t29);
|
|
10
10
|
const contentSvg = '<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<svg width="395" height="314" viewBox="0 0 395 314" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect width="395" height="314" rx="11" fill="#439DCD"/>\n<rect x="13" y="51" width="366" height="248" rx="8" fill="white"/>\n<rect x="22" y="111" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="127" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="63" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="191" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="143" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="79" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="159" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="95" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="175" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<path d="M288 145C277.56 147.8 265.32 149 254 149C242.68 149 230.44 147.8 220 145L218 153C225.44 155 234 156.32 242 157V209H250V185H258V209H266V157C274 156.32 282.56 155 290 153L288 145ZM254 145C258.4 145 262 141.4 262 137C262 132.6 258.4 129 254 129C249.6 129 246 132.6 246 137C246 141.4 249.6 145 254 145Z" fill="#DEDEDE"/>\n<path d="M43.5358 13C38.6641 13 34.535 16.2415 33.2552 20.6333C32.143 18.3038 29.7327 16.6718 26.9564 16.6718C23.1385 16.6718 20 19.7521 20 23.4993C20 27.2465 23.1385 30.3282 26.9564 30.3282C29.7327 30.3282 32.1429 28.6952 33.2552 26.3653C34.535 30.7575 38.6641 34 43.5358 34C48.3715 34 52.4796 30.8064 53.7921 26.4637C54.9249 28.7407 57.3053 30.3282 60.0421 30.3282C63.8601 30.3282 67 27.2465 67 23.4993C67 19.7521 63.8601 16.6718 60.0421 16.6718C57.3053 16.6718 54.9249 18.2583 53.7921 20.5349C52.4796 16.1926 48.3715 13 43.5358 13ZM43.5358 17.0079C47.2134 17.0079 50.1512 19.8899 50.1512 23.4993C50.1512 27.1087 47.2134 29.9921 43.5358 29.9921C39.8583 29.9921 36.9218 27.1087 36.9218 23.4993C36.9218 19.8899 39.8583 17.0079 43.5358 17.0079ZM26.9564 20.6797C28.5677 20.6797 29.8307 21.9179 29.8307 23.4993C29.8307 25.0807 28.5677 26.3203 26.9564 26.3203C25.3452 26.3203 24.0836 25.0807 24.0836 23.4993C24.0836 21.9179 25.3452 20.6797 26.9564 20.6797ZM60.0421 20.6797C61.6534 20.6797 62.9164 21.9179 62.9164 23.4993C62.9164 25.0807 61.6534 26.3203 60.0421 26.3203C58.4309 26.3203 57.1693 25.0807 57.1693 23.4993C57.1693 21.9179 58.4309 20.6797 60.0421 20.6797Z" fill="white"/>\n<rect x="79" y="20" width="8" height="8" rx="4" fill="white"/>\n<rect x="99" y="20" width="8" height="8" rx="4" fill="white"/>\n<rect x="119" y="20" width="8" height="8" rx="4" fill="white"/>\n<rect x="139" y="20" width="8" height="8" rx="4" fill="white"/>\n<rect x="159" y="20" width="8" height="8" rx="4" fill="white"/>\n<rect x="179" y="20" width="8" height="8" rx="4" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C5.37258 0 0 5.37259 0 12V302C0 308.627 5.37259 314 12 314H383C389.627 314 395 308.627 395 302V12C395 5.37258 389.627 0 383 0H12ZM140 44C132.268 44 126 50.268 126 58V292C126 299.732 132.268 306 140 306H372C379.732 306 386 299.732 386 292V58C386 50.268 379.732 44 372 44H140Z" fill="black" fill-opacity="0.35"/>\n</svg>\n';
|
|
11
11
|
const navigationSvg = '<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<svg width="395" height="314" viewBox="0 0 395 314" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect width="395" height="314" rx="11" fill="#439DCD"/>\n<rect x="13" y="51" width="366" height="248" rx="8" fill="white"/>\n<rect x="22" y="111" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="127" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="63" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="191" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="143" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="79" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="159" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="95" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<rect x="22" y="175" width="92" height="12" rx="6" fill="#DEDEDE"/>\n<path d="M288 145C277.56 147.8 265.32 149 254 149C242.68 149 230.44 147.8 220 145L218 153C225.44 155 234 156.32 242 157V209H250V185H258V209H266V157C274 156.32 282.56 155 290 153L288 145ZM254 145C258.4 145 262 141.4 262 137C262 132.6 258.4 129 254 129C249.6 129 246 132.6 246 137C246 141.4 249.6 145 254 145Z" fill="#DEDEDE"/>\n<path d="M43.5358 13C38.6641 13 34.535 16.2415 33.2552 20.6333C32.143 18.3038 29.7327 16.6718 26.9564 16.6718C23.1385 16.6718 20 19.7521 20 23.4993C20 27.2465 23.1385 30.3282 26.9564 30.3282C29.7327 30.3282 32.1429 28.6952 33.2552 26.3653C34.535 30.7575 38.6641 34 43.5358 34C48.3715 34 52.4796 30.8064 53.7921 26.4637C54.9249 28.7407 57.3053 30.3282 60.0421 30.3282C63.8601 30.3282 67 27.2465 67 23.4993C67 19.7521 63.8601 16.6718 60.0421 16.6718C57.3053 16.6718 54.9249 18.2583 53.7921 20.5349C52.4796 16.1926 48.3715 13 43.5358 13ZM43.5358 17.0079C47.2134 17.0079 50.1512 19.8899 50.1512 23.4993C50.1512 27.1087 47.2134 29.9921 43.5358 29.9921C39.8583 29.9921 36.9218 27.1087 36.9218 23.4993C36.9218 19.8899 39.8583 17.0079 43.5358 17.0079ZM26.9564 20.6797C28.5677 20.6797 29.8307 21.9179 29.8307 23.4993C29.8307 25.0807 28.5677 26.3203 26.9564 26.3203C25.3452 26.3203 24.0836 25.0807 24.0836 23.4993C24.0836 21.9179 25.3452 20.6797 26.9564 20.6797ZM60.0421 20.6797C61.6534 20.6797 62.9164 21.9179 62.9164 23.4993C62.9164 25.0807 61.6534 26.3203 60.0421 26.3203C58.4309 26.3203 57.1693 25.0807 57.1693 23.4993C57.1693 21.9179 58.4309 20.6797 60.0421 20.6797Z" fill="white"/>\n<rect x="79" y="20" width="8" height="8" rx="4" fill="white"/>\n<rect x="99" y="20" width="8" height="8" rx="4" fill="white"/>\n<rect x="119" y="20" width="8" height="8" rx="4" fill="white"/>\n<rect x="139" y="20" width="8" height="8" rx="4" fill="white"/>\n<rect x="159" y="20" width="8" height="8" rx="4" fill="white"/>\n<rect x="179" y="20" width="8" height="8" rx="4" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C5.37258 0 0 5.37259 0 12V302C0 308.627 5.37259 314 12 314H383C389.627 314 395 308.627 395 302V12C395 5.37258 389.627 0 383 0H12ZM112 44C119.732 44 126 50.268 126 58V292C126 299.732 119.732 306 112 306H20C12.268 306 6 299.732 6 292V58C6 50.268 12.268 44 20 44H112Z" fill="black" fill-opacity="0.35"/>\n</svg>\n';
|
|
12
12
|
const _sfc_main = {
|
|
@@ -87,8 +87,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
87
87
|
createElementVNode("div", _hoisted_2, toDisplayString($options.t("Keyboard navigation help")), 1),
|
|
88
88
|
createElementVNode("div", _hoisted_3, [
|
|
89
89
|
withDirectives(createVNode(_component_NcButton, {
|
|
90
|
-
type: "tertiary",
|
|
91
90
|
href: "#app-navigation-vue",
|
|
91
|
+
variant: "tertiary",
|
|
92
92
|
onClick: withModifiers($options.openAppNavigation, ["prevent"]),
|
|
93
93
|
onFocusin: _cache[0] || (_cache[0] = ($event) => $data.currentFocus = "navigation"),
|
|
94
94
|
onMouseover: _cache[1] || (_cache[1] = ($event) => $data.currentFocus = "navigation")
|
|
@@ -101,8 +101,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
101
101
|
[vShow, $data.hasAppNavigation]
|
|
102
102
|
]),
|
|
103
103
|
createVNode(_component_NcButton, {
|
|
104
|
-
type: "tertiary",
|
|
105
104
|
href: "#app-content-vue",
|
|
105
|
+
variant: "tertiary",
|
|
106
106
|
onFocusin: _cache[2] || (_cache[2] = ($event) => $data.currentFocus = "content"),
|
|
107
107
|
onMouseover: _cache[3] || (_cache[3] = ($event) => $data.currentFocus = "content")
|
|
108
108
|
}, {
|
|
@@ -124,7 +124,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
124
124
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
125
125
|
], 2);
|
|
126
126
|
}
|
|
127
|
-
const NcContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
127
|
+
const NcContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b8e735c5"]]);
|
|
128
128
|
export {
|
|
129
129
|
NcContent as N
|
|
130
130
|
};
|
|
131
|
+
//# sourceMappingURL=NcContent-BcF6f3N-.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcContent-CsDFFKvH.mjs","sources":["../../src/components/NcContent/content-selected.svg?raw","../../src/components/NcContent/navigation-selected.svg?raw","../../src/components/NcContent/NcContent.vue"],"sourcesContent":["export default \"<!--\\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\\n - SPDX-License-Identifier: AGPL-3.0-or-later\\n-->\\n<svg width=\\\"395\\\" height=\\\"314\\\" viewBox=\\\"0 0 395 314\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<rect width=\\\"395\\\" height=\\\"314\\\" rx=\\\"11\\\" fill=\\\"#439DCD\\\"/>\\n<rect x=\\\"13\\\" y=\\\"51\\\" width=\\\"366\\\" height=\\\"248\\\" rx=\\\"8\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"22\\\" y=\\\"111\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"127\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"63\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"191\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"143\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"79\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"159\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"95\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"175\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<path d=\\\"M288 145C277.56 147.8 265.32 149 254 149C242.68 149 230.44 147.8 220 145L218 153C225.44 155 234 156.32 242 157V209H250V185H258V209H266V157C274 156.32 282.56 155 290 153L288 145ZM254 145C258.4 145 262 141.4 262 137C262 132.6 258.4 129 254 129C249.6 129 246 132.6 246 137C246 141.4 249.6 145 254 145Z\\\" fill=\\\"#DEDEDE\\\"/>\\n<path d=\\\"M43.5358 13C38.6641 13 34.535 16.2415 33.2552 20.6333C32.143 18.3038 29.7327 16.6718 26.9564 16.6718C23.1385 16.6718 20 19.7521 20 23.4993C20 27.2465 23.1385 30.3282 26.9564 30.3282C29.7327 30.3282 32.1429 28.6952 33.2552 26.3653C34.535 30.7575 38.6641 34 43.5358 34C48.3715 34 52.4796 30.8064 53.7921 26.4637C54.9249 28.7407 57.3053 30.3282 60.0421 30.3282C63.8601 30.3282 67 27.2465 67 23.4993C67 19.7521 63.8601 16.6718 60.0421 16.6718C57.3053 16.6718 54.9249 18.2583 53.7921 20.5349C52.4796 16.1926 48.3715 13 43.5358 13ZM43.5358 17.0079C47.2134 17.0079 50.1512 19.8899 50.1512 23.4993C50.1512 27.1087 47.2134 29.9921 43.5358 29.9921C39.8583 29.9921 36.9218 27.1087 36.9218 23.4993C36.9218 19.8899 39.8583 17.0079 43.5358 17.0079ZM26.9564 20.6797C28.5677 20.6797 29.8307 21.9179 29.8307 23.4993C29.8307 25.0807 28.5677 26.3203 26.9564 26.3203C25.3452 26.3203 24.0836 25.0807 24.0836 23.4993C24.0836 21.9179 25.3452 20.6797 26.9564 20.6797ZM60.0421 20.6797C61.6534 20.6797 62.9164 21.9179 62.9164 23.4993C62.9164 25.0807 61.6534 26.3203 60.0421 26.3203C58.4309 26.3203 57.1693 25.0807 57.1693 23.4993C57.1693 21.9179 58.4309 20.6797 60.0421 20.6797Z\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"79\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"99\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"119\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"139\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"159\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"179\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M12 0C5.37258 0 0 5.37259 0 12V302C0 308.627 5.37259 314 12 314H383C389.627 314 395 308.627 395 302V12C395 5.37258 389.627 0 383 0H12ZM140 44C132.268 44 126 50.268 126 58V292C126 299.732 132.268 306 140 306H372C379.732 306 386 299.732 386 292V58C386 50.268 379.732 44 372 44H140Z\\\" fill=\\\"black\\\" fill-opacity=\\\"0.35\\\"/>\\n</svg>\\n\"","export default \"<!--\\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\\n - SPDX-License-Identifier: AGPL-3.0-or-later\\n-->\\n<svg width=\\\"395\\\" height=\\\"314\\\" viewBox=\\\"0 0 395 314\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<rect width=\\\"395\\\" height=\\\"314\\\" rx=\\\"11\\\" fill=\\\"#439DCD\\\"/>\\n<rect x=\\\"13\\\" y=\\\"51\\\" width=\\\"366\\\" height=\\\"248\\\" rx=\\\"8\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"22\\\" y=\\\"111\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"127\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"63\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"191\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"143\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"79\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"159\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"95\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"175\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<path d=\\\"M288 145C277.56 147.8 265.32 149 254 149C242.68 149 230.44 147.8 220 145L218 153C225.44 155 234 156.32 242 157V209H250V185H258V209H266V157C274 156.32 282.56 155 290 153L288 145ZM254 145C258.4 145 262 141.4 262 137C262 132.6 258.4 129 254 129C249.6 129 246 132.6 246 137C246 141.4 249.6 145 254 145Z\\\" fill=\\\"#DEDEDE\\\"/>\\n<path d=\\\"M43.5358 13C38.6641 13 34.535 16.2415 33.2552 20.6333C32.143 18.3038 29.7327 16.6718 26.9564 16.6718C23.1385 16.6718 20 19.7521 20 23.4993C20 27.2465 23.1385 30.3282 26.9564 30.3282C29.7327 30.3282 32.1429 28.6952 33.2552 26.3653C34.535 30.7575 38.6641 34 43.5358 34C48.3715 34 52.4796 30.8064 53.7921 26.4637C54.9249 28.7407 57.3053 30.3282 60.0421 30.3282C63.8601 30.3282 67 27.2465 67 23.4993C67 19.7521 63.8601 16.6718 60.0421 16.6718C57.3053 16.6718 54.9249 18.2583 53.7921 20.5349C52.4796 16.1926 48.3715 13 43.5358 13ZM43.5358 17.0079C47.2134 17.0079 50.1512 19.8899 50.1512 23.4993C50.1512 27.1087 47.2134 29.9921 43.5358 29.9921C39.8583 29.9921 36.9218 27.1087 36.9218 23.4993C36.9218 19.8899 39.8583 17.0079 43.5358 17.0079ZM26.9564 20.6797C28.5677 20.6797 29.8307 21.9179 29.8307 23.4993C29.8307 25.0807 28.5677 26.3203 26.9564 26.3203C25.3452 26.3203 24.0836 25.0807 24.0836 23.4993C24.0836 21.9179 25.3452 20.6797 26.9564 20.6797ZM60.0421 20.6797C61.6534 20.6797 62.9164 21.9179 62.9164 23.4993C62.9164 25.0807 61.6534 26.3203 60.0421 26.3203C58.4309 26.3203 57.1693 25.0807 57.1693 23.4993C57.1693 21.9179 58.4309 20.6797 60.0421 20.6797Z\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"79\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"99\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"119\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"139\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"159\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"179\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M12 0C5.37258 0 0 5.37259 0 12V302C0 308.627 5.37259 314 12 314H383C389.627 314 395 308.627 395 302V12C395 5.37258 389.627 0 383 0H12ZM112 44C119.732 44 126 50.268 126 58V292C126 299.732 119.732 306 112 306H20C12.268 306 6 299.732 6 292V58C6 50.268 12.268 44 20 44H112Z\\\" fill=\\\"black\\\" fill-opacity=\\\"0.35\\\"/>\\n</svg>\\n\"","<!--\n - SPDX-FileCopyrightText: 2018 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 provides the default container of all apps.\nIt _MUST_ be used as the main wrapper of your app.\nIt includes the Navigation, the App content and the Sidebar.\n\nIt also will set the skip content buttons needed for accessibility.\n\n### Standard usage\n\n```vue\n\t<template>\n\t\t<div id=\"skip-actions\" />\n\t\t<NcContent app-name=\"forms\">\n\t\t\t<NcAppNavigation>\n\t\t\t\t<template #list>\n\t\t\t\t\t<NcAppNavigationNew text=\"Create article\" />\n\t\t\t\t\t<NcAppNavigationItem name=\"My navigation\" title=\"My title\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<Check :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcAppNavigationItem>\n\t\t\t\t</template>\n\t\t\t</NcAppNavigation>\n\t\t\t<NcAppContent>\n\t\t\t\t<h2>Your main app content here</h2>\n\t\t\t\t<NcButton @click=\"opened = !opened\">Toggle sidebar</NcButton>\n\t\t\t</NcAppContent>\n\t\t\t<NcAppSidebar v-if=\"opened\" name=\"cat-picture.jpg\" @close=\"opened=false\">\n\t\t\t\tSidebar content\n\t\t\t</NcAppSidebar>\n\t\t</NcContent>\n\t</template>\n\t<script>\n\timport Check from 'vue-material-design-icons/Check'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tCheck,\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\topened: false,\n\t\t\t}\n\t\t}\n\t}\n\t</script>\n\t<style>\n\t\t#content-vue {\n\t\t\tposition: relative;\n\t\t\twidth: 800px;\n\t\t\theight: 400px;\n\t\t}\n\t</style>\n```\n\n</docs>\n\n<template>\n\t<div id=\"content-vue\" :class=\"['content', `app-${appName.toLowerCase()}`]\">\n\t\t<Teleport to=\"#skip-actions\">\n\t\t\t<div class=\"vue-skip-actions__container\">\n\t\t\t\t<div class=\"vue-skip-actions__headline\">\n\t\t\t\t\t{{ t('Keyboard navigation help') }}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"vue-skip-actions__buttons\">\n\t\t\t\t\t<NcButton v-show=\"hasAppNavigation\"\n\t\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\t\thref=\"#app-navigation-vue\"\n\t\t\t\t\t\t@click.prevent=\"openAppNavigation\"\n\t\t\t\t\t\t@focusin=\"currentFocus = 'navigation'\"\n\t\t\t\t\t\t@mouseover=\"currentFocus = 'navigation'\">\n\t\t\t\t\t\t{{ t('Skip to app navigation') }}\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton type=\"tertiary\"\n\t\t\t\t\t\thref=\"#app-content-vue\"\n\t\t\t\t\t\t@focusin=\"currentFocus = 'content'\"\n\t\t\t\t\t\t@mouseover=\"currentFocus = 'content'\">\n\t\t\t\t\t\t{{ t('Skip to main content') }}\n\t\t\t\t\t</NcButton>\n\t\t\t\t</div>\n\t\t\t\t<NcIconSvgWrapper v-show=\"!isMobile\"\n\t\t\t\t\tclass=\"vue-skip-actions__image\"\n\t\t\t\t\t:svg=\"currentImage\"\n\t\t\t\t\tsize=\"auto\" />\n\t\t\t</div>\n\t\t</Teleport>\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\nimport { emit } from '@nextcloud/event-bus'\nimport { useIsMobile } from '../../composables/useIsMobile/index.js'\nimport { t } from '../../l10n.js'\n\nimport NcButton from '../NcButton/NcButton.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\n\n/* eslint-disable import/no-unresolved */\nimport contentSvg from './content-selected.svg?raw'\nimport navigationSvg from './navigation-selected.svg?raw'\n/* eslint-enable import/no-unresolved */\n\nexport default {\n\tname: 'NcContent',\n\tcomponents: {\n\t\tNcButton,\n\t\tNcIconSvgWrapper,\n\t},\n\tprovide() {\n\t\treturn {\n\t\t\t'NcContent:setHasAppNavigation': this.setAppNavigation,\n\t\t\t'NcContent:selector': '#content-vue',\n\t\t}\n\t},\n\tprops: {\n\t\tappName: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tsetup() {\n\t\tconst isMobile = useIsMobile()\n\t\treturn {\n\t\t\tisMobile,\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\thasAppNavigation: false,\n\t\t\tcurrentFocus: '', // unknown\n\t\t}\n\t},\n\tcomputed: {\n\t\tcurrentImage() {\n\t\t\tif (this.currentFocus === 'navigation') {\n\t\t\t\treturn navigationSvg\n\t\t\t}\n\t\t\treturn contentSvg\n\t\t},\n\t},\n\tbeforeMount() {\n\t\tconst container = document.getElementById('skip-actions')\n\t\tif (container) {\n\t\t\t// clear default buttons\n\t\t\tcontainer.innerHTML = ''\n\t\t\t// add class for scoping styles\n\t\t\tcontainer.classList.add('vue-skip-actions')\n\t\t}\n\t},\n\tmethods: {\n\t\tt,\n\t\topenAppNavigation() {\n\t\t\temit('toggle-navigation', { open: true })\n\t\t\tthis.$nextTick(() => {\n\t\t\t\twindow.location.hash = 'app-navigation-vue'\n\t\t\t\t// we need to manually focus if the window location is already set to the app-navigation then it will not focus again\n\t\t\t\tdocument.getElementById('app-navigation-vue').focus()\n\t\t\t})\n\t\t},\n\t\tsetAppNavigation(value) {\n\t\t\tthis.hasAppNavigation = value\n\t\t\t// If app navigation is available and no focus was set yet, set it to navigation as it is the first button\n\t\t\tif (this.currentFocus === '') {\n\t\t\t\tthis.currentFocus = 'navigation'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n// Remove server stylings and add a backdrop\n#skip-actions.vue-skip-actions:focus-within {\n\ttop: 0!important;\n\tleft: 0!important;\n\twidth: 100vw;\n\theight: 100vh;\n\tpadding: var(--body-container-margin)!important;\n\tbackdrop-filter: brightness(50%);\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.vue-skip-actions {\n\t&__container {\n\t\tbackground-color: var(--color-main-background);\n\t\tborder-radius: var(--border-radius-large);\n\t\tpadding: 22px;\n\t}\n\n\t&__headline {\n\t\tfont-weight: bold;\n\t\tfont-size: 20px;\n\t\tline-height: 30px;\n\t\tmargin-bottom: 12px;\n\t}\n\n\t&__buttons {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 12px;\n\n\t\t> * {\n\t\t\t// Ensure buttons are same width on smaller screens (container wrapped)\n\t\t\tflex: 1 0 fit-content;\n\t\t}\n\t}\n\n\t&__image {\n\t\tmargin-top: 12px;\n\t}\n}\n\n.content {\n\tdisplay: flex;\n\twidth: calc(100% - var(--body-container-margin) * 2);\n\tborder-radius: var(--body-container-radius);\n\theight: var(--body-height);\n\toverflow: hidden;\n\tpadding: 0;\n\n\t&:not(.with-sidebar--full) {\n\t\tposition: fixed;\n\t}\n\n\t&,\n\t& * {\n\t\tbox-sizing: border-box;\n\t}\n}\n</style>\n"],"names":["_createElementBlock","_normalizeClass","_createBlock","_Teleport","_createElementVNode","_toDisplayString","_createVNode","_withModifiers","_withCtx","_createTextVNode","_renderSlot"],"mappings":";;;;;;;;AAAA,MAAe,aAAA;ACAf,MAAe,gBAAA;AC+Gf,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,EACA;AAAA,EACD,UAAU;AACT,WAAO;AAAA,MACN,iCAAiC,KAAK;AAAA,MACtC,sBAAsB;AAAA,IACvB;AAAA,EACA;AAAA,EACD,OAAO;AAAA,IACN,SAAS;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,IACV;AAAA,EACD;AAAA,EACD,QAAQ;AACP,UAAM,WAAW,YAAW;AAC5B,WAAO;AAAA,MACN;AAAA,IACD;AAAA,EACA;AAAA,EACD,OAAO;AACN,WAAO;AAAA,MACN,kBAAkB;AAAA,MAClB,cAAc;AAAA;AAAA,IACf;AAAA,EACA;AAAA,EACD,UAAU;AAAA,IACT,eAAe;A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AC,QA+EM,MAAiC;AAAA,cA/EvCC,gBAAAJ,gBA+ES,SAAC,EAAA,wBAAA,CAAA,GAAA,CAAA;AAAA;YA/EV,GAAA;AAAA;oBAyEuB,MAAgB,gBAAA;AAAA;UAQlCC,YAKW,qBAAA;AAAA,YALD,MAAK;AAAA,YACd,MAAK;AAAA,YACJ,iDAAS,MAAY,eAAA;AAAA,YACrB,mDAAW,MAAY,eAAA;AAAA;YApF9B,SAAAE,QAqFM,MAA+B;AAAA,cArFrCC,gBAAAJ,gBAqFS,SAAC,EAAA,sBAAA,CAAA,GAAA,CAAA;AAAA;YArFV,GAAA;AAAA;;uBAwFIC,YAGe,6BAAA;AAAA,UAFd,OAAM;AAAA,UACL,KAAK,SAAY;AAAA,UAClB,MAAK;AAAA;mBAHqB,OAAQ,QAAA;AAAA;;;IAMrCI,WAAQ,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"NcContent-BcF6f3N-.mjs","sources":["../../src/components/NcContent/content-selected.svg?raw","../../src/components/NcContent/navigation-selected.svg?raw","../../src/components/NcContent/NcContent.vue"],"sourcesContent":["export default \"<!--\\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\\n - SPDX-License-Identifier: AGPL-3.0-or-later\\n-->\\n<svg width=\\\"395\\\" height=\\\"314\\\" viewBox=\\\"0 0 395 314\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<rect width=\\\"395\\\" height=\\\"314\\\" rx=\\\"11\\\" fill=\\\"#439DCD\\\"/>\\n<rect x=\\\"13\\\" y=\\\"51\\\" width=\\\"366\\\" height=\\\"248\\\" rx=\\\"8\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"22\\\" y=\\\"111\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"127\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"63\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"191\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"143\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"79\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"159\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"95\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"175\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<path d=\\\"M288 145C277.56 147.8 265.32 149 254 149C242.68 149 230.44 147.8 220 145L218 153C225.44 155 234 156.32 242 157V209H250V185H258V209H266V157C274 156.32 282.56 155 290 153L288 145ZM254 145C258.4 145 262 141.4 262 137C262 132.6 258.4 129 254 129C249.6 129 246 132.6 246 137C246 141.4 249.6 145 254 145Z\\\" fill=\\\"#DEDEDE\\\"/>\\n<path d=\\\"M43.5358 13C38.6641 13 34.535 16.2415 33.2552 20.6333C32.143 18.3038 29.7327 16.6718 26.9564 16.6718C23.1385 16.6718 20 19.7521 20 23.4993C20 27.2465 23.1385 30.3282 26.9564 30.3282C29.7327 30.3282 32.1429 28.6952 33.2552 26.3653C34.535 30.7575 38.6641 34 43.5358 34C48.3715 34 52.4796 30.8064 53.7921 26.4637C54.9249 28.7407 57.3053 30.3282 60.0421 30.3282C63.8601 30.3282 67 27.2465 67 23.4993C67 19.7521 63.8601 16.6718 60.0421 16.6718C57.3053 16.6718 54.9249 18.2583 53.7921 20.5349C52.4796 16.1926 48.3715 13 43.5358 13ZM43.5358 17.0079C47.2134 17.0079 50.1512 19.8899 50.1512 23.4993C50.1512 27.1087 47.2134 29.9921 43.5358 29.9921C39.8583 29.9921 36.9218 27.1087 36.9218 23.4993C36.9218 19.8899 39.8583 17.0079 43.5358 17.0079ZM26.9564 20.6797C28.5677 20.6797 29.8307 21.9179 29.8307 23.4993C29.8307 25.0807 28.5677 26.3203 26.9564 26.3203C25.3452 26.3203 24.0836 25.0807 24.0836 23.4993C24.0836 21.9179 25.3452 20.6797 26.9564 20.6797ZM60.0421 20.6797C61.6534 20.6797 62.9164 21.9179 62.9164 23.4993C62.9164 25.0807 61.6534 26.3203 60.0421 26.3203C58.4309 26.3203 57.1693 25.0807 57.1693 23.4993C57.1693 21.9179 58.4309 20.6797 60.0421 20.6797Z\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"79\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"99\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"119\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"139\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"159\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"179\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M12 0C5.37258 0 0 5.37259 0 12V302C0 308.627 5.37259 314 12 314H383C389.627 314 395 308.627 395 302V12C395 5.37258 389.627 0 383 0H12ZM140 44C132.268 44 126 50.268 126 58V292C126 299.732 132.268 306 140 306H372C379.732 306 386 299.732 386 292V58C386 50.268 379.732 44 372 44H140Z\\\" fill=\\\"black\\\" fill-opacity=\\\"0.35\\\"/>\\n</svg>\\n\"","export default \"<!--\\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\\n - SPDX-License-Identifier: AGPL-3.0-or-later\\n-->\\n<svg width=\\\"395\\\" height=\\\"314\\\" viewBox=\\\"0 0 395 314\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<rect width=\\\"395\\\" height=\\\"314\\\" rx=\\\"11\\\" fill=\\\"#439DCD\\\"/>\\n<rect x=\\\"13\\\" y=\\\"51\\\" width=\\\"366\\\" height=\\\"248\\\" rx=\\\"8\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"22\\\" y=\\\"111\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"127\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"63\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"191\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"143\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"79\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"159\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"95\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<rect x=\\\"22\\\" y=\\\"175\\\" width=\\\"92\\\" height=\\\"12\\\" rx=\\\"6\\\" fill=\\\"#DEDEDE\\\"/>\\n<path d=\\\"M288 145C277.56 147.8 265.32 149 254 149C242.68 149 230.44 147.8 220 145L218 153C225.44 155 234 156.32 242 157V209H250V185H258V209H266V157C274 156.32 282.56 155 290 153L288 145ZM254 145C258.4 145 262 141.4 262 137C262 132.6 258.4 129 254 129C249.6 129 246 132.6 246 137C246 141.4 249.6 145 254 145Z\\\" fill=\\\"#DEDEDE\\\"/>\\n<path d=\\\"M43.5358 13C38.6641 13 34.535 16.2415 33.2552 20.6333C32.143 18.3038 29.7327 16.6718 26.9564 16.6718C23.1385 16.6718 20 19.7521 20 23.4993C20 27.2465 23.1385 30.3282 26.9564 30.3282C29.7327 30.3282 32.1429 28.6952 33.2552 26.3653C34.535 30.7575 38.6641 34 43.5358 34C48.3715 34 52.4796 30.8064 53.7921 26.4637C54.9249 28.7407 57.3053 30.3282 60.0421 30.3282C63.8601 30.3282 67 27.2465 67 23.4993C67 19.7521 63.8601 16.6718 60.0421 16.6718C57.3053 16.6718 54.9249 18.2583 53.7921 20.5349C52.4796 16.1926 48.3715 13 43.5358 13ZM43.5358 17.0079C47.2134 17.0079 50.1512 19.8899 50.1512 23.4993C50.1512 27.1087 47.2134 29.9921 43.5358 29.9921C39.8583 29.9921 36.9218 27.1087 36.9218 23.4993C36.9218 19.8899 39.8583 17.0079 43.5358 17.0079ZM26.9564 20.6797C28.5677 20.6797 29.8307 21.9179 29.8307 23.4993C29.8307 25.0807 28.5677 26.3203 26.9564 26.3203C25.3452 26.3203 24.0836 25.0807 24.0836 23.4993C24.0836 21.9179 25.3452 20.6797 26.9564 20.6797ZM60.0421 20.6797C61.6534 20.6797 62.9164 21.9179 62.9164 23.4993C62.9164 25.0807 61.6534 26.3203 60.0421 26.3203C58.4309 26.3203 57.1693 25.0807 57.1693 23.4993C57.1693 21.9179 58.4309 20.6797 60.0421 20.6797Z\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"79\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"99\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"119\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"139\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"159\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<rect x=\\\"179\\\" y=\\\"20\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"4\\\" fill=\\\"white\\\"/>\\n<path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M12 0C5.37258 0 0 5.37259 0 12V302C0 308.627 5.37259 314 12 314H383C389.627 314 395 308.627 395 302V12C395 5.37258 389.627 0 383 0H12ZM112 44C119.732 44 126 50.268 126 58V292C126 299.732 119.732 306 112 306H20C12.268 306 6 299.732 6 292V58C6 50.268 12.268 44 20 44H112Z\\\" fill=\\\"black\\\" fill-opacity=\\\"0.35\\\"/>\\n</svg>\\n\"","<!--\n - SPDX-FileCopyrightText: 2018 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 provides the default container of all apps.\nIt _MUST_ be used as the main wrapper of your app.\nIt includes the Navigation, the App content and the Sidebar.\n\nIt also will set the skip content buttons needed for accessibility.\n\n### Standard usage\n\n```vue\n\t<template>\n\t\t<div id=\"skip-actions\" />\n\t\t<NcContent app-name=\"forms\">\n\t\t\t<NcAppNavigation>\n\t\t\t\t<template #list>\n\t\t\t\t\t<NcAppNavigationNew text=\"Create article\" />\n\t\t\t\t\t<NcAppNavigationItem name=\"My navigation\" title=\"My title\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<Check :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcAppNavigationItem>\n\t\t\t\t</template>\n\t\t\t</NcAppNavigation>\n\t\t\t<NcAppContent>\n\t\t\t\t<h2>Your main app content here</h2>\n\t\t\t\t<NcButton @click=\"opened = !opened\">Toggle sidebar</NcButton>\n\t\t\t</NcAppContent>\n\t\t\t<NcAppSidebar v-if=\"opened\" name=\"cat-picture.jpg\" @close=\"opened=false\">\n\t\t\t\tSidebar content\n\t\t\t</NcAppSidebar>\n\t\t</NcContent>\n\t</template>\n\t<script>\n\timport Check from 'vue-material-design-icons/Check'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tCheck,\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\topened: false,\n\t\t\t}\n\t\t}\n\t}\n\t</script>\n\t<style>\n\t\t#content-vue {\n\t\t\tposition: relative;\n\t\t\twidth: 800px;\n\t\t\theight: 400px;\n\t\t}\n\t</style>\n```\n\n</docs>\n\n<template>\n\t<div id=\"content-vue\" :class=\"['content', `app-${appName.toLowerCase()}`]\">\n\t\t<Teleport to=\"#skip-actions\">\n\t\t\t<div class=\"vue-skip-actions__container\">\n\t\t\t\t<div class=\"vue-skip-actions__headline\">\n\t\t\t\t\t{{ t('Keyboard navigation help') }}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"vue-skip-actions__buttons\">\n\t\t\t\t\t<NcButton v-show=\"hasAppNavigation\"\n\t\t\t\t\t\thref=\"#app-navigation-vue\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click.prevent=\"openAppNavigation\"\n\t\t\t\t\t\t@focusin=\"currentFocus = 'navigation'\"\n\t\t\t\t\t\t@mouseover=\"currentFocus = 'navigation'\">\n\t\t\t\t\t\t{{ t('Skip to app navigation') }}\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton href=\"#app-content-vue\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@focusin=\"currentFocus = 'content'\"\n\t\t\t\t\t\t@mouseover=\"currentFocus = 'content'\">\n\t\t\t\t\t\t{{ t('Skip to main content') }}\n\t\t\t\t\t</NcButton>\n\t\t\t\t</div>\n\t\t\t\t<NcIconSvgWrapper v-show=\"!isMobile\"\n\t\t\t\t\tclass=\"vue-skip-actions__image\"\n\t\t\t\t\t:svg=\"currentImage\"\n\t\t\t\t\tsize=\"auto\" />\n\t\t\t</div>\n\t\t</Teleport>\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\nimport { emit } from '@nextcloud/event-bus'\nimport { useIsMobile } from '../../composables/useIsMobile/index.js'\nimport { t } from '../../l10n.js'\n\nimport NcButton from '../NcButton/NcButton.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\n\n/* eslint-disable import/no-unresolved */\nimport contentSvg from './content-selected.svg?raw'\nimport navigationSvg from './navigation-selected.svg?raw'\n/* eslint-enable import/no-unresolved */\n\nexport default {\n\tname: 'NcContent',\n\tcomponents: {\n\t\tNcButton,\n\t\tNcIconSvgWrapper,\n\t},\n\tprovide() {\n\t\treturn {\n\t\t\t'NcContent:setHasAppNavigation': this.setAppNavigation,\n\t\t\t'NcContent:selector': '#content-vue',\n\t\t}\n\t},\n\tprops: {\n\t\tappName: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tsetup() {\n\t\tconst isMobile = useIsMobile()\n\t\treturn {\n\t\t\tisMobile,\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\thasAppNavigation: false,\n\t\t\tcurrentFocus: '', // unknown\n\t\t}\n\t},\n\tcomputed: {\n\t\tcurrentImage() {\n\t\t\tif (this.currentFocus === 'navigation') {\n\t\t\t\treturn navigationSvg\n\t\t\t}\n\t\t\treturn contentSvg\n\t\t},\n\t},\n\tbeforeMount() {\n\t\tconst container = document.getElementById('skip-actions')\n\t\tif (container) {\n\t\t\t// clear default buttons\n\t\t\tcontainer.innerHTML = ''\n\t\t\t// add class for scoping styles\n\t\t\tcontainer.classList.add('vue-skip-actions')\n\t\t}\n\t},\n\tmethods: {\n\t\tt,\n\t\topenAppNavigation() {\n\t\t\temit('toggle-navigation', { open: true })\n\t\t\tthis.$nextTick(() => {\n\t\t\t\twindow.location.hash = 'app-navigation-vue'\n\t\t\t\t// we need to manually focus if the window location is already set to the app-navigation then it will not focus again\n\t\t\t\tdocument.getElementById('app-navigation-vue').focus()\n\t\t\t})\n\t\t},\n\t\tsetAppNavigation(value) {\n\t\t\tthis.hasAppNavigation = value\n\t\t\t// If app navigation is available and no focus was set yet, set it to navigation as it is the first button\n\t\t\tif (this.currentFocus === '') {\n\t\t\t\tthis.currentFocus = 'navigation'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n// Remove server stylings and add a backdrop\n#skip-actions.vue-skip-actions:focus-within {\n\ttop: 0!important;\n\tinset-inline-start: 0!important;\n\twidth: 100vw;\n\theight: 100vh;\n\tpadding: var(--body-container-margin)!important;\n\tbackdrop-filter: brightness(50%);\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.vue-skip-actions {\n\t&__container {\n\t\tbackground-color: var(--color-main-background);\n\t\tborder-radius: var(--border-radius-large);\n\t\tpadding: 22px;\n\t}\n\n\t&__headline {\n\t\tfont-weight: bold;\n\t\tfont-size: 20px;\n\t\tline-height: 30px;\n\t\tmargin-bottom: 12px;\n\t}\n\n\t&__buttons {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 12px;\n\n\t\t> * {\n\t\t\t// Ensure buttons are same width on smaller screens (container wrapped)\n\t\t\tflex: 1 0 fit-content;\n\t\t}\n\t}\n\n\t&__image {\n\t\tmargin-top: 12px;\n\t}\n}\n\n.content {\n\tdisplay: flex;\n\twidth: calc(100% - var(--body-container-margin) * 2);\n\tborder-radius: var(--body-container-radius);\n\theight: var(--body-height);\n\toverflow: hidden;\n\tpadding: 0;\n\n\t&:not(.with-sidebar--full) {\n\t\tposition: fixed;\n\t}\n\n\t&,\n\t& * {\n\t\tbox-sizing: border-box;\n\t}\n}\n</style>\n"],"names":["_createElementBlock","_normalizeClass","_createBlock","_Teleport","_createElementVNode","_toDisplayString","_createVNode","_withModifiers","_withCtx","_createTextVNode","_renderSlot"],"mappings":";;;;;;;;AAAA,MAAe,aAAA;ACAf,MAAe,gBAAA;AC+Gf,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,EACA;AAAA,EACD,UAAU;AACT,WAAO;AAAA,MACN,iCAAiC,KAAK;AAAA,MACtC,sBAAsB;AAAA,IACvB;AAAA,EACA;AAAA,EACD,OAAO;AAAA,IACN,SAAS;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,IACV;AAAA,EACD;AAAA,EACD,QAAQ;AACP,UAAM,WAAW,YAAW;AAC5B,WAAO;AAAA,MACN;AAAA,IACD;AAAA,EACA;AAAA,EACD,OAAO;AACN,WAAO;AAAA,MACN,kBAAkB;AAAA,MAClB,cAAc;AAAA;AAAA,IACf;AAAA,EACA;AAAA,EACD,UAAU;AAAA,IACT,eAAe;AACd,UAAI,KAAK,iBAAiB,cAAc;AACvC,eAAO;AAAA,MACR;AACA,aAAO;AAAA,IACP;AAAA,EACD;AAAA,EACD,cAAc;AACb,UAAM,YAAY,SAAS,eAAe,cAAc;AACxD,QAAI,WAAW;AAEd,gBAAU,YAAY;AAEtB,gBAAU,UAAU,IAAI,kBAAkB;AA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iDAAS,MAAY,eAAA;AAAA,YACrB,mDAAW,MAAY,eAAA;AAAA;YApF9B,SAAAE,QAqFM,MAA+B;AAAA,cArFrCC,gBAAAJ,gBAqFS,SAAC,EAAA,sBAAA,CAAA,GAAA,CAAA;AAAA;YArFV,GAAA;AAAA;;uBAwFIC,YAGe,6BAAA;AAAA,UAFd,OAAM;AAAA,UACL,KAAK,SAAY;AAAA,UAClB,MAAK;AAAA;mBAHqB,OAAQ,QAAA;AAAA;;;IAMrCI,WAAQ,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import '../assets/NcDashboardWidget-
|
|
2
|
-
import { N as NcAvatar } from "./NcAvatar-
|
|
3
|
-
import { N as NcDashboardWidgetItem } from "./NcDashboardWidgetItem-
|
|
4
|
-
import { N as NcEmptyContent } from "./NcEmptyContent-
|
|
1
|
+
import '../assets/NcDashboardWidget-xV4o6Cen.css';
|
|
2
|
+
import { N as NcAvatar } from "./NcAvatar-CA8y4d-c.mjs";
|
|
3
|
+
import { N as NcDashboardWidgetItem } from "./NcDashboardWidgetItem-7RXY5EKJ.mjs";
|
|
4
|
+
import { N as NcEmptyContent } from "./NcEmptyContent-BQnIrQQn.mjs";
|
|
5
5
|
import { C as Check } from "./Check-5i4xKnkl.mjs";
|
|
6
|
-
import { r as register, j as
|
|
6
|
+
import { r as register, j as t33, a as t } from "./_l10n-7kR7gXFc.mjs";
|
|
7
7
|
import { resolveComponent, createElementBlock, openBlock, createBlock, createCommentVNode, createElementVNode, renderSlot, withCtx, createVNode, Fragment, renderList, mergeProps, toHandlers, toDisplayString } from "vue";
|
|
8
8
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
9
|
-
register(
|
|
9
|
+
register(t33);
|
|
10
10
|
const _sfc_main = {
|
|
11
11
|
name: "NcDashboardWidget",
|
|
12
12
|
components: {
|
|
@@ -178,7 +178,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
178
178
|
}, toDisplayString($props.showMoreLabel), 9, _hoisted_3)) : createCommentVNode("", true)
|
|
179
179
|
]);
|
|
180
180
|
}
|
|
181
|
-
const NcDashboardWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
181
|
+
const NcDashboardWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b90e2ba7"]]);
|
|
182
182
|
export {
|
|
183
183
|
NcDashboardWidget as N
|
|
184
184
|
};
|
|
185
|
+
//# sourceMappingURL=NcDashboardWidget-1rVqTzgV.mjs.map
|
package/dist/chunks/{NcDashboardWidget-ROT13m5A.mjs.map → NcDashboardWidget-1rVqTzgV.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDashboardWidget-ROT13m5A.mjs","sources":["../../src/components/NcDashboardWidget/NcDashboardWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n## Usage\n\n### Simplest example with custom item\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Showing items and a half empty content message\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-items-and-empty-content=\"true\"\n\t\t:half-empty-content-message=\"'No unread items'\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Complete example using NcDashboardWidgetItem\n\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-more-url=\"'https://nextcloud.com'\"\n\t\t:item-menu=\"itemMenu\"\n\t\t@hide=\"onHide\"\n\t\t@markDone=\"onMarkDone\">\n\n\t\t<template #empty-content>\n\t\t\tNothing to display\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tid: '1',\n\t\ttargetUrl: 'https://target.org',\n\t\tavatarUrl: 'https://avatar.url/img.png',\n\t\tavatarUsername: 'Robert',\n\t\tavatarIsNoUser: true,\n\t\toverlayIconUrl: '/svg/core/actions/sound?color=000',\n\t\tmainText: 'First item text',\n\t\tsubText: 'First item subtext',\n\t},\n\t{\n\t\tid: '2',\n\t\ttargetUrl: 'https://other-target.org',\n\t\tavatarUrl: 'https://other-avatar.url/img.png',\n\t\toverlayIconUrl: '/svg/core/actions/add?color=000',\n\t\tmainText: 'Second item text',\n\t\tsubText: 'Second item subtext',\n\t},\n]\nconst myItemMenu = {\n\t// triggers an event named \"markDone\" when clicked\n\t'markDone': {\n\t\ttext: 'Mark as done',\n\t\ticon: 'icon-checkmark',\n\t},\n\t// triggers an event named \"hide\" when clicked\n\t'hide': {\n\t\ttext: 'Hide',\n\t\ticon: 'icon-toggle',\n\t},\n}\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems,\n\t\t\titemMenu: myItemMenu,\n\t\t\tloading: true,\n\t\t}\n\t},\n\tmethods: {\n\t\tonMoreClick() {\n\t\t\tconsole.log('more clicked')\n\t\t\tconst win = window.open('https://wherever.you.want', '_blank')\n\t\t\twin.focus()\n\t\t},\n\t\tonHide(item) {\n\t\t\tconsole.log('user wants to hide item ' + item.id)\n\t\t\t// do what you want\n\t\t},\n\t\tonMarkDone(item) {\n\t\t\tconsole.log('user wants to mark item ' + item.id + ' as done')\n\t\t\t// do what you want\n\t\t},\n\t},\n}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"dashboard-widget\">\n\t\t<!-- This element is shown if we have items, but want to show a general message as well.\n\t\tCan be used e.g. to show \"No mentions\" on top of the item list. -->\n\t\t<NcEmptyContent v-if=\"showHalfEmptyContentArea\"\n\t\t\t:description=\"halfEmptyContentString\"\n\t\t\tclass=\"half-screen\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot The icon to show in the half empty content area. -->\n\t\t\t\t<slot name=\"halfEmptyContentIcon\">\n\t\t\t\t\t<Check />\n\t\t\t\t</slot>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\t\t<!-- The list of items to show. -->\n\t\t<ul>\n\t\t\t<li v-for=\"item in displayedItems\" :key=\"item.id\">\n\t\t\t\t<!-- @slot The default slot can be optionally overridden. It contains the template of one item. -->\n\t\t\t\t<slot name=\"default\" :item=\"item\">\n\t\t\t\t\t<NcDashboardWidgetItem v-bind=\"item\"\n\t\t\t\t\t\t:item-menu=\"itemMenu\"\n\t\t\t\t\t\tv-on=\"handlers\" />\n\t\t\t\t</slot>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- While the widget is loading, we show a list of placeholder items. -->\n\t\t<div v-if=\"loading\">\n\t\t\t<div v-for=\"i in 7\" :key=\"i\" class=\"item-list__entry\">\n\t\t\t\t<NcAvatar class=\"item-avatar\" :size=\"44\" />\n\t\t\t\t<div class=\"item__details\">\n\t\t\t\t\t<h3> </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 v-if=\"emptyContentMessage\"\n\t\t\t\t:description=\"emptyContentMessage\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<!-- @slot The icon to show in the empty content area. -->\n\t\t\t\t\t<slot name=\"emptyContentIcon\" />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</slot>\n\t\t<!-- A \"show more\" link, e.g. to navigate to the main app belonging to this widget. -->\n\t\t<a v-else-if=\"showMore\"\n\t\t\t:href=\"showMoreUrl\"\n\t\t\ttarget=\"_blank\"\n\t\t\tclass=\"more\"\n\t\t\ttabindex=\"0\">\n\t\t\t{{ showMoreLabel }}\n\t\t</a>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcDashboardWidgetItem from '../NcDashboardWidgetItem/index.js'\nimport NcEmptyContent from '../NcEmptyContent/index.js'\n\nimport Check from 'vue-material-design-icons/Check.vue'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcDashboardWidget',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcDashboardWidgetItem,\n\t\tNcEmptyContent,\n\t\tCheck,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * An array containing the items to show (specific structure must be respected,\n\t\t * except if you override item rendering in the default slot).\n\t\t */\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => { return [] },\n\t\t},\n\t\t/**\n\t\t * If this is set, a \"show more\" text is displayed on the widget's bottom.\n\t\t * It's a link pointing to this URL.\n\t\t */\n\t\tshowMoreUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text of show more button.\n\t\t *\n\t\t * Expected to be in the form \"More {itemName} …\"\n\t\t */\n\t\tshowMoreLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('More items …'),\n\t\t},\n\t\t/**\n\t\t * A boolean to put the widget in a loading state.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each item.\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\t\t/**\n\t\t * Whether both the items and the empty content message are shown.\n\t\t * Usefull for e.g. showing \"No mentions\" and a list of elements.\n\t\t */\n\t\tshowItemsAndEmptyContent: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * The text to show in the empty content area.\n\t\t */\n\t\temptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text to show in the half empty content area.\n\t\t */\n\t\thalfEmptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t// forward menu events to my parent\n\t\thandlers() {\n\t\t\tconst h = {}\n\t\t\tfor (const evName in this.itemMenu) {\n\t\t\t\th[evName] = (it) => {\n\t\t\t\t\tthis.$emit(evName, it)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn h\n\t\t},\n\t\tdisplayedItems() {\n\t\t\tconst nbItems = (this.showMoreUrl && this.items.length >= this.maxItemNumber)\n\t\t\t\t? this.maxItemNumber - 1\n\t\t\t\t: this.maxItemNumber\n\t\t\treturn this.items.slice(0, nbItems)\n\t\t},\n\n\t\tshowHalfEmptyContentArea() {\n\t\t\treturn this.showItemsAndEmptyContent && this.halfEmptyContentString && this.items.length !== 0\n\t\t},\n\n\t\thalfEmptyContentString() {\n\t\t\treturn this.halfEmptyContentMessage || this.emptyContentMessage\n\t\t},\n\n\t\tmaxItemNumber() {\n\t\t\treturn this.showItemsAndEmptyContent ? 5 : 7\n\t\t},\n\n\t\tshowMore() {\n\t\t\treturn this.showMoreUrl && this.items.length >= this.maxItemNumber\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.dashboard-widget :deep(.empty-content) {\n\ttext-align: center;\n\tpadding-top: 5vh;\n\t&.half-screen {\n\t\tpadding-top: 0;\n\t\tmargin-bottom: 1vh;\n\t}\n}\n\n.more {\n\tdisplay: block;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: 60px;\n\tcursor: pointer;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t\tcolor: var(--color-main-text);\n\t}\n}\n\n/* skeleton */\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tpadding: 8px;\n\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-top: auto;\n\t\tmargin-bottom: auto;\n\t\tbackground-color: var(--color-background-dark) !important;\n\t}\n\t.item__details {\n\t\tpadding-left: 8px;\n\t\tmax-height: var(--default-clickable-area);\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 80%;\n\t\t\theight: 15px;\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createBlock","_renderSlot","_createVNode","_createCommentVNode","_createElementVNode","_Fragment","_renderList","_mergeProps","_toHandlers","_toDisplayString"],"mappings":";;;;;;;;AA+NA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKN,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS,M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,YAAX,GAAM;AAAA,YACVA,mBAEI,KAFD,EAAA,OAAM,aAAU,KAEnB;AAAA;;;UAKc,OAAA,MAAM,WAAM,IAA7BH,WAQO,KAAA,QAAA,iBAAA,EA1MT,KAAA,EAAA,GAkME,MAQO;AAAA,MAPgB,OAAmB,oCAAzCD,YAMiB,2BAAA;AAAA,QAzMpB,KAAA;AAAA,QAoMK,aAAa,OAAmB;AAAA;QACtB,cAEV,MAAgC;AAAA,UAAhCC,WAAgC,KAAA,QAAA,oBAAA,CAAA,GAAA,QAAA,IAAA;AAAA;QAvMrC,GAAA;AAAA,gCAAAE,mBAAA,IAAA,IAAA;AAAA,eA4MgB,SAAQ,yBAAtBJ,mBAMI,KAAA;AAAA,MAlNN,KAAA;AAAA,MA6MI,MAAM,OAAW;AAAA,MAClB,QAAO;AAAA,MACP,OAAM;AAAA,MACN,UAAS;AAAA,IACN,GAAAU,gBAAA,OAAA,aAAa,GAjNnB,GAAA,UAAA,KAAAN,mBAAA,IAAA,IAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"NcDashboardWidget-1rVqTzgV.mjs","sources":["../../src/components/NcDashboardWidget/NcDashboardWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n## Usage\n\n### Simplest example with custom item\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Showing items and a half empty content message\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-items-and-empty-content=\"true\"\n\t\t:half-empty-content-message=\"'No unread items'\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Complete example using NcDashboardWidgetItem\n\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-more-url=\"'https://nextcloud.com'\"\n\t\t:item-menu=\"itemMenu\"\n\t\t@hide=\"onHide\"\n\t\t@markDone=\"onMarkDone\">\n\n\t\t<template #empty-content>\n\t\t\tNothing to display\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tid: '1',\n\t\ttargetUrl: 'https://target.org',\n\t\tavatarUrl: 'https://avatar.url/img.png',\n\t\tavatarUsername: 'Robert',\n\t\tavatarIsNoUser: true,\n\t\toverlayIconUrl: '/svg/core/actions/sound?color=000',\n\t\tmainText: 'First item text',\n\t\tsubText: 'First item subtext',\n\t},\n\t{\n\t\tid: '2',\n\t\ttargetUrl: 'https://other-target.org',\n\t\tavatarUrl: 'https://other-avatar.url/img.png',\n\t\toverlayIconUrl: '/svg/core/actions/add?color=000',\n\t\tmainText: 'Second item text',\n\t\tsubText: 'Second item subtext',\n\t},\n]\nconst myItemMenu = {\n\t// triggers an event named \"markDone\" when clicked\n\t'markDone': {\n\t\ttext: 'Mark as done',\n\t\ticon: 'icon-checkmark',\n\t},\n\t// triggers an event named \"hide\" when clicked\n\t'hide': {\n\t\ttext: 'Hide',\n\t\ticon: 'icon-toggle',\n\t},\n}\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems,\n\t\t\titemMenu: myItemMenu,\n\t\t\tloading: true,\n\t\t}\n\t},\n\tmethods: {\n\t\tonMoreClick() {\n\t\t\tconsole.log('more clicked')\n\t\t\tconst win = window.open('https://wherever.you.want', '_blank')\n\t\t\twin.focus()\n\t\t},\n\t\tonHide(item) {\n\t\t\tconsole.log('user wants to hide item ' + item.id)\n\t\t\t// do what you want\n\t\t},\n\t\tonMarkDone(item) {\n\t\t\tconsole.log('user wants to mark item ' + item.id + ' as done')\n\t\t\t// do what you want\n\t\t},\n\t},\n}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"dashboard-widget\">\n\t\t<!-- This element is shown if we have items, but want to show a general message as well.\n\t\tCan be used e.g. to show \"No mentions\" on top of the item list. -->\n\t\t<NcEmptyContent v-if=\"showHalfEmptyContentArea\"\n\t\t\t:description=\"halfEmptyContentString\"\n\t\t\tclass=\"half-screen\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot The icon to show in the half empty content area. -->\n\t\t\t\t<slot name=\"halfEmptyContentIcon\">\n\t\t\t\t\t<Check />\n\t\t\t\t</slot>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\t\t<!-- The list of items to show. -->\n\t\t<ul>\n\t\t\t<li v-for=\"item in displayedItems\" :key=\"item.id\">\n\t\t\t\t<!-- @slot The default slot can be optionally overridden. It contains the template of one item. -->\n\t\t\t\t<slot name=\"default\" :item=\"item\">\n\t\t\t\t\t<NcDashboardWidgetItem v-bind=\"item\"\n\t\t\t\t\t\t:item-menu=\"itemMenu\"\n\t\t\t\t\t\tv-on=\"handlers\" />\n\t\t\t\t</slot>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- While the widget is loading, we show a list of placeholder items. -->\n\t\t<div v-if=\"loading\">\n\t\t\t<div v-for=\"i in 7\" :key=\"i\" class=\"item-list__entry\">\n\t\t\t\t<NcAvatar class=\"item-avatar\" :size=\"44\" />\n\t\t\t\t<div class=\"item__details\">\n\t\t\t\t\t<h3> </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 v-if=\"emptyContentMessage\"\n\t\t\t\t:description=\"emptyContentMessage\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<!-- @slot The icon to show in the empty content area. -->\n\t\t\t\t\t<slot name=\"emptyContentIcon\" />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</slot>\n\t\t<!-- A \"show more\" link, e.g. to navigate to the main app belonging to this widget. -->\n\t\t<a v-else-if=\"showMore\"\n\t\t\t:href=\"showMoreUrl\"\n\t\t\ttarget=\"_blank\"\n\t\t\tclass=\"more\"\n\t\t\ttabindex=\"0\">\n\t\t\t{{ showMoreLabel }}\n\t\t</a>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcDashboardWidgetItem from '../NcDashboardWidgetItem/index.js'\nimport NcEmptyContent from '../NcEmptyContent/index.js'\n\nimport Check from 'vue-material-design-icons/Check.vue'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcDashboardWidget',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcDashboardWidgetItem,\n\t\tNcEmptyContent,\n\t\tCheck,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * An array containing the items to show (specific structure must be respected,\n\t\t * except if you override item rendering in the default slot).\n\t\t */\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => { return [] },\n\t\t},\n\t\t/**\n\t\t * If this is set, a \"show more\" text is displayed on the widget's bottom.\n\t\t * It's a link pointing to this URL.\n\t\t */\n\t\tshowMoreUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text of show more button.\n\t\t *\n\t\t * Expected to be in the form \"More {itemName} …\"\n\t\t */\n\t\tshowMoreLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('More items …'),\n\t\t},\n\t\t/**\n\t\t * A boolean to put the widget in a loading state.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each item.\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\t\t/**\n\t\t * Whether both the items and the empty content message are shown.\n\t\t * Usefull for e.g. showing \"No mentions\" and a list of elements.\n\t\t */\n\t\tshowItemsAndEmptyContent: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * The text to show in the empty content area.\n\t\t */\n\t\temptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text to show in the half empty content area.\n\t\t */\n\t\thalfEmptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t// forward menu events to my parent\n\t\thandlers() {\n\t\t\tconst h = {}\n\t\t\tfor (const evName in this.itemMenu) {\n\t\t\t\th[evName] = (it) => {\n\t\t\t\t\tthis.$emit(evName, it)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn h\n\t\t},\n\t\tdisplayedItems() {\n\t\t\tconst nbItems = (this.showMoreUrl && this.items.length >= this.maxItemNumber)\n\t\t\t\t? this.maxItemNumber - 1\n\t\t\t\t: this.maxItemNumber\n\t\t\treturn this.items.slice(0, nbItems)\n\t\t},\n\n\t\tshowHalfEmptyContentArea() {\n\t\t\treturn this.showItemsAndEmptyContent && this.halfEmptyContentString && this.items.length !== 0\n\t\t},\n\n\t\thalfEmptyContentString() {\n\t\t\treturn this.halfEmptyContentMessage || this.emptyContentMessage\n\t\t},\n\n\t\tmaxItemNumber() {\n\t\t\treturn this.showItemsAndEmptyContent ? 5 : 7\n\t\t},\n\n\t\tshowMore() {\n\t\t\treturn this.showMoreUrl && this.items.length >= this.maxItemNumber\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.dashboard-widget :deep(.empty-content) {\n\ttext-align: center;\n\tpadding-top: 5vh;\n\t&.half-screen {\n\t\tpadding-top: 0;\n\t\tmargin-bottom: 1vh;\n\t}\n}\n\n.more {\n\tdisplay: block;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: 60px;\n\tcursor: pointer;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t\tcolor: var(--color-main-text);\n\t}\n}\n\n/* skeleton */\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tpadding: 8px;\n\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-block: auto;\n\t\tbackground-color: var(--color-background-dark) !important;\n\t}\n\t.item__details {\n\t\tpadding-inline-start: 8px;\n\t\tmax-height: var(--default-clickable-area);\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 80%;\n\t\t\theight: 15px;\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createBlock","_renderSlot","_createVNode","_createCommentVNode","_createElementVNode","_Fragment","_renderList","_mergeProps","_toHandlers","_toDisplayString"],"mappings":";;;;;;;;AA+NA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AA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C,OAAM;AAAA,YAAe,MAAM;AAAA;oCACrCE,mBAKM,OAAA,EALD,OAAM,mBAAe;AAAA,YACzBA,mBAAe,YAAX,GAAM;AAAA,YACVA,mBAEI,KAFD,EAAA,OAAM,aAAU,KAEnB;AAAA;;;UAKc,OAAA,MAAM,WAAM,IAA7BH,WAQO,KAAA,QAAA,iBAAA,EA1MT,KAAA,EAAA,GAkME,MAQO;AAAA,MAPgB,OAAmB,oCAAzCD,YAMiB,2BAAA;AAAA,QAzMpB,KAAA;AAAA,QAoMK,aAAa,OAAmB;AAAA;QACtB,cAEV,MAAgC;AAAA,UAAhCC,WAAgC,KAAA,QAAA,oBAAA,CAAA,GAAA,QAAA,IAAA;AAAA;QAvMrC,GAAA;AAAA,gCAAAE,mBAAA,IAAA,IAAA;AAAA,eA4MgB,SAAQ,yBAAtBJ,mBAMI,KAAA;AAAA,MAlNN,KAAA;AAAA,MA6MI,MAAM,OAAW;AAAA,MAClB,QAAO;AAAA,MACP,OAAM;AAAA,MACN,UAAS;AAAA,IACN,GAAAU,gBAAA,OAAA,aAAa,GAjNnB,GAAA,UAAA,KAAAN,mBAAA,IAAA,IAAA;AAAA;;;"}
|
package/dist/chunks/{NcDashboardWidgetItem-DoYOYxck.mjs → NcDashboardWidgetItem-7RXY5EKJ.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assets/NcDashboardWidgetItem-B8_6-_k8.css';
|
|
2
|
-
import { N as NcAvatar } from "./NcAvatar-
|
|
3
|
-
import { N as NcActions } from "./NcActions-
|
|
4
|
-
import { N as NcActionButton } from "./NcActionButton-
|
|
2
|
+
import { N as NcAvatar } from "./NcAvatar-CA8y4d-c.mjs";
|
|
3
|
+
import { N as NcActions } from "./NcActions-CgKHXNbF.mjs";
|
|
4
|
+
import { N as NcActionButton } from "./NcActionButton-BdQ_qmvW.mjs";
|
|
5
5
|
import { resolveComponent, createElementBlock, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot, createCommentVNode, createElementVNode, createVNode, toDisplayString, Fragment, renderList, withModifiers, createTextVNode } from "vue";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
7
7
|
const _sfc_main = {
|
|
@@ -195,3 +195,4 @@ const NcDashboardWidgetItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render",
|
|
|
195
195
|
export {
|
|
196
196
|
NcDashboardWidgetItem as N
|
|
197
197
|
};
|
|
198
|
+
//# sourceMappingURL=NcDashboardWidgetItem-7RXY5EKJ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDashboardWidgetItem-
|
|
1
|
+
{"version":3,"file":"NcDashboardWidgetItem-7RXY5EKJ.mjs","sources":["../../src/components/NcDashboardWidgetItem/NcDashboardWidgetItem.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component is meant to be used inside a DashboardWidget component.\n\n</docs>\n\n<template>\n\t<div @mouseover=\"hovered = true\" @mouseleave=\"hovered = false\">\n\t\t<component :is=\"targetUrl ? 'a' : 'div'\"\n\t\t\t:href=\"targetUrl || undefined\"\n\t\t\t:target=\"targetUrl ? '_blank' : undefined\"\n\t\t\t:class=\"{ 'item-list__entry': true, 'item-list__entry--has-actions-menu': gotMenu }\"\n\t\t\t@click=\"onLinkClick\">\n\t\t\t<!-- @slot Slot for passing a user avatar. -->\n\t\t\t<slot name=\"avatar\" :avatar-url=\"avatarUrl\" :avatar-username=\"avatarUsername\">\n\t\t\t\t<NcAvatar class=\"item-avatar\"\n\t\t\t\t\t:size=\"44\"\n\t\t\t\t\t:url=\"avatarUrl\"\n\t\t\t\t\t:user=\"avatarUsername\"\n\t\t\t\t\t:is-no-user=\"avatarIsNoUser\"\n\t\t\t\t\t:show-user-status=\"!gotOverlayIcon\" />\n\t\t\t</slot>\n\t\t\t<img v-if=\"overlayIconUrl\"\n\t\t\t\tclass=\"item-icon\"\n\t\t\t\talt=\"\"\n\t\t\t\t:src=\"overlayIconUrl\">\n\t\t\t<div class=\"item__details\">\n\t\t\t\t<h3 :title=\"mainText\">\n\t\t\t\t\t{{ mainText }}\n\t\t\t\t</h3>\n\t\t\t\t<span v-if=\"subText !== ''\" class=\"message\" :title=\"subText\">\n\t\t\t\t\t{{ subText }}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<NcActions v-if=\"gotMenu\" :force-menu=\"forceMenu\">\n\t\t\t\t<!-- @slot This slot can be used to provide actions for each dashboard widget item. -->\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcActionButton v-for=\"(m, menuItemId) in itemMenu\"\n\t\t\t\t\t\t:key=\"menuItemId\"\n\t\t\t\t\t\t:icon=\"m.icon\"\n\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t@click.prevent.stop=\"$emit(menuItemId, item)\">\n\t\t\t\t\t\t{{ m.text }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</slot>\n\t\t\t</NcActions>\n\t\t</component>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcActions from '../NcActions/index.js'\nimport NcActionButton from '../NcActionButton/index.js'\n\nexport default {\n\tname: 'NcDashboardWidgetItem',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcActions,\n\t\tNcActionButton,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The item id (optional)\n\t\t */\n\t\tid: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * The item element is a link to this URL (optional)\n\t\t */\n\t\ttargetUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Where to get the avatar image. (optional) Used if avatarUsername is not defined.\n\t\t */\n\t\tavatarUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Name to provide to the Avatar. (optional) Used if avatarUrl is not defined.\n\t\t */\n\t\tavatarUsername: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Is the avatarUsername not a user's name? (optional, false by default)\n\t\t */\n\t\tavatarIsNoUser: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Small icon to display on the bottom-right corner of the avatar (optional)\n\t\t */\n\t\toverlayIconUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Item main text (mandatory)\n\t\t */\n\t\tmainText: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * Item subline text (optional)\n\t\t */\n\t\tsubText: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each items (optional)\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\n\t\t/**\n\t\t * Specify whether the 3 dot menu is forced when only one action is present\n\t\t */\n\t\tforceMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\thovered: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\titem() {\n\t\t\treturn {\n\t\t\t\tid: this.id,\n\t\t\t\ttargetUrl: this.targetUrl,\n\t\t\t\tavatarUrl: this.avatarUrl,\n\t\t\t\tavatarUsername: this.avatarUsername,\n\t\t\t\toverlayIconUrl: this.overlayIconUrl,\n\t\t\t\tmainText: this.mainText,\n\t\t\t\tsubText: this.subText,\n\t\t\t}\n\t\t},\n\t\tgotMenu() {\n\t\t\treturn Object.keys(this.itemMenu).length !== 0 || !!this.$slots.actions\n\t\t},\n\t\tgotOverlayIcon() {\n\t\t\treturn this.overlayIconUrl && this.overlayIconUrl !== ''\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonLinkClick(event) {\n\t\t\tif (event.target.closest('.action-item')) {\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: relative;\n\tpadding: 8px;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t}\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-top: auto;\n\t\tmargin-bottom: auto;\n\t}\n\t.item__details {\n\t\tpadding-inline-start: 8px;\n\t\tmax-height: fit-content;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tmin-height: var(--default-clickable-area);\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.message span {\n\t\t\twidth: 10px;\n\t\t\tdisplay: inline-block;\n\t\t\tmargin-bottom: -3px;\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 100%;\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\n\t.item-icon {\n\t\tposition: relative;\n\t\twidth: 14px;\n\t\theight: 14px;\n\t\tmargin-top: 25px;\n\t\tmargin-inline: -10px -2px;\n\t}\n\n\tbutton.primary {\n\t\tpadding: 21px;\n\t\tmargin: 0;\n\t}\n}\n/*\n.content-popover {\n\theight: 0px;\n\twidth: 0px;\n\tmargin-inline: auto;\n}\n.popover-container {\n\twidth: 100%;\n\theight: 0px;\n}\n*/\n</style>\n"],"names":["_createElementBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_withCtx","_renderSlot","_createVNode","_createCommentVNode","_createElementVNode","_toDisplayString","_openBlock","_Fragment","_renderList","_withModifiers","_createTextVNode"],"mappings":";;;;;AA8DA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,IAAI;AAAA,MACH,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,WAAW;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,WAAW;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,gBAAgB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,gBAAgB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,gBAAgB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,UAAU;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAID,SAAS;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,UAAU;AAAA,MACT,MAAM;AAAA,MACN,SAAS,MAAM;AAAE,eAAO;MAAI;AAAA,IAC5B;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA,EACD;AAAA,EAED,OAAO;AACN,WAAO;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACA;AAAA,EAED,UAAU;AAAA,IACT,OAAO;AACN,aAAO;AAAA,QACN,IAAI,KAAK;AAAA,QACT,WAAW,KAAK;AAAA,QAChB,WAAW,KAAK;AAAA,QAChB,gBAAgB,K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