@nextcloud/vue 8.3.0 → 8.4.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 (250) hide show
  1. package/CHANGELOG.md +44 -3
  2. package/dist/Components/NcActionButton.cjs +1 -1
  3. package/dist/Components/NcActionButton.mjs +1 -1
  4. package/dist/Components/NcActionButtonGroup.cjs +13 -9
  5. package/dist/Components/NcActionButtonGroup.cjs.map +1 -1
  6. package/dist/Components/NcActionButtonGroup.mjs +16 -11
  7. package/dist/Components/NcActionButtonGroup.mjs.map +1 -1
  8. package/dist/Components/NcActionInput.cjs +9 -8
  9. package/dist/Components/NcActionInput.cjs.map +1 -1
  10. package/dist/Components/NcActionInput.mjs +11 -10
  11. package/dist/Components/NcActionInput.mjs.map +1 -1
  12. package/dist/Components/NcActionLink.cjs +1 -1
  13. package/dist/Components/NcActionLink.mjs +1 -1
  14. package/dist/Components/NcActionRouter.cjs +1 -1
  15. package/dist/Components/NcActionRouter.mjs +1 -1
  16. package/dist/Components/NcActionText.cjs +1 -1
  17. package/dist/Components/NcActionText.mjs +1 -1
  18. package/dist/Components/NcActionTextEditable.cjs +1 -1
  19. package/dist/Components/NcActionTextEditable.mjs +1 -1
  20. package/dist/Components/NcActions.cjs +37 -37
  21. package/dist/Components/NcActions.cjs.map +1 -1
  22. package/dist/Components/NcActions.mjs +19 -19
  23. package/dist/Components/NcActions.mjs.map +1 -1
  24. package/dist/Components/NcAppContent.cjs +15 -14
  25. package/dist/Components/NcAppContent.cjs.map +1 -1
  26. package/dist/Components/NcAppContent.mjs +35 -34
  27. package/dist/Components/NcAppContent.mjs.map +1 -1
  28. package/dist/Components/NcAppNavigation.cjs +1 -1
  29. package/dist/Components/NcAppNavigation.mjs +1 -1
  30. package/dist/Components/NcAppNavigationCaption.cjs +2 -2
  31. package/dist/Components/NcAppNavigationCaption.cjs.map +1 -1
  32. package/dist/Components/NcAppNavigationCaption.mjs +2 -2
  33. package/dist/Components/NcAppNavigationCaption.mjs.map +1 -1
  34. package/dist/Components/NcAppNavigationItem.cjs +28 -24
  35. package/dist/Components/NcAppNavigationItem.cjs.map +1 -1
  36. package/dist/Components/NcAppNavigationItem.mjs +66 -63
  37. package/dist/Components/NcAppNavigationItem.mjs.map +1 -1
  38. package/dist/Components/NcAppNavigationNewItem.cjs +2 -2
  39. package/dist/Components/NcAppNavigationNewItem.mjs +2 -2
  40. package/dist/Components/NcAppNavigationSettings.cjs +7 -8
  41. package/dist/Components/NcAppNavigationSettings.cjs.map +1 -1
  42. package/dist/Components/NcAppNavigationSettings.mjs +27 -29
  43. package/dist/Components/NcAppNavigationSettings.mjs.map +1 -1
  44. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  45. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  46. package/dist/Components/NcAppSettingsDialog.cjs +19 -18
  47. package/dist/Components/NcAppSettingsDialog.cjs.map +1 -1
  48. package/dist/Components/NcAppSettingsDialog.mjs +22 -21
  49. package/dist/Components/NcAppSettingsDialog.mjs.map +1 -1
  50. package/dist/Components/NcAppSidebar.cjs +88 -45
  51. package/dist/Components/NcAppSidebar.cjs.map +1 -1
  52. package/dist/Components/NcAppSidebar.mjs +158 -112
  53. package/dist/Components/NcAppSidebar.mjs.map +1 -1
  54. package/dist/Components/NcAvatar.cjs +1 -1
  55. package/dist/Components/NcAvatar.mjs +1 -1
  56. package/dist/Components/NcBreadcrumb.cjs +4 -3
  57. package/dist/Components/NcBreadcrumb.cjs.map +1 -1
  58. package/dist/Components/NcBreadcrumb.mjs +6 -5
  59. package/dist/Components/NcBreadcrumb.mjs.map +1 -1
  60. package/dist/Components/NcBreadcrumbs.cjs +26 -19
  61. package/dist/Components/NcBreadcrumbs.cjs.map +1 -1
  62. package/dist/Components/NcBreadcrumbs.mjs +48 -41
  63. package/dist/Components/NcBreadcrumbs.mjs.map +1 -1
  64. package/dist/Components/NcCheckboxRadioSwitch.cjs +44 -34
  65. package/dist/Components/NcCheckboxRadioSwitch.cjs.map +1 -1
  66. package/dist/Components/NcCheckboxRadioSwitch.mjs +72 -62
  67. package/dist/Components/NcCheckboxRadioSwitch.mjs.map +1 -1
  68. package/dist/Components/NcColorPicker.cjs +34 -11
  69. package/dist/Components/NcColorPicker.cjs.map +1 -1
  70. package/dist/Components/NcColorPicker.mjs +48 -25
  71. package/dist/Components/NcColorPicker.mjs.map +1 -1
  72. package/dist/Components/NcDashboardWidget.cjs +7 -6
  73. package/dist/Components/NcDashboardWidget.cjs.map +1 -1
  74. package/dist/Components/NcDashboardWidget.mjs +17 -16
  75. package/dist/Components/NcDashboardWidget.mjs.map +1 -1
  76. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  77. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  78. package/dist/Components/NcDateTime.cjs +15 -13
  79. package/dist/Components/NcDateTime.cjs.map +1 -1
  80. package/dist/Components/NcDateTime.mjs +12 -11
  81. package/dist/Components/NcDateTime.mjs.map +1 -1
  82. package/dist/Components/NcDateTimePicker.cjs +24 -23
  83. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  84. package/dist/Components/NcDateTimePicker.mjs +36 -36
  85. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  86. package/dist/Components/NcDateTimePickerNative.cjs +3 -3
  87. package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
  88. package/dist/Components/NcDateTimePickerNative.mjs +3 -3
  89. package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
  90. package/dist/Components/NcDialog.cjs +18 -17
  91. package/dist/Components/NcDialog.cjs.map +1 -1
  92. package/dist/Components/NcDialog.mjs +26 -24
  93. package/dist/Components/NcDialog.mjs.map +1 -1
  94. package/dist/Components/NcEmojiPicker.cjs +2 -1
  95. package/dist/Components/NcEmojiPicker.cjs.map +1 -1
  96. package/dist/Components/NcEmojiPicker.mjs +18 -17
  97. package/dist/Components/NcEmojiPicker.mjs.map +1 -1
  98. package/dist/Components/NcHeaderMenu.cjs +8 -8
  99. package/dist/Components/NcHeaderMenu.cjs.map +1 -1
  100. package/dist/Components/NcHeaderMenu.mjs +6 -6
  101. package/dist/Components/NcHeaderMenu.mjs.map +1 -1
  102. package/dist/Components/NcListItem.cjs +15 -10
  103. package/dist/Components/NcListItem.cjs.map +1 -1
  104. package/dist/Components/NcListItem.mjs +22 -17
  105. package/dist/Components/NcListItem.mjs.map +1 -1
  106. package/dist/Components/NcListItemIcon.cjs +1 -1
  107. package/dist/Components/NcListItemIcon.mjs +1 -1
  108. package/dist/Components/NcModal.cjs +50 -46
  109. package/dist/Components/NcModal.cjs.map +1 -1
  110. package/dist/Components/NcModal.mjs +66 -63
  111. package/dist/Components/NcModal.mjs.map +1 -1
  112. package/dist/Components/NcPasswordField.cjs +14 -12
  113. package/dist/Components/NcPasswordField.cjs.map +1 -1
  114. package/dist/Components/NcPasswordField.mjs +25 -23
  115. package/dist/Components/NcPasswordField.mjs.map +1 -1
  116. package/dist/Components/NcRelatedResourcesPanel.cjs +6 -4
  117. package/dist/Components/NcRelatedResourcesPanel.cjs.map +1 -1
  118. package/dist/Components/NcRelatedResourcesPanel.mjs +24 -22
  119. package/dist/Components/NcRelatedResourcesPanel.mjs.map +1 -1
  120. package/dist/Components/NcRichContenteditable.cjs +113 -82
  121. package/dist/Components/NcRichContenteditable.cjs.map +1 -1
  122. package/dist/Components/NcRichContenteditable.mjs +89 -55
  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 +22 -21
  127. package/dist/Components/NcSelect.cjs.map +1 -1
  128. package/dist/Components/NcSelect.mjs +28 -28
  129. package/dist/Components/NcSelect.mjs.map +1 -1
  130. package/dist/Components/NcSelectTags.cjs +4 -2
  131. package/dist/Components/NcSelectTags.cjs.map +1 -1
  132. package/dist/Components/NcSelectTags.mjs +46 -44
  133. package/dist/Components/NcSelectTags.mjs.map +1 -1
  134. package/dist/Components/NcSettingsInputText.cjs +5 -4
  135. package/dist/Components/NcSettingsInputText.cjs.map +1 -1
  136. package/dist/Components/NcSettingsInputText.mjs +15 -14
  137. package/dist/Components/NcSettingsInputText.mjs.map +1 -1
  138. package/dist/Components/NcSettingsSection.cjs +8 -6
  139. package/dist/Components/NcSettingsSection.cjs.map +1 -1
  140. package/dist/Components/NcSettingsSection.mjs +18 -17
  141. package/dist/Components/NcSettingsSection.mjs.map +1 -1
  142. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  143. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  144. package/dist/Components/NcTextArea.cjs +5 -5
  145. package/dist/Components/NcTextArea.cjs.map +1 -1
  146. package/dist/Components/NcTextArea.mjs +4 -4
  147. package/dist/Components/NcTextArea.mjs.map +1 -1
  148. package/dist/Components/NcTextField.cjs +4 -2
  149. package/dist/Components/NcTextField.cjs.map +1 -1
  150. package/dist/Components/NcTextField.mjs +19 -17
  151. package/dist/Components/NcTextField.mjs.map +1 -1
  152. package/dist/Components/NcTimezonePicker.cjs +10 -8
  153. package/dist/Components/NcTimezonePicker.cjs.map +1 -1
  154. package/dist/Components/NcTimezonePicker.mjs +35 -33
  155. package/dist/Components/NcTimezonePicker.mjs.map +1 -1
  156. package/dist/Components/NcUserBubble.cjs +1 -1
  157. package/dist/Components/NcUserBubble.mjs +1 -1
  158. package/dist/Composables/useIsMobile.cjs +13 -8
  159. package/dist/Composables/useIsMobile.cjs.map +1 -1
  160. package/dist/Composables/useIsMobile.mjs +15 -10
  161. package/dist/Composables/useIsMobile.mjs.map +1 -1
  162. package/dist/Functions/usernameToColor.cjs +1 -1
  163. package/dist/Functions/usernameToColor.cjs.map +1 -1
  164. package/dist/Functions/usernameToColor.mjs +1 -1
  165. package/dist/Functions/usernameToColor.mjs.map +1 -1
  166. package/dist/assets/{NcAppNavigationToggle-2bc73ee8.css → NcAppNavigationToggle-48c375e8.css} +4 -2
  167. package/dist/assets/{NcSettingsSelectGroup-6ddb63a6.css → NcSettingsSelectGroup-a29e2156.css} +2 -2
  168. package/dist/assets/{index-7157aefa.css → index-13720a46.css} +24 -24
  169. package/dist/assets/{index-93bc89ef.css → index-1a317434.css} +9 -12
  170. package/dist/assets/{index-3d1ccc15.css → index-2d5cf6b2.css} +45 -45
  171. package/dist/assets/index-3b654875.css +144 -0
  172. package/dist/assets/{index-e6a91529.css → index-7f77b8ae.css} +36 -36
  173. package/dist/assets/{index-9941f384.css → index-86454928.css} +13 -13
  174. package/dist/assets/{index-2d4de2fc.css → index-8b327013.css} +11 -3
  175. package/dist/assets/{index-30ca9574.css → index-97305c1f.css} +27 -40
  176. package/dist/assets/{index-73ded07b.css → index-a3c23731.css} +63 -63
  177. package/dist/assets/{index-50dc154e.css → index-a7fc7815.css} +16 -16
  178. package/dist/assets/{index-810b8984.css → index-a9999048.css} +11 -11
  179. package/dist/assets/{index-3764a447.css → index-aacb7cf8.css} +16 -16
  180. package/dist/assets/{index-b0a8a48c.css → index-b0bba2fc.css} +11 -11
  181. package/dist/assets/{index-b991895f.css → index-c20f9f7e.css} +15 -15
  182. package/dist/assets/{index-5e4bf286.css → index-d8bc189c.css} +38 -41
  183. package/dist/assets/{index-ffa6d11c.css → index-dab51681.css} +64 -31
  184. package/dist/assets/{index-4e03d941.css → index-f24e102f.css} +49 -48
  185. package/dist/assets/{index-4611417f.css → index-f5162bbd.css} +7 -7
  186. package/dist/assets/{index-34dfc54e.css → index-f78bd735.css} +13 -13
  187. package/dist/assets/{index-f72cef5d.css → index-fe84a063.css} +5 -5
  188. package/dist/chunks/GenColors-5c054042.mjs +137 -0
  189. package/dist/chunks/GenColors-5c054042.mjs.map +1 -0
  190. package/dist/chunks/GenColors-7495e6f6.cjs +136 -0
  191. package/dist/chunks/GenColors-7495e6f6.cjs.map +1 -0
  192. package/dist/chunks/{NcAppNavigationToggle-f5591773.mjs → NcAppNavigationToggle-0bc638a8.mjs} +27 -26
  193. package/dist/chunks/{NcAppNavigationToggle-6a975868.cjs.map → NcAppNavigationToggle-0bc638a8.mjs.map} +1 -1
  194. package/dist/chunks/{NcAppNavigationToggle-6a975868.cjs → NcAppNavigationToggle-6d192bea.cjs} +17 -15
  195. package/dist/chunks/{NcAppNavigationToggle-f5591773.mjs.map → NcAppNavigationToggle-6d192bea.cjs.map} +1 -1
  196. package/dist/chunks/{NcInputConfirmCancel-7837eb4d.mjs → NcInputConfirmCancel-a08c5cb4.mjs} +14 -13
  197. package/dist/chunks/{NcInputConfirmCancel-7837eb4d.mjs.map → NcInputConfirmCancel-a08c5cb4.mjs.map} +1 -1
  198. package/dist/chunks/{NcInputConfirmCancel-790f5902.cjs → NcInputConfirmCancel-b99898db.cjs} +8 -7
  199. package/dist/chunks/{NcInputConfirmCancel-790f5902.cjs.map → NcInputConfirmCancel-b99898db.cjs.map} +1 -1
  200. package/dist/chunks/{NcRichText-0db09c78.mjs → NcRichText-e4bf7767.mjs} +1 -1
  201. package/dist/chunks/{NcRichText-0db09c78.mjs.map → NcRichText-e4bf7767.mjs.map} +1 -1
  202. package/dist/chunks/{NcRichText-0dd96aac.cjs → NcRichText-f729896c.cjs} +1 -1
  203. package/dist/chunks/{NcRichText-0dd96aac.cjs.map → NcRichText-f729896c.cjs.map} +1 -1
  204. package/dist/chunks/{NcSettingsSelectGroup-532ba813.cjs → NcSettingsSelectGroup-b065ffc8.cjs} +18 -17
  205. package/dist/chunks/NcSettingsSelectGroup-b065ffc8.cjs.map +1 -0
  206. package/dist/chunks/{NcSettingsSelectGroup-cdd84895.mjs → NcSettingsSelectGroup-ecc8bc5a.mjs} +19 -19
  207. package/dist/chunks/NcSettingsSelectGroup-ecc8bc5a.mjs.map +1 -0
  208. package/dist/chunks/{ScopeComponent-92144d97.cjs → ScopeComponent-06c558d3.cjs} +1 -1
  209. package/dist/chunks/{ScopeComponent-92144d97.cjs.map → ScopeComponent-06c558d3.cjs.map} +1 -1
  210. package/dist/chunks/{ScopeComponent-ac5265f5.mjs → ScopeComponent-b039a43c.mjs} +1 -1
  211. package/dist/chunks/{ScopeComponent-ac5265f5.mjs.map → ScopeComponent-b039a43c.mjs.map} +1 -1
  212. package/dist/chunks/_l10n-72c5e29e.cjs +62 -0
  213. package/dist/chunks/_l10n-72c5e29e.cjs.map +1 -0
  214. package/dist/chunks/_l10n-f5af5269.mjs +64 -0
  215. package/dist/chunks/_l10n-f5af5269.mjs.map +1 -0
  216. package/dist/chunks/{actionText-60ff01d1.mjs → actionText-123f26b0.mjs} +3 -3
  217. package/dist/chunks/{actionText-60ff01d1.mjs.map → actionText-123f26b0.mjs.map} +1 -1
  218. package/dist/chunks/{actionText-9582810f.cjs → actionText-e450809c.cjs} +5 -5
  219. package/dist/chunks/{actionText-9582810f.cjs.map → actionText-e450809c.cjs.map} +1 -1
  220. package/dist/chunks/{index-efb07851.mjs → index-309426ff.mjs} +123 -77
  221. package/dist/chunks/index-309426ff.mjs.map +1 -0
  222. package/dist/chunks/{index-32c8b581.cjs → index-693e993c.cjs} +109 -64
  223. package/dist/chunks/index-693e993c.cjs.map +1 -0
  224. package/dist/chunks/{referencePickerModal-ded8273d.mjs → referencePickerModal-12935fb3.mjs} +175 -169
  225. package/dist/chunks/{referencePickerModal-ded8273d.mjs.map → referencePickerModal-12935fb3.mjs.map} +1 -1
  226. package/dist/chunks/{referencePickerModal-90dac0d0.cjs → referencePickerModal-12fa2ad0.cjs} +36 -30
  227. package/dist/chunks/{referencePickerModal-90dac0d0.cjs.map → referencePickerModal-12fa2ad0.cjs.map} +1 -1
  228. package/dist/index.cjs +93 -93
  229. package/dist/index.cjs.map +1 -1
  230. package/dist/index.mjs +96 -95
  231. package/dist/index.mjs.map +1 -1
  232. package/dist/utils/UserStatus.d.ts +26 -0
  233. package/package.json +10 -4
  234. package/dist/assets/index-2e5e3b55.css +0 -151
  235. package/dist/chunks/GenColors-12ec1caa.mjs +0 -56
  236. package/dist/chunks/GenColors-12ec1caa.mjs.map +0 -1
  237. package/dist/chunks/GenColors-a8d54566.cjs +0 -55
  238. package/dist/chunks/GenColors-a8d54566.cjs.map +0 -1
  239. package/dist/chunks/NcSettingsSelectGroup-532ba813.cjs.map +0 -1
  240. package/dist/chunks/NcSettingsSelectGroup-cdd84895.mjs.map +0 -1
  241. package/dist/chunks/index-32c8b581.cjs.map +0 -1
  242. package/dist/chunks/index-efb07851.mjs.map +0 -1
  243. package/dist/chunks/l10n-070da9ad.cjs +0 -29
  244. package/dist/chunks/l10n-070da9ad.cjs.map +0 -1
  245. package/dist/chunks/l10n-1b905a9a.mjs +0 -31
  246. package/dist/chunks/l10n-1b905a9a.mjs.map +0 -1
  247. package/dist/chunks/l10n-38626490.cjs +0 -8
  248. package/dist/chunks/l10n-38626490.cjs.map +0 -1
  249. package/dist/chunks/l10n-6cfc1200.mjs +0 -10
  250. package/dist/chunks/l10n-6cfc1200.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NcSelectTags.mjs","sources":["../../src/components/NcSelectTags/api.js","../../src/components/NcSelectTags/NcSelectTags.vue"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport axios from '@nextcloud/axios'\nimport { generateRemoteUrl } from '@nextcloud/router'\n\nconst xmlToJson = (xml) => {\n\tlet obj = {}\n\n\tif (xml.nodeType === 1) {\n\t\tif (xml.attributes.length > 0) {\n\t\t\tobj['@attributes'] = {}\n\t\t\tfor (let j = 0; j < xml.attributes.length; j++) {\n\t\t\t\tconst attribute = xml.attributes.item(j)\n\t\t\t\tobj['@attributes'][attribute.nodeName] = attribute.nodeValue\n\t\t\t}\n\t\t}\n\t} else if (xml.nodeType === 3) {\n\t\tobj = xml.nodeValue\n\t}\n\n\tif (xml.hasChildNodes()) {\n\t\tfor (let i = 0; i < xml.childNodes.length; i++) {\n\t\t\tconst item = xml.childNodes.item(i)\n\t\t\tconst nodeName = item.nodeName\n\t\t\tif (typeof (obj[nodeName]) === 'undefined') {\n\t\t\t\tobj[nodeName] = xmlToJson(item)\n\t\t\t} else {\n\t\t\t\tif (typeof obj[nodeName].push === 'undefined') {\n\t\t\t\t\tconst old = obj[nodeName]\n\t\t\t\t\tobj[nodeName] = []\n\t\t\t\t\tobj[nodeName].push(old)\n\t\t\t\t}\n\t\t\t\tobj[nodeName].push(xmlToJson(item))\n\t\t\t}\n\t\t}\n\t}\n\treturn obj\n}\n\nconst parseXml = (xml) => {\n\tlet dom = null\n\ttry {\n\t\tdom = (new DOMParser()).parseFromString(xml, 'text/xml')\n\t} catch (e) {\n\t\tconsole.error('Failed to parse xml document', e)\n\t}\n\treturn dom\n}\n\nconst xmlToTagList = (xml) => {\n\tconst json = xmlToJson(parseXml(xml))\n\tconst list = json['d:multistatus']['d:response']\n\tconst result = []\n\tfor (const index in list) {\n\t\tconst tag = list[index]['d:propstat']\n\n\t\tif (tag['d:status']['#text'] !== 'HTTP/1.1 200 OK') {\n\t\t\tcontinue\n\t\t}\n\t\tresult.push({\n\t\t\tid: parseInt(tag['d:prop']['oc:id']['#text']),\n\t\t\tdisplayName: tag['d:prop']['oc:display-name']['#text'],\n\t\t\tcanAssign: tag['d:prop']['oc:can-assign']['#text'] === 'true',\n\t\t\tuserAssignable: tag['d:prop']['oc:user-assignable']['#text'] === 'true',\n\t\t\tuserVisible: tag['d:prop']['oc:user-visible']['#text'] === 'true',\n\t\t})\n\t}\n\treturn result\n}\n\nconst searchTags = async function() {\n\tif (window.NextcloudVueDocs) {\n\t\treturn Promise.resolve(xmlToTagList(window.NextcloudVueDocs.tags))\n\t}\n\n\tconst result = await axios({\n\t\tmethod: 'PROPFIND',\n\t\turl: generateRemoteUrl('dav') + '/systemtags/',\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t\t\t<d:propfind xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t\t\t <d:prop>\n\t\t\t\t\t\t<oc:id />\n\t\t\t\t\t\t<oc:display-name />\n\t\t\t\t\t\t<oc:user-visible />\n\t\t\t\t\t\t<oc:user-assignable />\n\t\t\t\t\t\t<oc:can-assign />\n\t\t\t\t\t </d:prop>\n\t\t\t\t\t</d:propfind>`,\n\t})\n\treturn xmlToTagList(result.data)\n}\n\nexport {\n\tsearchTags,\n}\n","<!--\n - @copyright 2022 Christopher Ng <chrng8@gmail.com>\n -\n - @author Christopher Ng <chrng8@gmail.com>\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n-->\n\n<docs>\n### Single tag selector\n\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcSelectTags v-model=\"value\" :multiple=\"false\" />\n\t\t{{ value }}\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tvalue: 1,\n\t\t}\n\t}\n}\n</script>\n```\n\n### Multiple tag selector\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcSelectTags v-model=\"value\" :multiple=\"true\" />\n\t\t{{ value }}\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tvalue: [\n\t\t\t\t1,\n\t\t\t\t2,\n\t\t\t],\n\t\t}\n\t}\n}\n</script>\n```\n\n### Custom filter\nBecause of compatibility reasons only 5 tag entries are shown by default. If you want to show all available tags set the `limit` prop to `null`:\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcSelectTags v-model=\"value\" :limit=\"null\" />\n\t\t{{ value }}\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tvalue: [\n\t\t\t\t1,\n\t\t\t\t2,\n\t\t\t],\n\t\t}\n\t}\n}\n</script>\n```\n\nIt's also possible to apply any custom filter logic by setting the `optionsFilter` function-prop to any custom function receiving the tag element and the index:\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcSelectTags v-model=\"value\" :options-filter=\"customFilter\" />\n\t\t{{ value }}\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tvalue: [\n\t\t\t\t3,\n\t\t\t],\n\t\t}\n\t},\n\tmethods: {\n\t\t/**\n\t\t* Implement your custom filter logic to filter tags delivered\n\t\t* by the server\n\t\t*\n\t\t* @param {object} the tag object\n\t\t* @param {int} the index of the object inside the collection\n\t\t*/\n\t\tcustomFilter(element, index) {\n\t\t\t/*\n\t\t\t* Tag objects returned by the server will have the\n\t\t\t* following properties (see also api.js):\n\t\t\t* id, displayName, canAssign, userAssignable, userVisible\n\t\t\t*/\n\t\t\treturn element.id >= 2 && element.displayName !== '' && element.canAssign && element.userAssignable && element.userVisible\n\t\t}\n\t}\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcSelect v-bind=\"propsToForward\"\n\t\t:options=\"availableOptions\"\n\t\t:close-on-select=\"!multiple\"\n\t\t:value=\"passthru ? value : localValue\"\n\t\t@search=\"searchString => search = searchString\"\n\t\tv-on=\"{\n\t\t\t...$listeners,\n\t\t\tinput: passthru ? $listeners.input : handleInput,\n\t\t}\">\n\t\t<template #option=\"option\">\n\t\t\t<NcEllipsisedOption :name=\"getOptionLabel(option)\"\n\t\t\t\t:search=\"search\" />\n\t\t</template>\n\t\t<template #selected-option=\"selectedOption\">\n\t\t\t<NcEllipsisedOption :name=\"getOptionLabel(selectedOption)\"\n\t\t\t\t:search=\"search\" />\n\t\t</template>\n\t\t<template v-for=\"(_, name) in $scopedSlots\" #[name]=\"data\">\n\t\t\t<!-- @slot Any combination of slots from https://vue-select.org/api/slots.html -->\n\t\t\t<slot :name=\"name\" v-bind=\"data\" />\n\t\t</template>\n\t</NcSelect>\n</template>\n\n<script>\nimport NcEllipsisedOption from '../NcEllipsisedOption/index.js'\nimport NcSelect from '../NcSelect/index.js'\n\nimport { searchTags } from './api.js'\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcSelectTags',\n\n\tcomponents: {\n\t\tNcEllipsisedOption,\n\t\tNcSelect,\n\t},\n\n\tprops: {\n\t\t// Add NcSelect prop defaults and populate $props\n\t\t...NcSelect.props,\n\n\t\t/**\n\t\t * Enable automatic fetching of tags\n\t\t *\n\t\t * If `false`, available tags must be passed using the `options` prop\n\t\t */\n\t\tfetchTags: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Callback to generate the label text\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#getoptionlabel\n\t\t */\n\t\tgetOptionLabel: {\n\t\t\ttype: Function,\n\t\t\tdefault: (option) => {\n\t\t\t\tconst { displayName, userVisible, userAssignable } = option\n\t\t\t\tif (userVisible === false) {\n\t\t\t\t\treturn t('{tag} (invisible)', { tag: displayName })\n\t\t\t\t}\n\t\t\t\tif (userAssignable === false) {\n\t\t\t\t\treturn t('{tag} (restricted)', { tag: displayName })\n\t\t\t\t}\n\t\t\t\treturn displayName\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Sets the maximum number of tags to display in the dropdown list\n\t\t *\n\t\t * Because of compatibility reasons only 5 tag entries are shown by\n\t\t * default\n\t\t */\n\t\tlimit: {\n\t\t\ttype: Number,\n\t\t\tdefault: 5,\n\t\t},\n\n\t\t/**\n\t\t * Allow selection of multiple options\n\t\t *\n\t\t * This prop automatically sets the internal `closeOnSelect` prop to\n\t\t * its boolean opposite\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#multiple\n\t\t */\n\t\tmultiple: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Callback to filter available options\n\t\t */\n\t\toptionsFilter: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Enable passing of `value` prop and emitted `input` events as-is\n\t\t * i.e. for usage with `v-model`\n\t\t *\n\t\t * If `true`, custom internal `value` and `input` handling is disabled\n\t\t */\n\t\tpassthru: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Placeholder text\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#placeholder\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Select a tag'),\n\t\t},\n\n\t\t/**\n\t\t * Currently selected value\n\t\t */\n\t\tvalue: {\n\t\t\ttype: [Number, Array, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Any available prop\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\t},\n\n\temits: [\n\t\t'input',\n\t\t/**\n\t\t * All events from https://vue-select.org/api/events.html\n\t\t */\n\t\t// Not an actual event but needed to show in vue-styleguidist docs\n\t\t' ',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tsearch: '',\n\t\t\tavailableTags: [],\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tavailableOptions() {\n\t\t\tif (this.optionsFilter) {\n\t\t\t\treturn this.tags.filter(this.optionsFilter)\n\t\t\t}\n\t\t\treturn this.tags\n\t\t},\n\n\t\tlocalValue() {\n\t\t\tif (this.tags.length === 0) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tif (this.multiple) {\n\t\t\t\treturn this.value\n\t\t\t\t\t.filter(tag => tag !== '')\n\t\t\t\t\t.map(id => this.tags.find(tag2 => tag2.id === id))\n\t\t\t} else {\n\t\t\t\treturn this.tags.find(tag => tag.id === this.value)\n\t\t\t}\n\t\t},\n\n\t\tpropsToForward() {\n\t\t\tconst {\n\t\t\t\t// Props handled by this component\n\t\t\t\tfetchTags,\n\t\t\t\toptionsFilter,\n\t\t\t\tpassthru,\n\t\t\t\t// Props to forward\n\t\t\t\t...propsToForward\n\t\t\t} = this.$props\n\n\t\t\treturn propsToForward\n\t\t},\n\n\t\ttags() {\n\t\t\tif (!this.fetchTags) {\n\t\t\t\treturn this.options\n\t\t\t}\n\t\t\treturn this.availableTags\n\t\t},\n\t},\n\n\tasync created() {\n\t\tif (!this.fetchTags) {\n\t\t\treturn\n\t\t}\n\t\ttry {\n\t\t\tconst result = await searchTags()\n\t\t\tthis.availableTags = result\n\t\t} catch (error) {\n\t\t\tconsole.error('Loading systemtags failed', error)\n\t\t}\n\t},\n\n\tmethods: {\n\t\thandleInput(value) {\n\t\t\tif (this.multiple) {\n\t\t\t\t/**\n\t\t\t\t * Emitted on input events of the multiselect field\n\t\t\t\t *\n\t\t\t\t * @type {number|number[]}\n\t\t\t\t */\n\t\t\t\tthis.$emit('input', value.map(element => element.id))\n\t\t\t} else {\n\t\t\t\tif (value === null) {\n\t\t\t\t\tthis.$emit('input', null)\n\t\t\t\t} else {\n\t\t\t\t\tthis.$emit('input', value.id)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["xmlToJson","xml","obj","j","attribute","i","item","nodeName","old","parseXml","dom","e","xmlToTagList","list","result","index","tag","searchTags","axios","generateRemoteUrl","_sfc_main","NcEllipsisedOption","NcSelect","option","displayName","userVis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AAA,KAAA,gBACA,KAAA,KAAA,OAAA,KAAA,aAAA,IAEA,KAAA;AAAA,IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,KAAA,WAAA,IACA,CAAA,IAEA,KAAA,WACA,KAAA,MACA,OAAA,CAAAX,MAAAA,MAAA,EAAA,EACA,IAAA,CAAAY,MAAA,KAAA,KAAA,KAAA,CAAAC,MAAAA,EAAA,OAAAD,CAAA,CAAA,IAEA,KAAA,KAAA,KAAA,CAAAZ,MAAAA,EAAA,OAAA,KAAA,KAAA;AAAA,IAEA;AAAA,IAEA,iBAAA;AACA,YAAA;AAAA;AAAA,QAEA,WAAAc;AAAA,QACA,eAAAC;AAAA,QACA,UAAAC;AAAA;AAAA,QAEA,GAAAC;AAAA,MACA,IAAA,KAAA;AAEA,aAAAA;AAAA,IACA;AAAA,IAEA,OAAA;AACA,aAAA,KAAA,YAGA,KAAA,gBAFA,KAAA;AAAA,IAGA;AAAA,EACA;AAAA,EAEA,MAAA,UAAA;AACA,QAAA,KAAA;AAGA,UAAA;AACA,cAAAnB,IAAA,MAAAG,EAAA;AACA,aAAA,gBAAAH;AAAA,MACA,SAAAoB,GAAA;AACA,gBAAA,MAAA,6BAAAA,CAAA;AAAA,MACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,YAAAC,GAAA;AACA,MAAA,KAAA,WAMA,KAAA,MAAA,SAAAA,EAAA,IAAA,CAAAC,MAAAA,EAAA,EAAA,CAAA,IAEAD,MAAA,OACA,KAAA,MAAA,SAAA,IAAA,IAEA,KAAA,MAAA,SAAAA,EAAA,EAAA;AAAA,IAGA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcSelectTags.mjs","sources":["../../src/components/NcSelectTags/api.js","../../src/components/NcSelectTags/NcSelectTags.vue"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport axios from '@nextcloud/axios'\nimport { generateRemoteUrl } from '@nextcloud/router'\n\nconst xmlToJson = (xml) => {\n\tlet obj = {}\n\n\tif (xml.nodeType === 1) {\n\t\tif (xml.attributes.length > 0) {\n\t\t\tobj['@attributes'] = {}\n\t\t\tfor (let j = 0; j < xml.attributes.length; j++) {\n\t\t\t\tconst attribute = xml.attributes.item(j)\n\t\t\t\tobj['@attributes'][attribute.nodeName] = attribute.nodeValue\n\t\t\t}\n\t\t}\n\t} else if (xml.nodeType === 3) {\n\t\tobj = xml.nodeValue\n\t}\n\n\tif (xml.hasChildNodes()) {\n\t\tfor (let i = 0; i < xml.childNodes.length; i++) {\n\t\t\tconst item = xml.childNodes.item(i)\n\t\t\tconst nodeName = item.nodeName\n\t\t\tif (typeof (obj[nodeName]) === 'undefined') {\n\t\t\t\tobj[nodeName] = xmlToJson(item)\n\t\t\t} else {\n\t\t\t\tif (typeof obj[nodeName].push === 'undefined') {\n\t\t\t\t\tconst old = obj[nodeName]\n\t\t\t\t\tobj[nodeName] = []\n\t\t\t\t\tobj[nodeName].push(old)\n\t\t\t\t}\n\t\t\t\tobj[nodeName].push(xmlToJson(item))\n\t\t\t}\n\t\t}\n\t}\n\treturn obj\n}\n\nconst parseXml = (xml) => {\n\tlet dom = null\n\ttry {\n\t\tdom = (new DOMParser()).parseFromString(xml, 'text/xml')\n\t} catch (e) {\n\t\tconsole.error('Failed to parse xml document', e)\n\t}\n\treturn dom\n}\n\nconst xmlToTagList = (xml) => {\n\tconst json = xmlToJson(parseXml(xml))\n\tconst list = json['d:multistatus']['d:response']\n\tconst result = []\n\tfor (const index in list) {\n\t\tconst tag = list[index]['d:propstat']\n\n\t\tif (tag['d:status']['#text'] !== 'HTTP/1.1 200 OK') {\n\t\t\tcontinue\n\t\t}\n\t\tresult.push({\n\t\t\tid: parseInt(tag['d:prop']['oc:id']['#text']),\n\t\t\tdisplayName: tag['d:prop']['oc:display-name']['#text'],\n\t\t\tcanAssign: tag['d:prop']['oc:can-assign']['#text'] === 'true',\n\t\t\tuserAssignable: tag['d:prop']['oc:user-assignable']['#text'] === 'true',\n\t\t\tuserVisible: tag['d:prop']['oc:user-visible']['#text'] === 'true',\n\t\t})\n\t}\n\treturn result\n}\n\nconst searchTags = async function() {\n\tif (window.NextcloudVueDocs) {\n\t\treturn Promise.resolve(xmlToTagList(window.NextcloudVueDocs.tags))\n\t}\n\n\tconst result = await axios({\n\t\tmethod: 'PROPFIND',\n\t\turl: generateRemoteUrl('dav') + '/systemtags/',\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t\t\t<d:propfind xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t\t\t <d:prop>\n\t\t\t\t\t\t<oc:id />\n\t\t\t\t\t\t<oc:display-name />\n\t\t\t\t\t\t<oc:user-visible />\n\t\t\t\t\t\t<oc:user-assignable />\n\t\t\t\t\t\t<oc:can-assign />\n\t\t\t\t\t </d:prop>\n\t\t\t\t\t</d:propfind>`,\n\t})\n\treturn xmlToTagList(result.data)\n}\n\nexport {\n\tsearchTags,\n}\n","<!--\n - @copyright 2022 Christopher Ng <chrng8@gmail.com>\n -\n - @author Christopher Ng <chrng8@gmail.com>\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n-->\n\n<docs>\n### Single tag selector\n\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcSelectTags v-model=\"value\" :multiple=\"false\" />\n\t\t{{ value }}\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tvalue: 1,\n\t\t}\n\t}\n}\n</script>\n```\n\n### Multiple tag selector\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcSelectTags v-model=\"value\" :multiple=\"true\" />\n\t\t{{ value }}\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tvalue: [\n\t\t\t\t1,\n\t\t\t\t2,\n\t\t\t],\n\t\t}\n\t}\n}\n</script>\n```\n\n### Custom filter\nBecause of compatibility reasons only 5 tag entries are shown by default. If you want to show all available tags set the `limit` prop to `null`:\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcSelectTags v-model=\"value\" :limit=\"null\" />\n\t\t{{ value }}\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tvalue: [\n\t\t\t\t1,\n\t\t\t\t2,\n\t\t\t],\n\t\t}\n\t}\n}\n</script>\n```\n\nIt's also possible to apply any custom filter logic by setting the `optionsFilter` function-prop to any custom function receiving the tag element and the index:\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcSelectTags v-model=\"value\" :options-filter=\"customFilter\" />\n\t\t{{ value }}\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tvalue: [\n\t\t\t\t3,\n\t\t\t],\n\t\t}\n\t},\n\tmethods: {\n\t\t/**\n\t\t* Implement your custom filter logic to filter tags delivered\n\t\t* by the server\n\t\t*\n\t\t* @param {object} the tag object\n\t\t* @param {int} the index of the object inside the collection\n\t\t*/\n\t\tcustomFilter(element, index) {\n\t\t\t/*\n\t\t\t* Tag objects returned by the server will have the\n\t\t\t* following properties (see also api.js):\n\t\t\t* id, displayName, canAssign, userAssignable, userVisible\n\t\t\t*/\n\t\t\treturn element.id >= 2 && element.displayName !== '' && element.canAssign && element.userAssignable && element.userVisible\n\t\t}\n\t}\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcSelect v-bind=\"propsToForward\"\n\t\t:options=\"availableOptions\"\n\t\t:close-on-select=\"!multiple\"\n\t\t:value=\"passthru ? value : localValue\"\n\t\t@search=\"searchString => search = searchString\"\n\t\tv-on=\"{\n\t\t\t...$listeners,\n\t\t\tinput: passthru ? $listeners.input : handleInput,\n\t\t}\">\n\t\t<template #option=\"option\">\n\t\t\t<NcEllipsisedOption :name=\"getOptionLabel(option)\"\n\t\t\t\t:search=\"search\" />\n\t\t</template>\n\t\t<template #selected-option=\"selectedOption\">\n\t\t\t<NcEllipsisedOption :name=\"getOptionLabel(selectedOption)\"\n\t\t\t\t:search=\"search\" />\n\t\t</template>\n\t\t<template v-for=\"(_, name) in $scopedSlots\" #[name]=\"data\">\n\t\t\t<!-- @slot Any combination of slots from https://vue-select.org/api/slots.html -->\n\t\t\t<slot :name=\"name\" v-bind=\"data\" />\n\t\t</template>\n\t</NcSelect>\n</template>\n\n<script>\nimport NcEllipsisedOption from '../NcEllipsisedOption/index.js'\nimport NcSelect from '../NcSelect/index.js'\n\nimport { searchTags } from './api.js'\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcSelectTags',\n\n\tcomponents: {\n\t\tNcEllipsisedOption,\n\t\tNcSelect,\n\t},\n\n\tprops: {\n\t\t// Add NcSelect prop defaults and populate $props\n\t\t...NcSelect.props,\n\n\t\t/**\n\t\t * Enable automatic fetching of tags\n\t\t *\n\t\t * If `false`, available tags must be passed using the `options` prop\n\t\t */\n\t\tfetchTags: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Callback to generate the label text\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#getoptionlabel\n\t\t */\n\t\tgetOptionLabel: {\n\t\t\ttype: Function,\n\t\t\tdefault: (option) => {\n\t\t\t\tconst { displayName, userVisible, userAssignable } = option\n\t\t\t\tif (userVisible === false) {\n\t\t\t\t\treturn t('{tag} (invisible)', { tag: displayName })\n\t\t\t\t}\n\t\t\t\tif (userAssignable === false) {\n\t\t\t\t\treturn t('{tag} (restricted)', { tag: displayName })\n\t\t\t\t}\n\t\t\t\treturn displayName\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Sets the maximum number of tags to display in the dropdown list\n\t\t *\n\t\t * Because of compatibility reasons only 5 tag entries are shown by\n\t\t * default\n\t\t */\n\t\tlimit: {\n\t\t\ttype: Number,\n\t\t\tdefault: 5,\n\t\t},\n\n\t\t/**\n\t\t * Allow selection of multiple options\n\t\t *\n\t\t * This prop automatically sets the internal `closeOnSelect` prop to\n\t\t * its boolean opposite\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#multiple\n\t\t */\n\t\tmultiple: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Callback to filter available options\n\t\t */\n\t\toptionsFilter: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Enable passing of `value` prop and emitted `input` events as-is\n\t\t * i.e. for usage with `v-model`\n\t\t *\n\t\t * If `true`, custom internal `value` and `input` handling is disabled\n\t\t */\n\t\tpassthru: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Placeholder text\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#placeholder\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Select a tag'),\n\t\t},\n\n\t\t/**\n\t\t * Currently selected value\n\t\t */\n\t\tvalue: {\n\t\t\ttype: [Number, Array, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Any available prop\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\t},\n\n\temits: [\n\t\t'input',\n\t\t/**\n\t\t * All events from https://vue-select.org/api/events.html\n\t\t */\n\t\t// Not an actual event but needed to show in vue-styleguidist docs\n\t\t' ',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tsearch: '',\n\t\t\tavailableTags: [],\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tavailableOptions() {\n\t\t\tif (this.optionsFilter) {\n\t\t\t\treturn this.tags.filter(this.optionsFilter)\n\t\t\t}\n\t\t\treturn this.tags\n\t\t},\n\n\t\tlocalValue() {\n\t\t\tif (this.tags.length === 0) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tif (this.multiple) {\n\t\t\t\treturn this.value\n\t\t\t\t\t.filter(tag => tag !== '')\n\t\t\t\t\t.map(id => this.tags.find(tag2 => tag2.id === id))\n\t\t\t} else {\n\t\t\t\treturn this.tags.find(tag => tag.id === this.value)\n\t\t\t}\n\t\t},\n\n\t\tpropsToForward() {\n\t\t\tconst {\n\t\t\t\t// Props handled by this component\n\t\t\t\tfetchTags,\n\t\t\t\toptionsFilter,\n\t\t\t\tpassthru,\n\t\t\t\t// Props to forward\n\t\t\t\t...propsToForward\n\t\t\t} = this.$props\n\n\t\t\treturn propsToForward\n\t\t},\n\n\t\ttags() {\n\t\t\tif (!this.fetchTags) {\n\t\t\t\treturn this.options\n\t\t\t}\n\t\t\treturn this.availableTags\n\t\t},\n\t},\n\n\tasync created() {\n\t\tif (!this.fetchTags) {\n\t\t\treturn\n\t\t}\n\t\ttry {\n\t\t\tconst result = await searchTags()\n\t\t\tthis.availableTags = result\n\t\t} catch (error) {\n\t\t\tconsole.error('Loading systemtags failed', error)\n\t\t}\n\t},\n\n\tmethods: {\n\t\thandleInput(value) {\n\t\t\tif (this.multiple) {\n\t\t\t\t/**\n\t\t\t\t * Emitted on input events of the multiselect field\n\t\t\t\t *\n\t\t\t\t * @type {number|number[]}\n\t\t\t\t */\n\t\t\t\tthis.$emit('input', value.map(element => element.id))\n\t\t\t} else {\n\t\t\t\tif (value === null) {\n\t\t\t\t\tthis.$emit('input', null)\n\t\t\t\t} else {\n\t\t\t\t\tthis.$emit('input', value.id)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["xmlToJson","xml","obj","j","attribute","i","item","nodeName","old","parseXml","dom","e","xmlToTagList","list","result","index","tag","searchTags","axios","generateRemoteUrl","_sfc_main","NcEllipsisedOption","NcSelect","option","displayName","userVisible","userAssignable","t","id","tag2","fetchTags","optionsFilter","passthru","propsToForward","error","value","element"],"mappings":";;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBA,MAAMA,IAAY,CAACC,MAAQ;AAC1B,MAAIC,IAAM,CAAE;AAEZ,MAAID,EAAI,aAAa;AACpB,QAAIA,EAAI,WAAW,SAAS,GAAG;AAC9B,MAAAC,EAAI,aAAa,IAAI,CAAE;AACvB,eAASC,IAAI,GAAGA,IAAIF,EAAI,WAAW,QAAQE,KAAK;AAC/C,cAAMC,IAAYH,EAAI,WAAW,KAAKE,CAAC;AACvC,QAAAD,EAAI,aAAa,EAAEE,EAAU,QAAQ,IAAIA,EAAU;AAAA,MACnD;AAAA,IACD;AAAA;AACK,IAAIH,EAAI,aAAa,MAC3BC,IAAMD,EAAI;AAGX,MAAIA,EAAI;AACP,aAASI,IAAI,GAAGA,IAAIJ,EAAI,WAAW,QAAQI,KAAK;AAC/C,YAAMC,IAAOL,EAAI,WAAW,KAAKI,CAAC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AAoB,GAAA;AACA,gBAAA,MAAA,6BAAAA,CAAA;AAAA,MACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,YAAAC,GAAA;AACA,MAAA,KAAA,WAMA,KAAA,MAAA,SAAAA,EAAA,IAAA,CAAAC,MAAAA,EAAA,EAAA,CAAA,IAEAD,MAAA,OACA,KAAA,MAAA,SAAA,IAAA,IAEA,KAAA,MAAA,SAAAA,EAAA,EAAA;AAAA,IAGA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,6 @@
1
1
  var m = require("../assets/index-6c47e88a.css");
2
- const s = require("../chunks/l10n-070da9ad.cjs"), a = require("../chunks/GenRandomId-c214d235.cjs"), u = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
2
+ const n = require("../chunks/_l10n-72c5e29e.cjs"), a = require("../chunks/GenRandomId-c214d235.cjs"), u = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
3
+ n.register(n.t38);
3
4
  const r = {
4
5
  name: "NcSettingsInputText",
5
6
  props: {
@@ -48,7 +49,7 @@ const r = {
48
49
  ],
49
50
  data() {
50
51
  return {
51
- submitTranslated: s.t("Submit")
52
+ submitTranslated: n.t("Submit")
52
53
  };
53
54
  },
54
55
  computed: {
@@ -73,8 +74,8 @@ const r = {
73
74
  };
74
75
  var l = function() {
75
76
  var t = this, i = t._self._c;
76
- return i("form", { ref: "form", attrs: { disabled: t.disabled }, on: { submit: function(n) {
77
- return n.preventDefault(), n.stopPropagation(), t.onSubmit.apply(null, arguments);
77
+ return i("form", { ref: "form", attrs: { disabled: t.disabled }, on: { submit: function(s) {
78
+ return s.preventDefault(), s.stopPropagation(), t.onSubmit.apply(null, arguments);
78
79
  } } }, [i("div", { staticClass: "input-wrapper" }, [i("label", { staticClass: "action-input__label", attrs: { for: t.id } }, [t._v(t._s(t.label))]), i("input", { attrs: { id: t.id, type: "text", disabled: t.disabled }, domProps: { value: t.value }, on: { input: t.onInput, change: t.onChange } }), i("input", { staticClass: "action-input__submit", attrs: { id: t.idSubmit, type: "submit" }, domProps: { value: t.submitTranslated } }), t.hint ? i("p", { staticClass: "hint" }, [t._v(" " + t._s(t.hint) + " ")]) : t._e()])]);
79
80
  }, o = [], d = /* @__PURE__ */ u.normalizeComponent(
80
81
  r,
@@ -1 +1 @@
1
- {"version":3,"file":"NcSettingsInputText.cjs","sources":["../../src/components/NcSettingsInputText/NcSettingsInputText.vue"],"sourcesContent":["<!--\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n\n```vue\n<NcSettingsInputText label=\"Label\" hint=\"Hint\" />\n<NcSettingsInputText label=\"Label\" value=\"Value\" hint=\"Hint\" disabled />\n```\n\n</docs>\n\n<template>\n\t<form ref=\"form\"\n\t\t:disabled=\"disabled\"\n\t\t@submit.prevent.stop=\"onSubmit\">\n\t\t<div class=\"input-wrapper\">\n\t\t\t<label :for=\"id\" class=\"action-input__label\">{{ label }}</label>\n\t\t\t<input :id=\"id\"\n\t\t\t\ttype=\"text\"\n\t\t\t\t:value=\"value\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t@input=\"onInput\"\n\t\t\t\t@change=\"onChange\">\n\t\t\t<input :id=\"idSubmit\"\n\t\t\t\t:value=\"submitTranslated\"\n\t\t\t\ttype=\"submit\"\n\t\t\t\tclass=\"action-input__submit\">\n\t\t\t<p v-if=\"hint\" class=\"hint\">\n\t\t\t\t{{ hint }}\n\t\t\t</p>\n\t\t</div>\n\t</form>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default {\n\tname: 'NcSettingsInputText',\n\tprops: {\n\t\t/**\n\t\t * label of the select group element\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 * hint of the select group input\n\t\t */\n\t\thint: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * value of the select group input\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\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\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: () => 'settings-input-text-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t\t'input',\n\t\t'submit',\n\t\t'change',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tsubmitTranslated: t('Submit'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {string}\n\t\t */\n\t\tidSubmit() {\n\t\t\treturn this.id + '-submit'\n\t\t},\n\t},\n\tmethods: {\n\t\tonInput(event) {\n\t\t\tthis.$emit('input', event)\n\t\t\t/**\n\t\t\t * Emitted when the inputs value changes\n\t\t\t *\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t\tonSubmit(event) {\n\t\t\tif (!this.disabled) {\n\t\t\t\t/**\n\t\t\t\t * Emitted on submit of the input field\n\t\t\t\t *\n\t\t\t\t * @type {Event}\n\t\t\t\t */\n\t\t\t\tthis.$emit('submit', event)\n\t\t\t}\n\t\t},\n\t\tonChange(event) {\n\t\t\t/**\n\t\t\t * Emitted on change of the input field\n\t\t\t *\n\t\t\t * @type {Event}\n\t\t\t */\n\t\t\tthis.$emit('change', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n\t.input-wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex-wrap: wrap;\n\t\twidth: 100%;\n\t\tmax-width: 400px;\n\n\t\t& .action-input__label {\n\t\t\tmargin-right: 12px;\n\t\t}\n\n\t\t// if disabled, change cursor\n\t\t&:disabled {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t.hint {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\tmargin-left: 8px;\n\t\t}\n\t}\n\n</style>\n"],"names":["_sfc_main","GenRandomId","id","l10n","event"],"mappings":";;AA0DA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,yBAAAC,EAAA,YAAA;AAAA,MACA,WAAA,CAAAC,MAAAA,EAAA,KAAA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,kBAAAC,EAAA,EAAA,QAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AACA,aAAA,KAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,SAAA;AAAA,IACA,QAAAC,GAAA;AACA,WAAA,MAAA,SAAAA,CAAA,GAMA,KAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AAAA,IACA;AAAA,IACA,SAAAA,GAAA;AACA,MAAA,KAAA,YAMA,KAAA,MAAA,UAAAA,CAAA;AAAA,IAEA;AAAA,IACA,SAAAA,GAAA;AAMA,WAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcSettingsInputText.cjs","sources":["../../src/components/NcSettingsInputText/NcSettingsInputText.vue"],"sourcesContent":["<!--\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n\n```vue\n<NcSettingsInputText label=\"Label\" hint=\"Hint\" />\n<NcSettingsInputText label=\"Label\" value=\"Value\" hint=\"Hint\" disabled />\n```\n\n</docs>\n\n<template>\n\t<form ref=\"form\"\n\t\t:disabled=\"disabled\"\n\t\t@submit.prevent.stop=\"onSubmit\">\n\t\t<div class=\"input-wrapper\">\n\t\t\t<label :for=\"id\" class=\"action-input__label\">{{ label }}</label>\n\t\t\t<input :id=\"id\"\n\t\t\t\ttype=\"text\"\n\t\t\t\t:value=\"value\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t@input=\"onInput\"\n\t\t\t\t@change=\"onChange\">\n\t\t\t<input :id=\"idSubmit\"\n\t\t\t\t:value=\"submitTranslated\"\n\t\t\t\ttype=\"submit\"\n\t\t\t\tclass=\"action-input__submit\">\n\t\t\t<p v-if=\"hint\" class=\"hint\">\n\t\t\t\t{{ hint }}\n\t\t\t</p>\n\t\t</div>\n\t</form>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default {\n\tname: 'NcSettingsInputText',\n\tprops: {\n\t\t/**\n\t\t * label of the select group element\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 * hint of the select group input\n\t\t */\n\t\thint: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * value of the select group input\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\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\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: () => 'settings-input-text-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t\t'input',\n\t\t'submit',\n\t\t'change',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tsubmitTranslated: t('Submit'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {string}\n\t\t */\n\t\tidSubmit() {\n\t\t\treturn this.id + '-submit'\n\t\t},\n\t},\n\tmethods: {\n\t\tonInput(event) {\n\t\t\tthis.$emit('input', event)\n\t\t\t/**\n\t\t\t * Emitted when the inputs value changes\n\t\t\t *\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t\tonSubmit(event) {\n\t\t\tif (!this.disabled) {\n\t\t\t\t/**\n\t\t\t\t * Emitted on submit of the input field\n\t\t\t\t *\n\t\t\t\t * @type {Event}\n\t\t\t\t */\n\t\t\t\tthis.$emit('submit', event)\n\t\t\t}\n\t\t},\n\t\tonChange(event) {\n\t\t\t/**\n\t\t\t * Emitted on change of the input field\n\t\t\t *\n\t\t\t * @type {Event}\n\t\t\t */\n\t\t\tthis.$emit('change', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n\t.input-wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex-wrap: wrap;\n\t\twidth: 100%;\n\t\tmax-width: 400px;\n\n\t\t& .action-input__label {\n\t\t\tmargin-right: 12px;\n\t\t}\n\n\t\t// if disabled, change cursor\n\t\t&:disabled {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t.hint {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\tmargin-left: 8px;\n\t\t}\n\t}\n\n</style>\n"],"names":["_sfc_main","GenRandomId","id","_l10n","event"],"mappings":";;;AA0DA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,yBAAAC,EAAA,YAAA;AAAA,MACA,WAAA,CAAAC,MAAAA,EAAA,KAAA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,kBAAAC,EAAA,EAAA,QAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AACA,aAAA,KAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,SAAA;AAAA,IACA,QAAAC,GAAA;AACA,WAAA,MAAA,SAAAA,CAAA,GAMA,KAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AAAA,IACA;AAAA,IACA,SAAAA,GAAA;AACA,MAAA,KAAA,YAMA,KAAA,MAAA,UAAAA,CAAA;AAAA,IAEA;AAAA,IACA,SAAAA,GAAA;AAMA,WAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,9 @@
1
1
  import "../assets/index-6c47e88a.css";
2
- import { t as a } from "../chunks/l10n-1b905a9a.mjs";
3
- import { G as s } from "../chunks/GenRandomId-cb9ccebe.mjs";
4
- import { n as u } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
5
- const r = {
2
+ import { r as n, v as s, a as r } from "../chunks/_l10n-f5af5269.mjs";
3
+ import { G as u } from "../chunks/GenRandomId-cb9ccebe.mjs";
4
+ import { n as l } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
5
+ n(s);
6
+ const o = {
6
7
  name: "NcSettingsInputText",
7
8
  props: {
8
9
  /**
@@ -38,7 +39,7 @@ const r = {
38
39
  */
39
40
  id: {
40
41
  type: String,
41
- default: () => "settings-input-text-" + s(),
42
+ default: () => "settings-input-text-" + u(),
42
43
  validator: (e) => e.trim() !== ""
43
44
  }
44
45
  },
@@ -50,7 +51,7 @@ const r = {
50
51
  ],
51
52
  data() {
52
53
  return {
53
- submitTranslated: a("Submit")
54
+ submitTranslated: r("Submit")
54
55
  };
55
56
  },
56
57
  computed: {
@@ -73,22 +74,22 @@ const r = {
73
74
  }
74
75
  }
75
76
  };
76
- var l = function() {
77
+ var p = function() {
77
78
  var t = this, i = t._self._c;
78
- return i("form", { ref: "form", attrs: { disabled: t.disabled }, on: { submit: function(n) {
79
- return n.preventDefault(), n.stopPropagation(), t.onSubmit.apply(null, arguments);
79
+ return i("form", { ref: "form", attrs: { disabled: t.disabled }, on: { submit: function(a) {
80
+ return a.preventDefault(), a.stopPropagation(), t.onSubmit.apply(null, arguments);
80
81
  } } }, [i("div", { staticClass: "input-wrapper" }, [i("label", { staticClass: "action-input__label", attrs: { for: t.id } }, [t._v(t._s(t.label))]), i("input", { attrs: { id: t.id, type: "text", disabled: t.disabled }, domProps: { value: t.value }, on: { input: t.onInput, change: t.onChange } }), i("input", { staticClass: "action-input__submit", attrs: { id: t.idSubmit, type: "submit" }, domProps: { value: t.submitTranslated } }), t.hint ? i("p", { staticClass: "hint" }, [t._v(" " + t._s(t.hint) + " ")]) : t._e()])]);
81
- }, o = [], p = /* @__PURE__ */ u(
82
- r,
83
- l,
82
+ }, d = [], m = /* @__PURE__ */ l(
84
83
  o,
84
+ p,
85
+ d,
85
86
  !1,
86
87
  null,
87
88
  "5b140fb6",
88
89
  null,
89
90
  null
90
91
  );
91
- const c = p.exports;
92
+ const g = m.exports;
92
93
  export {
93
- c as default
94
+ g as default
94
95
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NcSettingsInputText.mjs","sources":["../../src/components/NcSettingsInputText/NcSettingsInputText.vue"],"sourcesContent":["<!--\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n\n```vue\n<NcSettingsInputText label=\"Label\" hint=\"Hint\" />\n<NcSettingsInputText label=\"Label\" value=\"Value\" hint=\"Hint\" disabled />\n```\n\n</docs>\n\n<template>\n\t<form ref=\"form\"\n\t\t:disabled=\"disabled\"\n\t\t@submit.prevent.stop=\"onSubmit\">\n\t\t<div class=\"input-wrapper\">\n\t\t\t<label :for=\"id\" class=\"action-input__label\">{{ label }}</label>\n\t\t\t<input :id=\"id\"\n\t\t\t\ttype=\"text\"\n\t\t\t\t:value=\"value\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t@input=\"onInput\"\n\t\t\t\t@change=\"onChange\">\n\t\t\t<input :id=\"idSubmit\"\n\t\t\t\t:value=\"submitTranslated\"\n\t\t\t\ttype=\"submit\"\n\t\t\t\tclass=\"action-input__submit\">\n\t\t\t<p v-if=\"hint\" class=\"hint\">\n\t\t\t\t{{ hint }}\n\t\t\t</p>\n\t\t</div>\n\t</form>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default {\n\tname: 'NcSettingsInputText',\n\tprops: {\n\t\t/**\n\t\t * label of the select group element\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 * hint of the select group input\n\t\t */\n\t\thint: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * value of the select group input\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\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\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: () => 'settings-input-text-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t\t'input',\n\t\t'submit',\n\t\t'change',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tsubmitTranslated: t('Submit'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {string}\n\t\t */\n\t\tidSubmit() {\n\t\t\treturn this.id + '-submit'\n\t\t},\n\t},\n\tmethods: {\n\t\tonInput(event) {\n\t\t\tthis.$emit('input', event)\n\t\t\t/**\n\t\t\t * Emitted when the inputs value changes\n\t\t\t *\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t\tonSubmit(event) {\n\t\t\tif (!this.disabled) {\n\t\t\t\t/**\n\t\t\t\t * Emitted on submit of the input field\n\t\t\t\t *\n\t\t\t\t * @type {Event}\n\t\t\t\t */\n\t\t\t\tthis.$emit('submit', event)\n\t\t\t}\n\t\t},\n\t\tonChange(event) {\n\t\t\t/**\n\t\t\t * Emitted on change of the input field\n\t\t\t *\n\t\t\t * @type {Event}\n\t\t\t */\n\t\t\tthis.$emit('change', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n\t.input-wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex-wrap: wrap;\n\t\twidth: 100%;\n\t\tmax-width: 400px;\n\n\t\t& .action-input__label {\n\t\t\tmargin-right: 12px;\n\t\t}\n\n\t\t// if disabled, change cursor\n\t\t&:disabled {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t.hint {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\tmargin-left: 8px;\n\t\t}\n\t}\n\n</style>\n"],"names":["_sfc_main","GenRandomId","id","t","event"],"mappings":";;;;AA0DA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,yBAAAC,EAAA;AAAA,MACA,WAAA,CAAAC,MAAAA,EAAA,KAAA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,kBAAAC,EAAA,QAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AACA,aAAA,KAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,SAAA;AAAA,IACA,QAAAC,GAAA;AACA,WAAA,MAAA,SAAAA,CAAA,GAMA,KAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AAAA,IACA;AAAA,IACA,SAAAA,GAAA;AACA,MAAA,KAAA,YAMA,KAAA,MAAA,UAAAA,CAAA;AAAA,IAEA;AAAA,IACA,SAAAA,GAAA;AAMA,WAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcSettingsInputText.mjs","sources":["../../src/components/NcSettingsInputText/NcSettingsInputText.vue"],"sourcesContent":["<!--\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n\n```vue\n<NcSettingsInputText label=\"Label\" hint=\"Hint\" />\n<NcSettingsInputText label=\"Label\" value=\"Value\" hint=\"Hint\" disabled />\n```\n\n</docs>\n\n<template>\n\t<form ref=\"form\"\n\t\t:disabled=\"disabled\"\n\t\t@submit.prevent.stop=\"onSubmit\">\n\t\t<div class=\"input-wrapper\">\n\t\t\t<label :for=\"id\" class=\"action-input__label\">{{ label }}</label>\n\t\t\t<input :id=\"id\"\n\t\t\t\ttype=\"text\"\n\t\t\t\t:value=\"value\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t@input=\"onInput\"\n\t\t\t\t@change=\"onChange\">\n\t\t\t<input :id=\"idSubmit\"\n\t\t\t\t:value=\"submitTranslated\"\n\t\t\t\ttype=\"submit\"\n\t\t\t\tclass=\"action-input__submit\">\n\t\t\t<p v-if=\"hint\" class=\"hint\">\n\t\t\t\t{{ hint }}\n\t\t\t</p>\n\t\t</div>\n\t</form>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default {\n\tname: 'NcSettingsInputText',\n\tprops: {\n\t\t/**\n\t\t * label of the select group element\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 * hint of the select group input\n\t\t */\n\t\thint: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * value of the select group input\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\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\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: () => 'settings-input-text-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t\t'input',\n\t\t'submit',\n\t\t'change',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tsubmitTranslated: t('Submit'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {string}\n\t\t */\n\t\tidSubmit() {\n\t\t\treturn this.id + '-submit'\n\t\t},\n\t},\n\tmethods: {\n\t\tonInput(event) {\n\t\t\tthis.$emit('input', event)\n\t\t\t/**\n\t\t\t * Emitted when the inputs value changes\n\t\t\t *\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t\tonSubmit(event) {\n\t\t\tif (!this.disabled) {\n\t\t\t\t/**\n\t\t\t\t * Emitted on submit of the input field\n\t\t\t\t *\n\t\t\t\t * @type {Event}\n\t\t\t\t */\n\t\t\t\tthis.$emit('submit', event)\n\t\t\t}\n\t\t},\n\t\tonChange(event) {\n\t\t\t/**\n\t\t\t * Emitted on change of the input field\n\t\t\t *\n\t\t\t * @type {Event}\n\t\t\t */\n\t\t\tthis.$emit('change', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n\t.input-wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex-wrap: wrap;\n\t\twidth: 100%;\n\t\tmax-width: 400px;\n\n\t\t& .action-input__label {\n\t\t\tmargin-right: 12px;\n\t\t}\n\n\t\t// if disabled, change cursor\n\t\t&:disabled {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t.hint {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\tmargin-left: 8px;\n\t\t}\n\t}\n\n</style>\n"],"names":["_sfc_main","GenRandomId","id","t","event"],"mappings":";;;;;AA0DA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,yBAAAC,EAAA;AAAA,MACA,WAAA,CAAAC,MAAAA,EAAA,KAAA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,kBAAAC,EAAA,QAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AACA,aAAA,KAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,SAAA;AAAA,IACA,QAAAC,GAAA;AACA,WAAA,MAAA,SAAAA,CAAA,GAMA,KAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AAAA,IACA;AAAA,IACA,SAAAA,GAAA;AACA,MAAA,KAAA,YAMA,KAAA,MAAA,UAAAA,CAAA;AAAA,IAEA;AAAA,IACA,SAAAA,GAAA;AAMA,WAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,7 @@
1
1
  var g = require("../assets/index-76a58945.css");
2
- const r = require("../chunks/l10n-070da9ad.cjs"), n = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), l = {
2
+ const n = require("../chunks/_l10n-72c5e29e.cjs"), i = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
3
+ n.register(n.t21);
4
+ const l = {
3
5
  name: "HelpCircleIcon",
4
6
  emits: ["click"],
5
7
  props: {
@@ -18,10 +20,10 @@ const r = require("../chunks/l10n-070da9ad.cjs"), n = require("../chunks/_plugin
18
20
  };
19
21
  var a = function() {
20
22
  var t = this, e = t._self._c;
21
- return e("span", t._b({ staticClass: "material-design-icon help-circle-icon", attrs: { "aria-hidden": !t.title, "aria-label": t.title, role: "img" }, on: { click: function(s) {
22
- return t.$emit("click", s);
23
+ return e("span", t._b({ staticClass: "material-design-icon help-circle-icon", attrs: { "aria-hidden": !t.title, "aria-label": t.title, role: "img" }, on: { click: function(r) {
24
+ return t.$emit("click", r);
23
25
  } } }, "span", t.$attrs, !1), [e("svg", { staticClass: "material-design-icon__svg", attrs: { fill: t.fillColor, width: t.size, height: t.size, viewBox: "0 0 24 24" } }, [e("path", { attrs: { d: "M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z" } }, [t.title ? e("title", [t._v(t._s(t.title))]) : t._e()])])]);
24
- }, c = [], o = /* @__PURE__ */ n.normalizeComponent(
26
+ }, c = [], o = /* @__PURE__ */ i.normalizeComponent(
25
27
  l,
26
28
  a,
27
29
  c,
@@ -63,7 +65,7 @@ const d = {
63
65
  },
64
66
  data() {
65
67
  return {
66
- docNameTranslated: r.t("External documentation for {name}", {
68
+ docNameTranslated: n.t("External documentation for {name}", {
67
69
  name: this.name
68
70
  })
69
71
  };
@@ -80,7 +82,7 @@ const d = {
80
82
  var p = function() {
81
83
  var t = this, e = t._self._c;
82
84
  return e("div", { staticClass: "settings-section", class: { "settings-section--limit-width": t.limitWidth } }, [e("h2", { staticClass: "settings-section__name" }, [t._v(" " + t._s(t.name) + " "), t.hasDocUrl ? e("a", { staticClass: "settings-section__info", attrs: { href: t.docUrl, title: t.docNameTranslated, target: "_blank", rel: "noreferrer nofollow" } }, [e("HelpCircle", { attrs: { size: 20 } })], 1) : t._e()]), t.hasDescription ? e("p", { staticClass: "settings-section__desc" }, [t._v(" " + t._s(t.description) + " ")]) : t._e(), t._t("default")], 2);
83
- }, u = [], m = /* @__PURE__ */ n.normalizeComponent(
85
+ }, u = [], m = /* @__PURE__ */ i.normalizeComponent(
84
86
  d,
85
87
  p,
86
88
  u,
@@ -1 +1 @@
1
- {"version":3,"file":"NcSettingsSection.cjs","sources":["../../node_modules/vue-material-design-icons/HelpCircle.vue","../../src/components/NcSettingsSection/NcSettingsSection.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon help-circle-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"HelpCircleIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### General description\n\nThis component is to be used in the settings section of nextcloud.\n\n### Examples\n\n```vue\n<template>\n\t<NcSettingsSection\n\t\tname=\"Two-Factor Authentication\"\n\t\tdescription=\"Two-factor authentication can be enforced for all users and specific groups.\"\n\t\tdoc-url=\"https://docs.nextcloud.com/server/19/go.php?to=admin-2fa\"\n\t\t:limit-width=\"true\">\n\t\t<p>Your settings here</p>\n\t</NcSettingsSection>\n</template>\n```\n</docs>\n\n<template>\n\t<div class=\"settings-section\" :class=\"{'settings-section--limit-width': limitWidth}\">\n\t\t<h2 class=\"settings-section__name\">\n\t\t\t{{ name }}\n\t\t\t<a v-if=\"hasDocUrl\"\n\t\t\t\t:href=\"docUrl\"\n\t\t\t\tclass=\"settings-section__info\"\n\t\t\t\t:title=\"docNameTranslated\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\trel=\"noreferrer nofollow\">\n\t\t\t\t<HelpCircle :size=\"20\" />\n\t\t\t</a>\n\t\t</h2>\n\t\t<p v-if=\"hasDescription\"\n\t\t\tclass=\"settings-section__desc\">\n\t\t\t{{ description }}\n\t\t</p>\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\n\nimport HelpCircle from 'vue-material-design-icons/HelpCircle.vue'\n\nexport default {\n\tname: 'NcSettingsSection',\n\n\tcomponents: {\n\t\tHelpCircle,\n\t},\n\n\tprops: {\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tdocUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Limit the width of the setting's content\n\t\t *\n\t\t * By default only the name and description have a limit, use this\n\t\t * property to also apply this to the rest of the content.\n\t\t */\n\t\tlimitWidth: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdocNameTranslated: t('External documentation for {name}', {\n\t\t\t\tname: this.name,\n\t\t\t}),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasDescription() {\n\t\t\treturn this.description.length > 0\n\t\t},\n\t\thasDocUrl() {\n\t\t\treturn this.docUrl.length > 0\n\t\t},\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n$maxWidth: 900px;\n\n.settings-section {\n\tdisplay: block;\n\tmargin-bottom: auto;\n\tpadding: 30px;\n\n\t&:not(:last-child) {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t}\n\n\t&--limit-width > * {\n\t\tmax-width: $maxWidth;\n\t}\n\n\t&__name {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tfont-size: 20px;\n\t\tfont-weight: bold;\n\t\tmax-width: $maxWidth;\n\t}\n\n\t&__info {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: $clickable-area;\n\t\theight: $clickable-area;\n\t\t// make sure to properly align the icon with the text\n\t\tmargin: -$icon-margin;\n\t\tmargin-left: 0;\n\t\topacity: $opacity_normal;\n\n\t\t&:hover, &:focus, &:active {\n\t\t\topacity: $opacity_full;\n\t\t}\n\t}\n\n\t&__desc {\n\t\tmargin-top: -.2em;\n\t\tmargin-bottom: 1em;\n\t\topacity: $opacity_normal;\n\t\tmax-width: $maxWidth;\n\t}\n}\n\n</style>\n"],"names":["_sfc_main$1","_sfc_main","HelpCircle","l10n"],"mappings":";iHAoBAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACiCA,MAAAC,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,YAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,mBAAAC,EAAA,EAAA,qCAAA;AAAA,QACA,MAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,iBAAA;AACA,aAAA,KAAA,YAAA,SAAA;AAAA,IACA;AAAA,IACA,YAAA;AACA,aAAA,KAAA,OAAA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"NcSettingsSection.cjs","sources":["../../node_modules/vue-material-design-icons/HelpCircle.vue","../../src/components/NcSettingsSection/NcSettingsSection.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon help-circle-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"HelpCircleIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### General description\n\nThis component is to be used in the settings section of nextcloud.\n\n### Examples\n\n```vue\n<template>\n\t<NcSettingsSection\n\t\tname=\"Two-Factor Authentication\"\n\t\tdescription=\"Two-factor authentication can be enforced for all users and specific groups.\"\n\t\tdoc-url=\"https://docs.nextcloud.com/server/19/go.php?to=admin-2fa\"\n\t\t:limit-width=\"true\">\n\t\t<p>Your settings here</p>\n\t</NcSettingsSection>\n</template>\n```\n</docs>\n\n<template>\n\t<div class=\"settings-section\" :class=\"{'settings-section--limit-width': limitWidth}\">\n\t\t<h2 class=\"settings-section__name\">\n\t\t\t{{ name }}\n\t\t\t<a v-if=\"hasDocUrl\"\n\t\t\t\t:href=\"docUrl\"\n\t\t\t\tclass=\"settings-section__info\"\n\t\t\t\t:title=\"docNameTranslated\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\trel=\"noreferrer nofollow\">\n\t\t\t\t<HelpCircle :size=\"20\" />\n\t\t\t</a>\n\t\t</h2>\n\t\t<p v-if=\"hasDescription\"\n\t\t\tclass=\"settings-section__desc\">\n\t\t\t{{ description }}\n\t\t</p>\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\n\nimport HelpCircle from 'vue-material-design-icons/HelpCircle.vue'\n\nexport default {\n\tname: 'NcSettingsSection',\n\n\tcomponents: {\n\t\tHelpCircle,\n\t},\n\n\tprops: {\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tdocUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Limit the width of the setting's content\n\t\t *\n\t\t * By default only the name and description have a limit, use this\n\t\t * property to also apply this to the rest of the content.\n\t\t */\n\t\tlimitWidth: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdocNameTranslated: t('External documentation for {name}', {\n\t\t\t\tname: this.name,\n\t\t\t}),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasDescription() {\n\t\t\treturn this.description.length > 0\n\t\t},\n\t\thasDocUrl() {\n\t\t\treturn this.docUrl.length > 0\n\t\t},\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n$maxWidth: 900px;\n\n.settings-section {\n\tdisplay: block;\n\tmargin-bottom: auto;\n\tpadding: 30px;\n\n\t&:not(:last-child) {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t}\n\n\t&--limit-width > * {\n\t\tmax-width: $maxWidth;\n\t}\n\n\t&__name {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tfont-size: 20px;\n\t\tfont-weight: bold;\n\t\tmax-width: $maxWidth;\n\t}\n\n\t&__info {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: $clickable-area;\n\t\theight: $clickable-area;\n\t\t// make sure to properly align the icon with the text\n\t\tmargin: -$icon-margin;\n\t\tmargin-left: 0;\n\t\topacity: $opacity_normal;\n\n\t\t&:hover, &:focus, &:active {\n\t\t\topacity: $opacity_full;\n\t\t}\n\t}\n\n\t&__desc {\n\t\tmargin-top: -.2em;\n\t\tmargin-bottom: 1em;\n\t\topacity: $opacity_normal;\n\t\tmax-width: $maxWidth;\n\t}\n}\n\n</style>\n"],"names":["_sfc_main$1","_sfc_main","HelpCircle","_l10n"],"mappings":";;;AAoBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACiCA,MAAAC,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,YAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,mBAAAC,EAAA,EAAA,qCAAA;AAAA,QACA,MAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,iBAAA;AACA,aAAA,KAAA,YAAA,SAAA;AAAA,IACA;AAAA,IACA,YAAA;AACA,aAAA,KAAA,OAAA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -1,7 +1,8 @@
1
1
  import "../assets/index-76a58945.css";
2
- import { t as r } from "../chunks/l10n-1b905a9a.mjs";
3
- import { n as i } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
4
- const l = {
2
+ import { r, u as a, a as l } from "../chunks/_l10n-f5af5269.mjs";
3
+ import { n as s } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
4
+ r(a);
5
+ const c = {
5
6
  name: "HelpCircleIcon",
6
7
  emits: ["click"],
7
8
  props: {
@@ -18,26 +19,26 @@ const l = {
18
19
  }
19
20
  }
20
21
  };
21
- var a = function() {
22
+ var o = function() {
22
23
  var t = this, e = t._self._c;
23
24
  return e("span", t._b({ staticClass: "material-design-icon help-circle-icon", attrs: { "aria-hidden": !t.title, "aria-label": t.title, role: "img" }, on: { click: function(n) {
24
25
  return t.$emit("click", n);
25
26
  } } }, "span", t.$attrs, !1), [e("svg", { staticClass: "material-design-icon__svg", attrs: { fill: t.fillColor, width: t.size, height: t.size, viewBox: "0 0 24 24" } }, [e("path", { attrs: { d: "M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z" } }, [t.title ? e("title", [t._v(t._s(t.title))]) : t._e()])])]);
26
- }, c = [], o = /* @__PURE__ */ i(
27
- l,
28
- a,
27
+ }, _ = [], d = /* @__PURE__ */ s(
29
28
  c,
29
+ o,
30
+ _,
30
31
  !1,
31
32
  null,
32
33
  null,
33
34
  null,
34
35
  null
35
36
  );
36
- const _ = o.exports;
37
- const d = {
37
+ const p = d.exports;
38
+ const m = {
38
39
  name: "NcSettingsSection",
39
40
  components: {
40
- HelpCircle: _
41
+ HelpCircle: p
41
42
  },
42
43
  props: {
43
44
  name: {
@@ -65,7 +66,7 @@ const d = {
65
66
  },
66
67
  data() {
67
68
  return {
68
- docNameTranslated: r("External documentation for {name}", {
69
+ docNameTranslated: l("External documentation for {name}", {
69
70
  name: this.name
70
71
  })
71
72
  };
@@ -79,20 +80,20 @@ const d = {
79
80
  }
80
81
  }
81
82
  };
82
- var p = function() {
83
+ var u = function() {
83
84
  var t = this, e = t._self._c;
84
85
  return e("div", { staticClass: "settings-section", class: { "settings-section--limit-width": t.limitWidth } }, [e("h2", { staticClass: "settings-section__name" }, [t._v(" " + t._s(t.name) + " "), t.hasDocUrl ? e("a", { staticClass: "settings-section__info", attrs: { href: t.docUrl, title: t.docNameTranslated, target: "_blank", rel: "noreferrer nofollow" } }, [e("HelpCircle", { attrs: { size: 20 } })], 1) : t._e()]), t.hasDescription ? e("p", { staticClass: "settings-section__desc" }, [t._v(" " + t._s(t.description) + " ")]) : t._e(), t._t("default")], 2);
85
- }, m = [], u = /* @__PURE__ */ i(
86
- d,
87
- p,
86
+ }, f = [], g = /* @__PURE__ */ s(
88
87
  m,
88
+ u,
89
+ f,
89
90
  !1,
90
91
  null,
91
92
  "375ea653",
92
93
  null,
93
94
  null
94
95
  );
95
- const v = u.exports;
96
+ const S = g.exports;
96
97
  export {
97
- v as default
98
+ S as default
98
99
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NcSettingsSection.mjs","sources":["../../node_modules/vue-material-design-icons/HelpCircle.vue","../../src/components/NcSettingsSection/NcSettingsSection.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon help-circle-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"HelpCircleIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### General description\n\nThis component is to be used in the settings section of nextcloud.\n\n### Examples\n\n```vue\n<template>\n\t<NcSettingsSection\n\t\tname=\"Two-Factor Authentication\"\n\t\tdescription=\"Two-factor authentication can be enforced for all users and specific groups.\"\n\t\tdoc-url=\"https://docs.nextcloud.com/server/19/go.php?to=admin-2fa\"\n\t\t:limit-width=\"true\">\n\t\t<p>Your settings here</p>\n\t</NcSettingsSection>\n</template>\n```\n</docs>\n\n<template>\n\t<div class=\"settings-section\" :class=\"{'settings-section--limit-width': limitWidth}\">\n\t\t<h2 class=\"settings-section__name\">\n\t\t\t{{ name }}\n\t\t\t<a v-if=\"hasDocUrl\"\n\t\t\t\t:href=\"docUrl\"\n\t\t\t\tclass=\"settings-section__info\"\n\t\t\t\t:title=\"docNameTranslated\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\trel=\"noreferrer nofollow\">\n\t\t\t\t<HelpCircle :size=\"20\" />\n\t\t\t</a>\n\t\t</h2>\n\t\t<p v-if=\"hasDescription\"\n\t\t\tclass=\"settings-section__desc\">\n\t\t\t{{ description }}\n\t\t</p>\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\n\nimport HelpCircle from 'vue-material-design-icons/HelpCircle.vue'\n\nexport default {\n\tname: 'NcSettingsSection',\n\n\tcomponents: {\n\t\tHelpCircle,\n\t},\n\n\tprops: {\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tdocUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Limit the width of the setting's content\n\t\t *\n\t\t * By default only the name and description have a limit, use this\n\t\t * property to also apply this to the rest of the content.\n\t\t */\n\t\tlimitWidth: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdocNameTranslated: t('External documentation for {name}', {\n\t\t\t\tname: this.name,\n\t\t\t}),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasDescription() {\n\t\t\treturn this.description.length > 0\n\t\t},\n\t\thasDocUrl() {\n\t\t\treturn this.docUrl.length > 0\n\t\t},\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n$maxWidth: 900px;\n\n.settings-section {\n\tdisplay: block;\n\tmargin-bottom: auto;\n\tpadding: 30px;\n\n\t&:not(:last-child) {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t}\n\n\t&--limit-width > * {\n\t\tmax-width: $maxWidth;\n\t}\n\n\t&__name {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tfont-size: 20px;\n\t\tfont-weight: bold;\n\t\tmax-width: $maxWidth;\n\t}\n\n\t&__info {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: $clickable-area;\n\t\theight: $clickable-area;\n\t\t// make sure to properly align the icon with the text\n\t\tmargin: -$icon-margin;\n\t\tmargin-left: 0;\n\t\topacity: $opacity_normal;\n\n\t\t&:hover, &:focus, &:active {\n\t\t\topacity: $opacity_full;\n\t\t}\n\t}\n\n\t&__desc {\n\t\tmargin-top: -.2em;\n\t\tmargin-bottom: 1em;\n\t\topacity: $opacity_normal;\n\t\tmax-width: $maxWidth;\n\t}\n}\n\n</style>\n"],"names":["_sfc_main$1","_sfc_main","HelpCircle","t"],"mappings":";;;AAoBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACiCA,MAAAC,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,YAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,mBAAAC,EAAA,qCAAA;AAAA,QACA,MAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,iBAAA;AACA,aAAA,KAAA,YAAA,SAAA;AAAA,IACA;AAAA,IACA,YAAA;AACA,aAAA,KAAA,OAAA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"NcSettingsSection.mjs","sources":["../../node_modules/vue-material-design-icons/HelpCircle.vue","../../src/components/NcSettingsSection/NcSettingsSection.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon help-circle-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"HelpCircleIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### General description\n\nThis component is to be used in the settings section of nextcloud.\n\n### Examples\n\n```vue\n<template>\n\t<NcSettingsSection\n\t\tname=\"Two-Factor Authentication\"\n\t\tdescription=\"Two-factor authentication can be enforced for all users and specific groups.\"\n\t\tdoc-url=\"https://docs.nextcloud.com/server/19/go.php?to=admin-2fa\"\n\t\t:limit-width=\"true\">\n\t\t<p>Your settings here</p>\n\t</NcSettingsSection>\n</template>\n```\n</docs>\n\n<template>\n\t<div class=\"settings-section\" :class=\"{'settings-section--limit-width': limitWidth}\">\n\t\t<h2 class=\"settings-section__name\">\n\t\t\t{{ name }}\n\t\t\t<a v-if=\"hasDocUrl\"\n\t\t\t\t:href=\"docUrl\"\n\t\t\t\tclass=\"settings-section__info\"\n\t\t\t\t:title=\"docNameTranslated\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\trel=\"noreferrer nofollow\">\n\t\t\t\t<HelpCircle :size=\"20\" />\n\t\t\t</a>\n\t\t</h2>\n\t\t<p v-if=\"hasDescription\"\n\t\t\tclass=\"settings-section__desc\">\n\t\t\t{{ description }}\n\t\t</p>\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\n\nimport HelpCircle from 'vue-material-design-icons/HelpCircle.vue'\n\nexport default {\n\tname: 'NcSettingsSection',\n\n\tcomponents: {\n\t\tHelpCircle,\n\t},\n\n\tprops: {\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tdocUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Limit the width of the setting's content\n\t\t *\n\t\t * By default only the name and description have a limit, use this\n\t\t * property to also apply this to the rest of the content.\n\t\t */\n\t\tlimitWidth: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdocNameTranslated: t('External documentation for {name}', {\n\t\t\t\tname: this.name,\n\t\t\t}),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasDescription() {\n\t\t\treturn this.description.length > 0\n\t\t},\n\t\thasDocUrl() {\n\t\t\treturn this.docUrl.length > 0\n\t\t},\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n$maxWidth: 900px;\n\n.settings-section {\n\tdisplay: block;\n\tmargin-bottom: auto;\n\tpadding: 30px;\n\n\t&:not(:last-child) {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t}\n\n\t&--limit-width > * {\n\t\tmax-width: $maxWidth;\n\t}\n\n\t&__name {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tfont-size: 20px;\n\t\tfont-weight: bold;\n\t\tmax-width: $maxWidth;\n\t}\n\n\t&__info {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: $clickable-area;\n\t\theight: $clickable-area;\n\t\t// make sure to properly align the icon with the text\n\t\tmargin: -$icon-margin;\n\t\tmargin-left: 0;\n\t\topacity: $opacity_normal;\n\n\t\t&:hover, &:focus, &:active {\n\t\t\topacity: $opacity_full;\n\t\t}\n\t}\n\n\t&__desc {\n\t\tmargin-top: -.2em;\n\t\tmargin-bottom: 1em;\n\t\topacity: $opacity_normal;\n\t\tmax-width: $maxWidth;\n\t}\n}\n\n</style>\n"],"names":["_sfc_main$1","_sfc_main","HelpCircle","t"],"mappings":";;;;AAoBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACiCA,MAAAC,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,YAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,mBAAAC,EAAA,qCAAA;AAAA,QACA,MAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,iBAAA;AACA,aAAA,KAAA,YAAA,SAAA;AAAA,IACA;AAAA,IACA,YAAA;AACA,aAAA,KAAA,OAAA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } });
3
- const e = require("../chunks/NcSettingsSelectGroup-532ba813.cjs");
3
+ const e = require("../chunks/NcSettingsSelectGroup-b065ffc8.cjs");
4
4
  /**
5
5
  * @copyright Copyright (c) 2019 Greta Doci <gretadoci@gmail.com>
6
6
  *
@@ -1,4 +1,4 @@
1
- import { N as e } from "../chunks/NcSettingsSelectGroup-cdd84895.mjs";
1
+ import { N as e } from "../chunks/NcSettingsSelectGroup-ecc8bc5a.mjs";
2
2
  /**
3
3
  * @copyright Copyright (c) 2019 Greta Doci <gretadoci@gmail.com>
4
4
  *
@@ -1,4 +1,4 @@
1
- var p = require("../assets/index-30ca9574.css");
1
+ var p = require("../assets/index-97305c1f.css");
2
2
  const s = require("../chunks/GenRandomId-c214d235.cjs"), r = require("../chunks/AlertCircleOutline-7085c10f.cjs"), l = require("../chunks/Check-be8cd6af.cjs"), i = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
3
3
  const n = {
4
4
  name: "NcTextArea",
@@ -140,7 +140,7 @@ const n = {
140
140
  }
141
141
  }
142
142
  };
143
- var d = function() {
143
+ var c = function() {
144
144
  var e = this, a = e._self._c;
145
145
  return a("div", { staticClass: "textarea", class: { "textarea--disabled": e.disabled } }, [a("div", { staticClass: "textarea__main-wrapper" }, [a("textarea", e._g(e._b({ ref: "input", staticClass: "textarea__input", class: [
146
146
  e.inputClass,
@@ -153,13 +153,13 @@ var d = function() {
153
153
  "textarea__helper-text-message--error": e.error,
154
154
  "textarea__helper-text-message--success": e.success
155
155
  }, attrs: { id: `${e.inputName}-helper-text` } }, [e.success ? a("Check", { staticClass: "textarea__helper-text-message__icon", attrs: { size: 18 } }) : e.error ? a("AlertCircle", { staticClass: "textarea__helper-text-message__icon", attrs: { size: 18 } }) : e._e(), e._v(" " + e._s(e.helperText) + " ")], 1) : e._e()]);
156
- }, c = [], u = /* @__PURE__ */ i.normalizeComponent(
156
+ }, d = [], u = /* @__PURE__ */ i.normalizeComponent(
157
157
  n,
158
- d,
159
158
  c,
159
+ d,
160
160
  !1,
161
161
  null,
162
- "c9071493",
162
+ "638cac88",
163
163
  null,
164
164
  null
165
165
  );
@@ -1 +1 @@
1
- {"version":3,"file":"NcTextArea.cjs","sources":["../../src/components/NcTextArea/NcTextArea.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Richard Steinmetz <richard@steinmetz.cloud>\n -\n - @author Richard Steinmetz <richard@steinmetz.cloud>\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 General Public License as published by\n - the Free Software Foundation, either version 3 of the License, or\n - (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 General Public License for more details.\n -\n - You should have received a copy of the GNU General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### Description\n\nThis component is a textarea field.\nIt extends and styles an HTMLTextAreaElement.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcTextArea label=\"Text area\"\n\t\t\tplaceholder=\"Placeholders are possible\"\n\t\t\thelper-text=\"This is a regular helper text.\" >\n\t\t</NcTextArea>\n\t\t<NcTextArea label=\"Success state\"\n\t\t\t:success=\"true\">\n\t\t</NcTextArea>\n\t\t<NcTextArea label=\"Error state\"\n\t\t\tplaceholder=\"Enter something valid\"\n\t\t\thelper-text=\"Helper texts will be styled accordingly.\"\n\t\t\t:error=\"true\">\n\t\t</NcTextArea>\n\t\t<NcTextArea label=\"Disabled\"\n\t\t\t:disabled=\"true\" />\n\t\t<NcTextArea label=\"Disabled + Success\"\n\t\t\t:success=\"true\"\n\t\t\t:disabled=\"true\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">External label</label>\n\t\t\t<NcTextArea id=\"textField\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Text area with external label\" />\n\t\t</div>\n\t\t<NcTextArea label=\"Custom size and no resize\"\n\t\t\tresize=\"none\"\n\t\t\trows=\"5\" />\n\t\t</NcTextArea>\n\t</div>\n</template>\n\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\talign-items: center;\n\tgap: 14px;\n\n\t> label {\n\t\tflex-shrink: 0;\n\t}\n}\n</style>\n```\n</docs>\n\n<template>\n\t<div class=\"textarea\" :class=\"{ 'textarea--disabled': disabled }\">\n\t\t<div class=\"textarea__main-wrapper\">\n\t\t\t<textarea v-bind=\"$attrs\"\n\t\t\t\t:id=\"computedId\"\n\t\t\t\tref=\"input\"\n\t\t\t\tclass=\"textarea__input\"\n\t\t\t\t:type=\"type\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:placeholder=\"computedPlaceholder\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\taria-live=\"polite\"\n\t\t\t\t:class=\"[inputClass,\n\t\t\t\t\t{\n\t\t\t\t\t\t'textarea__input--label-outside': labelOutside,\n\t\t\t\t\t\t'textarea__input--success': success,\n\t\t\t\t\t\t'textarea__input--error': error,\n\t\t\t\t\t}]\"\n\t\t\t\t:style=\"{ resize: resize }\"\n\t\t\t\t:value=\"value\"\n\t\t\t\tv-on=\"$listeners\"\n\t\t\t\t@input=\"handleInput\" />\n\t\t\t<!-- Label -->\n\t\t\t<label v-if=\"!labelOutside && isValidLabel\"\n\t\t\t\tclass=\"textarea__label\"\n\t\t\t\t:for=\"computedId\">\n\t\t\t\t{{ label }}\n\t\t\t</label>\n\t\t</div>\n\t\t<p v-if=\"helperText.length > 0\"\n\t\t\t:id=\"`${inputName}-helper-text`\"\n\t\t\tclass=\"textarea__helper-text-message\"\n\t\t\t:class=\"{\n\t\t\t\t'textarea__helper-text-message--error': error,\n\t\t\t\t'textarea__helper-text-message--success': success,\n\t\t\t}\">\n\t\t\t<Check v-if=\"success\" class=\"textarea__helper-text-message__icon\" :size=\"18\" />\n\t\t\t<AlertCircle v-else-if=\"error\" class=\"textarea__helper-text-message__icon\" :size=\"18\" />\n\t\t\t{{ helperText }}\n\t\t</p>\n\t</div>\n</template>\n\n<script>\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport AlertCircle from 'vue-material-design-icons/AlertCircleOutline.vue'\nimport Check from 'vue-material-design-icons/Check.vue'\n\nexport default {\n\tname: 'NcTextArea',\n\n\tcomponents: {\n\t\tAlertCircle,\n\t\tCheck,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * The value of the input field\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 * The input label, always provide one for accessibility purposes.\n\t\t * This will also be used as a placeholder unless the placeholder\n\t\t * prop is populated with a different string.\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Pass in true if you want to use an external label. This is useful\n\t\t * if you need a label that looks different from the one provided by\n\t\t * this component\n\t\t */\n\t\tlabelOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The placeholder of the input. This defaults as the string that's\n\t\t * passed into the label prop. In order to remove the placeholder,\n\t\t * pass in an empty string.\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Toggles the success state of the component. Adds a checkmark icon.\n\t\t * this cannot be used together with canClear.\n\t\t */\n\t\tsuccess: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Toggles the error state of the component. Adds an error icon.\n\t\t * this cannot be used together with canClear.\n\t\t */\n\t\terror: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Additional helper text message\n\t\t *\n\t\t * This will be displayed beneath the input field. In case the field is\n\t\t * also marked as having an error, the text will be displayed in red.\n\t\t */\n\t\thelperText: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Disable the input field\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Class to add to the input field.\n\t\t * Necessary to use NcInputField in the NcActionInput component.\n\t\t */\n\t\tinputClass: {\n\t\t\ttype: [Object, String],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The resize CSS property sets whether an element is resizable, and if\n\t\t * so, in which directions.\n\t\t */\n\t\tresize: {\n\t\t\ttype: String,\n\t\t\tdefault: 'both',\n\t\t\tvalidator: (value) => ['both', 'vertical', 'horizontal', 'none'].includes(value),\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t],\n\n\tcomputed: {\n\t\tcomputedId() {\n\t\t\treturn this.$attrs.id && this.$attrs.id !== '' ? this.$attrs.id : this.inputName\n\t\t},\n\n\t\tinputName() {\n\t\t\treturn 'input' + GenRandomId()\n\t\t},\n\n\t\thasPlaceholder() {\n\t\t\treturn this.placeholder !== '' && this.placeholder !== undefined\n\t\t},\n\n\t\tcomputedPlaceholder() {\n\t\t\treturn this.hasPlaceholder ? this.placeholder : this.label\n\t\t},\n\n\t\tisValidLabel() {\n\t\t\tconst isValidLabel = this.label || this.labelOutside\n\t\t\tif (!isValidLabel) {\n\t\t\t\tconsole.warn('You need to add a label to the NcInputField component. Either use the prop label or use an external one, as per the example in the documentation.')\n\t\t\t}\n\t\t\treturn isValidLabel\n\t\t},\n\n\t\tariaDescribedby() {\n\t\t\tconst ariaDescribedby = []\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\tariaDescribedby.push(`${this.inputName}-helper-text`)\n\t\t\t}\n\t\t\tif (this.$attrs['aria-describedby']) {\n\t\t\t\tariaDescribedby.push(this.$attrs['aria-describedby'])\n\t\t\t}\n\t\t\treturn ariaDescribedby.join(' ') || null\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.input.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.input.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.textarea {\n\tposition: relative;\n\twidth: 100%;\n\tborder-radius: var(--border-radius-large);\n\tmargin-block-start: 6px; // for the label in active state\n\tresize: vertical;\n\n\t&__main-wrapper {\n\t\tposition: relative;\n\t}\n\n\t&--disabled {\n\t\topacity: 0.7;\n\t\tfilter: saturate(0.7);\n\t}\n\n\t&__input {\n\t\tmargin: 0;\n\t\tpadding-inline: 10px 6px; // align with label 8px margin label + 4px padding label - 2px border input\n\t\twidth: 100%;\n\n\t\tfont-size: var(--default-font-size);\n\t\ttext-overflow: ellipsis;\n\n\t\tbackground-color: var(--color-main-background);\n\t\tcolor: var(--color-main-text);\n\t\tborder: 2px solid var(--color-border-maxcontrast);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\tcursor: pointer;\n\n\t\t&:active:not([disabled]),\n\t\t&:hover:not([disabled]),\n\t\t&:focus:not([disabled]) {\n\t\t\tborder-color: 2px solid var(--color-main-text) !important;\n\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\t\t}\n\n\t\t// Hide placeholder while not focussed -> show label instead (only if internal label is used)\n\t\t&:not(:focus,&--label-outside)::placeholder {\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&:focus {\n\t\t\tcursor: text;\n\t\t}\n\n\t\t&:disabled {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\tbox-shadow: unset !important; // Override server rules\n\t\t}\n\n\t\t&--success {\n\t\t\tborder-color: var(--color-success) !important; //Override hover border color\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px\n\t\t\t}\n\n\t\t\t// Align label text color with border color (on hover / focus)\n\t\t\t&:focus + .textarea__label,\n\t\t\t&:hover:not(:placeholder-shown) + .textarea__label {\n\t\t\t\tcolor: var(--color-success-text);\n\t\t\t}\n\t\t}\n\n\t\t&--error {\n\t\t\tborder-color: var(--color-error) !important; //Override hover border color\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px\n\t\t\t}\n\n\t\t\t// Align label text color with border color (on hover / focus)\n\t\t\t&:focus + .textarea__label,\n\t\t\t&:hover:not(:placeholder-shown) + .textarea__label {\n\t\t\t\tcolor: var(--color-error-text);\n\t\t\t}\n\t\t}\n\n\t\t// Align label text color with border color (on hover / focus)\n\t\t&:not(&--success, &--error) {\n\t\t\t&:focus + .textarea__label,\n\t\t\t&:hover:not(:placeholder-shown) + .textarea__label {\n\t\t\t\tcolor: var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t}\n\n\t&__label {\n\t\tposition: absolute;\n\t\tmargin-inline: 12px 0;\n\t\t// fix height and line height to center label\n\t\theight: 17px;\n\t\tmax-width: fit-content;\n\t\tline-height: 1;\n\t\tinset-block-start: 12px;\n\t\tinset-inline: 0;\n\t\t// Fix color so that users do not think the input already has content\n\t\tcolor: var(--color-text-maxcontrast);\n\t\t// only one line labels are allowed\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\t// forward events to input\n\t\tpointer-events: none;\n\t\t// Position transition\n\t\ttransition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick), background-color var(--animation-quick) var(--animation-slow);\n\t}\n\n\t&__input:focus + &__label,\n\t&__input:not(:placeholder-shown) + &__label {\n\t\tinset-block-start: -6px;\n\t\tfont-size: 13px; // minimum allowed font size for accessibility\n\t\tbackground-color: var(--color-main-background);\n\t\theight: 14px;\n\t\tpadding-inline: 4px;\n\t\tmargin-inline-start: 8px;\n\n\t\ttransition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick);\n\t}\n\n\t&__helper-text-message {\n\t\tpadding-block: 4px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\t&__icon {\n\t\t\tmargin-inline-end: 8px;\n\t\t}\n\n\t\t&--error {\n\t\t\tcolor: var(--color-error-text);\n\t\t}\n\n\t\t&--success {\n\t\t\tcolor: var(--color-success-text);\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main","AlertCircleOutline","Check","value","GenRandomId","isValidLabel","ariaDescribedby","event"],"mappings":";;AAoIA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,aAAAC,EAAA;AAAA,IACA,OAAAC,EAAA;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAAA,MACA,MAAA;AAAA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right Copyright (c) 2023 Richard Steinmetz <richard@steinmetz.cloud>\n -\n - @author Richard Steinmetz <richard@steinmetz.cloud>\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 General Public License as published by\n - the Free Software Foundation, either version 3 of the License, or\n - (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 General Public License for more details.\n -\n - You should have received a copy of the GNU General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### Description\n\nThis component is a textarea field.\nIt extends and styles an HTMLTextAreaElement.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcTextArea label=\"Text area\"\n\t\t\tplaceholder=\"Placeholders are possible\"\n\t\t\thelper-text=\"This is a regular helper text.\" >\n\t\t</NcTextArea>\n\t\t<NcTextArea label=\"Success state\"\n\t\t\t:success=\"true\">\n\t\t</NcTextArea>\n\t\t<NcTextArea label=\"Error state\"\n\t\t\tplaceholder=\"Enter something valid\"\n\t\t\thelper-text=\"Helper texts will be styled accordingly.\"\n\t\t\t:error=\"true\">\n\t\t</NcTextArea>\n\t\t<NcTextArea label=\"Disabled\"\n\t\t\t:disabled=\"true\" />\n\t\t<NcTextArea label=\"Disabled + Success\"\n\t\t\t:success=\"true\"\n\t\t\t:disabled=\"true\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">External label</label>\n\t\t\t<NcTextArea id=\"textField\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Text area with external label\" />\n\t\t</div>\n\t\t<NcTextArea label=\"Custom size and no resize\"\n\t\t\tresize=\"none\"\n\t\t\trows=\"5\" />\n\t\t</NcTextArea>\n\t</div>\n</template>\n\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\talign-items: center;\n\tgap: 14px;\n\n\t> label {\n\t\tflex-shrink: 0;\n\t}\n}\n</style>\n```\n</docs>\n\n<template>\n\t<div class=\"textarea\" :class=\"{ 'textarea--disabled': disabled }\">\n\t\t<div class=\"textarea__main-wrapper\">\n\t\t\t<textarea v-bind=\"$attrs\"\n\t\t\t\t:id=\"computedId\"\n\t\t\t\tref=\"input\"\n\t\t\t\tclass=\"textarea__input\"\n\t\t\t\t:type=\"type\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:placeholder=\"computedPlaceholder\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\taria-live=\"polite\"\n\t\t\t\t:class=\"[inputClass,\n\t\t\t\t\t{\n\t\t\t\t\t\t'textarea__input--label-outside': labelOutside,\n\t\t\t\t\t\t'textarea__input--success': success,\n\t\t\t\t\t\t'textarea__input--error': error,\n\t\t\t\t\t}]\"\n\t\t\t\t:style=\"{ resize: resize }\"\n\t\t\t\t:value=\"value\"\n\t\t\t\tv-on=\"$listeners\"\n\t\t\t\t@input=\"handleInput\" />\n\t\t\t<!-- Label -->\n\t\t\t<label v-if=\"!labelOutside && isValidLabel\"\n\t\t\t\tclass=\"textarea__label\"\n\t\t\t\t:for=\"computedId\">\n\t\t\t\t{{ label }}\n\t\t\t</label>\n\t\t</div>\n\t\t<p v-if=\"helperText.length > 0\"\n\t\t\t:id=\"`${inputName}-helper-text`\"\n\t\t\tclass=\"textarea__helper-text-message\"\n\t\t\t:class=\"{\n\t\t\t\t'textarea__helper-text-message--error': error,\n\t\t\t\t'textarea__helper-text-message--success': success,\n\t\t\t}\">\n\t\t\t<Check v-if=\"success\" class=\"textarea__helper-text-message__icon\" :size=\"18\" />\n\t\t\t<AlertCircle v-else-if=\"error\" class=\"textarea__helper-text-message__icon\" :size=\"18\" />\n\t\t\t{{ helperText }}\n\t\t</p>\n\t</div>\n</template>\n\n<script>\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport AlertCircle from 'vue-material-design-icons/AlertCircleOutline.vue'\nimport Check from 'vue-material-design-icons/Check.vue'\n\nexport default {\n\tname: 'NcTextArea',\n\n\tcomponents: {\n\t\tAlertCircle,\n\t\tCheck,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * The value of the input field\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 * The input label, always provide one for accessibility purposes.\n\t\t * This will also be used as a placeholder unless the placeholder\n\t\t * prop is populated with a different string.\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Pass in true if you want to use an external label. This is useful\n\t\t * if you need a label that looks different from the one provided by\n\t\t * this component\n\t\t */\n\t\tlabelOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The placeholder of the input. This defaults as the string that's\n\t\t * passed into the label prop. In order to remove the placeholder,\n\t\t * pass in an empty string.\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Toggles the success state of the component. Adds a checkmark icon.\n\t\t * this cannot be used together with canClear.\n\t\t */\n\t\tsuccess: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Toggles the error state of the component. Adds an error icon.\n\t\t * this cannot be used together with canClear.\n\t\t */\n\t\terror: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Additional helper text message\n\t\t *\n\t\t * This will be displayed beneath the input field. In case the field is\n\t\t * also marked as having an error, the text will be displayed in red.\n\t\t */\n\t\thelperText: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Disable the input field\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Class to add to the input field.\n\t\t * Necessary to use NcInputField in the NcActionInput component.\n\t\t */\n\t\tinputClass: {\n\t\t\ttype: [Object, String],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The resize CSS property sets whether an element is resizable, and if\n\t\t * so, in which directions.\n\t\t */\n\t\tresize: {\n\t\t\ttype: String,\n\t\t\tdefault: 'both',\n\t\t\tvalidator: (value) => ['both', 'vertical', 'horizontal', 'none'].includes(value),\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t],\n\n\tcomputed: {\n\t\tcomputedId() {\n\t\t\treturn this.$attrs.id && this.$attrs.id !== '' ? this.$attrs.id : this.inputName\n\t\t},\n\n\t\tinputName() {\n\t\t\treturn 'input' + GenRandomId()\n\t\t},\n\n\t\thasPlaceholder() {\n\t\t\treturn this.placeholder !== '' && this.placeholder !== undefined\n\t\t},\n\n\t\tcomputedPlaceholder() {\n\t\t\treturn this.hasPlaceholder ? this.placeholder : this.label\n\t\t},\n\n\t\tisValidLabel() {\n\t\t\tconst isValidLabel = this.label || this.labelOutside\n\t\t\tif (!isValidLabel) {\n\t\t\t\tconsole.warn('You need to add a label to the NcInputField component. Either use the prop label or use an external one, as per the example in the documentation.')\n\t\t\t}\n\t\t\treturn isValidLabel\n\t\t},\n\n\t\tariaDescribedby() {\n\t\t\tconst ariaDescribedby = []\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\tariaDescribedby.push(`${this.inputName}-helper-text`)\n\t\t\t}\n\t\t\tif (this.$attrs['aria-describedby']) {\n\t\t\t\tariaDescribedby.push(this.$attrs['aria-describedby'])\n\t\t\t}\n\t\t\treturn ariaDescribedby.join(' ') || null\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.input.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.input.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.textarea {\n\tposition: relative;\n\twidth: 100%;\n\tborder-radius: var(--border-radius-large);\n\tmargin-block-start: 6px; // for the label in active state\n\tresize: vertical;\n\n\t&__main-wrapper {\n\t\tposition: relative;\n\t}\n\n\t&--disabled {\n\t\topacity: 0.7;\n\t\tfilter: saturate(0.7);\n\t}\n\n\t&__input {\n\t\tmargin: 0;\n\t\tpadding-inline: 10px 6px; // align with label 8px margin label + 4px padding label - 2px border input\n\t\twidth: 100%;\n\n\t\tfont-size: var(--default-font-size);\n\t\ttext-overflow: ellipsis;\n\n\t\tbackground-color: var(--color-main-background);\n\t\tcolor: var(--color-main-text);\n\t\tborder: 2px solid var(--color-border-maxcontrast);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\tcursor: pointer;\n\n\t\t&:active:not([disabled]),\n\t\t&:hover:not([disabled]),\n\t\t&:focus:not([disabled]) {\n\t\t\tborder-color: 2px solid var(--color-main-text) !important;\n\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\t\t}\n\n\t\t// Hide placeholder while not focussed -> show label instead (only if internal label is used)\n\t\t&:not(:focus,&--label-outside)::placeholder {\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&:focus {\n\t\t\tcursor: text;\n\t\t}\n\n\t\t&:disabled {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\tbox-shadow: unset !important; // Override server rules\n\t\t}\n\n\t\t&--success {\n\t\t\tborder-color: var(--color-success) !important; //Override hover border color\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px\n\t\t\t}\n\t\t}\n\n\t\t&--error {\n\t\t\tborder-color: var(--color-error) !important; //Override hover border color\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px\n\t\t\t}\n\t\t}\n\t}\n\n\t&__label {\n\t\tposition: absolute;\n\t\tmargin-inline: 12px 0;\n\t\tmax-width: fit-content;\n\t\tinset-block-start: 11px;\n\t\tinset-inline: 0;\n\t\t// Fix color so that users do not think the input already has content\n\t\tcolor: var(--color-text-maxcontrast);\n\t\t// only one line labels are allowed\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\t// forward events to input\n\t\tpointer-events: none;\n\t\t// Position transition\n\t\ttransition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick), background-color var(--animation-quick) var(--animation-slow);\n\t}\n\n\t&__input:focus + &__label,\n\t&__input:not(:placeholder-shown) + &__label {\n\t\tinset-block-start: -10px;\n\t\tfont-size: 13px; // minimum allowed font size for accessibility\n\t\tfont-weight: 500;\n\t\tcolor: var(--color-main-text);\n\t\tbackground-color: var(--color-main-background);\n\t\tpadding-inline: 4px;\n\t\tmargin-inline-start: 8px;\n\n\t\ttransition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick);\n\t}\n\n\t&__helper-text-message {\n\t\tpadding-block: 4px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\t&__icon {\n\t\t\tmargin-inline-end: 8px;\n\t\t}\n\n\t\t&--error {\n\t\t\tcolor: var(--color-error-text);\n\t\t}\n\n\t\t&--success {\n\t\t\tcolor: var(--color-success-text);\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main","AlertCircleOutline","Check","value","GenRandomId","isValidLabel","ariaDescribedby","event"],"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AA,KAAA,OAAA,MAAA,KAAA,OAAA,OAAA,KAAA,KAAA,OAAA,KAAA,KAAA;AAAA,IACA;AAAA,IAEA,YAAA;AACA,aAAA,UAAAC,EAAA,YAAA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,aAAA,KAAA,gBAAA,MAAA,KAAA,gBAAA;AAAA,IACA;AAAA,IAEA,sBAAA;AACA,aAAA,KAAA,iBAAA,KAAA,cAAA,KAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,YAAAC,IAAA,KAAA,SAAA,KAAA;AACA,aAAAA,KACA,QAAA,KAAA,mJAAA,GAEAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,YAAAC,IAAA,CAAA;AACA,aAAA,KAAA,WAAA,SAAA,KACAA,EAAA,KAAA,GAAA,KAAA,SAAA,cAAA,GAEA,KAAA,OAAA,kBAAA,KACAA,EAAA,KAAA,KAAA,OAAA,kBAAA,CAAA,GAEAA,EAAA,KAAA,GAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AACA,WAAA,MAAA,MAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,SAAA;AACA,WAAA,MAAA,MAAA,OAAA;AAAA,IACA;AAAA,IAEA,YAAAC,GAAA;AACA,WAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import "../assets/index-30ca9574.css";
1
+ import "../assets/index-97305c1f.css";
2
2
  import { G as s } from "../chunks/GenRandomId-cb9ccebe.mjs";
3
3
  import { A as r } from "../chunks/AlertCircleOutline-b73838e0.mjs";
4
4
  import { C as l } from "../chunks/Check-2ea0a88a.mjs";
@@ -156,17 +156,17 @@ var d = function() {
156
156
  "textarea__helper-text-message--error": e.error,
157
157
  "textarea__helper-text-message--success": e.success
158
158
  }, attrs: { id: `${e.inputName}-helper-text` } }, [e.success ? a("Check", { staticClass: "textarea__helper-text-message__icon", attrs: { size: 18 } }) : e.error ? a("AlertCircle", { staticClass: "textarea__helper-text-message__icon", attrs: { size: 18 } }) : e._e(), e._v(" " + e._s(e.helperText) + " ")], 1) : e._e()]);
159
- }, o = [], u = /* @__PURE__ */ i(
159
+ }, o = [], c = /* @__PURE__ */ i(
160
160
  n,
161
161
  d,
162
162
  o,
163
163
  !1,
164
164
  null,
165
- "c9071493",
165
+ "638cac88",
166
166
  null,
167
167
  null
168
168
  );
169
- const f = u.exports;
169
+ const f = c.exports;
170
170
  export {
171
171
  f as default
172
172
  };