@nextcloud/vue 8.9.1 → 8.10.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 +28 -0
- package/README.md +4 -2
- package/dist/Components/NcActionButtonGroup.cjs +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +1 -1
- package/dist/Components/NcActionInput.cjs +1 -1
- package/dist/Components/NcActionInput.mjs +1 -1
- package/dist/Components/NcActions.cjs +1 -1
- package/dist/Components/NcActions.mjs +1 -1
- package/dist/Components/NcAppContent.cjs +1 -1
- package/dist/Components/NcAppContent.mjs +1 -1
- package/dist/Components/NcAppNavigation.cjs +1 -1
- package/dist/Components/NcAppNavigation.mjs +1 -1
- package/dist/Components/NcAppNavigationCaption.cjs +1 -1
- package/dist/Components/NcAppNavigationCaption.mjs +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +1 -1
- package/dist/Components/NcAppNavigationList.cjs +6 -6
- package/dist/Components/NcAppNavigationList.cjs.map +1 -1
- package/dist/Components/NcAppNavigationList.mjs +8 -8
- package/dist/Components/NcAppNavigationList.mjs.map +1 -1
- package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +1 -1
- package/dist/Components/NcAppSidebar.cjs +1 -1
- package/dist/Components/NcAppSidebar.mjs +1 -1
- package/dist/Components/NcAvatar.cjs +1 -1
- package/dist/Components/NcAvatar.mjs +1 -1
- package/dist/Components/NcBreadcrumb.cjs +1 -1
- package/dist/Components/NcBreadcrumb.mjs +1 -1
- package/dist/Components/NcBreadcrumbs.cjs +1 -1
- package/dist/Components/NcBreadcrumbs.mjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
- package/dist/Components/NcColorPicker.cjs +1 -1
- package/dist/Components/NcColorPicker.mjs +1 -1
- package/dist/Components/NcContent.cjs +1 -1
- package/dist/Components/NcContent.mjs +1 -1
- package/dist/Components/NcDashboardWidget.cjs +1 -1
- package/dist/Components/NcDashboardWidget.mjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
- package/dist/Components/NcDateTime.cjs +1 -1
- package/dist/Components/NcDateTime.mjs +1 -1
- package/dist/Components/NcDateTimePicker.cjs +2 -2
- package/dist/Components/NcDateTimePicker.mjs +4 -4
- package/dist/Components/NcDateTimePickerNative.cjs +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +1 -1
- package/dist/Components/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcListItem.cjs +1 -1
- package/dist/Components/NcListItem.mjs +1 -1
- package/dist/Components/NcListItemIcon.cjs +1 -1
- package/dist/Components/NcListItemIcon.mjs +1 -1
- package/dist/Components/NcModal.cjs +1 -1
- package/dist/Components/NcModal.mjs +3 -3
- 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 +1 -1
- package/dist/Components/NcRichContenteditable.mjs +2 -2
- package/dist/Components/NcRichText.cjs +1 -1
- package/dist/Components/NcRichText.mjs +3 -3
- package/dist/Components/NcSelect.cjs +1 -1
- package/dist/Components/NcSelect.mjs +1 -1
- package/dist/Components/NcSelectTags.cjs +1 -1
- package/dist/Components/NcSelectTags.mjs +1 -1
- package/dist/Components/NcSettingsInputText.cjs +1 -1
- package/dist/Components/NcSettingsInputText.mjs +1 -1
- package/dist/Components/NcSettingsSection.cjs +1 -1
- package/dist/Components/NcSettingsSection.mjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
- package/dist/Components/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/richEditor.cjs +1 -1
- package/dist/Mixins/richEditor.mjs +1 -1
- package/dist/assets/{NcActions-CEbgl0_n.css → NcActions-DL7ZZIjx.css} +12 -12
- package/dist/assets/{NcAppContent-Cv8rRTyy.css → NcAppContent-DcXMrsBz.css} +32 -23
- package/dist/assets/{NcAppNavigation-D2eVie5R.css → NcAppNavigation-BgGJuJPv.css} +15 -9
- package/dist/assets/{NcAppNavigationList-BGig8-Dj.css → NcAppNavigationList-CUnaMQQD.css} +4 -8
- package/dist/assets/{NcDateTimePicker-C3D1hmlB.css → NcDateTimePicker-DR7jRFm4.css} +10 -10
- package/dist/assets/NcListItem-DLFj1G31.css +175 -0
- package/dist/assets/{NcRelatedResourcesPanel-COW9gzml.css → NcRelatedResourcesPanel-D6K7OQFJ.css} +19 -13
- package/dist/assets/{NcRichContenteditable-CtbqXSHe.css → NcRichContenteditable-DvTdg1DO.css} +12 -12
- package/dist/assets/{NcRichText-BMe-xENJ.css → NcRichText-D2BBsB-_.css} +65 -65
- package/dist/assets/{referencePickerModal-C1KJzICb.css → referencePickerModal-DZ7qJeiJ.css} +19 -19
- package/dist/chunks/{GenColors-vI-bx9ZY.cjs → GenColors-DQEIzxqb.cjs} +1 -1
- package/dist/chunks/{GenColors-vI-bx9ZY.cjs.map → GenColors-DQEIzxqb.cjs.map} +1 -1
- package/dist/chunks/{GenColors-BteFtwOv.mjs → GenColors-SIdMEx1i.mjs} +1 -1
- package/dist/chunks/{GenColors-BteFtwOv.mjs.map → GenColors-SIdMEx1i.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-BdxkXNwc.cjs → NcActionButtonGroup-B47_9Jpc.cjs} +1 -1
- package/dist/chunks/{NcActionButtonGroup-BdxkXNwc.cjs.map → NcActionButtonGroup-B47_9Jpc.cjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-SS3PkUD2.mjs → NcActionButtonGroup-D6_CIr2e.mjs} +1 -1
- package/dist/chunks/{NcActionButtonGroup-SS3PkUD2.mjs.map → NcActionButtonGroup-D6_CIr2e.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-D308ZntG.cjs → NcActionInput-BPPLjfW5.cjs} +1 -1
- package/dist/chunks/{NcActionInput-D308ZntG.cjs.map → NcActionInput-BPPLjfW5.cjs.map} +1 -1
- package/dist/chunks/{NcActionInput-BHq3Le0q.mjs → NcActionInput-GZcIfn-2.mjs} +4 -4
- package/dist/chunks/{NcActionInput-BHq3Le0q.mjs.map → NcActionInput-GZcIfn-2.mjs.map} +1 -1
- package/dist/chunks/{NcActions-Dfkog_G0.cjs → NcActions-B049TCK5.cjs} +144 -85
- package/dist/chunks/NcActions-B049TCK5.cjs.map +1 -0
- package/dist/chunks/{NcActions-CpU9WXzM.mjs → NcActions-D2wvJbMw.mjs} +144 -85
- package/dist/chunks/NcActions-D2wvJbMw.mjs.map +1 -0
- package/dist/chunks/{NcAppContent-BDwOdxJE.mjs → NcAppContent-CUnQ4EVa.mjs} +67 -40
- package/dist/chunks/NcAppContent-CUnQ4EVa.mjs.map +1 -0
- package/dist/chunks/{NcAppContent-kqYjKpzU.cjs → NcAppContent-CuOJJPbt.cjs} +59 -32
- package/dist/chunks/NcAppContent-CuOJJPbt.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-C1Qe3lsk.mjs → NcAppNavigation-Dl1g_orJ.mjs} +25 -23
- package/dist/chunks/NcAppNavigation-Dl1g_orJ.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-C423R_m2.cjs → NcAppNavigation-DtxPGDOf.cjs} +25 -24
- package/dist/chunks/NcAppNavigation-DtxPGDOf.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationCaption-BKchbDsJ.cjs → NcAppNavigationCaption-BefNtbTx.cjs} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-BKchbDsJ.cjs.map → NcAppNavigationCaption-BefNtbTx.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-DsT6O4Hx.mjs → NcAppNavigationCaption-g4NsNSvL.mjs} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-DsT6O4Hx.mjs.map → NcAppNavigationCaption-g4NsNSvL.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-bjPcEx5D.mjs → NcAppNavigationItem-BSV20azN.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationItem-bjPcEx5D.mjs.map → NcAppNavigationItem-BSV20azN.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-CABF2T4q.cjs → NcAppNavigationItem-DVlpQH-e.cjs} +1 -1
- package/dist/chunks/{NcAppNavigationItem-CABF2T4q.cjs.map → NcAppNavigationItem-DVlpQH-e.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-BHCgaCoK.mjs → NcAppNavigationNewItem-C7PviElx.mjs} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-BHCgaCoK.mjs.map → NcAppNavigationNewItem-C7PviElx.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-t45tM5u1.cjs → NcAppNavigationNewItem-DG-KzABc.cjs} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-t45tM5u1.cjs.map → NcAppNavigationNewItem-DG-KzABc.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-CBeUiVLk.cjs → NcAppNavigationSettings-CoutbNdC.cjs} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-CBeUiVLk.cjs.map → NcAppNavigationSettings-CoutbNdC.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-BQD7JA4m.mjs → NcAppNavigationSettings-D8MkJD-a.mjs} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-BQD7JA4m.mjs.map → NcAppNavigationSettings-D8MkJD-a.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-DDChOnAq.cjs → NcAppNavigationToggle-ACf6tmPq.cjs} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-DDChOnAq.cjs.map → NcAppNavigationToggle-ACf6tmPq.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-BZxbkhCr.mjs → NcAppNavigationToggle-n8ES2H5d.mjs} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-BZxbkhCr.mjs.map → NcAppNavigationToggle-n8ES2H5d.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-DeFBTD2J.mjs → NcAppSettingsDialog-CmQPplb5.mjs} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-DeFBTD2J.mjs.map → NcAppSettingsDialog-CmQPplb5.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-EUys9Os_.cjs → NcAppSettingsDialog-DYr9eXTI.cjs} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-EUys9Os_.cjs.map → NcAppSettingsDialog-DYr9eXTI.cjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-Du-IRmEO.cjs → NcAppSidebar-BsbmJ5H_.cjs} +2 -2
- package/dist/chunks/{NcAppSidebar-Du-IRmEO.cjs.map → NcAppSidebar-BsbmJ5H_.cjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-CdSvRI6l.mjs → NcAppSidebar-CSjqjYTb.mjs} +3 -3
- package/dist/chunks/{NcAppSidebar-CdSvRI6l.mjs.map → NcAppSidebar-CSjqjYTb.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-e0M-nnF6.mjs → NcAvatar-BdtXzaRJ.mjs} +4 -4
- package/dist/chunks/{NcAvatar-e0M-nnF6.mjs.map → NcAvatar-BdtXzaRJ.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-BEet_8fB.cjs → NcAvatar-Bn9oT7sS.cjs} +2 -2
- package/dist/chunks/{NcAvatar-BEet_8fB.cjs.map → NcAvatar-Bn9oT7sS.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-CVMyBckA.mjs → NcBreadcrumb-D8yGqnFJ.mjs} +1 -1
- package/dist/chunks/{NcBreadcrumb-CVMyBckA.mjs.map → NcBreadcrumb-D8yGqnFJ.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-DVXsgQkE.cjs → NcBreadcrumb-DApyHRGZ.cjs} +1 -1
- package/dist/chunks/{NcBreadcrumb-DVXsgQkE.cjs.map → NcBreadcrumb-DApyHRGZ.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-DkgzO9f5.cjs → NcBreadcrumbs-BoA2lxaY.cjs} +1 -1
- package/dist/chunks/{NcBreadcrumbs-DkgzO9f5.cjs.map → NcBreadcrumbs-BoA2lxaY.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-DqRU0BfB.mjs → NcBreadcrumbs-DVyfjkgH.mjs} +2 -2
- package/dist/chunks/{NcBreadcrumbs-DqRU0BfB.mjs.map → NcBreadcrumbs-DVyfjkgH.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-Dt96X5bR.cjs → NcCheckboxRadioSwitch-BEYj-jaN.cjs} +2 -2
- package/dist/chunks/{NcCheckboxRadioSwitch-Dt96X5bR.cjs.map → NcCheckboxRadioSwitch-BEYj-jaN.cjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-7Yib86y3.mjs → NcCheckboxRadioSwitch-DiNnRbJI.mjs} +2 -2
- package/dist/chunks/{NcCheckboxRadioSwitch-7Yib86y3.mjs.map → NcCheckboxRadioSwitch-DiNnRbJI.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-CKROuACA.mjs → NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-DMJGZndr.mjs} +1 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-DMJGZndr.mjs.map +1 -0
- package/dist/chunks/{NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-C1WLneXl.cjs → NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-Dh3GUSYj.cjs} +1 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-Dh3GUSYj.cjs.map +1 -0
- package/dist/chunks/{NcColorPicker-BVqwn1Fr.cjs → NcColorPicker-Acx2mFFG.cjs} +1 -1
- package/dist/chunks/{NcColorPicker-BVqwn1Fr.cjs.map → NcColorPicker-Acx2mFFG.cjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-Dkxeigs5.mjs → NcColorPicker-sge8Yr9m.mjs} +2 -2
- package/dist/chunks/{NcColorPicker-Dkxeigs5.mjs.map → NcColorPicker-sge8Yr9m.mjs.map} +1 -1
- package/dist/chunks/{NcContent-Bmeq8hLO.cjs → NcContent-COHfXhM3.cjs} +1 -1
- package/dist/chunks/{NcContent-Bmeq8hLO.cjs.map → NcContent-COHfXhM3.cjs.map} +1 -1
- package/dist/chunks/{NcContent-COIw1X7V.mjs → NcContent-kTlEGtKt.mjs} +1 -1
- package/dist/chunks/{NcContent-COIw1X7V.mjs.map → NcContent-kTlEGtKt.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-Cxz_n1AN.mjs → NcDashboardWidget-CL7e1yAw.mjs} +3 -3
- package/dist/chunks/{NcDashboardWidget-Cxz_n1AN.mjs.map → NcDashboardWidget-CL7e1yAw.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-DArU3jbL.cjs → NcDashboardWidget-CyrKw12p.cjs} +1 -1
- package/dist/chunks/{NcDashboardWidget-DArU3jbL.cjs.map → NcDashboardWidget-CyrKw12p.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-BAhzcFfs.cjs → NcDashboardWidgetItem-C6Npm5U9.cjs} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-BAhzcFfs.cjs.map → NcDashboardWidgetItem-C6Npm5U9.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-BV2tuXoj.mjs → NcDashboardWidgetItem-Cq-HAbIB.mjs} +2 -2
- package/dist/chunks/{NcDashboardWidgetItem-BV2tuXoj.mjs.map → NcDashboardWidgetItem-Cq-HAbIB.mjs.map} +1 -1
- package/dist/chunks/{NcDateTime-B0oaElJX.mjs → NcDateTime-B1X22iSf.mjs} +1 -1
- package/dist/chunks/{NcDateTime-B0oaElJX.mjs.map → NcDateTime-B1X22iSf.mjs.map} +1 -1
- package/dist/chunks/{NcDateTime-Dl0XztMt.cjs → NcDateTime-CyKYSWsT.cjs} +1 -1
- package/dist/chunks/{NcDateTime-Dl0XztMt.cjs.map → NcDateTime-CyKYSWsT.cjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-BCdoIKXJ.cjs → NcEmojiPicker-DuZc08BD.cjs} +1 -1
- package/dist/chunks/{NcEmojiPicker-BCdoIKXJ.cjs.map → NcEmojiPicker-DuZc08BD.cjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-fRx7dTTf.mjs → NcEmojiPicker-r6eAlCKl.mjs} +4 -4
- package/dist/chunks/{NcEmojiPicker-fRx7dTTf.mjs.map → NcEmojiPicker-r6eAlCKl.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-DpgXTGmT.cjs → NcInputConfirmCancel-DAaMkW9I.cjs} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-DpgXTGmT.cjs.map → NcInputConfirmCancel-DAaMkW9I.cjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-BXZqwqY6.mjs → NcInputConfirmCancel-fwl4-RD4.mjs} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-BXZqwqY6.mjs.map → NcInputConfirmCancel-fwl4-RD4.mjs.map} +1 -1
- package/dist/chunks/{NcListItem-wxqWqs4s.cjs → NcListItem-8heZoa83.cjs} +28 -23
- package/dist/chunks/NcListItem-8heZoa83.cjs.map +1 -0
- package/dist/chunks/{NcListItem-C5oWvAZQ.mjs → NcListItem-DxnCJdGU.mjs} +27 -22
- package/dist/chunks/NcListItem-DxnCJdGU.mjs.map +1 -0
- package/dist/chunks/{NcListItemIcon-DfdkSCin.cjs → NcListItemIcon-D5NW3bY2.cjs} +1 -1
- package/dist/chunks/{NcListItemIcon-DfdkSCin.cjs.map → NcListItemIcon-D5NW3bY2.cjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-WH9TUCxb.mjs → NcListItemIcon-DyE902SK.mjs} +1 -1
- package/dist/chunks/{NcListItemIcon-WH9TUCxb.mjs.map → NcListItemIcon-DyE902SK.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-BPAivxc_.mjs → NcPasswordField-BeIfZq-I.mjs} +1 -1
- package/dist/chunks/{NcPasswordField-BPAivxc_.mjs.map → NcPasswordField-BeIfZq-I.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-BgNcvN0V.cjs → NcPasswordField-Bx3rarNt.cjs} +1 -1
- package/dist/chunks/{NcPasswordField-BgNcvN0V.cjs.map → NcPasswordField-Bx3rarNt.cjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-Cp8Au2iI.cjs → NcRelatedResourcesPanel-BmE02hfU.cjs} +4 -4
- package/dist/chunks/NcRelatedResourcesPanel-BmE02hfU.cjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-LTNqJecS.mjs → NcRelatedResourcesPanel-C8HsjDiN.mjs} +8 -8
- package/dist/chunks/NcRelatedResourcesPanel-C8HsjDiN.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-CHggLQuR.mjs → NcRichContenteditable-COl1GELF.mjs} +35 -26
- package/dist/chunks/NcRichContenteditable-COl1GELF.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-hT5m_2tr.cjs → NcRichContenteditable-DVCrsKyc.cjs} +41 -32
- package/dist/chunks/NcRichContenteditable-DVCrsKyc.cjs.map +1 -0
- package/dist/chunks/{NcRichText-BBXbh0Hh.mjs → NcRichText-BEoKx41c.mjs} +45 -29
- package/dist/chunks/NcRichText-BEoKx41c.mjs.map +1 -0
- package/dist/chunks/{NcRichText-BWX8BLVh.cjs → NcRichText-Dow2nMvP.cjs} +35 -19
- package/dist/chunks/NcRichText-Dow2nMvP.cjs.map +1 -0
- package/dist/chunks/{NcSelect-BVmjiQFa.mjs → NcSelect-C_dMqtoe.mjs} +2 -2
- package/dist/chunks/{NcSelect-BVmjiQFa.mjs.map → NcSelect-C_dMqtoe.mjs.map} +1 -1
- package/dist/chunks/{NcSelect-DjTSAsNL.cjs → NcSelect-CyESQ4uQ.cjs} +1 -1
- package/dist/chunks/{NcSelect-DjTSAsNL.cjs.map → NcSelect-CyESQ4uQ.cjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-BJvxyO8E.cjs → NcSelectTags-Bl95j2Kh.cjs} +1 -1
- package/dist/chunks/{NcSelectTags-BJvxyO8E.cjs.map → NcSelectTags-Bl95j2Kh.cjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-Ccv-eQzZ.mjs → NcSelectTags-BoX-3tOa.mjs} +2 -2
- package/dist/chunks/{NcSelectTags-Ccv-eQzZ.mjs.map → NcSelectTags-BoX-3tOa.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-CcO2Du6E.cjs → NcSettingsInputText-DlBTOZRv.cjs} +1 -1
- package/dist/chunks/{NcSettingsInputText-CcO2Du6E.cjs.map → NcSettingsInputText-DlBTOZRv.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-DXxmqvcd.mjs → NcSettingsInputText-fLyjAE06.mjs} +1 -1
- package/dist/chunks/{NcSettingsInputText-DXxmqvcd.mjs.map → NcSettingsInputText-fLyjAE06.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-DBe4fKFA.mjs → NcSettingsSection-COSdi50c.mjs} +1 -1
- package/dist/chunks/{NcSettingsSection-DBe4fKFA.mjs.map → NcSettingsSection-COSdi50c.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-qgIYSB_M.cjs → NcSettingsSection-CoHKnYDP.cjs} +1 -1
- package/dist/chunks/{NcSettingsSection-qgIYSB_M.cjs.map → NcSettingsSection-CoHKnYDP.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-DD8PEgvQ.cjs → NcSettingsSelectGroup-2wsNrz7x.cjs} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-DD8PEgvQ.cjs.map → NcSettingsSelectGroup-2wsNrz7x.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-d2TLOW1O.mjs → NcSettingsSelectGroup-BZG67QrR.mjs} +2 -2
- package/dist/chunks/{NcSettingsSelectGroup-d2TLOW1O.mjs.map → NcSettingsSelectGroup-BZG67QrR.mjs.map} +1 -1
- package/dist/chunks/{NcTextField-CU-YIhL3.mjs → NcTextField-BEpgHsY2.mjs} +1 -1
- package/dist/chunks/{NcTextField-CU-YIhL3.mjs.map → NcTextField-BEpgHsY2.mjs.map} +1 -1
- package/dist/chunks/{NcTextField-CsnzlYWD.cjs → NcTextField-C-2-Of6b.cjs} +1 -1
- package/dist/chunks/{NcTextField-CsnzlYWD.cjs.map → NcTextField-C-2-Of6b.cjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-C-Ci2IuC.cjs → NcTimezonePicker-BMlKQe6-.cjs} +1 -1
- package/dist/chunks/{NcTimezonePicker-C-Ci2IuC.cjs.map → NcTimezonePicker-BMlKQe6-.cjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-gvp9MAcg.mjs → NcTimezonePicker-JJeMG5Mo.mjs} +2 -2
- package/dist/chunks/{NcTimezonePicker-gvp9MAcg.mjs.map → NcTimezonePicker-JJeMG5Mo.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-COhpp9l_.cjs → NcUserBubble-DMBDwtwW.cjs} +1 -1
- package/dist/chunks/{NcUserBubble-COhpp9l_.cjs.map → NcUserBubble-DMBDwtwW.cjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-CbufscPi.mjs → NcUserBubble-RZlZRmxZ.mjs} +1 -1
- package/dist/chunks/{NcUserBubble-CbufscPi.mjs.map → NcUserBubble-RZlZRmxZ.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-C7dfcW39.cjs → NcUserStatusIcon-7yBYL8ur.cjs} +4 -4
- package/dist/chunks/NcUserStatusIcon-7yBYL8ur.cjs.map +1 -0
- package/dist/chunks/{NcUserStatusIcon-0SGYQL9L.mjs → NcUserStatusIcon-DMQxYiY6.mjs} +9 -9
- package/dist/chunks/NcUserStatusIcon-DMQxYiY6.mjs.map +1 -0
- package/dist/chunks/{ScopeComponent-DFDrMcn0.mjs → ScopeComponent-9FoStIVM.mjs} +1 -1
- package/dist/chunks/{ScopeComponent-DFDrMcn0.mjs.map → ScopeComponent-9FoStIVM.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-DXQGLon_.cjs → ScopeComponent-DdL1psE0.cjs} +1 -1
- package/dist/chunks/{ScopeComponent-DXQGLon_.cjs.map → ScopeComponent-DdL1psE0.cjs.map} +1 -1
- package/dist/chunks/{_l10n-D8Scz3mH.mjs → _l10n-CAwwH-o2.mjs} +3 -3
- package/dist/chunks/_l10n-CAwwH-o2.mjs.map +1 -0
- package/dist/chunks/{_l10n-B986q8RC.cjs → _l10n-DZggkcVs.cjs} +3 -3
- package/dist/chunks/_l10n-DZggkcVs.cjs.map +1 -0
- package/dist/chunks/{index-DYXjj9ET.mjs → index-BAVa4G2v.mjs} +31 -31
- package/dist/chunks/index-BAVa4G2v.mjs.map +1 -0
- package/dist/chunks/{index-CIsMzBte.cjs → index-CVsxVZon.cjs} +19 -19
- package/dist/chunks/index-CVsxVZon.cjs.map +1 -0
- package/dist/chunks/{referencePickerModal-DUhJWt2e.mjs → referencePickerModal-CtIcJRWz.mjs} +417 -414
- package/dist/chunks/referencePickerModal-CtIcJRWz.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-DV7-XzCc.cjs → referencePickerModal-Ig4S8WI3.cjs} +298 -295
- package/dist/chunks/referencePickerModal-Ig4S8WI3.cjs.map +1 -0
- package/dist/chunks/{usernameToColor-iYF-oKTP.mjs → usernameToColor-3Z3jKEos.mjs} +1 -1
- package/dist/chunks/{usernameToColor-iYF-oKTP.mjs.map → usernameToColor-3Z3jKEos.mjs.map} +1 -1
- package/dist/chunks/{usernameToColor-DibvD_OP.cjs → usernameToColor-7pQQJMR_.cjs} +1 -1
- package/dist/chunks/{usernameToColor-DibvD_OP.cjs.map → usernameToColor-7pQQJMR_.cjs.map} +1 -1
- package/dist/index.cjs +8 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +45 -45
- package/package.json +1 -1
- package/dist/assets/NcListItem-vwt4bCl6.css +0 -165
- package/dist/chunks/NcActions-CpU9WXzM.mjs.map +0 -1
- package/dist/chunks/NcActions-Dfkog_G0.cjs.map +0 -1
- package/dist/chunks/NcAppContent-BDwOdxJE.mjs.map +0 -1
- package/dist/chunks/NcAppContent-kqYjKpzU.cjs.map +0 -1
- package/dist/chunks/NcAppNavigation-C1Qe3lsk.mjs.map +0 -1
- package/dist/chunks/NcAppNavigation-C423R_m2.cjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-C1WLneXl.cjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-CKROuACA.mjs.map +0 -1
- package/dist/chunks/NcListItem-C5oWvAZQ.mjs.map +0 -1
- package/dist/chunks/NcListItem-wxqWqs4s.cjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-Cp8Au2iI.cjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-LTNqJecS.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-CHggLQuR.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-hT5m_2tr.cjs.map +0 -1
- package/dist/chunks/NcRichText-BBXbh0Hh.mjs.map +0 -1
- package/dist/chunks/NcRichText-BWX8BLVh.cjs.map +0 -1
- package/dist/chunks/NcUserStatusIcon-0SGYQL9L.mjs.map +0 -1
- package/dist/chunks/NcUserStatusIcon-C7dfcW39.cjs.map +0 -1
- package/dist/chunks/_l10n-B986q8RC.cjs.map +0 -1
- package/dist/chunks/_l10n-D8Scz3mH.mjs.map +0 -1
- package/dist/chunks/index-CIsMzBte.cjs.map +0 -1
- package/dist/chunks/index-DYXjj9ET.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-DUhJWt2e.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-DV7-XzCc.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_l10n-DZggkcVs.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import '../assets/NcMentionBubble-BhiXWJv8.css';
|
|
2
|
-
import { generateUrl as
|
|
2
|
+
import { generateUrl as c } from "@nextcloud/router";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { n as
|
|
5
|
-
import { L as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
4
|
+
import { n as u } from "./_plugin-vue2_normalizer-Bj5bLKV4.mjs";
|
|
5
|
+
import { L as p } from "./Linkify-BaDLLFxP.mjs";
|
|
6
|
+
import m from "escape-html";
|
|
7
|
+
import a from "striptags";
|
|
8
|
+
import d from "vue";
|
|
9
9
|
const _ = {
|
|
10
10
|
name: "NcMentionBubble",
|
|
11
11
|
props: {
|
|
@@ -57,27 +57,27 @@ const _ = {
|
|
|
57
57
|
},
|
|
58
58
|
methods: {
|
|
59
59
|
getAvatarUrl(t, e) {
|
|
60
|
-
return
|
|
60
|
+
return c("/avatar/{user}/{size}", {
|
|
61
61
|
user: t,
|
|
62
62
|
size: e
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
var
|
|
68
|
-
var e = this,
|
|
69
|
-
return
|
|
70
|
-
},
|
|
67
|
+
var b = function() {
|
|
68
|
+
var e = this, r = e._self._c;
|
|
69
|
+
return r("span", { staticClass: "mention-bubble", class: { "mention-bubble--primary": e.primary }, attrs: { contenteditable: "false" } }, [r("span", { staticClass: "mention-bubble__wrapper" }, [r("span", { staticClass: "mention-bubble__content" }, [r("span", { staticClass: "mention-bubble__icon", class: [e.icon, "mention-bubble__icon--".concat(e.avatarUrl ? "with-avatar" : "")], style: e.avatarUrl ? { backgroundImage: "url(".concat(e.avatarUrl, ")") } : null }), r("span", { staticClass: "mention-bubble__title", attrs: { role: "heading", title: e.labelWithFallback } })]), r("span", { staticClass: "mention-bubble__select", attrs: { role: "none" } }, [e._v(e._s(e.mentionText))])])]);
|
|
70
|
+
}, f = [], g = /* @__PURE__ */ u(
|
|
71
71
|
_,
|
|
72
|
+
b,
|
|
72
73
|
f,
|
|
73
|
-
g,
|
|
74
74
|
!1,
|
|
75
75
|
null,
|
|
76
76
|
"9c74f2e0",
|
|
77
77
|
null,
|
|
78
78
|
null
|
|
79
79
|
);
|
|
80
|
-
const
|
|
80
|
+
const h = g.exports;
|
|
81
81
|
/**
|
|
82
82
|
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
|
|
83
83
|
*
|
|
@@ -99,7 +99,7 @@ const y = h.exports;
|
|
|
99
99
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
100
100
|
*
|
|
101
101
|
*/
|
|
102
|
-
const l = "(
|
|
102
|
+
const l = new RegExp("\\B(?<![^a-z0-9_\\-@.'\\s])").source, E = /(@[a-z0-9_\-@.']+)/.source, T = /@"guest\/[a-f0-9]+"/.source, y = /@"(?:federated_)?(?:group|team|user){1}\/[a-z0-9_\-@.' /:]+"/.source, $ = /@"[a-z0-9_\-@.' ]+"/.source, v = "(".concat(T, "|").concat(y, "|").concat($, ")"), C = new RegExp("".concat(l).concat(E), "gi"), N = new RegExp("".concat(l).concat(v), "gi"), z = {
|
|
103
103
|
props: {
|
|
104
104
|
userData: {
|
|
105
105
|
type: Object,
|
|
@@ -114,11 +114,11 @@ const l = "(?:^|\\s)", o = "(?:[^a-z]|$)", E = new RegExp("".concat(l, "(@[a-zA-
|
|
|
114
114
|
* @return {string} rendered html
|
|
115
115
|
*/
|
|
116
116
|
renderContent(t) {
|
|
117
|
-
return
|
|
118
|
-
if (!
|
|
119
|
-
return
|
|
120
|
-
const i =
|
|
121
|
-
return
|
|
117
|
+
return m(t).split(C).map((n) => n.split(N)).flat().map((n) => {
|
|
118
|
+
if (!n.startsWith("@"))
|
|
119
|
+
return p(n);
|
|
120
|
+
const i = n.slice(1).replace(/"/gi, "");
|
|
121
|
+
return this.genSelectTemplate(i);
|
|
122
122
|
}).join("").replace(/\n/gmi, "<br>").replace(/&/gmi, "&");
|
|
123
123
|
},
|
|
124
124
|
/**
|
|
@@ -128,8 +128,8 @@ const l = "(?:^|\\s)", o = "(?:[^a-z]|$)", E = new RegExp("".concat(l, "(@[a-zA-
|
|
|
128
128
|
* @return {string}
|
|
129
129
|
*/
|
|
130
130
|
parseContent(t) {
|
|
131
|
-
let e = t
|
|
132
|
-
return e = e.replace(/ /gmi, " "), e = e.replace(/&/gmi, "&"), e = e.replace(/<\/div>/gmi, "\n"), e =
|
|
131
|
+
let e = t;
|
|
132
|
+
return e = e.replace(/>\s+</g, "><"), e = e.replace(/<br>/gmi, "\n"), e = e.replace(/ /gmi, " "), e = e.replace(/&/gmi, "&"), e = e.replace(/<\/div>/gmi, "\n"), e = a(e, "<div>"), e = a(e), e;
|
|
133
133
|
},
|
|
134
134
|
/**
|
|
135
135
|
* Generate an autocompletion popup entry template
|
|
@@ -141,7 +141,7 @@ const l = "(?:^|\\s)", o = "(?:[^a-z]|$)", E = new RegExp("".concat(l, "(@[a-zA-
|
|
|
141
141
|
if (typeof t > "u")
|
|
142
142
|
return "".concat(this.autocompleteTribute.current.collection.trigger).concat(this.autocompleteTribute.current.mentionText);
|
|
143
143
|
const e = this.userData[t];
|
|
144
|
-
return e ? this.renderComponentHtml(e,
|
|
144
|
+
return e ? this.renderComponentHtml(e, h).replace(/[\n\t]/gmi, "") : [" ", "/", ":"].every((r) => !t.includes(r)) ? "@".concat(t) : '@"'.concat(t, '"');
|
|
145
145
|
},
|
|
146
146
|
/**
|
|
147
147
|
* Render a component and return its html content
|
|
@@ -151,18 +151,18 @@ const l = "(?:^|\\s)", o = "(?:[^a-z]|$)", E = new RegExp("".concat(l, "(@[a-zA-
|
|
|
151
151
|
* @return {string} the rendered html
|
|
152
152
|
*/
|
|
153
153
|
renderComponentHtml(t, e) {
|
|
154
|
-
const
|
|
154
|
+
const r = d.extend(e), n = new r({
|
|
155
155
|
propsData: t
|
|
156
|
-
}), i = document.createElement("div"),
|
|
157
|
-
i.style.display = "none", i.appendChild(
|
|
158
|
-
const
|
|
159
|
-
return
|
|
156
|
+
}), i = document.createElement("div"), s = document.createElement("div");
|
|
157
|
+
i.style.display = "none", i.appendChild(s), document.body.appendChild(i), n.$mount(s);
|
|
158
|
+
const o = i.innerHTML;
|
|
159
|
+
return n.$destroy(), i.remove(), o;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
export {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
h as N,
|
|
165
|
+
C as U,
|
|
166
|
+
N as a,
|
|
167
|
+
z as r
|
|
168
168
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BAVa4G2v.mjs","sources":["../../src/components/NcRichContenteditable/NcMentionBubble.vue","../../src/mixins/richEditor/index.js"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<template>\n\t<span :class=\"{'mention-bubble--primary': primary}\"\n\t\tclass=\"mention-bubble\"\n\t\tcontenteditable=\"false\">\n\t\t<span class=\"mention-bubble__wrapper\">\n\t\t\t<span class=\"mention-bubble__content\">\n\t\t\t\t<!-- Avatar or icon -->\n\t\t\t\t<span :class=\"[icon, `mention-bubble__icon--${avatarUrl ? 'with-avatar' : ''}`]\"\n\t\t\t\t\t:style=\"avatarUrl ? { backgroundImage: `url(${avatarUrl})` } : null\"\n\t\t\t\t\tclass=\"mention-bubble__icon\" />\n\n\t\t\t\t<!-- Title -->\n\t\t\t\t<span role=\"heading\" class=\"mention-bubble__title\" :title=\"labelWithFallback\" />\n\t\t\t</span>\n\n\t\t\t<!-- Selectable text for copy/paste -->\n\t\t\t<span role=\"none\" class=\"mention-bubble__select\">{{ mentionText }}</span>\n\t\t</span>\n\t</span>\n</template>\n\n<script>\nimport { generateUrl } from '@nextcloud/router'\n\nexport default {\n\tname: 'NcMentionBubble',\n\n\tprops: {\n\t\tid: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * @deprecated Use `label` instead\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\ticonUrl: {\n\t\t\ttype: [String, null],\n\t\t\tdefault: null,\n\t\t},\n\t\tsource: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tprimary: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tcomputed: {\n\t\tavatarUrl() {\n\t\t\tif (this.iconUrl) {\n\t\t\t\treturn this.iconUrl\n\t\t\t}\n\n\t\t\treturn this.id && this.source === 'users'\n\t\t\t\t? this.getAvatarUrl(this.id, 44)\n\t\t\t\t: null\n\t\t},\n\t\tmentionText() {\n\t\t\treturn !this.id.includes(' ') && !this.id.includes('/')\n\t\t\t\t? `@${this.id}`\n\t\t\t\t: `@\"${this.id}\"`\n\t\t},\n\t\t// Fallback to title for compatibility\n\t\tlabelWithFallback() {\n\t\t\treturn this.label || this.title\n\t\t},\n\t},\n\n\tmethods: {\n\t\tgetAvatarUrl(user, size) {\n\t\t\treturn generateUrl('/avatar/{user}/{size}', {\n\t\t\t\tuser,\n\t\t\t\tsize,\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n$bubble-height: 20px;\n$bubble-max-width: 150px;\n$bubble-padding: 2px;\n$bubble-avatar-size: $bubble-height - 2 * $bubble-padding;\n\n.mention-bubble {\n\t&--primary &__content {\n\t\tcolor: var(--color-primary-element-text);\n\t\tbackground-color: var(--color-primary-element);\n\t}\n\n\t&__wrapper {\n\t\tmax-width: $bubble-max-width;\n\t\t// Align with text\n\t\theight: $bubble-height - $bubble-padding;\n\t\tvertical-align: text-bottom;\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t}\n\n\t&__content {\n\t\tdisplay: inline-flex;\n\t\toverflow: hidden;\n\t\talign-items: center;\n\t\tmax-width: 100%;\n\t\theight: $bubble-height ;\n\t\t-webkit-user-select: none;\n\t\tuser-select: none;\n\t\tpadding-right: $bubble-padding * 3;\n\t\tpadding-left: $bubble-padding;\n\t\tborder-radius: math.div($bubble-height, 2);\n\t\tbackground-color: var(--color-background-dark);\n\t}\n\n\t&__icon {\n\t\tposition: relative;\n\t\twidth: $bubble-avatar-size;\n\t\theight: $bubble-avatar-size;\n\t\tborder-radius: math.div($bubble-avatar-size, 2);\n\t\tbackground-color: var(--color-background-darker);\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: $bubble-avatar-size - 2 * $bubble-padding;\n\n\t\t&--with-avatar {\n\t\t\tcolor: inherit;\n\t\t\tbackground-size: cover;\n\t\t}\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\tmargin-left: $bubble-padding;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\t// Put title in ::before so it is not selectable\n\t\t&::before {\n\t\t\tcontent: attr(title);\n\t\t}\n\t}\n\n\t// Hide the mention id so it is selectable\n\t&__select {\n\t\tposition: absolute;\n\t\tz-index: -1;\n\t\tleft: -1000px;\n\t}\n}\n\n</style>\n","/**\n * @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport NcMentionBubble from '../../components/NcRichContenteditable/NcMentionBubble.vue'\nimport Linkify from '../../utils/Linkify.js'\n\nimport escapeHtml from 'escape-html'\nimport stripTags from 'striptags'\nimport Vue from 'vue'\n\n// Referenced from public function getMentions(): https://github.com/nextcloud/server/blob/master/lib/private/Comments/Comment.php\n// Beginning or whitespace. Non-capturing group within word boundary\nconst MENTION_START = /\\B(?<![^a-z0-9_\\-@.'\\s])/.source\n// Capturing groups like: @user-id, @\"guest/abc16def\", @\"federated_user/user-id\", @\"user-id with space\"\nconst MENTION_SIMPLE = /(@[a-z0-9_\\-@.']+)/.source\nconst MENTION_GUEST = /@"guest\\/[a-f0-9]+"/.source\nconst MENTION_PREFIXED = /@"(?:federated_)?(?:group|team|user){1}\\/[a-z0-9_\\-@.' /:]+"/.source\nconst MENTION_WITH_SPACE = /@"[a-z0-9_\\-@.' ]+"/.source\nconst MENTION_COMPLEX = `(${MENTION_GUEST}|${MENTION_PREFIXED}|${MENTION_WITH_SPACE})`\n// Concatenated regular expressions\nexport const USERID_REGEX = new RegExp(`${MENTION_START}${MENTION_SIMPLE}`, 'gi')\nexport const USERID_REGEX_WITH_SPACE = new RegExp(`${MENTION_START}${MENTION_COMPLEX}`, 'gi')\n\nexport default {\n\tprops: {\n\t\tuserData: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Convert the value string to html for the inner content\n\t\t *\n\t\t * @param {string} value the content without html\n\t\t * @return {string} rendered html\n\t\t */\n\t\trenderContent(value) {\n\t\t\t// Sanitize the value prop\n\t\t\tconst sanitizedValue = escapeHtml(value)\n\n\t\t\t// Extract all the userIds\n\t\t\tconst splitValue = sanitizedValue.split(USERID_REGEX)\n\t\t\t\t.map(part => part.split(USERID_REGEX_WITH_SPACE)).flat()\n\n\t\t\t// Replace userIds by html\n\t\t\treturn splitValue\n\t\t\t\t.map(part => {\n\t\t\t\t\t// When splitting, the string is always putting the userIds\n\t\t\t\t\t// on the uneven indexes. We only want to generate the mentions html\n\t\t\t\t\tif (!part.startsWith('@')) {\n\t\t\t\t\t\t// This part doesn't contain a mention, let's make sure links are parsed\n\t\t\t\t\t\treturn Linkify(part)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Extracting the id, nuking the leading @ and all \"\n\t\t\t\t\tconst id = part.slice(1).replace(/"/gi, '')\n\t\t\t\t\t// Compiling template and prepend with the space we removed during the split\n\t\t\t\t\treturn this.genSelectTemplate(id)\n\t\t\t\t})\n\t\t\t\t.join('')\n\t\t\t\t.replace(/\\n/gmi, '<br>')\n\t\t\t\t.replace(/&/gmi, '&')\n\t\t},\n\n\t\t/**\n\t\t * Convert the innerHtml content to a string with mentions as text\n\t\t *\n\t\t * @param {string} content the content without html\n\t\t * @return {string}\n\t\t */\n\t\tparseContent(content) {\n\t\t\tlet text = content\n\t\t\t// Consecutive spaces in HTML tags should collapse\n\t\t\ttext = text.replace(/>\\s+</g, '><')\n\t\t\t// Replace break lines with new lines\n\t\t\ttext = text.replace(/<br>/gmi, '\\n')\n\t\t\t// Replace some html special characters\n\t\t\ttext = text.replace(/ /gmi, ' ')\n\t\t\ttext = text.replace(/&/gmi, '&')\n\n\t\t\t// Convert the mentions to text only\n\t\t\t// first we replace divs with new lines\n\t\t\ttext = text.replace(/<\\/div>/gmi, '\\n')\n\t\t\t// then we remove all leftover html\n\t\t\ttext = stripTags(text, '<div>')\n\t\t\ttext = stripTags(text)\n\n\t\t\treturn text\n\t\t},\n\n\t\t/**\n\t\t * Generate an autocompletion popup entry template\n\t\t *\n\t\t * @param {string} value the value to match against the userData\n\t\t * @return {string}\n\t\t */\n\t\tgenSelectTemplate(value) {\n\t\t\t// The value returned by this function will replace the trigger '@'\n\t\t\t// and the search text, so when there is no match we simply return\n\t\t\t// '@' and the text.\n\t\t\tif (typeof value === 'undefined') {\n\t\t\t\treturn `${this.autocompleteTribute.current.collection.trigger}${this.autocompleteTribute.current.mentionText}`\n\t\t\t}\n\n\t\t\tconst data = this.userData[value]\n\n\t\t\t// Fallback to @mention in case no data matches\n\t\t\tif (!data) {\n\t\t\t\t// return @value if matches MENTION_SIMPLE, @\"value\" otherwise\n\t\t\t\treturn [' ', '/', ':'].every(char => !value.includes(char))\n\t\t\t\t\t? `@${value}`\n\t\t\t\t\t: `@\"${value}\"`\n\t\t\t}\n\n\t\t\t// Return template and make sure we strip of new lines and tabs\n\t\t\treturn this.renderComponentHtml(data, NcMentionBubble).replace(/[\\n\\t]/gmi, '')\n\t\t},\n\n\t\t/**\n\t\t * Render a component and return its html content\n\t\t *\n\t\t * @param {object} propsData the props to pass to the component\n\t\t * @param {object} component the component to render\n\t\t * @return {string} the rendered html\n\t\t */\n\t\trenderComponentHtml(propsData, component) {\n\t\t\tconst View = Vue.extend(component)\n\t\t\tconst Item = new View({\n\t\t\t\tpropsData,\n\t\t\t})\n\n\t\t\t// Prepare mountpoint\n\t\t\tconst wrapper = document.createElement('div')\n\t\t\tconst mount = document.createElement('div')\n\t\t\twrapper.style.display = 'none'\n\t\t\twrapper.appendChild(mount)\n\t\t\tdocument.body.appendChild(wrapper)\n\n\t\t\t// Mount and get raw html\n\t\t\tItem.$mount(mount)\n\t\t\tconst renderedHtml = wrapper.innerHTML\n\n\t\t\t// Destroy\n\t\t\tItem.$destroy()\n\t\t\twrapper.remove()\n\n\t\t\treturn renderedHtml\n\t\t},\n\t},\n}\n"],"names":["_sfc_main","user","size","generateUrl","MENTION_START","MENTION_SIMPLE","MENTION_GUEST","MENTION_PREFIXED","MENTION_WITH_SPACE","MENTION_COMPLEX","USERID_REGEX","USERID_REGEX_WITH_SPACE","richEditor","value","escapeHtml","part","Linkify","id","content","text","stripTags","data","NcMentionBubble","char","propsData","component","View","Vue","Item","wrapper","mount","renderedHtml"],"mappings":";;;;;;;AA6CA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA,IACA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,SAAA;AAAA,MACA,MAAA,CAAA,QAAA,IAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,UAAA;AAAA,IACA,YAAA;AACA,aAAA,KAAA,UACA,KAAA,UAGA,KAAA,MAAA,KAAA,WAAA,UACA,KAAA,aAAA,KAAA,IAAA,EAAA,IACA;AAAA,IACA;AAAA,IACA,cAAA;AACA,aAAA,CAAA,KAAA,GAAA,SAAA,GAAA,KAAA,CAAA,KAAA,GAAA,SAAA,GAAA,IACA,IAAA,YAAA,MACA,KAAA,YAAA,IAAA;AAAA,IACA;AAAA;AAAA,IAEA,oBAAA;AACA,aAAA,KAAA,SAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,aAAAC,GAAAC,GAAA;AACA,aAAAC,EAAA,yBAAA;AAAA,QACA,MAAAF;AAAA,QACA,MAAAC;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;AChHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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2_normalizer-GXKvuwrq.cjs"), b = require("./Linkify-Dola0NBa.cjs"), f = require("escape-html"), g = require("striptags"), E = require("vue"), s = (t) => t && t.__esModule ? t : { default: t }, h = /* @__PURE__ */ s(f), l = /* @__PURE__ */ s(g), T = /* @__PURE__ */ s(E), y = {
|
|
6
6
|
name: "NcMentionBubble",
|
|
7
7
|
props: {
|
|
8
8
|
id: {
|
|
@@ -60,12 +60,12 @@ const b = require("./_plugin-vue2_normalizer-GXKvuwrq.cjs"), f = require("./Link
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
var
|
|
63
|
+
var q = function() {
|
|
64
64
|
var e = this, n = e._self._c;
|
|
65
65
|
return n("span", { staticClass: "mention-bubble", class: { "mention-bubble--primary": e.primary }, attrs: { contenteditable: "false" } }, [n("span", { staticClass: "mention-bubble__wrapper" }, [n("span", { staticClass: "mention-bubble__content" }, [n("span", { staticClass: "mention-bubble__icon", class: [e.icon, "mention-bubble__icon--".concat(e.avatarUrl ? "with-avatar" : "")], style: e.avatarUrl ? { backgroundImage: "url(".concat(e.avatarUrl, ")") } : null }), n("span", { staticClass: "mention-bubble__title", attrs: { role: "heading", title: e.labelWithFallback } })]), n("span", { staticClass: "mention-bubble__select", attrs: { role: "none" } }, [e._v(e._s(e.mentionText))])])]);
|
|
66
|
-
}, S = [],
|
|
66
|
+
}, S = [], C = /* @__PURE__ */ m.normalizeComponent(
|
|
67
|
+
y,
|
|
67
68
|
q,
|
|
68
|
-
C,
|
|
69
69
|
S,
|
|
70
70
|
!1,
|
|
71
71
|
null,
|
|
@@ -73,7 +73,7 @@ var C = function() {
|
|
|
73
73
|
null,
|
|
74
74
|
null
|
|
75
75
|
);
|
|
76
|
-
const o =
|
|
76
|
+
const o = C.exports;
|
|
77
77
|
/**
|
|
78
78
|
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
|
|
79
79
|
*
|
|
@@ -95,7 +95,7 @@ const o = $.exports;
|
|
|
95
95
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
96
96
|
*
|
|
97
97
|
*/
|
|
98
|
-
const u = "(
|
|
98
|
+
const u = new RegExp("\\B(?<![^a-z0-9_\\-@.'\\s])").source, I = /(@[a-z0-9_\-@.']+)/.source, $ = /@"guest\/[a-f0-9]+"/.source, v = /@"(?:federated_)?(?:group|team|user){1}\/[a-z0-9_\-@.' /:]+"/.source, N = /@"[a-z0-9_\-@.' ]+"/.source, U = "(".concat($, "|").concat(v, "|").concat(N, ")"), c = new RegExp("".concat(u).concat(I), "gi"), d = new RegExp("".concat(u).concat(U), "gi"), M = {
|
|
99
99
|
props: {
|
|
100
100
|
userData: {
|
|
101
101
|
type: Object,
|
|
@@ -110,11 +110,11 @@ const u = "(?:^|\\s)", c = "(?:[^a-z]|$)", d = new RegExp("".concat(u, "(@[a-zA-
|
|
|
110
110
|
* @return {string} rendered html
|
|
111
111
|
*/
|
|
112
112
|
renderContent(t) {
|
|
113
|
-
return
|
|
113
|
+
return h.default(t).split(c).map((r) => r.split(d)).flat().map((r) => {
|
|
114
114
|
if (!r.startsWith("@"))
|
|
115
|
-
return
|
|
115
|
+
return b.Linkify(r);
|
|
116
116
|
const i = r.slice(1).replace(/"/gi, "");
|
|
117
|
-
return
|
|
117
|
+
return this.genSelectTemplate(i);
|
|
118
118
|
}).join("").replace(/\n/gmi, "<br>").replace(/&/gmi, "&");
|
|
119
119
|
},
|
|
120
120
|
/**
|
|
@@ -124,8 +124,8 @@ const u = "(?:^|\\s)", c = "(?:[^a-z]|$)", d = new RegExp("".concat(u, "(@[a-zA-
|
|
|
124
124
|
* @return {string}
|
|
125
125
|
*/
|
|
126
126
|
parseContent(t) {
|
|
127
|
-
let e = t
|
|
128
|
-
return e = e.replace(/ /gmi, " "), e = e.replace(/&/gmi, "&"), e = e.replace(/<\/div>/gmi, "\n"), e =
|
|
127
|
+
let e = t;
|
|
128
|
+
return e = e.replace(/>\s+</g, "><"), e = e.replace(/<br>/gmi, "\n"), e = e.replace(/ /gmi, " "), e = e.replace(/&/gmi, "&"), e = e.replace(/<\/div>/gmi, "\n"), e = l.default(e, "<div>"), e = l.default(e), e;
|
|
129
129
|
},
|
|
130
130
|
/**
|
|
131
131
|
* Generate an autocompletion popup entry template
|
|
@@ -137,7 +137,7 @@ const u = "(?:^|\\s)", c = "(?:[^a-z]|$)", d = new RegExp("".concat(u, "(@[a-zA-
|
|
|
137
137
|
if (typeof t > "u")
|
|
138
138
|
return "".concat(this.autocompleteTribute.current.collection.trigger).concat(this.autocompleteTribute.current.mentionText);
|
|
139
139
|
const e = this.userData[t];
|
|
140
|
-
return e ? this.renderComponentHtml(e, o).replace(/[\n\t]/gmi, "") :
|
|
140
|
+
return e ? this.renderComponentHtml(e, o).replace(/[\n\t]/gmi, "") : [" ", "/", ":"].every((n) => !t.includes(n)) ? "@".concat(t) : '@"'.concat(t, '"');
|
|
141
141
|
},
|
|
142
142
|
/**
|
|
143
143
|
* Render a component and return its html content
|
|
@@ -149,14 +149,14 @@ const u = "(?:^|\\s)", c = "(?:[^a-z]|$)", d = new RegExp("".concat(u, "(@[a-zA-
|
|
|
149
149
|
renderComponentHtml(t, e) {
|
|
150
150
|
const n = T.default.extend(e), r = new n({
|
|
151
151
|
propsData: t
|
|
152
|
-
}), i = document.createElement("div"),
|
|
153
|
-
i.style.display = "none", i.appendChild(
|
|
154
|
-
const
|
|
155
|
-
return r.$destroy(), i.remove(),
|
|
152
|
+
}), i = document.createElement("div"), a = document.createElement("div");
|
|
153
|
+
i.style.display = "none", i.appendChild(a), document.body.appendChild(i), r.$mount(a);
|
|
154
|
+
const p = i.innerHTML;
|
|
155
|
+
return r.$destroy(), i.remove(), p;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
exports.NcMentionBubble = o;
|
|
160
|
-
exports.USERID_REGEX =
|
|
161
|
-
exports.USERID_REGEX_WITH_SPACE =
|
|
162
|
-
exports.richEditor =
|
|
160
|
+
exports.USERID_REGEX = c;
|
|
161
|
+
exports.USERID_REGEX_WITH_SPACE = d;
|
|
162
|
+
exports.richEditor = M;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CVsxVZon.cjs","sources":["../../src/components/NcRichContenteditable/NcMentionBubble.vue","../../src/mixins/richEditor/index.js"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<template>\n\t<span :class=\"{'mention-bubble--primary': primary}\"\n\t\tclass=\"mention-bubble\"\n\t\tcontenteditable=\"false\">\n\t\t<span class=\"mention-bubble__wrapper\">\n\t\t\t<span class=\"mention-bubble__content\">\n\t\t\t\t<!-- Avatar or icon -->\n\t\t\t\t<span :class=\"[icon, `mention-bubble__icon--${avatarUrl ? 'with-avatar' : ''}`]\"\n\t\t\t\t\t:style=\"avatarUrl ? { backgroundImage: `url(${avatarUrl})` } : null\"\n\t\t\t\t\tclass=\"mention-bubble__icon\" />\n\n\t\t\t\t<!-- Title -->\n\t\t\t\t<span role=\"heading\" class=\"mention-bubble__title\" :title=\"labelWithFallback\" />\n\t\t\t</span>\n\n\t\t\t<!-- Selectable text for copy/paste -->\n\t\t\t<span role=\"none\" class=\"mention-bubble__select\">{{ mentionText }}</span>\n\t\t</span>\n\t</span>\n</template>\n\n<script>\nimport { generateUrl } from '@nextcloud/router'\n\nexport default {\n\tname: 'NcMentionBubble',\n\n\tprops: {\n\t\tid: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * @deprecated Use `label` instead\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\ticonUrl: {\n\t\t\ttype: [String, null],\n\t\t\tdefault: null,\n\t\t},\n\t\tsource: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tprimary: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tcomputed: {\n\t\tavatarUrl() {\n\t\t\tif (this.iconUrl) {\n\t\t\t\treturn this.iconUrl\n\t\t\t}\n\n\t\t\treturn this.id && this.source === 'users'\n\t\t\t\t? this.getAvatarUrl(this.id, 44)\n\t\t\t\t: null\n\t\t},\n\t\tmentionText() {\n\t\t\treturn !this.id.includes(' ') && !this.id.includes('/')\n\t\t\t\t? `@${this.id}`\n\t\t\t\t: `@\"${this.id}\"`\n\t\t},\n\t\t// Fallback to title for compatibility\n\t\tlabelWithFallback() {\n\t\t\treturn this.label || this.title\n\t\t},\n\t},\n\n\tmethods: {\n\t\tgetAvatarUrl(user, size) {\n\t\t\treturn generateUrl('/avatar/{user}/{size}', {\n\t\t\t\tuser,\n\t\t\t\tsize,\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n$bubble-height: 20px;\n$bubble-max-width: 150px;\n$bubble-padding: 2px;\n$bubble-avatar-size: $bubble-height - 2 * $bubble-padding;\n\n.mention-bubble {\n\t&--primary &__content {\n\t\tcolor: var(--color-primary-element-text);\n\t\tbackground-color: var(--color-primary-element);\n\t}\n\n\t&__wrapper {\n\t\tmax-width: $bubble-max-width;\n\t\t// Align with text\n\t\theight: $bubble-height - $bubble-padding;\n\t\tvertical-align: text-bottom;\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t}\n\n\t&__content {\n\t\tdisplay: inline-flex;\n\t\toverflow: hidden;\n\t\talign-items: center;\n\t\tmax-width: 100%;\n\t\theight: $bubble-height ;\n\t\t-webkit-user-select: none;\n\t\tuser-select: none;\n\t\tpadding-right: $bubble-padding * 3;\n\t\tpadding-left: $bubble-padding;\n\t\tborder-radius: math.div($bubble-height, 2);\n\t\tbackground-color: var(--color-background-dark);\n\t}\n\n\t&__icon {\n\t\tposition: relative;\n\t\twidth: $bubble-avatar-size;\n\t\theight: $bubble-avatar-size;\n\t\tborder-radius: math.div($bubble-avatar-size, 2);\n\t\tbackground-color: var(--color-background-darker);\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: $bubble-avatar-size - 2 * $bubble-padding;\n\n\t\t&--with-avatar {\n\t\t\tcolor: inherit;\n\t\t\tbackground-size: cover;\n\t\t}\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\tmargin-left: $bubble-padding;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\t// Put title in ::before so it is not selectable\n\t\t&::before {\n\t\t\tcontent: attr(title);\n\t\t}\n\t}\n\n\t// Hide the mention id so it is selectable\n\t&__select {\n\t\tposition: absolute;\n\t\tz-index: -1;\n\t\tleft: -1000px;\n\t}\n}\n\n</style>\n","/**\n * @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport NcMentionBubble from '../../components/NcRichContenteditable/NcMentionBubble.vue'\nimport Linkify from '../../utils/Linkify.js'\n\nimport escapeHtml from 'escape-html'\nimport stripTags from 'striptags'\nimport Vue from 'vue'\n\n// Referenced from public function getMentions(): https://github.com/nextcloud/server/blob/master/lib/private/Comments/Comment.php\n// Beginning or whitespace. Non-capturing group within word boundary\nconst MENTION_START = /\\B(?<![^a-z0-9_\\-@.'\\s])/.source\n// Capturing groups like: @user-id, @\"guest/abc16def\", @\"federated_user/user-id\", @\"user-id with space\"\nconst MENTION_SIMPLE = /(@[a-z0-9_\\-@.']+)/.source\nconst MENTION_GUEST = /@"guest\\/[a-f0-9]+"/.source\nconst MENTION_PREFIXED = /@"(?:federated_)?(?:group|team|user){1}\\/[a-z0-9_\\-@.' /:]+"/.source\nconst MENTION_WITH_SPACE = /@"[a-z0-9_\\-@.' ]+"/.source\nconst MENTION_COMPLEX = `(${MENTION_GUEST}|${MENTION_PREFIXED}|${MENTION_WITH_SPACE})`\n// Concatenated regular expressions\nexport const USERID_REGEX = new RegExp(`${MENTION_START}${MENTION_SIMPLE}`, 'gi')\nexport const USERID_REGEX_WITH_SPACE = new RegExp(`${MENTION_START}${MENTION_COMPLEX}`, 'gi')\n\nexport default {\n\tprops: {\n\t\tuserData: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Convert the value string to html for the inner content\n\t\t *\n\t\t * @param {string} value the content without html\n\t\t * @return {string} rendered html\n\t\t */\n\t\trenderContent(value) {\n\t\t\t// Sanitize the value prop\n\t\t\tconst sanitizedValue = escapeHtml(value)\n\n\t\t\t// Extract all the userIds\n\t\t\tconst splitValue = sanitizedValue.split(USERID_REGEX)\n\t\t\t\t.map(part => part.split(USERID_REGEX_WITH_SPACE)).flat()\n\n\t\t\t// Replace userIds by html\n\t\t\treturn splitValue\n\t\t\t\t.map(part => {\n\t\t\t\t\t// When splitting, the string is always putting the userIds\n\t\t\t\t\t// on the uneven indexes. We only want to generate the mentions html\n\t\t\t\t\tif (!part.startsWith('@')) {\n\t\t\t\t\t\t// This part doesn't contain a mention, let's make sure links are parsed\n\t\t\t\t\t\treturn Linkify(part)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Extracting the id, nuking the leading @ and all \"\n\t\t\t\t\tconst id = part.slice(1).replace(/"/gi, '')\n\t\t\t\t\t// Compiling template and prepend with the space we removed during the split\n\t\t\t\t\treturn this.genSelectTemplate(id)\n\t\t\t\t})\n\t\t\t\t.join('')\n\t\t\t\t.replace(/\\n/gmi, '<br>')\n\t\t\t\t.replace(/&/gmi, '&')\n\t\t},\n\n\t\t/**\n\t\t * Convert the innerHtml content to a string with mentions as text\n\t\t *\n\t\t * @param {string} content the content without html\n\t\t * @return {string}\n\t\t */\n\t\tparseContent(content) {\n\t\t\tlet text = content\n\t\t\t// Consecutive spaces in HTML tags should collapse\n\t\t\ttext = text.replace(/>\\s+</g, '><')\n\t\t\t// Replace break lines with new lines\n\t\t\ttext = text.replace(/<br>/gmi, '\\n')\n\t\t\t// Replace some html special characters\n\t\t\ttext = text.replace(/ /gmi, ' ')\n\t\t\ttext = text.replace(/&/gmi, '&')\n\n\t\t\t// Convert the mentions to text only\n\t\t\t// first we replace divs with new lines\n\t\t\ttext = text.replace(/<\\/div>/gmi, '\\n')\n\t\t\t// then we remove all leftover html\n\t\t\ttext = stripTags(text, '<div>')\n\t\t\ttext = stripTags(text)\n\n\t\t\treturn text\n\t\t},\n\n\t\t/**\n\t\t * Generate an autocompletion popup entry template\n\t\t *\n\t\t * @param {string} value the value to match against the userData\n\t\t * @return {string}\n\t\t */\n\t\tgenSelectTemplate(value) {\n\t\t\t// The value returned by this function will replace the trigger '@'\n\t\t\t// and the search text, so when there is no match we simply return\n\t\t\t// '@' and the text.\n\t\t\tif (typeof value === 'undefined') {\n\t\t\t\treturn `${this.autocompleteTribute.current.collection.trigger}${this.autocompleteTribute.current.mentionText}`\n\t\t\t}\n\n\t\t\tconst data = this.userData[value]\n\n\t\t\t// Fallback to @mention in case no data matches\n\t\t\tif (!data) {\n\t\t\t\t// return @value if matches MENTION_SIMPLE, @\"value\" otherwise\n\t\t\t\treturn [' ', '/', ':'].every(char => !value.includes(char))\n\t\t\t\t\t? `@${value}`\n\t\t\t\t\t: `@\"${value}\"`\n\t\t\t}\n\n\t\t\t// Return template and make sure we strip of new lines and tabs\n\t\t\treturn this.renderComponentHtml(data, NcMentionBubble).replace(/[\\n\\t]/gmi, '')\n\t\t},\n\n\t\t/**\n\t\t * Render a component and return its html content\n\t\t *\n\t\t * @param {object} propsData the props to pass to the component\n\t\t * @param {object} component the component to render\n\t\t * @return {string} the rendered html\n\t\t */\n\t\trenderComponentHtml(propsData, component) {\n\t\t\tconst View = Vue.extend(component)\n\t\t\tconst Item = new View({\n\t\t\t\tpropsData,\n\t\t\t})\n\n\t\t\t// Prepare mountpoint\n\t\t\tconst wrapper = document.createElement('div')\n\t\t\tconst mount = document.createElement('div')\n\t\t\twrapper.style.display = 'none'\n\t\t\twrapper.appendChild(mount)\n\t\t\tdocument.body.appendChild(wrapper)\n\n\t\t\t// Mount and get raw html\n\t\t\tItem.$mount(mount)\n\t\t\tconst renderedHtml = wrapper.innerHTML\n\n\t\t\t// Destroy\n\t\t\tItem.$destroy()\n\t\t\twrapper.remove()\n\n\t\t\treturn renderedHtml\n\t\t},\n\t},\n}\n"],"names":["_sfc_main","user","size","generateUrl","MENTION_START","MENTION_SIMPLE","MENTION_GUEST","MENTION_PREFIXED","MENTION_WITH_SPACE","MENTION_COMPLEX","USERID_REGEX","USERID_REGEX_WITH_SPACE","richEditor","value","escapeHtml","part","Linkify","id","content","text","stripTags","data","NcMentionBubble","char","propsData","component","View","Vue","Item","wrapper","mount","renderedHtml"],"mappings":";;;+SA6CAA,IAAA;AAAA,EACA,MAAA;AAAA,EA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