@nextcloud/vue 8.13.0 → 8.14.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 (414) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/Components/NcActionButton.cjs +2 -2
  3. package/dist/Components/NcActionButton.cjs.map +1 -1
  4. package/dist/Components/NcActionButton.mjs +2 -2
  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 -2
  9. package/dist/Components/NcActionCaption.cjs.map +1 -1
  10. package/dist/Components/NcActionCaption.mjs +2 -2
  11. package/dist/Components/NcActionCaption.mjs.map +1 -1
  12. package/dist/Components/NcActionCheckbox.cjs +2 -2
  13. package/dist/Components/NcActionCheckbox.cjs.map +1 -1
  14. package/dist/Components/NcActionCheckbox.mjs +2 -2
  15. package/dist/Components/NcActionCheckbox.mjs.map +1 -1
  16. package/dist/Components/NcActionInput.cjs +1 -1
  17. package/dist/Components/NcActionInput.mjs +1 -1
  18. package/dist/Components/NcActionLink.cjs +1 -1
  19. package/dist/Components/NcActionLink.mjs +1 -1
  20. package/dist/Components/NcActionRadio.cjs +2 -2
  21. package/dist/Components/NcActionRadio.cjs.map +1 -1
  22. package/dist/Components/NcActionRadio.mjs +2 -2
  23. package/dist/Components/NcActionRadio.mjs.map +1 -1
  24. package/dist/Components/NcActionRouter.cjs +1 -1
  25. package/dist/Components/NcActionRouter.mjs +1 -1
  26. package/dist/Components/NcActionText.cjs +1 -1
  27. package/dist/Components/NcActionText.mjs +1 -1
  28. package/dist/Components/NcActionTextEditable.cjs +2 -2
  29. package/dist/Components/NcActionTextEditable.cjs.map +1 -1
  30. package/dist/Components/NcActionTextEditable.mjs +2 -2
  31. package/dist/Components/NcActionTextEditable.mjs.map +1 -1
  32. package/dist/Components/NcActions.cjs +1 -1
  33. package/dist/Components/NcActions.mjs +1 -1
  34. package/dist/Components/NcAppContent.cjs +1 -1
  35. package/dist/Components/NcAppContent.mjs +1 -1
  36. package/dist/Components/NcAppNavigation.cjs +1 -1
  37. package/dist/Components/NcAppNavigation.mjs +1 -1
  38. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  39. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  40. package/dist/Components/NcAppNavigationIconBullet.cjs +2 -2
  41. package/dist/Components/NcAppNavigationIconBullet.cjs.map +1 -1
  42. package/dist/Components/NcAppNavigationIconBullet.mjs +2 -2
  43. package/dist/Components/NcAppNavigationIconBullet.mjs.map +1 -1
  44. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  45. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  46. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  47. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  48. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  49. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  50. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  51. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  52. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  53. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  54. package/dist/Components/NcAppSettingsSection.cjs +3 -3
  55. package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
  56. package/dist/Components/NcAppSettingsSection.mjs +3 -3
  57. package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
  58. package/dist/Components/NcAppSidebar.cjs +1 -1
  59. package/dist/Components/NcAppSidebar.mjs +1 -1
  60. package/dist/Components/NcAvatar.cjs +1 -1
  61. package/dist/Components/NcAvatar.mjs +1 -1
  62. package/dist/Components/NcBreadcrumb.cjs +1 -1
  63. package/dist/Components/NcBreadcrumb.mjs +1 -1
  64. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  65. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  66. package/dist/Components/NcButton.cjs +15 -3
  67. package/dist/Components/NcButton.cjs.map +1 -1
  68. package/dist/Components/NcButton.mjs +15 -3
  69. package/dist/Components/NcButton.mjs.map +1 -1
  70. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  71. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  72. package/dist/Components/NcChip.cjs +3 -3
  73. package/dist/Components/NcChip.mjs +3 -3
  74. package/dist/Components/NcCollectionList.cjs +3 -0
  75. package/dist/Components/NcCollectionList.cjs.map +1 -0
  76. package/dist/Components/NcCollectionList.mjs +4 -0
  77. package/dist/Components/NcCollectionList.mjs.map +1 -0
  78. package/dist/Components/NcColorPicker.cjs +1 -1
  79. package/dist/Components/NcColorPicker.mjs +1 -1
  80. package/dist/Components/NcContent.cjs +1 -1
  81. package/dist/Components/NcContent.mjs +1 -1
  82. package/dist/Components/NcCounterBubble.cjs +2 -2
  83. package/dist/Components/NcCounterBubble.cjs.map +1 -1
  84. package/dist/Components/NcCounterBubble.mjs +2 -2
  85. package/dist/Components/NcCounterBubble.mjs.map +1 -1
  86. package/dist/Components/NcDashboardWidget.cjs +1 -1
  87. package/dist/Components/NcDashboardWidget.mjs +1 -1
  88. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  89. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  90. package/dist/Components/NcDateTime.cjs +1 -1
  91. package/dist/Components/NcDateTime.mjs +1 -1
  92. package/dist/Components/NcDateTimePicker.cjs +5 -5
  93. package/dist/Components/NcDateTimePicker.mjs +5 -5
  94. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  95. package/dist/Components/NcDateTimePickerNative.mjs +1 -1
  96. package/dist/Components/NcDialog.cjs +1 -1
  97. package/dist/Components/NcDialog.mjs +1 -1
  98. package/dist/Components/NcEmojiPicker.cjs +1 -1
  99. package/dist/Components/NcEmojiPicker.mjs +1 -1
  100. package/dist/Components/NcHeaderMenu.cjs +1 -1
  101. package/dist/Components/NcHeaderMenu.mjs +1 -1
  102. package/dist/Components/NcInputField.cjs +2 -2
  103. package/dist/Components/NcInputField.cjs.map +1 -1
  104. package/dist/Components/NcInputField.mjs +2 -2
  105. package/dist/Components/NcInputField.mjs.map +1 -1
  106. package/dist/Components/NcListItem.cjs +1 -1
  107. package/dist/Components/NcListItem.mjs +1 -1
  108. package/dist/Components/NcListItemIcon.cjs +1 -1
  109. package/dist/Components/NcListItemIcon.mjs +1 -1
  110. package/dist/Components/NcModal.cjs +29 -9
  111. package/dist/Components/NcModal.cjs.map +1 -1
  112. package/dist/Components/NcModal.mjs +27 -9
  113. package/dist/Components/NcModal.mjs.map +1 -1
  114. package/dist/Components/NcPasswordField.cjs +1 -1
  115. package/dist/Components/NcPasswordField.mjs +1 -1
  116. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  117. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  118. package/dist/Components/NcRichContenteditable.cjs +2 -2
  119. package/dist/Components/NcRichContenteditable.mjs +2 -2
  120. package/dist/Components/NcRichText.cjs +2 -2
  121. package/dist/Components/NcRichText.mjs +3 -3
  122. package/dist/Components/NcSelect.cjs +1 -1
  123. package/dist/Components/NcSelect.mjs +1 -1
  124. package/dist/Components/NcSelectTags.cjs +1 -1
  125. package/dist/Components/NcSelectTags.mjs +1 -1
  126. package/dist/Components/NcSettingsInputText.cjs +1 -1
  127. package/dist/Components/NcSettingsInputText.mjs +1 -1
  128. package/dist/Components/NcSettingsSection.cjs +1 -1
  129. package/dist/Components/NcSettingsSection.mjs +1 -1
  130. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  131. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  132. package/dist/Components/NcTextField.cjs +1 -1
  133. package/dist/Components/NcTextField.mjs +1 -1
  134. package/dist/Components/NcTimezonePicker.cjs +1 -1
  135. package/dist/Components/NcTimezonePicker.mjs +1 -1
  136. package/dist/Components/NcUserBubble.cjs +1 -1
  137. package/dist/Components/NcUserBubble.mjs +1 -1
  138. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  139. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  140. package/dist/Functions/reference.cjs +1 -1
  141. package/dist/Functions/reference.mjs +1 -1
  142. package/dist/Functions/usernameToColor.cjs +1 -1
  143. package/dist/Functions/usernameToColor.mjs +1 -1
  144. package/dist/Mixins/richEditor.cjs +1 -1
  145. package/dist/Mixins/richEditor.mjs +1 -1
  146. package/dist/assets/{NcActionButton-BQGADRoe.css → NcActionButton-D90PTEA5.css} +25 -25
  147. package/dist/assets/{NcActionCaption-D-VXTPLI.css → NcActionCaption-B7FZTc3Y.css} +4 -4
  148. package/dist/assets/{NcActionRadio-mQBhh9vp.css → NcActionCheckbox-C-PJVvtb.css} +13 -13
  149. package/dist/assets/NcActionInput-C_3Csa6A.css +220 -0
  150. package/dist/assets/{NcActionLink-Djp7wPGg.css → NcActionLink-Db_ZlqWs.css} +9 -9
  151. package/dist/assets/{NcActionCheckbox-_DSvRrCm.css → NcActionRadio-CpCvyMa_.css} +13 -13
  152. package/dist/assets/{NcActionRouter-DzcScCc6.css → NcActionRouter-DidTlbov.css} +9 -9
  153. package/dist/assets/{NcActionText-DSk64KBl.css → NcActionText-DCx1DWXe.css} +9 -9
  154. package/dist/assets/NcActionTextEditable-Dud9NOdm.css +238 -0
  155. package/dist/assets/{NcActions-DtkhUUGj.css → NcActions-JDMMURyt.css} +13 -13
  156. package/dist/assets/{NcAppContent-D0DGjfq9.css → NcAppContent-B1ZWQTUv.css} +7 -7
  157. package/dist/assets/{NcAppNavigationCaption-32LhJ9Co.css → NcAppNavigationCaption-Cgexlz2n.css} +10 -10
  158. package/dist/assets/{NcAppNavigationIconBullet-EfIZU7x-.css → NcAppNavigationIconBullet-By_0o2dG.css} +4 -4
  159. package/dist/assets/{NcAppNavigationItem-CflKjlYl.css → NcAppNavigationItem-Cas1plMr.css} +13 -13
  160. package/dist/assets/{NcAppNavigationNewItem-CO3GnR26.css → NcAppNavigationNewItem-Dw2sHtEO.css} +46 -46
  161. package/dist/assets/{NcAppNavigationSettings-CbV2ZQ9_.css → NcAppNavigationSettings-DtCFYPKb.css} +17 -17
  162. package/dist/assets/{NcAppNavigationToggle-DzpFNOgZ.css → NcAppNavigationToggle-DvYpNzHv.css} +4 -4
  163. package/dist/assets/{NcAppSettingsDialog-DkvJ9cKe.css → NcAppSettingsDialog-YgAGku7I.css} +12 -12
  164. package/dist/assets/{NcAppSettingsSection-B5r6VWct.css → NcAppSettingsSection-AUZ2NjMX.css} +3 -3
  165. package/dist/assets/{NcAppSidebar-ITHlK5rW.css → NcAppSidebar-GLK326IR.css} +70 -70
  166. package/dist/assets/{NcBreadcrumb-rVleA0T6.css → NcBreadcrumb-DOvK-XG1.css} +16 -16
  167. package/dist/assets/{NcBreadcrumbs-Bue16qCC.css → NcBreadcrumbs-CPUAM38l.css} +6 -6
  168. package/dist/assets/NcButton-BHxZm42y.css +210 -0
  169. package/dist/assets/{NcCheckboxRadioSwitch-CFKCb80n.css → NcCheckboxRadioSwitch-BkBep4wT.css} +46 -46
  170. package/dist/assets/NcCollectionList-ETQTqkqt.css +221 -0
  171. package/dist/assets/{NcColorPicker-DH3H7HLS.css → NcColorPicker-Ctv2cwt1.css} +25 -25
  172. package/dist/assets/{NcCounterBubble-DT16e2bg.css → NcCounterBubble-BlAq2Vim.css} +8 -8
  173. package/dist/assets/{NcDashboardWidget-CwzqyUG9.css → NcDashboardWidget-CpstyXok.css} +13 -13
  174. package/dist/assets/{NcDashboardWidgetItem-JCtQhwhS.css → NcDashboardWidgetItem-Qe5SSOhA.css} +14 -14
  175. package/dist/assets/{NcDateTimePicker-Cs-VgGon.css → NcDateTimePicker-BR1KY59N.css} +8 -8
  176. package/dist/assets/{NcDialog-BR3cQR_R.css → NcDialog-j6_6dpiF.css} +15 -15
  177. package/dist/assets/{NcHeaderMenu-BbpDtHjf.css → NcHeaderMenu-CuAI7Fgb.css} +13 -13
  178. package/dist/assets/{NcInputField-CyNcetxP.css → NcInputField-CrdP183e.css} +34 -34
  179. package/dist/assets/{NcListItemIcon-Cd4723rU.css → NcListItemIcon-DxPdaRV5.css} +14 -14
  180. package/dist/assets/{NcMentionBubble-B-xYaJDc.css → NcMentionBubble-C6t8od-_.css} +13 -10
  181. package/dist/assets/{NcModal-6bpKFk4w.css → NcModal-CYa2IEvm.css} +69 -69
  182. package/dist/assets/{NcRelatedResourcesPanel-i_FBo7DY.css → NcRelatedResourcesPanel-BE9CQ8s8.css} +25 -25
  183. package/dist/assets/{NcRichContenteditable-BIclrp8v.css → NcRichContenteditable-CkvTrjfG.css} +13 -13
  184. package/dist/assets/{NcRichText-BKoK9ulg.css → NcRichText-BzeK2YTS.css} +4 -4
  185. package/dist/assets/{NcSelect-9AZOhTlS.css → NcSelect-BQt_SpyP.css} +1 -1
  186. package/dist/assets/{NcSettingsSection-B_Dat_E8.css → NcSettingsSection-DZwOPKg1.css} +11 -11
  187. package/dist/assets/{referencePickerModal-C_c_8fEM.css → referencePickerModal-9BcmmfUy.css} +36 -36
  188. package/dist/chunks/{GenColors-Cf5olCPx.cjs → GenColors-Dt-3yZwf.cjs} +1 -1
  189. package/dist/chunks/{GenColors-Cf5olCPx.cjs.map → GenColors-Dt-3yZwf.cjs.map} +1 -1
  190. package/dist/chunks/{GenColors-BvNpSI9g.mjs → GenColors-DtEnxSd9.mjs} +1 -1
  191. package/dist/chunks/{GenColors-BvNpSI9g.mjs.map → GenColors-DtEnxSd9.mjs.map} +1 -1
  192. package/dist/chunks/{NcActionButtonGroup-DCKhQnHH.mjs → NcActionButtonGroup-B62_HajM.mjs} +1 -1
  193. package/dist/chunks/{NcActionButtonGroup-DCKhQnHH.mjs.map → NcActionButtonGroup-B62_HajM.mjs.map} +1 -1
  194. package/dist/chunks/{NcActionButtonGroup-BO4eSfV4.cjs → NcActionButtonGroup-DKtkuRy5.cjs} +1 -1
  195. package/dist/chunks/{NcActionButtonGroup-BO4eSfV4.cjs.map → NcActionButtonGroup-DKtkuRy5.cjs.map} +1 -1
  196. package/dist/chunks/{NcActionInput-9zrp0_WC.mjs → NcActionInput-DvbN3P1D.mjs} +7 -7
  197. package/dist/chunks/{NcActionInput-9zrp0_WC.mjs.map → NcActionInput-DvbN3P1D.mjs.map} +1 -1
  198. package/dist/chunks/{NcActionInput-CEjCUwt0.cjs → NcActionInput-Dw1TL9ig.cjs} +7 -7
  199. package/dist/chunks/{NcActionInput-CEjCUwt0.cjs.map → NcActionInput-Dw1TL9ig.cjs.map} +1 -1
  200. package/dist/chunks/{NcActions-VXT4YqSd.mjs → NcActions-CL3YRRgz.mjs} +3 -3
  201. package/dist/chunks/{NcActions-VXT4YqSd.mjs.map → NcActions-CL3YRRgz.mjs.map} +1 -1
  202. package/dist/chunks/{NcActions-B4kN_x_I.cjs → NcActions-DRSoPS6a.cjs} +3 -3
  203. package/dist/chunks/{NcActions-B4kN_x_I.cjs.map → NcActions-DRSoPS6a.cjs.map} +1 -1
  204. package/dist/chunks/{NcAppContent-B-VnA8x6.mjs → NcAppContent-Cgay0O3i.mjs} +4 -4
  205. package/dist/chunks/NcAppContent-Cgay0O3i.mjs.map +1 -0
  206. package/dist/chunks/{NcAppContent-CoKCN5M3.cjs → NcAppContent-ibyvoVc4.cjs} +4 -4
  207. package/dist/chunks/NcAppContent-ibyvoVc4.cjs.map +1 -0
  208. package/dist/chunks/{NcAppNavigation-Bto5gXEz.cjs → NcAppNavigation-Cw8qnf4l.cjs} +1 -1
  209. package/dist/chunks/{NcAppNavigation-Bto5gXEz.cjs.map → NcAppNavigation-Cw8qnf4l.cjs.map} +1 -1
  210. package/dist/chunks/{NcAppNavigation-BoSCCzgq.mjs → NcAppNavigation-D15PXjlO.mjs} +1 -1
  211. package/dist/chunks/{NcAppNavigation-BoSCCzgq.mjs.map → NcAppNavigation-D15PXjlO.mjs.map} +1 -1
  212. package/dist/chunks/{NcAppNavigationCaption-7V2xr2JU.cjs → NcAppNavigationCaption-CO8Hwyrb.cjs} +3 -3
  213. package/dist/chunks/{NcAppNavigationCaption-7V2xr2JU.cjs.map → NcAppNavigationCaption-CO8Hwyrb.cjs.map} +1 -1
  214. package/dist/chunks/{NcAppNavigationCaption-D5IlWwqU.mjs → NcAppNavigationCaption-DsGPHQvj.mjs} +3 -3
  215. package/dist/chunks/{NcAppNavigationCaption-D5IlWwqU.mjs.map → NcAppNavigationCaption-DsGPHQvj.mjs.map} +1 -1
  216. package/dist/chunks/{NcAppNavigationItem-D0BY5hCQ.cjs → NcAppNavigationItem-BVLg_dnQ.cjs} +6 -6
  217. package/dist/chunks/{NcAppNavigationItem-D0BY5hCQ.cjs.map → NcAppNavigationItem-BVLg_dnQ.cjs.map} +1 -1
  218. package/dist/chunks/{NcAppNavigationItem-BvTE5-IF.mjs → NcAppNavigationItem-fKe0Oi-K.mjs} +6 -6
  219. package/dist/chunks/{NcAppNavigationItem-BvTE5-IF.mjs.map → NcAppNavigationItem-fKe0Oi-K.mjs.map} +1 -1
  220. package/dist/chunks/{NcAppNavigationNewItem-a_KNNkkf.mjs → NcAppNavigationNewItem-BEVsUTrd.mjs} +3 -3
  221. package/dist/chunks/{NcAppNavigationNewItem-DI3F9V41.cjs.map → NcAppNavigationNewItem-BEVsUTrd.mjs.map} +1 -1
  222. package/dist/chunks/{NcAppNavigationNewItem-DI3F9V41.cjs → NcAppNavigationNewItem-DlC2GWGK.cjs} +3 -3
  223. package/dist/chunks/{NcAppNavigationNewItem-a_KNNkkf.mjs.map → NcAppNavigationNewItem-DlC2GWGK.cjs.map} +1 -1
  224. package/dist/chunks/{NcAppNavigationSettings-CkdNLEGg.cjs → NcAppNavigationSettings-BidyunnY.cjs} +5 -5
  225. package/dist/chunks/{NcAppNavigationSettings-CkdNLEGg.cjs.map → NcAppNavigationSettings-BidyunnY.cjs.map} +1 -1
  226. package/dist/chunks/{NcAppNavigationSettings-ZYhJhZza.mjs → NcAppNavigationSettings-CEHSXiJt.mjs} +5 -5
  227. package/dist/chunks/{NcAppNavigationSettings-ZYhJhZza.mjs.map → NcAppNavigationSettings-CEHSXiJt.mjs.map} +1 -1
  228. package/dist/chunks/{NcAppNavigationToggle-dHmyeRMf.mjs → NcAppNavigationToggle-CdNG26lR.mjs} +4 -4
  229. package/dist/chunks/{NcAppNavigationToggle-dTKw7Sw8.cjs.map → NcAppNavigationToggle-CdNG26lR.mjs.map} +1 -1
  230. package/dist/chunks/{NcAppNavigationToggle-dTKw7Sw8.cjs → NcAppNavigationToggle-DFhfV_Ic.cjs} +4 -4
  231. package/dist/chunks/{NcAppNavigationToggle-dHmyeRMf.mjs.map → NcAppNavigationToggle-DFhfV_Ic.cjs.map} +1 -1
  232. package/dist/chunks/{NcAppSettingsDialog-B_JHYQei.mjs → NcAppSettingsDialog-BExa9wmg.mjs} +5 -5
  233. package/dist/chunks/{NcAppSettingsDialog-B_JHYQei.mjs.map → NcAppSettingsDialog-BExa9wmg.mjs.map} +1 -1
  234. package/dist/chunks/{NcAppSettingsDialog-DB9IGg_1.cjs → NcAppSettingsDialog-Zy4akEYz.cjs} +5 -5
  235. package/dist/chunks/{NcAppSettingsDialog-DB9IGg_1.cjs.map → NcAppSettingsDialog-Zy4akEYz.cjs.map} +1 -1
  236. package/dist/chunks/{NcAppSidebar-DfMS3rRN.mjs → NcAppSidebar-CYd47NKe.mjs} +26 -9
  237. package/dist/chunks/NcAppSidebar-CYd47NKe.mjs.map +1 -0
  238. package/dist/chunks/{NcAppSidebar-Be2hX08l.cjs → NcAppSidebar-kuqm78Wl.cjs} +26 -9
  239. package/dist/chunks/NcAppSidebar-kuqm78Wl.cjs.map +1 -0
  240. package/dist/chunks/{NcAvatar-DrN_43xE.mjs → NcAvatar-BC884DnC.mjs} +6 -6
  241. package/dist/chunks/{NcAvatar-DrN_43xE.mjs.map → NcAvatar-BC884DnC.mjs.map} +1 -1
  242. package/dist/chunks/{NcAvatar-B1PwcHhO.cjs → NcAvatar-BX8J9gZF.cjs} +6 -6
  243. package/dist/chunks/{NcAvatar-B1PwcHhO.cjs.map → NcAvatar-BX8J9gZF.cjs.map} +1 -1
  244. package/dist/chunks/{NcBreadcrumb-BB7O3NvV.mjs → NcBreadcrumb-BVLavjOe.mjs} +3 -3
  245. package/dist/chunks/{NcBreadcrumb-BB7O3NvV.mjs.map → NcBreadcrumb-BVLavjOe.mjs.map} +1 -1
  246. package/dist/chunks/{NcBreadcrumb-C1VWgdNk.cjs → NcBreadcrumb-DbuEPD5w.cjs} +3 -3
  247. package/dist/chunks/{NcBreadcrumb-C1VWgdNk.cjs.map → NcBreadcrumb-DbuEPD5w.cjs.map} +1 -1
  248. package/dist/chunks/{NcBreadcrumbs-BRl8V6ie.mjs → NcBreadcrumbs-BBO2DLP1.mjs} +4 -4
  249. package/dist/chunks/NcBreadcrumbs-BBO2DLP1.mjs.map +1 -0
  250. package/dist/chunks/{NcBreadcrumbs-BZFTIrPp.cjs → NcBreadcrumbs-iIR1Tw0r.cjs} +4 -4
  251. package/dist/chunks/NcBreadcrumbs-iIR1Tw0r.cjs.map +1 -0
  252. package/dist/chunks/{NcCheckboxRadioSwitch-BC-PCCMB.cjs → NcCheckboxRadioSwitch-B0HYTOsR.cjs} +11 -5
  253. package/dist/chunks/NcCheckboxRadioSwitch-B0HYTOsR.cjs.map +1 -0
  254. package/dist/chunks/{NcCheckboxRadioSwitch-08IiPYnO.mjs → NcCheckboxRadioSwitch-D2GbHtCS.mjs} +11 -5
  255. package/dist/chunks/NcCheckboxRadioSwitch-D2GbHtCS.mjs.map +1 -0
  256. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-CPc4BraS.cjs +4 -0
  257. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-CPc4BraS.cjs.map +1 -0
  258. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-ScT6WV__.mjs +3 -0
  259. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-ScT6WV__.mjs.map +1 -0
  260. package/dist/chunks/NcCollectionList-3O-OrcfS.mjs +428 -0
  261. package/dist/chunks/NcCollectionList-3O-OrcfS.mjs.map +1 -0
  262. package/dist/chunks/NcCollectionList-D4oNsvJ0.cjs +430 -0
  263. package/dist/chunks/NcCollectionList-D4oNsvJ0.cjs.map +1 -0
  264. package/dist/chunks/{NcColorPicker-C5AAUZow.mjs → NcColorPicker-D7awy8o_.mjs} +4 -4
  265. package/dist/chunks/{NcColorPicker-C5AAUZow.mjs.map → NcColorPicker-D7awy8o_.mjs.map} +1 -1
  266. package/dist/chunks/{NcColorPicker-DQVfrnSU.cjs → NcColorPicker-hOteJtis.cjs} +4 -4
  267. package/dist/chunks/{NcColorPicker-DQVfrnSU.cjs.map → NcColorPicker-hOteJtis.cjs.map} +1 -1
  268. package/dist/chunks/{NcContent-DlpAl0Ng.mjs → NcContent-CQn8oXxp.mjs} +2 -2
  269. package/dist/chunks/{NcContent-DlpAl0Ng.mjs.map → NcContent-CQn8oXxp.mjs.map} +1 -1
  270. package/dist/chunks/{NcContent-DqUD53yw.cjs → NcContent-Dr9e_aYA.cjs} +2 -2
  271. package/dist/chunks/{NcContent-DqUD53yw.cjs.map → NcContent-Dr9e_aYA.cjs.map} +1 -1
  272. package/dist/chunks/{NcDashboardWidget-DHZ91zbH.cjs → NcDashboardWidget-DnDLhRmV.cjs} +6 -6
  273. package/dist/chunks/{NcDashboardWidget-DHZ91zbH.cjs.map → NcDashboardWidget-DnDLhRmV.cjs.map} +1 -1
  274. package/dist/chunks/{NcDashboardWidget-Bgws_A-4.mjs → NcDashboardWidget-hTBgsnwG.mjs} +6 -6
  275. package/dist/chunks/{NcDashboardWidget-Bgws_A-4.mjs.map → NcDashboardWidget-hTBgsnwG.mjs.map} +1 -1
  276. package/dist/chunks/{NcDashboardWidgetItem-7POJ_0UL.cjs → NcDashboardWidgetItem-BorZC7ZL.cjs} +4 -4
  277. package/dist/chunks/{NcDashboardWidgetItem-7POJ_0UL.cjs.map → NcDashboardWidgetItem-BorZC7ZL.cjs.map} +1 -1
  278. package/dist/chunks/{NcDashboardWidgetItem-yOTSuJJW.mjs → NcDashboardWidgetItem-CorJJt6-.mjs} +4 -4
  279. package/dist/chunks/{NcDashboardWidgetItem-yOTSuJJW.mjs.map → NcDashboardWidgetItem-CorJJt6-.mjs.map} +1 -1
  280. package/dist/chunks/{NcDateTime-DBvDI3ZP.mjs → NcDateTime-Eat0YWPN.mjs} +1 -1
  281. package/dist/chunks/{NcDateTime-DBvDI3ZP.mjs.map → NcDateTime-Eat0YWPN.mjs.map} +1 -1
  282. package/dist/chunks/{NcDateTime-DPpc-ffs.cjs → NcDateTime-K3Rie9qv.cjs} +1 -1
  283. package/dist/chunks/{NcDateTime-DPpc-ffs.cjs.map → NcDateTime-K3Rie9qv.cjs.map} +1 -1
  284. package/dist/chunks/{NcDialog-dCyByQCG.cjs → NcDialog-DGaf6Udc.cjs} +6 -4
  285. package/dist/chunks/{NcDialog-CDQmAtFa.mjs.map → NcDialog-DGaf6Udc.cjs.map} +1 -1
  286. package/dist/chunks/{NcDialog-CDQmAtFa.mjs → NcDialog-VincZ0XS.mjs} +6 -4
  287. package/dist/chunks/{NcDialog-dCyByQCG.cjs.map → NcDialog-VincZ0XS.mjs.map} +1 -1
  288. package/dist/chunks/{NcEmojiPicker-CNiHLIbP.cjs → NcEmojiPicker-DCT0-SIC.cjs} +5 -5
  289. package/dist/chunks/{NcEmojiPicker-CNiHLIbP.cjs.map → NcEmojiPicker-DCT0-SIC.cjs.map} +1 -1
  290. package/dist/chunks/{NcEmojiPicker-CEeN-AZM.mjs → NcEmojiPicker-ziqKge9K.mjs} +5 -5
  291. package/dist/chunks/{NcEmojiPicker-CEeN-AZM.mjs.map → NcEmojiPicker-ziqKge9K.mjs.map} +1 -1
  292. package/dist/chunks/{NcHeaderMenu-C7peZLEA.cjs → NcHeaderMenu-D-Jo3l41.cjs} +4 -4
  293. package/dist/chunks/NcHeaderMenu-D-Jo3l41.cjs.map +1 -0
  294. package/dist/chunks/{NcHeaderMenu-BEp6lzuy.mjs → NcHeaderMenu-Da6Ob-6t.mjs} +4 -4
  295. package/dist/chunks/NcHeaderMenu-Da6Ob-6t.mjs.map +1 -0
  296. package/dist/chunks/{NcInputConfirmCancel-CD8NS4jj.cjs → NcInputConfirmCancel-Bt_VDaTA.cjs} +2 -2
  297. package/dist/chunks/{NcInputConfirmCancel-CD8NS4jj.cjs.map → NcInputConfirmCancel-Bt_VDaTA.cjs.map} +1 -1
  298. package/dist/chunks/{NcInputConfirmCancel-BojmHIVt.mjs → NcInputConfirmCancel-BvsvyKxD.mjs} +2 -2
  299. package/dist/chunks/{NcInputConfirmCancel-BojmHIVt.mjs.map → NcInputConfirmCancel-BvsvyKxD.mjs.map} +1 -1
  300. package/dist/chunks/{NcListItem-Bt5RbZT6.cjs → NcListItem-BwUN8FaS.cjs} +2 -2
  301. package/dist/chunks/{NcListItem-Bt5RbZT6.cjs.map → NcListItem-BwUN8FaS.cjs.map} +1 -1
  302. package/dist/chunks/{NcListItem-PX9C1UU4.mjs → NcListItem-DwIZ95t7.mjs} +2 -2
  303. package/dist/chunks/{NcListItem-PX9C1UU4.mjs.map → NcListItem-DwIZ95t7.mjs.map} +1 -1
  304. package/dist/chunks/{NcListItemIcon-NtOXrncP.mjs → NcListItemIcon-DhW1Fob8.mjs} +4 -4
  305. package/dist/chunks/{NcListItemIcon-NtOXrncP.mjs.map → NcListItemIcon-DhW1Fob8.mjs.map} +1 -1
  306. package/dist/chunks/{NcListItemIcon-CSD8rRYj.cjs → NcListItemIcon-JeS1a2jI.cjs} +4 -4
  307. package/dist/chunks/{NcListItemIcon-CSD8rRYj.cjs.map → NcListItemIcon-JeS1a2jI.cjs.map} +1 -1
  308. package/dist/chunks/{NcPasswordField-Y4-be0L7.cjs → NcPasswordField-9h22h-sl.cjs} +2 -2
  309. package/dist/chunks/{NcPasswordField-Y4-be0L7.cjs.map → NcPasswordField-9h22h-sl.cjs.map} +1 -1
  310. package/dist/chunks/{NcPasswordField-XxjYVmM9.mjs → NcPasswordField-xauR6801.mjs} +2 -2
  311. package/dist/chunks/{NcPasswordField-XxjYVmM9.mjs.map → NcPasswordField-xauR6801.mjs.map} +1 -1
  312. package/dist/chunks/{NcRelatedResourcesPanel-Dlf-t8iR.cjs → NcRelatedResourcesPanel-Be1fGCiu.cjs} +7 -7
  313. package/dist/chunks/NcRelatedResourcesPanel-Be1fGCiu.cjs.map +1 -0
  314. package/dist/chunks/{NcRelatedResourcesPanel-wFENPmmn.mjs → NcRelatedResourcesPanel-mSjo_nq5.mjs} +7 -7
  315. package/dist/chunks/NcRelatedResourcesPanel-mSjo_nq5.mjs.map +1 -0
  316. package/dist/chunks/{NcRichContenteditable-DdG9-ftG.cjs → NcRichContenteditable-BbPOC-_I.cjs} +12 -11
  317. package/dist/chunks/{NcRichContenteditable-DdG9-ftG.cjs.map → NcRichContenteditable-BbPOC-_I.cjs.map} +1 -1
  318. package/dist/chunks/{NcRichContenteditable-BGW5Ut1z.mjs → NcRichContenteditable-CakN30zF.mjs} +12 -11
  319. package/dist/chunks/{NcRichContenteditable-BGW5Ut1z.mjs.map → NcRichContenteditable-CakN30zF.mjs.map} +1 -1
  320. package/dist/chunks/{NcRichText-B0CKR0jj.cjs → NcRichText-65CdQLUw.cjs} +4 -4
  321. package/dist/chunks/NcRichText-65CdQLUw.cjs.map +1 -0
  322. package/dist/chunks/{NcRichText-D3knHFLh.mjs → NcRichText-CCM1HmZE.mjs} +4 -4
  323. package/dist/chunks/NcRichText-CCM1HmZE.mjs.map +1 -0
  324. package/dist/chunks/{NcSelect-BVltxWdw.mjs → NcSelect-CKgXIbQN.mjs} +4 -4
  325. package/dist/chunks/{NcSelect-BXjYMf6X.cjs.map → NcSelect-CKgXIbQN.mjs.map} +1 -1
  326. package/dist/chunks/{NcSelect-BXjYMf6X.cjs → NcSelect-CmV2Q0A0.cjs} +4 -4
  327. package/dist/chunks/{NcSelect-BVltxWdw.mjs.map → NcSelect-CmV2Q0A0.cjs.map} +1 -1
  328. package/dist/chunks/{NcSelectTags-BA6aGEca.mjs → NcSelectTags-BIha_vfa.mjs} +2 -2
  329. package/dist/chunks/{NcSelectTags-BA6aGEca.mjs.map → NcSelectTags-BIha_vfa.mjs.map} +1 -1
  330. package/dist/chunks/{NcSelectTags-DzNoReBn.cjs → NcSelectTags-eQRTXuQr.cjs} +2 -2
  331. package/dist/chunks/{NcSelectTags-DzNoReBn.cjs.map → NcSelectTags-eQRTXuQr.cjs.map} +1 -1
  332. package/dist/chunks/{NcSettingsInputText-B3aogzD0.cjs → NcSettingsInputText-Cdw4mTrp.cjs} +2 -2
  333. package/dist/chunks/{NcSettingsInputText-B3aogzD0.cjs.map → NcSettingsInputText-Cdw4mTrp.cjs.map} +1 -1
  334. package/dist/chunks/{NcSettingsInputText-CXURkBMD.mjs → NcSettingsInputText-DDJdALzH.mjs} +2 -2
  335. package/dist/chunks/{NcSettingsInputText-CXURkBMD.mjs.map → NcSettingsInputText-DDJdALzH.mjs.map} +1 -1
  336. package/dist/chunks/{NcSettingsSection-PZ3JkBWO.mjs → NcSettingsSection-CFn4bRnA.mjs} +4 -4
  337. package/dist/chunks/{NcSettingsSection-B8Nn29kV.cjs.map → NcSettingsSection-CFn4bRnA.mjs.map} +1 -1
  338. package/dist/chunks/{NcSettingsSection-B8Nn29kV.cjs → NcSettingsSection-uZhZY4jp.cjs} +4 -4
  339. package/dist/chunks/{NcSettingsSection-PZ3JkBWO.mjs.map → NcSettingsSection-uZhZY4jp.cjs.map} +1 -1
  340. package/dist/chunks/{NcSettingsSelectGroup-Z3yYfNTs.mjs → NcSettingsSelectGroup-BJIByip9.mjs} +3 -3
  341. package/dist/chunks/{NcSettingsSelectGroup-Z3yYfNTs.mjs.map → NcSettingsSelectGroup-BJIByip9.mjs.map} +1 -1
  342. package/dist/chunks/{NcSettingsSelectGroup-k5AMJoPl.cjs → NcSettingsSelectGroup-fY7wG4iL.cjs} +3 -3
  343. package/dist/chunks/{NcSettingsSelectGroup-k5AMJoPl.cjs.map → NcSettingsSelectGroup-fY7wG4iL.cjs.map} +1 -1
  344. package/dist/chunks/{NcTextField-C8iERu7z.mjs → NcTextField-CjEhJrIE.mjs} +2 -2
  345. package/dist/chunks/{NcTextField-C8iERu7z.mjs.map → NcTextField-CjEhJrIE.mjs.map} +1 -1
  346. package/dist/chunks/{NcTextField-Y_QNDoeN.cjs → NcTextField-DGywgzwv.cjs} +2 -2
  347. package/dist/chunks/{NcTextField-Y_QNDoeN.cjs.map → NcTextField-DGywgzwv.cjs.map} +1 -1
  348. package/dist/chunks/{NcTimezonePicker-DDNT7-mK.cjs → NcTimezonePicker-DLFrgfqk.cjs} +4 -4
  349. package/dist/chunks/{NcTimezonePicker-DDNT7-mK.cjs.map → NcTimezonePicker-DLFrgfqk.cjs.map} +1 -1
  350. package/dist/chunks/{NcTimezonePicker-BlnrXG8A.mjs → NcTimezonePicker-J8vQyRH8.mjs} +4 -4
  351. package/dist/chunks/{NcTimezonePicker-BlnrXG8A.mjs.map → NcTimezonePicker-J8vQyRH8.mjs.map} +1 -1
  352. package/dist/chunks/{NcUserBubble-BiLpvdja.mjs → NcUserBubble-C1ecV_fU.mjs} +1 -1
  353. package/dist/chunks/{NcUserBubble-BiLpvdja.mjs.map → NcUserBubble-C1ecV_fU.mjs.map} +1 -1
  354. package/dist/chunks/{NcUserBubble-eXO4wtN5.cjs → NcUserBubble-C4fdYO4b.cjs} +1 -1
  355. package/dist/chunks/{NcUserBubble-eXO4wtN5.cjs.map → NcUserBubble-C4fdYO4b.cjs.map} +1 -1
  356. package/dist/chunks/{NcUserStatusIcon-J509k6M1.cjs → NcUserStatusIcon-BqUz25xE.cjs} +3 -3
  357. package/dist/chunks/{NcUserStatusIcon-J509k6M1.cjs.map → NcUserStatusIcon-BqUz25xE.cjs.map} +1 -1
  358. package/dist/chunks/{NcUserStatusIcon-DLhfp6bb.mjs → NcUserStatusIcon-DQyfBtYn.mjs} +3 -3
  359. package/dist/chunks/{NcUserStatusIcon-DLhfp6bb.mjs.map → NcUserStatusIcon-DQyfBtYn.mjs.map} +1 -1
  360. package/dist/chunks/{ScopeComponent-BJmRUKzI.mjs → ScopeComponent-00_hPc9T.mjs} +1 -1
  361. package/dist/chunks/{ScopeComponent-BJmRUKzI.mjs.map → ScopeComponent-00_hPc9T.mjs.map} +1 -1
  362. package/dist/chunks/{ScopeComponent-Dn9AdAJf.cjs → ScopeComponent-ByTiGqjs.cjs} +1 -1
  363. package/dist/chunks/{ScopeComponent-Dn9AdAJf.cjs.map → ScopeComponent-ByTiGqjs.cjs.map} +1 -1
  364. package/dist/chunks/_l10n-CWsOa8mM.cjs +125 -0
  365. package/dist/chunks/{_l10n-BGF_R72e.cjs.map → _l10n-CWsOa8mM.cjs.map} +1 -1
  366. package/dist/chunks/_l10n-DDx8P-X1.mjs +126 -0
  367. package/dist/chunks/_l10n-DDx8P-X1.mjs.map +1 -0
  368. package/dist/chunks/{index-CVcTbcD3.mjs → index-DbA2OZyf.mjs} +2 -2
  369. package/dist/chunks/index-DbA2OZyf.mjs.map +1 -0
  370. package/dist/chunks/{index-C8XDBNYC.cjs → index-oIpl1nrk.cjs} +2 -2
  371. package/dist/chunks/index-oIpl1nrk.cjs.map +1 -0
  372. package/dist/chunks/{referencePickerModal-D7ZD0avR.cjs → referencePickerModal-Dab6KzWL.cjs} +15 -16
  373. package/dist/chunks/referencePickerModal-Dab6KzWL.cjs.map +1 -0
  374. package/dist/chunks/{referencePickerModal-CGhrhjCk.mjs → referencePickerModal-KbBRUf9r.mjs} +15 -16
  375. package/dist/chunks/referencePickerModal-KbBRUf9r.mjs.map +1 -0
  376. package/dist/chunks/{usernameToColor-BKMu6XL_.cjs → usernameToColor-BzDTLedj.cjs} +1 -1
  377. package/dist/chunks/{usernameToColor-BKMu6XL_.cjs.map → usernameToColor-BzDTLedj.cjs.map} +1 -1
  378. package/dist/chunks/{usernameToColor-BkmF7_85.mjs → usernameToColor-CB3rGdYw.mjs} +1 -1
  379. package/dist/chunks/{usernameToColor-BkmF7_85.mjs.map → usernameToColor-CB3rGdYw.mjs.map} +1 -1
  380. package/dist/components/NcCollectionList/service.d.ts +47 -0
  381. package/dist/composables/actions/useActionText.d.ts +14 -0
  382. package/dist/index.cjs +45 -42
  383. package/dist/index.cjs.map +1 -1
  384. package/dist/index.mjs +48 -45
  385. package/dist/index.mjs.map +1 -1
  386. package/package.json +3 -2
  387. package/dist/assets/NcActionInput-K-aWGceI.css +0 -222
  388. package/dist/assets/NcActionTextEditable-BIjM-JsZ.css +0 -238
  389. package/dist/assets/NcButton-BlkIlpQf.css +0 -191
  390. package/dist/chunks/NcAppContent-B-VnA8x6.mjs.map +0 -1
  391. package/dist/chunks/NcAppContent-CoKCN5M3.cjs.map +0 -1
  392. package/dist/chunks/NcAppSidebar-Be2hX08l.cjs.map +0 -1
  393. package/dist/chunks/NcAppSidebar-DfMS3rRN.mjs.map +0 -1
  394. package/dist/chunks/NcBreadcrumbs-BRl8V6ie.mjs.map +0 -1
  395. package/dist/chunks/NcBreadcrumbs-BZFTIrPp.cjs.map +0 -1
  396. package/dist/chunks/NcCheckboxRadioSwitch-08IiPYnO.mjs.map +0 -1
  397. package/dist/chunks/NcCheckboxRadioSwitch-BC-PCCMB.cjs.map +0 -1
  398. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_45bd1a5d_lang-DM3kps3m.cjs +0 -4
  399. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_45bd1a5d_lang-DM3kps3m.cjs.map +0 -1
  400. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_45bd1a5d_lang-DP6Ws4da.mjs +0 -3
  401. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_45bd1a5d_lang-DP6Ws4da.mjs.map +0 -1
  402. package/dist/chunks/NcHeaderMenu-BEp6lzuy.mjs.map +0 -1
  403. package/dist/chunks/NcHeaderMenu-C7peZLEA.cjs.map +0 -1
  404. package/dist/chunks/NcRelatedResourcesPanel-Dlf-t8iR.cjs.map +0 -1
  405. package/dist/chunks/NcRelatedResourcesPanel-wFENPmmn.mjs.map +0 -1
  406. package/dist/chunks/NcRichText-B0CKR0jj.cjs.map +0 -1
  407. package/dist/chunks/NcRichText-D3knHFLh.mjs.map +0 -1
  408. package/dist/chunks/_l10n-B6zipH_A.mjs +0 -122
  409. package/dist/chunks/_l10n-B6zipH_A.mjs.map +0 -1
  410. package/dist/chunks/_l10n-BGF_R72e.cjs +0 -121
  411. package/dist/chunks/index-C8XDBNYC.cjs.map +0 -1
  412. package/dist/chunks/index-CVcTbcD3.mjs.map +0 -1
  413. package/dist/chunks/referencePickerModal-CGhrhjCk.mjs.map +0 -1
  414. package/dist/chunks/referencePickerModal-D7ZD0avR.cjs.map +0 -1
@@ -0,0 +1,430 @@
1
+ require('../assets/NcCollectionList-ETQTqkqt.css');
2
+ "use strict";
3
+ const debounce = require("debounce");
4
+ const Vue = require("vue");
5
+ const _l10n = require("./_l10n-CWsOa8mM.cjs");
6
+ const NcAvatar = require("./NcAvatar-BX8J9gZF.cjs");
7
+ const NcSelect = require("./NcSelect-CmV2Q0A0.cjs");
8
+ const autolink = require("./autolink-BAgL31EZ.cjs");
9
+ const NcActions = require("./NcActions-DRSoPS6a.cjs");
10
+ const Components_NcActionButton = require("../Components/NcActionButton.cjs");
11
+ const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-DbFIE4_M.cjs");
12
+ const axios = require("@nextcloud/axios");
13
+ const router = require("@nextcloud/router");
14
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
15
+ const debounce__default = /* @__PURE__ */ _interopDefault(debounce);
16
+ const axios__default = /* @__PURE__ */ _interopDefault(axios);
17
+ _l10n.register(_l10n.t7);
18
+ _l10n.register(_l10n.t26);
19
+ const _sfc_main$1 = {
20
+ name: "NcCollectionListItem",
21
+ components: {
22
+ NcAvatar: NcAvatar.NcAvatar,
23
+ NcActions: NcActions.NcActions,
24
+ NcActionButton: Components_NcActionButton
25
+ },
26
+ props: {
27
+ collection: {
28
+ type: Object,
29
+ default: null
30
+ },
31
+ error: {
32
+ type: String,
33
+ default: void 0
34
+ }
35
+ },
36
+ emits: ["remove-resource", "rename-collection"],
37
+ data() {
38
+ return {
39
+ detailsOpen: false,
40
+ newName: null
41
+ };
42
+ },
43
+ computed: {
44
+ getIcon() {
45
+ return (resource) => [resource.iconClass];
46
+ },
47
+ typeClass() {
48
+ return (resource) => "resource-type-" + resource.type;
49
+ },
50
+ resources() {
51
+ var _a, _b;
52
+ return (_b = (_a = this.collection.resources) == null ? void 0 : _a.filter((resource) => !Array.isArray(resource))) != null ? _b : [];
53
+ },
54
+ getComponent() {
55
+ return (resource) => {
56
+ const route = autolink.getRoute(this.$router, resource.link);
57
+ return route ? { component: "router-link", to: route, href: void 0 } : { component: "a", to: void 0, href: resource.link };
58
+ };
59
+ },
60
+ iconUrl() {
61
+ return (resource) => {
62
+ if (resource.mimetype) {
63
+ return OC.MimeType.getIconUrl(resource.mimetype);
64
+ }
65
+ if (resource.iconUrl) {
66
+ return resource.iconUrl;
67
+ }
68
+ return "";
69
+ };
70
+ }
71
+ },
72
+ methods: {
73
+ t: _l10n.t,
74
+ toggleDetails() {
75
+ this.detailsOpen = !this.detailsOpen;
76
+ },
77
+ showDetails() {
78
+ this.detailsOpen = true;
79
+ },
80
+ removeResource(collection, resource) {
81
+ this.$emit("remove-resource", {
82
+ collectionId: collection.id,
83
+ resourceType: resource.type,
84
+ resourceId: resource.id
85
+ });
86
+ },
87
+ openRename() {
88
+ this.newName = this.collection.name;
89
+ },
90
+ renameCollection() {
91
+ if (this.newName) {
92
+ this.$emit("rename-collection", {
93
+ collectionId: this.collection.id,
94
+ name: this.newName
95
+ });
96
+ }
97
+ this.newName = null;
98
+ }
99
+ }
100
+ };
101
+ var _sfc_render$1 = function render() {
102
+ var _vm = this, _c = _vm._self._c;
103
+ return _c("li", { staticClass: "collection-list-item" }, [_c("NcAvatar", { staticClass: "collection-avatar", attrs: { "display-name": _vm.collection.name, "allow-placeholder": "" } }), _vm.newName === null ? _c("span", { staticClass: "collection-item-name", attrs: { "title": "" }, on: { "click": _vm.showDetails } }, [_vm._v(_vm._s(_vm.collection.name))]) : _c("form", { class: { "should-shake": _vm.error }, on: { "submit": function($event) {
104
+ $event.preventDefault();
105
+ return _vm.renameCollection.apply(null, arguments);
106
+ } } }, [_c("input", { directives: [{ name: "model", rawName: "v-model", value: _vm.newName, expression: "newName" }], attrs: { "type": "text", "autocomplete": "off", "autocapitalize": "off" }, domProps: { "value": _vm.newName }, on: { "input": function($event) {
107
+ if ($event.target.composing) return;
108
+ _vm.newName = $event.target.value;
109
+ } } }), _c("input", { staticClass: "icon-confirm", attrs: { "type": "submit", "value": "" } })]), !_vm.detailsOpen && _vm.newName === null ? _c("div", { staticClass: "linked-icons" }, _vm._l(_vm.resources.slice(0, 2), function(resource) {
110
+ return _c(_vm.getComponent(resource).component, { key: resource.type + "|" + resource.id, tag: "component", class: _vm.typeClass(resource), attrs: { "title": resource.name, "to": _vm.getComponent(resource).to, "href": _vm.getComponent(resource).href } }, [_c("img", { attrs: { "src": _vm.iconUrl(resource), "alt": resource.name } })]);
111
+ }), 1) : _vm._e(), _vm.newName === null ? _c("span", { staticClass: "sharingOptionsGroup" }, [_c("NcActions", [_c("NcActionButton", { attrs: { "icon": "icon-info" }, on: { "click": function($event) {
112
+ $event.preventDefault();
113
+ return _vm.toggleDetails.apply(null, arguments);
114
+ } } }, [_vm._v(" " + _vm._s(_vm.detailsOpen ? _vm.t("Hide details") : _vm.t("Show details")) + " ")]), _c("NcActionButton", { attrs: { "icon": "icon-rename" }, on: { "click": function($event) {
115
+ $event.preventDefault();
116
+ return _vm.openRename.apply(null, arguments);
117
+ } } }, [_vm._v(" " + _vm._s(_vm.t("Rename project")) + " ")])], 1)], 1) : _vm._e(), _c("transition", { attrs: { "name": "fade" } }, [_vm.error ? _c("div", { staticClass: "error" }, [_vm._v(" " + _vm._s(_vm.error) + " ")]) : _vm._e()]), _c("transition", { attrs: { "name": "fade" } }, [_vm.detailsOpen ? _c("ul", { staticClass: "resource-list-details" }, _vm._l(_vm.resources, function(resource) {
118
+ return _c("li", { key: resource.type + "|" + resource.id, class: _vm.typeClass(resource) }, [_c(_vm.getComponent(resource).component, { tag: "component", attrs: { "to": _vm.getComponent(resource).to, "href": _vm.getComponent(resource).href } }, [_c("img", { attrs: { "src": _vm.iconUrl(resource), "alt": resource.name } }), _c("span", { staticClass: "resource-name" }, [_vm._v(_vm._s(resource.name || ""))])]), _c("span", { staticClass: "icon-close", on: { "click": function($event) {
119
+ return _vm.removeResource(_vm.collection, resource);
120
+ } } })], 1);
121
+ }), 0) : _vm._e()])], 1);
122
+ };
123
+ var _sfc_staticRenderFns$1 = [];
124
+ var __component__$1 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
125
+ _sfc_main$1,
126
+ _sfc_render$1,
127
+ _sfc_staticRenderFns$1,
128
+ false,
129
+ null,
130
+ "878b819f",
131
+ null,
132
+ null
133
+ );
134
+ const NcCollectionListItem = __component__$1.exports;
135
+ function extractOcsData(response) {
136
+ return response.data.ocs.data;
137
+ }
138
+ function renameCollectionService(collectionId, collectionName) {
139
+ return axios__default.default.put(router.generateOcsUrl("collaboration/resources/collections/{collectionId}", { collectionId }), { collectionName }).then(extractOcsData);
140
+ }
141
+ function getCollectionsByResourceService(resourceType, resourceId) {
142
+ return axios__default.default.get(router.generateOcsUrl("collaboration/resources/{resourceType}/{resourceId}", { resourceType, resourceId })).then(extractOcsData);
143
+ }
144
+ function createCollectionService(resourceType, resourceId, name) {
145
+ return axios__default.default.post(router.generateOcsUrl("collaboration/resources/{resourceType}/{resourceId}", { resourceType, resourceId }), { name }).then(extractOcsData);
146
+ }
147
+ function addResourceService(collectionId, resourceType, resourceId) {
148
+ return axios__default.default.post(router.generateOcsUrl("collaboration/resources/collections/{collectionId}", { collectionId }), { resourceType, resourceId }).then(extractOcsData);
149
+ }
150
+ function removeResourceService(collectionId, resourceType, resourceId) {
151
+ return axios__default.default.delete(router.generateOcsUrl("collaboration/resources/collections/{collectionId}", { collectionId }), { params: { resourceType, resourceId } }).then(extractOcsData);
152
+ }
153
+ function searchService(query) {
154
+ return axios__default.default.get(router.generateOcsUrl("collaboration/resources/collections/search/{query}", { query })).then(extractOcsData);
155
+ }
156
+ function useCollections() {
157
+ const storedCollections = Vue.ref([]);
158
+ const addCollections = (collections) => {
159
+ Vue.set(storedCollections, "value", collections);
160
+ };
161
+ const addCollection = (collection) => {
162
+ Vue.set(storedCollections, "value", [...storedCollections.value, collection]);
163
+ };
164
+ const removeCollection = (collectionId) => {
165
+ Vue.set(storedCollections, "value", storedCollections.value.filter((item) => item.id !== collectionId));
166
+ };
167
+ const updateCollection = (collection) => {
168
+ const index = storedCollections.value.findIndex((item) => item.id === collection.id);
169
+ if (index !== -1) {
170
+ Vue.set(storedCollections.value, index, collection);
171
+ } else {
172
+ addCollection(collection);
173
+ }
174
+ };
175
+ const fetchCollectionsByResource = async ({ resourceType, resourceId }) => {
176
+ const collections = await getCollectionsByResourceService(resourceType, resourceId);
177
+ addCollections(collections);
178
+ };
179
+ const createCollection = async ({ baseResourceType, baseResourceId, resourceType, resourceId, name }) => {
180
+ const collection = await createCollectionService(baseResourceType, baseResourceId, name);
181
+ addCollection(collection);
182
+ await addResourceToCollection({
183
+ collectionId: collection.id,
184
+ resourceType,
185
+ resourceId
186
+ });
187
+ };
188
+ const renameCollection = async ({ collectionId, name }) => {
189
+ const collection = await renameCollectionService(collectionId, name);
190
+ updateCollection(collection);
191
+ };
192
+ const addResourceToCollection = async ({ collectionId, resourceType, resourceId }) => {
193
+ const collection = await addResourceService(collectionId, resourceType, String(resourceId));
194
+ updateCollection(collection);
195
+ };
196
+ const removeResourceFromCollection = async ({ collectionId, resourceType, resourceId }) => {
197
+ const collection = await removeResourceService(collectionId, resourceType, String(resourceId));
198
+ if (collection.resources.length > 0) {
199
+ updateCollection(collection);
200
+ } else {
201
+ removeCollection(collectionId);
202
+ }
203
+ };
204
+ return {
205
+ storedCollections,
206
+ fetchCollectionsByResource,
207
+ createCollection,
208
+ renameCollection,
209
+ addResourceToCollection,
210
+ removeResourceFromCollection
211
+ };
212
+ }
213
+ const METHOD_CREATE_COLLECTION = 0;
214
+ const METHOD_ADD_TO_COLLECTION = 1;
215
+ const _sfc_main = {
216
+ name: "NcCollectionList",
217
+ components: {
218
+ NcCollectionListItem,
219
+ NcAvatar: NcAvatar.NcAvatar,
220
+ NcSelect: NcSelect.NcSelect
221
+ },
222
+ props: {
223
+ /**
224
+ * Resource type identifier
225
+ */
226
+ type: {
227
+ type: String,
228
+ default: null
229
+ },
230
+ /**
231
+ * Unique id of the resource
232
+ */
233
+ id: {
234
+ type: String,
235
+ default: null
236
+ },
237
+ /**
238
+ * Name of the resource
239
+ */
240
+ name: {
241
+ type: String,
242
+ default: ""
243
+ },
244
+ /**
245
+ * Whether the component is active (to start fetch resources)
246
+ */
247
+ isActive: {
248
+ type: Boolean,
249
+ default: true
250
+ }
251
+ },
252
+ setup() {
253
+ const {
254
+ storedCollections,
255
+ fetchCollectionsByResource,
256
+ createCollection,
257
+ addResourceToCollection,
258
+ removeResourceFromCollection,
259
+ renameCollection
260
+ } = useCollections();
261
+ const searchCollections = Vue.ref([]);
262
+ const search = debounce__default.default(function(query, loading) {
263
+ if (query !== "") {
264
+ loading(true);
265
+ searchService(query).then((collections) => {
266
+ searchCollections.value = collections;
267
+ }).catch((e) => {
268
+ console.error("Failed to search for collections", e);
269
+ }).finally(() => {
270
+ loading(false);
271
+ });
272
+ }
273
+ }, 500);
274
+ return {
275
+ storedCollections,
276
+ fetchCollectionsByResource,
277
+ createCollection,
278
+ addResourceToCollection,
279
+ removeResourceFromCollection,
280
+ renameCollection,
281
+ searchCollections,
282
+ search
283
+ };
284
+ },
285
+ data() {
286
+ return {
287
+ selectIsOpen: false,
288
+ generatingCodes: false,
289
+ codes: void 0,
290
+ value: null,
291
+ model: {},
292
+ collectionsError: {},
293
+ error: null,
294
+ isSelectOpen: false
295
+ };
296
+ },
297
+ computed: {
298
+ collections() {
299
+ return this.storedCollections.filter(
300
+ (collection) => collection.resources.some((resource) => resource && resource.id === String(this.id) && resource.type === this.type)
301
+ );
302
+ },
303
+ placeholder() {
304
+ return this.isSelectOpen ? _l10n.t("Type to search for existing projects") : _l10n.t("Add to a project");
305
+ },
306
+ options() {
307
+ const options = [];
308
+ window.OCP.Collaboration.getTypes().sort().forEach((type) => {
309
+ options.push({
310
+ method: METHOD_CREATE_COLLECTION,
311
+ type,
312
+ title: window.OCP.Collaboration.getLabel(type),
313
+ class: window.OCP.Collaboration.getIcon(type),
314
+ action: () => window.OCP.Collaboration.trigger(type)
315
+ });
316
+ });
317
+ for (const index in this.searchCollections) {
318
+ if (!this.collections.find((collection) => collection.id === this.searchCollections[index].id)) {
319
+ options.push({
320
+ method: METHOD_ADD_TO_COLLECTION,
321
+ title: this.searchCollections[index].name,
322
+ collectionId: this.searchCollections[index].id
323
+ });
324
+ }
325
+ }
326
+ return options;
327
+ },
328
+ resourceIdentifier() {
329
+ return {
330
+ resourceType: this.type,
331
+ resourceId: this.id,
332
+ isActive: this.isActive
333
+ };
334
+ }
335
+ },
336
+ watch: {
337
+ resourceIdentifier: {
338
+ deep: true,
339
+ immediate: true,
340
+ handler(resourceIdentifier) {
341
+ if (!resourceIdentifier.isActive || !resourceIdentifier.resourceId || !resourceIdentifier.resourceType) {
342
+ return;
343
+ }
344
+ this.fetchCollectionsByResource(resourceIdentifier);
345
+ }
346
+ }
347
+ },
348
+ methods: {
349
+ t: _l10n.t,
350
+ select(selectedOption) {
351
+ if (selectedOption.method === METHOD_CREATE_COLLECTION) {
352
+ selectedOption.action().then((resourceId) => {
353
+ this.createCollection({
354
+ baseResourceType: this.type,
355
+ baseResourceId: this.id,
356
+ resourceType: selectedOption.type,
357
+ resourceId,
358
+ name: this.name
359
+ }).catch((e) => {
360
+ this.setError(_l10n.t("Failed to create a project"), e);
361
+ });
362
+ }).catch((e) => {
363
+ console.error("No resource selected", e);
364
+ });
365
+ }
366
+ if (selectedOption.method === METHOD_ADD_TO_COLLECTION) {
367
+ this.addResourceToCollection({
368
+ collectionId: selectedOption.collectionId,
369
+ resourceType: this.type,
370
+ resourceId: this.id
371
+ }).catch((e) => {
372
+ this.setError(_l10n.t("Failed to add the item to the project"), e);
373
+ });
374
+ }
375
+ this.value = null;
376
+ },
377
+ showSelect() {
378
+ this.selectIsOpen = true;
379
+ this.$refs.select.$el.focus();
380
+ },
381
+ setError(error, e) {
382
+ console.error(error, e);
383
+ this.error = error;
384
+ setTimeout(() => {
385
+ this.error = null;
386
+ }, 5e3);
387
+ },
388
+ renameCollectionFromItem({ collectionId, name }) {
389
+ this.renameCollection({ collectionId, name }).catch((e) => {
390
+ console.error(_l10n.t("Failed to rename the project"), e);
391
+ this.collectionsError[collectionId] = _l10n.t("Failed to rename the project");
392
+ setTimeout(() => {
393
+ this.collectionsError[collectionId] = null;
394
+ }, 5e3);
395
+ });
396
+ }
397
+ }
398
+ };
399
+ var _sfc_render = function render2() {
400
+ var _vm = this, _c = _vm._self._c;
401
+ return _vm.collections && _vm.type && _vm.id ? _c("ul", { staticClass: "collection-list", attrs: { "id": "collection-list" } }, [_c("li", { on: { "click": _vm.showSelect } }, [_vm._m(0), _c("div", { attrs: { "id": "collection-select-container" } }, [_c("NcSelect", { ref: "select", attrs: { "aria-label-combobox": _vm.t("Add to a project"), "options": _vm.options, "placeholder": _vm.placeholder, "label": "title", "limit": 5 }, on: { "close": function($event) {
402
+ _vm.isSelectOpen = false;
403
+ }, "open": function($event) {
404
+ _vm.isSelectOpen = true;
405
+ }, "option:selected": _vm.select, "search": _vm.search }, scopedSlots: _vm._u([{ key: "selected-option", fn: function(option) {
406
+ return [_c("span", { staticClass: "option__desc" }, [_c("span", { staticClass: "option__title" }, [_vm._v(_vm._s(option.title))])])];
407
+ } }, { key: "option", fn: function(option) {
408
+ return [_c("span", { staticClass: "option__wrapper" }, [option.class ? _c("span", { staticClass: "avatar", class: option.class }) : option.method !== 2 ? _c("NcAvatar", { attrs: { "allow-placeholder": "", "display-name": option.title } }) : _vm._e(), _c("span", { staticClass: "option__title" }, [_vm._v(_vm._s(option.title))])], 1)];
409
+ } }], null, false, 2397208459), model: { value: _vm.value, callback: function($$v) {
410
+ _vm.value = $$v;
411
+ }, expression: "value" } }, [_c("p", { staticClass: "hint" }, [_vm._v(" " + _vm._s(_vm.t("Connect items to a project to make them easier to find")) + " ")])])], 1)]), _c("transition", { attrs: { "name": "fade" } }, [_vm.error ? _c("li", { staticClass: "error" }, [_vm._v(" " + _vm._s(_vm.error) + " ")]) : _vm._e()]), _vm._l(_vm.collections, function(collection) {
412
+ return _c("NcCollectionListItem", { key: collection.id, attrs: { "collection": collection, "error": _vm.collectionsError[collection.id] }, on: { "rename-collection": _vm.renameCollectionFromItem, "remove-resource": _vm.removeResourceFromCollection } });
413
+ })], 2) : _vm._e();
414
+ };
415
+ var _sfc_staticRenderFns = [function() {
416
+ var _vm = this, _c = _vm._self._c;
417
+ return _c("div", { staticClass: "avatar" }, [_c("span", { staticClass: "icon-projects" })]);
418
+ }];
419
+ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
420
+ _sfc_main,
421
+ _sfc_render,
422
+ _sfc_staticRenderFns,
423
+ false,
424
+ null,
425
+ "efe8beb8",
426
+ null,
427
+ null
428
+ );
429
+ const NcCollectionList = __component__.exports;
430
+ exports.NcCollectionList = NcCollectionList;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcCollectionList-D4oNsvJ0.cjs","sources":["../../src/components/NcCollectionList/NcCollectionListItem.vue","../../src/components/NcCollectionList/service.ts","../../src/components/NcCollectionList/useCollections.js","../../src/components/NcCollectionList/NcCollectionList.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<li class=\"collection-list-item\">\n\t\t<NcAvatar :display-name=\"collection.name\" allow-placeholder class=\"collection-avatar\" />\n\t\t<span v-if=\"newName === null\"\n\t\t\tclass=\"collection-item-name\"\n\t\t\ttitle=\"\"\n\t\t\t@click=\"showDetails\">{{ collection.name }}</span>\n\t\t<form v-else :class=\"{'should-shake': error }\" @submit.prevent=\"renameCollection\">\n\t\t\t<input v-model=\"newName\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tautocomplete=\"off\"\n\t\t\t\tautocapitalize=\"off\">\n\t\t\t<input type=\"submit\" value=\"\" class=\"icon-confirm\">\n\t\t</form>\n\t\t<div v-if=\"!detailsOpen && newName === null\" class=\"linked-icons\">\n\t\t\t<component :is=\"getComponent(resource).component\"\n\t\t\t\tv-for=\"resource in resources.slice(0, 2)\"\n\t\t\t\t:key=\"resource.type + '|' + resource.id\"\n\t\t\t\t:title=\"resource.name\"\n\t\t\t\t:to=\"getComponent(resource).to\"\n\t\t\t\t:href=\"getComponent(resource).href\"\n\t\t\t\t:class=\"typeClass(resource)\">\n\t\t\t\t<img :src=\"iconUrl(resource)\" :alt=\"resource.name\">\n\t\t\t</component>\n\t\t</div>\n\n\t\t<span v-if=\"newName === null\" class=\"sharingOptionsGroup\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton icon=\"icon-info\"\n\t\t\t\t\t@click.prevent=\"toggleDetails\">\n\t\t\t\t\t{{ detailsOpen ? t('Hide details') : t('Show details') }}\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton icon=\"icon-rename\"\n\t\t\t\t\t@click.prevent=\"openRename\">\n\t\t\t\t\t{{ t('Rename project') }}\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</span>\n\n\t\t<transition name=\"fade\">\n\t\t\t<div v-if=\"error\" class=\"error\">\n\t\t\t\t{{ error }}\n\t\t\t</div>\n\t\t</transition>\n\t\t<transition name=\"fade\">\n\t\t\t<ul v-if=\"detailsOpen\" class=\"resource-list-details\">\n\t\t\t\t<li v-for=\"resource in resources\"\n\t\t\t\t\t:key=\"resource.type + '|' + resource.id\"\n\t\t\t\t\t:class=\"typeClass(resource)\">\n\t\t\t\t\t<component :is=\"getComponent(resource).component\"\n\t\t\t\t\t\t:to=\"getComponent(resource).to\"\n\t\t\t\t\t\t:href=\"getComponent(resource).href\">\n\t\t\t\t\t\t<img :src=\"iconUrl(resource)\" :alt=\"resource.name\">\n\t\t\t\t\t\t<span class=\"resource-name\">{{ resource.name || '' }}</span>\n\t\t\t\t\t</component>\n\t\t\t\t\t<span class=\"icon-close\" @click=\"removeResource(collection, resource)\" />\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</transition>\n\t</li>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\nimport { getRoute } from '../NcRichText/autolink.js'\n\nimport NcActions from '../NcActions/index.js'\nimport NcActionButton from '../NcActionButton/index.js'\nimport NcAvatar from '../NcAvatar/index.js'\n\nexport default {\n\tname: 'NcCollectionListItem',\n\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcActions,\n\t\tNcActionButton,\n\t},\n\n\tprops: {\n\t\tcollection: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\terror: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\temits: ['remove-resource', 'rename-collection'],\n\n\tdata() {\n\t\treturn {\n\t\t\tdetailsOpen: false,\n\t\t\tnewName: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tgetIcon() {\n\t\t\treturn (resource) => [resource.iconClass]\n\t\t},\n\n\t\ttypeClass() {\n\t\t\treturn (resource) => 'resource-type-' + resource.type\n\t\t},\n\n\t\tresources() {\n\t\t\t// invalid resources come from server as empty array ([]) and not an object\n\t\t\treturn this.collection.resources?.filter(resource => !Array.isArray(resource)) ?? []\n\t\t},\n\n\t\tgetComponent() {\n\t\t\treturn (resource) => {\n\t\t\t\tconst route = getRoute(this.$router, resource.link)\n\n\t\t\t\treturn route\n\t\t\t\t\t? { component: 'router-link', to: route, href: undefined }\n\t\t\t\t\t: { component: 'a', to: undefined, href: resource.link }\n\t\t\t}\n\t\t},\n\n\t\ticonUrl() {\n\t\t\treturn (resource) => {\n\t\t\t\tif (resource.mimetype) {\n\t\t\t\t\treturn OC.MimeType.getIconUrl(resource.mimetype)\n\t\t\t\t}\n\t\t\t\tif (resource.iconUrl) {\n\t\t\t\t\treturn resource.iconUrl\n\t\t\t\t}\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\ttoggleDetails() {\n\t\t\tthis.detailsOpen = !this.detailsOpen\n\t\t},\n\n\t\tshowDetails() {\n\t\t\tthis.detailsOpen = true\n\t\t},\n\n\t\tremoveResource(collection, resource) {\n\t\t\tthis.$emit('remove-resource', {\n\t\t\t\tcollectionId: collection.id,\n\t\t\t\tresourceType: resource.type,\n\t\t\t\tresourceId: resource.id,\n\t\t\t})\n\t\t},\n\n\t\topenRename() {\n\t\t\tthis.newName = this.collection.name\n\t\t},\n\n\t\trenameCollection() {\n\t\t\tif (this.newName) {\n\t\t\t\tthis.$emit('rename-collection', {\n\t\t\t\t\tcollectionId: this.collection.id,\n\t\t\t\t\tname: this.newName,\n\t\t\t\t})\n\t\t\t}\n\t\t\tthis.newName = null\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .3s ease;\n}\n\n.fade-enter, .fade-leave-to\n\t/* .fade-leave-active below version 2.1.8 */\n{\n\topacity: 0;\n}\n\n.linked-icons {\n\tdisplay: flex;\n\n\timg {\n\t\tpadding: 12px;\n\t\theight: 44px;\n\t\tdisplay: block;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\topacity: 0.7;\n\n\t\t&:hover {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n.popovermenu {\n\tdisplay: none;\n\n\t&.open {\n\t\tdisplay: block;\n\t}\n}\n\nli.collection-list-item {\n\tflex-wrap: wrap;\n\theight: auto;\n\tcursor: pointer;\n\tmargin-bottom: 0 !important;\n\n\t.collection-avatar {\n\t\tmargin-top: 0;\n\t}\n\n\tform, .collection-item-name {\n\t\tflex-basis: 10%;\n\t\tflex-grow: 1;\n\t\tdisplay: flex;\n\t}\n\n\t.collection-item-name {\n\t\tpadding: 12px 9px;\n\t}\n\n\tinput {\n\t\tmargin-top: 4px;\n\t\tborder-color: var(--color-border-maxcontrast);\n\n\t\t&[type=text] {\n\t\t\tflex-grow: 1;\n\t\t}\n\t}\n\n\t.error {\n\t\tflex-basis: 100%;\n\t\twidth: 100%;\n\t}\n\n\t.resource-list-details {\n\t\tflex-basis: 100%;\n\t\twidth: 100%;\n\n\t\tli {\n\t\t\tdisplay: flex;\n\t\t\tmargin-left: 44px;\n\t\t\tborder-radius: 3px;\n\t\t\tcursor: pointer;\n\n\t\t\t&:hover {\n\t\t\t\tbackground-color: var(--color-background-dark);\n\t\t\t}\n\n\t\t\ta {\n\t\t\t\tflex-grow: 1;\n\t\t\t\tpadding: 3px;\n\t\t\t\tmax-width: calc(100% - 30px);\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\tspan {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: top;\n\t\t\tmargin-right: 10px;\n\t\t}\n\n\t\tspan.resource-name {\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t\tposition: relative;\n\t\t\tvertical-align: top;\n\t\t\twhite-space: nowrap;\n\t\t\tflex-grow: 1;\n\t\t\tpadding: 4px;\n\t\t}\n\n\t\timg {\n\t\t\twidth: 24px;\n\t\t\theight: 24px;\n\t\t}\n\n\t\t.icon-close {\n\t\t\topacity: .7;\n\n\t\t\t&:hover, &:focus {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.should-shake {\n\tanimation: shake 0.6s 1 linear;\n}\n\n@keyframes shake {\n\t0% {\n\t\ttransform: translate(15px);\n\t}\n\t20% {\n\t\ttransform: translate(-15px);\n\t}\n\t40% {\n\t\ttransform: translate(7px);\n\t}\n\t60% {\n\t\ttransform: translate(-7px);\n\t}\n\t80% {\n\t\ttransform: translate(3px);\n\t}\n\t100% {\n\t\ttransform: translate(0px);\n\t}\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport axios, { type AxiosResponse } from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport type { OCSResponse } from '@nextcloud/typings/ocs'\n\n/**\n * Extracts the OCS data from a response\n * @param response OCS response\n */\nfunction extractOcsData(response: AxiosResponse<OCSResponse>) {\n\treturn response.data.ocs.data\n}\n\n/**\n * Lists all collections\n * @param collectionId Collection ID\n */\nexport function listCollectionService(collectionId: number) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId })).then(extractOcsData)\n}\n\n/**\n * Renames a collection\n * @param collectionId Collection ID\n * @param collectionName New collection name\n */\nexport function renameCollectionService(collectionId: number, collectionName: string) {\n\treturn axios.put(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { collectionName }).then(extractOcsData)\n}\n\n/**\n * Lists all collections for a resource\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function getCollectionsByResourceService(resourceType: string, resourceId: string) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/{resourceType}/{resourceId}', { resourceType, resourceId })).then(extractOcsData)\n}\n\n/**\n * Creates a collection\n * @param resourceType Resource type\n * @param resourceId Resource ID\n * @param name Collection name\n */\nexport function createCollectionService(resourceType: string, resourceId: string, name: string) {\n\treturn axios.post(generateOcsUrl('collaboration/resources/{resourceType}/{resourceId}', { resourceType, resourceId }), { name }).then(extractOcsData)\n}\n\n/**\n * Adds a resource to a collection\n * @param collectionId Collection ID\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function addResourceService(collectionId: number, resourceType: string, resourceId: string) {\n\treturn axios.post(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { resourceType, resourceId }).then(extractOcsData)\n}\n\n/**\n * Removes a resource from a collection\n * @param collectionId Collection ID\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function removeResourceService(collectionId: number, resourceType: string, resourceId: string) {\n\treturn axios.delete(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { params: { resourceType, resourceId } }).then(extractOcsData)\n}\n\n/**\n * Searches for collections\n * @param query Search query\n */\nexport function searchService(query: string) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/collections/search/{query}', { query })).then(extractOcsData)\n}\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { ref, set } from 'vue'\nimport {\n\trenameCollectionService,\n\tgetCollectionsByResourceService,\n\tcreateCollectionService,\n\taddResourceService,\n\tremoveResourceService,\n} from './service.ts'\n\n/**\n * Use collections composable\n */\nexport function useCollections() {\n\t// State\n\tconst storedCollections = ref([])\n\n\t// Mutations\n\tconst addCollections = (collections) => {\n\t\tset(storedCollections, 'value', collections)\n\t}\n\n\tconst addCollection = (collection) => {\n\t\tset(storedCollections, 'value', [...storedCollections.value, collection])\n\t}\n\n\tconst removeCollection = (collectionId) => {\n\t\tset(storedCollections, 'value', storedCollections.value.filter(item => item.id !== collectionId))\n\t}\n\n\tconst updateCollection = (collection) => {\n\t\tconst index = storedCollections.value.findIndex(item => item.id === collection.id)\n\t\tif (index !== -1) {\n\t\t\tset(storedCollections.value, index, collection)\n\t\t} else {\n\t\t\taddCollection(collection)\n\t\t}\n\t}\n\n\t// Actions\n\tconst fetchCollectionsByResource = async ({ resourceType, resourceId }) => {\n\t\tconst collections = await getCollectionsByResourceService(resourceType, resourceId)\n\n\t\taddCollections(collections)\n\t}\n\n\tconst createCollection = async ({ baseResourceType, baseResourceId, resourceType, resourceId, name }) => {\n\t\tconst collection = await createCollectionService(baseResourceType, baseResourceId, name)\n\n\t\taddCollection(collection)\n\t\tawait addResourceToCollection({\n\t\t\tcollectionId: collection.id,\n\t\t\tresourceType,\n\t\t\tresourceId,\n\t\t})\n\t}\n\n\tconst renameCollection = async ({ collectionId, name }) => {\n\t\tconst collection = await renameCollectionService(collectionId, name)\n\n\t\tupdateCollection(collection)\n\t}\n\n\tconst addResourceToCollection = async ({ collectionId, resourceType, resourceId }) => {\n\t\tconst collection = await addResourceService(collectionId, resourceType, String(resourceId))\n\n\t\tupdateCollection(collection)\n\t}\n\n\tconst removeResourceFromCollection = async ({ collectionId, resourceType, resourceId }) => {\n\t\tconst collection = await removeResourceService(collectionId, resourceType, String(resourceId))\n\n\t\tif (collection.resources.length > 0) {\n\t\t\tupdateCollection(collection)\n\t\t} else {\n\t\t\tremoveCollection(collectionId)\n\t\t}\n\t}\n\n\treturn {\n\t\tstoredCollections,\n\t\tfetchCollectionsByResource,\n\t\tcreateCollection,\n\t\trenameCollection,\n\t\taddResourceToCollection,\n\t\tremoveResourceFromCollection,\n\t}\n}\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nProvides a Vue standalone component for Nextcloud Projects feature introduced in Nextcloud 16. Replaces deprecated `nextcloud-vue-collections` library.\n\nProjects feature is deprecated since Nextcloud 25, and superseded by Related resources. See [NcRelatedResourcesPanel](#/Components/NcRelatedResourcesPanel) documentation for more information.\n\n### Usage\n\nTo enable feature in Nextcloud, run following command:\n```sh\nocc config:system:set --value true 'projects.enabled'\n```\n</docs>\n\n<template>\n\t<ul v-if=\"collections && type && id\" id=\"collection-list\" class=\"collection-list\">\n\t\t<li @click=\"showSelect\">\n\t\t\t<div class=\"avatar\">\n\t\t\t\t<span class=\"icon-projects\" />\n\t\t\t</div>\n\t\t\t<div id=\"collection-select-container\">\n\t\t\t\t<NcSelect ref=\"select\"\n\t\t\t\t\tv-model=\"value\"\n\t\t\t\t\t:aria-label-combobox=\"t('Add to a project')\"\n\t\t\t\t\t:options=\"options\"\n\t\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t\tlabel=\"title\"\n\t\t\t\t\t:limit=\"5\"\n\t\t\t\t\t@close=\"isSelectOpen = false\"\n\t\t\t\t\t@open=\"isSelectOpen = true\"\n\t\t\t\t\t@option:selected=\"select\"\n\t\t\t\t\t@search=\"search\">\n\t\t\t\t\t<template #selected-option=\"option\">\n\t\t\t\t\t\t<span class=\"option__desc\">\n\t\t\t\t\t\t\t<span class=\"option__title\">{{ option.title }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #option=\"option\">\n\t\t\t\t\t\t<span class=\"option__wrapper\">\n\t\t\t\t\t\t\t<span v-if=\"option.class\" :class=\"option.class\" class=\"avatar\" />\n\t\t\t\t\t\t\t<NcAvatar v-else-if=\"option.method !== 2\" allow-placeholder :display-name=\"option.title\" />\n\t\t\t\t\t\t\t<span class=\"option__title\">{{ option.title }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<p class=\"hint\">\n\t\t\t\t\t\t{{ t('Connect items to a project to make them easier to find') }}\n\t\t\t\t\t</p>\n\t\t\t\t</NcSelect>\n\t\t\t</div>\n\t\t</li>\n\t\t<transition name=\"fade\">\n\t\t\t<li v-if=\"error\" class=\"error\">\n\t\t\t\t{{ error }}\n\t\t\t</li>\n\t\t</transition>\n\t\t<NcCollectionListItem v-for=\"collection in collections\"\n\t\t\t:key=\"collection.id\"\n\t\t\t:collection=\"collection\"\n\t\t\t:error=\"collectionsError[collection.id]\"\n\t\t\t@rename-collection=\"renameCollectionFromItem\"\n\t\t\t@remove-resource=\"removeResourceFromCollection\" />\n\t</ul>\n</template>\n\n<script>\nimport debounce from 'debounce'\nimport { ref } from 'vue'\nimport { t } from '../../l10n.js'\n\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcSelect from '../NcSelect/index.js'\nimport NcCollectionListItem from './NcCollectionListItem.vue'\n\nimport { useCollections } from './useCollections.js'\nimport { searchService } from './service.ts'\n\nconst METHOD_CREATE_COLLECTION = 0\nconst METHOD_ADD_TO_COLLECTION = 1\n\nexport default {\n\tname: 'NcCollectionList',\n\n\tcomponents: {\n\t\tNcCollectionListItem,\n\t\tNcAvatar,\n\t\tNcSelect,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Resource type identifier\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Unique id of the resource\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Name of the resource\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Whether the component is active (to start fetch resources)\n\t\t */\n\t\tisActive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst {\n\t\t\tstoredCollections,\n\t\t\tfetchCollectionsByResource,\n\t\t\tcreateCollection,\n\t\t\taddResourceToCollection,\n\t\t\tremoveResourceFromCollection,\n\t\t\trenameCollection,\n\t\t} = useCollections()\n\n\t\tconst searchCollections = ref([])\n\t\tconst search = debounce(function(query, loading) {\n\t\t\tif (query !== '') {\n\t\t\t\tloading(true)\n\t\t\t\tsearchService(query).then(collections => {\n\t\t\t\t\tsearchCollections.value = collections\n\t\t\t\t}).catch(e => {\n\t\t\t\t\tconsole.error('Failed to search for collections', e)\n\t\t\t\t}).finally(() => {\n\t\t\t\t\tloading(false)\n\t\t\t\t})\n\t\t\t}\n\t\t}, 500)\n\n\t\treturn {\n\t\t\tstoredCollections,\n\t\t\tfetchCollectionsByResource,\n\t\t\tcreateCollection,\n\t\t\taddResourceToCollection,\n\t\t\tremoveResourceFromCollection,\n\t\t\trenameCollection,\n\t\t\tsearchCollections,\n\t\t\tsearch,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tselectIsOpen: false,\n\t\t\tgeneratingCodes: false,\n\t\t\tcodes: undefined,\n\t\t\tvalue: null,\n\t\t\tmodel: {},\n\t\t\tcollectionsError: {},\n\t\t\terror: null,\n\t\t\tisSelectOpen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcollections() {\n\t\t\treturn this.storedCollections.filter(collection => collection.resources\n\t\t\t\t.some(resource => resource && resource.id === String(this.id) && resource.type === this.type),\n\t\t\t)\n\t\t},\n\n\t\tplaceholder() {\n\t\t\treturn this.isSelectOpen\n\t\t\t\t? t('Type to search for existing projects')\n\t\t\t\t: t('Add to a project')\n\t\t},\n\n\t\toptions() {\n\t\t\tconst options = []\n\t\t\twindow.OCP.Collaboration.getTypes().sort().forEach(type => {\n\t\t\t\toptions.push({\n\t\t\t\t\tmethod: METHOD_CREATE_COLLECTION,\n\t\t\t\t\ttype,\n\t\t\t\t\ttitle: window.OCP.Collaboration.getLabel(type),\n\t\t\t\t\tclass: window.OCP.Collaboration.getIcon(type),\n\t\t\t\t\taction: () => window.OCP.Collaboration.trigger(type),\n\t\t\t\t})\n\t\t\t})\n\t\t\tfor (const index in this.searchCollections) {\n\t\t\t\tif (!this.collections.find(collection => collection.id === this.searchCollections[index].id)) {\n\t\t\t\t\toptions.push({\n\t\t\t\t\t\tmethod: METHOD_ADD_TO_COLLECTION,\n\t\t\t\t\t\ttitle: this.searchCollections[index].name,\n\t\t\t\t\t\tcollectionId: this.searchCollections[index].id,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn options\n\t\t},\n\n\t\tresourceIdentifier() {\n\t\t\treturn {\n\t\t\t\tresourceType: this.type,\n\t\t\t\tresourceId: this.id,\n\t\t\t\tisActive: this.isActive,\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tresourceIdentifier: {\n\t\t\tdeep: true,\n\t\t\timmediate: true,\n\t\t\thandler(resourceIdentifier) {\n\t\t\t\tif (!resourceIdentifier.isActive || !resourceIdentifier.resourceId || !resourceIdentifier.resourceType) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.fetchCollectionsByResource(resourceIdentifier)\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tselect(selectedOption) {\n\t\t\tif (selectedOption.method === METHOD_CREATE_COLLECTION) {\n\t\t\t\tselectedOption.action().then(resourceId => {\n\t\t\t\t\tthis.createCollection({\n\t\t\t\t\t\tbaseResourceType: this.type,\n\t\t\t\t\t\tbaseResourceId: this.id,\n\t\t\t\t\t\tresourceType: selectedOption.type,\n\t\t\t\t\t\tresourceId,\n\t\t\t\t\t\tname: this.name,\n\t\t\t\t\t}).catch((e) => {\n\t\t\t\t\t\tthis.setError(t('Failed to create a project'), e)\n\t\t\t\t\t})\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\tconsole.error('No resource selected', e)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (selectedOption.method === METHOD_ADD_TO_COLLECTION) {\n\t\t\t\tthis.addResourceToCollection({\n\t\t\t\t\tcollectionId: selectedOption.collectionId, resourceType: this.type, resourceId: this.id,\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\tthis.setError(t('Failed to add the item to the project'), e)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.value = null\n\t\t},\n\n\t\tshowSelect() {\n\t\t\tthis.selectIsOpen = true\n\t\t\tthis.$refs.select.$el.focus()\n\t\t},\n\n\t\tsetError(error, e) {\n\t\t\tconsole.error(error, e)\n\t\t\tthis.error = error\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.error = null\n\t\t\t}, 5000)\n\t\t},\n\n\t\trenameCollectionFromItem({ collectionId, name }) {\n\t\t\tthis.renameCollection({ collectionId, name })\n\t\t\t\t.catch((e) => {\n\t\t\t\t\tconsole.error(t('Failed to rename the project'), e)\n\t\t\t\t\tthis.collectionsError[collectionId] = t('Failed to rename the project')\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tthis.collectionsError[collectionId] = null\n\t\t\t\t\t}, 5000)\n\t\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.collection-list * {\n\tbox-sizing: border-box;\n}\n\n.collection-list > li {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 12px;\n\n\t& > .avatar {\n\t\tmargin-top: 0;\n\t}\n}\n\n#collection-select-container {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.v-select {\n\t// NcAvatar in the dropdown\n\tspan.avatar {\n\t\tdisplay: block;\n\t\tpadding: 16px;\n\t\topacity: .7;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\n\t\t&:hover {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\np.hint {\n\tz-index: 1;\n\t// fix alignment\n\tmargin-top: -16px;\n\tpadding: 8px 8px;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: normal;\n}\n\ndiv.avatar {\n\twidth: 32px;\n\theight: 32px;\n\tmargin: 0;\n\tpadding: 8px;\n\tbackground-color: var(--color-background-dark);\n\tmargin-top: 30px;\n}\n\n/** TODO provide white icon in core */\n.icon-projects {\n\tdisplay: block;\n\tpadding: 8px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n}\n\n.option__wrapper {\n\tdisplay: flex;\n\n\t.avatar {\n\t\tdisplay: block;\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tbackground-color: var(--color-background-darker) !important;\n\t}\n\n\t.option__title {\n\t\tpadding: 4px;\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .5s;\n}\n\n.fade-enter, .fade-leave-to {\n\topacity: 0;\n}\n\n</style>\n"],"names":["_sfc_main","NcAvatar","NcActions","NcActionButton","getRoute","t","axios","generateOcsUrl","ref","set","NcSelect","debounce"],"mappings":";;;;;;;;;;;;;;;;;AA2EA,MAAAA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ACA,cAAA,eAAA;AAAA,UAAA,cAAA,KAAA;AAAA,UAAA,YAAA,KAAA;AAAA,QACA,CAAA,EAAA,MAAA,CAAA,MAAA;AACA,eAAA,SAAAA,MAAAA,EAAA,uCAAA,GAAA,CAAA;AAAA,QACA,CAAA;AAAA,MACA;AAEA,WAAA,QAAA;AAAA,IACA;AAAA,IAEA,aAAA;AACA,WAAA,eAAA;AACA,WAAA,MAAA,OAAA,IAAA,MAAA;AAAA,IACA;AAAA,IAEA,SAAA,OAAA,GAAA;AACA,cAAA,MAAA,OAAA,CAAA;AACA,WAAA,QAAA;AACA,iBAAA,MAAA;AACA,aAAA,QAAA;AAAA,MACA,GAAA,GAAA;AAAA,IACA;AAAA,IAEA,yBAAA,EAAA,cAAA,QAAA;AACA,WAAA,iBAAA,EAAA,cAAA,KAAA,CAAA,EACA,MAAA,CAAA,MAAA;AACA,gBAAA,MAAAA,MAAAA,EAAA,8BAAA,GAAA,CAAA;AACA,aAAA,iBAAA,YAAA,IAAAA,MAAAA,EAAA,8BAAA;AACA,mBAAA,MAAA;AACA,eAAA,iBAAA,YAAA,IAAA;AAAA,QACA,GAAA,GAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
- import '../assets/NcColorPicker-DH3H7HLS.css';
1
+ import '../assets/NcColorPicker-Ctv2cwt1.css';
2
2
  import NcButton from "../Components/NcButton.mjs";
3
3
  import { N as NcPopover } from "./NcPopover-VxUr4c6P.mjs";
4
- import { r as register, i as t1, a as t } from "./_l10n-B6zipH_A.mjs";
5
- import { d as defaultPalette } from "./GenColors-BvNpSI9g.mjs";
4
+ import { r as register, i as t1, a as t } from "./_l10n-DDx8P-X1.mjs";
5
+ import { d as defaultPalette } from "./GenColors-DtEnxSd9.mjs";
6
6
  import { G as GenRandomId } from "./GenRandomId-CMooMQt0.mjs";
7
7
  import { A as ArrowLeft } from "./ArrowLeft-B9iGweTd.mjs";
8
8
  import { C as Check } from "./Check-PawIlCwa.mjs";
@@ -181,7 +181,7 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
181
181
  _sfc_staticRenderFns,
182
182
  false,
183
183
  null,
184
- "e1b585f0",
184
+ "b4e57861",
185
185
  null,
186
186
  null
187
187
  );
@@ -1 +1 @@
1
- {"version":3,"file":"NcColorPicker-C5AAUZow.mjs","sources":["../../src/components/NcColorPicker/NcColorPicker.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component allows the user to choose a color. It consists of 2\nactual pickers:\n\n- One simple picker with a predefined palette of colors;\n- One more advanced picker that provides the full color spectrum;\n\n### Usage\n\n* Using v-model and passing in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<NcColorPicker v-model=\"color\" :palette=\"customPalette\">\n\t\t\t<NcButton> Click Me for a custom palette </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\tcustomPalette: [\n\t\t\t\t'#E40303',\n\t\t\t\t'#FF8C00',\n\t\t\t\t'#FFED00',\n\t\t\t\t'#008026',\n\t\t\t\t'#24408E',\n\t\t\t\t'#732982',\n\t\t\t\t'#5BCEFA',\n\t\t\t\t'#F5A9B8',\n\t\t\t\t'#FFFFFF',\n\t\t\t\t'#F5A9B8',\n\t\t\t\t'#5BCEFA',\n\t\t\t],\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 40px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Using v-bind for both color and open state and emitting an event that updates the color\n\n```vue\n<template>\n\t<div class=\"container1\">\n\t\t<NcButton @click=\"open = !open\"> Click Me </NcButton>\n\t\t<NcColorPicker :value=\"color\" @input=\"updateColor\" :shown.sync=\"open\" @submit=\"open = false\" v-slot=\"{ attrs }\">\n\t\t\t<div v-bind=\"attrs\" :style=\"{'background-color': color}\" class=\"color1\" />\n\t\t</NcColorPicker>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\topen: false\n\t\t}\n\t},\n\tmethods: {\n\t\tupdateColor(e) {\n\t\t\tthis.color = e\n\t\t}\n\t}\n}\n</script>\n<style>\n.container1 {\n\tdisplay: flex;\n}\n\n.color1 {\n\twidth: 100px;\n\theight: 40px;\n\tmargin-left: 20px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Using advanced fields including HEX, RGB, and HSL:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\"\n\t\t\t:advanced-fields=\"true\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9'\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 40px;\n\tmargin-left: 20px;\n\tborder-radius: 6px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcPopover popup-role=\"dialog\"\n\t\t:container=\"container\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@apply-hide=\"handleClose\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<div role=\"dialog\"\n\t\t\tclass=\"color-picker\"\n\t\t\taria-modal=\"true\"\n\t\t\t:aria-label=\"t('Color picker')\"\n\t\t\t:class=\"{ 'color-picker--advanced-fields': advanced && advancedFields }\">\n\t\t\t<Transition name=\"slide\" mode=\"out-in\">\n\t\t\t\t<div v-if=\"!advanced\" class=\"color-picker__simple\">\n\t\t\t\t\t<label v-for=\"({ color, name }, index) in normalizedPalette\"\n\t\t\t\t\t\t:key=\"index\"\n\t\t\t\t\t\t:style=\"{ backgroundColor: color }\"\n\t\t\t\t\t\tclass=\"color-picker__simple-color-circle\"\n\t\t\t\t\t\t:class=\"{ 'color-picker__simple-color-circle--active' : color === currentColor }\">\n\t\t\t\t\t\t<Check v-if=\"color === currentColor\" :size=\"20\" :fill-color=\"contrastColor\" />\n\t\t\t\t\t\t<input type=\"radio\"\n\t\t\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\t\t\t:aria-label=\"name\"\n\t\t\t\t\t\t\t:name=\"`color-picker-${uid}`\"\n\t\t\t\t\t\t\t:checked=\"color === currentColor\"\n\t\t\t\t\t\t\t@click=\"pickColor(color)\">\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t\t<Chrome v-else\n\t\t\t\t\tv-model=\"currentColor\"\n\t\t\t\t\tclass=\"color-picker__advanced\"\n\t\t\t\t\t:disable-alpha=\"true\"\n\t\t\t\t\t:disable-fields=\"!advancedFields\"\n\t\t\t\t\t@input=\"pickColor\" />\n\t\t\t</Transition>\n\t\t\t<div v-if=\"!paletteOnly\" class=\"color-picker__navigation\">\n\t\t\t\t<NcButton v-if=\"advanced\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\t:aria-label=\"ariaBack\"\n\t\t\t\t\t@click=\"handleBack\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<ArrowLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton v-else\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\t:aria-label=\"ariaMore\"\n\t\t\t\t\t@click=\"handleMoreSettings\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<DotsHorizontal :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton type=\"primary\"\n\t\t\t\t\t@click=\"handleConfirm\">\n\t\t\t\t\t{{ t('Choose') }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</div>\n\t</NcPopover>\n</template>\n\n<script>\nimport NcButton from '../NcButton/index.js'\nimport NcPopover from '../NcPopover/index.js'\nimport { t } from '../../l10n.js'\nimport { defaultPalette } from '../../utils/GenColors.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'\n\nimport { Chrome } from 'vue-color'\n\nconst HEX_REGEX = /^#([a-f0-9]{3}|[a-f0-9]{6})$/i\n\nexport default {\n\tname: 'NcColorPicker',\n\n\tcomponents: {\n\t\tArrowLeft,\n\t\tCheck,\n\t\tChrome,\n\t\tDotsHorizontal,\n\t\tNcButton,\n\t\tNcPopover,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * A HEX color that represents the initial value of the picker\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Set to `true` to enable advanced fields including HEX, RGB, and HSL\n\t\t */\n\t\tadvancedFields: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Limit selectable colors to only the provided palette\n\t\t */\n\t\tpaletteOnly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Provide a custom array of colors to show.\n\t\t * Can be either an array of string hexadecimal colors,\n\t\t * or an array of object with a `color` property with hexadecimal color string,\n\t\t * and a `name` property for accessibility.\n\t\t *\n\t\t * @type {string[] | {color: string, name: string}[]}\n\t\t */\n\t\tpalette: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [...defaultPalette],\n\t\t\tvalidator: (palette) => palette.every(item =>\n\t\t\t\t(typeof item === 'string' && HEX_REGEX.test(item))\n\t\t\t\t|| (typeof item === 'object' && item.color && HEX_REGEX.test(item.color)),\n\t\t\t),\n\t\t},\n\n\t\t/**\n\t\t * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\n\temits: [\n\t\t'submit',\n\t\t'close',\n\t\t'update:open',\n\t\t'update:value',\n\t\t'input',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tcurrentColor: this.value,\n\t\t\tadvanced: false,\n\t\t\tariaBack: t('Back'),\n\t\t\tariaMore: t('More options'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tnormalizedPalette() {\n\t\t\treturn this.palette.map((item) => ({\n\t\t\t\tcolor: typeof item === 'object' ? item.color : item,\n\t\t\t\tname: typeof item === 'object' && item.name\n\t\t\t\t\t? item.name\n\t\t\t\t\t: t('A color with a HEX value {hex}', { hex: item.color }),\n\t\t\t}))\n\t\t},\n\n\t\tuid() {\n\t\t\treturn GenRandomId()\n\t\t},\n\t\tcontrastColor() {\n\t\t\tconst black = '#000000'\n\t\t\tconst white = '#FFFFFF'\n\t\t\treturn (this.calculateLuma(this.currentColor) > 0.5) ? black : white\n\t\t},\n\t},\n\n\twatch: {\n\t\tvalue(color) {\n\t\t\tthis.currentColor = color\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Submit a picked colour and close picker\n\t\t */\n\t\thandleConfirm() {\n\t\t\t/**\n\t\t\t * Emits a hexadecimal string e.g. '#ffffff'\n\t\t\t */\n\t\t\tthis.$emit('submit', this.currentColor)\n\t\t\tthis.handleClose()\n\n\t\t\tthis.advanced = false\n\t\t},\n\t\thandleClose() {\n\t\t\t/**\n\t\t\t * Emitted after picker close\n\t\t\t */\n\t\t\tthis.$emit('close')\n\t\t\tthis.$emit('update:open', false)\n\t\t},\n\n\t\t/**\n\t\t * Inner navigations\n\t\t */\n\t\thandleBack() {\n\t\t\tthis.advanced = false\n\t\t},\n\t\thandleMoreSettings() {\n\t\t\tthis.advanced = true\n\t\t},\n\n\t\t/**\n\t\t * Pick a colour\n\t\t *\n\t\t * @param {string} color the picked color\n\t\t */\n\t\tpickColor(color) {\n\t\t\tif (typeof color !== 'string') {\n\t\t\t\tcolor = this.currentColor.hex\n\t\t\t}\n\t\t\tthis.currentColor = color\n\n\t\t\t/**\n\t\t\t * Emits a hexadecimal string e.g. '#ffffff'\n\t\t\t */\n\t\t\tthis.$emit('update:value', color)\n\n\t\t\t/**\n\t\t\t * Emits a hexadecimal string e.g. '#ffffff'\n\t\t\t */\n\t\t\tthis.$emit('input', color)\n\n\t\t},\n\n\t\t/**\n\t\t * Calculate luminance of provided hex color\n\t\t *\n\t\t * @param {string} color the hex color\n\t\t */\n\t\t calculateLuma(color) {\n\t\t\tconst [red, green, blue] = this.hexToRGB(color)\n\t\t\treturn (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255\n\t\t},\n\n\t\t/**\n\t\t * Convert hex color to RGB\n\t\t *\n\t\t * @param {string} hex the hex color\n\t\t */\n\t\t hexToRGB(hex) {\n\t\t\tconst result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex)\n\t\t\treturn result\n\t\t\t\t? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)]\n\t\t\t\t: null\n\t\t},\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n.color-picker {\n\tdisplay: flex;\n\toverflow: hidden;\n\talign-content: flex-end;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tbox-sizing: content-box !important;\n\twidth: 176px;\n\tpadding: 8px;\n\tborder-radius: 3px;\n\n\t&--advanced-fields {\n\t\twidth: 264px;\n\t}\n\n\t&__simple {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, $clickable-area);\n\t\tgrid-auto-rows: $clickable-area;\n\n\t\t&-color-circle {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 34px;\n\t\t\theight: 34px;\n\t\t\tmin-height: 34px;\n\t\t\tmargin: auto;\n\t\t\tpadding: 0;\n\t\t\tcolor: white;\n\t\t\tborder: 1px solid rgba(0, 0, 0, 0.25);\n\t\t\tborder-radius: 50%;\n\t\t\tfont-size: 16px;\n\t\t\t&:focus-within {\n\t\t\t\toutline: 2px solid var(--color-main-text);\n\t\t\t}\n\t\t\t&:hover {\n\t\t\t\topacity: .6;\n\t\t\t}\n\t\t\t&--active {\n\t\t\t\twidth: 38px;\n\t\t\t\theight: 38px;\n\t\t\t\tmin-height: 38px;\n\t\t\t\ttransition: all 100ms ease-in-out;\n\t\t\t\topacity: 1 !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__advanced {\n\t\tbox-shadow: none !important;\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\t\tmargin-top: 10px;\n\t}\n}\n\n:deep() .vc {\n\t&-chrome {\n\t\twidth: unset;\n\t\tbackground-color: var(--color-main-background);\n\n\t\t&-color-wrap {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\n\t\t&-active-color {\n\t\t\twidth: 34px;\n\t\t\theight: 34px;\n\t\t\tborder-radius: 17px;\n\t\t}\n\n\t\t&-body {\n\t\t\tpadding: 14px 0 0 0;\n\t\t\tbackground-color: var(--color-main-background);\n\t\t\t.vc-input__input {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t}\n\n\t\t&-toggle-btn {\n\t\t\tfilter: var(--background-invert-if-dark);\n\t\t}\n\n\t\t&-saturation {\n\t\t\t&-wrap {\n\t\t\t\tborder-radius: 3px;\n\t\t\t}\n\n\t\t\t&-circle {\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.slide {\n\t&-enter {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-to {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave-to {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-active,\n\t&-leave-active {\n\t\ttransition: all 50ms ease-in-out;\n\t}\n}\n\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;AA4NA,MAAA,YAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,GAAA,cAAA;AAAA,MACA,WAAA,CAAA,YAAA,QAAA;AAAA,QAAA,UACA,OAAA,SAAA,YAAA,UAAA,KAAA,IAAA,KACA,OAAA,SAAA,YAAA,KAAA,SAAA,UAAA,KAAA,KAAA,KAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA,CAAA,QAAA,QAAA,SAAA,OAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;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KAAA;AAKA,WAAA,MAAA,SAAA,KAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,cAAA,OAAA;AACA,YAAA,CAAA,KAAA,OAAA,IAAA,IAAA,KAAA,SAAA,KAAA;AACA,cAAA,SAAA,MAAA,SAAA,QAAA,SAAA,QAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,SAAA,KAAA;AACA,YAAA,SAAA,4CAAA,KAAA,GAAA;AACA,aAAA,SACA,CAAA,SAAA,OAAA,CAAA,GAAA,EAAA,GAAA,SAAA,OAAA,CAAA,GAAA,EAAA,GAAA,SAAA,OAAA,CAAA,GAAA,EAAA,CAAA,IACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcColorPicker-D7awy8o_.mjs","sources":["../../src/components/NcColorPicker/NcColorPicker.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component allows the user to choose a color. It consists of 2\nactual pickers:\n\n- One simple picker with a predefined palette of colors;\n- One more advanced picker that provides the full color spectrum;\n\n### Usage\n\n* Using v-model and passing in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<NcColorPicker v-model=\"color\" :palette=\"customPalette\">\n\t\t\t<NcButton> Click Me for a custom palette </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\tcustomPalette: [\n\t\t\t\t'#E40303',\n\t\t\t\t'#FF8C00',\n\t\t\t\t'#FFED00',\n\t\t\t\t'#008026',\n\t\t\t\t'#24408E',\n\t\t\t\t'#732982',\n\t\t\t\t'#5BCEFA',\n\t\t\t\t'#F5A9B8',\n\t\t\t\t'#FFFFFF',\n\t\t\t\t'#F5A9B8',\n\t\t\t\t'#5BCEFA',\n\t\t\t],\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 40px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Using v-bind for both color and open state and emitting an event that updates the color\n\n```vue\n<template>\n\t<div class=\"container1\">\n\t\t<NcButton @click=\"open = !open\"> Click Me </NcButton>\n\t\t<NcColorPicker :value=\"color\" @input=\"updateColor\" :shown.sync=\"open\" @submit=\"open = false\" v-slot=\"{ attrs }\">\n\t\t\t<div v-bind=\"attrs\" :style=\"{'background-color': color}\" class=\"color1\" />\n\t\t</NcColorPicker>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\topen: false\n\t\t}\n\t},\n\tmethods: {\n\t\tupdateColor(e) {\n\t\t\tthis.color = e\n\t\t}\n\t}\n}\n</script>\n<style>\n.container1 {\n\tdisplay: flex;\n}\n\n.color1 {\n\twidth: 100px;\n\theight: 40px;\n\tmargin-left: 20px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Using advanced fields including HEX, RGB, and HSL:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\"\n\t\t\t:advanced-fields=\"true\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9'\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 40px;\n\tmargin-left: 20px;\n\tborder-radius: 6px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcPopover popup-role=\"dialog\"\n\t\t:container=\"container\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@apply-hide=\"handleClose\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<div role=\"dialog\"\n\t\t\tclass=\"color-picker\"\n\t\t\taria-modal=\"true\"\n\t\t\t:aria-label=\"t('Color picker')\"\n\t\t\t:class=\"{ 'color-picker--advanced-fields': advanced && advancedFields }\">\n\t\t\t<Transition name=\"slide\" mode=\"out-in\">\n\t\t\t\t<div v-if=\"!advanced\" class=\"color-picker__simple\">\n\t\t\t\t\t<label v-for=\"({ color, name }, index) in normalizedPalette\"\n\t\t\t\t\t\t:key=\"index\"\n\t\t\t\t\t\t:style=\"{ backgroundColor: color }\"\n\t\t\t\t\t\tclass=\"color-picker__simple-color-circle\"\n\t\t\t\t\t\t:class=\"{ 'color-picker__simple-color-circle--active' : color === currentColor }\">\n\t\t\t\t\t\t<Check v-if=\"color === currentColor\" :size=\"20\" :fill-color=\"contrastColor\" />\n\t\t\t\t\t\t<input type=\"radio\"\n\t\t\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\t\t\t:aria-label=\"name\"\n\t\t\t\t\t\t\t:name=\"`color-picker-${uid}`\"\n\t\t\t\t\t\t\t:checked=\"color === currentColor\"\n\t\t\t\t\t\t\t@click=\"pickColor(color)\">\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t\t<Chrome v-else\n\t\t\t\t\tv-model=\"currentColor\"\n\t\t\t\t\tclass=\"color-picker__advanced\"\n\t\t\t\t\t:disable-alpha=\"true\"\n\t\t\t\t\t:disable-fields=\"!advancedFields\"\n\t\t\t\t\t@input=\"pickColor\" />\n\t\t\t</Transition>\n\t\t\t<div v-if=\"!paletteOnly\" class=\"color-picker__navigation\">\n\t\t\t\t<NcButton v-if=\"advanced\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\t:aria-label=\"ariaBack\"\n\t\t\t\t\t@click=\"handleBack\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<ArrowLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton v-else\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\t:aria-label=\"ariaMore\"\n\t\t\t\t\t@click=\"handleMoreSettings\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<DotsHorizontal :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton type=\"primary\"\n\t\t\t\t\t@click=\"handleConfirm\">\n\t\t\t\t\t{{ t('Choose') }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</div>\n\t</NcPopover>\n</template>\n\n<script>\nimport NcButton from '../NcButton/index.js'\nimport NcPopover from '../NcPopover/index.js'\nimport { t } from '../../l10n.js'\nimport { defaultPalette } from '../../utils/GenColors.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'\n\nimport { Chrome } from 'vue-color'\n\nconst HEX_REGEX = /^#([a-f0-9]{3}|[a-f0-9]{6})$/i\n\nexport default {\n\tname: 'NcColorPicker',\n\n\tcomponents: {\n\t\tArrowLeft,\n\t\tCheck,\n\t\tChrome,\n\t\tDotsHorizontal,\n\t\tNcButton,\n\t\tNcPopover,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * A HEX color that represents the initial value of the picker\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Set to `true` to enable advanced fields including HEX, RGB, and HSL\n\t\t */\n\t\tadvancedFields: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Limit selectable colors to only the provided palette\n\t\t */\n\t\tpaletteOnly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Provide a custom array of colors to show.\n\t\t * Can be either an array of string hexadecimal colors,\n\t\t * or an array of object with a `color` property with hexadecimal color string,\n\t\t * and a `name` property for accessibility.\n\t\t *\n\t\t * @type {string[] | {color: string, name: string}[]}\n\t\t */\n\t\tpalette: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [...defaultPalette],\n\t\t\tvalidator: (palette) => palette.every(item =>\n\t\t\t\t(typeof item === 'string' && HEX_REGEX.test(item))\n\t\t\t\t|| (typeof item === 'object' && item.color && HEX_REGEX.test(item.color)),\n\t\t\t),\n\t\t},\n\n\t\t/**\n\t\t * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\n\temits: [\n\t\t'submit',\n\t\t'close',\n\t\t'update:open',\n\t\t'update:value',\n\t\t'input',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tcurrentColor: this.value,\n\t\t\tadvanced: false,\n\t\t\tariaBack: t('Back'),\n\t\t\tariaMore: t('More options'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tnormalizedPalette() {\n\t\t\treturn this.palette.map((item) => ({\n\t\t\t\tcolor: typeof item === 'object' ? item.color : item,\n\t\t\t\tname: typeof item === 'object' && item.name\n\t\t\t\t\t? item.name\n\t\t\t\t\t: t('A color with a HEX value {hex}', { hex: item.color }),\n\t\t\t}))\n\t\t},\n\n\t\tuid() {\n\t\t\treturn GenRandomId()\n\t\t},\n\t\tcontrastColor() {\n\t\t\tconst black = '#000000'\n\t\t\tconst white = '#FFFFFF'\n\t\t\treturn (this.calculateLuma(this.currentColor) > 0.5) ? black : white\n\t\t},\n\t},\n\n\twatch: {\n\t\tvalue(color) {\n\t\t\tthis.currentColor = color\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Submit a picked colour and close picker\n\t\t */\n\t\thandleConfirm() {\n\t\t\t/**\n\t\t\t * Emits a hexadecimal string e.g. '#ffffff'\n\t\t\t */\n\t\t\tthis.$emit('submit', this.currentColor)\n\t\t\tthis.handleClose()\n\n\t\t\tthis.advanced = false\n\t\t},\n\t\thandleClose() {\n\t\t\t/**\n\t\t\t * Emitted after picker close\n\t\t\t */\n\t\t\tthis.$emit('close')\n\t\t\tthis.$emit('update:open', false)\n\t\t},\n\n\t\t/**\n\t\t * Inner navigations\n\t\t */\n\t\thandleBack() {\n\t\t\tthis.advanced = false\n\t\t},\n\t\thandleMoreSettings() {\n\t\t\tthis.advanced = true\n\t\t},\n\n\t\t/**\n\t\t * Pick a colour\n\t\t *\n\t\t * @param {string} color the picked color\n\t\t */\n\t\tpickColor(color) {\n\t\t\tif (typeof color !== 'string') {\n\t\t\t\tcolor = this.currentColor.hex\n\t\t\t}\n\t\t\tthis.currentColor = color\n\n\t\t\t/**\n\t\t\t * Emits a hexadecimal string e.g. '#ffffff'\n\t\t\t */\n\t\t\tthis.$emit('update:value', color)\n\n\t\t\t/**\n\t\t\t * Emits a hexadecimal string e.g. '#ffffff'\n\t\t\t */\n\t\t\tthis.$emit('input', color)\n\n\t\t},\n\n\t\t/**\n\t\t * Calculate luminance of provided hex color\n\t\t *\n\t\t * @param {string} color the hex color\n\t\t */\n\t\t calculateLuma(color) {\n\t\t\tconst [red, green, blue] = this.hexToRGB(color)\n\t\t\treturn (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255\n\t\t},\n\n\t\t/**\n\t\t * Convert hex color to RGB\n\t\t *\n\t\t * @param {string} hex the hex color\n\t\t */\n\t\t hexToRGB(hex) {\n\t\t\tconst result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex)\n\t\t\treturn result\n\t\t\t\t? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)]\n\t\t\t\t: null\n\t\t},\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n.color-picker {\n\tdisplay: flex;\n\toverflow: hidden;\n\talign-content: flex-end;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tbox-sizing: content-box !important;\n\twidth: 176px;\n\tpadding: 8px;\n\tborder-radius: 3px;\n\n\t&--advanced-fields {\n\t\twidth: 264px;\n\t}\n\n\t&__simple {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, var(--default-clickable-area));\n\t\tgrid-auto-rows: var(--default-clickable-area);\n\n\t\t&-color-circle {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 34px;\n\t\t\theight: 34px;\n\t\t\tmin-height: 34px;\n\t\t\tmargin: auto;\n\t\t\tpadding: 0;\n\t\t\tcolor: white;\n\t\t\tborder: 1px solid rgba(0, 0, 0, 0.25);\n\t\t\tborder-radius: 50%;\n\t\t\tfont-size: 16px;\n\t\t\t&:focus-within {\n\t\t\t\toutline: 2px solid var(--color-main-text);\n\t\t\t}\n\t\t\t&:hover {\n\t\t\t\topacity: .6;\n\t\t\t}\n\t\t\t&--active {\n\t\t\t\twidth: 38px;\n\t\t\t\theight: 38px;\n\t\t\t\tmin-height: 38px;\n\t\t\t\ttransition: all 100ms ease-in-out;\n\t\t\t\topacity: 1 !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__advanced {\n\t\tbox-shadow: none !important;\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\t\tmargin-top: 10px;\n\t}\n}\n\n:deep() .vc {\n\t&-chrome {\n\t\twidth: unset;\n\t\tbackground-color: var(--color-main-background);\n\n\t\t&-color-wrap {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\n\t\t&-active-color {\n\t\t\twidth: 34px;\n\t\t\theight: 34px;\n\t\t\tborder-radius: 17px;\n\t\t}\n\n\t\t&-body {\n\t\t\tpadding: 14px 0 0 0;\n\t\t\tbackground-color: var(--color-main-background);\n\t\t\t.vc-input__input {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t}\n\n\t\t&-toggle-btn {\n\t\t\tfilter: var(--background-invert-if-dark);\n\t\t}\n\n\t\t&-saturation {\n\t\t\t&-wrap {\n\t\t\t\tborder-radius: 3px;\n\t\t\t}\n\n\t\t\t&-circle {\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.slide {\n\t&-enter {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-to {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave-to {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-active,\n\t&-leave-active {\n\t\ttransition: all 50ms ease-in-out;\n\t}\n}\n\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;AA4NA,MAAA,YAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA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AAA,MAAA,eAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AACA,WAAA,WAAA;AAAA,IACA;AAAA,IACA,qBAAA;AACA,WAAA,WAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,UAAA,OAAA;AACA,UAAA,OAAA,UAAA,UAAA;AACA,gBAAA,KAAA,aAAA;AAAA,MACA;AACA,WAAA,eAAA;AAKA,WAAA,MAAA,gBAAA,KAAA;AAKA,WAAA,MAAA,SAAA,KAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,cAAA,OAAA;AACA,YAAA,CAAA,KAAA,OAAA,IAAA,IAAA,KAAA,SAAA,KAAA;AACA,cAAA,SAAA,MAAA,SAAA,QAAA,SAAA,QAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,SAAA,KAAA;AACA,YAAA,SAAA,4CAAA,KAAA,GAAA;AACA,aAAA,SACA,CAAA,SAAA,OAAA,CAAA,GAAA,EAAA,GAAA,SAAA,OAAA,CAAA,GAAA,EAAA,GAAA,SAAA,OAAA,CAAA,GAAA,EAAA,CAAA,IACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,9 @@
1
- require('../assets/NcColorPicker-DH3H7HLS.css');
1
+ require('../assets/NcColorPicker-Ctv2cwt1.css');
2
2
  "use strict";
3
3
  const Components_NcButton = require("../Components/NcButton.cjs");
4
4
  const NcPopover = require("./NcPopover-Cl1AvQ5o.cjs");
5
- const _l10n = require("./_l10n-BGF_R72e.cjs");
6
- const GenColors = require("./GenColors-Cf5olCPx.cjs");
5
+ const _l10n = require("./_l10n-CWsOa8mM.cjs");
6
+ const GenColors = require("./GenColors-Dt-3yZwf.cjs");
7
7
  const GenRandomId = require("./GenRandomId-BQDud3d4.cjs");
8
8
  const ArrowLeft = require("./ArrowLeft-BhNmMdMz.cjs");
9
9
  const Check = require("./Check-DZc7keoa.cjs");
@@ -182,7 +182,7 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
182
182
  _sfc_staticRenderFns,
183
183
  false,
184
184
  null,
185
- "e1b585f0",
185
+ "b4e57861",
186
186
  null,
187
187
  null
188
188
  );