@nextcloud/vue 8.13.0 → 8.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/README.md +1 -0
- package/dist/Components/NcActionButton.cjs +2 -2
- package/dist/Components/NcActionButton.cjs.map +1 -1
- package/dist/Components/NcActionButton.mjs +2 -2
- package/dist/Components/NcActionButton.mjs.map +1 -1
- package/dist/Components/NcActionButtonGroup.cjs +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +1 -1
- package/dist/Components/NcActionCaption.cjs +2 -2
- package/dist/Components/NcActionCaption.cjs.map +1 -1
- package/dist/Components/NcActionCaption.mjs +2 -2
- package/dist/Components/NcActionCaption.mjs.map +1 -1
- package/dist/Components/NcActionCheckbox.cjs +2 -2
- package/dist/Components/NcActionCheckbox.cjs.map +1 -1
- package/dist/Components/NcActionCheckbox.mjs +2 -2
- package/dist/Components/NcActionCheckbox.mjs.map +1 -1
- package/dist/Components/NcActionInput.cjs +1 -1
- package/dist/Components/NcActionInput.mjs +1 -1
- package/dist/Components/NcActionLink.cjs +1 -1
- package/dist/Components/NcActionLink.mjs +1 -1
- package/dist/Components/NcActionRadio.cjs +2 -2
- package/dist/Components/NcActionRadio.cjs.map +1 -1
- package/dist/Components/NcActionRadio.mjs +2 -2
- package/dist/Components/NcActionRadio.mjs.map +1 -1
- package/dist/Components/NcActionRouter.cjs +1 -1
- package/dist/Components/NcActionRouter.mjs +1 -1
- package/dist/Components/NcActionText.cjs +1 -1
- package/dist/Components/NcActionText.mjs +1 -1
- package/dist/Components/NcActionTextEditable.cjs +2 -2
- package/dist/Components/NcActionTextEditable.cjs.map +1 -1
- package/dist/Components/NcActionTextEditable.mjs +2 -2
- package/dist/Components/NcActionTextEditable.mjs.map +1 -1
- package/dist/Components/NcActions.cjs +1 -1
- package/dist/Components/NcActions.mjs +1 -1
- package/dist/Components/NcAppContent.cjs +1 -1
- package/dist/Components/NcAppContent.mjs +1 -1
- package/dist/Components/NcAppNavigation.cjs +1 -1
- package/dist/Components/NcAppNavigation.mjs +1 -1
- package/dist/Components/NcAppNavigationCaption.cjs +1 -1
- package/dist/Components/NcAppNavigationCaption.mjs +1 -1
- package/dist/Components/NcAppNavigationIconBullet.cjs +2 -2
- package/dist/Components/NcAppNavigationIconBullet.cjs.map +1 -1
- package/dist/Components/NcAppNavigationIconBullet.mjs +2 -2
- package/dist/Components/NcAppNavigationIconBullet.mjs.map +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSearch.cjs +3 -0
- package/dist/Components/NcAppNavigationSearch.cjs.map +1 -0
- package/dist/Components/NcAppNavigationSearch.mjs +4 -0
- package/dist/Components/NcAppNavigationSearch.mjs.map +1 -0
- package/dist/Components/NcAppNavigationSettings.cjs +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +1 -1
- package/dist/Components/NcAppSettingsSection.cjs +3 -3
- package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
- package/dist/Components/NcAppSettingsSection.mjs +3 -3
- package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
- package/dist/Components/NcAppSidebar.cjs +1 -1
- package/dist/Components/NcAppSidebar.mjs +1 -1
- package/dist/Components/NcAvatar.cjs +1 -1
- package/dist/Components/NcAvatar.mjs +1 -1
- package/dist/Components/NcBreadcrumb.cjs +1 -1
- package/dist/Components/NcBreadcrumb.mjs +1 -1
- package/dist/Components/NcBreadcrumbs.cjs +1 -1
- package/dist/Components/NcBreadcrumbs.mjs +1 -1
- package/dist/Components/NcButton.cjs +15 -3
- package/dist/Components/NcButton.cjs.map +1 -1
- package/dist/Components/NcButton.mjs +15 -3
- package/dist/Components/NcButton.mjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
- package/dist/Components/NcChip.cjs +3 -3
- package/dist/Components/NcChip.mjs +3 -3
- package/dist/Components/NcCollectionList.cjs +3 -0
- package/dist/Components/NcCollectionList.cjs.map +1 -0
- package/dist/Components/NcCollectionList.mjs +4 -0
- package/dist/Components/NcCollectionList.mjs.map +1 -0
- package/dist/Components/NcColorPicker.cjs +1 -1
- package/dist/Components/NcColorPicker.mjs +1 -1
- package/dist/Components/NcContent.cjs +1 -1
- package/dist/Components/NcContent.mjs +1 -1
- package/dist/Components/NcCounterBubble.cjs +2 -2
- package/dist/Components/NcCounterBubble.cjs.map +1 -1
- package/dist/Components/NcCounterBubble.mjs +2 -2
- package/dist/Components/NcCounterBubble.mjs.map +1 -1
- package/dist/Components/NcDashboardWidget.cjs +1 -1
- package/dist/Components/NcDashboardWidget.mjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
- package/dist/Components/NcDateTime.cjs +1 -1
- package/dist/Components/NcDateTime.mjs +1 -1
- package/dist/Components/NcDateTimePicker.cjs +5 -5
- package/dist/Components/NcDateTimePicker.mjs +5 -5
- package/dist/Components/NcDateTimePickerNative.cjs +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +1 -1
- package/dist/Components/NcDialog.cjs +1 -1
- package/dist/Components/NcDialog.mjs +1 -1
- package/dist/Components/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcHeaderMenu.cjs +1 -1
- package/dist/Components/NcHeaderMenu.mjs +1 -1
- package/dist/Components/NcInputField.cjs +11 -14
- package/dist/Components/NcInputField.cjs.map +1 -1
- package/dist/Components/NcInputField.mjs +11 -14
- package/dist/Components/NcInputField.mjs.map +1 -1
- package/dist/Components/NcListItem.cjs +1 -1
- package/dist/Components/NcListItem.mjs +1 -1
- package/dist/Components/NcListItemIcon.cjs +1 -1
- package/dist/Components/NcListItemIcon.mjs +1 -1
- package/dist/Components/NcModal.cjs +40 -11
- package/dist/Components/NcModal.cjs.map +1 -1
- package/dist/Components/NcModal.mjs +38 -11
- package/dist/Components/NcModal.mjs.map +1 -1
- package/dist/Components/NcPasswordField.cjs +1 -1
- package/dist/Components/NcPasswordField.mjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
- package/dist/Components/NcRichContenteditable.cjs +2 -2
- package/dist/Components/NcRichContenteditable.mjs +2 -2
- package/dist/Components/NcRichText.cjs +2 -2
- package/dist/Components/NcRichText.mjs +3 -3
- package/dist/Components/NcSelect.cjs +1 -1
- package/dist/Components/NcSelect.mjs +1 -1
- package/dist/Components/NcSelectTags.cjs +1 -1
- package/dist/Components/NcSelectTags.mjs +1 -1
- package/dist/Components/NcSettingsInputText.cjs +1 -1
- package/dist/Components/NcSettingsInputText.mjs +1 -1
- package/dist/Components/NcSettingsSection.cjs +1 -1
- package/dist/Components/NcSettingsSection.mjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
- package/dist/Components/NcTextField.cjs +1 -1
- package/dist/Components/NcTextField.mjs +1 -1
- package/dist/Components/NcTimezonePicker.cjs +1 -1
- package/dist/Components/NcTimezonePicker.mjs +1 -1
- package/dist/Components/NcUserBubble.cjs +1 -1
- package/dist/Components/NcUserBubble.mjs +1 -1
- package/dist/Components/NcUserStatusIcon.cjs +1 -1
- package/dist/Components/NcUserStatusIcon.mjs +1 -1
- package/dist/Functions/reference.cjs +1 -1
- package/dist/Functions/reference.mjs +1 -1
- package/dist/Functions/usernameToColor.cjs +1 -1
- package/dist/Functions/usernameToColor.mjs +1 -1
- package/dist/Mixins/clickOutsideOptions.cjs.map +1 -1
- package/dist/Mixins/clickOutsideOptions.mjs.map +1 -1
- package/dist/Mixins/richEditor.cjs +1 -1
- package/dist/Mixins/richEditor.mjs +1 -1
- package/dist/assets/{NcActionButton-BQGADRoe.css → NcActionButton-D90PTEA5.css} +25 -25
- package/dist/assets/{NcActionCaption-D-VXTPLI.css → NcActionCaption-B7FZTc3Y.css} +4 -4
- package/dist/assets/{NcActionRadio-mQBhh9vp.css → NcActionCheckbox-C-PJVvtb.css} +13 -13
- package/dist/assets/NcActionInput-C_3Csa6A.css +220 -0
- package/dist/assets/{NcActionLink-Djp7wPGg.css → NcActionLink-Db_ZlqWs.css} +9 -9
- package/dist/assets/{NcActionCheckbox-_DSvRrCm.css → NcActionRadio-CpCvyMa_.css} +13 -13
- package/dist/assets/{NcActionRouter-DzcScCc6.css → NcActionRouter-DidTlbov.css} +9 -9
- package/dist/assets/{NcActionText-DSk64KBl.css → NcActionText-DCx1DWXe.css} +9 -9
- package/dist/assets/NcActionTextEditable-Dud9NOdm.css +238 -0
- package/dist/assets/{NcActions-DtkhUUGj.css → NcActions-BAHCEkZI.css} +14 -14
- package/dist/assets/{NcAppContent-D0DGjfq9.css → NcAppContent-DVBVZyuW.css} +27 -33
- package/dist/assets/{NcAppNavigation-DvCTUTpR.css → NcAppNavigation-DdJfTimg.css} +17 -11
- package/dist/assets/{NcAppNavigationCaption-32LhJ9Co.css → NcAppNavigationCaption-CYv7YhUS.css} +12 -12
- package/dist/assets/{NcAppNavigationIconBullet-EfIZU7x-.css → NcAppNavigationIconBullet-By_0o2dG.css} +4 -4
- package/dist/assets/{NcAppNavigationItem-CflKjlYl.css → NcAppNavigationItem-Vg0-UrGT.css} +43 -43
- package/dist/assets/{NcAppNavigationNewItem-CO3GnR26.css → NcAppNavigationNewItem-s6Dd9PrB.css} +46 -46
- package/dist/assets/NcAppNavigationSearch-BLGG_WBn.css +41 -0
- package/dist/assets/{NcAppNavigationSettings-CbV2ZQ9_.css → NcAppNavigationSettings-AzpTlUym.css} +19 -19
- package/dist/assets/{NcAppNavigationToggle-DzpFNOgZ.css → NcAppNavigationToggle-DvYpNzHv.css} +4 -4
- package/dist/assets/{NcAppSettingsDialog-DkvJ9cKe.css → NcAppSettingsDialog-YgAGku7I.css} +12 -12
- package/dist/assets/{NcAppSettingsSection-B5r6VWct.css → NcAppSettingsSection-qU4SUZvh.css} +4 -4
- package/dist/assets/{NcAppSidebar-ITHlK5rW.css → NcAppSidebar-CpV7czJx.css} +70 -70
- package/dist/assets/{NcBreadcrumb-rVleA0T6.css → NcBreadcrumb-DOvK-XG1.css} +16 -16
- package/dist/assets/{NcBreadcrumbs-Bue16qCC.css → NcBreadcrumbs-CPUAM38l.css} +6 -6
- package/dist/assets/NcButton-BHxZm42y.css +210 -0
- package/dist/assets/{NcCheckboxRadioSwitch-CFKCb80n.css → NcCheckboxRadioSwitch-BkBep4wT.css} +46 -46
- package/dist/assets/NcCollectionList-ETQTqkqt.css +221 -0
- package/dist/assets/{NcColorPicker-DH3H7HLS.css → NcColorPicker-CpkfRGO1.css} +33 -33
- package/dist/assets/{NcCounterBubble-DT16e2bg.css → NcCounterBubble-BlAq2Vim.css} +8 -8
- package/dist/assets/{NcDashboardWidget-CwzqyUG9.css → NcDashboardWidget-CpstyXok.css} +13 -13
- package/dist/assets/{NcDashboardWidgetItem-JCtQhwhS.css → NcDashboardWidgetItem-Qe5SSOhA.css} +14 -14
- package/dist/assets/{NcDateTimePicker-Cs-VgGon.css → NcDateTimePicker-Aq9TnHYj.css} +8 -8
- package/dist/assets/{NcDialog-BR3cQR_R.css → NcDialog-j6_6dpiF.css} +15 -15
- package/dist/assets/{NcHeaderMenu-BbpDtHjf.css → NcHeaderMenu-CuAI7Fgb.css} +13 -13
- package/dist/assets/NcInputField-B7T0X2lM.css +166 -0
- package/dist/assets/NcListItem-Cah9oImZ.css +164 -0
- package/dist/assets/{NcListItemIcon-Cd4723rU.css → NcListItemIcon-DxPdaRV5.css} +14 -14
- package/dist/assets/{NcMentionBubble-B-xYaJDc.css → NcMentionBubble-C6t8od-_.css} +13 -10
- package/dist/assets/{NcModal-6bpKFk4w.css → NcModal-Ch7ovo9y.css} +69 -69
- package/dist/assets/{NcRelatedResourcesPanel-i_FBo7DY.css → NcRelatedResourcesPanel-BE9CQ8s8.css} +25 -25
- package/dist/assets/{NcRichContenteditable-BIclrp8v.css → NcRichContenteditable-CkvTrjfG.css} +13 -13
- package/dist/assets/{NcRichText-BKoK9ulg.css → NcRichText-BKnmtD0n.css} +4 -4
- package/dist/assets/{NcSelect-9AZOhTlS.css → NcSelect-BQt_SpyP.css} +1 -1
- package/dist/assets/{NcSettingsSection-B_Dat_E8.css → NcSettingsSection-DZwOPKg1.css} +11 -11
- package/dist/assets/{referencePickerModal-C_c_8fEM.css → referencePickerModal-9BcmmfUy.css} +36 -36
- package/dist/chunks/{GenColors-BvNpSI9g.mjs → GenColors-BV6-FB5-.mjs} +1 -1
- package/dist/chunks/{GenColors-BvNpSI9g.mjs.map → GenColors-BV6-FB5-.mjs.map} +1 -1
- package/dist/chunks/{GenColors-Cf5olCPx.cjs → GenColors-CzzMrdzl.cjs} +1 -1
- package/dist/chunks/{GenColors-Cf5olCPx.cjs.map → GenColors-CzzMrdzl.cjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-BO4eSfV4.cjs → NcActionButtonGroup-CIHtVerj.cjs} +1 -1
- package/dist/chunks/{NcActionButtonGroup-BO4eSfV4.cjs.map → NcActionButtonGroup-CIHtVerj.cjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-DCKhQnHH.mjs → NcActionButtonGroup-YZjkAQfi.mjs} +1 -1
- package/dist/chunks/{NcActionButtonGroup-DCKhQnHH.mjs.map → NcActionButtonGroup-YZjkAQfi.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-CEjCUwt0.cjs → NcActionInput-BolqgAyP.cjs} +7 -7
- package/dist/chunks/{NcActionInput-CEjCUwt0.cjs.map → NcActionInput-BolqgAyP.cjs.map} +1 -1
- package/dist/chunks/{NcActionInput-9zrp0_WC.mjs → NcActionInput-Dffj2gx5.mjs} +7 -7
- package/dist/chunks/{NcActionInput-9zrp0_WC.mjs.map → NcActionInput-Dffj2gx5.mjs.map} +1 -1
- package/dist/chunks/{NcActions-B4kN_x_I.cjs → NcActions-BanQsba7.cjs} +42 -15
- package/dist/chunks/NcActions-BanQsba7.cjs.map +1 -0
- package/dist/chunks/{NcActions-VXT4YqSd.mjs → NcActions-jYBYK6WE.mjs} +43 -16
- package/dist/chunks/NcActions-jYBYK6WE.mjs.map +1 -0
- package/dist/chunks/{NcAppContent-CoKCN5M3.cjs → NcAppContent-3ufgCG77.cjs} +5 -5
- package/dist/chunks/NcAppContent-3ufgCG77.cjs.map +1 -0
- package/dist/chunks/{NcAppContent-B-VnA8x6.mjs → NcAppContent-C4K-sTYm.mjs} +5 -5
- package/dist/chunks/NcAppContent-C4K-sTYm.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-Bto5gXEz.cjs → NcAppNavigation-Dcf2w78V.cjs} +4 -4
- package/dist/chunks/NcAppNavigation-Dcf2w78V.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-BoSCCzgq.mjs → NcAppNavigation-hx60VxfZ.mjs} +4 -4
- package/dist/chunks/NcAppNavigation-hx60VxfZ.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationCaption-D5IlWwqU.mjs → NcAppNavigationCaption-C5x4p-eV.mjs} +3 -3
- package/dist/chunks/NcAppNavigationCaption-C5x4p-eV.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationCaption-7V2xr2JU.cjs → NcAppNavigationCaption-Hb65-Hwg.cjs} +3 -3
- package/dist/chunks/NcAppNavigationCaption-Hb65-Hwg.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationItem-BvTE5-IF.mjs → NcAppNavigationItem-JGpx1LjC.mjs} +12 -11
- package/dist/chunks/NcAppNavigationItem-JGpx1LjC.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationItem-D0BY5hCQ.cjs → NcAppNavigationItem-heUPZili.cjs} +12 -11
- package/dist/chunks/NcAppNavigationItem-heUPZili.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationNewItem-DI3F9V41.cjs → NcAppNavigationNewItem-Bk8Qo0Yf.cjs} +3 -3
- package/dist/chunks/NcAppNavigationNewItem-Bk8Qo0Yf.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationNewItem-a_KNNkkf.mjs → NcAppNavigationNewItem-U7nmcavB.mjs} +3 -3
- package/dist/chunks/NcAppNavigationNewItem-U7nmcavB.mjs.map +1 -0
- package/dist/chunks/NcAppNavigationSearch-Ak-Cq3nx.mjs +106 -0
- package/dist/chunks/NcAppNavigationSearch-Ak-Cq3nx.mjs.map +1 -0
- package/dist/chunks/NcAppNavigationSearch-ClnL2j6U.cjs +105 -0
- package/dist/chunks/NcAppNavigationSearch-ClnL2j6U.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationSettings-CkdNLEGg.cjs → NcAppNavigationSettings-DABhRWZL.cjs} +5 -5
- package/dist/chunks/{NcAppNavigationSettings-ZYhJhZza.mjs.map → NcAppNavigationSettings-DABhRWZL.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-ZYhJhZza.mjs → NcAppNavigationSettings-DtpUeFhv.mjs} +5 -5
- package/dist/chunks/{NcAppNavigationSettings-CkdNLEGg.cjs.map → NcAppNavigationSettings-DtpUeFhv.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-dTKw7Sw8.cjs → NcAppNavigationToggle-Ci9rArNU.cjs} +4 -4
- package/dist/chunks/{NcAppNavigationToggle-dHmyeRMf.mjs.map → NcAppNavigationToggle-Ci9rArNU.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-dHmyeRMf.mjs → NcAppNavigationToggle-DTbZFYws.mjs} +4 -4
- package/dist/chunks/{NcAppNavigationToggle-dTKw7Sw8.cjs.map → NcAppNavigationToggle-DTbZFYws.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-DB9IGg_1.cjs → NcAppSettingsDialog-DZcj5Hg3.cjs} +5 -5
- package/dist/chunks/{NcAppSettingsDialog-DB9IGg_1.cjs.map → NcAppSettingsDialog-DZcj5Hg3.cjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-B_JHYQei.mjs → NcAppSettingsDialog-Dgqy88lj.mjs} +5 -5
- package/dist/chunks/{NcAppSettingsDialog-B_JHYQei.mjs.map → NcAppSettingsDialog-Dgqy88lj.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-DfMS3rRN.mjs → NcAppSidebar-CCL2-_-5.mjs} +31 -16
- package/dist/chunks/NcAppSidebar-CCL2-_-5.mjs.map +1 -0
- package/dist/chunks/{NcAppSidebar-Be2hX08l.cjs → NcAppSidebar-CfD7b5WF.cjs} +31 -16
- package/dist/chunks/NcAppSidebar-CfD7b5WF.cjs.map +1 -0
- package/dist/chunks/{NcAvatar-DrN_43xE.mjs → NcAvatar-CLQ7_AQw.mjs} +6 -6
- package/dist/chunks/{NcAvatar-DrN_43xE.mjs.map → NcAvatar-CLQ7_AQw.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-B1PwcHhO.cjs → NcAvatar-CjtwClIu.cjs} +6 -6
- package/dist/chunks/{NcAvatar-B1PwcHhO.cjs.map → NcAvatar-CjtwClIu.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-C1VWgdNk.cjs → NcBreadcrumb-CDSQfqgy.cjs} +3 -3
- package/dist/chunks/{NcBreadcrumb-C1VWgdNk.cjs.map → NcBreadcrumb-CDSQfqgy.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-BB7O3NvV.mjs → NcBreadcrumb-lCjBkeeU.mjs} +3 -3
- package/dist/chunks/{NcBreadcrumb-BB7O3NvV.mjs.map → NcBreadcrumb-lCjBkeeU.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-BRl8V6ie.mjs → NcBreadcrumbs-LgHb45DJ.mjs} +4 -4
- package/dist/chunks/NcBreadcrumbs-LgHb45DJ.mjs.map +1 -0
- package/dist/chunks/{NcBreadcrumbs-BZFTIrPp.cjs → NcBreadcrumbs-eOkyOf9_.cjs} +4 -4
- package/dist/chunks/NcBreadcrumbs-eOkyOf9_.cjs.map +1 -0
- package/dist/chunks/{NcCheckboxRadioSwitch-08IiPYnO.mjs → NcCheckboxRadioSwitch-BU-MnU4U.mjs} +11 -5
- package/dist/chunks/NcCheckboxRadioSwitch-BU-MnU4U.mjs.map +1 -0
- package/dist/chunks/{NcCheckboxRadioSwitch-BC-PCCMB.cjs → NcCheckboxRadioSwitch-BbMh0Uc8.cjs} +11 -5
- package/dist/chunks/NcCheckboxRadioSwitch-BbMh0Uc8.cjs.map +1 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-D3PU8il5.mjs +3 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-D3PU8il5.mjs.map +1 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-D63ceZ-I.cjs +4 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-D63ceZ-I.cjs.map +1 -0
- package/dist/chunks/NcCollectionList-Csni5btL.mjs +428 -0
- package/dist/chunks/NcCollectionList-Csni5btL.mjs.map +1 -0
- package/dist/chunks/NcCollectionList-DAeLF8Lc.cjs +430 -0
- package/dist/chunks/NcCollectionList-DAeLF8Lc.cjs.map +1 -0
- package/dist/chunks/{NcColorPicker-C5AAUZow.mjs → NcColorPicker-19JdVR99.mjs} +4 -4
- package/dist/chunks/{NcColorPicker-DQVfrnSU.cjs.map → NcColorPicker-19JdVR99.mjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-DQVfrnSU.cjs → NcColorPicker-DuJJC4lB.cjs} +4 -4
- package/dist/chunks/{NcColorPicker-C5AAUZow.mjs.map → NcColorPicker-DuJJC4lB.cjs.map} +1 -1
- package/dist/chunks/{NcContent-DqUD53yw.cjs → NcContent-BPWplwmy.cjs} +2 -2
- package/dist/chunks/{NcContent-DqUD53yw.cjs.map → NcContent-BPWplwmy.cjs.map} +1 -1
- package/dist/chunks/{NcContent-DlpAl0Ng.mjs → NcContent-D2roywh0.mjs} +2 -2
- package/dist/chunks/{NcContent-DlpAl0Ng.mjs.map → NcContent-D2roywh0.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-DHZ91zbH.cjs → NcDashboardWidget-CiQ9nKkn.cjs} +6 -6
- package/dist/chunks/{NcDashboardWidget-DHZ91zbH.cjs.map → NcDashboardWidget-CiQ9nKkn.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-Bgws_A-4.mjs → NcDashboardWidget-eYMkaNge.mjs} +6 -6
- package/dist/chunks/{NcDashboardWidget-Bgws_A-4.mjs.map → NcDashboardWidget-eYMkaNge.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-7POJ_0UL.cjs → NcDashboardWidgetItem-BlmOcEja.cjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-7POJ_0UL.cjs.map → NcDashboardWidgetItem-BlmOcEja.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-yOTSuJJW.mjs → NcDashboardWidgetItem-BtIXF3nP.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-yOTSuJJW.mjs.map → NcDashboardWidgetItem-BtIXF3nP.mjs.map} +1 -1
- package/dist/chunks/{NcDateTime-DPpc-ffs.cjs → NcDateTime-C06to8gC.cjs} +1 -1
- package/dist/chunks/{NcDateTime-DPpc-ffs.cjs.map → NcDateTime-C06to8gC.cjs.map} +1 -1
- package/dist/chunks/{NcDateTime-DBvDI3ZP.mjs → NcDateTime-D63dAM9i.mjs} +1 -1
- package/dist/chunks/{NcDateTime-DBvDI3ZP.mjs.map → NcDateTime-D63dAM9i.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-dCyByQCG.cjs → NcDialog-DGaf6Udc.cjs} +6 -4
- package/dist/chunks/{NcDialog-CDQmAtFa.mjs.map → NcDialog-DGaf6Udc.cjs.map} +1 -1
- package/dist/chunks/{NcDialog-CDQmAtFa.mjs → NcDialog-VincZ0XS.mjs} +6 -4
- package/dist/chunks/{NcDialog-dCyByQCG.cjs.map → NcDialog-VincZ0XS.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-CEeN-AZM.mjs → NcEmojiPicker-C5QwBqju.mjs} +5 -5
- package/dist/chunks/{NcEmojiPicker-CEeN-AZM.mjs.map → NcEmojiPicker-C5QwBqju.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-CNiHLIbP.cjs → NcEmojiPicker-C6N8_T2s.cjs} +5 -5
- package/dist/chunks/{NcEmojiPicker-CNiHLIbP.cjs.map → NcEmojiPicker-C6N8_T2s.cjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-C7peZLEA.cjs → NcHeaderMenu-D-Jo3l41.cjs} +4 -4
- package/dist/chunks/NcHeaderMenu-D-Jo3l41.cjs.map +1 -0
- package/dist/chunks/{NcHeaderMenu-BEp6lzuy.mjs → NcHeaderMenu-Da6Ob-6t.mjs} +4 -4
- package/dist/chunks/NcHeaderMenu-Da6Ob-6t.mjs.map +1 -0
- package/dist/chunks/{NcInputConfirmCancel-BojmHIVt.mjs → NcInputConfirmCancel-CHbaA18n.mjs} +2 -2
- package/dist/chunks/{NcInputConfirmCancel-BojmHIVt.mjs.map → NcInputConfirmCancel-CHbaA18n.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-CD8NS4jj.cjs → NcInputConfirmCancel-Cabqh9yr.cjs} +2 -2
- package/dist/chunks/{NcInputConfirmCancel-CD8NS4jj.cjs.map → NcInputConfirmCancel-Cabqh9yr.cjs.map} +1 -1
- package/dist/chunks/{NcListItem-PX9C1UU4.mjs → NcListItem-0EnLrbng.mjs} +5 -5
- package/dist/chunks/NcListItem-0EnLrbng.mjs.map +1 -0
- package/dist/chunks/{NcListItem-Bt5RbZT6.cjs → NcListItem-BfbxhMcD.cjs} +5 -5
- package/dist/chunks/NcListItem-BfbxhMcD.cjs.map +1 -0
- package/dist/chunks/{NcListItemIcon-CSD8rRYj.cjs → NcListItemIcon-57iRCVpy.cjs} +4 -4
- package/dist/chunks/{NcListItemIcon-CSD8rRYj.cjs.map → NcListItemIcon-57iRCVpy.cjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-NtOXrncP.mjs → NcListItemIcon-Bw6Wddoz.mjs} +4 -4
- package/dist/chunks/{NcListItemIcon-NtOXrncP.mjs.map → NcListItemIcon-Bw6Wddoz.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-Y4-be0L7.cjs → NcPasswordField-Iq8u9C_A.cjs} +2 -2
- package/dist/chunks/{NcPasswordField-Y4-be0L7.cjs.map → NcPasswordField-Iq8u9C_A.cjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-XxjYVmM9.mjs → NcPasswordField-U7jnnuI6.mjs} +2 -2
- package/dist/chunks/{NcPasswordField-XxjYVmM9.mjs.map → NcPasswordField-U7jnnuI6.mjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-Dlf-t8iR.cjs → NcRelatedResourcesPanel-CHMgVvv8.cjs} +7 -7
- package/dist/chunks/NcRelatedResourcesPanel-CHMgVvv8.cjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-wFENPmmn.mjs → NcRelatedResourcesPanel-TaYxpT6y.mjs} +7 -7
- package/dist/chunks/NcRelatedResourcesPanel-TaYxpT6y.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-DdG9-ftG.cjs → NcRichContenteditable-B32ivG6v.cjs} +14 -11
- package/dist/chunks/{NcRichContenteditable-DdG9-ftG.cjs.map → NcRichContenteditable-B32ivG6v.cjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-BGW5Ut1z.mjs → NcRichContenteditable-Jk627HvF.mjs} +14 -11
- package/dist/chunks/{NcRichContenteditable-BGW5Ut1z.mjs.map → NcRichContenteditable-Jk627HvF.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-B0CKR0jj.cjs → NcRichText-DhS9L0ia.cjs} +14 -6
- package/dist/chunks/NcRichText-DhS9L0ia.cjs.map +1 -0
- package/dist/chunks/{NcRichText-D3knHFLh.mjs → NcRichText-rgX1D4Mv.mjs} +14 -6
- package/dist/chunks/NcRichText-rgX1D4Mv.mjs.map +1 -0
- package/dist/chunks/{NcSelect-BXjYMf6X.cjs → NcSelect-CFkeC89U.cjs} +4 -4
- package/dist/chunks/{NcSelect-BVltxWdw.mjs.map → NcSelect-CFkeC89U.cjs.map} +1 -1
- package/dist/chunks/{NcSelect-BVltxWdw.mjs → NcSelect-VXa9BD3h.mjs} +4 -4
- package/dist/chunks/{NcSelect-BXjYMf6X.cjs.map → NcSelect-VXa9BD3h.mjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-DzNoReBn.cjs → NcSelectTags-BGqJO7nz.cjs} +2 -2
- package/dist/chunks/{NcSelectTags-DzNoReBn.cjs.map → NcSelectTags-BGqJO7nz.cjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-BA6aGEca.mjs → NcSelectTags-CnMksmUz.mjs} +2 -2
- package/dist/chunks/{NcSelectTags-BA6aGEca.mjs.map → NcSelectTags-CnMksmUz.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-CXURkBMD.mjs → NcSettingsInputText-6NUV0AUU.mjs} +2 -2
- package/dist/chunks/{NcSettingsInputText-CXURkBMD.mjs.map → NcSettingsInputText-6NUV0AUU.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-B3aogzD0.cjs → NcSettingsInputText-BHQoBpdB.cjs} +2 -2
- package/dist/chunks/{NcSettingsInputText-B3aogzD0.cjs.map → NcSettingsInputText-BHQoBpdB.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-PZ3JkBWO.mjs → NcSettingsSection-HExFhUqF.mjs} +4 -4
- package/dist/chunks/{NcSettingsSection-B8Nn29kV.cjs.map → NcSettingsSection-HExFhUqF.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-B8Nn29kV.cjs → NcSettingsSection-NrhuTTW4.cjs} +4 -4
- package/dist/chunks/{NcSettingsSection-PZ3JkBWO.mjs.map → NcSettingsSection-NrhuTTW4.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-Z3yYfNTs.mjs → NcSettingsSelectGroup-BvSwvGmQ.mjs} +3 -3
- package/dist/chunks/{NcSettingsSelectGroup-Z3yYfNTs.mjs.map → NcSettingsSelectGroup-BvSwvGmQ.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-k5AMJoPl.cjs → NcSettingsSelectGroup-DKwhOABo.cjs} +3 -3
- package/dist/chunks/{NcSettingsSelectGroup-k5AMJoPl.cjs.map → NcSettingsSelectGroup-DKwhOABo.cjs.map} +1 -1
- package/dist/chunks/{NcTextField-C8iERu7z.mjs → NcTextField-DCDVcnqT.mjs} +2 -2
- package/dist/chunks/NcTextField-DCDVcnqT.mjs.map +1 -0
- package/dist/chunks/{NcTextField-Y_QNDoeN.cjs → NcTextField-DMo1G8i6.cjs} +2 -2
- package/dist/chunks/NcTextField-DMo1G8i6.cjs.map +1 -0
- package/dist/chunks/{NcTimezonePicker-BlnrXG8A.mjs → NcTimezonePicker-CTNhHwMc.mjs} +4 -4
- package/dist/chunks/{NcTimezonePicker-BlnrXG8A.mjs.map → NcTimezonePicker-CTNhHwMc.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-DDNT7-mK.cjs → NcTimezonePicker-aP3TJBd2.cjs} +4 -4
- package/dist/chunks/{NcTimezonePicker-DDNT7-mK.cjs.map → NcTimezonePicker-aP3TJBd2.cjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-BiLpvdja.mjs → NcUserBubble-CT56m7hy.mjs} +1 -1
- package/dist/chunks/{NcUserBubble-BiLpvdja.mjs.map → NcUserBubble-CT56m7hy.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-eXO4wtN5.cjs → NcUserBubble-CTJW09AG.cjs} +1 -1
- package/dist/chunks/{NcUserBubble-eXO4wtN5.cjs.map → NcUserBubble-CTJW09AG.cjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-DLhfp6bb.mjs → NcUserStatusIcon-Bw4HYlgZ.mjs} +3 -3
- package/dist/chunks/{NcUserStatusIcon-DLhfp6bb.mjs.map → NcUserStatusIcon-Bw4HYlgZ.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-J509k6M1.cjs → NcUserStatusIcon-DAsG7fFc.cjs} +3 -3
- package/dist/chunks/{NcUserStatusIcon-J509k6M1.cjs.map → NcUserStatusIcon-DAsG7fFc.cjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-BJmRUKzI.mjs → ScopeComponent-C0xOBUg-.mjs} +1 -1
- package/dist/chunks/{ScopeComponent-BJmRUKzI.mjs.map → ScopeComponent-C0xOBUg-.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-Dn9AdAJf.cjs → ScopeComponent-p6wwuGWn.cjs} +1 -1
- package/dist/chunks/{ScopeComponent-Dn9AdAJf.cjs.map → ScopeComponent-p6wwuGWn.cjs.map} +1 -1
- package/dist/chunks/_l10n-CG5VZvYT.mjs +130 -0
- package/dist/chunks/_l10n-CG5VZvYT.mjs.map +1 -0
- package/dist/chunks/_l10n-DdIq5MvQ.cjs +129 -0
- package/dist/chunks/{_l10n-BGF_R72e.cjs.map → _l10n-DdIq5MvQ.cjs.map} +1 -1
- package/dist/chunks/actionGlobal-DqVa7c7G.mjs.map +1 -1
- package/dist/chunks/actionGlobal-L0Ls8tPJ.cjs.map +1 -1
- package/dist/chunks/{index-CVcTbcD3.mjs → index-DbA2OZyf.mjs} +2 -2
- package/dist/chunks/index-DbA2OZyf.mjs.map +1 -0
- package/dist/chunks/{index-C8XDBNYC.cjs → index-oIpl1nrk.cjs} +2 -2
- package/dist/chunks/index-oIpl1nrk.cjs.map +1 -0
- package/dist/chunks/{referencePickerModal-D7ZD0avR.cjs → referencePickerModal-Dk80B426.cjs} +15 -16
- package/dist/chunks/referencePickerModal-Dk80B426.cjs.map +1 -0
- package/dist/chunks/{referencePickerModal-CGhrhjCk.mjs → referencePickerModal-X5iEJq4e.mjs} +15 -16
- package/dist/chunks/referencePickerModal-X5iEJq4e.mjs.map +1 -0
- package/dist/chunks/{usernameToColor-BKMu6XL_.cjs → usernameToColor-B18lWdWj.cjs} +1 -1
- package/dist/chunks/{usernameToColor-BKMu6XL_.cjs.map → usernameToColor-B18lWdWj.cjs.map} +1 -1
- package/dist/chunks/{usernameToColor-BkmF7_85.mjs → usernameToColor-BlQigKGC.mjs} +1 -1
- package/dist/chunks/{usernameToColor-BkmF7_85.mjs.map → usernameToColor-BlQigKGC.mjs.map} +1 -1
- package/dist/components/NcCollectionList/service.d.ts +47 -0
- package/dist/composables/actions/useActionText.d.ts +14 -0
- package/dist/index.cjs +50 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +53 -45
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
- package/dist/assets/NcActionInput-K-aWGceI.css +0 -222
- package/dist/assets/NcActionTextEditable-BIjM-JsZ.css +0 -238
- package/dist/assets/NcButton-BlkIlpQf.css +0 -191
- package/dist/assets/NcInputField-CyNcetxP.css +0 -164
- package/dist/assets/NcListItem-DTaecNLV.css +0 -156
- package/dist/chunks/NcActions-B4kN_x_I.cjs.map +0 -1
- package/dist/chunks/NcActions-VXT4YqSd.mjs.map +0 -1
- package/dist/chunks/NcAppContent-B-VnA8x6.mjs.map +0 -1
- package/dist/chunks/NcAppContent-CoKCN5M3.cjs.map +0 -1
- package/dist/chunks/NcAppNavigation-BoSCCzgq.mjs.map +0 -1
- package/dist/chunks/NcAppNavigation-Bto5gXEz.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationCaption-7V2xr2JU.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationCaption-D5IlWwqU.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-BvTE5-IF.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-D0BY5hCQ.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationNewItem-DI3F9V41.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationNewItem-a_KNNkkf.mjs.map +0 -1
- package/dist/chunks/NcAppSidebar-Be2hX08l.cjs.map +0 -1
- package/dist/chunks/NcAppSidebar-DfMS3rRN.mjs.map +0 -1
- package/dist/chunks/NcBreadcrumbs-BRl8V6ie.mjs.map +0 -1
- package/dist/chunks/NcBreadcrumbs-BZFTIrPp.cjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch-08IiPYnO.mjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch-BC-PCCMB.cjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_45bd1a5d_lang-DM3kps3m.cjs +0 -4
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_45bd1a5d_lang-DM3kps3m.cjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_45bd1a5d_lang-DP6Ws4da.mjs +0 -3
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_45bd1a5d_lang-DP6Ws4da.mjs.map +0 -1
- package/dist/chunks/NcHeaderMenu-BEp6lzuy.mjs.map +0 -1
- package/dist/chunks/NcHeaderMenu-C7peZLEA.cjs.map +0 -1
- package/dist/chunks/NcListItem-Bt5RbZT6.cjs.map +0 -1
- package/dist/chunks/NcListItem-PX9C1UU4.mjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-Dlf-t8iR.cjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-wFENPmmn.mjs.map +0 -1
- package/dist/chunks/NcRichText-B0CKR0jj.cjs.map +0 -1
- package/dist/chunks/NcRichText-D3knHFLh.mjs.map +0 -1
- package/dist/chunks/NcTextField-C8iERu7z.mjs.map +0 -1
- package/dist/chunks/NcTextField-Y_QNDoeN.cjs.map +0 -1
- package/dist/chunks/_l10n-B6zipH_A.mjs +0 -122
- package/dist/chunks/_l10n-B6zipH_A.mjs.map +0 -1
- package/dist/chunks/_l10n-BGF_R72e.cjs +0 -121
- package/dist/chunks/index-C8XDBNYC.cjs.map +0 -1
- package/dist/chunks/index-CVcTbcD3.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-CGhrhjCk.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-D7ZD0avR.cjs.map +0 -1
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import '../assets/NcCollectionList-ETQTqkqt.css';
|
|
2
|
+
import debounce from "debounce";
|
|
3
|
+
import { ref, set } from "vue";
|
|
4
|
+
import { r as register, I as t7, J as t27, a as t } from "./_l10n-CG5VZvYT.mjs";
|
|
5
|
+
import { N as NcAvatar } from "./NcAvatar-CLQ7_AQw.mjs";
|
|
6
|
+
import { N as NcSelect } from "./NcSelect-VXa9BD3h.mjs";
|
|
7
|
+
import { g as getRoute } from "./autolink-cbuFALXr.mjs";
|
|
8
|
+
import { N as NcActions } from "./NcActions-jYBYK6WE.mjs";
|
|
9
|
+
import NcActionButton from "../Components/NcActionButton.mjs";
|
|
10
|
+
import { n as normalizeComponent } from "./_plugin-vue2_normalizer-D637Qkok.mjs";
|
|
11
|
+
import axios from "@nextcloud/axios";
|
|
12
|
+
import { generateOcsUrl } from "@nextcloud/router";
|
|
13
|
+
register(t7);
|
|
14
|
+
register(t27);
|
|
15
|
+
const _sfc_main$1 = {
|
|
16
|
+
name: "NcCollectionListItem",
|
|
17
|
+
components: {
|
|
18
|
+
NcAvatar,
|
|
19
|
+
NcActions,
|
|
20
|
+
NcActionButton
|
|
21
|
+
},
|
|
22
|
+
props: {
|
|
23
|
+
collection: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default: null
|
|
26
|
+
},
|
|
27
|
+
error: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: void 0
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
emits: ["remove-resource", "rename-collection"],
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
detailsOpen: false,
|
|
36
|
+
newName: null
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
computed: {
|
|
40
|
+
getIcon() {
|
|
41
|
+
return (resource) => [resource.iconClass];
|
|
42
|
+
},
|
|
43
|
+
typeClass() {
|
|
44
|
+
return (resource) => "resource-type-" + resource.type;
|
|
45
|
+
},
|
|
46
|
+
resources() {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
return (_b = (_a = this.collection.resources) == null ? void 0 : _a.filter((resource) => !Array.isArray(resource))) != null ? _b : [];
|
|
49
|
+
},
|
|
50
|
+
getComponent() {
|
|
51
|
+
return (resource) => {
|
|
52
|
+
const route = getRoute(this.$router, resource.link);
|
|
53
|
+
return route ? { component: "router-link", to: route, href: void 0 } : { component: "a", to: void 0, href: resource.link };
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
iconUrl() {
|
|
57
|
+
return (resource) => {
|
|
58
|
+
if (resource.mimetype) {
|
|
59
|
+
return OC.MimeType.getIconUrl(resource.mimetype);
|
|
60
|
+
}
|
|
61
|
+
if (resource.iconUrl) {
|
|
62
|
+
return resource.iconUrl;
|
|
63
|
+
}
|
|
64
|
+
return "";
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
methods: {
|
|
69
|
+
t,
|
|
70
|
+
toggleDetails() {
|
|
71
|
+
this.detailsOpen = !this.detailsOpen;
|
|
72
|
+
},
|
|
73
|
+
showDetails() {
|
|
74
|
+
this.detailsOpen = true;
|
|
75
|
+
},
|
|
76
|
+
removeResource(collection, resource) {
|
|
77
|
+
this.$emit("remove-resource", {
|
|
78
|
+
collectionId: collection.id,
|
|
79
|
+
resourceType: resource.type,
|
|
80
|
+
resourceId: resource.id
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
openRename() {
|
|
84
|
+
this.newName = this.collection.name;
|
|
85
|
+
},
|
|
86
|
+
renameCollection() {
|
|
87
|
+
if (this.newName) {
|
|
88
|
+
this.$emit("rename-collection", {
|
|
89
|
+
collectionId: this.collection.id,
|
|
90
|
+
name: this.newName
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
this.newName = null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var _sfc_render$1 = function render() {
|
|
98
|
+
var _vm = this, _c = _vm._self._c;
|
|
99
|
+
return _c("li", { staticClass: "collection-list-item" }, [_c("NcAvatar", { staticClass: "collection-avatar", attrs: { "display-name": _vm.collection.name, "allow-placeholder": "" } }), _vm.newName === null ? _c("span", { staticClass: "collection-item-name", attrs: { "title": "" }, on: { "click": _vm.showDetails } }, [_vm._v(_vm._s(_vm.collection.name))]) : _c("form", { class: { "should-shake": _vm.error }, on: { "submit": function($event) {
|
|
100
|
+
$event.preventDefault();
|
|
101
|
+
return _vm.renameCollection.apply(null, arguments);
|
|
102
|
+
} } }, [_c("input", { directives: [{ name: "model", rawName: "v-model", value: _vm.newName, expression: "newName" }], attrs: { "type": "text", "autocomplete": "off", "autocapitalize": "off" }, domProps: { "value": _vm.newName }, on: { "input": function($event) {
|
|
103
|
+
if ($event.target.composing) return;
|
|
104
|
+
_vm.newName = $event.target.value;
|
|
105
|
+
} } }), _c("input", { staticClass: "icon-confirm", attrs: { "type": "submit", "value": "" } })]), !_vm.detailsOpen && _vm.newName === null ? _c("div", { staticClass: "linked-icons" }, _vm._l(_vm.resources.slice(0, 2), function(resource) {
|
|
106
|
+
return _c(_vm.getComponent(resource).component, { key: resource.type + "|" + resource.id, tag: "component", class: _vm.typeClass(resource), attrs: { "title": resource.name, "to": _vm.getComponent(resource).to, "href": _vm.getComponent(resource).href } }, [_c("img", { attrs: { "src": _vm.iconUrl(resource), "alt": resource.name } })]);
|
|
107
|
+
}), 1) : _vm._e(), _vm.newName === null ? _c("span", { staticClass: "sharingOptionsGroup" }, [_c("NcActions", [_c("NcActionButton", { attrs: { "icon": "icon-info" }, on: { "click": function($event) {
|
|
108
|
+
$event.preventDefault();
|
|
109
|
+
return _vm.toggleDetails.apply(null, arguments);
|
|
110
|
+
} } }, [_vm._v(" " + _vm._s(_vm.detailsOpen ? _vm.t("Hide details") : _vm.t("Show details")) + " ")]), _c("NcActionButton", { attrs: { "icon": "icon-rename" }, on: { "click": function($event) {
|
|
111
|
+
$event.preventDefault();
|
|
112
|
+
return _vm.openRename.apply(null, arguments);
|
|
113
|
+
} } }, [_vm._v(" " + _vm._s(_vm.t("Rename project")) + " ")])], 1)], 1) : _vm._e(), _c("transition", { attrs: { "name": "fade" } }, [_vm.error ? _c("div", { staticClass: "error" }, [_vm._v(" " + _vm._s(_vm.error) + " ")]) : _vm._e()]), _c("transition", { attrs: { "name": "fade" } }, [_vm.detailsOpen ? _c("ul", { staticClass: "resource-list-details" }, _vm._l(_vm.resources, function(resource) {
|
|
114
|
+
return _c("li", { key: resource.type + "|" + resource.id, class: _vm.typeClass(resource) }, [_c(_vm.getComponent(resource).component, { tag: "component", attrs: { "to": _vm.getComponent(resource).to, "href": _vm.getComponent(resource).href } }, [_c("img", { attrs: { "src": _vm.iconUrl(resource), "alt": resource.name } }), _c("span", { staticClass: "resource-name" }, [_vm._v(_vm._s(resource.name || ""))])]), _c("span", { staticClass: "icon-close", on: { "click": function($event) {
|
|
115
|
+
return _vm.removeResource(_vm.collection, resource);
|
|
116
|
+
} } })], 1);
|
|
117
|
+
}), 0) : _vm._e()])], 1);
|
|
118
|
+
};
|
|
119
|
+
var _sfc_staticRenderFns$1 = [];
|
|
120
|
+
var __component__$1 = /* @__PURE__ */ normalizeComponent(
|
|
121
|
+
_sfc_main$1,
|
|
122
|
+
_sfc_render$1,
|
|
123
|
+
_sfc_staticRenderFns$1,
|
|
124
|
+
false,
|
|
125
|
+
null,
|
|
126
|
+
"878b819f",
|
|
127
|
+
null,
|
|
128
|
+
null
|
|
129
|
+
);
|
|
130
|
+
const NcCollectionListItem = __component__$1.exports;
|
|
131
|
+
function extractOcsData(response) {
|
|
132
|
+
return response.data.ocs.data;
|
|
133
|
+
}
|
|
134
|
+
function renameCollectionService(collectionId, collectionName) {
|
|
135
|
+
return axios.put(generateOcsUrl("collaboration/resources/collections/{collectionId}", { collectionId }), { collectionName }).then(extractOcsData);
|
|
136
|
+
}
|
|
137
|
+
function getCollectionsByResourceService(resourceType, resourceId) {
|
|
138
|
+
return axios.get(generateOcsUrl("collaboration/resources/{resourceType}/{resourceId}", { resourceType, resourceId })).then(extractOcsData);
|
|
139
|
+
}
|
|
140
|
+
function createCollectionService(resourceType, resourceId, name) {
|
|
141
|
+
return axios.post(generateOcsUrl("collaboration/resources/{resourceType}/{resourceId}", { resourceType, resourceId }), { name }).then(extractOcsData);
|
|
142
|
+
}
|
|
143
|
+
function addResourceService(collectionId, resourceType, resourceId) {
|
|
144
|
+
return axios.post(generateOcsUrl("collaboration/resources/collections/{collectionId}", { collectionId }), { resourceType, resourceId }).then(extractOcsData);
|
|
145
|
+
}
|
|
146
|
+
function removeResourceService(collectionId, resourceType, resourceId) {
|
|
147
|
+
return axios.delete(generateOcsUrl("collaboration/resources/collections/{collectionId}", { collectionId }), { params: { resourceType, resourceId } }).then(extractOcsData);
|
|
148
|
+
}
|
|
149
|
+
function searchService(query) {
|
|
150
|
+
return axios.get(generateOcsUrl("collaboration/resources/collections/search/{query}", { query })).then(extractOcsData);
|
|
151
|
+
}
|
|
152
|
+
function useCollections() {
|
|
153
|
+
const storedCollections = ref([]);
|
|
154
|
+
const addCollections = (collections) => {
|
|
155
|
+
set(storedCollections, "value", collections);
|
|
156
|
+
};
|
|
157
|
+
const addCollection = (collection) => {
|
|
158
|
+
set(storedCollections, "value", [...storedCollections.value, collection]);
|
|
159
|
+
};
|
|
160
|
+
const removeCollection = (collectionId) => {
|
|
161
|
+
set(storedCollections, "value", storedCollections.value.filter((item) => item.id !== collectionId));
|
|
162
|
+
};
|
|
163
|
+
const updateCollection = (collection) => {
|
|
164
|
+
const index = storedCollections.value.findIndex((item) => item.id === collection.id);
|
|
165
|
+
if (index !== -1) {
|
|
166
|
+
set(storedCollections.value, index, collection);
|
|
167
|
+
} else {
|
|
168
|
+
addCollection(collection);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
const fetchCollectionsByResource = async ({ resourceType, resourceId }) => {
|
|
172
|
+
const collections = await getCollectionsByResourceService(resourceType, resourceId);
|
|
173
|
+
addCollections(collections);
|
|
174
|
+
};
|
|
175
|
+
const createCollection = async ({ baseResourceType, baseResourceId, resourceType, resourceId, name }) => {
|
|
176
|
+
const collection = await createCollectionService(baseResourceType, baseResourceId, name);
|
|
177
|
+
addCollection(collection);
|
|
178
|
+
await addResourceToCollection({
|
|
179
|
+
collectionId: collection.id,
|
|
180
|
+
resourceType,
|
|
181
|
+
resourceId
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
const renameCollection = async ({ collectionId, name }) => {
|
|
185
|
+
const collection = await renameCollectionService(collectionId, name);
|
|
186
|
+
updateCollection(collection);
|
|
187
|
+
};
|
|
188
|
+
const addResourceToCollection = async ({ collectionId, resourceType, resourceId }) => {
|
|
189
|
+
const collection = await addResourceService(collectionId, resourceType, String(resourceId));
|
|
190
|
+
updateCollection(collection);
|
|
191
|
+
};
|
|
192
|
+
const removeResourceFromCollection = async ({ collectionId, resourceType, resourceId }) => {
|
|
193
|
+
const collection = await removeResourceService(collectionId, resourceType, String(resourceId));
|
|
194
|
+
if (collection.resources.length > 0) {
|
|
195
|
+
updateCollection(collection);
|
|
196
|
+
} else {
|
|
197
|
+
removeCollection(collectionId);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
return {
|
|
201
|
+
storedCollections,
|
|
202
|
+
fetchCollectionsByResource,
|
|
203
|
+
createCollection,
|
|
204
|
+
renameCollection,
|
|
205
|
+
addResourceToCollection,
|
|
206
|
+
removeResourceFromCollection
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
const METHOD_CREATE_COLLECTION = 0;
|
|
210
|
+
const METHOD_ADD_TO_COLLECTION = 1;
|
|
211
|
+
const _sfc_main = {
|
|
212
|
+
name: "NcCollectionList",
|
|
213
|
+
components: {
|
|
214
|
+
NcCollectionListItem,
|
|
215
|
+
NcAvatar,
|
|
216
|
+
NcSelect
|
|
217
|
+
},
|
|
218
|
+
props: {
|
|
219
|
+
/**
|
|
220
|
+
* Resource type identifier
|
|
221
|
+
*/
|
|
222
|
+
type: {
|
|
223
|
+
type: String,
|
|
224
|
+
default: null
|
|
225
|
+
},
|
|
226
|
+
/**
|
|
227
|
+
* Unique id of the resource
|
|
228
|
+
*/
|
|
229
|
+
id: {
|
|
230
|
+
type: String,
|
|
231
|
+
default: null
|
|
232
|
+
},
|
|
233
|
+
/**
|
|
234
|
+
* Name of the resource
|
|
235
|
+
*/
|
|
236
|
+
name: {
|
|
237
|
+
type: String,
|
|
238
|
+
default: ""
|
|
239
|
+
},
|
|
240
|
+
/**
|
|
241
|
+
* Whether the component is active (to start fetch resources)
|
|
242
|
+
*/
|
|
243
|
+
isActive: {
|
|
244
|
+
type: Boolean,
|
|
245
|
+
default: true
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
setup() {
|
|
249
|
+
const {
|
|
250
|
+
storedCollections,
|
|
251
|
+
fetchCollectionsByResource,
|
|
252
|
+
createCollection,
|
|
253
|
+
addResourceToCollection,
|
|
254
|
+
removeResourceFromCollection,
|
|
255
|
+
renameCollection
|
|
256
|
+
} = useCollections();
|
|
257
|
+
const searchCollections = ref([]);
|
|
258
|
+
const search = debounce(function(query, loading) {
|
|
259
|
+
if (query !== "") {
|
|
260
|
+
loading(true);
|
|
261
|
+
searchService(query).then((collections) => {
|
|
262
|
+
searchCollections.value = collections;
|
|
263
|
+
}).catch((e) => {
|
|
264
|
+
console.error("Failed to search for collections", e);
|
|
265
|
+
}).finally(() => {
|
|
266
|
+
loading(false);
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
}, 500);
|
|
270
|
+
return {
|
|
271
|
+
storedCollections,
|
|
272
|
+
fetchCollectionsByResource,
|
|
273
|
+
createCollection,
|
|
274
|
+
addResourceToCollection,
|
|
275
|
+
removeResourceFromCollection,
|
|
276
|
+
renameCollection,
|
|
277
|
+
searchCollections,
|
|
278
|
+
search
|
|
279
|
+
};
|
|
280
|
+
},
|
|
281
|
+
data() {
|
|
282
|
+
return {
|
|
283
|
+
selectIsOpen: false,
|
|
284
|
+
generatingCodes: false,
|
|
285
|
+
codes: void 0,
|
|
286
|
+
value: null,
|
|
287
|
+
model: {},
|
|
288
|
+
collectionsError: {},
|
|
289
|
+
error: null,
|
|
290
|
+
isSelectOpen: false
|
|
291
|
+
};
|
|
292
|
+
},
|
|
293
|
+
computed: {
|
|
294
|
+
collections() {
|
|
295
|
+
return this.storedCollections.filter(
|
|
296
|
+
(collection) => collection.resources.some((resource) => resource && resource.id === String(this.id) && resource.type === this.type)
|
|
297
|
+
);
|
|
298
|
+
},
|
|
299
|
+
placeholder() {
|
|
300
|
+
return this.isSelectOpen ? t("Type to search for existing projects") : t("Add to a project");
|
|
301
|
+
},
|
|
302
|
+
options() {
|
|
303
|
+
const options = [];
|
|
304
|
+
window.OCP.Collaboration.getTypes().sort().forEach((type) => {
|
|
305
|
+
options.push({
|
|
306
|
+
method: METHOD_CREATE_COLLECTION,
|
|
307
|
+
type,
|
|
308
|
+
title: window.OCP.Collaboration.getLabel(type),
|
|
309
|
+
class: window.OCP.Collaboration.getIcon(type),
|
|
310
|
+
action: () => window.OCP.Collaboration.trigger(type)
|
|
311
|
+
});
|
|
312
|
+
});
|
|
313
|
+
for (const index in this.searchCollections) {
|
|
314
|
+
if (!this.collections.find((collection) => collection.id === this.searchCollections[index].id)) {
|
|
315
|
+
options.push({
|
|
316
|
+
method: METHOD_ADD_TO_COLLECTION,
|
|
317
|
+
title: this.searchCollections[index].name,
|
|
318
|
+
collectionId: this.searchCollections[index].id
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return options;
|
|
323
|
+
},
|
|
324
|
+
resourceIdentifier() {
|
|
325
|
+
return {
|
|
326
|
+
resourceType: this.type,
|
|
327
|
+
resourceId: this.id,
|
|
328
|
+
isActive: this.isActive
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
watch: {
|
|
333
|
+
resourceIdentifier: {
|
|
334
|
+
deep: true,
|
|
335
|
+
immediate: true,
|
|
336
|
+
handler(resourceIdentifier) {
|
|
337
|
+
if (!resourceIdentifier.isActive || !resourceIdentifier.resourceId || !resourceIdentifier.resourceType) {
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
this.fetchCollectionsByResource(resourceIdentifier);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
methods: {
|
|
345
|
+
t,
|
|
346
|
+
select(selectedOption) {
|
|
347
|
+
if (selectedOption.method === METHOD_CREATE_COLLECTION) {
|
|
348
|
+
selectedOption.action().then((resourceId) => {
|
|
349
|
+
this.createCollection({
|
|
350
|
+
baseResourceType: this.type,
|
|
351
|
+
baseResourceId: this.id,
|
|
352
|
+
resourceType: selectedOption.type,
|
|
353
|
+
resourceId,
|
|
354
|
+
name: this.name
|
|
355
|
+
}).catch((e) => {
|
|
356
|
+
this.setError(t("Failed to create a project"), e);
|
|
357
|
+
});
|
|
358
|
+
}).catch((e) => {
|
|
359
|
+
console.error("No resource selected", e);
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
if (selectedOption.method === METHOD_ADD_TO_COLLECTION) {
|
|
363
|
+
this.addResourceToCollection({
|
|
364
|
+
collectionId: selectedOption.collectionId,
|
|
365
|
+
resourceType: this.type,
|
|
366
|
+
resourceId: this.id
|
|
367
|
+
}).catch((e) => {
|
|
368
|
+
this.setError(t("Failed to add the item to the project"), e);
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
this.value = null;
|
|
372
|
+
},
|
|
373
|
+
showSelect() {
|
|
374
|
+
this.selectIsOpen = true;
|
|
375
|
+
this.$refs.select.$el.focus();
|
|
376
|
+
},
|
|
377
|
+
setError(error, e) {
|
|
378
|
+
console.error(error, e);
|
|
379
|
+
this.error = error;
|
|
380
|
+
setTimeout(() => {
|
|
381
|
+
this.error = null;
|
|
382
|
+
}, 5e3);
|
|
383
|
+
},
|
|
384
|
+
renameCollectionFromItem({ collectionId, name }) {
|
|
385
|
+
this.renameCollection({ collectionId, name }).catch((e) => {
|
|
386
|
+
console.error(t("Failed to rename the project"), e);
|
|
387
|
+
this.collectionsError[collectionId] = t("Failed to rename the project");
|
|
388
|
+
setTimeout(() => {
|
|
389
|
+
this.collectionsError[collectionId] = null;
|
|
390
|
+
}, 5e3);
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
var _sfc_render = function render2() {
|
|
396
|
+
var _vm = this, _c = _vm._self._c;
|
|
397
|
+
return _vm.collections && _vm.type && _vm.id ? _c("ul", { staticClass: "collection-list", attrs: { "id": "collection-list" } }, [_c("li", { on: { "click": _vm.showSelect } }, [_vm._m(0), _c("div", { attrs: { "id": "collection-select-container" } }, [_c("NcSelect", { ref: "select", attrs: { "aria-label-combobox": _vm.t("Add to a project"), "options": _vm.options, "placeholder": _vm.placeholder, "label": "title", "limit": 5 }, on: { "close": function($event) {
|
|
398
|
+
_vm.isSelectOpen = false;
|
|
399
|
+
}, "open": function($event) {
|
|
400
|
+
_vm.isSelectOpen = true;
|
|
401
|
+
}, "option:selected": _vm.select, "search": _vm.search }, scopedSlots: _vm._u([{ key: "selected-option", fn: function(option) {
|
|
402
|
+
return [_c("span", { staticClass: "option__desc" }, [_c("span", { staticClass: "option__title" }, [_vm._v(_vm._s(option.title))])])];
|
|
403
|
+
} }, { key: "option", fn: function(option) {
|
|
404
|
+
return [_c("span", { staticClass: "option__wrapper" }, [option.class ? _c("span", { staticClass: "avatar", class: option.class }) : option.method !== 2 ? _c("NcAvatar", { attrs: { "allow-placeholder": "", "display-name": option.title } }) : _vm._e(), _c("span", { staticClass: "option__title" }, [_vm._v(_vm._s(option.title))])], 1)];
|
|
405
|
+
} }], null, false, 2397208459), model: { value: _vm.value, callback: function($$v) {
|
|
406
|
+
_vm.value = $$v;
|
|
407
|
+
}, expression: "value" } }, [_c("p", { staticClass: "hint" }, [_vm._v(" " + _vm._s(_vm.t("Connect items to a project to make them easier to find")) + " ")])])], 1)]), _c("transition", { attrs: { "name": "fade" } }, [_vm.error ? _c("li", { staticClass: "error" }, [_vm._v(" " + _vm._s(_vm.error) + " ")]) : _vm._e()]), _vm._l(_vm.collections, function(collection) {
|
|
408
|
+
return _c("NcCollectionListItem", { key: collection.id, attrs: { "collection": collection, "error": _vm.collectionsError[collection.id] }, on: { "rename-collection": _vm.renameCollectionFromItem, "remove-resource": _vm.removeResourceFromCollection } });
|
|
409
|
+
})], 2) : _vm._e();
|
|
410
|
+
};
|
|
411
|
+
var _sfc_staticRenderFns = [function() {
|
|
412
|
+
var _vm = this, _c = _vm._self._c;
|
|
413
|
+
return _c("div", { staticClass: "avatar" }, [_c("span", { staticClass: "icon-projects" })]);
|
|
414
|
+
}];
|
|
415
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
416
|
+
_sfc_main,
|
|
417
|
+
_sfc_render,
|
|
418
|
+
_sfc_staticRenderFns,
|
|
419
|
+
false,
|
|
420
|
+
null,
|
|
421
|
+
"efe8beb8",
|
|
422
|
+
null,
|
|
423
|
+
null
|
|
424
|
+
);
|
|
425
|
+
const NcCollectionList = __component__.exports;
|
|
426
|
+
export {
|
|
427
|
+
NcCollectionList as N
|
|
428
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcCollectionList-Csni5btL.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.js'\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: 44px;\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-left: 44px;\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-right: 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, set } 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\tset(storedCollections, 'value', collections)\n\t}\n\n\tconst addCollection = (collection) => {\n\t\tset(storedCollections, 'value', [...storedCollections.value, collection])\n\t}\n\n\tconst removeCollection = (collectionId) => {\n\t\tset(storedCollections, '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\tset(storedCollections.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"],"mappings":";;;;;;;;;;;;;AA2EA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IAEA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,mBAAA,mBAAA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,aAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,UAAA;AACA,aAAA,CAAA,aAAA,CAAA,SAAA,SAAA;AAAA,IACA;AAAA,IAEA,YAAA;AACA,aAAA,CAAA,aAAA,mBAAA,SAAA;AAAA,IACA;AAAA,IAEA,YAAA;;AAEA,cAAA,gBAAA,WAAA,cAAA,mBAAA,OAAA,cAAA,CAAA,MAAA,QAAA,QAAA,OAAA,YAAA,CAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,aAAA,CAAA,aAAA;AACA,cAAA,QAAA,SAAA,KAAA,SAAA,SAAA,IAAA;AAEA,eAAA,QACA,EAAA,WAAA,eAAA,IAAA,OAAA,MAAA,OAAA,IACA,EAAA,WAAA,KAAA,IAAA,QAAA,MAAA,SAAA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,UAAA;AACA,aAAA,CAAA,aAAA;AACA,YAAA,SAAA,UAAA;AACA,iBAAA,GAAA,SAAA,WAAA,SAAA,QAAA;AAAA,QACA;AACA,YAAA,SAAA,SAAA;AACA,iBAAA,SAAA;AAAA,QACA;AACA,eAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAE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