@nextcloud/vue 8.5.0 → 8.6.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.
Files changed (512) hide show
  1. package/CHANGELOG.md +44 -1
  2. package/dist/Components/NcActionButton.cjs +10 -7
  3. package/dist/Components/NcActionButton.cjs.map +1 -1
  4. package/dist/Components/NcActionButton.mjs +15 -13
  5. package/dist/Components/NcActionButton.mjs.map +1 -1
  6. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  7. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  8. package/dist/Components/NcActionCaption.cjs +2 -1
  9. package/dist/Components/NcActionCaption.mjs +7 -7
  10. package/dist/Components/NcActionCaption.mjs.map +1 -1
  11. package/dist/Components/NcActionCheckbox.cjs +2 -1
  12. package/dist/Components/NcActionCheckbox.cjs.map +1 -1
  13. package/dist/Components/NcActionCheckbox.mjs +9 -9
  14. package/dist/Components/NcActionCheckbox.mjs.map +1 -1
  15. package/dist/Components/NcActionInput.cjs +1 -1
  16. package/dist/Components/NcActionInput.mjs +1 -1
  17. package/dist/Components/NcActionLink.cjs +2 -1
  18. package/dist/Components/NcActionLink.cjs.map +1 -1
  19. package/dist/Components/NcActionLink.mjs +3 -3
  20. package/dist/Components/NcActionLink.mjs.map +1 -1
  21. package/dist/Components/NcActionRadio.cjs +2 -1
  22. package/dist/Components/NcActionRadio.cjs.map +1 -1
  23. package/dist/Components/NcActionRadio.mjs +3 -3
  24. package/dist/Components/NcActionRadio.mjs.map +1 -1
  25. package/dist/Components/NcActionRouter.cjs +5 -4
  26. package/dist/Components/NcActionRouter.cjs.map +1 -1
  27. package/dist/Components/NcActionRouter.mjs +3 -3
  28. package/dist/Components/NcActionRouter.mjs.map +1 -1
  29. package/dist/Components/NcActionSeparator.cjs +7 -6
  30. package/dist/Components/NcActionSeparator.mjs +3 -3
  31. package/dist/Components/NcActionSeparator.mjs.map +1 -1
  32. package/dist/Components/NcActionText.cjs +2 -1
  33. package/dist/Components/NcActionText.cjs.map +1 -1
  34. package/dist/Components/NcActionText.mjs +5 -5
  35. package/dist/Components/NcActionText.mjs.map +1 -1
  36. package/dist/Components/NcActionTextEditable.cjs +5 -4
  37. package/dist/Components/NcActionTextEditable.cjs.map +1 -1
  38. package/dist/Components/NcActionTextEditable.mjs +4 -4
  39. package/dist/Components/NcActionTextEditable.mjs.map +1 -1
  40. package/dist/Components/NcActions.cjs +1 -1
  41. package/dist/Components/NcActions.mjs +1 -1
  42. package/dist/Components/NcAppContent.cjs +1 -1
  43. package/dist/Components/NcAppContent.mjs +1 -1
  44. package/dist/Components/NcAppNavigation.cjs +1 -1
  45. package/dist/Components/NcAppNavigation.mjs +1 -1
  46. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  47. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  48. package/dist/Components/NcAppNavigationIconBullet.cjs +2 -1
  49. package/dist/Components/NcAppNavigationIconBullet.mjs +3 -3
  50. package/dist/Components/NcAppNavigationIconBullet.mjs.map +1 -1
  51. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  52. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  53. package/dist/Components/NcAppNavigationNew.cjs +2 -1
  54. package/dist/Components/NcAppNavigationNew.cjs.map +1 -1
  55. package/dist/Components/NcAppNavigationNew.mjs +6 -6
  56. package/dist/Components/NcAppNavigationNew.mjs.map +1 -1
  57. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  58. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  59. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  60. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  61. package/dist/Components/NcAppNavigationSpacer.cjs +7 -6
  62. package/dist/Components/NcAppNavigationSpacer.mjs +6 -6
  63. package/dist/Components/NcAppNavigationSpacer.mjs.map +1 -1
  64. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  65. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  66. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  67. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  68. package/dist/Components/NcAppSettingsSection.cjs +2 -1
  69. package/dist/Components/NcAppSettingsSection.mjs +3 -3
  70. package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
  71. package/dist/Components/NcAppSidebar.cjs +1 -1
  72. package/dist/Components/NcAppSidebar.mjs +1 -1
  73. package/dist/Components/NcAppSidebarTab.cjs +5 -4
  74. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  75. package/dist/Components/NcAppSidebarTab.mjs +3 -3
  76. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  77. package/dist/Components/NcAvatar.cjs +1 -1
  78. package/dist/Components/NcAvatar.mjs +1 -1
  79. package/dist/Components/NcBreadcrumb.cjs +1 -1
  80. package/dist/Components/NcBreadcrumb.mjs +1 -1
  81. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  82. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  83. package/dist/Components/NcButton.cjs +17 -13
  84. package/dist/Components/NcButton.cjs.map +1 -1
  85. package/dist/Components/NcButton.mjs +19 -16
  86. package/dist/Components/NcButton.mjs.map +1 -1
  87. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  88. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  89. package/dist/Components/NcColorPicker.cjs +1 -1
  90. package/dist/Components/NcColorPicker.mjs +1 -1
  91. package/dist/Components/NcContent.cjs +1 -1
  92. package/dist/Components/NcContent.mjs +1 -1
  93. package/dist/Components/NcCounterBubble.cjs +5 -4
  94. package/dist/Components/NcCounterBubble.mjs +1 -1
  95. package/dist/Components/NcCounterBubble.mjs.map +1 -1
  96. package/dist/Components/NcDashboardWidget.cjs +1 -1
  97. package/dist/Components/NcDashboardWidget.mjs +1 -1
  98. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  99. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  100. package/dist/Components/NcDateTime.cjs +1 -1
  101. package/dist/Components/NcDateTime.mjs +1 -1
  102. package/dist/Components/NcDateTimePicker.cjs +16 -15
  103. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  104. package/dist/Components/NcDateTimePicker.mjs +16 -16
  105. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  106. package/dist/Components/NcDateTimePickerNative.cjs +9 -8
  107. package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
  108. package/dist/Components/NcDateTimePickerNative.mjs +8 -8
  109. package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
  110. package/dist/Components/NcDialog.cjs +1 -1
  111. package/dist/Components/NcDialog.mjs +1 -1
  112. package/dist/Components/NcDialogButton.cjs +1 -1
  113. package/dist/Components/NcDialogButton.mjs +1 -1
  114. package/dist/Components/NcEllipsisedOption.cjs +5 -4
  115. package/dist/Components/NcEllipsisedOption.cjs.map +1 -1
  116. package/dist/Components/NcEllipsisedOption.mjs +3 -3
  117. package/dist/Components/NcEllipsisedOption.mjs.map +1 -1
  118. package/dist/Components/NcEmojiPicker.cjs +1 -1
  119. package/dist/Components/NcEmojiPicker.mjs +1 -1
  120. package/dist/Components/NcEmptyContent.cjs +2 -1
  121. package/dist/Components/NcEmptyContent.mjs +3 -3
  122. package/dist/Components/NcEmptyContent.mjs.map +1 -1
  123. package/dist/Components/NcGuestContent.cjs +4 -3
  124. package/dist/Components/NcGuestContent.mjs +6 -6
  125. package/dist/Components/NcGuestContent.mjs.map +1 -1
  126. package/dist/Components/NcHeaderMenu.cjs +1 -1
  127. package/dist/Components/NcHeaderMenu.mjs +1 -1
  128. package/dist/Components/NcIconSvgWrapper.cjs +1 -1
  129. package/dist/Components/NcIconSvgWrapper.mjs +1 -1
  130. package/dist/Components/NcInputField.cjs +7 -6
  131. package/dist/Components/NcInputField.cjs.map +1 -1
  132. package/dist/Components/NcInputField.mjs +6 -6
  133. package/dist/Components/NcInputField.mjs.map +1 -1
  134. package/dist/Components/NcListItem.cjs +1 -1
  135. package/dist/Components/NcListItem.mjs +1 -1
  136. package/dist/Components/NcListItemIcon.cjs +1 -1
  137. package/dist/Components/NcListItemIcon.mjs +1 -1
  138. package/dist/Components/NcLoadingIcon.cjs +2 -1
  139. package/dist/Components/NcLoadingIcon.mjs +3 -3
  140. package/dist/Components/NcLoadingIcon.mjs.map +1 -1
  141. package/dist/Components/NcModal.cjs +12 -11
  142. package/dist/Components/NcModal.cjs.map +1 -1
  143. package/dist/Components/NcModal.mjs +19 -19
  144. package/dist/Components/NcModal.mjs.map +1 -1
  145. package/dist/Components/NcNoteCard.cjs +10 -7
  146. package/dist/Components/NcNoteCard.cjs.map +1 -1
  147. package/dist/Components/NcNoteCard.mjs +21 -19
  148. package/dist/Components/NcNoteCard.mjs.map +1 -1
  149. package/dist/Components/NcPasswordField.cjs +1 -1
  150. package/dist/Components/NcPasswordField.mjs +1 -1
  151. package/dist/Components/NcPopover.cjs +1 -1
  152. package/dist/Components/NcPopover.mjs +1 -1
  153. package/dist/Components/NcProgressBar.cjs +1 -1
  154. package/dist/Components/NcProgressBar.mjs +1 -1
  155. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  156. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  157. package/dist/Components/NcRichContenteditable.cjs +1 -1
  158. package/dist/Components/NcRichContenteditable.mjs +2 -2
  159. package/dist/Components/NcRichText.cjs +1 -1
  160. package/dist/Components/NcRichText.mjs +3 -3
  161. package/dist/Components/NcSelect.cjs +1 -1
  162. package/dist/Components/NcSelect.mjs +1 -1
  163. package/dist/Components/NcSelectTags.cjs +1 -1
  164. package/dist/Components/NcSelectTags.mjs +1 -1
  165. package/dist/Components/NcSettingsInputText.cjs +1 -1
  166. package/dist/Components/NcSettingsInputText.mjs +1 -1
  167. package/dist/Components/NcSettingsSection.cjs +1 -1
  168. package/dist/Components/NcSettingsSection.mjs +1 -1
  169. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  170. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  171. package/dist/Components/NcTextArea.cjs +7 -6
  172. package/dist/Components/NcTextArea.cjs.map +1 -1
  173. package/dist/Components/NcTextArea.mjs +4 -4
  174. package/dist/Components/NcTextArea.mjs.map +1 -1
  175. package/dist/Components/NcTextField.cjs +1 -1
  176. package/dist/Components/NcTextField.mjs +1 -1
  177. package/dist/Components/NcTimezonePicker.cjs +1 -1
  178. package/dist/Components/NcTimezonePicker.mjs +1 -1
  179. package/dist/Components/NcUserBubble.cjs +1 -1
  180. package/dist/Components/NcUserBubble.mjs +1 -1
  181. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  182. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  183. package/dist/Directives/Tooltip.cjs +2 -1
  184. package/dist/Directives/Tooltip.cjs.map +1 -1
  185. package/dist/Directives/Tooltip.mjs +4 -4
  186. package/dist/Directives/Tooltip.mjs.map +1 -1
  187. package/dist/Functions/usernameToColor.cjs +1 -1
  188. package/dist/Functions/usernameToColor.mjs +1 -1
  189. package/dist/Mixins/richEditor.cjs +1 -1
  190. package/dist/Mixins/richEditor.mjs +1 -1
  191. package/dist/assets/{NcActionButton-YVkNHN_x.css → NcActionButton-1Z9lN7ar.css} +17 -17
  192. package/dist/assets/{NcActions-nAi2TA1m.css → NcActions-mSL9fcPO.css} +12 -12
  193. package/dist/assets/{NcAppNavigationToggle-upUgYNtL.css → NcAppNavigationToggle-3vMKtCQL.css} +3 -3
  194. package/dist/assets/{NcAppSettingsDialog-8K8FduDk.css → NcAppSettingsDialog-0eOo3ERv.css} +16 -17
  195. package/dist/assets/{NcAvatar-Vg6Mi1TD.css → NcAvatar-5H9cqcD1.css} +27 -27
  196. package/dist/assets/{NcButton-DTnreNJ5.css → NcButton-4Wj3KJn8.css} +43 -43
  197. package/dist/assets/{NcCheckboxRadioSwitch-IKpLtz9k.css → NcCheckboxRadioSwitch-mgKotCbU.css} +49 -47
  198. package/dist/assets/{NcColorPicker-CNX9fj56.css → NcColorPicker-PzIRM1j1.css} +24 -24
  199. package/dist/assets/{NcDateTimePicker-J_kGHwdu.css → NcDateTimePicker-RY_Hm2sB.css} +10 -10
  200. package/dist/assets/{NcDateTimePickerNative-2pQS5L0H.css → NcDateTimePickerNative-5yybtvfx.css} +19 -7
  201. package/dist/assets/{NcDialog-2V180xdm.css → NcDialog-DN-rY-55.css} +30 -19
  202. package/dist/assets/{NcEmojiPicker-lBXbC6Jd.css → NcEmojiPicker-wTIbvcrG.css} +5 -5
  203. package/dist/assets/{NcHeaderMenu-P0OkK9WN.css → NcHeaderMenu-06vdn4tC.css} +15 -15
  204. package/dist/assets/{NcInputField-Y-Qp3D_b.css → NcInputField-L2Lld_iG.css} +39 -38
  205. package/dist/assets/{NcListItem-xcW2PRrk.css → NcListItem-6sL-frKJ.css} +49 -49
  206. package/dist/assets/{NcModal-QzDLeQrW.css → NcModal-UZh031V1.css} +64 -64
  207. package/dist/assets/{NcNoteCard-OTfZqVvP.css → NcNoteCard-f0NZpwjL.css} +7 -7
  208. package/dist/assets/{NcRichContenteditable-xiQ4y2Z6.css → NcRichContenteditable-j9edXOEH.css} +13 -12
  209. package/dist/assets/{NcTextArea-K-KVPiMp.css → NcTextArea-4rVwq6GK.css} +24 -23
  210. package/dist/assets/{referencePickerModal-VxSowpb5.css → referencePickerModal-iy5QSWj6.css} +2 -2
  211. package/dist/chunks/{AlertCircleOutline-VgVvRWpm.cjs → AlertCircleOutline-HYz1lvHU.cjs} +4 -4
  212. package/dist/chunks/AlertCircleOutline-HYz1lvHU.cjs.map +1 -0
  213. package/dist/chunks/{AlertCircleOutline-lwSRucNO.mjs → AlertCircleOutline-XY0EPUmQ.mjs} +4 -4
  214. package/dist/chunks/AlertCircleOutline-XY0EPUmQ.mjs.map +1 -0
  215. package/dist/chunks/{ArrowLeft-3KC2k3tR.cjs → ArrowLeft-fC5aEWWu.cjs} +1 -1
  216. package/dist/chunks/ArrowLeft-fC5aEWWu.cjs.map +1 -0
  217. package/dist/chunks/{ArrowLeft-buaCjhfr.mjs → ArrowLeft-uW5eNVkY.mjs} +4 -4
  218. package/dist/chunks/ArrowLeft-uW5eNVkY.mjs.map +1 -0
  219. package/dist/chunks/{ArrowRight-4p6gv-9o.mjs → ArrowRight-16bLxoZc.mjs} +1 -1
  220. package/dist/chunks/ArrowRight-16bLxoZc.mjs.map +1 -0
  221. package/dist/chunks/{ArrowRight-uEMed4kl.cjs → ArrowRight-uUC8qW2c.cjs} +1 -1
  222. package/dist/chunks/ArrowRight-uUC8qW2c.cjs.map +1 -0
  223. package/dist/chunks/{Check-5uKO4aXx.cjs → Check-QBzDcHpr.cjs} +1 -1
  224. package/dist/chunks/Check-QBzDcHpr.cjs.map +1 -0
  225. package/dist/chunks/{Check-FObi_cEO.mjs → Check-qy5XrF1J.mjs} +1 -1
  226. package/dist/chunks/Check-qy5XrF1J.mjs.map +1 -0
  227. package/dist/chunks/{ChevronDown-rdCNNu7u.cjs → ChevronDown-Hc_DTRav.cjs} +4 -4
  228. package/dist/chunks/ChevronDown-Hc_DTRav.cjs.map +1 -0
  229. package/dist/chunks/{ChevronDown-TbRvziNU.mjs → ChevronDown-suAKKmeb.mjs} +1 -1
  230. package/dist/chunks/ChevronDown-suAKKmeb.mjs.map +1 -0
  231. package/dist/chunks/{ChevronRight-XOmSMmxA.mjs → ChevronRight-9owhU_17.mjs} +6 -6
  232. package/dist/chunks/ChevronRight-9owhU_17.mjs.map +1 -0
  233. package/dist/chunks/{ChevronRight-bp7fT1r7.cjs → ChevronRight-MdQC55Yq.cjs} +1 -1
  234. package/dist/chunks/ChevronRight-MdQC55Yq.cjs.map +1 -0
  235. package/dist/chunks/{Close-5Hzp7J3v.mjs → Close-QtH6_3PP.mjs} +4 -4
  236. package/dist/chunks/Close-QtH6_3PP.mjs.map +1 -0
  237. package/dist/chunks/{Close-QFLrdRdG.cjs → Close-dotk0707.cjs} +4 -4
  238. package/dist/chunks/Close-dotk0707.cjs.map +1 -0
  239. package/dist/chunks/{DotsHorizontal-dlN1WvqM.cjs → DotsHorizontal-6hepLUSS.cjs} +1 -1
  240. package/dist/chunks/DotsHorizontal-6hepLUSS.cjs.map +1 -0
  241. package/dist/chunks/{DotsHorizontal-NssXDZGM.mjs → DotsHorizontal-IbmXTXRA.mjs} +1 -1
  242. package/dist/chunks/DotsHorizontal-IbmXTXRA.mjs.map +1 -0
  243. package/dist/chunks/{GenColors-ZwEj275X.mjs → GenColors-OoWIPB3C.mjs} +1 -1
  244. package/dist/chunks/{GenColors-ZwEj275X.mjs.map → GenColors-OoWIPB3C.mjs.map} +1 -1
  245. package/dist/chunks/{GenColors-6mrcK1J2.cjs → GenColors-gc0oVgC_.cjs} +1 -1
  246. package/dist/chunks/{GenColors-6mrcK1J2.cjs.map → GenColors-gc0oVgC_.cjs.map} +1 -1
  247. package/dist/chunks/{NcActionButtonGroup-3W6tc8gZ.mjs → NcActionButtonGroup-D49ovBAN.mjs} +6 -6
  248. package/dist/chunks/{NcActionButtonGroup-3W6tc8gZ.mjs.map → NcActionButtonGroup-D49ovBAN.mjs.map} +1 -1
  249. package/dist/chunks/{NcActionButtonGroup-IEaXhYp3.cjs → NcActionButtonGroup-hpwif0u3.cjs} +3 -2
  250. package/dist/chunks/{NcActionButtonGroup-IEaXhYp3.cjs.map → NcActionButtonGroup-hpwif0u3.cjs.map} +1 -1
  251. package/dist/chunks/{NcActionInput-v8cC8WD4.mjs → NcActionInput-cyxUHqTr.mjs} +7 -7
  252. package/dist/chunks/{NcActionInput-v8cC8WD4.mjs.map → NcActionInput-cyxUHqTr.mjs.map} +1 -1
  253. package/dist/chunks/{NcActionInput-bLRYLx45.cjs → NcActionInput-m10Amrmc.cjs} +3 -2
  254. package/dist/chunks/{NcActionInput-bLRYLx45.cjs.map → NcActionInput-m10Amrmc.cjs.map} +1 -1
  255. package/dist/chunks/{NcActions-CNDgnRLf.mjs → NcActions-bAnBpPrc.mjs} +193 -154
  256. package/dist/chunks/NcActions-bAnBpPrc.mjs.map +1 -0
  257. package/dist/chunks/{NcActions-7ytNFRBJ.cjs → NcActions-z-BOuDhM.cjs} +185 -146
  258. package/dist/chunks/NcActions-z-BOuDhM.cjs.map +1 -0
  259. package/dist/chunks/{NcAppContent-f3dNUfhO.cjs → NcAppContent-t8UhBH3s.cjs} +4 -3
  260. package/dist/chunks/{NcAppContent-f3dNUfhO.cjs.map → NcAppContent-t8UhBH3s.cjs.map} +1 -1
  261. package/dist/chunks/{NcAppContent-XBosilQH.mjs → NcAppContent-y9KdCdfx.mjs} +9 -9
  262. package/dist/chunks/{NcAppContent-XBosilQH.mjs.map → NcAppContent-y9KdCdfx.mjs.map} +1 -1
  263. package/dist/chunks/{NcAppNavigation-oke9RxP6.cjs → NcAppNavigation-PLg2oNao.cjs} +13 -12
  264. package/dist/chunks/{NcAppNavigation-qUXaV47L.mjs.map → NcAppNavigation-PLg2oNao.cjs.map} +1 -1
  265. package/dist/chunks/{NcAppNavigation-qUXaV47L.mjs → NcAppNavigation-hiPB8YDB.mjs} +4 -4
  266. package/dist/chunks/{NcAppNavigation-oke9RxP6.cjs.map → NcAppNavigation-hiPB8YDB.mjs.map} +1 -1
  267. package/dist/chunks/{NcAppNavigationCaption-hVmjPz-2.cjs → NcAppNavigationCaption-kKsAcV3F.cjs} +3 -2
  268. package/dist/chunks/{NcAppNavigationCaption-hVmjPz-2.cjs.map → NcAppNavigationCaption-kKsAcV3F.cjs.map} +1 -1
  269. package/dist/chunks/NcAppNavigationCaption-q8C0HzdM.mjs +47 -0
  270. package/dist/chunks/{NcAppNavigationCaption-M-KZKijE.mjs.map → NcAppNavigationCaption-q8C0HzdM.mjs.map} +1 -1
  271. package/dist/chunks/{NcAppNavigationItem-YYoh37Ky.cjs → NcAppNavigationItem-BTI9BVOR.cjs} +6 -5
  272. package/dist/chunks/NcAppNavigationItem-BTI9BVOR.cjs.map +1 -0
  273. package/dist/chunks/{NcAppNavigationItem-GNnDmUq5.mjs → NcAppNavigationItem-WmNVPGgg.mjs} +10 -10
  274. package/dist/chunks/NcAppNavigationItem-WmNVPGgg.mjs.map +1 -0
  275. package/dist/chunks/{NcAppNavigationNewItem-3l4mRRsI.cjs → NcAppNavigationNewItem-bEBZNF2D.cjs} +3 -2
  276. package/dist/chunks/{NcAppNavigationNewItem-pBHgj8Es.mjs.map → NcAppNavigationNewItem-bEBZNF2D.cjs.map} +1 -1
  277. package/dist/chunks/{NcAppNavigationNewItem-pBHgj8Es.mjs → NcAppNavigationNewItem-iJxYhc8O.mjs} +7 -7
  278. package/dist/chunks/{NcAppNavigationNewItem-3l4mRRsI.cjs.map → NcAppNavigationNewItem-iJxYhc8O.mjs.map} +1 -1
  279. package/dist/chunks/{NcAppNavigationSettings-c_S9UbSU.mjs → NcAppNavigationSettings--bavO03z.mjs} +10 -9
  280. package/dist/chunks/NcAppNavigationSettings--bavO03z.mjs.map +1 -0
  281. package/dist/chunks/{NcAppNavigationSettings-IkF_z_xt.cjs → NcAppNavigationSettings-J7w9P7fI.cjs} +8 -6
  282. package/dist/chunks/NcAppNavigationSettings-J7w9P7fI.cjs.map +1 -0
  283. package/dist/chunks/{NcAppNavigationToggle-S4YTmnky.mjs → NcAppNavigationToggle-8FtmM4XU.mjs} +22 -13
  284. package/dist/chunks/NcAppNavigationToggle-8FtmM4XU.mjs.map +1 -0
  285. package/dist/chunks/NcAppNavigationToggle-mMhLE73x.cjs +119 -0
  286. package/dist/chunks/NcAppNavigationToggle-mMhLE73x.cjs.map +1 -0
  287. package/dist/chunks/{NcAppSettingsDialog-CQtmRXyZ.mjs → NcAppSettingsDialog-FqEZ3lXG.mjs} +9 -9
  288. package/dist/chunks/{NcAppSettingsDialog-CQtmRXyZ.mjs.map → NcAppSettingsDialog-FqEZ3lXG.mjs.map} +1 -1
  289. package/dist/chunks/{NcAppSettingsDialog-L6IvAL_I.cjs → NcAppSettingsDialog-tN3bu9XO.cjs} +4 -3
  290. package/dist/chunks/{NcAppSettingsDialog-L6IvAL_I.cjs.map → NcAppSettingsDialog-tN3bu9XO.cjs.map} +1 -1
  291. package/dist/chunks/{NcAppSidebar-GCbKi7Tk.cjs → NcAppSidebar-J2XzL1WT.cjs} +6 -5
  292. package/dist/chunks/NcAppSidebar-J2XzL1WT.cjs.map +1 -0
  293. package/dist/chunks/{NcAppSidebar-nHbqU8Wl.mjs → NcAppSidebar-lE3w-VIf.mjs} +10 -10
  294. package/dist/chunks/NcAppSidebar-lE3w-VIf.mjs.map +1 -0
  295. package/dist/chunks/{NcAvatar-1gX-bnpd.mjs → NcAvatar-MNJp-c9e.mjs} +26 -26
  296. package/dist/chunks/NcAvatar-MNJp-c9e.mjs.map +1 -0
  297. package/dist/chunks/{NcAvatar-8NgbtiTN.cjs → NcAvatar-OWW68uV3.cjs} +19 -18
  298. package/dist/chunks/NcAvatar-OWW68uV3.cjs.map +1 -0
  299. package/dist/chunks/{NcBreadcrumb-VlYks8Vu.mjs → NcBreadcrumb-4FfLWUDX.mjs} +8 -8
  300. package/dist/chunks/{NcBreadcrumb-VlYks8Vu.mjs.map → NcBreadcrumb-4FfLWUDX.mjs.map} +1 -1
  301. package/dist/chunks/{NcBreadcrumb-3vNer4Fs.cjs → NcBreadcrumb-YClz0EeP.cjs} +6 -5
  302. package/dist/chunks/{NcBreadcrumb-3vNer4Fs.cjs.map → NcBreadcrumb-YClz0EeP.cjs.map} +1 -1
  303. package/dist/chunks/{NcBreadcrumbs-UCJPNjZg.mjs → NcBreadcrumbs-Gln66w_d.mjs} +6 -6
  304. package/dist/chunks/NcBreadcrumbs-Gln66w_d.mjs.map +1 -0
  305. package/dist/chunks/{NcBreadcrumbs-GhYBmcix.cjs → NcBreadcrumbs-SPqCk2mi.cjs} +4 -3
  306. package/dist/chunks/NcBreadcrumbs-SPqCk2mi.cjs.map +1 -0
  307. package/dist/chunks/{NcCheckboxRadioSwitch-s5C7ZGB_.cjs → NcCheckboxRadioSwitch-R-zNvd7d.cjs} +25 -25
  308. package/dist/chunks/NcCheckboxRadioSwitch-R-zNvd7d.cjs.map +1 -0
  309. package/dist/chunks/{NcCheckboxRadioSwitch-3sa_9DpY.mjs → NcCheckboxRadioSwitch-paTuPXGc.mjs} +26 -26
  310. package/dist/chunks/NcCheckboxRadioSwitch-paTuPXGc.mjs.map +1 -0
  311. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-Ooje-q1U.cjs +4 -0
  312. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-Ooje-q1U.cjs.map +1 -0
  313. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-l6e0b34w.mjs +3 -0
  314. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-l6e0b34w.mjs.map +1 -0
  315. package/dist/chunks/{NcColorPicker-aNJDKf-I.mjs → NcColorPicker-ullH7CFZ.mjs} +27 -20
  316. package/dist/chunks/NcColorPicker-ullH7CFZ.mjs.map +1 -0
  317. package/dist/chunks/{NcColorPicker-4qA0UWdA.cjs → NcColorPicker-vHHSVKQS.cjs} +16 -8
  318. package/dist/chunks/NcColorPicker-vHHSVKQS.cjs.map +1 -0
  319. package/dist/chunks/{NcContent-x5KPSopo.cjs → NcContent-M_ZUbKIL.cjs} +5 -4
  320. package/dist/chunks/{NcContent-x5KPSopo.cjs.map → NcContent-M_ZUbKIL.cjs.map} +1 -1
  321. package/dist/chunks/{NcContent-V1PRVhsU.mjs → NcContent-RGzECysY.mjs} +8 -8
  322. package/dist/chunks/{NcContent-V1PRVhsU.mjs.map → NcContent-RGzECysY.mjs.map} +1 -1
  323. package/dist/chunks/{NcDashboardWidget-pzCvVb_0.mjs → NcDashboardWidget-KMrDOCQC.mjs} +7 -7
  324. package/dist/chunks/{NcDashboardWidget-pzCvVb_0.mjs.map → NcDashboardWidget-KMrDOCQC.mjs.map} +1 -1
  325. package/dist/chunks/{NcDashboardWidget-w15LYpmC.cjs → NcDashboardWidget-mV9UTaUo.cjs} +3 -2
  326. package/dist/chunks/{NcDashboardWidget-w15LYpmC.cjs.map → NcDashboardWidget-mV9UTaUo.cjs.map} +1 -1
  327. package/dist/chunks/{NcDashboardWidgetItem-FNmPTAuj.mjs → NcDashboardWidgetItem-Hg805JCn.mjs} +5 -5
  328. package/dist/chunks/{NcDashboardWidgetItem-FNmPTAuj.mjs.map → NcDashboardWidgetItem-Hg805JCn.mjs.map} +1 -1
  329. package/dist/chunks/{NcDashboardWidgetItem-YJerQyu5.cjs → NcDashboardWidgetItem-_dvqhu7z.cjs} +10 -9
  330. package/dist/chunks/{NcDashboardWidgetItem-YJerQyu5.cjs.map → NcDashboardWidgetItem-_dvqhu7z.cjs.map} +1 -1
  331. package/dist/chunks/{NcDateTime-eHTrKYG4.cjs → NcDateTime-TRJPnoyx.cjs} +1 -1
  332. package/dist/chunks/{NcDateTime-eHTrKYG4.cjs.map → NcDateTime-TRJPnoyx.cjs.map} +1 -1
  333. package/dist/chunks/{NcDateTime-22ULCxg8.mjs → NcDateTime-t_L5Vf2V.mjs} +1 -1
  334. package/dist/chunks/{NcDateTime-22ULCxg8.mjs.map → NcDateTime-t_L5Vf2V.mjs.map} +1 -1
  335. package/dist/chunks/{NcDialog-b2LjzZB8.mjs → NcDialog-652A8lMI.mjs} +12 -15
  336. package/dist/chunks/NcDialog-652A8lMI.mjs.map +1 -0
  337. package/dist/chunks/{NcDialog-KlvRL7k1.cjs → NcDialog-dPYf81Dr.cjs} +5 -7
  338. package/dist/chunks/NcDialog-dPYf81Dr.cjs.map +1 -0
  339. package/dist/chunks/{NcDialogButton-O4JZ53Dj.mjs → NcDialogButton-QuoJDLGH.mjs} +1 -1
  340. package/dist/chunks/{NcDialogButton-O4JZ53Dj.mjs.map → NcDialogButton-QuoJDLGH.mjs.map} +1 -1
  341. package/dist/chunks/{NcDialogButton-37xKCh_l.cjs → NcDialogButton-V3nj_xwS.cjs} +1 -1
  342. package/dist/chunks/{NcDialogButton-37xKCh_l.cjs.map → NcDialogButton-V3nj_xwS.cjs.map} +1 -1
  343. package/dist/chunks/{NcEmojiPicker-o1VRXxQO.cjs → NcEmojiPicker-SiFuLrOy.cjs} +11 -10
  344. package/dist/chunks/NcEmojiPicker-SiFuLrOy.cjs.map +1 -0
  345. package/dist/chunks/{NcEmojiPicker-H_YmCt4L.mjs → NcEmojiPicker-t9ZKXOeE.mjs} +43 -43
  346. package/dist/chunks/NcEmojiPicker-t9ZKXOeE.mjs.map +1 -0
  347. package/dist/chunks/{NcHeaderMenu-CIYGCufy.cjs → NcHeaderMenu-BSi8E43v.cjs} +4 -2
  348. package/dist/chunks/{NcHeaderMenu-CIYGCufy.cjs.map → NcHeaderMenu-BSi8E43v.cjs.map} +1 -1
  349. package/dist/chunks/{NcHeaderMenu-CfEUQ0JV.mjs → NcHeaderMenu-Vytc8Eqg.mjs} +5 -4
  350. package/dist/chunks/{NcHeaderMenu-CfEUQ0JV.mjs.map → NcHeaderMenu-Vytc8Eqg.mjs.map} +1 -1
  351. package/dist/chunks/{NcIconSvgWrapper-_lgitSfS.cjs → NcIconSvgWrapper-R7a7dIg4.cjs} +11 -10
  352. package/dist/chunks/{NcIconSvgWrapper-P-GkSjTH.mjs.map → NcIconSvgWrapper-R7a7dIg4.cjs.map} +1 -1
  353. package/dist/chunks/{NcIconSvgWrapper-P-GkSjTH.mjs → NcIconSvgWrapper-n3MnAe1S.mjs} +6 -6
  354. package/dist/chunks/{NcIconSvgWrapper-_lgitSfS.cjs.map → NcIconSvgWrapper-n3MnAe1S.mjs.map} +1 -1
  355. package/dist/chunks/{NcInputConfirmCancel-YzEcukdc.cjs → NcInputConfirmCancel-QI-5lWEZ.cjs} +18 -17
  356. package/dist/chunks/{NcInputConfirmCancel-YzEcukdc.cjs.map → NcInputConfirmCancel-QI-5lWEZ.cjs.map} +1 -1
  357. package/dist/chunks/{NcInputConfirmCancel-lUDtoN2O.mjs → NcInputConfirmCancel-iPOBMuwq.mjs} +11 -11
  358. package/dist/chunks/{NcInputConfirmCancel-lUDtoN2O.mjs.map → NcInputConfirmCancel-iPOBMuwq.mjs.map} +1 -1
  359. package/dist/chunks/{NcListItem-bBx6_yWw.cjs → NcListItem-J1Ru_eFH.cjs} +11 -10
  360. package/dist/chunks/NcListItem-J1Ru_eFH.cjs.map +1 -0
  361. package/dist/chunks/{NcListItem-AZpInn_s.mjs → NcListItem-m2T3a1c4.mjs} +13 -13
  362. package/dist/chunks/NcListItem-m2T3a1c4.mjs.map +1 -0
  363. package/dist/chunks/{NcListItemIcon-1ZcwsrMT.mjs → NcListItemIcon-RHDhF_NC.mjs} +12 -11
  364. package/dist/chunks/{NcListItemIcon-1ZcwsrMT.mjs.map → NcListItemIcon-RHDhF_NC.mjs.map} +1 -1
  365. package/dist/chunks/{NcListItemIcon-uPc7p1KY.cjs → NcListItemIcon-aE0JNfCX.cjs} +4 -2
  366. package/dist/chunks/{NcListItemIcon-uPc7p1KY.cjs.map → NcListItemIcon-aE0JNfCX.cjs.map} +1 -1
  367. package/dist/chunks/{NcPasswordField-fNiTJMmG.mjs → NcPasswordField-h__iqTKL.mjs} +10 -10
  368. package/dist/chunks/NcPasswordField-h__iqTKL.mjs.map +1 -0
  369. package/dist/chunks/{NcPasswordField-YvUbX2WS.cjs → NcPasswordField-rgZThnoq.cjs} +9 -9
  370. package/dist/chunks/NcPasswordField-rgZThnoq.cjs.map +1 -0
  371. package/dist/chunks/{NcPopover-NyUZ2r7V.mjs → NcPopover-T4GMXmKV.mjs} +43 -50
  372. package/dist/chunks/NcPopover-T4GMXmKV.mjs.map +1 -0
  373. package/dist/chunks/{NcPopover-EXxv8Pzw.cjs → NcPopover-judBGW5r.cjs} +19 -25
  374. package/dist/chunks/NcPopover-judBGW5r.cjs.map +1 -0
  375. package/dist/chunks/{NcProgressBar-yrdD1jxU.cjs → NcProgressBar-BthaVVHU.cjs} +2 -1
  376. package/dist/chunks/{NcProgressBar-yrdD1jxU.cjs.map → NcProgressBar-BthaVVHU.cjs.map} +1 -1
  377. package/dist/chunks/{NcProgressBar-hQCFE5H3.mjs → NcProgressBar-h2ufKS6c.mjs} +1 -1
  378. package/dist/chunks/{NcProgressBar-hQCFE5H3.mjs.map → NcProgressBar-h2ufKS6c.mjs.map} +1 -1
  379. package/dist/chunks/{NcRelatedResourcesPanel-H2imJgxi.mjs → NcRelatedResourcesPanel-DCGxBHHT.mjs} +9 -9
  380. package/dist/chunks/{NcRelatedResourcesPanel-H2imJgxi.mjs.map → NcRelatedResourcesPanel-DCGxBHHT.mjs.map} +1 -1
  381. package/dist/chunks/{NcRelatedResourcesPanel-DCqlPqZc.cjs → NcRelatedResourcesPanel-u1ob1njl.cjs} +3 -2
  382. package/dist/chunks/{NcRelatedResourcesPanel-DCqlPqZc.cjs.map → NcRelatedResourcesPanel-u1ob1njl.cjs.map} +1 -1
  383. package/dist/chunks/{NcRichContenteditable-lPa8fqWG.cjs → NcRichContenteditable-03_DWRDq.cjs} +8 -7
  384. package/dist/chunks/{NcRichContenteditable-lPa8fqWG.cjs.map → NcRichContenteditable-03_DWRDq.cjs.map} +1 -1
  385. package/dist/chunks/{NcRichContenteditable-EZp-vrCT.mjs → NcRichContenteditable-_Ac_ZEfF.mjs} +11 -11
  386. package/dist/chunks/{NcRichContenteditable-EZp-vrCT.mjs.map → NcRichContenteditable-_Ac_ZEfF.mjs.map} +1 -1
  387. package/dist/chunks/{NcRichText-7CHftQ4Z.mjs → NcRichText-4Y574QZM.mjs} +20 -13
  388. package/dist/chunks/NcRichText-4Y574QZM.mjs.map +1 -0
  389. package/dist/chunks/{NcRichText-SPiEkcnt.cjs → NcRichText-Qh1uk4U8.cjs} +41 -34
  390. package/dist/chunks/NcRichText-Qh1uk4U8.cjs.map +1 -0
  391. package/dist/chunks/{NcSelect-c9-eF29z.cjs → NcSelect-BnTLFd27.cjs} +22 -20
  392. package/dist/chunks/{NcSelect-zx9IspDS.mjs.map → NcSelect-BnTLFd27.cjs.map} +1 -1
  393. package/dist/chunks/{NcSelect-zx9IspDS.mjs → NcSelect-DzZqm1fn.mjs} +16 -15
  394. package/dist/chunks/{NcSelect-c9-eF29z.cjs.map → NcSelect-DzZqm1fn.mjs.map} +1 -1
  395. package/dist/chunks/{NcSelectTags-doFIXNxC.cjs → NcSelectTags-PgYBpBfS.cjs} +1 -1
  396. package/dist/chunks/{NcSelectTags-doFIXNxC.cjs.map → NcSelectTags-PgYBpBfS.cjs.map} +1 -1
  397. package/dist/chunks/{NcSelectTags-WGdCwmRr.mjs → NcSelectTags-qBzjNabg.mjs} +2 -2
  398. package/dist/chunks/{NcSelectTags-WGdCwmRr.mjs.map → NcSelectTags-qBzjNabg.mjs.map} +1 -1
  399. package/dist/chunks/{NcSettingsInputText-YMRo6B3V.mjs → NcSettingsInputText-DROaqnIE.mjs} +4 -4
  400. package/dist/chunks/{NcSettingsInputText-YMRo6B3V.mjs.map → NcSettingsInputText-DROaqnIE.mjs.map} +1 -1
  401. package/dist/chunks/{NcSettingsInputText-sJarpoq-.cjs → NcSettingsInputText-FH_6k117.cjs} +3 -2
  402. package/dist/chunks/{NcSettingsInputText-sJarpoq-.cjs.map → NcSettingsInputText-FH_6k117.cjs.map} +1 -1
  403. package/dist/chunks/{NcSettingsSection-R_JKZdJk.cjs → NcSettingsSection-HGZQAB56.cjs} +11 -10
  404. package/dist/chunks/NcSettingsSection-HGZQAB56.cjs.map +1 -0
  405. package/dist/chunks/{NcSettingsSection-zdWzOqxk.mjs → NcSettingsSection-pxZK64xe.mjs} +5 -5
  406. package/dist/chunks/NcSettingsSection-pxZK64xe.mjs.map +1 -0
  407. package/dist/chunks/{NcSettingsSelectGroup-Ghgl6Y_d.mjs → NcSettingsSelectGroup-NtqYZTN-.mjs} +5 -5
  408. package/dist/chunks/{NcSettingsSelectGroup-Ghgl6Y_d.mjs.map → NcSettingsSelectGroup-NtqYZTN-.mjs.map} +1 -1
  409. package/dist/chunks/{NcSettingsSelectGroup-NhJyFPsw.cjs → NcSettingsSelectGroup-d0wrSLXq.cjs} +3 -2
  410. package/dist/chunks/{NcSettingsSelectGroup-NhJyFPsw.cjs.map → NcSettingsSelectGroup-d0wrSLXq.cjs.map} +1 -1
  411. package/dist/chunks/{NcTextField-8ap5MAGr.cjs → NcTextField-2P7HaQ-i.cjs} +2 -2
  412. package/dist/chunks/NcTextField-2P7HaQ-i.cjs.map +1 -0
  413. package/dist/chunks/{NcTextField-tIJ3fJ37.mjs → NcTextField-RnMWfagW.mjs} +6 -6
  414. package/dist/chunks/NcTextField-RnMWfagW.mjs.map +1 -0
  415. package/dist/chunks/{NcTimezonePicker-ag-krDDP.cjs → NcTimezonePicker-98XoQsZ0.cjs} +18 -22
  416. package/dist/chunks/{NcTimezonePicker-ag-krDDP.cjs.map → NcTimezonePicker-98XoQsZ0.cjs.map} +1 -1
  417. package/dist/chunks/{NcTimezonePicker-Ue_mc4jo.mjs → NcTimezonePicker-HvUUs7VK.mjs} +21 -25
  418. package/dist/chunks/{NcTimezonePicker-Ue_mc4jo.mjs.map → NcTimezonePicker-HvUUs7VK.mjs.map} +1 -1
  419. package/dist/chunks/{NcUserBubble-hfgJXqk2.cjs → NcUserBubble-pCJK4AXS.cjs} +6 -5
  420. package/dist/chunks/{NcUserBubble-s30BQXdv.mjs.map → NcUserBubble-pCJK4AXS.cjs.map} +1 -1
  421. package/dist/chunks/{NcUserBubble-s30BQXdv.mjs → NcUserBubble-y-RdfxGU.mjs} +5 -5
  422. package/dist/chunks/{NcUserBubble-hfgJXqk2.cjs.map → NcUserBubble-y-RdfxGU.mjs.map} +1 -1
  423. package/dist/chunks/{NcUserStatusIcon-H5b_e8YL.mjs → NcUserStatusIcon-Wwtp8zH3.mjs} +4 -4
  424. package/dist/chunks/{NcUserStatusIcon-PevYJx6w.cjs.map → NcUserStatusIcon-Wwtp8zH3.mjs.map} +1 -1
  425. package/dist/chunks/{NcUserStatusIcon-PevYJx6w.cjs → NcUserStatusIcon-iczxs1an.cjs} +6 -5
  426. package/dist/chunks/{NcUserStatusIcon-H5b_e8YL.mjs.map → NcUserStatusIcon-iczxs1an.cjs.map} +1 -1
  427. package/dist/chunks/{ScopeComponent-9XNLQCuu.mjs → ScopeComponent-3zN8-DXa.mjs} +3 -3
  428. package/dist/chunks/{ScopeComponent-9XNLQCuu.mjs.map → ScopeComponent-3zN8-DXa.mjs.map} +1 -1
  429. package/dist/chunks/{ScopeComponent-_Cg8ogL-.cjs → ScopeComponent-_Qe2Qn0v.cjs} +1 -1
  430. package/dist/chunks/{ScopeComponent-_Cg8ogL-.cjs.map → ScopeComponent-_Qe2Qn0v.cjs.map} +1 -1
  431. package/dist/chunks/_l10n--bDJ_Qyj.mjs +66 -0
  432. package/dist/chunks/_l10n--bDJ_Qyj.mjs.map +1 -0
  433. package/dist/chunks/_l10n-mEcF7TYU.cjs +64 -0
  434. package/dist/chunks/_l10n-mEcF7TYU.cjs.map +1 -0
  435. package/dist/chunks/{index-AX_b-FPF.cjs → index-U21dQVa7.cjs} +1 -0
  436. package/dist/chunks/{index-AX_b-FPF.cjs.map → index-U21dQVa7.cjs.map} +1 -1
  437. package/dist/chunks/{index-KrMGGc7j.mjs → index-n2q3iT69.mjs} +1 -0
  438. package/dist/chunks/{index-KrMGGc7j.mjs.map → index-n2q3iT69.mjs.map} +1 -1
  439. package/dist/chunks/{referencePickerModal-rHOAeK-a.cjs → referencePickerModal-Cnscu3tI.cjs} +6 -5
  440. package/dist/chunks/referencePickerModal-Cnscu3tI.cjs.map +1 -0
  441. package/dist/chunks/{referencePickerModal-jbqYHMmd.mjs → referencePickerModal-oI8JiWDV.mjs} +14 -14
  442. package/dist/chunks/referencePickerModal-oI8JiWDV.mjs.map +1 -0
  443. package/dist/chunks/{usernameToColor-pYptUj7i.mjs → usernameToColor-HiPZbTLh.mjs} +1 -1
  444. package/dist/chunks/{usernameToColor-pYptUj7i.mjs.map → usernameToColor-HiPZbTLh.mjs.map} +1 -1
  445. package/dist/chunks/{usernameToColor-fJ1S8Q2S.cjs → usernameToColor-nIJ4GOsW.cjs} +1 -1
  446. package/dist/chunks/{usernameToColor-fJ1S8Q2S.cjs.map → usernameToColor-nIJ4GOsW.cjs.map} +1 -1
  447. package/dist/index.cjs +4 -4
  448. package/dist/index.mjs +48 -48
  449. package/dist/vendor.LICENSE.txt +1 -1
  450. package/package.json +4 -4
  451. package/dist/chunks/AlertCircleOutline-VgVvRWpm.cjs.map +0 -1
  452. package/dist/chunks/AlertCircleOutline-lwSRucNO.mjs.map +0 -1
  453. package/dist/chunks/ArrowLeft-3KC2k3tR.cjs.map +0 -1
  454. package/dist/chunks/ArrowLeft-buaCjhfr.mjs.map +0 -1
  455. package/dist/chunks/ArrowRight-4p6gv-9o.mjs.map +0 -1
  456. package/dist/chunks/ArrowRight-uEMed4kl.cjs.map +0 -1
  457. package/dist/chunks/Check-5uKO4aXx.cjs.map +0 -1
  458. package/dist/chunks/Check-FObi_cEO.mjs.map +0 -1
  459. package/dist/chunks/ChevronDown-TbRvziNU.mjs.map +0 -1
  460. package/dist/chunks/ChevronDown-rdCNNu7u.cjs.map +0 -1
  461. package/dist/chunks/ChevronRight-XOmSMmxA.mjs.map +0 -1
  462. package/dist/chunks/ChevronRight-bp7fT1r7.cjs.map +0 -1
  463. package/dist/chunks/Close-5Hzp7J3v.mjs.map +0 -1
  464. package/dist/chunks/Close-QFLrdRdG.cjs.map +0 -1
  465. package/dist/chunks/DotsHorizontal-NssXDZGM.mjs.map +0 -1
  466. package/dist/chunks/DotsHorizontal-dlN1WvqM.cjs.map +0 -1
  467. package/dist/chunks/NcActions-7ytNFRBJ.cjs.map +0 -1
  468. package/dist/chunks/NcActions-CNDgnRLf.mjs.map +0 -1
  469. package/dist/chunks/NcAppNavigationCaption-M-KZKijE.mjs +0 -47
  470. package/dist/chunks/NcAppNavigationItem-GNnDmUq5.mjs.map +0 -1
  471. package/dist/chunks/NcAppNavigationItem-YYoh37Ky.cjs.map +0 -1
  472. package/dist/chunks/NcAppNavigationSettings-IkF_z_xt.cjs.map +0 -1
  473. package/dist/chunks/NcAppNavigationSettings-c_S9UbSU.mjs.map +0 -1
  474. package/dist/chunks/NcAppNavigationToggle-S4YTmnky.mjs.map +0 -1
  475. package/dist/chunks/NcAppNavigationToggle-Tvz9copM.cjs +0 -109
  476. package/dist/chunks/NcAppNavigationToggle-Tvz9copM.cjs.map +0 -1
  477. package/dist/chunks/NcAppSidebar-GCbKi7Tk.cjs.map +0 -1
  478. package/dist/chunks/NcAppSidebar-nHbqU8Wl.mjs.map +0 -1
  479. package/dist/chunks/NcAvatar-1gX-bnpd.mjs.map +0 -1
  480. package/dist/chunks/NcAvatar-8NgbtiTN.cjs.map +0 -1
  481. package/dist/chunks/NcBreadcrumbs-GhYBmcix.cjs.map +0 -1
  482. package/dist/chunks/NcBreadcrumbs-UCJPNjZg.mjs.map +0 -1
  483. package/dist/chunks/NcCheckboxRadioSwitch-3sa_9DpY.mjs.map +0 -1
  484. package/dist/chunks/NcCheckboxRadioSwitch-s5C7ZGB_.cjs.map +0 -1
  485. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_835b7036_lang-2l55YbP4.cjs +0 -3
  486. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_835b7036_lang-2l55YbP4.cjs.map +0 -1
  487. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_835b7036_lang-4V3NxICZ.mjs +0 -3
  488. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_835b7036_lang-4V3NxICZ.mjs.map +0 -1
  489. package/dist/chunks/NcColorPicker-4qA0UWdA.cjs.map +0 -1
  490. package/dist/chunks/NcColorPicker-aNJDKf-I.mjs.map +0 -1
  491. package/dist/chunks/NcDialog-KlvRL7k1.cjs.map +0 -1
  492. package/dist/chunks/NcDialog-b2LjzZB8.mjs.map +0 -1
  493. package/dist/chunks/NcEmojiPicker-H_YmCt4L.mjs.map +0 -1
  494. package/dist/chunks/NcEmojiPicker-o1VRXxQO.cjs.map +0 -1
  495. package/dist/chunks/NcListItem-AZpInn_s.mjs.map +0 -1
  496. package/dist/chunks/NcListItem-bBx6_yWw.cjs.map +0 -1
  497. package/dist/chunks/NcPasswordField-YvUbX2WS.cjs.map +0 -1
  498. package/dist/chunks/NcPasswordField-fNiTJMmG.mjs.map +0 -1
  499. package/dist/chunks/NcPopover-EXxv8Pzw.cjs.map +0 -1
  500. package/dist/chunks/NcPopover-NyUZ2r7V.mjs.map +0 -1
  501. package/dist/chunks/NcRichText-7CHftQ4Z.mjs.map +0 -1
  502. package/dist/chunks/NcRichText-SPiEkcnt.cjs.map +0 -1
  503. package/dist/chunks/NcSettingsSection-R_JKZdJk.cjs.map +0 -1
  504. package/dist/chunks/NcSettingsSection-zdWzOqxk.mjs.map +0 -1
  505. package/dist/chunks/NcTextField-8ap5MAGr.cjs.map +0 -1
  506. package/dist/chunks/NcTextField-tIJ3fJ37.mjs.map +0 -1
  507. package/dist/chunks/_l10n-juAR1Sua.cjs +0 -64
  508. package/dist/chunks/_l10n-juAR1Sua.cjs.map +0 -1
  509. package/dist/chunks/_l10n-tZEKUJRj.mjs +0 -66
  510. package/dist/chunks/_l10n-tZEKUJRj.mjs.map +0 -1
  511. package/dist/chunks/referencePickerModal-jbqYHMmd.mjs.map +0 -1
  512. package/dist/chunks/referencePickerModal-rHOAeK-a.cjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcDialog-b2LjzZB8.mjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\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\n<docs>\n### General description\n\nThis component uses the `NcModal` under the hood for allowing users to create generic dialogs.\n\n### Basic example\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog :open.sync=\"showDialog\" name=\"Confirmation\" message=\"Are you sure to proceed?\" :buttons=\"buttons\" />\n\t\t<p>Last response: {{ lastResponse }}</p>\n\t</div>\n</template>\n<script>\nimport IconCancel from '@mdi/svg/svg/cancel.svg?raw'\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tlastResponse: 'None',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Cancel',\n\t\t\t\t\ticon: IconCancel,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Cancel\"' },\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Ok',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Ok\"' },\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Use custom actions and content\nInstead of using the buttons property, you can also inject your custom actions using a named slot.\nYou can also use the default slot to inject custom content.\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog v-if=\"showDialog\" name=\"Warning\" :can-close=\"false\">\n\t\t\t<template #actions>\n\t\t\t\t<NcButton @click=\"showDialog = false\">Ok</NcButton>\n\t\t\t</template>\n\t\t\t<div style=\"color: red; font-weight: bold;\">This is serious</div>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal v-if=\"open\"\n\t\tv-bind=\"modalProps\"\n\t\t@close=\"handleClosed\"\n\t\t@update:show=\"handleClosing\">\n\t\t<!-- The dialog name / header -->\n\t\t<h2 :id=\"navigationId\" class=\"dialog__name\" v-text=\"name\" />\n\t\t<div class=\"dialog\" :class=\"dialogClasses\">\n\t\t\t<div ref=\"wrapper\" :class=\"['dialog__wrapper', { 'dialog__wrapper--collapsed': isNavigationCollapsed }]\">\n\t\t\t\t<!-- When the navigation is collapsed (too small dialog) it is displayed above the main content, otherwise on the inline start -->\n\t\t\t\t<nav v-if=\"hasNavigation\"\n\t\t\t\t\tclass=\"dialog__navigation\"\n\t\t\t\t\t:class=\"navigationClasses\"\n\t\t\t\t\t:aria-label=\"navigationAriaLabelAttr\"\n\t\t\t\t\t:aria-labelledby=\"navigationAriaLabelledbyAttr\">\n\t\t\t\t\t<slot name=\"navigation\" :is-collapsed=\"isNavigationCollapsed\" />\n\t\t\t\t</nav>\n\t\t\t\t<!-- Main dialog content -->\n\t\t\t\t<div class=\"dialog__content\" :class=\"contentClasses\">\n\t\t\t\t\t<slot>\n\t\t\t\t\t\t<p class=\"dialog__text\">\n\t\t\t\t\t\t\t{{ message }}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- The dialog actions aka the buttons -->\n\t\t\t<div class=\"dialog__actions\">\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcDialogButton v-for=\"(button, idx) in buttons\"\n\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\tv-bind=\"button\"\n\t\t\t\t\t\t@click=\"handleButtonClose\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</div>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\n\nimport NcModal from '../NcModal/index.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default defineComponent({\n\tname: 'NcDialog',\n\n\tcomponents: {\n\t\tNcDialogButton,\n\t\tNcModal,\n\t},\n\n\tprops: {\n\t\t/** Name of the dialog (the heading) */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Text of the dialog */\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Additional elements to add to the focus trap */\n\t\tadditionalTrapElements: {\n\t\t\ttype: Array,\n\t\t\tvalidator: (arr) => {\n\t\t\t\treturn (\n\t\t\t\t\tArray.isArray(arr) && arr.every(\n\t\t\t\t\t\t(element) =>\n\t\t\t\t\t\t\ttypeof element === 'string' || element instanceof HTMLElement,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t},\n\t\t\tdefault: () => ([]),\n\t\t},\n\n\t\t/**\n\t\t * The element where to mount the dialog, if `null` is passed the dialog is mounted in place\n\t\t * @default 'body'\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Whether the dialog should be shown\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t * @default 'small'\n\t\t * @type {'small'|'normal'|'large'|'full'}\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof value === 'string' && ['small', 'normal', 'large', 'full'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Buttons to display\n\t\t * @default []\n\t\t */\n\t\tbuttons: {\n\t\t\ttype: Array,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Close the dialog if the user clicked outside of the dialog\n\t\t * Only relevant if `canClose` is set to true.\n\t\t */\n\t\tcloseOnClickOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Declare if hiding the modal should be animated\n\t\t * @default false\n\t\t */\n\t\toutTransition: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the navigation for custom styling\n\t\t * @default ''\n\t\t * @example\n\t\t * ```html\n\t\t * <DialogBase :navigation-classes=\"['mydialog-navigation']\"><!-- --></DialogBase>\n\t\t * <!-- ... -->\n\t\t * <style lang=\"scss\">\n\t\t * :deep(.mydialog-navigation) {\n\t\t * flex-direction: row-reverse;\n\t\t * }\n\t\t * </style>\n\t\t * ```\n\t\t */\n\t\tnavigationClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-label for the dialog navigation.\n\t\t * Use it when you want to provide a more meaningful label than the dialog name.\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby for the dialog navigation.\n\t\t * Use it when you have an implicit navigation label (e.g. a heading).\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabelledby: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the content wrapper for custom styling\n\t\t * @default ''\n\t\t */\n\t\tcontentClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the dialog itself\n\t\t * (the default `class` attribute will be set on the modal wrapper)\n\t\t * @default ''\n\t\t */\n\t\tdialogClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['closing', 'update:open'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\n\n\t\t/**\n\t\t * We use the dialog width to decide if we collapse the navigation (flex direction row)\n\t\t */\n\t\tconst { width: dialogWidth } = useElementSize(wrapper, { width: 900 })\n\n\t\t/**\n\t\t * Whether the navigation is collapsed due to dialog and window size\n\t\t * (collapses when modal is below: 900px modal width - 2x 12px margin)\n\t\t */\n\t\tconst isNavigationCollapsed = computed(() => dialogWidth.value < 876)\n\n\t\t/**\n\t\t * Whether a navigation was passed and the element should be displayed\n\t\t */\n\t\tconst hasNavigation = computed(() => slots?.navigation !== undefined)\n\n\t\t/**\n\t\t * The unique id of the nav element\n\t\t */\n\t\tconst navigationId = ref(GenRandomId())\n\n\t\t/**\n\t\t * aria-label attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || undefined)\n\n\t\t/**\n\t\t * aria-labelledby attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelledbyAttr = computed(() => {\n\t\t\tif (props.navigationAriaLabel) {\n\t\t\t\t// Not needed, already labelled by aria-label\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\t// Use dialog name as a fallback label for navigation\n\t\t\treturn props.navigationAriaLabelledby || navigationId.value\n\t\t})\n\n\t\t/**\n\t\t * If the underlaying modal is shown\n\t\t */\n\t\tconst showModal = ref(true)\n\n\t\t// Because NcModal does not emit `close` when show prop is changed\n\t\t/**\n\t\t * Handle clicking a dialog button -> should close\n\t\t */\n\t\tconst handleButtonClose = () => {\n\t\t\thandleClosing()\n\t\t\twindow.setTimeout(() => handleClosed(), 300)\n\t\t}\n\n\t\t/**\n\t\t * Handle closing the dialog, optional out transition did not run yet\n\t\t */\n\t\tconst handleClosing = () => {\n\t\t\tshowModal.value = false\n\t\t\t/**\n\t\t\t * Emitted when the dialog is closing, so the out transition did not finish yet\n\t\t\t */\n\t\t\temit('closing')\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tconst handleClosed = () => {\n\t\t\tshowModal.value = true\n\t\t\t/**\n\t\t\t * Emitted then the dialog is fully closed and the out transition run\n\t\t\t */\n\t\t\temit('update:open', false)\n\t\t}\n\n\t\t/**\n\t\t * Properties to pass to the underlying NcModal\n\t\t */\n\t\tconst modalProps = computed(() => ({\n\t\t\tcanClose: props.canClose,\n\t\t\tcontainer: props.container === undefined ? 'body' : props.container,\n\t\t\t// we do not pass the name as we already have the name as the headline\n\t\t\t// name: props.name,\n\t\t\tsize: props.size,\n\t\t\tshow: props.open && showModal.value,\n\t\t\toutTransition: props.outTransition,\n\t\t\tclass: 'dialog__modal',\n\t\t\tcloseOnClickOutside: props.closeOnClickOutside,\n\t\t\tenableSlideshow: false,\n\t\t\tenableSwipe: false,\n\t\t\tadditionalTrapElements: props.additionalTrapElements,\n\t\t}))\n\n\t\treturn {\n\t\t\thandleButtonClose,\n\t\t\thandleClosing,\n\t\t\thandleClosed,\n\t\t\thasNavigation,\n\t\t\tnavigationId,\n\t\t\tnavigationAriaLabelAttr,\n\t\t\tnavigationAriaLabelledbyAttr,\n\t\t\tisNavigationCollapsed,\n\t\t\tmodalProps,\n\t\t\twrapper,\n\t\t}\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n/** When having the small dialog style we override the modal styling so dialogs look more dialog like */\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t.dialog__modal .modal-wrapper--small .modal-container {\n\t\twidth: fit-content;\n\t\theight: unset;\n\t\tmax-height: 90%;\n\t\tposition: relative;\n\t\ttop: unset;\n\t\tborder-radius: var(--border-radius-large);\n\t}\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.dialog {\n\theight: 100%;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\toverflow: hidden;\n\n\t&__modal {\n\t\t:deep(.modal-wrapper .modal-container) {\n\t\t\tdisplay: flex !important;\n\t\t\tpadding-block: 4px 8px; // 4px to align with close button, 8px block-end to allow the actions a margin of 4px for the focus visible outline\n\t\t\tpadding-inline: 12px 8px; // Same as with padding-block, we need the actions to have a margin of 4px for the button outline\n\t\t}\n\t\t:deep(.modal-container__content) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\t// Auto scale to fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: hidden;\n\t\t// see modal-container padding, this aligns with the padding-inline-start (8px + 4px = 12px)\n\t\tpadding-inline-end: 4px;\n\n\t\t&--collapsed {\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-shrink: 0;\n\t}\n\n\t// Navigation styling when side-by-side with content\n\t&__wrapper:not(&__wrapper--collapsed) &__navigation {\n\t\tflex-direction: column;\n\n\t\toverflow: hidden auto;\n\t\theight: 100%;\n\t\tmin-width: 200px;\n\t\tmargin-inline-end: 20px;\n\t}\n\n\t// Navigation styling when on top of content\n\t&__wrapper#{&}__wrapper--collapsed &__navigation {\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\n\t\toverflow: auto hidden;\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&__name {\n\t\t// Same as the NcAppSettingsDialog\n\t\ttext-align: center;\n\t\theight: var(--default-clickable-area);\n\t\tmin-height: var(--default-clickable-area);\n\t\tline-height: var(--default-clickable-area);\n\t\tmargin-block-end: 12px;\n\t}\n\n\t&__content {\n\t\t// Auto fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: auto;\n\t}\n\n\t// In case only text content is show\n\t&__text {\n\t\t// Also add padding to the bottom to make it more readable\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\twidth: fit-content;\n\t\tmargin-inline: auto 4px; // 4px to align with the overall modal padding, we need this here for the buttons to have their 4px focus-visible outline\n\t\tmargin-block: 6px 4px; // 4px block-end see reason above\n\t}\n}\n</style>\n"],"names":["_sfc_main","defineComponent","NcDialogButton","NcModal","arr","element","value","props","emit","slots","wrapper","ref","dialogWidth","useElementSize","isNavigationCollapsed","computed","hasNavigation","navigationId","GenRandomId","navigationAriaLabelAttr","navigationAriaLabelledbyAttr","showModal","handleButtonClose","handleClosing","handleClosed","modalProps"],"mappings":";;;;;;;AA4IA,MAAAA,IAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,gBAAAC;AAAA,IACA,SAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA,IAGA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA,IAGA,wBAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAA,CAAAC,MAEA,MAAA,QAAAA,CAAA,KAAAA,EAAA;AAAA,QACA,CAAAC,MACA,OAAAA,KAAA,YAAAA,aAAA;AAAA,MACA;AAAA,MAGA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;A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,mBAAAe;AAAA,MACA,eAAAC;AAAA,MACA,cAAAC;AAAA,MACA,eAAAR;AAAA,MACA,cAAAC;AAAA,MACA,yBAAAE;AAAA,MACA,8BAAAC;AAAA,MACA,uBAAAN;AAAA,MACA,YAAAW;AAAA,MACA,SAAAf;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcEmojiPicker-H_YmCt4L.mjs","sources":["../../node_modules/vue-material-design-icons/Circle.vue","../../src/components/NcEmojiPicker/NcEmojiPicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon circle-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"CircleIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2020 Georg Ehrke <oc.list@georgehrke.com>\n -\n - @author 2020 Georg Ehrke <oc.list@georgehrke.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\n<docs>\n### General description\n\nThis component allows the user to pick an emoji.\n\n### Usage\n\n* Listen to the select event and pass in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker @select=\"select\" style=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Showing a preview and keeping it open after a user selected an emoji\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:close-on-select=\"false\"\n\t\t\t:show-preview=\"true\"\n\t\t\t@select=\"select\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Allow unselecting a previously set emoji.\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:show-preview=\"true\"\n\t\t\t:allow-unselect=\"true\"\n\t\t\t:selected-emoji=\"emoji\"\n\t\t\t@select=\"select\"\n\t\t\t@unselect=\"unselect\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t\tunselect() {\n\t\t\t\tthis.emoji = ''\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<NcPopover :shown.sync=\"open\"\n\t\t:container=\"container\"\n\t\tpopup-role=\"dialog\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@after-show=\"afterShow\"\n\t\t@after-hide=\"afterHide\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<Picker ref=\"picker\"\n\t\t\t:auto-focus=\"false /* We manage the input focus ourselves */\"\n\t\t\tcolor=\"var(--color-primary-element)\"\n\t\t\t:data=\"emojiIndex\"\n\t\t\t:emoji=\"previewFallbackEmoji\"\n\t\t\t:i18n=\"i18n\"\n\t\t\t:native=\"native\"\n\t\t\t:emoji-size=\"20\"\n\t\t\t:per-line=\"8\"\n\t\t\t:picker-styles=\"{ width: '320px' }\"\n\t\t\t:show-preview=\"showPreview\"\n\t\t\t:skin=\"currentSkinTone\"\n\t\t\t:show-skin-tones=\"false\"\n\t\t\t:title=\"previewFallbackName\"\n\t\t\trole=\"dialog\"\n\t\t\t:aria-label=\"t('Emoji picker')\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@select=\"select\">\n\t\t\t<template #searchTemplate=\"slotProps\">\n\t\t\t\t<div class=\"search__wrapper\">\n\t\t\t\t\t<NcTextField ref=\"search\"\n\t\t\t\t\t\tclass=\"search\"\n\t\t\t\t\t\t:value.sync=\"search\"\n\t\t\t\t\t\t:label=\"t('Search')\"\n\t\t\t\t\t\t:label-visible=\"true\"\n\t\t\t\t\t\t:placeholder=\"i18n.search\"\n\t\t\t\t\t\ttrailing-button-icon=\"close\"\n\t\t\t\t\t\t:trailing-button-label=\"t('Clear search')\"\n\t\t\t\t\t\t:show-trailing-button=\"search !== ''\"\n\t\t\t\t\t\t@trailing-button-click=\"clearSearch(); slotProps.onSearch(search);\"\n\t\t\t\t\t\t@update:value=\"slotProps.onSearch(search)\" />\n\t\t\t\t\t<NcColorPicker palette-only\n\t\t\t\t\t\t:palette=\"skinTonePalette\"\n\t\t\t\t\t\t:value=\"currentColor.color\"\n\t\t\t\t\t\t@update:value=\"onChangeSkinTone\">\n\t\t\t\t\t\t<NcButton :aria-label=\"t('Skin tone')\" type=\"tertiary-no-background\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconCircle :style=\"{ color: currentColor.color }\" :title=\"currentColor.name\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</NcColorPicker>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t<template v-if=\"allowUnselect && selectedEmoji\" #customCategory>\n\t\t\t\t<div class=\"emoji-mart-category-label\">\n\t\t\t\t\t<h3 class=\"emoji-mart-category-label\">\n\t\t\t\t\t\t{{ t('Selected') }}\n\t\t\t\t\t</h3>\n\t\t\t\t</div>\n\t\t\t\t<Emoji class=\"emoji-selected\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\t:emoji=\"selectedEmoji\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"32\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t\t<Emoji class=\"emoji-delete\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\temoji=\":x:\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"10\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t</template>\n\t\t</Picker>\n\t</NcPopover>\n</template>\n\n<script>\nimport { Picker, Emoji, EmojiIndex } from 'emoji-mart-vue-fast'\nimport { t } from '../../l10n.js'\nimport { getCurrentSkinTone, setCurrentSkinTone } from '../../functions/emoji/emoji.ts'\nimport { Color } from '../../utils/GenColors.js'\n\nimport data from 'emoji-mart-vue-fast/data/all.json'\nimport IconCircle from 'vue-material-design-icons/Circle.vue'\nimport NcButton from '../NcButton/index.js'\nimport NcColorPicker from '../NcColorPicker/NcColorPicker.vue'\nimport NcPopover from '../NcPopover/index.js'\nimport NcTextField from '../NcTextField/index.js'\n\n// Shared emoji index and skinTone for all NcEmojiPicker instances\n// Will be initialized on the first NcEmojiPicker creating\nlet emojiIndex\n\nconst i18n = {\n\tsearch: t('Search emoji'),\n\tnotfound: t('No emoji found'),\n\tcategories: {\n\t\tsearch: t('Search results'),\n\t\trecent: t('Frequently used'),\n\t\tsmileys: t('Smileys & Emotion'),\n\t\tpeople: t('People & Body'),\n\t\tnature: t('Animals & Nature'),\n\t\tfoods: t('Food & Drink'),\n\t\tactivity: t('Activities'),\n\t\tplaces: t('Travel & Places'),\n\t\tobjects: t('Objects'),\n\t\tsymbols: t('Symbols'),\n\t\tflags: t('Flags'),\n\t\tcustom: t('Custom'),\n\t},\n}\n\nconst skinTonePalette = [\n\tnew Color(255, 222, 52, t('Neutral skin color')),\n\tnew Color(228, 205, 166, t('Light skin tone')),\n\tnew Color(250, 221, 192, t('Medium light skin tone')),\n\tnew Color(174, 129, 87, t('Medium skin tone')),\n\tnew Color(158, 113, 88, t('Medium dark skin tone')),\n\tnew Color(96, 79, 69, t('Dark skin tone')),\n]\n\nexport default {\n\tname: 'NcEmojiPicker',\n\n\tcomponents: {\n\t\tEmoji,\n\t\tIconCircle,\n\t\tNcButton,\n\t\tNcColorPicker,\n\t\tNcPopover,\n\t\tNcTextField,\n\t\tPicker,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The emoji-set\n\t\t */\n\t\tactiveSet: {\n\t\t\ttype: String,\n\t\t\tdefault: 'native',\n\t\t},\n\t\t/**\n\t\t * Show preview section when hovering emoji\n\t\t */\n\t\tshowPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Allow unselecting the selected emoji\n\t\t */\n\t\tallowUnselect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Selected emoji to allow unselecting\n\t\t */\n\t\tselectedEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The fallback emoji in the preview section\n\t\t */\n\t\tpreviewFallbackEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: 'grinning',\n\t\t},\n\t\t/**\n\t\t * The fallback text in the preview section\n\t\t */\n\t\tpreviewFallbackName: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Pick an emoji'),\n\t\t},\n\t\t/**\n\t\t * Whether to close the emoji picker after picking one\n\t\t */\n\t\tcloseOnSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\temits: [\n\t\t'select',\n\t\t'select-data',\n\t\t'unselect',\n\t],\n\n\tsetup() {\n\t\t// If this is the first instance of NcEmojiPicker - setup EmojiIndex\n\t\tif (!emojiIndex) {\n\t\t\temojiIndex = new EmojiIndex(data)\n\t\t}\n\n\t\treturn {\n\t\t\t// Non-reactive constants\n\t\t\temojiIndex,\n\t\t\tskinTonePalette,\n\t\t\ti18n,\n\t\t}\n\t},\n\n\tdata() {\n\t\tconst currentSkinTone = getCurrentSkinTone()\n\n\t\treturn {\n\t\t\t/**\n\t\t\t * The current active color from the skin tone palette\n\t\t\t */\n\t\t\tcurrentColor: skinTonePalette[currentSkinTone - 1],\n\t\t\t/**\n\t\t\t * The current active skin tone\n\t\t\t * @type {1|2|3|4|5|6}\n\t\t\t */\n\t\t\tcurrentSkinTone,\n\t\t\tsearch: '',\n\t\t\topen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tnative() {\n\t\t\treturn this.activeSet === 'native'\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tclearSearch() {\n\t\t\tthis.search = ''\n\t\t\tconst input = this.$refs.search?.$refs.inputField?.$refs.input\n\t\t\tif (input) {\n\t\t\t\tinput.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Update the current skin tone by the result of the color picker\n\t\t * @param {string} color Color set\n\t\t */\n\t\tonChangeSkinTone(color) {\n\t\t\tconst index = this.skinTonePalette.findIndex((tone) => tone.color.toLowerCase() === color.toLowerCase())\n\t\t\tif (index > -1) {\n\t\t\t\tthis.currentSkinTone = index + 1\n\t\t\t\tthis.currentColor = this.skinTonePalette[index]\n\t\t\t\tsetCurrentSkinTone(this.currentSkinTone)\n\t\t\t}\n\t\t},\n\n\t\tselect(emojiObject) {\n\t\t\t/**\n\t\t\t * Emits a string containing the emoji e.g. '👩🏿‍💻'\n\t\t\t */\n\t\t\tthis.$emit('select', emojiObject.native)\n\n\t\t\t/**\n\t\t\t * Emits a object with more data about the picked emoji\n\t\t\t */\n\t\t\tthis.$emit('select-data', emojiObject)\n\n\t\t\tif (this.closeOnSelect) {\n\t\t\t\tthis.open = false\n\t\t\t}\n\t\t},\n\n\t\tunselect() {\n\t\t\tthis.$emit('unselect')\n\t\t},\n\n\t\tafterShow() {\n\t\t\t// add focus trap in modal\n\t\t\tconst picker = this.$refs.picker\n\t\t\tpicker.$el.addEventListener('keydown', this.checkKeyEvent)\n\n\t\t\t// set focus on input search field\n\t\t\tconst input = this.$refs.search?.$refs.inputField?.$refs.input\n\t\t\tif (input) {\n\t\t\t\tinput.focus()\n\t\t\t}\n\t\t},\n\n\t\tafterHide() {\n\t\t\t// remove keydown listner if popover is hidden\n\t\t\tconst picker = this.$refs.picker\n\t\t\tpicker.$el.removeEventListener('keydown', this.checkKeyEvent)\n\t\t},\n\n\t\tcheckKeyEvent(event) {\n\t\t\tif (event.key !== 'Tab') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst picker = this.$refs.picker\n\t\t\tconst focusableList = picker.$el.querySelectorAll(\n\t\t\t\t'button, input',\n\t\t\t)\n\t\t\tconst last = focusableList.length - 1\n\t\t\t// escape early if only 1 or no elements to focus\n\t\t\tif (focusableList.length <= 1) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (event.shiftKey === false && event.target === focusableList[last]) {\n\t\t\t\t// Jump to first item when pressing tab on the latest item\n\t\t\t\tevent.preventDefault()\n\t\t\t\tfocusableList[0].focus()\n\t\t\t} else if (event.shiftKey === true && event.target === focusableList[0]) {\n\t\t\t\t// Jump to the last item if pressing shift+tab on the first item\n\t\t\t\tevent.preventDefault()\n\t\t\t\tfocusableList[last].focus()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n@import 'emoji-mart-vue-fast/css/emoji-mart.css';\n\n.emoji-mart {\n\tbackground-color: var(--color-main-background) !important;\n\tborder: 0;\n\tcolor: var(--color-main-text) !important;\n\n\t// default style reset\n\tbutton {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\tfont-size: inherit;\n\t\theight: 36px;\n\t\twidth: auto;\n\n\t\t* {\n\t\t\tcursor: pointer !important;\n\t\t}\n\t}\n\n\t.emoji-mart-bar,\n\t.emoji-mart-anchors,\n\t.emoji-mart-search,\n\t.emoji-mart-search input,\n\t.emoji-mart-category,\n\t.emoji-mart-category-label,\n\t.emoji-mart-category-label span,\n\t.emoji-mart-skin-swatches {\n\t\tbackground-color: transparent !important;\n\t\tborder-color: var(--color-border) !important;\n\t\tcolor: inherit !important;\n\t}\n\n\t.emoji-mart-search input:focus-visible {\n\t\tbox-shadow: inset 0 0 0 2px var(--color-primary-element);\n\t\toutline: none;\n\t}\n\n\t.emoji-mart-bar {\n\t\t&:first-child {\n\t\t\tborder-top-left-radius: var(--border-radius) !important;\n\t\t\tborder-top-right-radius: var(--border-radius) !important;\n\t\t}\n\t}\n\n\t.emoji-mart-anchors {\n\t\tbutton {\n\t\t\tborder-radius: 0;\n\t\t\tpadding: 12px 4px;\n\t\t\theight: auto;\n\t\t\t&:focus-visible {\n\t\t\t\t/* box-shadow: inset 0 0 0 2px var(--color-primary-element); */\n\t\t\t\toutline: 2px solid var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t}\n\n\t.emoji-mart-category {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tjustify-content: start;\n\n\t\t.emoji-mart-category-label,\n\t\t.emoji-mart-emoji {\n\t\t\tuser-select: none;\n\t\t\tflex-grow: 0;\n\t\t\tflex-shrink: 0;\n\t\t}\n\n\t\t.emoji-mart-category-label {\n\t\t\tflex-basis: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t.emoji-mart-emoji {\n\t\t\t// 8 emoji per row\n\t\t\tflex-basis: calc(100% / 8);\n\t\t\ttext-align: center;\n\n\t\t\t&:hover::before,\n\t\t\t&.emoji-mart-emoji-selected::before{\n\t\t\t\tbackground-color: var(--color-background-hover) !important;\n\t\t\t\toutline: 2px solid var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t\tbutton {\n\n\t\t\t&:focus-visible {\n\t\t\t\tbackground-color: var(--color-background-hover);\n\t\t\t\tborder: 2px solid var(--color-primary-element) !important;\n\t\t\t\tborder-radius: 50%;\n\t\t\t}\n\t\t}\n\t}\n\n}\n</style>\n\n<style scoped lang=\"scss\">\n.search {\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tgap: 4px; // for focus-visible outlines\n\t\talign-items: end;\n\t\tpadding: 4px 8px;\n\t}\n}\n\n.row-selected {\n\tbutton, span {\n\t\tvertical-align: middle;\n\t}\n}\n\n.emoji-delete {\n\tvertical-align: top;\n\tmargin-left: -21px;\n\tmargin-top: -3px;\n}\n</style>\n"],"names":["_sfc_main$1","emojiIndex","i18n","t","skinTonePalette","Color","_sfc_main","Emoji","IconCircle","NcButton","NcColorPicker","NcPopover","NcTextField","Picker","EmojiIndex","data","currentSkinTone","getCurrentSkinTone","input","color","index","tone","setCurrentSkinTone","emojiObject","event","focusableList","last"],"mappings":";;;;;;;;;;;;AAoBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACqLA,IAAAC;AAEA,MAAAC,IAAA;AAAA,EACA,QAAAC,EAAA,cAAA;AAAA,EACA,UAAAA,EAAA,gBAAA;AAAA,EACA,YAAA;AAAA,IACA,QAAAA,EAAA,gBAAA;AAAA,IACA,QAAAA,EAAA,iBAAA;AAAA,IACA,SAAAA,EAAA,mBAAA;AAAA,IACA,QAAAA,EAAA,eAAA;AAAA,IACA,QAAAA,EAAA,kBAAA;AAAA,IACA,OAAAA,EAAA,cAAA;AAAA,IACA,UAAAA,EAAA,YAAA;AAAA,IACA,QAAAA,EAAA,iBAAA;AAAA,IACA,SAAAA,EAAA,SAAA;AAAA,IACA,SAAAA,EAAA,SAAA;AAAA,IACA,OAAAA,EAAA,OAAA;AAAA,IACA,QAAAA,EAAA,QAAA;AAAA,EACA;AACA,GAEAC,IAAA;AAAA,EACA,IAAAC,EAAA,KAAA,KAAA,IAAAF,EAAA,oBAAA,CAAA;AAAA,EACA,IAAAE,EAAA,KAAA,KAAA,KAAAF,EAAA,iBAAA,CAAA;AAAA,EACA,IAAAE,EAAA,KAAA,KAAA,KAAAF,EAAA,wBAAA,CAAA;AAAA,EACA,IAAAE,EAAA,KAAA,KAAA,IAAAF,EAAA,kBAAA,CAAA;AAAA,EACA,IAAAE,EAAA,KAAA,KAAA,IAAAF,EAAA,uBAAA,CAAA;AAAA,EACA,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ACAC,IAAAD,EAAA,SAAA;AAEA,UAAAA,EAAA,UAAA,GAAA;AACA,QAAAD,EAAA,eAAA;AACA;AAAA,MACA;AACA,MAAAA,EAAA,aAAA,MAAAA,EAAA,WAAAC,EAAAC,CAAA,KAEAF,EAAA,eAAA,GACAC,EAAA,CAAA,EAAA,MAAA,KACAD,EAAA,aAAA,MAAAA,EAAA,WAAAC,EAAA,CAAA,MAEAD,EAAA,eAAA,GACAC,EAAAC,CAAA,EAAA,MAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcEmojiPicker-o1VRXxQO.cjs","sources":["../../node_modules/vue-material-design-icons/Circle.vue","../../src/components/NcEmojiPicker/NcEmojiPicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon circle-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"CircleIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2020 Georg Ehrke <oc.list@georgehrke.com>\n -\n - @author 2020 Georg Ehrke <oc.list@georgehrke.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\n<docs>\n### General description\n\nThis component allows the user to pick an emoji.\n\n### Usage\n\n* Listen to the select event and pass in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker @select=\"select\" style=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Showing a preview and keeping it open after a user selected an emoji\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:close-on-select=\"false\"\n\t\t\t:show-preview=\"true\"\n\t\t\t@select=\"select\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Allow unselecting a previously set emoji.\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:show-preview=\"true\"\n\t\t\t:allow-unselect=\"true\"\n\t\t\t:selected-emoji=\"emoji\"\n\t\t\t@select=\"select\"\n\t\t\t@unselect=\"unselect\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t\tunselect() {\n\t\t\t\tthis.emoji = ''\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<NcPopover :shown.sync=\"open\"\n\t\t:container=\"container\"\n\t\tpopup-role=\"dialog\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@after-show=\"afterShow\"\n\t\t@after-hide=\"afterHide\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<Picker ref=\"picker\"\n\t\t\t:auto-focus=\"false /* We manage the input focus ourselves */\"\n\t\t\tcolor=\"var(--color-primary-element)\"\n\t\t\t:data=\"emojiIndex\"\n\t\t\t:emoji=\"previewFallbackEmoji\"\n\t\t\t:i18n=\"i18n\"\n\t\t\t:native=\"native\"\n\t\t\t:emoji-size=\"20\"\n\t\t\t:per-line=\"8\"\n\t\t\t:picker-styles=\"{ width: '320px' }\"\n\t\t\t:show-preview=\"showPreview\"\n\t\t\t:skin=\"currentSkinTone\"\n\t\t\t:show-skin-tones=\"false\"\n\t\t\t:title=\"previewFallbackName\"\n\t\t\trole=\"dialog\"\n\t\t\t:aria-label=\"t('Emoji picker')\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@select=\"select\">\n\t\t\t<template #searchTemplate=\"slotProps\">\n\t\t\t\t<div class=\"search__wrapper\">\n\t\t\t\t\t<NcTextField ref=\"search\"\n\t\t\t\t\t\tclass=\"search\"\n\t\t\t\t\t\t:value.sync=\"search\"\n\t\t\t\t\t\t:label=\"t('Search')\"\n\t\t\t\t\t\t:label-visible=\"true\"\n\t\t\t\t\t\t:placeholder=\"i18n.search\"\n\t\t\t\t\t\ttrailing-button-icon=\"close\"\n\t\t\t\t\t\t:trailing-button-label=\"t('Clear search')\"\n\t\t\t\t\t\t:show-trailing-button=\"search !== ''\"\n\t\t\t\t\t\t@trailing-button-click=\"clearSearch(); slotProps.onSearch(search);\"\n\t\t\t\t\t\t@update:value=\"slotProps.onSearch(search)\" />\n\t\t\t\t\t<NcColorPicker palette-only\n\t\t\t\t\t\t:palette=\"skinTonePalette\"\n\t\t\t\t\t\t:value=\"currentColor.color\"\n\t\t\t\t\t\t@update:value=\"onChangeSkinTone\">\n\t\t\t\t\t\t<NcButton :aria-label=\"t('Skin tone')\" type=\"tertiary-no-background\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconCircle :style=\"{ color: currentColor.color }\" :title=\"currentColor.name\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</NcColorPicker>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t<template v-if=\"allowUnselect && selectedEmoji\" #customCategory>\n\t\t\t\t<div class=\"emoji-mart-category-label\">\n\t\t\t\t\t<h3 class=\"emoji-mart-category-label\">\n\t\t\t\t\t\t{{ t('Selected') }}\n\t\t\t\t\t</h3>\n\t\t\t\t</div>\n\t\t\t\t<Emoji class=\"emoji-selected\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\t:emoji=\"selectedEmoji\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"32\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t\t<Emoji class=\"emoji-delete\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\temoji=\":x:\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"10\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t</template>\n\t\t</Picker>\n\t</NcPopover>\n</template>\n\n<script>\nimport { Picker, Emoji, EmojiIndex } from 'emoji-mart-vue-fast'\nimport { t } from '../../l10n.js'\nimport { getCurrentSkinTone, setCurrentSkinTone } from '../../functions/emoji/emoji.ts'\nimport { Color } from '../../utils/GenColors.js'\n\nimport data from 'emoji-mart-vue-fast/data/all.json'\nimport IconCircle from 'vue-material-design-icons/Circle.vue'\nimport NcButton from '../NcButton/index.js'\nimport NcColorPicker from '../NcColorPicker/NcColorPicker.vue'\nimport NcPopover from '../NcPopover/index.js'\nimport NcTextField from '../NcTextField/index.js'\n\n// Shared emoji index and skinTone for all NcEmojiPicker instances\n// Will be initialized on the first NcEmojiPicker creating\nlet emojiIndex\n\nconst i18n = {\n\tsearch: t('Search emoji'),\n\tnotfound: t('No emoji found'),\n\tcategories: {\n\t\tsearch: t('Search results'),\n\t\trecent: t('Frequently used'),\n\t\tsmileys: t('Smileys & Emotion'),\n\t\tpeople: t('People & Body'),\n\t\tnature: t('Animals & Nature'),\n\t\tfoods: t('Food & Drink'),\n\t\tactivity: t('Activities'),\n\t\tplaces: t('Travel & Places'),\n\t\tobjects: t('Objects'),\n\t\tsymbols: t('Symbols'),\n\t\tflags: t('Flags'),\n\t\tcustom: t('Custom'),\n\t},\n}\n\nconst skinTonePalette = [\n\tnew Color(255, 222, 52, t('Neutral skin color')),\n\tnew Color(228, 205, 166, t('Light skin tone')),\n\tnew Color(250, 221, 192, t('Medium light skin tone')),\n\tnew Color(174, 129, 87, t('Medium skin tone')),\n\tnew Color(158, 113, 88, t('Medium dark skin tone')),\n\tnew Color(96, 79, 69, t('Dark skin tone')),\n]\n\nexport default {\n\tname: 'NcEmojiPicker',\n\n\tcomponents: {\n\t\tEmoji,\n\t\tIconCircle,\n\t\tNcButton,\n\t\tNcColorPicker,\n\t\tNcPopover,\n\t\tNcTextField,\n\t\tPicker,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The emoji-set\n\t\t */\n\t\tactiveSet: {\n\t\t\ttype: String,\n\t\t\tdefault: 'native',\n\t\t},\n\t\t/**\n\t\t * Show preview section when hovering emoji\n\t\t */\n\t\tshowPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Allow unselecting the selected emoji\n\t\t */\n\t\tallowUnselect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Selected emoji to allow unselecting\n\t\t */\n\t\tselectedEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The fallback emoji in the preview section\n\t\t */\n\t\tpreviewFallbackEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: 'grinning',\n\t\t},\n\t\t/**\n\t\t * The fallback text in the preview section\n\t\t */\n\t\tpreviewFallbackName: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Pick an emoji'),\n\t\t},\n\t\t/**\n\t\t * Whether to close the emoji picker after picking one\n\t\t */\n\t\tcloseOnSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\temits: [\n\t\t'select',\n\t\t'select-data',\n\t\t'unselect',\n\t],\n\n\tsetup() {\n\t\t// If this is the first instance of NcEmojiPicker - setup EmojiIndex\n\t\tif (!emojiIndex) {\n\t\t\temojiIndex = new EmojiIndex(data)\n\t\t}\n\n\t\treturn {\n\t\t\t// Non-reactive constants\n\t\t\temojiIndex,\n\t\t\tskinTonePalette,\n\t\t\ti18n,\n\t\t}\n\t},\n\n\tdata() {\n\t\tconst currentSkinTone = getCurrentSkinTone()\n\n\t\treturn {\n\t\t\t/**\n\t\t\t * The current active color from the skin tone palette\n\t\t\t */\n\t\t\tcurrentColor: skinTonePalette[currentSkinTone - 1],\n\t\t\t/**\n\t\t\t * The current active skin tone\n\t\t\t * @type {1|2|3|4|5|6}\n\t\t\t */\n\t\t\tcurrentSkinTone,\n\t\t\tsearch: '',\n\t\t\topen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tnative() {\n\t\t\treturn this.activeSet === 'native'\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tclearSearch() {\n\t\t\tthis.search = ''\n\t\t\tconst input = this.$refs.search?.$refs.inputField?.$refs.input\n\t\t\tif (input) {\n\t\t\t\tinput.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Update the current skin tone by the result of the color picker\n\t\t * @param {string} color Color set\n\t\t */\n\t\tonChangeSkinTone(color) {\n\t\t\tconst index = this.skinTonePalette.findIndex((tone) => tone.color.toLowerCase() === color.toLowerCase())\n\t\t\tif (index > -1) {\n\t\t\t\tthis.currentSkinTone = index + 1\n\t\t\t\tthis.currentColor = this.skinTonePalette[index]\n\t\t\t\tsetCurrentSkinTone(this.currentSkinTone)\n\t\t\t}\n\t\t},\n\n\t\tselect(emojiObject) {\n\t\t\t/**\n\t\t\t * Emits a string containing the emoji e.g. '👩🏿‍💻'\n\t\t\t */\n\t\t\tthis.$emit('select', emojiObject.native)\n\n\t\t\t/**\n\t\t\t * Emits a object with more data about the picked emoji\n\t\t\t */\n\t\t\tthis.$emit('select-data', emojiObject)\n\n\t\t\tif (this.closeOnSelect) {\n\t\t\t\tthis.open = false\n\t\t\t}\n\t\t},\n\n\t\tunselect() {\n\t\t\tthis.$emit('unselect')\n\t\t},\n\n\t\tafterShow() {\n\t\t\t// add focus trap in modal\n\t\t\tconst picker = this.$refs.picker\n\t\t\tpicker.$el.addEventListener('keydown', this.checkKeyEvent)\n\n\t\t\t// set focus on input search field\n\t\t\tconst input = this.$refs.search?.$refs.inputField?.$refs.input\n\t\t\tif (input) {\n\t\t\t\tinput.focus()\n\t\t\t}\n\t\t},\n\n\t\tafterHide() {\n\t\t\t// remove keydown listner if popover is hidden\n\t\t\tconst picker = this.$refs.picker\n\t\t\tpicker.$el.removeEventListener('keydown', this.checkKeyEvent)\n\t\t},\n\n\t\tcheckKeyEvent(event) {\n\t\t\tif (event.key !== 'Tab') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst picker = this.$refs.picker\n\t\t\tconst focusableList = picker.$el.querySelectorAll(\n\t\t\t\t'button, input',\n\t\t\t)\n\t\t\tconst last = focusableList.length - 1\n\t\t\t// escape early if only 1 or no elements to focus\n\t\t\tif (focusableList.length <= 1) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (event.shiftKey === false && event.target === focusableList[last]) {\n\t\t\t\t// Jump to first item when pressing tab on the latest item\n\t\t\t\tevent.preventDefault()\n\t\t\t\tfocusableList[0].focus()\n\t\t\t} else if (event.shiftKey === true && event.target === focusableList[0]) {\n\t\t\t\t// Jump to the last item if pressing shift+tab on the first item\n\t\t\t\tevent.preventDefault()\n\t\t\t\tfocusableList[last].focus()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n@import 'emoji-mart-vue-fast/css/emoji-mart.css';\n\n.emoji-mart {\n\tbackground-color: var(--color-main-background) !important;\n\tborder: 0;\n\tcolor: var(--color-main-text) !important;\n\n\t// default style reset\n\tbutton {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\tfont-size: inherit;\n\t\theight: 36px;\n\t\twidth: auto;\n\n\t\t* {\n\t\t\tcursor: pointer !important;\n\t\t}\n\t}\n\n\t.emoji-mart-bar,\n\t.emoji-mart-anchors,\n\t.emoji-mart-search,\n\t.emoji-mart-search input,\n\t.emoji-mart-category,\n\t.emoji-mart-category-label,\n\t.emoji-mart-category-label span,\n\t.emoji-mart-skin-swatches {\n\t\tbackground-color: transparent !important;\n\t\tborder-color: var(--color-border) !important;\n\t\tcolor: inherit !important;\n\t}\n\n\t.emoji-mart-search input:focus-visible {\n\t\tbox-shadow: inset 0 0 0 2px var(--color-primary-element);\n\t\toutline: none;\n\t}\n\n\t.emoji-mart-bar {\n\t\t&:first-child {\n\t\t\tborder-top-left-radius: var(--border-radius) !important;\n\t\t\tborder-top-right-radius: var(--border-radius) !important;\n\t\t}\n\t}\n\n\t.emoji-mart-anchors {\n\t\tbutton {\n\t\t\tborder-radius: 0;\n\t\t\tpadding: 12px 4px;\n\t\t\theight: auto;\n\t\t\t&:focus-visible {\n\t\t\t\t/* box-shadow: inset 0 0 0 2px var(--color-primary-element); */\n\t\t\t\toutline: 2px solid var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t}\n\n\t.emoji-mart-category {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tjustify-content: start;\n\n\t\t.emoji-mart-category-label,\n\t\t.emoji-mart-emoji {\n\t\t\tuser-select: none;\n\t\t\tflex-grow: 0;\n\t\t\tflex-shrink: 0;\n\t\t}\n\n\t\t.emoji-mart-category-label {\n\t\t\tflex-basis: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t.emoji-mart-emoji {\n\t\t\t// 8 emoji per row\n\t\t\tflex-basis: calc(100% / 8);\n\t\t\ttext-align: center;\n\n\t\t\t&:hover::before,\n\t\t\t&.emoji-mart-emoji-selected::before{\n\t\t\t\tbackground-color: var(--color-background-hover) !important;\n\t\t\t\toutline: 2px solid var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t\tbutton {\n\n\t\t\t&:focus-visible {\n\t\t\t\tbackground-color: var(--color-background-hover);\n\t\t\t\tborder: 2px solid var(--color-primary-element) !important;\n\t\t\t\tborder-radius: 50%;\n\t\t\t}\n\t\t}\n\t}\n\n}\n</style>\n\n<style scoped lang=\"scss\">\n.search {\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tgap: 4px; // for focus-visible outlines\n\t\talign-items: end;\n\t\tpadding: 4px 8px;\n\t}\n}\n\n.row-selected {\n\tbutton, span {\n\t\tvertical-align: middle;\n\t}\n}\n\n.emoji-delete {\n\tvertical-align: top;\n\tmargin-left: -21px;\n\tmargin-top: -3px;\n}\n</style>\n"],"names":["_sfc_main$1","emojiIndex","i18n","_l10n","skinTonePalette","GenColors","_sfc_main","emojiMartVueFast","IconCircle","Components_NcButton","NcColorPicker","NcPopover","NcTextField","data__default","currentSkinTone","emoji","input","color","index","tone","emojiObject","event","focusableList","last"],"mappings":";;;AAoBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACqLA,IAAAC;AAEA,MAAAC,IAAA;AAAA,EACA,QAAAC,EAAA,EAAA,cAAA;AAAA,EACA,UAAAA,EAAA,EAAA,gBAAA;AAAA,EACA,YAAA;AAAA,IACA,QAAAA,EAAA,EAAA,gBAAA;AAAA,IACA,QAAAA,EAAA,EAAA,iBAAA;AAAA,IACA,SAAAA,EAAA,EAAA,mBAAA;AAAA,IACA,QAAAA,EAAA,EAAA,eAAA;AAAA,IACA,QAAAA,EAAA,EAAA,kBAAA;AAAA,IACA,OAAAA,EAAA,EAAA,cAAA;AAAA,IACA,UAAAA,EAAA,EAAA,YAAA;AAAA,IACA,QAAAA,EAAA,EAAA,iBAAA;AAAA,IACA,SAAAA,EAAA,EAAA,SAAA;AAAA,IACA,SAAAA,EAAA,EAAA,SAAA;AAAA,IACA,OAAAA,EAAA,EAAA,OAAA;AAAA,IACA,QAAAA,EAAA,EAAA,QAAA;AAAA,EACA;AACA,GAEAC,IAAA;AAAA,EACA,IAAAC,EAAA,MAAA,KAAA,KAAA,IAAAF,EAAA,EAAA,oBAAA,CAAA;AAAA,EACA,IAAAE,EAAA,MAAA,KAAA,KAAA,K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AA,MAAA,OACA,IAAA,iBAAA,WAAA,KAAA,aAAA;AAGA,YAAAJ,IAAA,KAAA,MAAA,QAAA,MAAA,YAAA,MAAA;AACA,MAAAA,KACAA,EAAA,MAAA;AAAA,IAEA;AAAA,IAEA,YAAA;AAGA,MADA,KAAA,MAAA,OACA,IAAA,oBAAA,WAAA,KAAA,aAAA;AAAA,IACA;AAAA,IAEA,cAAAK,GAAA;AACA,UAAAA,EAAA,QAAA;AACA;AAGA,YAAAC,IADA,KAAA,MAAA,OACA,IAAA;AAAA,QACA;AAAA,MACA,GACAC,IAAAD,EAAA,SAAA;AAEA,UAAAA,EAAA,UAAA,GAAA;AACA,QAAAD,EAAA,eAAA;AACA;AAAA,MACA;AACA,MAAAA,EAAA,aAAA,MAAAA,EAAA,WAAAC,EAAAC,CAAA,KAEAF,EAAA,eAAA,GACAC,EAAA,CAAA,EAAA,MAAA,KACAD,EAAA,aAAA,MAAAA,EAAA,WAAAC,EAAA,CAAA,MAEAD,EAAA,eAAA,GACAC,EAAAC,CAAA,EAAA,MAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcListItem-AZpInn_s.mjs","sources":["../../src/components/NcListItem/NcListItem.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2021 Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @author Marco Ambrosini <marcoambrosini@icloud.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<docs>\n\n### Default Usage\n\n```vue\n<template>\n\t<ul>\n\t\t<NcListItem\n\t\t\t:name=\"'This is an active element with highlighted counter'\"\n\t\t\t:bold=\"false\"\n\t\t\t:active=\"true\"\n\t\t\t:details=\"'1h'\"\n\t\t\t:counter-number=\"44\"\n\t\t\tcounterType=\"highlighted\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#fff\" />\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'This is an active element with outlined counter'\"\n\t\t\t:bold=\"false\"\n\t\t\t:active=\"true\"\n\t\t\t:details=\"'1h'\"\n\t\t\t:counter-number=\"44\"\n\t\t\tcounterType=\"outlined\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#fff\" />\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'This is an active element with normal counter'\"\n\t\t\t:bold=\"false\"\n\t\t\t:active=\"true\"\n\t\t\t:details=\"'1h'\"\n\t\t\t:counter-number=\"44\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#fff\" />\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'Name of the element with highlighted counter'\"\n\t\t\t:bold=\"false\"\n\t\t\t:force-display-actions=\"true\"\n\t\t\t:details=\"'1h'\"\n\t\t\t:counter-number=\"44\"\n\t\t\tcounterType=\"highlighted\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'Name of the element with outlined counter'\"\n\t\t\t:bold=\"false\"\n\t\t\t:force-display-actions=\"true\"\n\t\t\t:details=\"'1h'\"\n\t\t\t:counter-number=\"44\"\n\t\t\tcounterType=\"outlined\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'Name of the element with normal counter'\"\n\t\t\t:bold=\"false\"\n\t\t\t:force-display-actions=\"true\"\n\t\t\t:details=\"'1h'\"\n\t\t\t:counter-number=\"44\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'Name of the element'\"\n\t\t\t:bold=\"false\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#0082c9\"/>\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'Name of the element'\"\n\t\t\t:bold=\"false\"\n\t\t\t:details=\"'1h'\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#0082c9\"/>\n\t\t\t</template>\n\t\t</NcListItem>\n\t</ul>\n</template>\n\n<script>\n\timport CheckboxBlankCircle from 'vue-material-design-icons/CheckboxBlankCircle'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tCheckboxBlankCircle,\n\t\t}\n\t}\n</script>\n\n```\n\n### NcListItem compact mode\n```\n<ul style=\"width: 350px;\">\n\t<NcListItem\n\t\t:name=\"'Name of the element'\"\n\t\t:counter-number=\"1\"\n\t\t:compact=\"true\" >\n\t\t<template #icon>\n\t\t\t<div class=\"icon-edit\" />\n\t\t</template>\n\t\t<template #subname>\n\t\t\tThis one is with subname\n\t\t</template>\n\t\t<template #actions>\n\t\t\t<NcActionButton>\n\t\t\t\tButton one\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton>\n\t\t\t\tButton two\n\t\t\t</NcActionButton>\n\t\t</template>\n\t</NcListItem>\n\t<NcListItem\n\t\t:name=\"'Name of the element'\"\n\t\t:compact=\"true\" >\n\t\t<template #icon>\n\t\t\t<div class=\"icon-edit\" />\n\t\t</template>\n\t</NcListItem>\n\t<NcListItem\n\t\t:name=\"'Name of the element'\"\n\t\t:counter-number=\"3\"\n\t\t:compact=\"true\" >\n\t\t<template #icon>\n\t\t\t<div class=\"icon-edit\" />\n\t\t</template>\n\t\t<template #subname>\n\t\t\tThis one is with subname\n\t\t</template>\n\t\t<template #actions>\n\t\t\t<NcActionButton>\n\t\t\t\tButton one\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton>\n\t\t\t\tButton two\n\t\t\t</NcActionButton>\n\t\t</template>\n\t</NcListItem>\n\t<NcListItem\n\t\t:name=\"'Name of the element'\"\n\t\t:compact=\"true\"\n\t\t:counter-number=\"4\"\n\t\thref=\"https://nextcloud.com\">\n\t\t<template #icon>\n\t\t\t<div class=\"icon-edit\" />\n\t\t</template>\n\t\t<template #subname>\n\t\t\tThis one is with an external link\n\t\t</template>\n\t</NcListItem>\n</ul>\n```\n</docs>\n\n<template>\n\t<!-- This wrapper can be either a router link or a `<li>` -->\n\t<component :is=\"to ? 'router-link' : 'NcVNodes'\"\n\t\tv-slot=\"{ href: routerLinkHref, navigate, isActive }\"\n\t\t:custom=\"to ? true : null\"\n\t\t:to=\"to\"\n\t\t:exact=\"to ? exact : null\">\n\t\t<li class=\"list-item__wrapper\"\n\t\t\t:class=\"{ 'list-item__wrapper--active' : isActive || active }\">\n\t\t\t<a :id=\"anchorId\"\n\t\t\t\tref=\"list-item\"\n\t\t\t\t:href=\"routerLinkHref || href\"\n\t\t\t\t:target=\"target || (href === '#' ? undefined : '_blank')\"\n\t\t\t\t:rel=\"href === '#' ? undefined : 'noopener noreferrer'\"\n\t\t\t\tclass=\"list-item\"\n\t\t\t\t:aria-label=\"linkAriaLabel\"\n\t\t\t\t@mouseover=\"handleMouseover\"\n\t\t\t\t@mouseleave=\"handleMouseleave\"\n\t\t\t\t@focus=\"handleFocus\"\n\t\t\t\t@blur=\"handleBlur\"\n\t\t\t\t@keydown.tab.exact=\"handleTab\"\n\t\t\t\t@click=\"onClick($event, navigate, routerLinkHref)\"\n\t\t\t\t@keydown.esc=\"hideActions\">\n\n\t\t\t\t<div class=\"list-item-content__wrapper\"\n\t\t\t\t\t:class=\"{ 'list-item-content__wrapper--compact': compact }\">\n\t\t\t\t\t<!-- @slot This slot is used for the NcAvatar or icon -->\n\t\t\t\t\t<slot name=\"icon\" />\n\n\t\t\t\t\t<!-- Main content -->\n\t\t\t\t\t<div class=\"list-item-content\">\n\t\t\t\t\t\t<div class=\"list-item-content__main\"\n\t\t\t\t\t\t\t:class=\"{ 'list-item-content__main--oneline': oneLine }\">\n\n\t\t\t\t\t\t\t<!-- First line, name and details -->\n\t\t\t\t\t\t\t<div class=\"line-one\">\n\t\t\t\t\t\t\t\t<span class=\"line-one__name\">\n\t\t\t\t\t\t\t\t\t{{ name }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span v-if=\"showDetails\"\n\t\t\t\t\t\t\t\t\tclass=\"line-one__details\">\n\t\t\t\t\t\t\t\t\t{{ details }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<!-- Second line, subname and counter -->\n\t\t\t\t\t\t\t<div class=\"line-two\"\n\t\t\t\t\t\t\t\t:class=\"{'line-two--bold': bold}\">\n\t\t\t\t\t\t\t\t<span v-if=\"hasSubname\" class=\"line-two__subname\">\n\t\t\t\t\t\t\t\t\t<!-- @slot Slot for the second line of the component -->\n\t\t\t\t\t\t\t\t\t<slot name=\"subname\" />\n\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t<!-- Counter and indicator -->\n\t\t\t\t\t\t\t\t<span v-if=\"counterNumber != 0 || hasIndicator\"\n\t\t\t\t\t\t\t\t\tv-show=\"showAdditionalElements\"\n\t\t\t\t\t\t\t\t\tclass=\"line-two__additional_elements\">\n\t\t\t\t\t\t\t\t\t<NcCounterBubble v-if=\"counterNumber != 0\"\n\t\t\t\t\t\t\t\t\t\t:active=\"isActive || active\"\n\t\t\t\t\t\t\t\t\t\tclass=\"line-two__counter\"\n\t\t\t\t\t\t\t\t\t\t:type=\"counterType\">\n\t\t\t\t\t\t\t\t\t\t{{ counterNumber }}\n\t\t\t\t\t\t\t\t\t</NcCounterBubble>\n\n\t\t\t\t\t\t\t\t\t<span v-if=\"hasIndicator\" class=\"line-two__indicator\">\n\t\t\t\t\t\t\t\t\t\t<!-- @slot This slot is used for some indicator in form of icon -->\n\t\t\t\t\t\t\t\t\t\t<slot name=\"indicator\" />\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Actions -->\n\t\t\t\t\t\t<div v-if=\"!forceDisplayActions\"\n\t\t\t\t\t\t\tv-show=\"displayActionsOnHoverFocus\"\n\t\t\t\t\t\t\tclass=\"list-item-content__actions\"\n\t\t\t\t\t\t\t@click.prevent.stop=\"\">\n\t\t\t\t\t\t\t<NcActions ref=\"actions\"\n\t\t\t\t\t\t\t\t:primary=\"isActive || active\"\n\t\t\t\t\t\t\t\t:aria-label=\"computedActionsAriaLabel\"\n\t\t\t\t\t\t\t\t@update:open=\"handleActionsUpdateOpen\">\n\t\t\t\t\t\t\t\t<!-- @slot Provide the actions for the right side quick menu -->\n\t\t\t\t\t\t\t\t<slot name=\"actions\" />\n\t\t\t\t\t\t\t</NcActions>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<!-- Actions -->\n\t\t\t\t\t<div v-if=\"forceDisplayActions\"\n\t\t\t\t\t\tclass=\"list-item-content__actions\"\n\t\t\t\t\t\t@click.prevent.stop=\"\">\n\t\t\t\t\t\t<NcActions ref=\"actions\"\n\t\t\t\t\t\t\t:primary=\"isActive || active\"\n\t\t\t\t\t\t\t:aria-label=\"computedActionsAriaLabel\"\n\t\t\t\t\t\t\t@update:open=\"handleActionsUpdateOpen\">\n\t\t\t\t\t\t\t<!-- @slot Provide the actions for the right side quick menu -->\n\t\t\t\t\t\t\t<slot name=\"actions\" />\n\t\t\t\t\t\t</NcActions>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- @slot Extra elements below the item -->\n\t\t\t\t<div v-if=\"$slots.extra\" class=\"list-item__extra\">\n\t\t\t\t\t<slot name=\"extra\" />\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t</li>\n\t</component>\n</template>\n\n<script>\nimport NcActions from '../NcActions/index.js'\nimport NcCounterBubble from '../NcCounterBubble/index.js'\nimport NcVNodes from '../NcVNodes/index.js'\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcListItem',\n\n\tcomponents: {\n\t\tNcActions,\n\t\tNcCounterBubble,\n\t\tNcVNodes,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The details text displayed in the upper right part of the component\n\t\t */\n\t\tdetails: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Name (first line of text)\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Pass in `true` if you want the matching behavior to\n\t\t * be non-inclusive: https://router.vuejs.org/api/#exact\n\t\t */\n\t\texact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The route for the router link.\n\t\t */\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value for the external link\n\t\t */\n\t\thref: {\n\t\t\ttype: String,\n\t\t\tdefault: '#',\n\t\t},\n\n\t\ttarget: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Id for the `<a>` element\n\t\t */\n\t\tanchorId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Make subname bold\n\t\t */\n\t\tbold: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Show the NcListItem in compact design\n\t\t */\n\t\tcompact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Toggle the active state of the component\n\t\t */\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Aria label for the wrapper element\n\t\t */\n\t\tlinkAriaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Aria label for the actions toggle\n\t\t */\n\t\tactionsAriaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * If different from 0 this component will display the\n\t\t * NcCounterBubble component\n\t\t */\n\t\t counterNumber: {\n\t\t\t type: [Number, String],\n\t\t\t default: 0,\n\t\t },\n\n\t\t/**\n\t\t * Outlined or highlighted state of the counter\n\t\t */\n\t\tcounterType: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['highlighted', 'outlined', ''].indexOf(value) !== -1\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * To be used only when the elements in the actions menu are very important\n\t\t */\n\t\tforceDisplayActions: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'click',\n\t\t'update:menuOpen',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\thovered: false,\n\t\t\tfocused: false,\n\t\t\thasActions: false,\n\t\t\thasSubname: false,\n\t\t\tdisplayActionsOnHoverFocus: false,\n\t\t\tmenuOpen: false,\n\t\t\thasIndicator: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\n\t\thasDetails() {\n\t\t\treturn this.details !== ''\n\t\t},\n\n\t\toneLine() {\n\t\t\treturn !this.hasSubname && !this.showDetails\n\t\t},\n\n\t\tshowAdditionalElements() {\n\t\t\treturn !this.displayActionsOnHoverFocus || this.forceDisplayActions\n\t\t},\n\n\t\tshowDetails() {\n\t\t\treturn this.hasDetails && (!this.displayActionsOnHoverFocus || this.forceDisplayActions)\n\t\t},\n\n\t\tcomputedActionsAriaLabel() {\n\t\t\treturn this.actionsAriaLabel || t('Actions for item with name \"{name}\"', { name: this.name })\n\t\t},\n\t},\n\n\twatch: {\n\n\t\tmenuOpen(newValue) {\n\t\t\t// A click outside both the menu and the root element hides the actions again\n\t\t\tif (!newValue && !this.hovered) {\n\t\t\t\tthis.displayActionsOnHoverFocus = false\n\t\t\t}\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.checkSlots()\n\t},\n\n\tupdated() {\n\t\tthis.checkSlots()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Handle link click\n\t\t *\n\t\t * @param {PointerEvent} event - Native click event\n\t\t * @param {Function} [navigate] - VueRouter link's navigate if any\n\t\t * @param {string} [routerLinkHref] - VueRouter link's href\n\t\t */\n\t\tonClick(event, navigate, routerLinkHref) {\n\t\t\t// Always forward native event\n\t\t\tthis.$emit('click', event)\n\t\t\t// Do not navigate with control keys - it is opening in a new tab\n\t\t\tif (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Prevent default link behaviour if it's a router-link and navigate manually\n\t\t\tif (routerLinkHref) {\n\t\t\t\tnavigate?.(event)\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\n\t\thandleMouseover() {\n\t\t\tthis.showActions()\n\t\t\tthis.hovered = true\n\t\t},\n\n\t\tshowActions() {\n\t\t\tif (this.hasActions) {\n\t\t\t\tthis.displayActionsOnHoverFocus = true\n\t\t\t}\n\t\t\tthis.hovered = false\n\t\t},\n\n\t\thideActions() {\n\t\t\tthis.displayActionsOnHoverFocus = false\n\t\t},\n\n\t\t/**\n\t\t * Show actions upon focus\n\t\t */\n\t\thandleFocus() {\n\t\t\tthis.focused = true\n\t\t\tthis.showActions()\n\t\t},\n\n\t\thandleBlur() {\n\t\t\tthis.focused = false\n\t\t},\n\n\t\t/**\n\t\t * Hide the actions on mouseleave unless the menu is open\n\t\t */\n\t\thandleMouseleave() {\n\t\t\tif (!this.menuOpen) {\n\t\t\t\tthis.displayActionsOnHoverFocus = false\n\t\t\t}\n\t\t\tthis.hovered = false\n\t\t},\n\n\t\t/**\n\t\t * This method checks if the root element of the component is focused and\n\t\t * if that's the case it focuses the actions button if available\n\t\t *\n\t\t * @param {Event} e the keydown event\n\t\t */\n\t\thandleTab(e) {\n\t\t\tif (this.focused && this.hasActions) {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.$refs.actions.$refs.menuButton.$el.focus()\n\t\t\t\tthis.focused = false\n\t\t\t} else {\n\t\t\t\tthis.displayActionsOnHoverFocus = false\n\t\t\t}\n\t\t},\n\n\t\thandleActionsUpdateOpen(e) {\n\t\t\tthis.menuOpen = e\n\t\t\tthis.$emit('update:menuOpen', e)\n\t\t},\n\n\t\t// Check if subname and actions slots are populated\n\t\tcheckSlots() {\n\t\t\tif (this.hasActions !== !!this.$slots.actions) {\n\t\t\t\tthis.hasActions = !!this.$slots.actions\n\t\t\t}\n\t\t\tif (this.hasSubname !== !!this.$slots.subname) {\n\t\t\t\tthis.hasSubname = !!this.$slots.subname\n\t\t\t}\n\t\t\tif (this.hasIndicator !== !!this.$slots.indicator) {\n\t\t\t\tthis.hasIndicator = !!this.$slots.indicator\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.list-item__wrapper {\n\tposition: relative;\n\twidth: 100%;\n\n\t&--active,\n\t&:active,\n\t&.active {\n\t\t.list-item {\n\t\t\tbackground-color: var(--color-primary-element);\n\t\t\t&:active,\n\t\t\t&:hover,\n\t\t\t&:focus,\n\t\t\t&:focus-visible {\n\t\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t\t}\n\t\t}\n\n\t\t.line-one__name, .line-one__details {\n\t\t\tcolor: var(--color-primary-element-text) !important;\n\t\t}\n\n\t\t.line-two__subname {\n\t\t\tcolor: var(--color-primary-element-text) !important;\n\t\t}\n\t}\n}\n\n// NcListItem\n.list-item {\n\tbox-sizing: border-box;\n\tdisplay: block;\n\tposition: relative;\n\tflex: 0 0 auto;\n\tjustify-content: flex-start;\n\tpadding: 8px 10px;\n\t// Fix for border-radius being too large for 3-line entries like in Mail\n\t// 44px avatar size / 2 + 8px padding, and 2px for better visual quality\n\tborder-radius: 32px;\n\tmargin: 2px 0;\n\twidth: 100%;\n\tcursor: pointer;\n\ttransition: background-color var(--animation-quick) ease-in-out;\n\tlist-style: none;\n\t&:active,\n\t&:hover,\n\t&:focus,\n\t&:focus-visible {\n\t\tbackground-color: var(--color-background-hover);\n\t}\n\n\t&-content__wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\theight: 48px;\n\n\t\t&--compact {\n\t\t\theight: 36px;\n\n\t\t\t.line-one, .line-two {\n\t\t\t\tmargin-top: -4px;\n\t\t\t\tmargin-bottom: -4px;\n\t\t\t}\n\t\t}\n\t}\n\n\t&-content {\n\t\tdisplay: flex;\n\t\tflex: 1 1 auto;\n\t\tjustify-content: space-between;\n\t\tpadding-left: 8px;\n\n\t\t&__main {\n\t\t\tflex: 1 1 auto;\n\t\t\twidth: 0;\n\t\t\tmargin: auto 0;\n\n\t\t\t&--oneline {\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\t&__actions {\n\t\t\tflex: 0 0 auto;\n\t\t\talign-self: center;\n\t\t\tjustify-content: center;\n\t\t\tmargin-left: 4px;\n\t\t}\n\t}\n\n\t&__extra {\n\t\tmargin-top: 4px;\n\t}\n}\n\n.line-one {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\twhite-space: nowrap;\n\tmargin: 0 auto 0 0;\n\toverflow: hidden;\n\n\t&__name {\n\t\toverflow: hidden;\n\t\tflex-grow: 1;\n\t\tcursor: pointer;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-main-text);\n\t\tfont-weight: bold;\n\t}\n\n\t&__details {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tmargin: 0 8px;\n\t\tfont-weight: normal;\n\t}\n}\n\n.line-two {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\twhite-space: nowrap;\n\t&--bold {\n\t\tfont-weight: bold;\n\t}\n\n\t&__subname {\n\t\toverflow: hidden;\n\t\tflex-grow: 1;\n\t\tcursor: pointer;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__additional_elements {\n\t\tmargin: 2px 4px 0 4px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t&__indicator {\n\t\tmargin: 0 5px;\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","NcActions","NcCounterBubble","NcVNodes","value","t","newValue","event","navigate","routerLinkHref","e"],"mappings":";;;;;;;AAqaA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,UAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA,CAAA,QAA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mBAAA;AACA,MAAA,KAAA,aACA,KAAA,6BAAA,KAEA,KAAA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,UAAAG,GAAA;AACA,MAAA,KAAA,WAAA,KAAA,cACAA,EAAA,eAAA,GACA,KAAA,MAAA,QAAA,MAAA,WAAA,IAAA,MAAA,GACA,KAAA,UAAA,MAEA,KAAA,6BAAA;AAAA,IAEA;AAAA,IAEA,wBAAAA,GAAA;AACA,WAAA,WAAAA,GACA,KAAA,MAAA,mBAAAA,CAAA;AAAA,IACA;AAAA;AAAA,IAGA,aAAA;AACA,MAAA,KAAA,eAAA,CAAA,CAAA,KAAA,OAAA,YACA,KAAA,aAAA,CAAA,CAAA,KAAA,OAAA,UAEA,KAAA,eAAA,CAAA,CAAA,KAAA,OAAA,YACA,KAAA,aAAA,CAAA,CAAA,KAAA,OAAA,UAEA,KAAA,iBAAA,CAAA,CAAA,KAAA,OAAA,cACA,KAAA,eAAA,CAAA,CAAA,KAAA,OAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcListItem-bBx6_yWw.cjs","sources":["../../src/components/NcListItem/NcListItem.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2021 Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @author Marco Ambrosini <marcoambrosini@icloud.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<docs>\n\n### Default Usage\n\n```vue\n<template>\n\t<ul>\n\t\t<NcListItem\n\t\t\t:name=\"'This is an active element with highlighted counter'\"\n\t\t\t:bold=\"false\"\n\t\t\t:active=\"true\"\n\t\t\t:details=\"'1h'\"\n\t\t\t:counter-number=\"44\"\n\t\t\tcounterType=\"highlighted\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#fff\" />\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'This is an active element with outlined counter'\"\n\t\t\t:bold=\"false\"\n\t\t\t:active=\"true\"\n\t\t\t:details=\"'1h'\"\n\t\t\t:counter-number=\"44\"\n\t\t\tcounterType=\"outlined\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#fff\" />\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'This is an active element with normal counter'\"\n\t\t\t:bold=\"false\"\n\t\t\t:active=\"true\"\n\t\t\t:details=\"'1h'\"\n\t\t\t:counter-number=\"44\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#fff\" />\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'Name of the element with highlighted counter'\"\n\t\t\t:bold=\"false\"\n\t\t\t:force-display-actions=\"true\"\n\t\t\t:details=\"'1h'\"\n\t\t\t:counter-number=\"44\"\n\t\t\tcounterType=\"highlighted\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'Name of the element with outlined counter'\"\n\t\t\t:bold=\"false\"\n\t\t\t:force-display-actions=\"true\"\n\t\t\t:details=\"'1h'\"\n\t\t\t:counter-number=\"44\"\n\t\t\tcounterType=\"outlined\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'Name of the element with normal counter'\"\n\t\t\t:bold=\"false\"\n\t\t\t:force-display-actions=\"true\"\n\t\t\t:details=\"'1h'\"\n\t\t\t:counter-number=\"44\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'Name of the element'\"\n\t\t\t:bold=\"false\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#0082c9\"/>\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\t:name=\"'Name of the element'\"\n\t\t\t:bold=\"false\"\n\t\t\t:details=\"'1h'\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#0082c9\"/>\n\t\t\t</template>\n\t\t</NcListItem>\n\t</ul>\n</template>\n\n<script>\n\timport CheckboxBlankCircle from 'vue-material-design-icons/CheckboxBlankCircle'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tCheckboxBlankCircle,\n\t\t}\n\t}\n</script>\n\n```\n\n### NcListItem compact mode\n```\n<ul style=\"width: 350px;\">\n\t<NcListItem\n\t\t:name=\"'Name of the element'\"\n\t\t:counter-number=\"1\"\n\t\t:compact=\"true\" >\n\t\t<template #icon>\n\t\t\t<div class=\"icon-edit\" />\n\t\t</template>\n\t\t<template #subname>\n\t\t\tThis one is with subname\n\t\t</template>\n\t\t<template #actions>\n\t\t\t<NcActionButton>\n\t\t\t\tButton one\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton>\n\t\t\t\tButton two\n\t\t\t</NcActionButton>\n\t\t</template>\n\t</NcListItem>\n\t<NcListItem\n\t\t:name=\"'Name of the element'\"\n\t\t:compact=\"true\" >\n\t\t<template #icon>\n\t\t\t<div class=\"icon-edit\" />\n\t\t</template>\n\t</NcListItem>\n\t<NcListItem\n\t\t:name=\"'Name of the element'\"\n\t\t:counter-number=\"3\"\n\t\t:compact=\"true\" >\n\t\t<template #icon>\n\t\t\t<div class=\"icon-edit\" />\n\t\t</template>\n\t\t<template #subname>\n\t\t\tThis one is with subname\n\t\t</template>\n\t\t<template #actions>\n\t\t\t<NcActionButton>\n\t\t\t\tButton one\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton>\n\t\t\t\tButton two\n\t\t\t</NcActionButton>\n\t\t</template>\n\t</NcListItem>\n\t<NcListItem\n\t\t:name=\"'Name of the element'\"\n\t\t:compact=\"true\"\n\t\t:counter-number=\"4\"\n\t\thref=\"https://nextcloud.com\">\n\t\t<template #icon>\n\t\t\t<div class=\"icon-edit\" />\n\t\t</template>\n\t\t<template #subname>\n\t\t\tThis one is with an external link\n\t\t</template>\n\t</NcListItem>\n</ul>\n```\n</docs>\n\n<template>\n\t<!-- This wrapper can be either a router link or a `<li>` -->\n\t<component :is=\"to ? 'router-link' : 'NcVNodes'\"\n\t\tv-slot=\"{ href: routerLinkHref, navigate, isActive }\"\n\t\t:custom=\"to ? true : null\"\n\t\t:to=\"to\"\n\t\t:exact=\"to ? exact : null\">\n\t\t<li class=\"list-item__wrapper\"\n\t\t\t:class=\"{ 'list-item__wrapper--active' : isActive || active }\">\n\t\t\t<a :id=\"anchorId\"\n\t\t\t\tref=\"list-item\"\n\t\t\t\t:href=\"routerLinkHref || href\"\n\t\t\t\t:target=\"target || (href === '#' ? undefined : '_blank')\"\n\t\t\t\t:rel=\"href === '#' ? undefined : 'noopener noreferrer'\"\n\t\t\t\tclass=\"list-item\"\n\t\t\t\t:aria-label=\"linkAriaLabel\"\n\t\t\t\t@mouseover=\"handleMouseover\"\n\t\t\t\t@mouseleave=\"handleMouseleave\"\n\t\t\t\t@focus=\"handleFocus\"\n\t\t\t\t@blur=\"handleBlur\"\n\t\t\t\t@keydown.tab.exact=\"handleTab\"\n\t\t\t\t@click=\"onClick($event, navigate, routerLinkHref)\"\n\t\t\t\t@keydown.esc=\"hideActions\">\n\n\t\t\t\t<div class=\"list-item-content__wrapper\"\n\t\t\t\t\t:class=\"{ 'list-item-content__wrapper--compact': compact }\">\n\t\t\t\t\t<!-- @slot This slot is used for the NcAvatar or icon -->\n\t\t\t\t\t<slot name=\"icon\" />\n\n\t\t\t\t\t<!-- Main content -->\n\t\t\t\t\t<div class=\"list-item-content\">\n\t\t\t\t\t\t<div class=\"list-item-content__main\"\n\t\t\t\t\t\t\t:class=\"{ 'list-item-content__main--oneline': oneLine }\">\n\n\t\t\t\t\t\t\t<!-- First line, name and details -->\n\t\t\t\t\t\t\t<div class=\"line-one\">\n\t\t\t\t\t\t\t\t<span class=\"line-one__name\">\n\t\t\t\t\t\t\t\t\t{{ name }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span v-if=\"showDetails\"\n\t\t\t\t\t\t\t\t\tclass=\"line-one__details\">\n\t\t\t\t\t\t\t\t\t{{ details }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<!-- Second line, subname and counter -->\n\t\t\t\t\t\t\t<div class=\"line-two\"\n\t\t\t\t\t\t\t\t:class=\"{'line-two--bold': bold}\">\n\t\t\t\t\t\t\t\t<span v-if=\"hasSubname\" class=\"line-two__subname\">\n\t\t\t\t\t\t\t\t\t<!-- @slot Slot for the second line of the component -->\n\t\t\t\t\t\t\t\t\t<slot name=\"subname\" />\n\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t<!-- Counter and indicator -->\n\t\t\t\t\t\t\t\t<span v-if=\"counterNumber != 0 || hasIndicator\"\n\t\t\t\t\t\t\t\t\tv-show=\"showAdditionalElements\"\n\t\t\t\t\t\t\t\t\tclass=\"line-two__additional_elements\">\n\t\t\t\t\t\t\t\t\t<NcCounterBubble v-if=\"counterNumber != 0\"\n\t\t\t\t\t\t\t\t\t\t:active=\"isActive || active\"\n\t\t\t\t\t\t\t\t\t\tclass=\"line-two__counter\"\n\t\t\t\t\t\t\t\t\t\t:type=\"counterType\">\n\t\t\t\t\t\t\t\t\t\t{{ counterNumber }}\n\t\t\t\t\t\t\t\t\t</NcCounterBubble>\n\n\t\t\t\t\t\t\t\t\t<span v-if=\"hasIndicator\" class=\"line-two__indicator\">\n\t\t\t\t\t\t\t\t\t\t<!-- @slot This slot is used for some indicator in form of icon -->\n\t\t\t\t\t\t\t\t\t\t<slot name=\"indicator\" />\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Actions -->\n\t\t\t\t\t\t<div v-if=\"!forceDisplayActions\"\n\t\t\t\t\t\t\tv-show=\"displayActionsOnHoverFocus\"\n\t\t\t\t\t\t\tclass=\"list-item-content__actions\"\n\t\t\t\t\t\t\t@click.prevent.stop=\"\">\n\t\t\t\t\t\t\t<NcActions ref=\"actions\"\n\t\t\t\t\t\t\t\t:primary=\"isActive || active\"\n\t\t\t\t\t\t\t\t:aria-label=\"computedActionsAriaLabel\"\n\t\t\t\t\t\t\t\t@update:open=\"handleActionsUpdateOpen\">\n\t\t\t\t\t\t\t\t<!-- @slot Provide the actions for the right side quick menu -->\n\t\t\t\t\t\t\t\t<slot name=\"actions\" />\n\t\t\t\t\t\t\t</NcActions>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<!-- Actions -->\n\t\t\t\t\t<div v-if=\"forceDisplayActions\"\n\t\t\t\t\t\tclass=\"list-item-content__actions\"\n\t\t\t\t\t\t@click.prevent.stop=\"\">\n\t\t\t\t\t\t<NcActions ref=\"actions\"\n\t\t\t\t\t\t\t:primary=\"isActive || active\"\n\t\t\t\t\t\t\t:aria-label=\"computedActionsAriaLabel\"\n\t\t\t\t\t\t\t@update:open=\"handleActionsUpdateOpen\">\n\t\t\t\t\t\t\t<!-- @slot Provide the actions for the right side quick menu -->\n\t\t\t\t\t\t\t<slot name=\"actions\" />\n\t\t\t\t\t\t</NcActions>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- @slot Extra elements below the item -->\n\t\t\t\t<div v-if=\"$slots.extra\" class=\"list-item__extra\">\n\t\t\t\t\t<slot name=\"extra\" />\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t</li>\n\t</component>\n</template>\n\n<script>\nimport NcActions from '../NcActions/index.js'\nimport NcCounterBubble from '../NcCounterBubble/index.js'\nimport NcVNodes from '../NcVNodes/index.js'\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcListItem',\n\n\tcomponents: {\n\t\tNcActions,\n\t\tNcCounterBubble,\n\t\tNcVNodes,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The details text displayed in the upper right part of the component\n\t\t */\n\t\tdetails: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Name (first line of text)\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Pass in `true` if you want the matching behavior to\n\t\t * be non-inclusive: https://router.vuejs.org/api/#exact\n\t\t */\n\t\texact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The route for the router link.\n\t\t */\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value for the external link\n\t\t */\n\t\thref: {\n\t\t\ttype: String,\n\t\t\tdefault: '#',\n\t\t},\n\n\t\ttarget: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Id for the `<a>` element\n\t\t */\n\t\tanchorId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Make subname bold\n\t\t */\n\t\tbold: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Show the NcListItem in compact design\n\t\t */\n\t\tcompact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Toggle the active state of the component\n\t\t */\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Aria label for the wrapper element\n\t\t */\n\t\tlinkAriaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Aria label for the actions toggle\n\t\t */\n\t\tactionsAriaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * If different from 0 this component will display the\n\t\t * NcCounterBubble component\n\t\t */\n\t\t counterNumber: {\n\t\t\t type: [Number, String],\n\t\t\t default: 0,\n\t\t },\n\n\t\t/**\n\t\t * Outlined or highlighted state of the counter\n\t\t */\n\t\tcounterType: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['highlighted', 'outlined', ''].indexOf(value) !== -1\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * To be used only when the elements in the actions menu are very important\n\t\t */\n\t\tforceDisplayActions: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'click',\n\t\t'update:menuOpen',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\thovered: false,\n\t\t\tfocused: false,\n\t\t\thasActions: false,\n\t\t\thasSubname: false,\n\t\t\tdisplayActionsOnHoverFocus: false,\n\t\t\tmenuOpen: false,\n\t\t\thasIndicator: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\n\t\thasDetails() {\n\t\t\treturn this.details !== ''\n\t\t},\n\n\t\toneLine() {\n\t\t\treturn !this.hasSubname && !this.showDetails\n\t\t},\n\n\t\tshowAdditionalElements() {\n\t\t\treturn !this.displayActionsOnHoverFocus || this.forceDisplayActions\n\t\t},\n\n\t\tshowDetails() {\n\t\t\treturn this.hasDetails && (!this.displayActionsOnHoverFocus || this.forceDisplayActions)\n\t\t},\n\n\t\tcomputedActionsAriaLabel() {\n\t\t\treturn this.actionsAriaLabel || t('Actions for item with name \"{name}\"', { name: this.name })\n\t\t},\n\t},\n\n\twatch: {\n\n\t\tmenuOpen(newValue) {\n\t\t\t// A click outside both the menu and the root element hides the actions again\n\t\t\tif (!newValue && !this.hovered) {\n\t\t\t\tthis.displayActionsOnHoverFocus = false\n\t\t\t}\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.checkSlots()\n\t},\n\n\tupdated() {\n\t\tthis.checkSlots()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Handle link click\n\t\t *\n\t\t * @param {PointerEvent} event - Native click event\n\t\t * @param {Function} [navigate] - VueRouter link's navigate if any\n\t\t * @param {string} [routerLinkHref] - VueRouter link's href\n\t\t */\n\t\tonClick(event, navigate, routerLinkHref) {\n\t\t\t// Always forward native event\n\t\t\tthis.$emit('click', event)\n\t\t\t// Do not navigate with control keys - it is opening in a new tab\n\t\t\tif (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Prevent default link behaviour if it's a router-link and navigate manually\n\t\t\tif (routerLinkHref) {\n\t\t\t\tnavigate?.(event)\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\n\t\thandleMouseover() {\n\t\t\tthis.showActions()\n\t\t\tthis.hovered = true\n\t\t},\n\n\t\tshowActions() {\n\t\t\tif (this.hasActions) {\n\t\t\t\tthis.displayActionsOnHoverFocus = true\n\t\t\t}\n\t\t\tthis.hovered = false\n\t\t},\n\n\t\thideActions() {\n\t\t\tthis.displayActionsOnHoverFocus = false\n\t\t},\n\n\t\t/**\n\t\t * Show actions upon focus\n\t\t */\n\t\thandleFocus() {\n\t\t\tthis.focused = true\n\t\t\tthis.showActions()\n\t\t},\n\n\t\thandleBlur() {\n\t\t\tthis.focused = false\n\t\t},\n\n\t\t/**\n\t\t * Hide the actions on mouseleave unless the menu is open\n\t\t */\n\t\thandleMouseleave() {\n\t\t\tif (!this.menuOpen) {\n\t\t\t\tthis.displayActionsOnHoverFocus = false\n\t\t\t}\n\t\t\tthis.hovered = false\n\t\t},\n\n\t\t/**\n\t\t * This method checks if the root element of the component is focused and\n\t\t * if that's the case it focuses the actions button if available\n\t\t *\n\t\t * @param {Event} e the keydown event\n\t\t */\n\t\thandleTab(e) {\n\t\t\tif (this.focused && this.hasActions) {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.$refs.actions.$refs.menuButton.$el.focus()\n\t\t\t\tthis.focused = false\n\t\t\t} else {\n\t\t\t\tthis.displayActionsOnHoverFocus = false\n\t\t\t}\n\t\t},\n\n\t\thandleActionsUpdateOpen(e) {\n\t\t\tthis.menuOpen = e\n\t\t\tthis.$emit('update:menuOpen', e)\n\t\t},\n\n\t\t// Check if subname and actions slots are populated\n\t\tcheckSlots() {\n\t\t\tif (this.hasActions !== !!this.$slots.actions) {\n\t\t\t\tthis.hasActions = !!this.$slots.actions\n\t\t\t}\n\t\t\tif (this.hasSubname !== !!this.$slots.subname) {\n\t\t\t\tthis.hasSubname = !!this.$slots.subname\n\t\t\t}\n\t\t\tif (this.hasIndicator !== !!this.$slots.indicator) {\n\t\t\t\tthis.hasIndicator = !!this.$slots.indicator\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.list-item__wrapper {\n\tposition: relative;\n\twidth: 100%;\n\n\t&--active,\n\t&:active,\n\t&.active {\n\t\t.list-item {\n\t\t\tbackground-color: var(--color-primary-element);\n\t\t\t&:active,\n\t\t\t&:hover,\n\t\t\t&:focus,\n\t\t\t&:focus-visible {\n\t\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t\t}\n\t\t}\n\n\t\t.line-one__name, .line-one__details {\n\t\t\tcolor: var(--color-primary-element-text) !important;\n\t\t}\n\n\t\t.line-two__subname {\n\t\t\tcolor: var(--color-primary-element-text) !important;\n\t\t}\n\t}\n}\n\n// NcListItem\n.list-item {\n\tbox-sizing: border-box;\n\tdisplay: block;\n\tposition: relative;\n\tflex: 0 0 auto;\n\tjustify-content: flex-start;\n\tpadding: 8px 10px;\n\t// Fix for border-radius being too large for 3-line entries like in Mail\n\t// 44px avatar size / 2 + 8px padding, and 2px for better visual quality\n\tborder-radius: 32px;\n\tmargin: 2px 0;\n\twidth: 100%;\n\tcursor: pointer;\n\ttransition: background-color var(--animation-quick) ease-in-out;\n\tlist-style: none;\n\t&:active,\n\t&:hover,\n\t&:focus,\n\t&:focus-visible {\n\t\tbackground-color: var(--color-background-hover);\n\t}\n\n\t&-content__wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\theight: 48px;\n\n\t\t&--compact {\n\t\t\theight: 36px;\n\n\t\t\t.line-one, .line-two {\n\t\t\t\tmargin-top: -4px;\n\t\t\t\tmargin-bottom: -4px;\n\t\t\t}\n\t\t}\n\t}\n\n\t&-content {\n\t\tdisplay: flex;\n\t\tflex: 1 1 auto;\n\t\tjustify-content: space-between;\n\t\tpadding-left: 8px;\n\n\t\t&__main {\n\t\t\tflex: 1 1 auto;\n\t\t\twidth: 0;\n\t\t\tmargin: auto 0;\n\n\t\t\t&--oneline {\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\t&__actions {\n\t\t\tflex: 0 0 auto;\n\t\t\talign-self: center;\n\t\t\tjustify-content: center;\n\t\t\tmargin-left: 4px;\n\t\t}\n\t}\n\n\t&__extra {\n\t\tmargin-top: 4px;\n\t}\n}\n\n.line-one {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\twhite-space: nowrap;\n\tmargin: 0 auto 0 0;\n\toverflow: hidden;\n\n\t&__name {\n\t\toverflow: hidden;\n\t\tflex-grow: 1;\n\t\tcursor: pointer;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-main-text);\n\t\tfont-weight: bold;\n\t}\n\n\t&__details {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tmargin: 0 8px;\n\t\tfont-weight: normal;\n\t}\n}\n\n.line-two {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\twhite-space: nowrap;\n\t&--bold {\n\t\tfont-weight: bold;\n\t}\n\n\t&__subname {\n\t\toverflow: hidden;\n\t\tflex-grow: 1;\n\t\tcursor: pointer;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__additional_elements {\n\t\tmargin: 2px 4px 0 4px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t&__indicator {\n\t\tmargin: 0 5px;\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","NcActions","Components_NcCounterBubble","Components_NcVNodes","value","_l10n","newValue","event","navigate","routerLinkHref","e"],"mappings":";;;AAqaA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,WAAAC,EAAA;AAAA,IACA,iBAAAC;AAAA,IACA,UAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SA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A,KAAA,aACA,KAAA,6BAAA,KAEA,KAAA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,UAAAG,GAAA;AACA,MAAA,KAAA,WAAA,KAAA,cACAA,EAAA,eAAA,GACA,KAAA,MAAA,QAAA,MAAA,WAAA,IAAA,MAAA,GACA,KAAA,UAAA,MAEA,KAAA,6BAAA;AAAA,IAEA;AAAA,IAEA,wBAAAA,GAAA;AACA,WAAA,WAAAA,GACA,KAAA,MAAA,mBAAAA,CAAA;AAAA,IACA;AAAA;AAAA,IAGA,aAAA;AACA,MAAA,KAAA,eAAA,CAAA,CAAA,KAAA,OAAA,YACA,KAAA,aAAA,CAAA,CAAA,KAAA,OAAA,UAEA,KAAA,eAAA,CAAA,CAAA,KAAA,OAAA,YACA,KAAA,aAAA,CAAA,CAAA,KAAA,OAAA,UAEA,KAAA,iBAAA,CAAA,CAAA,KAAA,OAAA,cACA,KAAA,eAAA,CAAA,CAAA,KAAA,OAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcPasswordField-YvUbX2WS.cjs","sources":["../../node_modules/vue-material-design-icons/Eye.vue","../../node_modules/vue-material-design-icons/EyeOff.vue","../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-off-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeOffIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2022 Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @author Marco Ambrosini <marcoambrosini@pm.me>\n - @author Carl Schwan <carl@carlschwan.eu>\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### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField :value.sync=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField id=\"textField\"\n\t\t\t\t:value.sync=\"text2\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField id=\"textField2\"\n\t\t\t\t:value.sync=\"text3\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField :value.sync=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\" />\n\n\t\t<NcPasswordField :value.sync=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t}\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\tpadding-right: 14px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\t:type=\"isPasswordHidden ? 'password' : 'text'\"\n\t\t:trailing-button-label=\"trailingButtonLabelPassword\"\n\t\t:helper-text=\"computedHelperText\"\n\t\t:error=\"computedError\"\n\t\t:success=\"computedSuccess\"\n\t\t:minlength=\"rules.minlength\"\n\t\tv-on=\"$listeners\"\n\t\t@trailing-button-click=\"togglePasswordVisibility\"\n\t\t@input=\"handleInput\">\n\t\t<!-- Default slot for the leading icon -->\n\t\t<slot />\n\t\t<template #trailing-button-icon>\n\t\t\t<Eye v-if=\"isPasswordHidden\" :size=\"18\" />\n\t\t\t<EyeOff v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\n\nimport Eye from 'vue-material-design-icons/Eye.vue'\nimport EyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport debounce from 'debounce'\nimport axios from '@nextcloud/axios'\nimport { loadState } from '@nextcloud/initial-state'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { t } from '../../l10n.js'\nimport logger from '../../utils/logger.js'\n\n/**\n * @typedef PasswordPolicy\n * @property {object} api - The URLs to the password_policy app methods\n * @property {string} api.generate - The URL to the password generator\n * @property {string} api.validate - The URL to the password validator\n * @property {boolean} enforceNonCommonPassword - Whether to enforce non common passwords\n * @property {boolean} enforceNumericCharacters - Whether to enforce numeric characters\n * @property {boolean} enforceSpecialCharacters - Whether to enforce special characters\n * @property {boolean} enforceUpperLowerCase - Whether to enforce upper and lower case\n * @property {number} minLength - The minimum length of the password\n */\n\n/** @type {PasswordPolicy|null} */\nconst passwordPolicy = loadState('core', 'capabilities', {}).password_policy || null\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcPasswordField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tEye,\n\t\tEyeOff,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t// Redefined props\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\t showTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t// Removed NcInputField props, defined only by this component\n\n\t\ttrailingButtonLabel: undefined,\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Check if the user entered a valid password using the password_policy\n\t\t * app if available.\n\t\t *\n\t\t * Warning: this doesn't replace server side checking and will do nothing\n\t\t * if the password_policy app is disabled.\n\t\t */\n\t\tcheckPasswordStrength: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The minlength property defines the minimum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tminlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * The maxlength property defines the maximum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tmaxlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: [\n\t\t'valid',\n\t\t'invalid',\n\t\t'update:value',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tisPasswordHidden: true,\n\t\t\tinternalHelpMessage: '',\n\t\t\tisValid: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcomputedError() {\n\t\t\treturn this.error || this.isValid === false\n\t\t},\n\t\tcomputedSuccess() {\n\t\t\treturn this.success || this.isValid === true\n\t\t},\n\t\tcomputedHelperText() {\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\treturn this.helperText\n\t\t\t}\n\t\t\treturn this.internalHelpMessage\n\t\t},\n\n\t\trules() {\n\t\t\tconst { minlength } = this\n\t\t\treturn {\n\t\t\t\tminlength: minlength ?? passwordPolicy?.minLength,\n\t\t\t}\n\t\t},\n\n\t\ttrailingButtonLabelPassword() {\n\t\t\treturn this.isPasswordHidden ? t('Show password') : t('Hide password')\n\t\t},\n\n\t\tpropsAndAttrsToForward() {\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\tObject.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key)),\n\t\t\t\t),\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tvalue(newValue) {\n\t\t\tif (this.checkPasswordStrength) {\n\t\t\t\tif (passwordPolicy === null) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.checkPassword(newValue)\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\t/**\n\t\t\t * Triggers when the value inside the password field is\n\t\t\t * updated.\n\t\t\t *\n\t\t\t * @property {string} The new value\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t\ttogglePasswordVisibility() {\n\t\t\tthis.isPasswordHidden = !this.isPasswordHidden\n\t\t},\n\t\tcheckPassword: debounce(async function(password) {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password })\n\t\t\t\tthis.isValid = data.ocs.data.passed\n\t\t\t\tif (data.ocs.data.passed) {\n\t\t\t\t\tthis.internalHelpMessage = t('Password is secure')\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t\t * password entered is valid.\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('valid')\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.internalHelpMessage = data.ocs.data.reason\n\t\t\t\t/**\n\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t * password entered is invalid.\n\t\t\t\t */\n\t\t\t\tthis.$emit('invalid')\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Password policy returned an error', e)\n\t\t\t}\n\t\t}, 500),\n\t},\n}\n</script>\n"],"names":["_sfc_main","passwordPolicy","loadState","NcInputFieldProps","NcInputField","Eye","EyeOff","minlength","t","key","newValue","event","debounce","password","data","axios","generateOcsUrl","logger"],"mappings":";maAoBAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;qBChBAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,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A,GAAA,EAAA,UAAAH,GAAA;AAEA,YADA,KAAA,UAAAC,EAAA,IAAA,KAAA,QACAA,EAAA,IAAA,KAAA,QAAA;AACA,eAAA,sBAAAN,EAAA,EAAA,oBAAA,GAKA,KAAA,MAAA,OAAA;AACA;AAAA,QACA;AAEA,aAAA,sBAAAM,EAAA,IAAA,KAAA,QAKA,KAAA,MAAA,SAAA;AAAA,MACA,SAAA,GAAA;AACAG,QAAAA,SAAA,MAAA,qCAAA,CAAA;AAAA,MACA;AAAA,IACA,GAAA,GAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcPasswordField-fNiTJMmG.mjs","sources":["../../node_modules/vue-material-design-icons/Eye.vue","../../node_modules/vue-material-design-icons/EyeOff.vue","../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-off-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeOffIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2022 Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @author Marco Ambrosini <marcoambrosini@pm.me>\n - @author Carl Schwan <carl@carlschwan.eu>\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### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField :value.sync=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField id=\"textField\"\n\t\t\t\t:value.sync=\"text2\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField id=\"textField2\"\n\t\t\t\t:value.sync=\"text3\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField :value.sync=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\" />\n\n\t\t<NcPasswordField :value.sync=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t}\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\tpadding-right: 14px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\t:type=\"isPasswordHidden ? 'password' : 'text'\"\n\t\t:trailing-button-label=\"trailingButtonLabelPassword\"\n\t\t:helper-text=\"computedHelperText\"\n\t\t:error=\"computedError\"\n\t\t:success=\"computedSuccess\"\n\t\t:minlength=\"rules.minlength\"\n\t\tv-on=\"$listeners\"\n\t\t@trailing-button-click=\"togglePasswordVisibility\"\n\t\t@input=\"handleInput\">\n\t\t<!-- Default slot for the leading icon -->\n\t\t<slot />\n\t\t<template #trailing-button-icon>\n\t\t\t<Eye v-if=\"isPasswordHidden\" :size=\"18\" />\n\t\t\t<EyeOff v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\n\nimport Eye from 'vue-material-design-icons/Eye.vue'\nimport EyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport debounce from 'debounce'\nimport axios from '@nextcloud/axios'\nimport { loadState } from '@nextcloud/initial-state'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { t } from '../../l10n.js'\nimport logger from '../../utils/logger.js'\n\n/**\n * @typedef PasswordPolicy\n * @property {object} api - The URLs to the password_policy app methods\n * @property {string} api.generate - The URL to the password generator\n * @property {string} api.validate - The URL to the password validator\n * @property {boolean} enforceNonCommonPassword - Whether to enforce non common passwords\n * @property {boolean} enforceNumericCharacters - Whether to enforce numeric characters\n * @property {boolean} enforceSpecialCharacters - Whether to enforce special characters\n * @property {boolean} enforceUpperLowerCase - Whether to enforce upper and lower case\n * @property {number} minLength - The minimum length of the password\n */\n\n/** @type {PasswordPolicy|null} */\nconst passwordPolicy = loadState('core', 'capabilities', {}).password_policy || null\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcPasswordField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tEye,\n\t\tEyeOff,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t// Redefined props\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\t showTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t// Removed NcInputField props, defined only by this component\n\n\t\ttrailingButtonLabel: undefined,\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Check if the user entered a valid password using the password_policy\n\t\t * app if available.\n\t\t *\n\t\t * Warning: this doesn't replace server side checking and will do nothing\n\t\t * if the password_policy app is disabled.\n\t\t */\n\t\tcheckPasswordStrength: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The minlength property defines the minimum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tminlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * The maxlength property defines the maximum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tmaxlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: [\n\t\t'valid',\n\t\t'invalid',\n\t\t'update:value',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tisPasswordHidden: true,\n\t\t\tinternalHelpMessage: '',\n\t\t\tisValid: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcomputedError() {\n\t\t\treturn this.error || this.isValid === false\n\t\t},\n\t\tcomputedSuccess() {\n\t\t\treturn this.success || this.isValid === true\n\t\t},\n\t\tcomputedHelperText() {\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\treturn this.helperText\n\t\t\t}\n\t\t\treturn this.internalHelpMessage\n\t\t},\n\n\t\trules() {\n\t\t\tconst { minlength } = this\n\t\t\treturn {\n\t\t\t\tminlength: minlength ?? passwordPolicy?.minLength,\n\t\t\t}\n\t\t},\n\n\t\ttrailingButtonLabelPassword() {\n\t\t\treturn this.isPasswordHidden ? t('Show password') : t('Hide password')\n\t\t},\n\n\t\tpropsAndAttrsToForward() {\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\tObject.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key)),\n\t\t\t\t),\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tvalue(newValue) {\n\t\t\tif (this.checkPasswordStrength) {\n\t\t\t\tif (passwordPolicy === null) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.checkPassword(newValue)\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\t/**\n\t\t\t * Triggers when the value inside the password field is\n\t\t\t * updated.\n\t\t\t *\n\t\t\t * @property {string} The new value\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t\ttogglePasswordVisibility() {\n\t\t\tthis.isPasswordHidden = !this.isPasswordHidden\n\t\t},\n\t\tcheckPassword: debounce(async function(password) {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password })\n\t\t\t\tthis.isValid = data.ocs.data.passed\n\t\t\t\tif (data.ocs.data.passed) {\n\t\t\t\t\tthis.internalHelpMessage = t('Password is secure')\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t\t * password entered is valid.\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('valid')\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.internalHelpMessage = data.ocs.data.reason\n\t\t\t\t/**\n\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t * password entered is invalid.\n\t\t\t\t */\n\t\t\t\tthis.$emit('invalid')\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Password policy returned an error', e)\n\t\t\t}\n\t\t}, 500),\n\t},\n}\n</script>\n"],"names":["_sfc_main","passwordPolicy","loadState","NcInputFieldProps","NcInputField","Eye","EyeOff","minlength","t","key","newValue","event","debounce","password","data","axios","generateOcsUrl","e","logger"],"mappings":";;;;;;;;AAoBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;qBChBAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;AC2GA,MAAAC,IAAAC,EAAA,QAAA,gBAAA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,IACA,GAAA,GAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcPopover-EXxv8Pzw.cjs","sources":["../../src/components/NcPopover/NcPopoverTriggerProvider.vue","../../src/components/NcPopover/NcPopover.vue"],"sourcesContent":["<script>\nimport { computed, defineComponent } from 'vue'\n\nexport default defineComponent({\n\tname: 'NcPopoverTriggerProvider',\n\n\tprovide() {\n\t\treturn {\n\t\t\t'NcPopover:trigger:shown': computed(() => this.shown),\n\t\t\t'NcPopover:trigger:attrs': computed(() => this.triggerAttrs),\n\t\t}\n\t},\n\n\tprops: {\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\ttriggerAttrs() {\n\t\t\treturn {\n\t\t\t\t'aria-haspopup': this.popupRole,\n\t\t\t\t'aria-expanded': this.shown.toString(),\n\t\t\t}\n\t\t},\n\t},\n\n\trender() {\n\t\t// TODO: Vue 3 - replace with $slots\n\t\treturn this.$scopedSlots.default?.({\n\t\t\tattrs: this.triggerAttrs,\n\t\t})\n\t},\n})\n</script>\n","<!--\n - @copyright Copyright (c) 2019 Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @author Marco Ambrosini <marcoambrosini@icloud.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<docs>\n\n### General description\n\nThis component is just a wrapper for the floating-vue plugin by Akryum,\nplease refer to this documentation for customization:\nhttps://github.com/Akryum/floating-vue\n\nThis components has two slots:\n* 'trigger' which can be any html element and it will trigger the popover\nthis slot is optional since you can toggle the popover also by updating the\nopen prop on this component;\n\n* a default slot that is for the content of the popover.\n\n### Examples\n\n#### With a `<NcButton>` as a trigger:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\t<form tabindex=\"0\" role=\"dialog\" aria-labelledby=\"popover-example-dialog-header-1\" @submit.prevent>\n\t\t\t\t\t<h2 id=\"popover-example-dialog-header-1\">this is some content</h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. <br/>\n\t\t\t\t\t\tVestibulum eget placerat velit.\n\t\t\t\t\t</p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\tLabel element\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"input element\"/>\n\t\t\t\t\t</label>\n\t\t\t\t</form>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Without focus trap:\n\nThe [`focus-trap`](https://github.com/focus-trap/focus-trap) emits an error when used in a non-focusable element tree.\n\nThe prop `:focus-trap=\"false\"` help to prevent it when the default behavior is not relevant.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover :focus-trap=\"false\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Click me!</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With passing props to `floating-vue`'s `Dropdown`:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover container=\"body\" :popper-hide-triggers=\"(triggers) => [...triggers, 'click']\" popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template #default>\n\t\t\t\t<NcButton>Click on the button will close NcPopover</NcButton>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With a custom button in as a trigger:\n\nWhen `<NcButton>` is used as a `<NcPopover>` trigger, it injects required for a11y attributes to the button.\n\nIf you are using your own custom button as a trigger make sure to bind `attrs` from the trigger slot props.\nSee code example below.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover>\n\t\t\t<!-- Take \"attrs\" from the slot props -->\n\t\t\t<template #trigger=\"{ attrs }\">\n\t\t\t\t<!-- Bind attrs as the button attrs -->\n\t\t\t\t<button v-bind=\"attrs\">\n\t\t\t\t\tI am a custom button in the trigger\n\t\t\t\t</button>\n\t\t\t</template>\n\n\t\t\tHi! 🚀\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Provide role for the popover content\n\nFor accessibility reasons, popover should have a role. Provide it to the `popup-role` and make sure that the popover content is an element with the same role.\n\nSee: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<!-- Provide popup role -->\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Delete</NcButton>\n\t\t\t</template>\n\n\t\t\t<!-- Popover content should has the same role -->\n\t\t\t<div role=\"dialog\" aria-labelledby=\"popover-example-custom-role-1\">\n\t\t\t\t<!-- This is not required but better to provide a label -->\n\t\t\t\t<header id=\"popover-example-custom-role-1\">\n\t\t\t\t\t<strong>Confirm remove</strong>\n\t\t\t\t</header>\n\t\t\t\t<NcButton type=\"danger\">Delete</NcButton>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n</docs>\n\n<template>\n\t<Dropdown ref=\"popover\"\n\t\t:shown.sync=\"shownProxy\"\n\t\t:distance=\"10\"\n\t\t:arrow-padding=\"10\"\n\t\tv-bind=\"$attrs\"\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:popper-class=\"popoverBaseClass\"\n\t\tv-on=\"$listeners\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popup-role=\"popupRole\">\n\t\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t\t<slot name=\"trigger\" v-bind=\"slotProps\" />\n\t\t</NcPopoverTriggerProvider>\n\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper>\n\t\t\t<slot />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { Dropdown } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\n\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t\tNcPopoverTriggerProvider,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Show or hide the popper\n\t\t * @see https://floating-vue.starpad.dev/api/#shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Popup role\n\t\t * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: 'true',\n\t\t\tvalidator: (value) => ['menu', 'listbox', 'tree', 'grid', 'dialog', 'true'].includes(value),\n\t\t},\n\n\t\tpopoverBaseClass: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Enable popover focus trap\n\t\t */\n\t\tfocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\t/**\n\t\t * Set element to return focus to after focus trap deactivation\n\t\t *\n\t\t * @type {import('focus-trap').FocusTargetValueOrFalse}\n\t\t */\n\t\tsetReturnFocus: {\n\t\t\tdefault: undefined,\n\t\t\ttype: [HTMLElement, SVGElement, String, Boolean],\n\t\t},\n\t},\n\n\temits: [\n\t\t'after-show',\n\t\t'after-hide',\n\t\t/**\n\t\t * @see https://floating-vue.starpad.dev/api/#update-shown\n\t\t */\n\t\t'update:shown',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalShown: this.shown,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tshownProxy: {\n\t\t\tget() {\n\t\t\t\treturn this.shown\n\t\t\t},\n\t\t\tset(value) {\n\t\t\t\tthis.internalShown = value\n\t\t\t\tthis.$emit('update:shown', value)\n\t\t\t},\n\t\t},\n\t},\n\n\twatch: {\n\t\tshown(value) {\n\t\t\tthis.internalShown = value\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.checkTriggerA11y()\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.clearFocusTrap()\n\t\tthis.clearEscapeStopPropagation()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Check if the trigger has all required a11y attributes.\n\t\t * Important to check custom trigger button.\n\t\t */\n\t\tcheckTriggerA11y() {\n\t\t\tif (window.OC?.debug) {\n\t\t\t\t// TODO: Vue 3: should be\n\t\t\t\t// this.$refs.popover.$refs.popper.$refs.reference\n\t\t\t\tconst triggerContainer = this.$refs.popover.$refs.reference\n\t\t\t\tconst requiredTriggerButton = triggerContainer.querySelector('[aria-expanded][aria-haspopup]')\n\t\t\t\tif (!requiredTriggerButton) {\n\t\t\t\t\tVue.util.warn('It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverContentElement() {\n\t\t\treturn this.$refs.popover?.$refs.popperContent?.$el\n\t\t},\n\n\t\t/**\n\t\t * Add focus trap for accessibility.\n\t\t */\n\t\tasync useFocusTrap() {\n\t\t\tawait this.$nextTick()\n\n\t\t\tif (!this.focusTrap) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst el = this.getPopoverContentElement()\n\n\t\t\tif (!el) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Init focus trap\n\t\t\tthis.$focusTrap = createFocusTrap(el, {\n\t\t\t\t// Prevents to lose focus using esc key\n\t\t\t\t// Focus will be release when popover be hide\n\t\t\t\tescapeDeactivates: false,\n\t\t\t\tallowOutsideClick: true,\n\t\t\t\tsetReturnFocus: this.setReturnFocus,\n\t\t\t\ttrapStack: getTrapStack(),\n\t\t\t})\n\t\t\tthis.$focusTrap.activate()\n\t\t},\n\n\t\t/**\n\t\t * Remove focus trap\n\t\t *\n\t\t * @param {object} options The configuration options for focusTrap\n\t\t */\n\t\tclearFocusTrap(options = {}) {\n\t\t\ttry {\n\t\t\t\tthis.$focusTrap?.deactivate(options)\n\t\t\t\tthis.$focusTrap = null\n\t\t\t} catch (err) {\n\t\t\t\tconsole.warn(err)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add stopPropagation for Escape.\n\t\t * It prevents global Escape handling after closing popover.\n\t\t *\n\t\t * Manual event handling is used here instead of v-on because there is no direct access to the node.\n\t\t * Alternative - wrap <template #popover> in a div wrapper.\n\t\t */\n\t\taddEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.addEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * Remove stop Escape handler\n\t\t */\n\t\tclearEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.removeEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * @param {KeyboardEvent} event - native keydown event\n\t\t */\n\t\tstopKeydownEscapeHandler(event) {\n\t\t\tif (event.type === 'keydown' && event.key === 'Escape') {\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\n\t\tafterShow() {\n\t\t\t/**\n\t\t\t * Triggered after the tooltip was visually displayed.\n\t\t\t *\n\t\t\t * This is different from the 'show' and 'apply-show' which\n\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t */\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$emit('after-show')\n\t\t\t\tthis.useFocusTrap()\n\t\t\t\tthis.addEscapeStopPropagation()\n\t\t\t})\n\t\t},\n\t\tafterHide() {\n\t\t\t/**\n\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t */\n\t\t\tthis.$emit('after-hide')\n\t\t\tthis.clearFocusTrap()\n\t\t\tthis.clearEscapeStopPropagation()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n\n.resize-observer {\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\tz-index:-1;\n\twidth:100%;\n\theight:100%;\n\tborder:none;\n\tbackground-color:transparent;\n\tpointer-events:none;\n\tdisplay:block;\n\toverflow:hidden;\n\topacity:0\n}\n\n.resize-observer object {\n\tdisplay:block;\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\theight:100%;\n\twidth:100%;\n\toverflow:hidden;\n\tpointer-events:none;\n\tz-index:-1\n}\n\n$arrow-width: 10px;\n\n.v-popper--theme-dropdown {\n\t&.v-popper__popper {\n\t\tz-index: 100000;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tdisplay: block !important;\n\n\t\tfilter: drop-shadow(0 1px 10px var(--color-box-shadow));\n\n\t\t.v-popper__inner {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t.v-popper__arrow-container {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-color: transparent;\n\t\t\tborder-width: $arrow-width;\n\t\t}\n\n\t\t&[data-popper-placement^='top'] .v-popper__arrow-container {\n\t\t\tbottom: -$arrow-width;\n\t\t\tborder-bottom-width: 0;\n\t\t\tborder-top-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='bottom'] .v-popper__arrow-container {\n\t\t\ttop: -$arrow-width;\n\t\t\tborder-top-width: 0;\n\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='right'] .v-popper__arrow-container {\n\t\t\tleft: -$arrow-width;\n\t\t\tborder-left-width: 0;\n\t\t\tborder-right-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='left'] .v-popper__arrow-container {\n\t\t\tright: -$arrow-width;\n\t\t\tborder-right-width: 0;\n\t\t\tborder-left-color: var(--color-main-background);\n\t\t}\n\n\t\t&[aria-hidden='true'] {\n\t\t\tvisibility: hidden;\n\t\t\ttransition: opacity var(--animation-quick), visibility var(--animation-quick);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&[aria-hidden='false'] {\n\t\t\tvisibility: visible;\n\t\t\ttransition: opacity var(--animation-quick);\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main$1","Vue","_sfc_main","floatingVue","NcPopoverTriggerProvider","value","Vue__default","el","focusTrap","focusTrap$1","options","err","event"],"mappings":";+PAGAA,IAAAC,EAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,UAAA;AACA,WAAA;AAAA,MACA,2BAAAA,EAAA,SAAA,MAAA,KAAA,KAAA;AAAA,MACA,2BAAAA,EAAA,SAAA,MAAA,KAAA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,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,iBAAA,WAAA,KAAA,wBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,6BAAA;AAEA,MADA,KAAA,yBAAA,GACA,oBAAA,WAAA,KAAA,wBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,yBAAAC,GAAA;AACA,MAAAA,EAAA,SAAA,aAAAA,EAAA,QAAA,YACAA,EAAA,gBAAA;AAAA,IAEA;AAAA,IAEA,YAAA;AAQA,WAAA,UAAA,MAAA;AACA,aAAA,MAAA,YAAA,GACA,KAAA,aAAA,GACA,KAAA,yBAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IACA,YAAA;AAIA,WAAA,MAAA,YAAA,GACA,KAAA,eAAA,GACA,KAAA,2BAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcPopover-NyUZ2r7V.mjs","sources":["../../src/components/NcPopover/NcPopoverTriggerProvider.vue","../../src/components/NcPopover/NcPopover.vue"],"sourcesContent":["<script>\nimport { computed, defineComponent } from 'vue'\n\nexport default defineComponent({\n\tname: 'NcPopoverTriggerProvider',\n\n\tprovide() {\n\t\treturn {\n\t\t\t'NcPopover:trigger:shown': computed(() => this.shown),\n\t\t\t'NcPopover:trigger:attrs': computed(() => this.triggerAttrs),\n\t\t}\n\t},\n\n\tprops: {\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\ttriggerAttrs() {\n\t\t\treturn {\n\t\t\t\t'aria-haspopup': this.popupRole,\n\t\t\t\t'aria-expanded': this.shown.toString(),\n\t\t\t}\n\t\t},\n\t},\n\n\trender() {\n\t\t// TODO: Vue 3 - replace with $slots\n\t\treturn this.$scopedSlots.default?.({\n\t\t\tattrs: this.triggerAttrs,\n\t\t})\n\t},\n})\n</script>\n","<!--\n - @copyright Copyright (c) 2019 Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @author Marco Ambrosini <marcoambrosini@icloud.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<docs>\n\n### General description\n\nThis component is just a wrapper for the floating-vue plugin by Akryum,\nplease refer to this documentation for customization:\nhttps://github.com/Akryum/floating-vue\n\nThis components has two slots:\n* 'trigger' which can be any html element and it will trigger the popover\nthis slot is optional since you can toggle the popover also by updating the\nopen prop on this component;\n\n* a default slot that is for the content of the popover.\n\n### Examples\n\n#### With a `<NcButton>` as a trigger:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\t<form tabindex=\"0\" role=\"dialog\" aria-labelledby=\"popover-example-dialog-header-1\" @submit.prevent>\n\t\t\t\t\t<h2 id=\"popover-example-dialog-header-1\">this is some content</h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. <br/>\n\t\t\t\t\t\tVestibulum eget placerat velit.\n\t\t\t\t\t</p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\tLabel element\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"input element\"/>\n\t\t\t\t\t</label>\n\t\t\t\t</form>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Without focus trap:\n\nThe [`focus-trap`](https://github.com/focus-trap/focus-trap) emits an error when used in a non-focusable element tree.\n\nThe prop `:focus-trap=\"false\"` help to prevent it when the default behavior is not relevant.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover :focus-trap=\"false\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Click me!</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With passing props to `floating-vue`'s `Dropdown`:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover container=\"body\" :popper-hide-triggers=\"(triggers) => [...triggers, 'click']\" popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template #default>\n\t\t\t\t<NcButton>Click on the button will close NcPopover</NcButton>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With a custom button in as a trigger:\n\nWhen `<NcButton>` is used as a `<NcPopover>` trigger, it injects required for a11y attributes to the button.\n\nIf you are using your own custom button as a trigger make sure to bind `attrs` from the trigger slot props.\nSee code example below.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover>\n\t\t\t<!-- Take \"attrs\" from the slot props -->\n\t\t\t<template #trigger=\"{ attrs }\">\n\t\t\t\t<!-- Bind attrs as the button attrs -->\n\t\t\t\t<button v-bind=\"attrs\">\n\t\t\t\t\tI am a custom button in the trigger\n\t\t\t\t</button>\n\t\t\t</template>\n\n\t\t\tHi! 🚀\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Provide role for the popover content\n\nFor accessibility reasons, popover should have a role. Provide it to the `popup-role` and make sure that the popover content is an element with the same role.\n\nSee: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<!-- Provide popup role -->\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Delete</NcButton>\n\t\t\t</template>\n\n\t\t\t<!-- Popover content should has the same role -->\n\t\t\t<div role=\"dialog\" aria-labelledby=\"popover-example-custom-role-1\">\n\t\t\t\t<!-- This is not required but better to provide a label -->\n\t\t\t\t<header id=\"popover-example-custom-role-1\">\n\t\t\t\t\t<strong>Confirm remove</strong>\n\t\t\t\t</header>\n\t\t\t\t<NcButton type=\"danger\">Delete</NcButton>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n</docs>\n\n<template>\n\t<Dropdown ref=\"popover\"\n\t\t:shown.sync=\"shownProxy\"\n\t\t:distance=\"10\"\n\t\t:arrow-padding=\"10\"\n\t\tv-bind=\"$attrs\"\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:popper-class=\"popoverBaseClass\"\n\t\tv-on=\"$listeners\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popup-role=\"popupRole\">\n\t\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t\t<slot name=\"trigger\" v-bind=\"slotProps\" />\n\t\t</NcPopoverTriggerProvider>\n\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper>\n\t\t\t<slot />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { Dropdown } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\n\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t\tNcPopoverTriggerProvider,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Show or hide the popper\n\t\t * @see https://floating-vue.starpad.dev/api/#shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Popup role\n\t\t * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: 'true',\n\t\t\tvalidator: (value) => ['menu', 'listbox', 'tree', 'grid', 'dialog', 'true'].includes(value),\n\t\t},\n\n\t\tpopoverBaseClass: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Enable popover focus trap\n\t\t */\n\t\tfocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\t/**\n\t\t * Set element to return focus to after focus trap deactivation\n\t\t *\n\t\t * @type {import('focus-trap').FocusTargetValueOrFalse}\n\t\t */\n\t\tsetReturnFocus: {\n\t\t\tdefault: undefined,\n\t\t\ttype: [HTMLElement, SVGElement, String, Boolean],\n\t\t},\n\t},\n\n\temits: [\n\t\t'after-show',\n\t\t'after-hide',\n\t\t/**\n\t\t * @see https://floating-vue.starpad.dev/api/#update-shown\n\t\t */\n\t\t'update:shown',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalShown: this.shown,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tshownProxy: {\n\t\t\tget() {\n\t\t\t\treturn this.shown\n\t\t\t},\n\t\t\tset(value) {\n\t\t\t\tthis.internalShown = value\n\t\t\t\tthis.$emit('update:shown', value)\n\t\t\t},\n\t\t},\n\t},\n\n\twatch: {\n\t\tshown(value) {\n\t\t\tthis.internalShown = value\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.checkTriggerA11y()\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.clearFocusTrap()\n\t\tthis.clearEscapeStopPropagation()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Check if the trigger has all required a11y attributes.\n\t\t * Important to check custom trigger button.\n\t\t */\n\t\tcheckTriggerA11y() {\n\t\t\tif (window.OC?.debug) {\n\t\t\t\t// TODO: Vue 3: should be\n\t\t\t\t// this.$refs.popover.$refs.popper.$refs.reference\n\t\t\t\tconst triggerContainer = this.$refs.popover.$refs.reference\n\t\t\t\tconst requiredTriggerButton = triggerContainer.querySelector('[aria-expanded][aria-haspopup]')\n\t\t\t\tif (!requiredTriggerButton) {\n\t\t\t\t\tVue.util.warn('It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverContentElement() {\n\t\t\treturn this.$refs.popover?.$refs.popperContent?.$el\n\t\t},\n\n\t\t/**\n\t\t * Add focus trap for accessibility.\n\t\t */\n\t\tasync useFocusTrap() {\n\t\t\tawait this.$nextTick()\n\n\t\t\tif (!this.focusTrap) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst el = this.getPopoverContentElement()\n\n\t\t\tif (!el) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Init focus trap\n\t\t\tthis.$focusTrap = createFocusTrap(el, {\n\t\t\t\t// Prevents to lose focus using esc key\n\t\t\t\t// Focus will be release when popover be hide\n\t\t\t\tescapeDeactivates: false,\n\t\t\t\tallowOutsideClick: true,\n\t\t\t\tsetReturnFocus: this.setReturnFocus,\n\t\t\t\ttrapStack: getTrapStack(),\n\t\t\t})\n\t\t\tthis.$focusTrap.activate()\n\t\t},\n\n\t\t/**\n\t\t * Remove focus trap\n\t\t *\n\t\t * @param {object} options The configuration options for focusTrap\n\t\t */\n\t\tclearFocusTrap(options = {}) {\n\t\t\ttry {\n\t\t\t\tthis.$focusTrap?.deactivate(options)\n\t\t\t\tthis.$focusTrap = null\n\t\t\t} catch (err) {\n\t\t\t\tconsole.warn(err)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add stopPropagation for Escape.\n\t\t * It prevents global Escape handling after closing popover.\n\t\t *\n\t\t * Manual event handling is used here instead of v-on because there is no direct access to the node.\n\t\t * Alternative - wrap <template #popover> in a div wrapper.\n\t\t */\n\t\taddEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.addEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * Remove stop Escape handler\n\t\t */\n\t\tclearEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.removeEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * @param {KeyboardEvent} event - native keydown event\n\t\t */\n\t\tstopKeydownEscapeHandler(event) {\n\t\t\tif (event.type === 'keydown' && event.key === 'Escape') {\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\n\t\tafterShow() {\n\t\t\t/**\n\t\t\t * Triggered after the tooltip was visually displayed.\n\t\t\t *\n\t\t\t * This is different from the 'show' and 'apply-show' which\n\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t */\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$emit('after-show')\n\t\t\t\tthis.useFocusTrap()\n\t\t\t\tthis.addEscapeStopPropagation()\n\t\t\t})\n\t\t},\n\t\tafterHide() {\n\t\t\t/**\n\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t */\n\t\t\tthis.$emit('after-hide')\n\t\t\tthis.clearFocusTrap()\n\t\t\tthis.clearEscapeStopPropagation()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n\n.resize-observer {\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\tz-index:-1;\n\twidth:100%;\n\theight:100%;\n\tborder:none;\n\tbackground-color:transparent;\n\tpointer-events:none;\n\tdisplay:block;\n\toverflow:hidden;\n\topacity:0\n}\n\n.resize-observer object {\n\tdisplay:block;\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\theight:100%;\n\twidth:100%;\n\toverflow:hidden;\n\tpointer-events:none;\n\tz-index:-1\n}\n\n$arrow-width: 10px;\n\n.v-popper--theme-dropdown {\n\t&.v-popper__popper {\n\t\tz-index: 100000;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tdisplay: block !important;\n\n\t\tfilter: drop-shadow(0 1px 10px var(--color-box-shadow));\n\n\t\t.v-popper__inner {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t.v-popper__arrow-container {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-color: transparent;\n\t\t\tborder-width: $arrow-width;\n\t\t}\n\n\t\t&[data-popper-placement^='top'] .v-popper__arrow-container {\n\t\t\tbottom: -$arrow-width;\n\t\t\tborder-bottom-width: 0;\n\t\t\tborder-top-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='bottom'] .v-popper__arrow-container {\n\t\t\ttop: -$arrow-width;\n\t\t\tborder-top-width: 0;\n\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='right'] .v-popper__arrow-container {\n\t\t\tleft: -$arrow-width;\n\t\t\tborder-left-width: 0;\n\t\t\tborder-right-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='left'] .v-popper__arrow-container {\n\t\t\tright: -$arrow-width;\n\t\t\tborder-right-width: 0;\n\t\t\tborder-left-color: var(--color-main-background);\n\t\t}\n\n\t\t&[aria-hidden='true'] {\n\t\t\tvisibility: hidden;\n\t\t\ttransition: opacity var(--animation-quick), visibility var(--animation-quick);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&[aria-hidden='false'] {\n\t\t\tvisibility: visible;\n\t\t\ttransition: opacity var(--animation-quick);\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main$1","defineComponent","computed","_sfc_main","Dropdown","NcPopoverTriggerProvider","value","Vue","el","createFocusTrap","getTrapStack","options","err","event"],"mappings":";;;;;;AAGA,MAAAA,IAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EAEA,UAAA;AACA,WAAA;AAAA,MACA,2BAAAC,EAAA,MAAA,KAAA,KAAA;AAAA,MACA,2BAAAA,EAAA,MAAA,KAAA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,eAAA;AACA,aAAA;AAAA,QACA,iBAAA,KAAA;AAAA,QACA,iBAAA,KAAA,MAAA,SAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAEA,WAAA,KAAA,aAAA,UAAA;AAAA,MACA,OAAA,KAAA;AAAA,IACA,CAAA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;qBCoJAC,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,0BAAAC;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,CAAA,QAAA,WAAA,QAAA,QAAA,UAAA,MAAA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AAAA,MACA,MAAA;A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A,QAGA,mBAAA;AAAA,QACA,mBAAA;AAAA,QACA,gBAAA,KAAA;AAAA,QACA,WAAAE,EAAA;AAAA,MACA,CAAA,GACA,KAAA,WAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,eAAAC,IAAA,CAAA,GAAA;AACA,UAAA;AACA,aAAA,YAAA,WAAAA,CAAA,GACA,KAAA,aAAA;AAAA,MACA,SAAAC,GAAA;AACA,gBAAA,KAAAA,CAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,2BAAA;AAEA,MADA,KAAA,yBAAA,GACA,iBAAA,WAAA,KAAA,wBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,6BAAA;AAEA,MADA,KAAA,yBAAA,GACA,oBAAA,WAAA,KAAA,wBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,yBAAAC,GAAA;AACA,MAAAA,EAAA,SAAA,aAAAA,EAAA,QAAA,YACAA,EAAA,gBAAA;AAAA,IAEA;AAAA,IAEA,YAAA;AAQA,WAAA,UAAA,MAAA;AACA,aAAA,MAAA,YAAA,GACA,KAAA,aAAA,GACA,KAAA,yBAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IACA,YAAA;AAIA,WAAA,MAAA,YAAA,GACA,KAAA,eAAA,GACA,KAAA,2BAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcRichText-7CHftQ4Z.mjs","sources":["../../src/components/NcRichText/helpers.js","../../src/components/NcRichText/NcReferenceList.vue","../../src/components/NcRichText/autolink.js","../../src/components/NcRichText/placeholder.js","../../src/components/NcRichText/NcRichText.vue"],"sourcesContent":["/**\n * Regex pattern to match links to be resolved by the link-reference provider\n *\n * @type {RegExp}\n */\nexport const URL_PATTERN = /(\\s|^)(https?:\\/\\/)((?:[-A-Z0-9+_]+\\.)+[-A-Z]+(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\\s|$)/ig\n\n/**\n * Regex pattern to identify strings as links and then making them clickable\n * Opposed to the above regex this one also matches IP addresses, which we would like to be clickable,\n * but in general resolving references for them might mostly not work,\n * as the link provider checks for local addresses and does not resolve them.\n *\n * @type {RegExp}\n */\nexport const URL_PATTERN_AUTOLINK = /(\\s|\\(|^)((https?:\\/\\/)((?:[-A-Z0-9+_]+\\.)+[-A-Z0-9]+(?::[0-9]+)?(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\\s|\\)|$)/ig\n","<template>\n\t<div v-if=\"isVisible\" class=\"widgets--list\" :class=\"{'icon-loading': loading }\">\n\t\t<div v-for=\"reference in displayedReferences\" :key=\"reference?.openGraphObject?.id\">\n\t\t\t<NcReferenceWidget :reference=\"reference\" />\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport NcReferenceWidget from './NcReferenceWidget.vue'\nimport { URL_PATTERN } from './helpers.js'\n\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\n\nexport default {\n\tname: 'NcReferenceList',\n\tcomponents: {\n\t\tNcReferenceWidget,\n\t},\n\tprops: {\n\t\ttext: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\treferenceData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t\tlimit: {\n\t\t\ttype: Number,\n\t\t\tdefault: 1,\n\t\t},\n\t\tdisplayFallback: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\treferences: null,\n\t\t\tloading: true,\n\t\t}\n\t},\n\tcomputed: {\n\t\tisVisible() {\n\t\t\treturn this.loading || this.displayedReferences.length !== 0\n\t\t},\n\t\tvalues() {\n\t\t\tif (this.referenceData) {\n\t\t\t\treturn this.referenceData\n\t\t\t}\n\n\t\t\tif (this.displayFallback && !this.loading && !this.references) {\n\t\t\t\treturn [this.fallbackReference]\n\t\t\t}\n\n\t\t\treturn this.references ? Object.values(this.references) : []\n\t\t},\n\t\tfirstReference() {\n\t\t\treturn this.values[0] ?? null\n\t\t},\n\t\tdisplayedReferences() {\n\t\t\treturn this.values.slice(0, this.limit)\n\t\t},\n\t\tfallbackReference() {\n\t\t\treturn {\n\t\t\t\taccessible: true,\n\t\t\t\topenGraphObject: {\n\t\t\t\t\tid: this.text,\n\t\t\t\t\tlink: this.text,\n\t\t\t\t\tname: this.text,\n\t\t\t\t},\n\t\t\t\trichObjectType: 'open-graph',\n\t\t\t}\n\t\t},\n\t},\n\twatch: {\n\t\ttext: 'fetch',\n\t},\n\tmounted() {\n\t\tthis.fetch()\n\t},\n\tmethods: {\n\t\tfetch() {\n\t\t\tthis.loading = true\n\t\t\tif (this.referenceData) {\n\t\t\t\tthis.loading = false\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (!(new RegExp(URL_PATTERN).exec(this.text))) {\n\t\t\t\tthis.loading = false\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.resolve().then((response) => {\n\t\t\t\tthis.references = response.data.ocs.data.references\n\t\t\t\tthis.loading = false\n\t\t\t\tthis.$emit('loaded')\n\t\t\t}).catch((error) => {\n\t\t\t\tconsole.error('Failed to extract references', error)\n\t\t\t\tthis.loading = false\n\t\t\t\tthis.$emit('loaded')\n\t\t\t})\n\t\t},\n\t\tresolve() {\n\t\t\tconst match = (new RegExp(URL_PATTERN).exec(this.text.trim()))\n\t\t\tif (this.limit === 1 && match) {\n\t\t\t\treturn axios.get(generateOcsUrl('references/resolve', 2) + `?reference=${encodeURIComponent(match[0])}`)\n\t\t\t}\n\n\t\t\treturn axios.post(generateOcsUrl('references/extract', 2), {\n\t\t\t\ttext: this.text,\n\t\t\t\tresolve: true,\n\t\t\t\tlimit: this.limit,\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.widgets--list.icon-loading {\n\tmin-height: 44px;\n}\n</style>\n","import { URL_PATTERN_AUTOLINK } from './helpers.js'\n\nimport { visit, SKIP } from 'unist-util-visit'\nimport { u } from 'unist-builder'\n\nconst NcLink = {\n\tname: 'NcLink',\n\tprops: {\n\t\thref: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\trender(h) {\n\t\treturn h('a', {\n\t\t\tattrs: {\n\t\t\t\thref: this.href,\n\t\t\t\trel: 'noopener noreferrer',\n\t\t\t\ttarget: '_blank',\n\t\t\t\tclass: 'rich-text--external-link',\n\t\t\t},\n\t\t}, [this.href.trim()])\n\t},\n}\n\nexport const remarkAutolink = function({ autolink, useMarkdown, useExtendedMarkdown }) {\n\treturn function(tree) {\n\t\t// remark-gfm has its own autolink parser which can not be disabled\n\t\t// and thus a local one is not needed\n\t\tif (useExtendedMarkdown || !useMarkdown || !autolink) {\n\t\t\treturn\n\t\t}\n\n\t\tvisit(tree, (node) => node.type === 'text', (node, index, parent) => {\n\t\t\tlet parsed = parseUrl(node.value)\n\t\t\tparsed = parsed.map((n) => {\n\t\t\t\tif (typeof n === 'string') {\n\t\t\t\t\treturn u('text', n)\n\t\t\t\t}\n\n\t\t\t\treturn u('link', {\n\t\t\t\t\turl: n.props.href,\n\t\t\t\t}, [u('text', n.props.href)])\n\t\t\t}).filter((x) => x)\n\n\t\t\tparent.children.splice(index, 1, ...parsed.flat())\n\t\t\treturn [SKIP, index + parsed.flat().length]\n\t\t})\n\t}\n}\n\nexport const parseUrl = (text) => {\n\tlet match = URL_PATTERN_AUTOLINK.exec(text)\n\tconst list = []\n\tlet start = 0\n\twhile (match !== null) {\n\t\tlet href = match[2]\n\t\tlet textAfter\n\t\tlet textBefore = text.substring(start, match.index + match[1].length)\n\t\tif (href[0] === ' ') {\n\t\t\ttextBefore += href[0]\n\t\t\thref = href.substring(1).trim()\n\t\t}\n\t\tconst lastChar = href[(href.length - 1)]\n\t\tif (lastChar === '.' || lastChar === ',' || lastChar === ';' || (match[0][0] === '(' && lastChar === ')')) {\n\t\t\thref = href.substring(0, href.length - 1)\n\t\t\ttextAfter = lastChar\n\t\t}\n\t\tlist.push(textBefore)\n\t\tlist.push({ component: NcLink, props: { href } })\n\t\tif (textAfter) {\n\t\t\tlist.push(textAfter)\n\t\t}\n\t\tstart = match.index + match[0].length\n\t\tmatch = URL_PATTERN_AUTOLINK.exec(text)\n\t}\n\tlist.push(text.substring(start))\n\tconst joinedText = list.map((item) => typeof item === 'string' ? item : item.props.href).join('')\n\tif (text === joinedText) {\n\t\treturn list\n\t}\n\tconsole.error('Failed to reassemble the chunked text: ' + text)\n\treturn text\n}\n","import { parseUrl } from './autolink.js'\n\nimport { visit } from 'unist-util-visit'\nimport { u } from 'unist-builder'\n\nexport const remarkPlaceholder = function() {\n\treturn function(ast) {\n\t\tvisit(ast, (node) => node.type === 'text', visitor)\n\n\t\t/**\n\t\t *\n\t\t * @param {object} node The node\n\t\t * @param {number} index The index of the node\n\t\t * @param {object} parent The parent node\n\t\t */\n\t\tfunction visitor(node, index, parent) {\n\t\t\tconst placeholders = node.value.split(/(\\{[a-z\\-_.0-9]+\\})/ig)\n\t\t\t\t.map((entry, index, list) => {\n\t\t\t\t\tconst matches = entry.match(/^\\{([a-z\\-_.0-9]+)\\}$/i)\n\t\t\t\t\tif (!matches) {\n\t\t\t\t\t\treturn u('text', entry)\n\t\t\t\t\t}\n\t\t\t\t\tconst [, component] = matches\n\t\t\t\t\treturn u('element', {\n\t\t\t\t\t\ttagName: `#${component}`,\n\t\t\t\t\t})\n\t\t\t\t})\n\n\t\t\tparent.children.splice(index, 1, ...placeholders)\n\t\t}\n\t}\n}\n\nexport const prepareTextNode = ({ h, context }, text) => {\n\tif (context.autolink) {\n\t\ttext = parseUrl(text)\n\t}\n\tif (Array.isArray(text)) {\n\t\treturn text.map((entry) => {\n\t\t\tif (typeof entry === 'string') {\n\t\t\t\treturn entry\n\t\t\t}\n\t\t\tconst { component, props } = entry\n\t\t\t// do not override class of NcLink\n\t\t\tconst componentClass = component.name === 'NcLink' ? undefined : 'rich-text--component'\n\t\t\treturn h(component, {\n\t\t\t\tprops,\n\t\t\t\tclass: componentClass,\n\t\t\t})\n\t\t})\n\t}\n\treturn text\n}\n","<!--\n - @copyright Copyright (c) 2020 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Guido Krömer <mail@cacodaemon.de>\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### General description\n\nThis component displays rich text with optional autolink or [Markdown support](https://www.markdownguide.org/basic-syntax/).\n\n```vue\n<template>\n\t<div>\n\t\t<textarea v-model=\"text\" />\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"autolink\" type=\"checkbox\">Autolink</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"useMarkdown\" type=\"checkbox\">Use Markdown</NcCheckboxRadioSwitch>\n\n\t\t<NcRichText\n\t\t\t:class=\"{'plain-text': !useMarkdown }\"\n\t\t\t:text=\"text\" :autolink=\"autolink\" :arguments=\"args\"\n\t\t\t:use-markdown=\"useMarkdown\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext: `## Hello everyone 🎉\nThe file {file} was added by {username}. Visit https://nextcloud.com to check it!\n\nSome examples for markdown syntax:\n1. **bold text**\n2. _italic text_\n3. example of \\`inline code\\`\n\n> blockquote example\n`,\n\t\t\tautolink: true,\n\t\t\tuseMarkdown: true,\n\t\t\targs: {\n\t\t\t\tfile: 'MyDocument.odt',\n\t\t\t\tusername: {\n\t\t\t\t\tcomponent: 'NcUserBubble',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tdisplayName: 'Jane Doe'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\t},\n}\n</script>\n<style lang=\"scss\">\ntextarea {\n\twidth: 100%;\n\theight: 200px;\n}\n\n.plain-text {\n\twhite-space: pre-line;\n}\n</style>\n```\n\n### Flavored Markdown\n\nThis component can support [Github Flavored Markdown](https://github.github.com/gfm/).\nIt adds such elements, as tables, task lists, strikethrough, and supports autolinks by default\n\nIt is also possible to make a rendered content interactive and listen for events\n\n```vue\n<template>\n\t<div>\n\t\t<textarea v-model=\"text\" />\n\n\t\t<NcRichText :text=\"text\"\n\t\t\t:use-extended-markdown=\"true\"\n\t\t\t:interactive=\"true\"\n\t\t\t@interact:todo=\"handleInteraction\"/>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttext: `## Try flavored markdown right now!\n\n~~strikethrough~~\n\n- [ ] task to be done\n- [x] task completed\n\nTable header | Column A | Column B\n-- | -- | --\nTable row | value A | value B\n`,\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\thandleInteraction(event) {\n\t\t\t\tconst uncheckedItem = '- [ ] ' + event.label + '\\n'\n\t\t\t\tconst checkedItem = '- [x] ' + event.label + '\\n'\n\n\t\t\t\tthis.text = event.value\n\t\t\t\t\t? this.text.replace(uncheckedItem, checkedItem)\n\t\t\t\t\t: this.text.replace(checkedItem, uncheckedItem)\n\t\t\t},\n\t\t},\n\t}\n</script>\n<style lang=\"scss\">\ntextarea {\n\twidth: 100%;\n\theight: 200px;\n}\n</style>\n```\n\n### Usage with NcRichContenteditable\n\nSee [NcRichContenteditable](#/Components/NcRichContenteditable) documentation for more information\n\n```vue\n<template>\n\t<div>\n\t\t<NcRichContenteditable :value.sync=\"message\"\n\t\t\t:auto-complete=\"autoComplete\"\n\t\t\t:maxlength=\"100\"\n\t\t\t:user-data=\"userData\"\n\t\t\tplaceholder=\"Try mentioning user @Test01 or inserting emoji :smile\"\n\t\t\t@submit=\"onSubmit\" />\n\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"autolink\" type=\"checkbox\">Autolink</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"useMarkdown\" type=\"checkbox\">Use Markdown</NcCheckboxRadioSwitch>\n\n\t\t<NcRichText :text=\"text\"\n\t\t\t:autolink=\"autolink\"\n\t\t\t:arguments=\"userMentions\"\n\t\t\t:use-markdown=\"useMarkdown\" />\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tmessage: '',\n\t\t\t\tautolink: true,\n\t\t\t\tuseMarkdown: true,\n\t\t\t\tuserData: {\n\t\t\t\t\tTest01: {\n\t\t\t\t\t\ticon: 'icon-user',\n\t\t\t\t\t\tid: 'Test01',\n\t\t\t\t\t\ttitle: 'Test01',\n\t\t\t\t\t\tsource: 'users',\n\t\t\t\t\t\tprimary: true,\n\t\t\t\t\t},\n\t\t\t\t\tTest02: {\n\t\t\t\t\t\ticon: 'icon-user',\n\t\t\t\t\t\tid: 'Test02',\n\t\t\t\t\t\ttitle: 'Test02',\n\t\t\t\t\t\tsource: 'users',\n\t\t\t\t\t\tstatus: {\n\t\t\t\t\t\t\tclearAt: null,\n\t\t\t\t\t\t\ticon: '🎡',\n\t\t\t\t\t\t\tmessage: 'Visiting London',\n\t\t\t\t\t\t\tstatus: 'away',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsubline: 'Visiting London',\n\t\t\t\t\t},\n\t\t\t\t\t'Test@User': {\n\t\t\t\t\t\ticon: 'icon-user',\n\t\t\t\t\t\tid: 'Test@User',\n\t\t\t\t\t\ttitle: 'Test 03',\n\t\t\t\t\t\tsource: 'users',\n\t\t\t\t\t\tstatus: {\n\t\t\t\t\t\t\tclearAt: null,\n\t\t\t\t\t\t\ticon: '🎡',\n\t\t\t\t\t\t\tmessage: 'Having space in my name',\n\t\t\t\t\t\t\tstatus: 'online',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsubline: 'Visiting London',\n\t\t\t\t\t},\n\t\t\t\t\t'Test Offline': {\n\t\t\t\t\t\ticon: 'icon-user',\n\t\t\t\t\t\tid: 'Test Offline',\n\t\t\t\t\t\ttitle: 'Test Offline',\n\t\t\t\t\t\tsource: 'users',\n\t\t\t\t\t\tstatus: {\n\t\t\t\t\t\t\tclearAt: null,\n\t\t\t\t\t\t\ticon: null,\n\t\t\t\t\t\t\tmessage: null,\n\t\t\t\t\t\t\tstatus: 'offline',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsubline: null,\n\t\t\t\t\t},\n\t\t\t\t\t'Test DND': {\n\t\t\t\t\t\ticon: 'icon-user',\n\t\t\t\t\t\tid: 'Test DND',\n\t\t\t\t\t\ttitle: 'Test DND',\n\t\t\t\t\t\tsource: 'users',\n\t\t\t\t\t\tstatus: {\n\t\t\t\t\t\t\tclearAt: null,\n\t\t\t\t\t\t\ticon: null,\n\t\t\t\t\t\t\tmessage: 'Out sick',\n\t\t\t\t\t\t\tstatus: 'dnd',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsubline: 'Out sick',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tuserMentions: {\n\t\t\t\t\t'user-1': {\n\t\t\t\t\t\tcomponent: 'NcUserBubble',\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tdisplayName: 'Test01',\n\t\t\t\t\t\t\tuser: 'Test01',\n\t\t\t\t\t\t\tprimary: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t'user-2': {\n\t\t\t\t\t\tcomponent: 'NcUserBubble',\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tdisplayName: 'Test02',\n\t\t\t\t\t\t\tuser: 'Test02',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t'user-3': {\n\t\t\t\t\t\tcomponent: 'NcUserBubble',\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tdisplayName: 'Test 03',\n\t\t\t\t\t\t\tuser: 'Test@User',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t'user-4': {\n\t\t\t\t\t\tcomponent: 'NcUserBubble',\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tdisplayName: 'Test Offline',\n\t\t\t\t\t\t\tuser: 'Test Offline',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t'user-5': {\n\t\t\t\t\t\tcomponent: 'NcUserBubble',\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tdisplayName: 'Test DND',\n\t\t\t\t\t\t\tuser: 'Test DND',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t\tcomputed: {\n\t\t\ttext() {\n\t\t\t\treturn this.message\n\t\t\t\t\t\t.replace('@Test01', '{user-1}')\n\t\t\t\t\t\t.replace('@Test02', '{user-2}')\n\t\t\t\t\t\t.replace('@Test@User', '{user-3}')\n\t\t\t\t\t\t.replace('@\"Test Offline\"', '{user-4}')\n\t\t\t\t\t\t.replace('@\"Test DND\"', '{user-5}')\n\t\t\t},\n\t\t},\n\t\tmethods: {\n\t\t\tautoComplete(search, callback) {\n\t\t\t\tcallback(Object.values(this.userData))\n\t\t\t},\n\t\t\tonSubmit() {\n\t\t\t\talert(this.message)\n\t\t\t}\n\t\t}\n\t}\n</script>\n```\n</docs>\n\n<script>\nimport NcReferenceList from './NcReferenceList.vue'\nimport NcCheckboxRadioSwitch from '../NcCheckboxRadioSwitch/NcCheckboxRadioSwitch.vue'\nimport { remarkAutolink } from './autolink.js'\nimport { remarkPlaceholder, prepareTextNode } from './placeholder.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport { unified } from 'unified'\nimport remarkParse from 'remark-parse'\nimport remarkGfm from 'remark-gfm'\nimport breaks from 'remark-breaks'\nimport remark2rehype from 'remark-rehype'\nimport rehype2react from 'rehype-react'\nimport rehypeExternalLinks from 'rehype-external-links'\n\nexport default {\n\tname: 'NcRichText',\n\tcomponents: {\n\t\tNcReferenceList,\n\t},\n\tprops: {\n\t\ttext: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\targuments: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => {\n\t\t\t\treturn {}\n\t\t\t},\n\t\t},\n\t\treferenceLimit: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\t\t/** Provide data upfront to avoid extra http request */\n\t\treferences: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t\tmarkdownCssClasses: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => {\n\t\t\t\treturn {\n\t\t\t\t\ta: 'rich-text--external-link',\n\t\t\t\t\tol: 'rich-text--ordered-list',\n\t\t\t\t\tul: 'rich-text--un-ordered-list',\n\t\t\t\t\tli: 'rich-text--list-item',\n\t\t\t\t\tstrong: 'rich-text--strong',\n\t\t\t\t\tem: 'rich-text--italic',\n\t\t\t\t\th1: 'rich-text--heading rich-text--heading-1',\n\t\t\t\t\th2: 'rich-text--heading rich-text--heading-2',\n\t\t\t\t\th3: 'rich-text--heading rich-text--heading-3',\n\t\t\t\t\th4: 'rich-text--heading rich-text--heading-4',\n\t\t\t\t\th5: 'rich-text--heading rich-text--heading-5',\n\t\t\t\t\th6: 'rich-text--heading rich-text--heading-6',\n\t\t\t\t\thr: 'rich-text--hr',\n\t\t\t\t\ttable: 'rich-text--table',\n\t\t\t\t\tpre: 'rich-text--pre',\n\t\t\t\t\tcode: 'rich-text--code',\n\t\t\t\t\tblockquote: 'rich-text--blockquote',\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\tuseMarkdown: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/** Provide GitHub Flavored Markdown syntax */\n\t\tuseExtendedMarkdown: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/** Provide event from rendered markdown inputs */\n\t\tinteractive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tautolink: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\temits: ['interact:todo'],\n\tmethods: {\n\t\trenderPlaintext(h) {\n\t\t\tconst context = this\n\t\t\tconst placeholders = this.text.split(/(\\{[a-z\\-_.0-9]+\\})/ig).map(function(entry, index, list) {\n\t\t\t\tconst matches = entry.match(/^\\{([a-z\\-_.0-9]+)\\}$/i)\n\t\t\t\t// just return plain string nodes as text\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn prepareTextNode({ h, context }, entry)\n\t\t\t\t}\n\t\t\t\t// return component instance if argument is an object\n\t\t\t\tconst argumentId = matches[1]\n\t\t\t\tconst argument = context.arguments[argumentId]\n\t\t\t\tif (typeof argument === 'object') {\n\t\t\t\t\tconst { component, props } = argument\n\t\t\t\t\treturn h(component, {\n\t\t\t\t\t\tprops,\n\t\t\t\t\t\tclass: 'rich-text--component',\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tif (argument) {\n\t\t\t\t\treturn h('span', { class: 'rich-text--fallback' }, argument)\n\t\t\t\t}\n\t\t\t\treturn entry\n\t\t\t})\n\t\t\treturn h('div', { class: 'rich-text--wrapper' }, [\n\t\t\t\th('div', {}, placeholders.flat()),\n\t\t\t\tthis.referenceLimit > 0\n\t\t\t\t\t? h('div', { class: 'rich-text--reference-widget' }, [\n\t\t\t\t\t\th(NcReferenceList, { props: { text: this.text, referenceData: this.references } }),\n\t\t\t\t\t])\n\t\t\t\t\t: null,\n\t\t\t])\n\t\t},\n\t\trenderMarkdown(h) {\n\t\t\tconst renderedMarkdown = unified()\n\t\t\t\t.use(remarkParse)\n\t\t\t\t.use(remarkAutolink, {\n\t\t\t\t\tautolink: this.autolink,\n\t\t\t\t\tuseMarkdown: this.useMarkdown,\n\t\t\t\t\tuseExtendedMarkdown: this.useExtendedMarkdown,\n\t\t\t\t})\n\t\t\t\t.use(this.useExtendedMarkdown ? remarkGfm : undefined)\n\t\t\t\t.use(breaks)\n\t\t\t\t.use(remark2rehype, {\n\t\t\t\t\thandlers: {\n\t\t\t\t\t\tcomponent(toHast, node) {\n\t\t\t\t\t\t\treturn toHast(node, node.component, { value: node.value })\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\t// .use(rehypeAddClasses, this.markdownCssClasses)\n\t\t\t\t.use(remarkPlaceholder)\n\t\t\t\t.use(rehypeExternalLinks, {\n\t\t\t\t\ttarget: '_blank',\n\t\t\t\t\trel: ['noopener noreferrer'],\n\t\t\t\t})\n\t\t\t\t.use(rehype2react, {\n\t\t\t\t\tcreateElement: (tag, attrs, children) => {\n\t\t\t\t\t\t// unescape special symbol \"<\" for simple text nodes\n\t\t\t\t\t\tchildren = children?.map(child => typeof child === 'string'\n\t\t\t\t\t\t\t? child.replace(/&lt;/gmi, '<')\n\t\t\t\t\t\t\t: child,\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\tif (!tag.startsWith('#')) {\n\t\t\t\t\t\t\tif (this.useExtendedMarkdown) {\n\t\t\t\t\t\t\t\tif (tag === 'li' && Array.isArray(children)\n\t\t\t\t\t\t\t\t\t&& children[0].tag === 'input'\n\t\t\t\t\t\t\t\t\t&& children[0].data.attrs.type === 'checkbox') {\n\t\t\t\t\t\t\t\t\tconst [inputNode, , label] = children\n\t\t\t\t\t\t\t\t\tconst id = 'markdown-input-' + GenRandomId(5)\n\t\t\t\t\t\t\t\t\tconst inputComponent = h(NcCheckboxRadioSwitch, {\n\t\t\t\t\t\t\t\t\t\tattrs: {\n\t\t\t\t\t\t\t\t\t\t\t...inputNode.data.attrs,\n\t\t\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\t\t\tdisabled: !this.interactive,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\ton: {\n\t\t\t\t\t\t\t\t\t\t\t'update:checked': (value) => {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.$emit('interact:todo', { id, label, value })\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t}, [label])\n\t\t\t\t\t\t\t\t\treturn h(tag, attrs, [inputComponent])\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn h(tag, attrs, children)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst placeholder = this.arguments[tag.slice(1)]\n\t\t\t\t\t\tif (!placeholder) {\n\t\t\t\t\t\t\treturn h('span', { ...{ attrs }, ...{ class: 'rich-text--fallback' } }, [`{${tag.slice(1)}}`])\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!placeholder.component) {\n\t\t\t\t\t\t\treturn h('span', attrs, [placeholder])\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn h(\n\t\t\t\t\t\t\tplaceholder.component,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tattrs,\n\t\t\t\t\t\t\t\tprops: placeholder.props,\n\t\t\t\t\t\t\t\tclass: 'rich-text--component',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tchildren,\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tprefix: false,\n\t\t\t\t})\n\t\t\t\t.processSync(this.text\n\t\t\t\t\t// escape special symbol \"<\" to not treat text as HTML\n\t\t\t\t\t.replace(/</gmi, '&lt;')\n\t\t\t\t\t// unescape special symbol \">\" to parse blockquotes\n\t\t\t\t\t.replace(/&gt;/gmi, '>'),\n\t\t\t\t)\n\t\t\t\t.result\n\n\t\t\treturn h('div', { class: 'rich-text--wrapper rich-text--wrapper-markdown' }, [\n\t\t\t\trenderedMarkdown,\n\t\t\t\tthis.referenceLimit > 0\n\t\t\t\t\t? h('div', { class: 'rich-text--reference-widget' }, [\n\t\t\t\t\t\th(NcReferenceList, { props: { text: this.text, referenceData: this.references } }),\n\t\t\t\t\t])\n\t\t\t\t\t: null,\n\t\t\t])\n\t\t},\n\t},\n\trender(h) {\n\t\treturn this.useMarkdown || this.useExtendedMarkdown\n\t\t\t? this.renderMarkdown(h)\n\t\t\t: this.renderPlaintext(h)\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n/* stylelint-disable-next-line scss/at-import-partial-extension */\n@import './richtext.scss';\n\na:not(.rich-text--component) {\n\ttext-decoration: underline;\n}\n</style>\n"],"names":["URL_PATTERN","URL_PATTERN_AUTOLINK","_sfc_main","NcReferenceWidget","response","error","match","axios","generateOcsUrl","NcLink","h","remarkAutolink","autolink","useMarkdown","useExtendedMarkdown","tree","visit","node","index","parent","parsed","parseUrl","n","u","x","SKIP","text","list","start","href","textAfter","textBefore","lastChar","joinedText","item","remarkPlaceholder","ast","visitor","placeholders","entry","matches","component","prepareTextNode","context","props","componentClass","NcReferenceList","argumentId","argument","renderedMarkdown","unified","remarkParse","remarkGfm","breaks","remark2rehype","toHast","rehypeExternalLinks","rehype2react","tag","attrs","children","child","inputNode","label","id","GenRandomId","inputComponent","NcCheckboxRadioSwitch","value","placeholder"],"mappings":";;;;;;;;;;;;;;;AAKO,MAAMA,IAAc,6FAUdC,IAAuB,sHCDpCC,IAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,mBAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA;AACA,WAAA;AA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