@nextcloud/vue 8.6.1 → 8.6.2

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.
Files changed (172) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/Components/NcActionInput.cjs +1 -1
  3. package/dist/Components/NcActionInput.mjs +1 -1
  4. package/dist/Components/NcActions.cjs +1 -1
  5. package/dist/Components/NcActions.mjs +1 -1
  6. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  7. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  8. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  9. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  10. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  11. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  12. package/dist/Components/NcAppSidebar.cjs +1 -1
  13. package/dist/Components/NcAppSidebar.mjs +1 -1
  14. package/dist/Components/NcAppSidebarTab.cjs +3 -3
  15. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  16. package/dist/Components/NcAppSidebarTab.mjs +5 -5
  17. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  18. package/dist/Components/NcAvatar.cjs +1 -1
  19. package/dist/Components/NcAvatar.mjs +1 -1
  20. package/dist/Components/NcBreadcrumb.cjs +1 -1
  21. package/dist/Components/NcBreadcrumb.mjs +1 -1
  22. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  23. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  24. package/dist/Components/NcDashboardWidget.cjs +1 -1
  25. package/dist/Components/NcDashboardWidget.mjs +1 -1
  26. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  27. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  28. package/dist/Components/NcDateTimePicker.cjs +2 -2
  29. package/dist/Components/NcDateTimePicker.mjs +3 -3
  30. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  31. package/dist/Components/NcDateTimePickerNative.mjs +1 -1
  32. package/dist/Components/NcHeaderMenu.cjs +1 -1
  33. package/dist/Components/NcHeaderMenu.mjs +1 -1
  34. package/dist/Components/NcListItem.cjs +1 -1
  35. package/dist/Components/NcListItem.mjs +1 -1
  36. package/dist/Components/NcListItemIcon.cjs +1 -1
  37. package/dist/Components/NcListItemIcon.mjs +1 -1
  38. package/dist/Components/NcModal.cjs +1 -1
  39. package/dist/Components/NcModal.mjs +2 -2
  40. package/dist/Components/NcRichContenteditable.cjs +1 -1
  41. package/dist/Components/NcRichContenteditable.mjs +2 -2
  42. package/dist/Components/NcRichText.cjs +1 -1
  43. package/dist/Components/NcRichText.mjs +3 -3
  44. package/dist/Components/NcSelect.cjs +1 -1
  45. package/dist/Components/NcSelect.mjs +1 -1
  46. package/dist/Components/NcSelectTags.cjs +1 -1
  47. package/dist/Components/NcSelectTags.mjs +1 -1
  48. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  49. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  50. package/dist/Components/NcTimezonePicker.cjs +1 -1
  51. package/dist/Components/NcTimezonePicker.mjs +1 -1
  52. package/dist/Components/NcUserBubble.cjs +1 -1
  53. package/dist/Components/NcUserBubble.mjs +1 -1
  54. package/dist/Mixins/richEditor.cjs +1 -1
  55. package/dist/Mixins/richEditor.mjs +1 -1
  56. package/dist/assets/{NcActions-mSL9fcPO.css → NcActions-4Gq5bZLW.css} +12 -12
  57. package/dist/assets/{NcAppSidebar-iU8Zp4Qk.css → NcAppSidebar-YHd7DpMW.css} +44 -44
  58. package/dist/assets/{NcAppSidebarTab-Phau6edJ.css → NcAppSidebarTab-FywbKxqo.css} +4 -4
  59. package/dist/assets/{NcDateTimePicker-vivOLt2Q.css → NcDateTimePicker-rixdCL1X.css} +10 -10
  60. package/dist/assets/{NcHeaderMenu-06vdn4tC.css → NcHeaderMenu-Srn5iXdL.css} +14 -15
  61. package/dist/assets/NcListItem-5XAhBDJv.css +165 -0
  62. package/dist/assets/{NcMentionBubble-2OXF_uEJ.css → NcMentionBubble-YYl1ib_F.css} +9 -9
  63. package/dist/assets/{NcRichContenteditable-j9edXOEH.css → NcRichContenteditable-WQVknpPy.css} +72 -80
  64. package/dist/assets/{referencePickerModal-iy5QSWj6.css → referencePickerModal-yucfxaTX.css} +65 -65
  65. package/dist/chunks/{NcActionInput-jQFZLsoe.mjs → NcActionInput-BN9rIyI8.mjs} +1 -1
  66. package/dist/chunks/{NcActionInput-jQFZLsoe.mjs.map → NcActionInput-BN9rIyI8.mjs.map} +1 -1
  67. package/dist/chunks/{NcActionInput--MiyWKmE.cjs → NcActionInput-qeRQBGlt.cjs} +1 -1
  68. package/dist/chunks/{NcActionInput--MiyWKmE.cjs.map → NcActionInput-qeRQBGlt.cjs.map} +1 -1
  69. package/dist/chunks/{NcActions-qCVw08zV.mjs → NcActions-5_igU-CH.mjs} +21 -21
  70. package/dist/chunks/{NcActions-qCVw08zV.mjs.map → NcActions-5_igU-CH.mjs.map} +1 -1
  71. package/dist/chunks/{NcActions-SlBohqiI.cjs → NcActions-JXnhQhum.cjs} +7 -7
  72. package/dist/chunks/{NcActions-SlBohqiI.cjs.map → NcActions-JXnhQhum.cjs.map} +1 -1
  73. package/dist/chunks/{NcAppNavigationCaption-0lGP-5CR.mjs → NcAppNavigationCaption-2rUO5Mns.mjs} +1 -1
  74. package/dist/chunks/{NcAppNavigationCaption-0lGP-5CR.mjs.map → NcAppNavigationCaption-2rUO5Mns.mjs.map} +1 -1
  75. package/dist/chunks/{NcAppNavigationCaption-nEKQXQYr.cjs → NcAppNavigationCaption-JQWbmgdy.cjs} +1 -1
  76. package/dist/chunks/{NcAppNavigationCaption-nEKQXQYr.cjs.map → NcAppNavigationCaption-JQWbmgdy.cjs.map} +1 -1
  77. package/dist/chunks/{NcAppNavigationItem-g_XncGxL.mjs → NcAppNavigationItem-A1yAdDNN.mjs} +1 -1
  78. package/dist/chunks/{NcAppNavigationItem-g_XncGxL.mjs.map → NcAppNavigationItem-A1yAdDNN.mjs.map} +1 -1
  79. package/dist/chunks/{NcAppNavigationItem-AdLvgSbV.cjs → NcAppNavigationItem-Wb8gX-Ln.cjs} +1 -1
  80. package/dist/chunks/{NcAppNavigationItem-AdLvgSbV.cjs.map → NcAppNavigationItem-Wb8gX-Ln.cjs.map} +1 -1
  81. package/dist/chunks/{NcAppNavigationSettings-UKQnGAEz.cjs → NcAppNavigationSettings-VLa79G7w.cjs} +1 -1
  82. package/dist/chunks/{NcAppNavigationSettings-UKQnGAEz.cjs.map → NcAppNavigationSettings-VLa79G7w.cjs.map} +1 -1
  83. package/dist/chunks/{NcAppNavigationSettings-DQHPDc4X.mjs → NcAppNavigationSettings-gwL_FqLN.mjs} +1 -1
  84. package/dist/chunks/{NcAppNavigationSettings-DQHPDc4X.mjs.map → NcAppNavigationSettings-gwL_FqLN.mjs.map} +1 -1
  85. package/dist/chunks/{NcAppSidebar-WyDtlgwP.cjs → NcAppSidebar-rRNJnN-k.cjs} +59 -31
  86. package/dist/chunks/NcAppSidebar-rRNJnN-k.cjs.map +1 -0
  87. package/dist/chunks/{NcAppSidebar-Wo8-p3nm.mjs → NcAppSidebar-tnHBPGbL.mjs} +138 -109
  88. package/dist/chunks/NcAppSidebar-tnHBPGbL.mjs.map +1 -0
  89. package/dist/chunks/{NcAvatar-c9ryo-7h.mjs → NcAvatar-xT3kz6mU.mjs} +2 -2
  90. package/dist/chunks/{NcAvatar-c9ryo-7h.mjs.map → NcAvatar-xT3kz6mU.mjs.map} +1 -1
  91. package/dist/chunks/{NcAvatar-khVnYpF2.cjs → NcAvatar-zTS9P1lK.cjs} +2 -2
  92. package/dist/chunks/{NcAvatar-khVnYpF2.cjs.map → NcAvatar-zTS9P1lK.cjs.map} +1 -1
  93. package/dist/chunks/{NcBreadcrumb-SEyo99to.cjs → NcBreadcrumb-EGgIr-sA.cjs} +1 -1
  94. package/dist/chunks/{NcBreadcrumb-SEyo99to.cjs.map → NcBreadcrumb-EGgIr-sA.cjs.map} +1 -1
  95. package/dist/chunks/{NcBreadcrumb-Ac0G-oky.mjs → NcBreadcrumb-on01ofev.mjs} +1 -1
  96. package/dist/chunks/{NcBreadcrumb-Ac0G-oky.mjs.map → NcBreadcrumb-on01ofev.mjs.map} +1 -1
  97. package/dist/chunks/{NcBreadcrumbs-YOANgGCY.mjs → NcBreadcrumbs-2l-mWYHl.mjs} +2 -2
  98. package/dist/chunks/{NcBreadcrumbs-YOANgGCY.mjs.map → NcBreadcrumbs-2l-mWYHl.mjs.map} +1 -1
  99. package/dist/chunks/{NcBreadcrumbs-DXpOwLNx.cjs → NcBreadcrumbs-hQmUGh48.cjs} +1 -1
  100. package/dist/chunks/{NcBreadcrumbs-DXpOwLNx.cjs.map → NcBreadcrumbs-hQmUGh48.cjs.map} +1 -1
  101. package/dist/chunks/{NcDashboardWidget-zBrcpL_E.cjs → NcDashboardWidget-QciRRvL4.cjs} +1 -1
  102. package/dist/chunks/{NcDashboardWidget-zBrcpL_E.cjs.map → NcDashboardWidget-QciRRvL4.cjs.map} +1 -1
  103. package/dist/chunks/{NcDashboardWidget-bEnoXtKm.mjs → NcDashboardWidget-ogqyHahY.mjs} +2 -2
  104. package/dist/chunks/{NcDashboardWidget-bEnoXtKm.mjs.map → NcDashboardWidget-ogqyHahY.mjs.map} +1 -1
  105. package/dist/chunks/{NcDashboardWidgetItem-LcxIx2-S.cjs → NcDashboardWidgetItem-mIPkPR7r.cjs} +1 -1
  106. package/dist/chunks/{NcDashboardWidgetItem-LcxIx2-S.cjs.map → NcDashboardWidgetItem-mIPkPR7r.cjs.map} +1 -1
  107. package/dist/chunks/{NcDashboardWidgetItem-p7yyFX-b.mjs → NcDashboardWidgetItem-wuUHTeLl.mjs} +2 -2
  108. package/dist/chunks/{NcDashboardWidgetItem-p7yyFX-b.mjs.map → NcDashboardWidgetItem-wuUHTeLl.mjs.map} +1 -1
  109. package/dist/chunks/{NcHeaderMenu-BSi8E43v.cjs → NcHeaderMenu-0d6eqre6.cjs} +6 -6
  110. package/dist/chunks/{NcHeaderMenu-Vytc8Eqg.mjs.map → NcHeaderMenu-0d6eqre6.cjs.map} +1 -1
  111. package/dist/chunks/{NcHeaderMenu-Vytc8Eqg.mjs → NcHeaderMenu-91qMsRIw.mjs} +3 -3
  112. package/dist/chunks/{NcHeaderMenu-BSi8E43v.cjs.map → NcHeaderMenu-91qMsRIw.mjs.map} +1 -1
  113. package/dist/chunks/{NcListItem-lqYZQhuZ.cjs → NcListItem-RDF4Yv0n.cjs} +30 -47
  114. package/dist/chunks/NcListItem-RDF4Yv0n.cjs.map +1 -0
  115. package/dist/chunks/{NcListItem-90hXqC4C.mjs → NcListItem-_PBHug1k.mjs} +33 -50
  116. package/dist/chunks/NcListItem-_PBHug1k.mjs.map +1 -0
  117. package/dist/chunks/{NcListItemIcon-ccke4gpg.cjs → NcListItemIcon-BnoIbVbD.cjs} +2 -2
  118. package/dist/chunks/{NcListItemIcon-ccke4gpg.cjs.map → NcListItemIcon-BnoIbVbD.cjs.map} +1 -1
  119. package/dist/chunks/{NcListItemIcon-hTbMo3-O.mjs → NcListItemIcon-rqgXledP.mjs} +2 -2
  120. package/dist/chunks/{NcListItemIcon-hTbMo3-O.mjs.map → NcListItemIcon-rqgXledP.mjs.map} +1 -1
  121. package/dist/chunks/{NcRichContenteditable-gQh2HFSV.mjs → NcRichContenteditable-glkLWE43.mjs} +264 -165
  122. package/dist/chunks/NcRichContenteditable-glkLWE43.mjs.map +1 -0
  123. package/dist/chunks/{NcRichContenteditable-WxSgSNot.cjs → NcRichContenteditable-xcoJkj3I.cjs} +200 -101
  124. package/dist/chunks/NcRichContenteditable-xcoJkj3I.cjs.map +1 -0
  125. package/dist/chunks/{NcRichText-fHn-j5sa.cjs → NcRichText-TdyEC_z7.cjs} +2 -2
  126. package/dist/chunks/{NcRichText-fHn-j5sa.cjs.map → NcRichText-TdyEC_z7.cjs.map} +1 -1
  127. package/dist/chunks/{NcRichText-RSAcESV2.mjs → NcRichText-lyvuLvpr.mjs} +2 -2
  128. package/dist/chunks/{NcRichText-RSAcESV2.mjs.map → NcRichText-lyvuLvpr.mjs.map} +1 -1
  129. package/dist/chunks/{NcSelect-vSPKKiyt.mjs → NcSelect-2ClmJ8jJ.mjs} +2 -2
  130. package/dist/chunks/{NcSelect-rMSul72R.cjs.map → NcSelect-2ClmJ8jJ.mjs.map} +1 -1
  131. package/dist/chunks/{NcSelect-rMSul72R.cjs → NcSelect-SlL-Y8Qz.cjs} +6 -6
  132. package/dist/chunks/{NcSelect-vSPKKiyt.mjs.map → NcSelect-SlL-Y8Qz.cjs.map} +1 -1
  133. package/dist/chunks/{NcSelectTags-beMN3ZsT.cjs → NcSelectTags-FKigJPco.cjs} +1 -1
  134. package/dist/chunks/{NcSelectTags-beMN3ZsT.cjs.map → NcSelectTags-FKigJPco.cjs.map} +1 -1
  135. package/dist/chunks/{NcSelectTags-MwCs_QbM.mjs → NcSelectTags-TC2UmbfI.mjs} +1 -1
  136. package/dist/chunks/{NcSelectTags-MwCs_QbM.mjs.map → NcSelectTags-TC2UmbfI.mjs.map} +1 -1
  137. package/dist/chunks/{NcSettingsSelectGroup-HkS2QpZS.mjs → NcSettingsSelectGroup-Bcai5uHx.mjs} +1 -1
  138. package/dist/chunks/{NcSettingsSelectGroup-HkS2QpZS.mjs.map → NcSettingsSelectGroup-Bcai5uHx.mjs.map} +1 -1
  139. package/dist/chunks/{NcSettingsSelectGroup-msn3aYsn.cjs → NcSettingsSelectGroup-fOU9O4VD.cjs} +1 -1
  140. package/dist/chunks/{NcSettingsSelectGroup-msn3aYsn.cjs.map → NcSettingsSelectGroup-fOU9O4VD.cjs.map} +1 -1
  141. package/dist/chunks/{NcTimezonePicker-I6wF2jeF.mjs → NcTimezonePicker-DDce-mch.mjs} +1 -1
  142. package/dist/chunks/{NcTimezonePicker-I6wF2jeF.mjs.map → NcTimezonePicker-DDce-mch.mjs.map} +1 -1
  143. package/dist/chunks/{NcTimezonePicker-Cp479kFL.cjs → NcTimezonePicker-Dv6pIP9O.cjs} +1 -1
  144. package/dist/chunks/{NcTimezonePicker-Cp479kFL.cjs.map → NcTimezonePicker-Dv6pIP9O.cjs.map} +1 -1
  145. package/dist/chunks/{NcUserBubble-6AbwSr2B.cjs → NcUserBubble-027_C0cM.cjs} +1 -1
  146. package/dist/chunks/{NcUserBubble-6AbwSr2B.cjs.map → NcUserBubble-027_C0cM.cjs.map} +1 -1
  147. package/dist/chunks/{NcUserBubble-imSUw-aP.mjs → NcUserBubble-9StjszDh.mjs} +1 -1
  148. package/dist/chunks/{NcUserBubble-imSUw-aP.mjs.map → NcUserBubble-9StjszDh.mjs.map} +1 -1
  149. package/dist/chunks/{ScopeComponent-CjAOgGnx.mjs → ScopeComponent-hYwaRplQ.mjs} +1 -1
  150. package/dist/chunks/{ScopeComponent-CjAOgGnx.mjs.map → ScopeComponent-hYwaRplQ.mjs.map} +1 -1
  151. package/dist/chunks/{ScopeComponent-V9SPec9g.cjs → ScopeComponent-qBzpvxit.cjs} +1 -1
  152. package/dist/chunks/{ScopeComponent-V9SPec9g.cjs.map → ScopeComponent-qBzpvxit.cjs.map} +1 -1
  153. package/dist/chunks/{index-U21dQVa7.cjs → index-5TyVc_TT.cjs} +29 -16
  154. package/dist/chunks/index-5TyVc_TT.cjs.map +1 -0
  155. package/dist/chunks/{index-n2q3iT69.mjs → index-xnq0-IMW.mjs} +26 -13
  156. package/dist/chunks/index-xnq0-IMW.mjs.map +1 -0
  157. package/dist/chunks/{referencePickerModal-GXRJ351Q.cjs → referencePickerModal-cy4_Q5bu.cjs} +2 -2
  158. package/dist/chunks/{referencePickerModal-GXRJ351Q.cjs.map → referencePickerModal-cy4_Q5bu.cjs.map} +1 -1
  159. package/dist/chunks/{referencePickerModal-FeA-PRqB.mjs → referencePickerModal-wDsYQHxX.mjs} +2 -2
  160. package/dist/chunks/{referencePickerModal-FeA-PRqB.mjs.map → referencePickerModal-wDsYQHxX.mjs.map} +1 -1
  161. package/dist/index.cjs +4 -4
  162. package/dist/index.mjs +25 -25
  163. package/package.json +3 -3
  164. package/dist/assets/NcListItem-6sL-frKJ.css +0 -165
  165. package/dist/chunks/NcAppSidebar-Wo8-p3nm.mjs.map +0 -1
  166. package/dist/chunks/NcAppSidebar-WyDtlgwP.cjs.map +0 -1
  167. package/dist/chunks/NcListItem-90hXqC4C.mjs.map +0 -1
  168. package/dist/chunks/NcListItem-lqYZQhuZ.cjs.map +0 -1
  169. package/dist/chunks/NcRichContenteditable-WxSgSNot.cjs.map +0 -1
  170. package/dist/chunks/NcRichContenteditable-gQh2HFSV.mjs.map +0 -1
  171. package/dist/chunks/index-U21dQVa7.cjs.map +0 -1
  172. package/dist/chunks/index-n2q3iT69.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NcUserBubble-imSUw-aP.mjs","sources":["../../src/components/NcUserBubble/NcUserBubbleDiv.vue","../../src/components/NcUserBubble/NcUserBubble.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2021 Raimund Schlüßler <raimund.schluessler@mailbox.org>\n -\n - @author Raimund Schlüßler <raimund.schluessler@mailbox.org>\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<div>\n\t\t<slot name=\"trigger\" />\n\t</div>\n</template>\n\n<script>\nexport default {\n\tname: 'NcUserBubbleDiv',\n}\n</script>\n","<!--\n - @copyright Copyright (c) 2019 Jonas Sulzer <jonas@violoncello.ch>\n -\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n - @author Jonas Sulzer <jonas@violoncello.ch>\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<docs>\n\n### General description\n\nThis component displays a user together with a small avatar in a grey bubble.\nIt's possible to use an actual user's avatar, just an image/icon as a url or an icon-class,\nto link the bubble to e.g. a users profile\nand to show a popover on hover with e.g. the full user name handle / email address or something else.\n\nThis component has the following slot:\n* a default slot which is for the content of the popover (this is passed to the popover component directly).\n\n### Examples\n\n```vue\n<p>\n\tSome text before <NcUserBubble user=\"admin\" display-name=\"Admin Example\" url=\"/test\">@admin@foreign-host.com</NcUserBubble> and after the bubble.\n\t<NcUserBubble avatar-image=\"icon-group\" display-name=\"test group xyz\" :primary=\"true\">Hey there!</NcUserBubble>\n</p>\n```\n\n### Example with name slot\n\n```vue\n<template>\n<NcUserBubble\n\t:margin=\"4\"\n\t:size=\"30\"\n\tdisplay-name=\"Administrator\"\n\tuser=\"admin\">\n\t<template #name>\n\t\t<a href=\"#\"\n\t\t\ttitle=\"Remove user\"\n\t\t\tclass=\"icon-close\"\n\t\t\t@click=\"alert\" />\n\t</template>\n</NcUserBubble>\n</template>\n<script>\nexport default {\n\tmethods: {\n\t\talert() {\n\t\t\talert('Removed')\n\t\t},\n\t},\n}\n</script>\n<style>\n.icon-close {\n\tdisplay: block;\n\theight: 100%;\n}\n</style>\n```\n\n</docs>\n<template>\n\t<component :is=\"isPopoverComponent\"\n\t\ttrigger=\"hover focus\"\n\t\t:shown=\"open\"\n\t\tclass=\"user-bubble__wrapper\"\n\t\t@update:open=\"onOpenChange\">\n\t\t<!-- Main userbubble structure -->\n\t\t<template #trigger=\"{ attrs }\">\n\t\t\t<component :is=\"isLinkComponent\"\n\t\t\t\tclass=\"user-bubble__content\"\n\t\t\t\t:style=\"styles.content\"\n\t\t\t\t:href=\"hasUrl ? url : null\"\n\t\t\t\t:class=\"{ 'user-bubble__content--primary': primary }\"\n\t\t\t\tv-bind=\"attrs\"\n\t\t\t\t@click=\"onClick\">\n\t\t\t\t<!-- NcAvatar -->\n\t\t\t\t<NcAvatar :url=\"isCustomAvatar && isAvatarUrl ? avatarImage : undefined\"\n\t\t\t\t\t:icon-class=\"isCustomAvatar && !isAvatarUrl ? avatarImage : undefined\"\n\t\t\t\t\t:user=\"user\"\n\t\t\t\t\t:display-name=\"displayName\"\n\t\t\t\t\t:size=\"size - (margin * 2)\"\n\t\t\t\t\t:style=\"styles.avatar\"\n\t\t\t\t\t:disable-tooltip=\"true\"\n\t\t\t\t\t:disable-menu=\"true\"\n\t\t\t\t\t:show-user-status=\"showUserStatus\"\n\t\t\t\t\tclass=\"user-bubble__avatar\" />\n\n\t\t\t\t<!-- Name -->\n\t\t\t\t<span class=\"user-bubble__name\">\n\t\t\t\t\t{{ displayName || user }}\n\t\t\t\t</span>\n\n\t\t\t\t<!-- @slot Optional slot just after the name -->\n\t\t\t\t<span v-if=\"$slots.name\" class=\"user-bubble__secondary\">\n\t\t\t\t\t<slot name=\"name\" />\n\t\t\t\t</span>\n\t\t\t</component>\n\t\t</template>\n\n\t\t<!-- @slot Main Popover content on userbubble hover/focus -->\n\t\t<slot />\n\t</component>\n</template>\n\n<script>\nimport NcUserBubbleDiv from './NcUserBubbleDiv.vue'\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcPopover from '../NcPopover/index.js'\nimport Vue from 'vue'\n\nexport default {\n\tname: 'NcUserBubble',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcPopover,\n\t\tNcUserBubbleDiv,\n\t},\n\tprops: {\n\t\t/**\n\t\t * Override generated avatar, can be an url or an icon class\n\t\t */\n\t\tavatarImage: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Provide the user id if this is a user\n\t\t */\n\t\tuser: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Displayed label\n\t\t */\n\t\tdisplayName: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Whether or not to display the user-status\n\t\t */\n\t\tshowUserStatus: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Define the whole bubble as a link\n\t\t */\n\t\turl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t\tvalidator: (url) => {\n\t\t\t\ttry {\n\t\t\t\t\turl = new URL(url, url?.startsWith?.('/') ? window.location.href : undefined)\n\t\t\t\t\treturn true\n\t\t\t\t} catch (error) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\t/**\n\t\t * Default popover state. Requires the UserBubble\n\t\t * to have some content to render inside the popover\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Use the primary colour\n\t\t */\n\t\tprimary: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * This is the height of the component\n\t\t */\n\t\tsize: {\n\t\t\ttype: Number,\n\t\t\tdefault: 20,\n\t\t},\n\t\t/**\n\t\t * This is the margin of the avatar (size - margin = avatar size)\n\t\t */\n\t\tmargin: {\n\t\t\ttype: Number,\n\t\t\tdefault: 2,\n\t\t},\n\t},\n\temits: [\n\t\t'click',\n\t\t'update:open',\n\t],\n\tcomputed: {\n\t\t/**\n\t\t * If userbubble is empty, let's NOT\n\t\t * use the Popover component\n\t\t * We need a component instead of a simple div here,\n\t\t * because otherwise the trigger template will not be shown.\n\t\t *\n\t\t * @return {string} 'Popover' or 'UserBubbleDiv'\n\t\t */\n\t\tisPopoverComponent() {\n\t\t\treturn !this.popoverEmpty\n\t\t\t\t? 'NcPopover'\n\t\t\t\t: 'NcUserBubbleDiv'\n\t\t},\n\n\t\t/**\n\t\t * Is the provided avatar url valid or not\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisAvatarUrl() {\n\t\t\tif (!this.avatarImage) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst url = new URL(this.avatarImage)\n\t\t\t\treturn !!url\n\t\t\t} catch (error) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Do we have a custom avatar or not\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisCustomAvatar() {\n\t\t\treturn !!this.avatarImage\n\t\t},\n\n\t\thasUrl() {\n\t\t\treturn this.url && this.url.trim() !== ''\n\t\t},\n\n\t\tisLinkComponent() {\n\t\t\treturn this.hasUrl ? 'a' : 'div'\n\t\t},\n\n\t\tpopoverEmpty() {\n\t\t\tif ('default' in this.$slots) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn true\n\t\t},\n\n\t\tstyles() {\n\t\t\treturn {\n\t\t\t\tcontent: {\n\t\t\t\t\theight: this.size + 'px',\n\t\t\t\t\tlineHeight: this.size + 'px',\n\t\t\t\t\tborderRadius: this.size / 2 + 'px',\n\t\t\t\t},\n\t\t\t\tavatar: {\n\t\t\t\t\tmarginLeft: this.margin + 'px',\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t},\n\tmounted() {\n\t\tif (!this.displayName && !this.user) {\n\t\t\tVue.util.warn('[NcUserBubble] At least `displayName` or `user` property should be set.')\n\t\t}\n\t},\n\tmethods: {\n\t\tonOpenChange(state) {\n\t\t\tthis.$emit('update:open', state)\n\t\t},\n\t\t/**\n\t\t * Catch and forward click event to parent\n\t\t *\n\t\t * @param {Event} event the click event\n\t\t */\n\t\tonClick(event) {\n\t\t\tthis.$emit('click', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.user-bubble {\n\t&__wrapper {\n\t\t// align inline with text\n\t\tdisplay: inline-block;\n\t\tvertical-align: middle;\n\t\t// shrink and allow grow to fit\n\t\tmin-width: 0;\n\t\tmax-width: 100%;\n\t}\n\n\t&__content {\n\t\tdisplay: inline-flex;\n\t\tmax-width: 100%;\n\t\tbackground-color: var(--color-background-dark);\n\n\t\t&--primary {\n\t\t\tcolor: var(--color-primary-element-text);\n\t\t\tbackground-color: var(--color-primary-element);\n\t\t}\n\n\t\t> :last-child {\n\t\t\t// border radius left padding\n\t\t\tpadding-right: 8px;\n\t\t}\n\t}\n\n\t&__avatar {\n\t\talign-self: center;\n\t}\n\n\t&__name {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t&__name,\n\t&__secondary {\n\t\t// proper spacing between avatar, name & slot\n\t\tpadding: 0;\n\t\tpadding-left: 4px;\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","NcAvatar","NcPopover","NcUserBubbleDiv","url","Vue","state","event"],"mappings":";;;;AA4BA,MAAAA,IAAA;AAAA,EACA,MAAA;AACA;;;;;;;;;;;;;;qBCkGAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,KAAA;AAAA,MACA,MAAA;AAAA,MACA,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,UACA,QAAA,KAAA,OAAA;AAAA,UACA,YAAA,KAAA,OAAA;AAAA,UACA,cAAA,KAAA,OAAA,IAAA;AAAA,QACA;AAAA,QACA,QAAA;AAAA,UACA,YAAA,KAAA,SAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EACA,UAAA;AACA,IAAA,CAAA,KAAA,eAAA,CAAA,KAAA,QACAC,EAAA,KAAA,KAAA,yEAAA;AAAA,EAEA;AAAA,EACA,SAAA;AAAA,IACA,aAAAC,GAAA;AACA,WAAA,MAAA,eAAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAAC,GAAA;AACA,WAAA,MAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcUserBubble-9StjszDh.mjs","sources":["../../src/components/NcUserBubble/NcUserBubbleDiv.vue","../../src/components/NcUserBubble/NcUserBubble.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2021 Raimund Schlüßler <raimund.schluessler@mailbox.org>\n -\n - @author Raimund Schlüßler <raimund.schluessler@mailbox.org>\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<div>\n\t\t<slot name=\"trigger\" />\n\t</div>\n</template>\n\n<script>\nexport default {\n\tname: 'NcUserBubbleDiv',\n}\n</script>\n","<!--\n - @copyright Copyright (c) 2019 Jonas Sulzer <jonas@violoncello.ch>\n -\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n - @author Jonas Sulzer <jonas@violoncello.ch>\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<docs>\n\n### General description\n\nThis component displays a user together with a small avatar in a grey bubble.\nIt's possible to use an actual user's avatar, just an image/icon as a url or an icon-class,\nto link the bubble to e.g. a users profile\nand to show a popover on hover with e.g. the full user name handle / email address or something else.\n\nThis component has the following slot:\n* a default slot which is for the content of the popover (this is passed to the popover component directly).\n\n### Examples\n\n```vue\n<p>\n\tSome text before <NcUserBubble user=\"admin\" display-name=\"Admin Example\" url=\"/test\">@admin@foreign-host.com</NcUserBubble> and after the bubble.\n\t<NcUserBubble avatar-image=\"icon-group\" display-name=\"test group xyz\" :primary=\"true\">Hey there!</NcUserBubble>\n</p>\n```\n\n### Example with name slot\n\n```vue\n<template>\n<NcUserBubble\n\t:margin=\"4\"\n\t:size=\"30\"\n\tdisplay-name=\"Administrator\"\n\tuser=\"admin\">\n\t<template #name>\n\t\t<a href=\"#\"\n\t\t\ttitle=\"Remove user\"\n\t\t\tclass=\"icon-close\"\n\t\t\t@click=\"alert\" />\n\t</template>\n</NcUserBubble>\n</template>\n<script>\nexport default {\n\tmethods: {\n\t\talert() {\n\t\t\talert('Removed')\n\t\t},\n\t},\n}\n</script>\n<style>\n.icon-close {\n\tdisplay: block;\n\theight: 100%;\n}\n</style>\n```\n\n</docs>\n<template>\n\t<component :is=\"isPopoverComponent\"\n\t\ttrigger=\"hover focus\"\n\t\t:shown=\"open\"\n\t\tclass=\"user-bubble__wrapper\"\n\t\t@update:open=\"onOpenChange\">\n\t\t<!-- Main userbubble structure -->\n\t\t<template #trigger=\"{ attrs }\">\n\t\t\t<component :is=\"isLinkComponent\"\n\t\t\t\tclass=\"user-bubble__content\"\n\t\t\t\t:style=\"styles.content\"\n\t\t\t\t:href=\"hasUrl ? url : null\"\n\t\t\t\t:class=\"{ 'user-bubble__content--primary': primary }\"\n\t\t\t\tv-bind=\"attrs\"\n\t\t\t\t@click=\"onClick\">\n\t\t\t\t<!-- NcAvatar -->\n\t\t\t\t<NcAvatar :url=\"isCustomAvatar && isAvatarUrl ? avatarImage : undefined\"\n\t\t\t\t\t:icon-class=\"isCustomAvatar && !isAvatarUrl ? avatarImage : undefined\"\n\t\t\t\t\t:user=\"user\"\n\t\t\t\t\t:display-name=\"displayName\"\n\t\t\t\t\t:size=\"size - (margin * 2)\"\n\t\t\t\t\t:style=\"styles.avatar\"\n\t\t\t\t\t:disable-tooltip=\"true\"\n\t\t\t\t\t:disable-menu=\"true\"\n\t\t\t\t\t:show-user-status=\"showUserStatus\"\n\t\t\t\t\tclass=\"user-bubble__avatar\" />\n\n\t\t\t\t<!-- Name -->\n\t\t\t\t<span class=\"user-bubble__name\">\n\t\t\t\t\t{{ displayName || user }}\n\t\t\t\t</span>\n\n\t\t\t\t<!-- @slot Optional slot just after the name -->\n\t\t\t\t<span v-if=\"$slots.name\" class=\"user-bubble__secondary\">\n\t\t\t\t\t<slot name=\"name\" />\n\t\t\t\t</span>\n\t\t\t</component>\n\t\t</template>\n\n\t\t<!-- @slot Main Popover content on userbubble hover/focus -->\n\t\t<slot />\n\t</component>\n</template>\n\n<script>\nimport NcUserBubbleDiv from './NcUserBubbleDiv.vue'\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcPopover from '../NcPopover/index.js'\nimport Vue from 'vue'\n\nexport default {\n\tname: 'NcUserBubble',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcPopover,\n\t\tNcUserBubbleDiv,\n\t},\n\tprops: {\n\t\t/**\n\t\t * Override generated avatar, can be an url or an icon class\n\t\t */\n\t\tavatarImage: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Provide the user id if this is a user\n\t\t */\n\t\tuser: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Displayed label\n\t\t */\n\t\tdisplayName: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Whether or not to display the user-status\n\t\t */\n\t\tshowUserStatus: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Define the whole bubble as a link\n\t\t */\n\t\turl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t\tvalidator: (url) => {\n\t\t\t\ttry {\n\t\t\t\t\turl = new URL(url, url?.startsWith?.('/') ? window.location.href : undefined)\n\t\t\t\t\treturn true\n\t\t\t\t} catch (error) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\t/**\n\t\t * Default popover state. Requires the UserBubble\n\t\t * to have some content to render inside the popover\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Use the primary colour\n\t\t */\n\t\tprimary: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * This is the height of the component\n\t\t */\n\t\tsize: {\n\t\t\ttype: Number,\n\t\t\tdefault: 20,\n\t\t},\n\t\t/**\n\t\t * This is the margin of the avatar (size - margin = avatar size)\n\t\t */\n\t\tmargin: {\n\t\t\ttype: Number,\n\t\t\tdefault: 2,\n\t\t},\n\t},\n\temits: [\n\t\t'click',\n\t\t'update:open',\n\t],\n\tcomputed: {\n\t\t/**\n\t\t * If userbubble is empty, let's NOT\n\t\t * use the Popover component\n\t\t * We need a component instead of a simple div here,\n\t\t * because otherwise the trigger template will not be shown.\n\t\t *\n\t\t * @return {string} 'Popover' or 'UserBubbleDiv'\n\t\t */\n\t\tisPopoverComponent() {\n\t\t\treturn !this.popoverEmpty\n\t\t\t\t? 'NcPopover'\n\t\t\t\t: 'NcUserBubbleDiv'\n\t\t},\n\n\t\t/**\n\t\t * Is the provided avatar url valid or not\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisAvatarUrl() {\n\t\t\tif (!this.avatarImage) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst url = new URL(this.avatarImage)\n\t\t\t\treturn !!url\n\t\t\t} catch (error) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Do we have a custom avatar or not\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisCustomAvatar() {\n\t\t\treturn !!this.avatarImage\n\t\t},\n\n\t\thasUrl() {\n\t\t\treturn this.url && this.url.trim() !== ''\n\t\t},\n\n\t\tisLinkComponent() {\n\t\t\treturn this.hasUrl ? 'a' : 'div'\n\t\t},\n\n\t\tpopoverEmpty() {\n\t\t\tif ('default' in this.$slots) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn true\n\t\t},\n\n\t\tstyles() {\n\t\t\treturn {\n\t\t\t\tcontent: {\n\t\t\t\t\theight: this.size + 'px',\n\t\t\t\t\tlineHeight: this.size + 'px',\n\t\t\t\t\tborderRadius: this.size / 2 + 'px',\n\t\t\t\t},\n\t\t\t\tavatar: {\n\t\t\t\t\tmarginLeft: this.margin + 'px',\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t},\n\tmounted() {\n\t\tif (!this.displayName && !this.user) {\n\t\t\tVue.util.warn('[NcUserBubble] At least `displayName` or `user` property should be set.')\n\t\t}\n\t},\n\tmethods: {\n\t\tonOpenChange(state) {\n\t\t\tthis.$emit('update:open', state)\n\t\t},\n\t\t/**\n\t\t * Catch and forward click event to parent\n\t\t *\n\t\t * @param {Event} event the click event\n\t\t */\n\t\tonClick(event) {\n\t\t\tthis.$emit('click', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.user-bubble {\n\t&__wrapper {\n\t\t// align inline with text\n\t\tdisplay: inline-block;\n\t\tvertical-align: middle;\n\t\t// shrink and allow grow to fit\n\t\tmin-width: 0;\n\t\tmax-width: 100%;\n\t}\n\n\t&__content {\n\t\tdisplay: inline-flex;\n\t\tmax-width: 100%;\n\t\tbackground-color: var(--color-background-dark);\n\n\t\t&--primary {\n\t\t\tcolor: var(--color-primary-element-text);\n\t\t\tbackground-color: var(--color-primary-element);\n\t\t}\n\n\t\t> :last-child {\n\t\t\t// border radius left padding\n\t\t\tpadding-right: 8px;\n\t\t}\n\t}\n\n\t&__avatar {\n\t\talign-self: center;\n\t}\n\n\t&__name {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t&__name,\n\t&__secondary {\n\t\t// proper spacing between avatar, name & slot\n\t\tpadding: 0;\n\t\tpadding-left: 4px;\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","NcAvatar","NcPopover","NcUserBubbleDiv","url","Vue","state","event"],"mappings":";;;;AA4BA,MAAAA,IAAA;AAAA,EACA,MAAA;AACA;;;;;;;;;;;;;;qBCkGAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA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,eAAA,KAAA;AAAA,IAIA;AAAA,IAEA,SAAA;AACA,aAAA;AAAA,QACA,SAAA;AAAA,UACA,QAAA,KAAA,OAAA;AAAA,UACA,YAAA,KAAA,OAAA;AAAA,UACA,cAAA,KAAA,OAAA,IAAA;AAAA,QACA;AAAA,QACA,QAAA;AAAA,UACA,YAAA,KAAA,SAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EACA,UAAA;AACA,IAAA,CAAA,KAAA,eAAA,CAAA,KAAA,QACAC,EAAA,KAAA,KAAA,yEAAA;AAAA,EAEA;AAAA,EACA,SAAA;AAAA,IACA,aAAAC,GAAA;AACA,WAAA,MAAA,eAAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAAC,GAAA;AACA,WAAA,MAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
@@ -21,7 +21,7 @@
21
21
  */
22
22
  const e = (t) => {
23
23
  t.mounted ? Array.isArray(t.mounted) || (t.mounted = [t.mounted]) : t.mounted = [], t.mounted.push(function() {
24
- this.$el.setAttribute("data-v-426cbc6", "");
24
+ this.$el.setAttribute("data-v-69c9b3b", "");
25
25
  });
26
26
  };
27
27
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"ScopeComponent-CjAOgGnx.mjs","sources":["../../src/utils/ScopeComponent.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2018 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\nconst ScopeComponent = (Component) => {\n\t// Init mounted vue if none\n\tif (!Component.mounted) {\n\t\tComponent.mounted = []\n\t} else if (!Array.isArray(Component.mounted)) {\n\t\tComponent.mounted = [Component.mounted]\n\t}\n\n\t// Inject root scoping function\n\tComponent.mounted.push(function() {\n\t\tthis.$el.setAttribute(`data-v-${SCOPE_VERSION}`, '')\n\t})\n}\n\nexport default ScopeComponent\n"],"names":["ScopeComponent","Component"],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBK,MAACA,IAAiB,CAACC,MAAc;AAErC,EAAKA,EAAU,UAEH,MAAM,QAAQA,EAAU,OAAO,MAC1CA,EAAU,UAAU,CAACA,EAAU,OAAO,KAFtCA,EAAU,UAAU,CAAE,GAMvBA,EAAU,QAAQ,KAAK,WAAW;AACjC,SAAK,IAAI,aAAa,kBAA2B,EAAE;AAAA,EACrD,CAAE;AACF;"}
1
+ {"version":3,"file":"ScopeComponent-hYwaRplQ.mjs","sources":["../../src/utils/ScopeComponent.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2018 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\nconst ScopeComponent = (Component) => {\n\t// Init mounted vue if none\n\tif (!Component.mounted) {\n\t\tComponent.mounted = []\n\t} else if (!Array.isArray(Component.mounted)) {\n\t\tComponent.mounted = [Component.mounted]\n\t}\n\n\t// Inject root scoping function\n\tComponent.mounted.push(function() {\n\t\tthis.$el.setAttribute(`data-v-${SCOPE_VERSION}`, '')\n\t})\n}\n\nexport default ScopeComponent\n"],"names":["ScopeComponent","Component"],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBK,MAACA,IAAiB,CAACC,MAAc;AAErC,EAAKA,EAAU,UAEH,MAAM,QAAQA,EAAU,OAAO,MAC1CA,EAAU,UAAU,CAACA,EAAU,OAAO,KAFtCA,EAAU,UAAU,CAAE,GAMvBA,EAAU,QAAQ,KAAK,WAAW;AACjC,SAAK,IAAI,aAAa,kBAA2B,EAAE;AAAA,EACrD,CAAE;AACF;"}
@@ -22,7 +22,7 @@
22
22
  */
23
23
  const e = (t) => {
24
24
  t.mounted ? Array.isArray(t.mounted) || (t.mounted = [t.mounted]) : t.mounted = [], t.mounted.push(function() {
25
- this.$el.setAttribute("data-v-426cbc6", "");
25
+ this.$el.setAttribute("data-v-69c9b3b", "");
26
26
  });
27
27
  };
28
28
  exports.ScopeComponent = e;
@@ -1 +1 @@
1
- {"version":3,"file":"ScopeComponent-V9SPec9g.cjs","sources":["../../src/utils/ScopeComponent.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2018 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\nconst ScopeComponent = (Component) => {\n\t// Init mounted vue if none\n\tif (!Component.mounted) {\n\t\tComponent.mounted = []\n\t} else if (!Array.isArray(Component.mounted)) {\n\t\tComponent.mounted = [Component.mounted]\n\t}\n\n\t// Inject root scoping function\n\tComponent.mounted.push(function() {\n\t\tthis.$el.setAttribute(`data-v-${SCOPE_VERSION}`, '')\n\t})\n}\n\nexport default ScopeComponent\n"],"names":["ScopeComponent","Component"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBK,MAACA,IAAiB,CAACC,MAAc;AAErC,EAAKA,EAAU,UAEH,MAAM,QAAQA,EAAU,OAAO,MAC1CA,EAAU,UAAU,CAACA,EAAU,OAAO,KAFtCA,EAAU,UAAU,CAAE,GAMvBA,EAAU,QAAQ,KAAK,WAAW;AACjC,SAAK,IAAI,aAAa,kBAA2B,EAAE;AAAA,EACrD,CAAE;AACF;;"}
1
+ {"version":3,"file":"ScopeComponent-qBzpvxit.cjs","sources":["../../src/utils/ScopeComponent.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2018 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\nconst ScopeComponent = (Component) => {\n\t// Init mounted vue if none\n\tif (!Component.mounted) {\n\t\tComponent.mounted = []\n\t} else if (!Array.isArray(Component.mounted)) {\n\t\tComponent.mounted = [Component.mounted]\n\t}\n\n\t// Inject root scoping function\n\tComponent.mounted.push(function() {\n\t\tthis.$el.setAttribute(`data-v-${SCOPE_VERSION}`, '')\n\t})\n}\n\nexport default ScopeComponent\n"],"names":["ScopeComponent","Component"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBK,MAACA,IAAiB,CAACC,MAAc;AAErC,EAAKA,EAAU,UAEH,MAAM,QAAQA,EAAU,OAAO,MAC1CA,EAAU,UAAU,CAACA,EAAU,OAAO,KAFtCA,EAAU,UAAU,CAAE,GAMvBA,EAAU,QAAQ,KAAK,WAAW;AACjC,SAAK,IAAI,aAAa,kBAA2B,EAAE;AAAA,EACrD,CAAE;AACF;;"}
@@ -1,17 +1,26 @@
1
- require('../assets/NcMentionBubble-2OXF_uEJ.css');
1
+ require('../assets/NcMentionBubble-YYl1ib_F.css');
2
2
  "use strict";
3
3
  const _ = require("@nextcloud/router");
4
4
  ;/* empty css */
5
- const b = require("./_plugin-vue2_normalizer-DCfUPqga.cjs"), g = require("./Linkify-f3s3nAe_.cjs"), f = require("escape-html"), h = require("striptags"), E = require("vue"), s = (t) => t && t.__esModule ? t : { default: t }, y = /* @__PURE__ */ s(f), l = /* @__PURE__ */ s(h), T = /* @__PURE__ */ s(E), C = {
5
+ const b = require("./_plugin-vue2_normalizer-DCfUPqga.cjs"), f = require("./Linkify-f3s3nAe_.cjs"), g = require("escape-html"), h = require("striptags"), E = require("vue"), l = (t) => t && t.__esModule ? t : { default: t }, y = /* @__PURE__ */ l(g), a = /* @__PURE__ */ l(h), T = /* @__PURE__ */ l(E), q = {
6
6
  name: "NcMentionBubble",
7
7
  props: {
8
8
  id: {
9
9
  type: String,
10
10
  required: !0
11
11
  },
12
+ /**
13
+ * @deprecated Use `label` instead
14
+ */
12
15
  title: {
13
16
  type: String,
14
- required: !0
17
+ required: !1,
18
+ default: null
19
+ },
20
+ label: {
21
+ type: String,
22
+ required: !1,
23
+ default: null
15
24
  },
16
25
  icon: {
17
26
  type: String,
@@ -36,6 +45,10 @@ const b = require("./_plugin-vue2_normalizer-DCfUPqga.cjs"), g = require("./Link
36
45
  },
37
46
  mentionText() {
38
47
  return !this.id.includes(" ") && !this.id.includes("/") ? `@${this.id}` : `@"${this.id}"`;
48
+ },
49
+ // Fallback to title for compatibility
50
+ labelWithFallback() {
51
+ return this.label || this.title;
39
52
  }
40
53
  },
41
54
  methods: {
@@ -47,20 +60,20 @@ const b = require("./_plugin-vue2_normalizer-DCfUPqga.cjs"), g = require("./Link
47
60
  }
48
61
  }
49
62
  };
50
- var $ = function() {
63
+ var C = function() {
51
64
  var e = this, n = e._self._c;
52
- 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--${e.avatarUrl ? "with-avatar" : ""}`], style: e.avatarUrl ? { backgroundImage: `url(${e.avatarUrl})` } : null }), n("span", { staticClass: "mention-bubble__title", attrs: { role: "heading", title: e.title } })]), n("span", { staticClass: "mention-bubble__select", attrs: { role: "none" } }, [e._v(e._s(e.mentionText))])])]);
53
- }, q = [], v = /* @__PURE__ */ b.normalizeComponent(
54
- C,
55
- $,
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--${e.avatarUrl ? "with-avatar" : ""}`], style: e.avatarUrl ? { backgroundImage: `url(${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 = [], $ = /* @__PURE__ */ b.normalizeComponent(
56
67
  q,
68
+ C,
69
+ S,
57
70
  !1,
58
71
  null,
59
- "357e6d0e",
72
+ "9c74f2e0",
60
73
  null,
61
74
  null
62
75
  );
63
- const o = v.exports;
76
+ const o = $.exports;
64
77
  /**
65
78
  * @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
66
79
  *
@@ -82,7 +95,7 @@ const o = v.exports;
82
95
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
83
96
  *
84
97
  */
85
- const u = "(?:^|\\s)", c = "(?:[^a-z]|$)", d = new RegExp(`${u}(@[a-zA-Z0-9_.@\\-']+)(${c})`, "gi"), p = new RegExp(`${u}(@&quot;[a-zA-Z0-9 _.@\\-']+&quot;)(${c})`, "gi"), S = {
98
+ const u = "(?:^|\\s)", c = "(?:[^a-z]|$)", d = new RegExp(`${u}(@[a-zA-Z0-9_.@\\-']+)(${c})`, "gi"), p = new RegExp(`${u}(@&quot;[a-zA-Z0-9 _.@\\-']+&quot;)(${c})`, "gi"), v = {
86
99
  props: {
87
100
  userData: {
88
101
  type: Object,
@@ -99,7 +112,7 @@ const u = "(?:^|\\s)", c = "(?:[^a-z]|$)", d = new RegExp(`${u}(@[a-zA-Z0-9_.@\\
99
112
  renderContent(t) {
100
113
  return y.default(t).split(d).map((r) => r.split(p)).flat().map((r) => {
101
114
  if (!r.startsWith("@"))
102
- return g.Linkify(r);
115
+ return f.Linkify(r);
103
116
  const i = r.slice(1).replace(/&quot;/gi, "");
104
117
  return " " + this.genSelectTemplate(i);
105
118
  }).join("").replace(/\n/gmi, "<br>").replace(/&amp;/gmi, "&");
@@ -114,7 +127,7 @@ const u = "(?:^|\\s)", c = "(?:[^a-z]|$)", d = new RegExp(`${u}(@[a-zA-Z0-9_.@\\
114
127
  let e = t.replace(/<br>/gmi, `
115
128
  `);
116
129
  return e = e.replace(/&nbsp;/gmi, " "), e = e.replace(/&amp;/gmi, "&"), e = e.replace(/<\/div>/gmi, `
117
- `), e = l.default(e, "<div>"), e = l.default(e), e;
130
+ `), e = a.default(e, "<div>"), e = a.default(e), e;
118
131
  },
119
132
  /**
120
133
  * Generate an autocompletion popup entry template
@@ -138,8 +151,8 @@ const u = "(?:^|\\s)", c = "(?:[^a-z]|$)", d = new RegExp(`${u}(@[a-zA-Z0-9_.@\\
138
151
  renderComponentHtml(t, e) {
139
152
  const n = T.default.extend(e), r = new n({
140
153
  propsData: t
141
- }), i = document.createElement("div"), a = document.createElement("div");
142
- i.style.display = "none", i.appendChild(a), document.body.appendChild(i), r.$mount(a);
154
+ }), i = document.createElement("div"), s = document.createElement("div");
155
+ i.style.display = "none", i.appendChild(s), document.body.appendChild(i), r.$mount(s);
143
156
  const m = i.innerHTML;
144
157
  return r.$destroy(), i.remove(), m;
145
158
  }
@@ -148,4 +161,4 @@ const u = "(?:^|\\s)", c = "(?:[^a-z]|$)", d = new RegExp(`${u}(@[a-zA-Z0-9_.@\\
148
161
  exports.NcMentionBubble = o;
149
162
  exports.USERID_REGEX = d;
150
163
  exports.USERID_REGEX_WITH_SPACE = p;
151
- exports.richEditor = S;
164
+ exports.richEditor = v;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-5TyVc_TT.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// Beginning or whitespace. Non-capturing group\nconst MENTION_START = '(?:^|\\\\s)'\n// Anything that is not text or end-of-line. Non-capturing group\nconst MENTION_END = '(?:[^a-z]|$)'\nexport const USERID_REGEX = new RegExp(`${MENTION_START}(@[a-zA-Z0-9_.@\\\\-']+)(${MENTION_END})`, 'gi')\nexport const USERID_REGEX_WITH_SPACE = new RegExp(`${MENTION_START}(@&quot;[a-zA-Z0-9 _.@\\\\-']+&quot;)(${MENTION_END})`, '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 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(/&quot;/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(/&amp;/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.replace(/<br>/gmi, '\\n')\n\t\t\ttext = text.replace(/&nbsp;/gmi, ' ')\n\t\t\ttext = text.replace(/&amp;/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}`\n\t\t\t\treturn !value.includes(' ') && !value.includes('/')\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_END","USERID_REGEX","USERID_REGEX_WITH_SPACE","richEditor","value","escapeHtml","part","Linkify","id","content","text","stripTags","data","NcMentionBubble","propsData","component","View","Vue","Item","wrapper","mount","renderedHtml"],"mappings":";;;+SA6CAA,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,KAAA,EAAA,KACA,KAAA,KAAA,EAAA;AAAA,IACA;AAAA;AAAA,IAEA,oBAAA;AACA,aAAA,KAAA,SAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,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aAAa,GAAG,GACpCA,IAAOA,EAAK,QAAQ,YAAY,GAAG,GAInCA,IAAOA,EAAK,QAAQ,cAAc;AAAA,CAAI,GAEtCA,IAAOC,EAAAA,QAAUD,GAAM,OAAO,GAC9BA,IAAOC,EAAS,QAACD,CAAI,GAEdA;AAAA,IACP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQD,kBAAkBN,GAAO;AAIxB,UAAI,OAAOA,IAAU;AACpB,eAAO,GAAG,KAAK,oBAAoB,QAAQ,WAAW,OAAO,GAAG,KAAK,oBAAoB,QAAQ,WAAW;AAG7G,YAAMQ,IAAO,KAAK,SAASR,CAAK;AAGhC,aAAKQ,IAQE,KAAK,oBAAoBA,GAAMC,CAAe,EAAE,QAAQ,aAAa,EAAE,IANtE,CAACT,EAAM,SAAS,GAAG,KAAK,CAACA,EAAM,SAAS,GAAG,IAC/C,IAAIA,CAAK,KACT,KAAKA,CAAK;AAAA,IAKd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,oBAAoBU,GAAWC,GAAW;AACzC,YAAMC,IAAOC,EAAAA,QAAI,OAAOF,CAAS,GAC3BG,IAAO,IAAIF,EAAK;AAAA,QACrB,WAAAF;AAAA,MACJ,CAAI,GAGKK,IAAU,SAAS,cAAc,KAAK,GACtCC,IAAQ,SAAS,cAAc,KAAK;AAC1C,MAAAD,EAAQ,MAAM,UAAU,QACxBA,EAAQ,YAAYC,CAAK,GACzB,SAAS,KAAK,YAAYD,CAAO,GAGjCD,EAAK,OAAOE,CAAK;AACjB,YAAMC,IAAeF,EAAQ;AAG7B,aAAAD,EAAK,SAAU,GACfC,EAAQ,OAAQ,GAETE;AAAA,IACP;AAAA,EACD;AACF;;;;;"}
@@ -1,10 +1,10 @@
1
- import '../assets/NcMentionBubble-2OXF_uEJ.css';
1
+ import '../assets/NcMentionBubble-YYl1ib_F.css';
2
2
  import { generateUrl as u } from "@nextcloud/router";
3
3
  /* empty css */
4
4
  import { n as p } from "./_plugin-vue2_normalizer-u6G_3nkj.mjs";
5
5
  import { L as m } from "./Linkify-V7PfCeZ8.mjs";
6
6
  import d from "escape-html";
7
- import a from "striptags";
7
+ import s from "striptags";
8
8
  import b from "vue";
9
9
  const _ = {
10
10
  name: "NcMentionBubble",
@@ -13,9 +13,18 @@ const _ = {
13
13
  type: String,
14
14
  required: !0
15
15
  },
16
+ /**
17
+ * @deprecated Use `label` instead
18
+ */
16
19
  title: {
17
20
  type: String,
18
- required: !0
21
+ required: !1,
22
+ default: null
23
+ },
24
+ label: {
25
+ type: String,
26
+ required: !1,
27
+ default: null
19
28
  },
20
29
  icon: {
21
30
  type: String,
@@ -40,6 +49,10 @@ const _ = {
40
49
  },
41
50
  mentionText() {
42
51
  return !this.id.includes(" ") && !this.id.includes("/") ? `@${this.id}` : `@"${this.id}"`;
52
+ },
53
+ // Fallback to title for compatibility
54
+ labelWithFallback() {
55
+ return this.label || this.title;
43
56
  }
44
57
  },
45
58
  methods: {
@@ -51,16 +64,16 @@ const _ = {
51
64
  }
52
65
  }
53
66
  };
54
- var g = function() {
67
+ var f = function() {
55
68
  var e = this, n = e._self._c;
56
- 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--${e.avatarUrl ? "with-avatar" : ""}`], style: e.avatarUrl ? { backgroundImage: `url(${e.avatarUrl})` } : null }), n("span", { staticClass: "mention-bubble__title", attrs: { role: "heading", title: e.title } })]), n("span", { staticClass: "mention-bubble__select", attrs: { role: "none" } }, [e._v(e._s(e.mentionText))])])]);
57
- }, f = [], h = /* @__PURE__ */ p(
69
+ 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--${e.avatarUrl ? "with-avatar" : ""}`], style: e.avatarUrl ? { backgroundImage: `url(${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))])])]);
70
+ }, g = [], h = /* @__PURE__ */ p(
58
71
  _,
59
- g,
60
72
  f,
73
+ g,
61
74
  !1,
62
75
  null,
63
- "357e6d0e",
76
+ "9c74f2e0",
64
77
  null,
65
78
  null
66
79
  );
@@ -86,7 +99,7 @@ const y = h.exports;
86
99
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
87
100
  *
88
101
  */
89
- const o = "(?:^|\\s)", l = "(?:[^a-z]|$)", E = new RegExp(`${o}(@[a-zA-Z0-9_.@\\-']+)(${l})`, "gi"), $ = new RegExp(`${o}(@&quot;[a-zA-Z0-9 _.@\\-']+&quot;)(${l})`, "gi"), R = {
102
+ const l = "(?:^|\\s)", o = "(?:[^a-z]|$)", E = new RegExp(`${l}(@[a-zA-Z0-9_.@\\-']+)(${o})`, "gi"), $ = new RegExp(`${l}(@&quot;[a-zA-Z0-9 _.@\\-']+&quot;)(${o})`, "gi"), N = {
90
103
  props: {
91
104
  userData: {
92
105
  type: Object,
@@ -118,7 +131,7 @@ const o = "(?:^|\\s)", l = "(?:[^a-z]|$)", E = new RegExp(`${o}(@[a-zA-Z0-9_.@\\
118
131
  let e = t.replace(/<br>/gmi, `
119
132
  `);
120
133
  return e = e.replace(/&nbsp;/gmi, " "), e = e.replace(/&amp;/gmi, "&"), e = e.replace(/<\/div>/gmi, `
121
- `), e = a(e, "<div>"), e = a(e), e;
134
+ `), e = s(e, "<div>"), e = s(e), e;
122
135
  },
123
136
  /**
124
137
  * Generate an autocompletion popup entry template
@@ -142,8 +155,8 @@ const o = "(?:^|\\s)", l = "(?:[^a-z]|$)", E = new RegExp(`${o}(@[a-zA-Z0-9_.@\\
142
155
  renderComponentHtml(t, e) {
143
156
  const n = b.extend(e), r = new n({
144
157
  propsData: t
145
- }), i = document.createElement("div"), s = document.createElement("div");
146
- i.style.display = "none", i.appendChild(s), document.body.appendChild(i), r.$mount(s);
158
+ }), i = document.createElement("div"), a = document.createElement("div");
159
+ i.style.display = "none", i.appendChild(a), document.body.appendChild(i), r.$mount(a);
147
160
  const c = i.innerHTML;
148
161
  return r.$destroy(), i.remove(), c;
149
162
  }
@@ -153,5 +166,5 @@ export {
153
166
  y as N,
154
167
  E as U,
155
168
  $ as a,
156
- R as r
169
+ N as r
157
170
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-xnq0-IMW.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// Beginning or whitespace. Non-capturing group\nconst MENTION_START = '(?:^|\\\\s)'\n// Anything that is not text or end-of-line. Non-capturing group\nconst MENTION_END = '(?:[^a-z]|$)'\nexport const USERID_REGEX = new RegExp(`${MENTION_START}(@[a-zA-Z0-9_.@\\\\-']+)(${MENTION_END})`, 'gi')\nexport const USERID_REGEX_WITH_SPACE = new RegExp(`${MENTION_START}(@&quot;[a-zA-Z0-9 _.@\\\\-']+&quot;)(${MENTION_END})`, '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 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(/&quot;/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(/&amp;/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.replace(/<br>/gmi, '\\n')\n\t\t\ttext = text.replace(/&nbsp;/gmi, ' ')\n\t\t\ttext = text.replace(/&amp;/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}`\n\t\t\t\treturn !value.includes(' ') && !value.includes('/')\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_END","USERID_REGEX","USERID_REGEX_WITH_SPACE","richEditor","value","escapeHtml","part","Linkify","id","content","text","stripTags","data","NcMentionBubble","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,MAA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KAAKA,CAAK;AAAA,IAKd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,oBAAoBU,GAAWC,GAAW;AACzC,YAAMC,IAAOC,EAAI,OAAOF,CAAS,GAC3BG,IAAO,IAAIF,EAAK;AAAA,QACrB,WAAAF;AAAA,MACJ,CAAI,GAGKK,IAAU,SAAS,cAAc,KAAK,GACtCC,IAAQ,SAAS,cAAc,KAAK;AAC1C,MAAAD,EAAQ,MAAM,UAAU,QACxBA,EAAQ,YAAYC,CAAK,GACzB,SAAS,KAAK,YAAYD,CAAO,GAGjCD,EAAK,OAAOE,CAAK;AACjB,YAAMC,IAAeF,EAAQ;AAG7B,aAAAD,EAAK,SAAU,GACfC,EAAQ,OAAQ,GAETE;AAAA,IACP;AAAA,EACD;AACF;"}
@@ -1,6 +1,6 @@
1
- require('../assets/referencePickerModal-iy5QSWj6.css');
1
+ require('../assets/referencePickerModal-yucfxaTX.css');
2
2
  "use strict";
3
- const o = require("./_plugin-vue2_normalizer-DCfUPqga.cjs"), i = require("./_l10n-Od-4xzJA.cjs"), D = require("@nextcloud/axios"), y = require("@nextcloud/initial-state"), h = require("@nextcloud/router"), p = require("../Components/NcEmptyContent.cjs"), w = require("./index-FO4BaGaF.cjs"), b = require("./NcSelect-rMSul72R.cjs"), j = require("../Components/NcLoadingIcon.cjs"), A = require("./NcTextField-eclRKl_B.cjs"), F = require("./DotsHorizontal-6hepLUSS.cjs"), H = require("../Components/NcButton.cjs"), U = require("../Components/NcModal.cjs"), Q = require("@nextcloud/event-bus"), G = require("./ArrowLeft-fC5aEWWu.cjs"), Z = require("./Close-dotk0707.cjs"), J = require("vue"), S = (t) => t && t.__esModule ? t : { default: t }, f = /* @__PURE__ */ S(D), K = /* @__PURE__ */ S(J);
3
+ const o = require("./_plugin-vue2_normalizer-DCfUPqga.cjs"), i = require("./_l10n-Od-4xzJA.cjs"), D = require("@nextcloud/axios"), y = require("@nextcloud/initial-state"), h = require("@nextcloud/router"), p = require("../Components/NcEmptyContent.cjs"), w = require("./index-FO4BaGaF.cjs"), b = require("./NcSelect-SlL-Y8Qz.cjs"), j = require("../Components/NcLoadingIcon.cjs"), A = require("./NcTextField-eclRKl_B.cjs"), F = require("./DotsHorizontal-6hepLUSS.cjs"), H = require("../Components/NcButton.cjs"), U = require("../Components/NcModal.cjs"), Q = require("@nextcloud/event-bus"), G = require("./ArrowLeft-fC5aEWWu.cjs"), Z = require("./Close-dotk0707.cjs"), J = require("vue"), S = (t) => t && t.__esModule ? t : { default: t }, f = /* @__PURE__ */ S(D), K = /* @__PURE__ */ S(J);
4
4
  window._vue_richtext_widgets || (window._vue_richtext_widgets = {});
5
5
  const R = (t) => !!window._vue_richtext_widgets[t], $ = (t, e, r = (s) => {
6
6
  }) => {