@nextcloud/vue 8.0.1 → 8.2.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 (249) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/Components/NcActionButton.cjs +16 -8
  3. package/dist/Components/NcActionButton.cjs.map +1 -1
  4. package/dist/Components/NcActionButton.mjs +21 -13
  5. package/dist/Components/NcActionButton.mjs.map +1 -1
  6. package/dist/Components/NcActionButtonGroup.cjs +22 -11
  7. package/dist/Components/NcActionButtonGroup.cjs.map +1 -1
  8. package/dist/Components/NcActionButtonGroup.mjs +19 -7
  9. package/dist/Components/NcActionButtonGroup.mjs.map +1 -1
  10. package/dist/Components/NcActionCaption.cjs +17 -11
  11. package/dist/Components/NcActionCaption.cjs.map +1 -1
  12. package/dist/Components/NcActionCaption.mjs +14 -8
  13. package/dist/Components/NcActionCaption.mjs.map +1 -1
  14. package/dist/Components/NcActionCheckbox.cjs +26 -11
  15. package/dist/Components/NcActionCheckbox.cjs.map +1 -1
  16. package/dist/Components/NcActionCheckbox.mjs +26 -11
  17. package/dist/Components/NcActionCheckbox.mjs.map +1 -1
  18. package/dist/Components/NcActionInput.cjs +7 -5
  19. package/dist/Components/NcActionInput.cjs.map +1 -1
  20. package/dist/Components/NcActionInput.mjs +11 -9
  21. package/dist/Components/NcActionInput.mjs.map +1 -1
  22. package/dist/Components/NcActionLink.cjs +14 -6
  23. package/dist/Components/NcActionLink.cjs.map +1 -1
  24. package/dist/Components/NcActionLink.mjs +19 -11
  25. package/dist/Components/NcActionLink.mjs.map +1 -1
  26. package/dist/Components/NcActionRadio.cjs +29 -14
  27. package/dist/Components/NcActionRadio.cjs.map +1 -1
  28. package/dist/Components/NcActionRadio.mjs +26 -11
  29. package/dist/Components/NcActionRadio.mjs.map +1 -1
  30. package/dist/Components/NcActionRouter.cjs +14 -8
  31. package/dist/Components/NcActionRouter.cjs.map +1 -1
  32. package/dist/Components/NcActionRouter.mjs +17 -11
  33. package/dist/Components/NcActionRouter.mjs.map +1 -1
  34. package/dist/Components/NcActionSeparator.cjs +10 -10
  35. package/dist/Components/NcActionSeparator.cjs.map +1 -1
  36. package/dist/Components/NcActionSeparator.mjs +11 -11
  37. package/dist/Components/NcActionSeparator.mjs.map +1 -1
  38. package/dist/Components/NcActionText.cjs +15 -9
  39. package/dist/Components/NcActionText.cjs.map +1 -1
  40. package/dist/Components/NcActionText.mjs +20 -14
  41. package/dist/Components/NcActionText.mjs.map +1 -1
  42. package/dist/Components/NcActionTextEditable.cjs +1 -1
  43. package/dist/Components/NcActionTextEditable.mjs +1 -1
  44. package/dist/Components/NcActions.cjs +100 -79
  45. package/dist/Components/NcActions.cjs.map +1 -1
  46. package/dist/Components/NcActions.mjs +103 -82
  47. package/dist/Components/NcActions.mjs.map +1 -1
  48. package/dist/Components/NcAppContent.cjs +9 -5
  49. package/dist/Components/NcAppContent.cjs.map +1 -1
  50. package/dist/Components/NcAppContent.mjs +13 -9
  51. package/dist/Components/NcAppContent.mjs.map +1 -1
  52. package/dist/Components/NcAppNavigation.cjs +11 -7
  53. package/dist/Components/NcAppNavigation.cjs.map +1 -1
  54. package/dist/Components/NcAppNavigation.mjs +9 -5
  55. package/dist/Components/NcAppNavigation.mjs.map +1 -1
  56. package/dist/Components/NcAppNavigationItem.cjs +16 -12
  57. package/dist/Components/NcAppNavigationItem.cjs.map +1 -1
  58. package/dist/Components/NcAppNavigationItem.mjs +14 -10
  59. package/dist/Components/NcAppNavigationItem.mjs.map +1 -1
  60. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  61. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  62. package/dist/Components/NcAppNavigationSettings.cjs +4 -2
  63. package/dist/Components/NcAppNavigationSettings.cjs.map +1 -1
  64. package/dist/Components/NcAppNavigationSettings.mjs +6 -4
  65. package/dist/Components/NcAppNavigationSettings.mjs.map +1 -1
  66. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  67. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  68. package/dist/Components/NcAppSettingsDialog.cjs +43 -39
  69. package/dist/Components/NcAppSettingsDialog.cjs.map +1 -1
  70. package/dist/Components/NcAppSettingsDialog.mjs +63 -58
  71. package/dist/Components/NcAppSettingsDialog.mjs.map +1 -1
  72. package/dist/Components/NcAppSidebar.cjs +3 -3
  73. package/dist/Components/NcAppSidebar.cjs.map +1 -1
  74. package/dist/Components/NcAppSidebar.mjs +3 -3
  75. package/dist/Components/NcAppSidebar.mjs.map +1 -1
  76. package/dist/Components/NcAvatar.cjs +1 -1
  77. package/dist/Components/NcAvatar.mjs +1 -1
  78. package/dist/Components/NcButton.cjs +6 -4
  79. package/dist/Components/NcButton.cjs.map +1 -1
  80. package/dist/Components/NcButton.mjs +11 -9
  81. package/dist/Components/NcButton.mjs.map +1 -1
  82. package/dist/Components/NcCheckboxRadioSwitch.cjs +3 -3
  83. package/dist/Components/NcCheckboxRadioSwitch.cjs.map +1 -1
  84. package/dist/Components/NcCheckboxRadioSwitch.mjs +3 -3
  85. package/dist/Components/NcCheckboxRadioSwitch.mjs.map +1 -1
  86. package/dist/Components/NcColorPicker.cjs +48 -31
  87. package/dist/Components/NcColorPicker.cjs.map +1 -1
  88. package/dist/Components/NcColorPicker.mjs +56 -38
  89. package/dist/Components/NcColorPicker.mjs.map +1 -1
  90. package/dist/Components/NcDashboardWidget.cjs +1 -1
  91. package/dist/Components/NcDashboardWidget.mjs +2 -2
  92. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  93. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  94. package/dist/Components/NcDateTime.cjs +17 -14
  95. package/dist/Components/NcDateTime.cjs.map +1 -1
  96. package/dist/Components/NcDateTime.mjs +18 -15
  97. package/dist/Components/NcDateTime.mjs.map +1 -1
  98. package/dist/Components/NcDateTimePicker.cjs +2 -2
  99. package/dist/Components/NcDateTimePicker.mjs +4 -4
  100. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  101. package/dist/Components/NcDateTimePickerNative.mjs +1 -1
  102. package/dist/Components/NcEmojiPicker.cjs +1 -1
  103. package/dist/Components/NcEmojiPicker.mjs +1 -1
  104. package/dist/Components/NcHeaderMenu.cjs +11 -9
  105. package/dist/Components/NcHeaderMenu.cjs.map +1 -1
  106. package/dist/Components/NcHeaderMenu.mjs +16 -14
  107. package/dist/Components/NcHeaderMenu.mjs.map +1 -1
  108. package/dist/Components/NcListItem.cjs +1 -1
  109. package/dist/Components/NcListItem.mjs +1 -1
  110. package/dist/Components/NcListItemIcon.cjs +4 -2
  111. package/dist/Components/NcListItemIcon.cjs.map +1 -1
  112. package/dist/Components/NcListItemIcon.mjs +9 -7
  113. package/dist/Components/NcListItemIcon.mjs.map +1 -1
  114. package/dist/Components/NcModal.cjs +1 -1
  115. package/dist/Components/NcModal.mjs +3 -3
  116. package/dist/Components/NcPasswordField.cjs +1 -1
  117. package/dist/Components/NcPasswordField.mjs +1 -1
  118. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  119. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  120. package/dist/Components/NcRichContenteditable.cjs +5 -5
  121. package/dist/Components/NcRichContenteditable.cjs.map +1 -1
  122. package/dist/Components/NcRichContenteditable.mjs +5 -5
  123. package/dist/Components/NcRichContenteditable.mjs.map +1 -1
  124. package/dist/Components/NcRichText.cjs +1 -1
  125. package/dist/Components/NcRichText.mjs +3 -3
  126. package/dist/Components/NcSelect.cjs +2 -2
  127. package/dist/Components/NcSelect.cjs.map +1 -1
  128. package/dist/Components/NcSelect.mjs +3 -3
  129. package/dist/Components/NcSelect.mjs.map +1 -1
  130. package/dist/Components/NcSelectTags.cjs +1 -1
  131. package/dist/Components/NcSelectTags.mjs +1 -1
  132. package/dist/Components/NcSettingsInputText.cjs +1 -1
  133. package/dist/Components/NcSettingsInputText.mjs +1 -1
  134. package/dist/Components/NcSettingsSection.cjs +1 -1
  135. package/dist/Components/NcSettingsSection.mjs +1 -1
  136. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  137. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  138. package/dist/Components/NcTextArea.cjs +5 -5
  139. package/dist/Components/NcTextArea.cjs.map +1 -1
  140. package/dist/Components/NcTextArea.mjs +4 -4
  141. package/dist/Components/NcTextArea.mjs.map +1 -1
  142. package/dist/Components/NcTextField.cjs +25 -17
  143. package/dist/Components/NcTextField.cjs.map +1 -1
  144. package/dist/Components/NcTextField.mjs +27 -19
  145. package/dist/Components/NcTextField.mjs.map +1 -1
  146. package/dist/Components/NcTimezonePicker.cjs +1 -1
  147. package/dist/Components/NcTimezonePicker.mjs +1 -1
  148. package/dist/Components/NcUserBubble.cjs +1 -1
  149. package/dist/Components/NcUserBubble.mjs +1 -1
  150. package/dist/Composables/useIsFullscreen.cjs +34 -0
  151. package/dist/Composables/useIsFullscreen.cjs.map +1 -0
  152. package/dist/Composables/useIsFullscreen.mjs +34 -0
  153. package/dist/Composables/useIsFullscreen.mjs.map +1 -0
  154. package/dist/Composables/useIsMobile.cjs +35 -0
  155. package/dist/Composables/useIsMobile.cjs.map +1 -0
  156. package/dist/Composables/useIsMobile.mjs +35 -0
  157. package/dist/Composables/useIsMobile.mjs.map +1 -0
  158. package/dist/Functions/usernameToColor.cjs +1 -1
  159. package/dist/Functions/usernameToColor.mjs +1 -1
  160. package/dist/Mixins/isFullscreen.cjs +10 -19
  161. package/dist/Mixins/isFullscreen.cjs.map +1 -1
  162. package/dist/Mixins/isFullscreen.mjs +10 -19
  163. package/dist/Mixins/isFullscreen.mjs.map +1 -1
  164. package/dist/Mixins/isMobile.cjs +10 -62
  165. package/dist/Mixins/isMobile.cjs.map +1 -1
  166. package/dist/Mixins/isMobile.mjs +10 -62
  167. package/dist/Mixins/isMobile.mjs.map +1 -1
  168. package/dist/assets/{NcSettingsSelectGroup-0d38d76b.css → NcSettingsSelectGroup-6ddb63a6.css} +2 -2
  169. package/dist/assets/{index-d3702c91.css → index-00012a4c.css} +18 -18
  170. package/dist/assets/{index-8f52a20f.css → index-018895f7.css} +2 -2
  171. package/dist/assets/{index-6899d75b.css → index-30ca9574.css} +31 -30
  172. package/dist/assets/{index-7d211db9.css → index-3d1ccc15.css} +31 -16
  173. package/dist/assets/{index-441b6552.css → index-418d4e87.css} +2 -2
  174. package/dist/assets/{index-ebbb7829.css → index-4437e6bf.css} +8 -8
  175. package/dist/assets/{index-4271da53.css → index-4596132f.css} +17 -17
  176. package/dist/assets/{index-05760fea.css → index-4ba699a1.css} +12 -12
  177. package/dist/assets/{index-db5a8b1c.css → index-51c1f2a9.css} +15 -11
  178. package/dist/assets/{index-24f6c355.css → index-542cf50a.css} +12 -12
  179. package/dist/assets/{index-dea0aef3.css → index-5c74e333.css} +10 -10
  180. package/dist/assets/{index-802d2118.css → index-7fac55ed.css} +16 -16
  181. package/dist/assets/{index-e7c55791.css → index-9020d9ca.css} +67 -67
  182. package/dist/assets/{index-4ef32afd.css → index-a9d1ad5c.css} +26 -23
  183. package/dist/assets/{index-55600948.css → index-d1c0876d.css} +11 -11
  184. package/dist/assets/{index-fbc0b606.css → index-db846386.css} +10 -9
  185. package/dist/assets/{index-baf8711a.css → index-e0e6bab6.css} +12 -12
  186. package/dist/assets/{index-0e9b11c7.css → index-e9fce208.css} +16 -16
  187. package/dist/assets/{index-d812ed9e.css → index-f091e784.css} +43 -43
  188. package/dist/assets/{index-9176105d.css → index-f8d6daf3.css} +41 -41
  189. package/dist/assets/{index-750c02cc.css → index-f9bfa317.css} +3 -0
  190. package/dist/assets/{index-d9ae9479.css → index-ffa6d11c.css} +7 -7
  191. package/dist/chunks/GenColors-02173e2c.mjs +56 -0
  192. package/dist/chunks/GenColors-02173e2c.mjs.map +1 -0
  193. package/dist/chunks/GenColors-4314c256.cjs +55 -0
  194. package/dist/chunks/GenColors-4314c256.cjs.map +1 -0
  195. package/dist/chunks/{NcAppNavigationToggle-60664a28.cjs → NcAppNavigationToggle-1301e882.cjs} +1 -1
  196. package/dist/chunks/{NcAppNavigationToggle-60664a28.cjs.map → NcAppNavigationToggle-1301e882.cjs.map} +1 -1
  197. package/dist/chunks/{NcAppNavigationToggle-82764816.mjs → NcAppNavigationToggle-2574bba5.mjs} +1 -1
  198. package/dist/chunks/{NcAppNavigationToggle-82764816.mjs.map → NcAppNavigationToggle-2574bba5.mjs.map} +1 -1
  199. package/dist/chunks/{NcInputConfirmCancel-262d455f.cjs → NcInputConfirmCancel-9906b563.cjs} +1 -1
  200. package/dist/chunks/{NcInputConfirmCancel-262d455f.cjs.map → NcInputConfirmCancel-9906b563.cjs.map} +1 -1
  201. package/dist/chunks/{NcInputConfirmCancel-906c7816.mjs → NcInputConfirmCancel-a612e6a3.mjs} +1 -1
  202. package/dist/chunks/{NcInputConfirmCancel-906c7816.mjs.map → NcInputConfirmCancel-a612e6a3.mjs.map} +1 -1
  203. package/dist/chunks/{NcRichText-ae95c854.cjs → NcRichText-9f77a9c6.cjs} +1 -1
  204. package/dist/chunks/{NcRichText-ae95c854.cjs.map → NcRichText-9f77a9c6.cjs.map} +1 -1
  205. package/dist/chunks/{NcRichText-1e8fd02d.mjs → NcRichText-f5cfcd57.mjs} +1 -1
  206. package/dist/chunks/{NcRichText-1e8fd02d.mjs.map → NcRichText-f5cfcd57.mjs.map} +1 -1
  207. package/dist/chunks/{NcSettingsSelectGroup-ae323579.mjs → NcSettingsSelectGroup-091c0306.mjs} +12 -12
  208. package/dist/chunks/NcSettingsSelectGroup-091c0306.mjs.map +1 -0
  209. package/dist/chunks/{NcSettingsSelectGroup-e8f9f9fe.cjs → NcSettingsSelectGroup-0f71fef4.cjs} +12 -12
  210. package/dist/chunks/NcSettingsSelectGroup-0f71fef4.cjs.map +1 -0
  211. package/dist/chunks/{ScopeComponent-1ab1ebb9.mjs → ScopeComponent-3ea00dcd.mjs} +1 -1
  212. package/dist/chunks/{ScopeComponent-1ab1ebb9.mjs.map → ScopeComponent-3ea00dcd.mjs.map} +1 -1
  213. package/dist/chunks/{ScopeComponent-50287dad.cjs → ScopeComponent-df4b58b1.cjs} +1 -1
  214. package/dist/chunks/{ScopeComponent-50287dad.cjs.map → ScopeComponent-df4b58b1.cjs.map} +1 -1
  215. package/dist/chunks/{actionText-a64be267.mjs → actionText-60ff01d1.mjs} +3 -1
  216. package/dist/chunks/{actionText-54bc24a6.cjs.map → actionText-60ff01d1.mjs.map} +1 -1
  217. package/dist/chunks/{actionText-54bc24a6.cjs → actionText-9582810f.cjs} +3 -1
  218. package/dist/chunks/{actionText-a64be267.mjs.map → actionText-9582810f.cjs.map} +1 -1
  219. package/dist/chunks/{index-fbf943b3.mjs → index-cea13a24.mjs} +6 -4
  220. package/dist/chunks/{index-fbf943b3.mjs.map → index-cea13a24.mjs.map} +1 -1
  221. package/dist/chunks/{index-e06b96d3.cjs → index-dc10fd2b.cjs} +7 -5
  222. package/dist/chunks/{index-e06b96d3.cjs.map → index-dc10fd2b.cjs.map} +1 -1
  223. package/dist/chunks/{l10n-ec2d3010.cjs → l10n-a12cdbfa.cjs} +1 -1
  224. package/dist/chunks/{l10n-ec2d3010.cjs.map → l10n-a12cdbfa.cjs.map} +1 -1
  225. package/dist/chunks/{l10n-9fc9974f.mjs → l10n-c603e589.mjs} +1 -1
  226. package/dist/chunks/{l10n-9fc9974f.mjs.map → l10n-c603e589.mjs.map} +1 -1
  227. package/dist/chunks/l10n-e9ffbe5e.cjs +29 -0
  228. package/dist/chunks/l10n-e9ffbe5e.cjs.map +1 -0
  229. package/dist/chunks/l10n-ef44019c.mjs +31 -0
  230. package/dist/chunks/l10n-ef44019c.mjs.map +1 -0
  231. package/dist/chunks/{referencePickerModal-e033bf2c.cjs → referencePickerModal-aa5d3f47.cjs} +1 -1
  232. package/dist/chunks/{referencePickerModal-e033bf2c.cjs.map → referencePickerModal-aa5d3f47.cjs.map} +1 -1
  233. package/dist/chunks/{referencePickerModal-6bc8f6b9.mjs → referencePickerModal-c2f33569.mjs} +1 -1
  234. package/dist/chunks/{referencePickerModal-6bc8f6b9.mjs.map → referencePickerModal-c2f33569.mjs.map} +1 -1
  235. package/dist/index.cjs +139 -134
  236. package/dist/index.cjs.map +1 -1
  237. package/dist/index.mjs +96 -89
  238. package/dist/index.mjs.map +1 -1
  239. package/package.json +2 -2
  240. package/dist/chunks/GenColors-38246c38.mjs +0 -46
  241. package/dist/chunks/GenColors-38246c38.mjs.map +0 -1
  242. package/dist/chunks/GenColors-eedcc70a.cjs +0 -45
  243. package/dist/chunks/GenColors-eedcc70a.cjs.map +0 -1
  244. package/dist/chunks/NcSettingsSelectGroup-ae323579.mjs.map +0 -1
  245. package/dist/chunks/NcSettingsSelectGroup-e8f9f9fe.cjs.map +0 -1
  246. package/dist/chunks/l10n-f491109d.cjs +0 -29
  247. package/dist/chunks/l10n-f491109d.cjs.map +0 -1
  248. package/dist/chunks/l10n-f692947e.mjs +0 -31
  249. package/dist/chunks/l10n-f692947e.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -15,37 +15,37 @@ import A from "./Components/NcAppContentDetails.mjs";
15
15
  import g from "./Components/NcAppContentList.mjs";
16
16
  import b from "./Components/NcAppNavigation.mjs";
17
17
  import S from "./Components/NcAppNavigationCaption.mjs";
18
- import v from "./Components/NcAppNavigationIconBullet.mjs";
18
+ import x from "./Components/NcAppNavigationIconBullet.mjs";
19
19
  import T from "./Components/NcAppNavigationItem.mjs";
20
- import x from "./Components/NcAppNavigationNew.mjs";
20
+ import v from "./Components/NcAppNavigationNew.mjs";
21
21
  import C from "./Components/NcAppNavigationNewItem.mjs";
22
- import k from "./Components/NcAppNavigationSettings.mjs";
23
- import h from "./Components/NcAppNavigationSpacer.mjs";
24
- import I from "./Components/NcAppSettingsDialog.mjs";
25
- import y from "./Components/NcAppSettingsSection.mjs";
22
+ import I from "./Components/NcAppNavigationSettings.mjs";
23
+ import k from "./Components/NcAppNavigationSpacer.mjs";
24
+ import h from "./Components/NcAppSettingsDialog.mjs";
25
+ import B from "./Components/NcAppSettingsSection.mjs";
26
26
  import P from "./Components/NcAppSidebar.mjs";
27
- import B from "./Components/NcAppSidebarTab.mjs";
28
- import { N as D } from "./chunks/index-fbf943b3.mjs";
29
- import { u as tt } from "./chunks/index-fbf943b3.mjs";
30
- import j from "./Components/NcBreadcrumb.mjs";
27
+ import y from "./Components/NcAppSidebarTab.mjs";
28
+ import { N as D } from "./chunks/index-cea13a24.mjs";
29
+ import { u as tt } from "./chunks/index-cea13a24.mjs";
30
+ import O from "./Components/NcBreadcrumb.mjs";
31
31
  import R from "./Components/NcBreadcrumbs.mjs";
32
- import O from "./Components/NcButton.mjs";
33
- import _ from "./Components/NcCheckboxRadioSwitch.mjs";
34
- import E from "./Components/NcColorPicker.mjs";
35
- import L from "./Components/NcContent.mjs";
36
- import M from "./Components/NcCounterBubble.mjs";
37
- import w from "./Components/NcDashboardWidget.mjs";
38
- import F from "./Components/NcDashboardWidgetItem.mjs";
32
+ import j from "./Components/NcButton.mjs";
33
+ import E from "./Components/NcCheckboxRadioSwitch.mjs";
34
+ import M from "./Components/NcColorPicker.mjs";
35
+ import _ from "./Components/NcContent.mjs";
36
+ import L from "./Components/NcCounterBubble.mjs";
37
+ import F from "./Components/NcDashboardWidget.mjs";
38
+ import w from "./Components/NcDashboardWidgetItem.mjs";
39
39
  import z from "./Components/NcDateTime.mjs";
40
40
  import G from "./Components/NcDateTimePicker.mjs";
41
41
  import W from "./Components/NcDateTimePickerNative.mjs";
42
42
  import H from "./Components/NcDialog.mjs";
43
43
  import V from "./Components/NcDialogButton.mjs";
44
- import U from "./Components/NcEmojiPicker.mjs";
45
- import $ from "./Components/NcEmptyContent.mjs";
46
- import q from "./Components/NcGuestContent.mjs";
47
- import J from "./Components/NcHeaderMenu.mjs";
48
- import { N as K } from "./chunks/index-20a9ace9.mjs";
44
+ import K from "./Components/NcEmojiPicker.mjs";
45
+ import U from "./Components/NcEmptyContent.mjs";
46
+ import $ from "./Components/NcGuestContent.mjs";
47
+ import q from "./Components/NcHeaderMenu.mjs";
48
+ import { N as J } from "./chunks/index-20a9ace9.mjs";
49
49
  import Q from "./Components/NcIconSvgWrapper.mjs";
50
50
  import X from "./Components/NcListItem.mjs";
51
51
  import Y from "./Components/NcListItemIcon.mjs";
@@ -59,12 +59,12 @@ import eo from "./Components/NcRelatedResourcesPanel.mjs";
59
59
  import { N as po } from "./chunks/index-5f2a5f57.mjs";
60
60
  import { r as mt } from "./chunks/index-5f2a5f57.mjs";
61
61
  import co, { NcAutoCompleteResult as fo } from "./Components/NcRichContenteditable.mjs";
62
- import { N as no } from "./chunks/NcRichText-1e8fd02d.mjs";
63
- import "./chunks/referencePickerModal-6bc8f6b9.mjs";
62
+ import { N as no } from "./chunks/NcRichText-f5cfcd57.mjs";
63
+ import "./chunks/referencePickerModal-c2f33569.mjs";
64
64
  import "@nextcloud/axios";
65
65
  import "@nextcloud/router";
66
66
  import No from "./Components/NcSelect.mjs";
67
- import "./chunks/l10n-f692947e.mjs";
67
+ import "./chunks/l10n-ef44019c.mjs";
68
68
  import ao from "./Components/NcTextField.mjs";
69
69
  import "@nextcloud/event-bus";
70
70
  import "vue";
@@ -72,20 +72,22 @@ import so from "./Components/NcSavingIndicatorIcon.mjs";
72
72
  import lo from "./Components/NcSelectTags.mjs";
73
73
  import uo from "./Components/NcSettingsInputText.mjs";
74
74
  import Ao from "./Components/NcSettingsSection.mjs";
75
- import { N as go } from "./chunks/NcSettingsSelectGroup-ae323579.mjs";
75
+ import { N as go } from "./chunks/NcSettingsSelectGroup-091c0306.mjs";
76
76
  import bo from "./Components/NcTimezonePicker.mjs";
77
77
  import So from "./Components/NcUserBubble.mjs";
78
- import vo from "./Components/NcTextArea.mjs";
79
- import { emojiAddRecent as pt, emojiSearch as ct } from "./Functions/emoji.mjs";
80
- import { default as nt } from "./Functions/usernameToColor.mjs";
78
+ import xo from "./Components/NcTextArea.mjs";
79
+ import { isFullscreenState as pt, useIsFullscreen as ct } from "./Composables/useIsFullscreen.mjs";
80
+ import { MOBILE_BREAKPOINT as nt, isMobileState as Nt, useIsMobile as at } from "./Composables/useIsMobile.mjs";
81
+ import { emojiAddRecent as lt, emojiSearch as ut } from "./Functions/emoji.mjs";
82
+ import { default as At } from "./Functions/usernameToColor.mjs";
81
83
  import { directive as To } from "./Directives/Focus.mjs";
82
- import { directive as xo } from "./Directives/Linkify.mjs";
84
+ import { directive as vo } from "./Directives/Linkify.mjs";
83
85
  import "./Directives/Tooltip.mjs";
84
- import { default as at } from "./Mixins/clickOutsideOptions.mjs";
85
- import { default as lt } from "./Mixins/isFullscreen.mjs";
86
- import { default as dt } from "./Mixins/isMobile.mjs";
86
+ import { default as bt } from "./Mixins/clickOutsideOptions.mjs";
87
+ import { default as xt } from "./Mixins/isFullscreen.mjs";
88
+ import { default as vt } from "./Mixins/isMobile.mjs";
87
89
  import { VTooltip as Co } from "floating-vue";
88
- import { VTooltip as gt } from "floating-vue";
90
+ import { VTooltip as It } from "floating-vue";
89
91
  /**
90
92
  * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
91
93
  *
@@ -107,7 +109,7 @@ import { VTooltip as gt } from "floating-vue";
107
109
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
108
110
  *
109
111
  */
110
- const ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
112
+ const Io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
111
113
  __proto__: null,
112
114
  NcActionButton: i,
113
115
  NcActionButtonGroup: m,
@@ -126,37 +128,37 @@ const ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
126
128
  NcAppContentList: g,
127
129
  NcAppNavigation: b,
128
130
  NcAppNavigationCaption: S,
129
- NcAppNavigationIconBullet: v,
131
+ NcAppNavigationIconBullet: x,
130
132
  NcAppNavigationItem: T,
131
- NcAppNavigationNew: x,
133
+ NcAppNavigationNew: v,
132
134
  NcAppNavigationNewItem: C,
133
- NcAppNavigationSettings: k,
134
- NcAppNavigationSpacer: h,
135
- NcAppSettingsDialog: I,
136
- NcAppSettingsSection: y,
135
+ NcAppNavigationSettings: I,
136
+ NcAppNavigationSpacer: k,
137
+ NcAppSettingsDialog: h,
138
+ NcAppSettingsSection: B,
137
139
  NcAppSidebar: P,
138
- NcAppSidebarTab: B,
140
+ NcAppSidebarTab: y,
139
141
  NcAutoCompleteResult: fo,
140
142
  NcAvatar: D,
141
- NcBreadcrumb: j,
143
+ NcBreadcrumb: O,
142
144
  NcBreadcrumbs: R,
143
- NcButton: O,
144
- NcCheckboxRadioSwitch: _,
145
- NcColorPicker: E,
146
- NcContent: L,
147
- NcCounterBubble: M,
148
- NcDashboardWidget: w,
149
- NcDashboardWidgetItem: F,
145
+ NcButton: j,
146
+ NcCheckboxRadioSwitch: E,
147
+ NcColorPicker: M,
148
+ NcContent: _,
149
+ NcCounterBubble: L,
150
+ NcDashboardWidget: F,
151
+ NcDashboardWidgetItem: w,
150
152
  NcDateTime: z,
151
153
  NcDateTimePicker: G,
152
154
  NcDateTimePickerNative: W,
153
155
  NcDialog: H,
154
156
  NcDialogButton: V,
155
- NcEmojiPicker: U,
156
- NcEmptyContent: $,
157
- NcGuestContent: q,
158
- NcHeaderMenu: J,
159
- NcHighlight: K,
157
+ NcEmojiPicker: K,
158
+ NcEmptyContent: U,
159
+ NcGuestContent: $,
160
+ NcHeaderMenu: q,
161
+ NcHighlight: J,
160
162
  NcIconSvgWrapper: Q,
161
163
  NcListItem: X,
162
164
  NcListItemIcon: Y,
@@ -176,7 +178,7 @@ const ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
176
178
  NcSettingsInputText: uo,
177
179
  NcSettingsSection: Ao,
178
180
  NcSettingsSelectGroup: go,
179
- NcTextArea: vo,
181
+ NcTextArea: xo,
180
182
  NcTextField: ao,
181
183
  NcTimezonePicker: bo,
182
184
  NcUserBubble: So
@@ -224,23 +226,24 @@ const Yr = (o) => o.type === "click" || o.type === "keydown" && o.key === "Enter
224
226
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
225
227
  *
226
228
  */
227
- const ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
229
+ const ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
228
230
  __proto__: null,
229
231
  Focus: To,
230
- Linkify: xo,
232
+ Linkify: vo,
231
233
  Tooltip: Co
232
234
  }, Symbol.toStringTag, { value: "Module" })), Zr = {
233
235
  install(o) {
234
- Object.entries(ko).forEach(([t, r]) => {
236
+ Object.entries(Io).forEach(([t, r]) => {
235
237
  o.component(r.name || t, r);
236
- }), Object.entries(ho).forEach(([t, r]) => {
238
+ }), Object.entries(ko).forEach(([t, r]) => {
237
239
  o.directive(t, r);
238
240
  });
239
241
  }
240
242
  };
241
243
  export {
242
244
  To as Focus,
243
- xo as Linkify,
245
+ vo as Linkify,
246
+ nt as MOBILE_BREAKPOINT,
244
247
  i as NcActionButton,
245
248
  m as NcActionButtonGroup,
246
249
  e as NcActionCaption,
@@ -258,37 +261,37 @@ export {
258
261
  g as NcAppContentList,
259
262
  b as NcAppNavigation,
260
263
  S as NcAppNavigationCaption,
261
- v as NcAppNavigationIconBullet,
264
+ x as NcAppNavigationIconBullet,
262
265
  T as NcAppNavigationItem,
263
- x as NcAppNavigationNew,
266
+ v as NcAppNavigationNew,
264
267
  C as NcAppNavigationNewItem,
265
- k as NcAppNavigationSettings,
266
- h as NcAppNavigationSpacer,
267
- I as NcAppSettingsDialog,
268
- y as NcAppSettingsSection,
268
+ I as NcAppNavigationSettings,
269
+ k as NcAppNavigationSpacer,
270
+ h as NcAppSettingsDialog,
271
+ B as NcAppSettingsSection,
269
272
  P as NcAppSidebar,
270
- B as NcAppSidebarTab,
273
+ y as NcAppSidebarTab,
271
274
  fo as NcAutoCompleteResult,
272
275
  D as NcAvatar,
273
- j as NcBreadcrumb,
276
+ O as NcBreadcrumb,
274
277
  R as NcBreadcrumbs,
275
- O as NcButton,
276
- _ as NcCheckboxRadioSwitch,
277
- E as NcColorPicker,
278
- L as NcContent,
279
- M as NcCounterBubble,
280
- w as NcDashboardWidget,
281
- F as NcDashboardWidgetItem,
278
+ j as NcButton,
279
+ E as NcCheckboxRadioSwitch,
280
+ M as NcColorPicker,
281
+ _ as NcContent,
282
+ L as NcCounterBubble,
283
+ F as NcDashboardWidget,
284
+ w as NcDashboardWidgetItem,
282
285
  z as NcDateTime,
283
286
  G as NcDateTimePicker,
284
287
  W as NcDateTimePickerNative,
285
288
  H as NcDialog,
286
289
  V as NcDialogButton,
287
- U as NcEmojiPicker,
288
- $ as NcEmptyContent,
289
- q as NcGuestContent,
290
- J as NcHeaderMenu,
291
- K as NcHighlight,
290
+ K as NcEmojiPicker,
291
+ U as NcEmptyContent,
292
+ $ as NcGuestContent,
293
+ q as NcHeaderMenu,
294
+ J as NcHighlight,
292
295
  Q as NcIconSvgWrapper,
293
296
  X as NcListItem,
294
297
  Y as NcListItemIcon,
@@ -308,19 +311,23 @@ export {
308
311
  uo as NcSettingsInputText,
309
312
  Ao as NcSettingsSection,
310
313
  go as NcSettingsSelectGroup,
311
- vo as NcTextArea,
314
+ xo as NcTextArea,
312
315
  ao as NcTextField,
313
316
  bo as NcTimezonePicker,
314
317
  So as NcUserBubble,
315
318
  Zr as NextcloudVuePlugin,
316
- gt as Tooltip,
317
- at as clickOutsideOptions,
318
- pt as emojiAddRecent,
319
- ct as emojiSearch,
319
+ It as Tooltip,
320
+ bt as clickOutsideOptions,
321
+ lt as emojiAddRecent,
322
+ ut as emojiSearch,
320
323
  Yr as isA11yActivation,
321
- lt as isFullscreen,
322
- dt as isMobile,
324
+ xt as isFullscreen,
325
+ pt as isFullscreenState,
326
+ vt as isMobile,
327
+ Nt as isMobileState,
323
328
  mt as richEditor,
329
+ ct as useIsFullscreen,
330
+ at as useIsMobile,
324
331
  tt as userStatus,
325
- nt as usernameToColor
332
+ At as usernameToColor
326
333
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/components/index.js","../src/functions/a11y/index.ts","../src/directives/index.js","../src/plugin.ts"],"sourcesContent":["/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport { default as NcActionButton } from './NcActionButton/index.js'\nexport { default as NcActionButtonGroup } from './NcActionButtonGroup/index.js'\nexport { default as NcActionCaption } from './NcActionCaption/index.js'\nexport { default as NcActionCheckbox } from './NcActionCheckbox/index.js'\nexport { default as NcActionInput } from './NcActionInput/index.js'\nexport { default as NcActionLink } from './NcActionLink/index.js'\nexport { default as NcActionRadio } from './NcActionRadio/index.js'\nexport { default as NcActionRouter } from './NcActionRouter/index.js'\nexport { default as NcActions } from './NcActions/index.js'\nexport { default as NcActionSeparator } from './NcActionSeparator/index.js'\nexport { default as NcActionText } from './NcActionText/index.js'\nexport { default as NcActionTextEditable } from './NcActionTextEditable/index.js'\nexport { default as NcAppContent } from './NcAppContent/index.js'\nexport { default as NcAppContentDetails } from './NcAppContentDetails/index.js'\nexport { default as NcAppContentList } from './NcAppContentList/index.js'\nexport { default as NcAppNavigation } from './NcAppNavigation/index.js'\nexport { default as NcAppNavigationCaption } from './NcAppNavigationCaption/index.js'\nexport { default as NcAppNavigationIconBullet } from './NcAppNavigationIconBullet/index.js'\nexport { default as NcAppNavigationItem } from './NcAppNavigationItem/index.js'\nexport { default as NcAppNavigationNew } from './NcAppNavigationNew/index.js'\nexport { default as NcAppNavigationNewItem } from './NcAppNavigationNewItem/index.js'\nexport { default as NcAppNavigationSettings } from './NcAppNavigationSettings/index.js'\nexport { default as NcAppNavigationSpacer } from './NcAppNavigationSpacer/index.js'\nexport { default as NcAppSettingsDialog } from './NcAppSettingsDialog/index.js'\nexport { default as NcAppSettingsSection } from './NcAppSettingsSection/index.js'\nexport { default as NcAppSidebar } from './NcAppSidebar/index.js'\nexport { default as NcAppSidebarTab } from './NcAppSidebarTab/index.js'\nexport { default as NcAvatar } from './NcAvatar/index.js'\nexport { default as NcBreadcrumb } from './NcBreadcrumb/index.js'\nexport { default as NcBreadcrumbs } from './NcBreadcrumbs/index.js'\nexport { default as NcButton } from './NcButton/index.js'\nexport { default as NcCheckboxRadioSwitch } from './NcCheckboxRadioSwitch/index.js'\nexport { default as NcColorPicker } from './NcColorPicker/index.js'\nexport { default as NcContent } from './NcContent/index.js'\nexport { default as NcCounterBubble } from './NcCounterBubble/index.js'\nexport { default as NcDashboardWidget } from './NcDashboardWidget/index.js'\nexport { default as NcDashboardWidgetItem } from './NcDashboardWidgetItem/index.js'\nexport { default as NcDateTime } from './NcDateTime/index.js'\nexport { default as NcDateTimePicker } from './NcDateTimePicker/index.js'\nexport { default as NcDateTimePickerNative } from './NcDateTimePickerNative/index.js'\nexport { default as NcDialog } from './NcDialog/index.js'\nexport { default as NcDialogButton } from './NcDialogButton/index.js'\n// Not exported on purpose\n// export { default as NcEllipsisedOption } from './NcEllipsisedOption/index.js'\nexport { default as NcEmojiPicker } from './NcEmojiPicker/index.js'\nexport { default as NcEmptyContent } from './NcEmptyContent/index.js'\nexport { default as NcGuestContent } from './NcGuestContent/index.js'\nexport { default as NcHeaderMenu } from './NcHeaderMenu/index.js'\nexport { default as NcHighlight } from './NcHighlight/index.js'\nexport { default as NcIconSvgWrapper } from './NcIconSvgWrapper/index.js'\n// Not exported on purpose as it is only meant as a base component\n// export { default as NcInputField } from './NcInputField/index.js'\nexport { default as NcListItem } from './NcListItem/index.js'\nexport { default as NcListItemIcon } from './NcListItemIcon/index.js'\nexport { default as NcLoadingIcon } from './NcLoadingIcon/index.js'\nexport { default as NcModal } from './NcModal/index.js'\nexport { default as NcNoteCard } from './NcNoteCard/index.js'\nexport { default as NcPasswordField } from './NcPasswordField/index.js'\nexport { default as NcPopover } from './NcPopover/index.js'\nexport { default as NcProgressBar } from './NcProgressBar/index.js'\nexport { default as NcRelatedResourcesPanel } from './NcRelatedResourcesPanel/index.js'\nexport { default as NcRichContenteditable, NcAutoCompleteResult, NcMentionBubble } from './NcRichContenteditable/index.js'\nexport { default as NcRichText } from './NcRichText/index.js'\nexport { default as NcSavingIndicatorIcon } from './NcSavingIndicatorIcon/index.js'\nexport { default as NcSelect } from './NcSelect/index.js'\nexport { default as NcSelectTags } from './NcSelectTags/index.js'\nexport { default as NcSettingsInputText } from './NcSettingsInputText/index.js'\nexport { default as NcSettingsSection } from './NcSettingsSection/index.js'\nexport { default as NcSettingsSelectGroup } from './NcSettingsSelectGroup/index.js'\nexport { default as NcTextField } from './NcTextField/index.js'\nexport { default as NcTimezonePicker } from './NcTimezonePicker/index.js'\nexport { default as NcUserBubble } from './NcUserBubble/index.js'\nexport { default as NcTextArea } from './NcTextArea/index.js'\n","/**\n * @copyright 2022 Christopher Ng <chrng8@gmail.com>\n *\n * @author Christopher Ng <chrng8@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Return true if the DOM event is an accessible mouse or keyboard element activation, false otherwise\n *\n * @param {Event} event DOM event\n *\n * @return {boolean}\n */\nexport const isA11yActivation = (event: Event) => {\n\tif (event.type === 'click') {\n\t\treturn true\n\t}\n\tif (event.type === 'keydown' && (event as KeyboardEvent).key === 'Enter') {\n\t\treturn true\n\t}\n\treturn false\n}\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport { default as Focus } from './Focus/index.js'\nexport { default as Linkify } from './Linkify/index.js'\nexport { default as Tooltip } from './Tooltip/index.js'\n","import type { DefineComponent, Directive, PluginObject } from 'vue'\n\nimport * as NcComponents from './components/index.js'\nimport * as NcDirectives from './directives/index.js'\n\n/**\n * Install all Nextcloud Vue components and directives globally\n * @example\n * ```js\n * import { NextcloudVuePlugin } from '@nextcloud/vue'\n * import Vue from 'vue'\n *\n * // ...\n *\n * Vue.use(NextcloudVuePlugin)\n * new Vue({\n * // options\n * })\n * ```\n */\nexport const NextcloudVuePlugin: PluginObject<never> = {\n\tinstall(Vue) {\n\t\t// Install components\n\t\tObject.entries(NcComponents as { [key: string]: DefineComponent }).forEach(([name, component]) => {\n\t\t\tVue.component(component.name || name, component)\n\t\t})\n\n\t\t// Install directives\n\t\tObject.entries(NcDirectives as { [key: string]: Directive }).forEach(([name, directive]) => {\n\t\t\tVue.directive(name, directive)\n\t\t})\n\t},\n}\n"],"names":["isA11yActivation","event","NextcloudVuePlugin","Vue","NcComponents","name","component","NcDirectives","directive"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6Ba,MAAAA,KAAmB,CAACC,MAC5BA,EAAM,SAAS,WAGfA,EAAM,SAAS,aAAcA,EAAwB,QAAQ;ACjClE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;8CCoBaC,KAA0C;AAAA,EACtD,QAAQC,GAAK;AAEL,WAAA,QAAQC,EAAkD,EAAE,QAAQ,CAAC,CAACC,GAAMC,CAAS,MAAM;AACjG,MAAAH,EAAI,UAAUG,EAAU,QAAQD,GAAMC,CAAS;AAAA,IAAA,CAC/C,GAGM,OAAA,QAAQC,EAA4C,EAAE,QAAQ,CAAC,CAACF,GAAMG,CAAS,MAAM;AACvF,MAAAL,EAAA,UAAUE,GAAMG,CAAS;AAAA,IAAA,CAC7B;AAAA,EACF;AACD;"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/components/index.js","../src/functions/a11y/index.ts","../src/directives/index.js","../src/plugin.ts"],"sourcesContent":["/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport { default as NcActionButton } from './NcActionButton/index.js'\nexport { default as NcActionButtonGroup } from './NcActionButtonGroup/index.js'\nexport { default as NcActionCaption } from './NcActionCaption/index.js'\nexport { default as NcActionCheckbox } from './NcActionCheckbox/index.js'\nexport { default as NcActionInput } from './NcActionInput/index.js'\nexport { default as NcActionLink } from './NcActionLink/index.js'\nexport { default as NcActionRadio } from './NcActionRadio/index.js'\nexport { default as NcActionRouter } from './NcActionRouter/index.js'\nexport { default as NcActions } from './NcActions/index.js'\nexport { default as NcActionSeparator } from './NcActionSeparator/index.js'\nexport { default as NcActionText } from './NcActionText/index.js'\nexport { default as NcActionTextEditable } from './NcActionTextEditable/index.js'\nexport { default as NcAppContent } from './NcAppContent/index.js'\nexport { default as NcAppContentDetails } from './NcAppContentDetails/index.js'\nexport { default as NcAppContentList } from './NcAppContentList/index.js'\nexport { default as NcAppNavigation } from './NcAppNavigation/index.js'\nexport { default as NcAppNavigationCaption } from './NcAppNavigationCaption/index.js'\nexport { default as NcAppNavigationIconBullet } from './NcAppNavigationIconBullet/index.js'\nexport { default as NcAppNavigationItem } from './NcAppNavigationItem/index.js'\nexport { default as NcAppNavigationNew } from './NcAppNavigationNew/index.js'\nexport { default as NcAppNavigationNewItem } from './NcAppNavigationNewItem/index.js'\nexport { default as NcAppNavigationSettings } from './NcAppNavigationSettings/index.js'\nexport { default as NcAppNavigationSpacer } from './NcAppNavigationSpacer/index.js'\nexport { default as NcAppSettingsDialog } from './NcAppSettingsDialog/index.js'\nexport { default as NcAppSettingsSection } from './NcAppSettingsSection/index.js'\nexport { default as NcAppSidebar } from './NcAppSidebar/index.js'\nexport { default as NcAppSidebarTab } from './NcAppSidebarTab/index.js'\nexport { default as NcAvatar } from './NcAvatar/index.js'\nexport { default as NcBreadcrumb } from './NcBreadcrumb/index.js'\nexport { default as NcBreadcrumbs } from './NcBreadcrumbs/index.js'\nexport { default as NcButton } from './NcButton/index.js'\nexport { default as NcCheckboxRadioSwitch } from './NcCheckboxRadioSwitch/index.js'\nexport { default as NcColorPicker } from './NcColorPicker/index.js'\nexport { default as NcContent } from './NcContent/index.js'\nexport { default as NcCounterBubble } from './NcCounterBubble/index.js'\nexport { default as NcDashboardWidget } from './NcDashboardWidget/index.js'\nexport { default as NcDashboardWidgetItem } from './NcDashboardWidgetItem/index.js'\nexport { default as NcDateTime } from './NcDateTime/index.js'\nexport { default as NcDateTimePicker } from './NcDateTimePicker/index.js'\nexport { default as NcDateTimePickerNative } from './NcDateTimePickerNative/index.js'\nexport { default as NcDialog } from './NcDialog/index.js'\nexport { default as NcDialogButton } from './NcDialogButton/index.js'\n// Not exported on purpose\n// export { default as NcEllipsisedOption } from './NcEllipsisedOption/index.js'\nexport { default as NcEmojiPicker } from './NcEmojiPicker/index.js'\nexport { default as NcEmptyContent } from './NcEmptyContent/index.js'\nexport { default as NcGuestContent } from './NcGuestContent/index.js'\nexport { default as NcHeaderMenu } from './NcHeaderMenu/index.js'\nexport { default as NcHighlight } from './NcHighlight/index.js'\nexport { default as NcIconSvgWrapper } from './NcIconSvgWrapper/index.js'\n// Not exported on purpose as it is only meant as a base component\n// export { default as NcInputField } from './NcInputField/index.js'\nexport { default as NcListItem } from './NcListItem/index.js'\nexport { default as NcListItemIcon } from './NcListItemIcon/index.js'\nexport { default as NcLoadingIcon } from './NcLoadingIcon/index.js'\nexport { default as NcModal } from './NcModal/index.js'\nexport { default as NcNoteCard } from './NcNoteCard/index.js'\nexport { default as NcPasswordField } from './NcPasswordField/index.js'\nexport { default as NcPopover } from './NcPopover/index.js'\nexport { default as NcProgressBar } from './NcProgressBar/index.js'\nexport { default as NcRelatedResourcesPanel } from './NcRelatedResourcesPanel/index.js'\nexport { default as NcRichContenteditable, NcAutoCompleteResult, NcMentionBubble } from './NcRichContenteditable/index.js'\nexport { default as NcRichText } from './NcRichText/index.js'\nexport { default as NcSavingIndicatorIcon } from './NcSavingIndicatorIcon/index.js'\nexport { default as NcSelect } from './NcSelect/index.js'\nexport { default as NcSelectTags } from './NcSelectTags/index.js'\nexport { default as NcSettingsInputText } from './NcSettingsInputText/index.js'\nexport { default as NcSettingsSection } from './NcSettingsSection/index.js'\nexport { default as NcSettingsSelectGroup } from './NcSettingsSelectGroup/index.js'\nexport { default as NcTextField } from './NcTextField/index.js'\nexport { default as NcTimezonePicker } from './NcTimezonePicker/index.js'\nexport { default as NcUserBubble } from './NcUserBubble/index.js'\nexport { default as NcTextArea } from './NcTextArea/index.js'\n","/**\n * @copyright 2022 Christopher Ng <chrng8@gmail.com>\n *\n * @author Christopher Ng <chrng8@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Return true if the DOM event is an accessible mouse or keyboard element activation, false otherwise\n *\n * @param {Event} event DOM event\n *\n * @return {boolean}\n */\nexport const isA11yActivation = (event: Event) => {\n\tif (event.type === 'click') {\n\t\treturn true\n\t}\n\tif (event.type === 'keydown' && (event as KeyboardEvent).key === 'Enter') {\n\t\treturn true\n\t}\n\treturn false\n}\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport { default as Focus } from './Focus/index.js'\nexport { default as Linkify } from './Linkify/index.js'\nexport { default as Tooltip } from './Tooltip/index.js'\n","import type { DefineComponent, Directive, PluginObject } from 'vue'\n\nimport * as NcComponents from './components/index.js'\nimport * as NcDirectives from './directives/index.js'\n\n/**\n * Install all Nextcloud Vue components and directives globally\n * @example\n * ```js\n * import { NextcloudVuePlugin } from '@nextcloud/vue'\n * import Vue from 'vue'\n *\n * // ...\n *\n * Vue.use(NextcloudVuePlugin)\n * new Vue({\n * // options\n * })\n * ```\n */\nexport const NextcloudVuePlugin: PluginObject<never> = {\n\tinstall(Vue) {\n\t\t// Install components\n\t\tObject.entries(NcComponents as { [key: string]: DefineComponent }).forEach(([name, component]) => {\n\t\t\tVue.component(component.name || name, component)\n\t\t})\n\n\t\t// Install directives\n\t\tObject.entries(NcDirectives as { [key: string]: Directive }).forEach(([name, directive]) => {\n\t\t\tVue.directive(name, directive)\n\t\t})\n\t},\n}\n"],"names":["isA11yActivation","event","NextcloudVuePlugin","Vue","NcComponents","name","component","NcDirectives","directive"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6Ba,MAAAA,KAAmB,CAACC,MAC5BA,EAAM,SAAS,WAGfA,EAAM,SAAS,aAAcA,EAAwB,QAAQ;ACjClE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;8CCoBaC,KAA0C;AAAA,EACtD,QAAQC,GAAK;AAEL,WAAA,QAAQC,EAAkD,EAAE,QAAQ,CAAC,CAACC,GAAMC,CAAS,MAAM;AACjG,MAAAH,EAAI,UAAUG,EAAU,QAAQD,GAAMC,CAAS;AAAA,IAAA,CAC/C,GAGM,OAAA,QAAQC,EAA4C,EAAE,QAAQ,CAAC,CAACF,GAAMG,CAAS,MAAM;AACvF,MAAAL,EAAA,UAAUE,GAAMG,CAAS;AAAA,IAAA,CAC7B;AAAA,EACF;AACD;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextcloud/vue",
3
- "version": "8.0.1",
3
+ "version": "8.2.0",
4
4
  "description": "Nextcloud vue components",
5
5
  "keywords": [
6
6
  "vuejs",
@@ -75,7 +75,7 @@
75
75
  "@vueuse/components": "^10.0.2",
76
76
  "@vueuse/core": "^10.1.2",
77
77
  "clone": "^2.1.2",
78
- "debounce": "1.2.1",
78
+ "debounce": "2.0.0",
79
79
  "dompurify": "^3.0.5",
80
80
  "emoji-mart-vue-fast": "^15.0.0",
81
81
  "escape-html": "^1.0.3",
@@ -1,46 +0,0 @@
1
- /**
2
- * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
3
- *
4
- * @author John Molakvoæ <skjnldsv@protonmail.com>
5
- *
6
- * @license AGPL-3.0-or-later
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU Affero General Public License as
10
- * published by the Free Software Foundation, either version 3 of the
11
- * License, or (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU Affero General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU Affero General Public License
19
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
- function a(n, t, e) {
23
- this.r = n, this.g = t, this.b = e;
24
- }
25
- function f(n, t) {
26
- const e = new Array(3);
27
- return e[0] = (t[1].r - t[0].r) / n, e[1] = (t[1].g - t[0].g) / n, e[2] = (t[1].b - t[0].b) / n, e;
28
- }
29
- function u(n, t, e) {
30
- const o = [];
31
- o.push(t);
32
- const r = f(n, [t, e]);
33
- for (let c = 1; c < n; c++) {
34
- const i = parseInt(t.r + r[0] * c, 10), l = parseInt(t.g + r[1] * c, 10), b = parseInt(t.b + r[2] * c, 10);
35
- o.push(new a(i, l, b));
36
- }
37
- return o;
38
- }
39
- function p(n) {
40
- n || (n = 6);
41
- const t = new a(182, 70, 157), e = new a(221, 203, 85), o = new a(0, 130, 201), r = u(n, t, e), c = u(n, e, o), i = u(n, o, t);
42
- return r.concat(c).concat(i);
43
- }
44
- export {
45
- p as G
46
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"GenColors-38246c38.mjs","sources":["../../src/utils/GenColors.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Originally taken from https://github.com/nextcloud/server/blob/master/core/js/placeholder.js\n */\n\n/**\n * @param {number} r The red value\n * @param {number} g The green value\n * @param {number} b The blue value\n */\nfunction Color(r, g, b) {\n\tthis.r = r\n\tthis.g = g\n\tthis.b = b\n}\n\n/**\n * Calculate the number of steps\n *\n * @param {number} steps The number of steps\n * @param {Array} ends The ends\n * @return {Array} Array containing the number of steps per color\n */\nfunction stepCalc(steps, ends) {\n\tconst step = new Array(3)\n\tstep[0] = (ends[1].r - ends[0].r) / steps\n\tstep[1] = (ends[1].g - ends[0].g) / steps\n\tstep[2] = (ends[1].b - ends[0].b) / steps\n\treturn step\n}\n\n/**\n * Create a color palette from two colors\n *\n * @param {number} steps The number of steps the palette has\n * @param {string} color1 The first color\n * @param {string} color2 The second color\n * @return {Array} The created palette array\n */\nfunction mixPalette(steps, color1, color2) {\n\tconst palette = []\n\tpalette.push(color1)\n\tconst step = stepCalc(steps, [color1, color2])\n\tfor (let i = 1; i < steps; i++) {\n\t\tconst r = parseInt(color1.r + step[0] * i, 10)\n\t\tconst g = parseInt(color1.g + step[1] * i, 10)\n\t\tconst b = parseInt(color1.b + step[2] * i, 10)\n\t\tpalette.push(new Color(r, g, b))\n\t}\n\treturn palette\n}\n\n/**\n * Generate colors from the official nextcloud color\n * You can provide how many colors you want (multiplied by 3)\n * if step = 6\n * 3 colors * 6 will result in 18 generated colors\n *\n * @param {number} [steps] Number of steps to go from a color to another\n * @return {object[]}\n */\nfunction GenColors(steps) {\n\tif (!steps) {\n\t\tsteps = 6\n\t}\n\n\tconst red = new Color(182, 70, 157)\n\tconst yellow = new Color(221, 203, 85)\n\tconst blue = new Color(0, 130, 201) // Nextcloud blue\n\n\tconst palette1 = mixPalette(steps, red, yellow)\n\tconst palette2 = mixPalette(steps, yellow, blue)\n\tconst palette3 = mixPalette(steps, blue, red)\n\n\treturn palette1.concat(palette2).concat(palette3)\n}\n\nexport default GenColors\n"],"names":["Color","r","g","b","stepCalc","steps","ends","step","mixPalette","color1","color2","palette","i","GenColors","red","yellow","blue","palette1","palette2","palette3"],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BA,SAASA,EAAMC,GAAGC,GAAGC,GAAG;AACvB,OAAK,IAAIF,GACT,KAAK,IAAIC,GACT,KAAK,IAAIC;AACV;AASA,SAASC,EAASC,GAAOC,GAAM;AAC9B,QAAMC,IAAO,IAAI,MAAM,CAAC;AACxB,SAAAA,EAAK,CAAC,KAAKD,EAAK,CAAC,EAAE,IAAIA,EAAK,CAAC,EAAE,KAAKD,GACpCE,EAAK,CAAC,KAAKD,EAAK,CAAC,EAAE,IAAIA,EAAK,CAAC,EAAE,KAAKD,GACpCE,EAAK,CAAC,KAAKD,EAAK,CAAC,EAAE,IAAIA,EAAK,CAAC,EAAE,KAAKD,GAC7BE;AACR;AAUA,SAASC,EAAWH,GAAOI,GAAQC,GAAQ;AAC1C,QAAMC,IAAU,CAAE;AAClB,EAAAA,EAAQ,KAAKF,CAAM;AACnB,QAAMF,IAAOH,EAASC,GAAO,CAACI,GAAQC,CAAM,CAAC;AAC7C,WAASE,IAAI,GAAGA,IAAIP,GAAOO,KAAK;AAC/B,UAAMX,IAAI,SAASQ,EAAO,IAAIF,EAAK,CAAC,IAAIK,GAAG,EAAE,GACvCV,IAAI,SAASO,EAAO,IAAIF,EAAK,CAAC,IAAIK,GAAG,EAAE,GACvC,IAAI,SAASH,EAAO,IAAIF,EAAK,CAAC,IAAIK,GAAG,EAAE;AAC7C,IAAAD,EAAQ,KAAK,IAAIX,EAAMC,GAAGC,GAAG,CAAC,CAAC;AAAA,EAC/B;AACD,SAAOS;AACR;AAWA,SAASE,EAAUR,GAAO;AACzB,EAAKA,MACJA,IAAQ;AAGT,QAAMS,IAAM,IAAId,EAAM,KAAK,IAAI,GAAG,GAC5Be,IAAS,IAAIf,EAAM,KAAK,KAAK,EAAE,GAC/BgB,IAAO,IAAIhB,EAAM,GAAG,KAAK,GAAG,GAE5BiB,IAAWT,EAAWH,GAAOS,GAAKC,CAAM,GACxCG,IAAWV,EAAWH,GAAOU,GAAQC,CAAI,GACzCG,IAAWX,EAAWH,GAAOW,GAAMF,CAAG;AAE5C,SAAOG,EAAS,OAAOC,CAAQ,EAAE,OAAOC,CAAQ;AACjD;"}
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /**
3
- * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
4
- *
5
- * @author John Molakvoæ <skjnldsv@protonmail.com>
6
- *
7
- * @license AGPL-3.0-or-later
8
- *
9
- * This program is free software: you can redistribute it and/or modify
10
- * it under the terms of the GNU Affero General Public License as
11
- * published by the Free Software Foundation, either version 3 of the
12
- * License, or (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU Affero General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public License
20
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
- *
22
- */
23
- function a(n, t, e) {
24
- this.r = n, this.g = t, this.b = e;
25
- }
26
- function b(n, t) {
27
- const e = new Array(3);
28
- return e[0] = (t[1].r - t[0].r) / n, e[1] = (t[1].g - t[0].g) / n, e[2] = (t[1].b - t[0].b) / n, e;
29
- }
30
- function u(n, t, e) {
31
- const o = [];
32
- o.push(t);
33
- const r = b(n, [t, e]);
34
- for (let c = 1; c < n; c++) {
35
- const i = parseInt(t.r + r[0] * c, 10), l = parseInt(t.g + r[1] * c, 10), s = parseInt(t.b + r[2] * c, 10);
36
- o.push(new a(i, l, s));
37
- }
38
- return o;
39
- }
40
- function f(n) {
41
- n || (n = 6);
42
- const t = new a(182, 70, 157), e = new a(221, 203, 85), o = new a(0, 130, 201), r = u(n, t, e), c = u(n, e, o), i = u(n, o, t);
43
- return r.concat(c).concat(i);
44
- }
45
- exports.GenColors = f;
@@ -1 +0,0 @@
1
- {"version":3,"file":"GenColors-eedcc70a.cjs","sources":["../../src/utils/GenColors.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Originally taken from https://github.com/nextcloud/server/blob/master/core/js/placeholder.js\n */\n\n/**\n * @param {number} r The red value\n * @param {number} g The green value\n * @param {number} b The blue value\n */\nfunction Color(r, g, b) {\n\tthis.r = r\n\tthis.g = g\n\tthis.b = b\n}\n\n/**\n * Calculate the number of steps\n *\n * @param {number} steps The number of steps\n * @param {Array} ends The ends\n * @return {Array} Array containing the number of steps per color\n */\nfunction stepCalc(steps, ends) {\n\tconst step = new Array(3)\n\tstep[0] = (ends[1].r - ends[0].r) / steps\n\tstep[1] = (ends[1].g - ends[0].g) / steps\n\tstep[2] = (ends[1].b - ends[0].b) / steps\n\treturn step\n}\n\n/**\n * Create a color palette from two colors\n *\n * @param {number} steps The number of steps the palette has\n * @param {string} color1 The first color\n * @param {string} color2 The second color\n * @return {Array} The created palette array\n */\nfunction mixPalette(steps, color1, color2) {\n\tconst palette = []\n\tpalette.push(color1)\n\tconst step = stepCalc(steps, [color1, color2])\n\tfor (let i = 1; i < steps; i++) {\n\t\tconst r = parseInt(color1.r + step[0] * i, 10)\n\t\tconst g = parseInt(color1.g + step[1] * i, 10)\n\t\tconst b = parseInt(color1.b + step[2] * i, 10)\n\t\tpalette.push(new Color(r, g, b))\n\t}\n\treturn palette\n}\n\n/**\n * Generate colors from the official nextcloud color\n * You can provide how many colors you want (multiplied by 3)\n * if step = 6\n * 3 colors * 6 will result in 18 generated colors\n *\n * @param {number} [steps] Number of steps to go from a color to another\n * @return {object[]}\n */\nfunction GenColors(steps) {\n\tif (!steps) {\n\t\tsteps = 6\n\t}\n\n\tconst red = new Color(182, 70, 157)\n\tconst yellow = new Color(221, 203, 85)\n\tconst blue = new Color(0, 130, 201) // Nextcloud blue\n\n\tconst palette1 = mixPalette(steps, red, yellow)\n\tconst palette2 = mixPalette(steps, yellow, blue)\n\tconst palette3 = mixPalette(steps, blue, red)\n\n\treturn palette1.concat(palette2).concat(palette3)\n}\n\nexport default GenColors\n"],"names":["Color","r","g","b","stepCalc","steps","ends","step","mixPalette","color1","color2","palette","i","GenColors","red","yellow","blue","palette1","palette2","palette3"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BA,SAASA,EAAMC,GAAGC,GAAGC,GAAG;AACvB,OAAK,IAAIF,GACT,KAAK,IAAIC,GACT,KAAK,IAAIC;AACV;AASA,SAASC,EAASC,GAAOC,GAAM;AAC9B,QAAMC,IAAO,IAAI,MAAM,CAAC;AACxB,SAAAA,EAAK,CAAC,KAAKD,EAAK,CAAC,EAAE,IAAIA,EAAK,CAAC,EAAE,KAAKD,GACpCE,EAAK,CAAC,KAAKD,EAAK,CAAC,EAAE,IAAIA,EAAK,CAAC,EAAE,KAAKD,GACpCE,EAAK,CAAC,KAAKD,EAAK,CAAC,EAAE,IAAIA,EAAK,CAAC,EAAE,KAAKD,GAC7BE;AACR;AAUA,SAASC,EAAWH,GAAOI,GAAQC,GAAQ;AAC1C,QAAMC,IAAU,CAAE;AAClB,EAAAA,EAAQ,KAAKF,CAAM;AACnB,QAAMF,IAAOH,EAASC,GAAO,CAACI,GAAQC,CAAM,CAAC;AAC7C,WAASE,IAAI,GAAGA,IAAIP,GAAOO,KAAK;AAC/B,UAAMX,IAAI,SAASQ,EAAO,IAAIF,EAAK,CAAC,IAAIK,GAAG,EAAE,GACvCV,IAAI,SAASO,EAAO,IAAIF,EAAK,CAAC,IAAIK,GAAG,EAAE,GACvCT,IAAI,SAASM,EAAO,IAAIF,EAAK,CAAC,IAAIK,GAAG,EAAE;AAC7C,IAAAD,EAAQ,KAAK,IAAIX,EAAMC,GAAGC,GAAGC,CAAC,CAAC;AAAA,EAC/B;AACD,SAAOQ;AACR;AAWA,SAASE,EAAUR,GAAO;AACzB,EAAKA,MACJA,IAAQ;AAGT,QAAMS,IAAM,IAAId,EAAM,KAAK,IAAI,GAAG,GAC5Be,IAAS,IAAIf,EAAM,KAAK,KAAK,EAAE,GAC/BgB,IAAO,IAAIhB,EAAM,GAAG,KAAK,GAAG,GAE5BiB,IAAWT,EAAWH,GAAOS,GAAKC,CAAM,GACxCG,IAAWV,EAAWH,GAAOU,GAAQC,CAAI,GACzCG,IAAWX,EAAWH,GAAOW,GAAMF,CAAG;AAE5C,SAAOG,EAAS,OAAOC,CAAQ,EAAE,OAAOC,CAAQ;AACjD;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcSettingsSelectGroup-ae323579.mjs","sources":["../../src/components/NcSettingsSelectGroup/NcSettingsSelectGroup.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n```vue\n<template>\n\t<section>\n\t\t<NcSettingsSelectGroup v-model=\"groups\" placeholder=\"Select user groups\" label=\"The hidden label\" />\n\t\t<NcSettingsSelectGroup v-model=\"otherGroups\" :disabled=\"true\" label=\"Also a fallback for the placeholder\" />\n\t\t<div>You have selected: <code>{{ groups }}</code> and <code>{{ otherGroups }}</code></div>\n\t</section>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tgroups: [],\n\t\t\totherGroups: ['admin']\n\t\t}\n\t}\n}\n</script>\n<style scoped>\nsection * {\n\tpadding: 6px 0px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<div>\n\t\t<label v-if=\"label\" :for=\"id\" class=\"hidden-visually\">{{ label }}</label>\n\t\t<NcSelect :value=\"inputValue\"\n\t\t\t:options=\"groupsArray\"\n\t\t\t:placeholder=\"placeholder || label\"\n\t\t\t:filter-by=\"filterGroups\"\n\t\t\t:input-id=\"id\"\n\t\t\t:limit=\"5\"\n\t\t\tlabel=\"displayname\"\n\t\t\t:multiple=\"true\"\n\t\t\t:close-on-select=\"false\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t@input=\"update\"\n\t\t\t@search=\"onSearch\" />\n\t\t<div v-show=\"hasError\" class=\"select-group-error\">\n\t\t\t{{ errorMessage }}\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport NcSelect from '../../components/NcSelect/index.js'\nimport { t } from '../../l10n.js'\nimport l10n from '../../mixins/l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { debounce } from 'debounce'\n\nexport default {\n\tname: 'NcSettingsSelectGroup',\n\tcomponents: {\n\t\tNcSelect,\n\t},\n\tmixins: [l10n],\n\tprops: {\n\t\t/**\n\t\t * The text of the label element of the select group input\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Placeholder for the input element\n\t\t * For backwards compatibility it falls back to the `label` value\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the select group element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * value of the select group input\n\t\t * A list of group IDs can be provided\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the settings select group input\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\temits: [\n\t\t'input',\n\t\t'error',\n\t],\n\tdata() {\n\t\treturn {\n\t\t\t/** Temporary store to cache groups */\n\t\t\tgroups: {},\n\t\t\trandId: GenRandomId(),\n\t\t\terrorMessage: '',\n\t\t}\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * If the error message should be shown\n\t\t */\n\t\thasError() {\n\t\t\treturn this.errorMessage !== ''\n\t\t},\n\n\t\t/**\n\t\t * Validate input value and only return valid strings (group IDs)\n\t\t *\n\t\t * @return {string[]}\n\t\t */\n\t\tfilteredValue() {\n\t\t\treturn this.value.filter((group) => group !== '' && typeof group === 'string')\n\t\t},\n\n\t\t/**\n\t\t * value property converted to an array of group objects used as input for the NcSelect\n\t\t */\n\t\tinputValue() {\n\t\t\treturn this.filteredValue.map(\n\t\t\t\t(id) => {\n\t\t\t\t\tif (typeof this.groups[id] === 'undefined') {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tdisplayname: id,\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this.groups[id]\n\t\t\t\t},\n\t\t\t)\n\t\t},\n\n\t\t/**\n\t\t * Convert groups object to array of groups required for NcSelect.options\n\t\t * Filter out currently selected values\n\t\t *\n\t\t * @return {object[]}\n\t\t */\n\t\tgroupsArray() {\n\t\t\treturn Object.values(this.groups).filter(g => !this.value.includes(g.id))\n\t\t},\n\t},\n\twatch: {\n\t\t/**\n\t\t * If the value is changed, check that all groups are loaded so we show the correct display name\n\t\t */\n\t\tvalue: {\n\t\t\thandler() {\n\t\t\t\tconst loadedGroupIds = Object.keys(this.groups)\n\t\t\t\tconst missing = this.filteredValue.filter(group => !loadedGroupIds.includes(group))\n\t\t\t\tmissing.forEach((groupId) => {\n\t\t\t\t\tthis.loadGroup(groupId)\n\t\t\t\t})\n\t\t\t},\n\t\t\t// Run the watch handler also when the component is initially mounted\n\t\t\timmediate: true,\n\t\t},\n\t},\n\t/**\n\t * Load groups matching the empty query to reduce API calls\n\t */\n\tasync mounted() {\n\t\t// version scoped to prevent issues with different library versions\n\t\tconst storageName = `${appName}:${appVersion}/initialGroups`\n\n\t\tlet savedGroups = window.sessionStorage.getItem(storageName)\n\t\tif (savedGroups) {\n\t\t\tsavedGroups = Object.fromEntries(JSON.parse(savedGroups).map(group => [group.id, group]))\n\t\t\tthis.groups = { ...this.groups, ...savedGroups }\n\t\t} else {\n\t\t\tawait this.loadGroup('')\n\t\t\twindow.sessionStorage.setItem(storageName, JSON.stringify(Object.values(this.groups)))\n\t\t}\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Called when a new group is selected or previous group is deselected to emit the update event\n\t\t *\n\t\t * @param {object[]} updatedValue Array of selected groups\n\t\t */\n\t\tupdate(updatedValue) {\n\t\t\tconst value = updatedValue.map((element) => element.id)\n\t\t\t/** Emitted when the groups selection changes<br />**Payload:** `value` (`Array`) - *Ids of selected groups */\n\t\t\tthis.$emit('input', value)\n\t\t},\n\n\t\t/**\n\t\t * Use provisioning API to search for given group and save it in the groups object\n\t\t *\n\t\t * @param {string} query The query like parts of the id oder display name\n\t\t * @return {boolean}\n\t\t */\n\t\tasync loadGroup(query) {\n\t\t\ttry {\n\t\t\t\tquery = typeof query === 'string' ? encodeURI(query) : ''\n\t\t\t\tconst response = await axios.get(generateOcsUrl(`cloud/groups/details?search=${query}&limit=10`, 2))\n\n\t\t\t\t// No network error, so reset any error after 5 seconds\n\t\t\t\tif (this.errorMessage !== '') {\n\t\t\t\t\twindow.setTimeout(() => {\n\t\t\t\t\t\tthis.errorMessage = ''\n\t\t\t\t\t}, 5000)\n\t\t\t\t}\n\n\t\t\t\tif (Object.keys(response.data.ocs.data.groups).length > 0) {\n\t\t\t\t\tconst newGroups = Object.fromEntries(response.data.ocs.data.groups.map((element) => [element.id, element]))\n\t\t\t\t\tthis.groups = { ...this.groups, ...newGroups }\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\t/** Emitted if groups could not be queried.<br />**Payload:** `error` (`object`) - The Axios error */\n\t\t\t\tthis.$emit('error', error)\n\t\t\t\tthis.errorMessage = t('Unable to search the group')\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\t/**\n\t\t * Custom filter function for `NcSelect` to filter by ID *and* display name\n\t\t *\n\t\t * @param {object} option One of the groups\n\t\t * @param {string} label The label property of the group\n\t\t * @param {string} search The current search string\n\t\t */\n\t\tfilterGroups(option, label, search) {\n\t\t\treturn `${label || ''} ${option.id}`.toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) > -1\n\t\t},\n\n\t\t/**\n\t\t * Debounce the group search (reduce API calls)\n\t\t */\n\t\tonSearch: debounce(function(query) {\n\t\t\tthis.loadGroup(query)\n\t\t}, 200),\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.select-group-error {\n\tcolor: var(--color-error);\n\tfont-size: 13px;\n\tpadding-inline-start: var(--border-radius-large);\n}\n</style>\n"],"names":["_sfc_main","NcSelect","l10n","GenRandomId","id","group","g","loadedGroupIds","groupId","storageName","savedGroups","updatedValue","value","element","query","response","axios","generateOcsUrl","newGroups","error","t","option","label","search","debounce"],"mappings":"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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcSettingsSelectGroup-e8f9f9fe.cjs","sources":["../../src/components/NcSettingsSelectGroup/NcSettingsSelectGroup.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n```vue\n<template>\n\t<section>\n\t\t<NcSettingsSelectGroup v-model=\"groups\" placeholder=\"Select user groups\" label=\"The hidden label\" />\n\t\t<NcSettingsSelectGroup v-model=\"otherGroups\" :disabled=\"true\" label=\"Also a fallback for the placeholder\" />\n\t\t<div>You have selected: <code>{{ groups }}</code> and <code>{{ otherGroups }}</code></div>\n\t</section>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tgroups: [],\n\t\t\totherGroups: ['admin']\n\t\t}\n\t}\n}\n</script>\n<style scoped>\nsection * {\n\tpadding: 6px 0px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<div>\n\t\t<label v-if=\"label\" :for=\"id\" class=\"hidden-visually\">{{ label }}</label>\n\t\t<NcSelect :value=\"inputValue\"\n\t\t\t:options=\"groupsArray\"\n\t\t\t:placeholder=\"placeholder || label\"\n\t\t\t:filter-by=\"filterGroups\"\n\t\t\t:input-id=\"id\"\n\t\t\t:limit=\"5\"\n\t\t\tlabel=\"displayname\"\n\t\t\t:multiple=\"true\"\n\t\t\t:close-on-select=\"false\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t@input=\"update\"\n\t\t\t@search=\"onSearch\" />\n\t\t<div v-show=\"hasError\" class=\"select-group-error\">\n\t\t\t{{ errorMessage }}\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport NcSelect from '../../components/NcSelect/index.js'\nimport { t } from '../../l10n.js'\nimport l10n from '../../mixins/l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { debounce } from 'debounce'\n\nexport default {\n\tname: 'NcSettingsSelectGroup',\n\tcomponents: {\n\t\tNcSelect,\n\t},\n\tmixins: [l10n],\n\tprops: {\n\t\t/**\n\t\t * The text of the label element of the select group input\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Placeholder for the input element\n\t\t * For backwards compatibility it falls back to the `label` value\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the select group element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * value of the select group input\n\t\t * A list of group IDs can be provided\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the settings select group input\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\temits: [\n\t\t'input',\n\t\t'error',\n\t],\n\tdata() {\n\t\treturn {\n\t\t\t/** Temporary store to cache groups */\n\t\t\tgroups: {},\n\t\t\trandId: GenRandomId(),\n\t\t\terrorMessage: '',\n\t\t}\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * If the error message should be shown\n\t\t */\n\t\thasError() {\n\t\t\treturn this.errorMessage !== ''\n\t\t},\n\n\t\t/**\n\t\t * Validate input value and only return valid strings (group IDs)\n\t\t *\n\t\t * @return {string[]}\n\t\t */\n\t\tfilteredValue() {\n\t\t\treturn this.value.filter((group) => group !== '' && typeof group === 'string')\n\t\t},\n\n\t\t/**\n\t\t * value property converted to an array of group objects used as input for the NcSelect\n\t\t */\n\t\tinputValue() {\n\t\t\treturn this.filteredValue.map(\n\t\t\t\t(id) => {\n\t\t\t\t\tif (typeof this.groups[id] === 'undefined') {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tdisplayname: id,\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this.groups[id]\n\t\t\t\t},\n\t\t\t)\n\t\t},\n\n\t\t/**\n\t\t * Convert groups object to array of groups required for NcSelect.options\n\t\t * Filter out currently selected values\n\t\t *\n\t\t * @return {object[]}\n\t\t */\n\t\tgroupsArray() {\n\t\t\treturn Object.values(this.groups).filter(g => !this.value.includes(g.id))\n\t\t},\n\t},\n\twatch: {\n\t\t/**\n\t\t * If the value is changed, check that all groups are loaded so we show the correct display name\n\t\t */\n\t\tvalue: {\n\t\t\thandler() {\n\t\t\t\tconst loadedGroupIds = Object.keys(this.groups)\n\t\t\t\tconst missing = this.filteredValue.filter(group => !loadedGroupIds.includes(group))\n\t\t\t\tmissing.forEach((groupId) => {\n\t\t\t\t\tthis.loadGroup(groupId)\n\t\t\t\t})\n\t\t\t},\n\t\t\t// Run the watch handler also when the component is initially mounted\n\t\t\timmediate: true,\n\t\t},\n\t},\n\t/**\n\t * Load groups matching the empty query to reduce API calls\n\t */\n\tasync mounted() {\n\t\t// version scoped to prevent issues with different library versions\n\t\tconst storageName = `${appName}:${appVersion}/initialGroups`\n\n\t\tlet savedGroups = window.sessionStorage.getItem(storageName)\n\t\tif (savedGroups) {\n\t\t\tsavedGroups = Object.fromEntries(JSON.parse(savedGroups).map(group => [group.id, group]))\n\t\t\tthis.groups = { ...this.groups, ...savedGroups }\n\t\t} else {\n\t\t\tawait this.loadGroup('')\n\t\t\twindow.sessionStorage.setItem(storageName, JSON.stringify(Object.values(this.groups)))\n\t\t}\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Called when a new group is selected or previous group is deselected to emit the update event\n\t\t *\n\t\t * @param {object[]} updatedValue Array of selected groups\n\t\t */\n\t\tupdate(updatedValue) {\n\t\t\tconst value = updatedValue.map((element) => element.id)\n\t\t\t/** Emitted when the groups selection changes<br />**Payload:** `value` (`Array`) - *Ids of selected groups */\n\t\t\tthis.$emit('input', value)\n\t\t},\n\n\t\t/**\n\t\t * Use provisioning API to search for given group and save it in the groups object\n\t\t *\n\t\t * @param {string} query The query like parts of the id oder display name\n\t\t * @return {boolean}\n\t\t */\n\t\tasync loadGroup(query) {\n\t\t\ttry {\n\t\t\t\tquery = typeof query === 'string' ? encodeURI(query) : ''\n\t\t\t\tconst response = await axios.get(generateOcsUrl(`cloud/groups/details?search=${query}&limit=10`, 2))\n\n\t\t\t\t// No network error, so reset any error after 5 seconds\n\t\t\t\tif (this.errorMessage !== '') {\n\t\t\t\t\twindow.setTimeout(() => {\n\t\t\t\t\t\tthis.errorMessage = ''\n\t\t\t\t\t}, 5000)\n\t\t\t\t}\n\n\t\t\t\tif (Object.keys(response.data.ocs.data.groups).length > 0) {\n\t\t\t\t\tconst newGroups = Object.fromEntries(response.data.ocs.data.groups.map((element) => [element.id, element]))\n\t\t\t\t\tthis.groups = { ...this.groups, ...newGroups }\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\t/** Emitted if groups could not be queried.<br />**Payload:** `error` (`object`) - The Axios error */\n\t\t\t\tthis.$emit('error', error)\n\t\t\t\tthis.errorMessage = t('Unable to search the group')\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\t/**\n\t\t * Custom filter function for `NcSelect` to filter by ID *and* display name\n\t\t *\n\t\t * @param {object} option One of the groups\n\t\t * @param {string} label The label property of the group\n\t\t * @param {string} search The current search string\n\t\t */\n\t\tfilterGroups(option, label, search) {\n\t\t\treturn `${label || ''} ${option.id}`.toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) > -1\n\t\t},\n\n\t\t/**\n\t\t * Debounce the group search (reduce API calls)\n\t\t */\n\t\tonSearch: debounce(function(query) {\n\t\t\tthis.loadGroup(query)\n\t\t}, 200),\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.select-group-error {\n\tcolor: var(--color-error);\n\tfont-size: 13px;\n\tpadding-inline-start: var(--border-radius-large);\n}\n</style>\n"],"names":["_sfc_main","Components_NcSelect","l10n","GenRandomId","id","group","g","loadedGroupIds","groupId","storageName","savedGroups","updatedValue","value","element","query","response","axios__default","router","newGroups","error","l10n$1","option","label","search","debounce"],"mappings":";;AAkFA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,EACA;AAAA,EACA,QAAA,CAAAC,EAAA,IAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,YAAAC,EAAA,YAAA;AAAA,MACA,WAAA,CAAAC,MAAAA,EAAA,KAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA;AACA,WAAA;AAAA;AAAA,MAEA,QAAA,CAAA;AAAA,MACA,QAAAD,EAAA,YAAA;AAAA,MACA,cAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,UAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AACA,aAAA,KAAA,iBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,gBAAA;AACA,aAAA,KAAA,MAAA,OAAA,CAAAE,MAAAA,MAAA,MAAA,OAAAA,KAAA,QAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AACA,aAAA,KAAA,cAAA;AAAA,QACA,CAAAD,MACA,OAAA,KAAA,OAAAA,CAAA,IAAA,MACA;AAAA,UACA,IAAAA;AAAA,UACA,aAAAA;AAAA,QACA,IAEA,KAAA,OAAAA,CAAA;AAAA,MAEA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,cAAA;AACA,aAAA,OAAA,OAAA,KAAA,MAAA,EAAA,OAAA,CAAAE,MAAA,CAAA,KAAA,MAAA,SAAAA,EAAA,EAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,UAAA;AACA,cAAAC,IAAA,OAAA,KAAA,KAAA,MAAA;AAEA,QADA,KAAA,cAAA,OAAA,CAAAF,MAAA,CAAAE,EAAA,SAAAF,CAAA,CAAA,EACA,QAAA,CAAAG,MAAA;AACA,eAAA,UAAAA,CAAA;AAAA,QACA,CAAA;AAAA,MACA;AAAA;AAAA,MAEA,WAAA;AAAA,IACA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,UAAA;AAEA,UAAAC,IAAA,GAAA,OAAA,IAAA,UAAA;AAEA,QAAAC,IAAA,OAAA,eAAA,QAAAD,CAAA;AACA,IAAAC,KACAA,IAAA,OAAA,YAAA,KAAA,MAAAA,CAAA,EAAA,IAAA,CAAAL,MAAA,CAAAA,EAAA,IAAAA,CAAA,CAAA,CAAA,GACA,KAAA,SAAA,EAAA,GAAA,KAAA,QAAA,GAAAK,EAAA,MAEA,MAAA,KAAA,UAAA,EAAA,GACA,OAAA,eAAA,QAAAD,GAAA,KAAA,UAAA,OAAA,OAAA,KAAA,MAAA,CAAA,CAAA;AAAA,EAEA;AAAA,EACA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,OAAAE,GAAA;AACA,YAAAC,IAAAD,EAAA,IAAA,CAAAE,MAAAA,EAAA,EAAA;AAEA,WAAA,MAAA,SAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,MAAA,UAAAE,GAAA;AACA,UAAA;AACA,QAAAA,IAAA,OAAAA,KAAA,WAAA,UAAAA,CAAA,IAAA;AACA,cAAAC,IAAA,MAAAC,EAAA,QAAA,IAAAC,EAAA,eAAA,+BAAAH,CAAA,aAAA,CAAA,CAAA;AASA,YANA,KAAA,iBAAA,MACA,OAAA,WAAA,MAAA;AACA,eAAA,eAAA;AAAA,QACA,GAAA,GAAA,GAGA,OAAA,KAAAC,EAAA,KAAA,IAAA,KAAA,MAAA,EAAA,SAAA,GAAA;AACA,gBAAAG,IAAA,OAAA,YAAAH,EAAA,KAAA,IAAA,KAAA,OAAA,IAAA,CAAAF,MAAA,CAAAA,EAAA,IAAAA,CAAA,CAAA,CAAA;AACA,sBAAA,SAAA,EAAA,GAAA,KAAA,QAAA,GAAAK,EAAA,GACA;AAAA,QACA;AAAA,MACA,SAAAC,GAAA;AAEA,aAAA,MAAA,SAAAA,CAAA,GACA,KAAA,eAAAC,EAAA,EAAA,4BAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,aAAAC,GAAAC,GAAAC,GAAA;AACA,aAAA,GAAAD,KAAA,EAAA,IAAAD,EAAA,EAAA,GAAA,kBAAA,EAAA,QAAAE,EAAA,kBAAA,CAAA,IAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAAC,EAAA,SAAA,SAAAV,GAAA;AACA,WAAA,UAAAA,CAAA;AAAA,IACA,GAAA,GAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;"}