@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":"NcTextArea.mjs","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","AlertCircle","Check","value","GenRandomId","isValidLabel","ariaDescribedby","event"],"mappings":";;;;;AAoIA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA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A,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
+ {"version":3,"file":"NcTextArea.mjs","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\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","AlertCircle","Check","value","GenRandomId","isValidLabel","ariaDescribedby","event"],"mappings":";;;;;AAoIA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;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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AAA,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,5 +1,5 @@
1
1
  "use strict";
2
- const i = require("./NcInputField.cjs"), o = require("../chunks/Close-98cb6f12.cjs"), a = require("../chunks/ArrowRight-7315f6c1.cjs"), s = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), r = require("../chunks/l10n-070da9ad.cjs"), c = {
2
+ const i = require("./NcInputField.cjs"), o = require("../chunks/Close-98cb6f12.cjs"), a = require("../chunks/ArrowRight-7315f6c1.cjs"), s = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), r = require("../chunks/_l10n-72c5e29e.cjs"), c = {
3
3
  name: "UndoVariantIcon",
4
4
  emits: ["click"],
5
5
  props: {
@@ -31,7 +31,9 @@ var u = function() {
31
31
  null,
32
32
  null
33
33
  );
34
- const _ = d.exports, f = new Set(Object.keys(i.props)), g = {
34
+ const _ = d.exports;
35
+ r.register(r.t15, r.t40);
36
+ const f = new Set(Object.keys(i.props)), g = {
35
37
  name: "NcTextField",
36
38
  components: {
37
39
  NcInputField: i,
@@ -1 +1 @@
1
- {"version":3,"file":"NcTextField.cjs","sources":["../../node_modules/vue-material-design-icons/UndoVariant.vue","../../src/components/NcTextField/NcTextField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon undo-variant-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=\"M13.5,7A6.5,6.5 0 0,1 20,13.5A6.5,6.5 0 0,1 13.5,20H10V18H13.5C16,18 18,16 18,13.5C18,11 16,9 13.5,9H7.83L10.91,12.09L9.5,13.5L4,8L9.5,2.5L10.92,3.91L7.83,7H13.5M6,18H8V20H6V18Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"UndoVariantIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2022 Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @author Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose text field component.\nIt is recommended to not only provide a placeholder, but also a label.\nThe label should describe what input is expected and the placehold what format the input should have.\n\nNote: the inner html `input` element inherits all the attributes from the\nNcTextField component so you can add things like `autocomplete`, `maxlength`\nand `minlength`.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcTextField :value.sync=\"text1\"\n\t\t\tlabel=\"Leading icon and clear trailing button\"\n\t\t\ttrailing-button-icon=\"close\"\n\t\t\t:show-trailing-button=\"text1 !== ''\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t\t<Magnify :size=\"20\" />\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text4\"\n\t\t\tlabel=\"Internal label\"\n\t\t\tplaceholder=\"That can be used together with placeholder\"\n\t\t\ttrailing-button-icon=\"close\"\n\t\t\t:show-trailing-button=\"text4 !== ''\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t\t<Lock :size=\"20\" />\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text2\"\n\t\t\tlabel=\"Success state\"\n\t\t\tplaceholder=\"Placeholders are possible\"\n\t\t\t:success=\"true\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text3\"\n\t\t\tlabel=\"Error state\"\n\t\t\tplaceholder=\"Enter something valid\"\n\t\t\t:error=\"true\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t</NcTextField>\n\t\t<NcTextField label=\"Disabled\"\n\t\t\t:disabled=\"true\" />\n\t\t<NcTextField 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<NcTextField :value.sync=\"text5\"\n\t\t\t\tid=\"textField\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Input with external label\"\n\t\t\t\t@trailing-button-click=\"clearText\" />\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\nimport Lock from 'vue-material-design-icons/Lock'\nimport Close from 'vue-material-design-icons/Close'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: '',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t}\n\t},\n\n\tcomponents: {\n\t\tMagnify,\n\t\tLock,\n\t\tClose,\n\t},\n\n\tmethods: {\n\t\tclearText() {\n\t\t\tthis.text1 = ''\n\t\t\tthis.text3 = ''\n\t\t}\n\t}\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\tpadding-right: 14px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\tv-on=\"$listeners\"\n\t\t@input=\"handleInput\">\n\t\t<!-- Default slot for the leading icon -->\n\t\t<slot />\n\n\t\t<!-- Trailing icon slot, except for search type input as the browser already adds a trailing close icon -->\n\t\t<template v-if=\"type !== 'search'\" #trailing-button-icon>\n\t\t\t<Close v-if=\"trailingButtonIcon === 'close'\" :size=\"20\" />\n\t\t\t<ArrowRight v-else-if=\"trailingButtonIcon === 'arrowRight'\" :size=\"20\" />\n\t\t\t<Undo v-else-if=\"trailingButtonIcon === 'undo'\" :size=\"20\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\n\nimport NcInputField from '../NcInputField/NcInputField.vue'\n\nimport Close from 'vue-material-design-icons/Close.vue'\nimport ArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport Undo from 'vue-material-design-icons/UndoVariant.vue'\n\nimport { t } from '../../l10n.js'\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcTextField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tClose,\n\t\tArrowRight,\n\t\tUndo,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t/**\n\t\t * The `aria-label` to set on the trailing button\n\t\t * If no explicit value is set it will default to the one matching the `trailingButtonIcon`:\n\t\t * @default 'Clear text'|'Save changes'|'Undo changes'\n\t\t */\n\t\ttrailingButtonLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Specifies which material design icon should be used for the trailing\n\t\t * button.\n\t\t * @type {'close'|'arrowRight'|'undo'}\n\t\t */\n\t\ttrailingButtonIcon: {\n\t\t\ttype: String,\n\t\t\tdefault: 'close',\n\t\t\tvalidator: (value) => [\n\t\t\t\t'close',\n\t\t\t\t'arrowRight',\n\t\t\t\t'undo',\n\t\t\t].includes(value),\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t],\n\n\tcomputed: {\n\t\tpropsAndAttrsToForward() {\n\t\t\tconst predefinedLabels = {\n\t\t\t\tundo: t('Undo changes'),\n\t\t\t\tclose: t('Clear text'),\n\t\t\t\tarrowRight: t('Save changes'),\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\tObject.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key)),\n\t\t\t\t),\n\t\t\t\t// Adjust aria-label for predefined trailing buttons\n\t\t\t\ttrailingButtonLabel: this.trailingButtonLabel || predefinedLabels[this.trailingButtonIcon],\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcInputFieldProps","NcInputField","Close","ArrowRight","Undo","value","predefinedLabels","t","key","event"],"mappings":";mPAoBAA,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;;;;;;;;;;;;;;;;qBC0HAC,IAAA,IAAA,IAAA,OAAA,KAAAC,EAAA,KAAA,CAAA,GAEAF,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAE;AAAAA,IACA,OAAAC,EAAA;AAAA,IACA,YAAAC,EAAA;AAAA,IACA,MAAAC;AAAA,EACA;AAAA;AAAA,EAGA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,KAAA,CAAA;AAAA;AAAA,IAGA,GAAAH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAI,MAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,yBAAA;AACA,YAAAC,IAAA;AAAA,QACA,MAAAC,EAAA,EAAA,cAAA;AAAA,QACA,OAAAA,EAAA,EAAA,YAAA;AAAA,QACA,YAAAA,EAAA,EAAA,cAAA;AAAA,MACA;AAEA,aAAA;AAAA;AAAA,QAEA,GAAA,KAAA;AAAA;AAAA,QAEA,GAAA,OAAA;AAAA,UACA,OAAA,QAAA,KAAA,MAAA,EAAA,OAAA,CAAA,CAAAC,CAAA,MAAAR,EAAA,IAAAQ,CAAA,CAAA;AAAA,QACA;AAAA;AAAA,QAEA,qBAAA,KAAA,uBAAAF,EAAA,KAAA,kBAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AACA,WAAA,MAAA,WAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,SAAA;AACA,WAAA,MAAA,WAAA,OAAA;AAAA,IACA;AAAA,IAEA,YAAAG,GAAA;AACA,WAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"NcTextField.cjs","sources":["../../node_modules/vue-material-design-icons/UndoVariant.vue","../../src/components/NcTextField/NcTextField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon undo-variant-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=\"M13.5,7A6.5,6.5 0 0,1 20,13.5A6.5,6.5 0 0,1 13.5,20H10V18H13.5C16,18 18,16 18,13.5C18,11 16,9 13.5,9H7.83L10.91,12.09L9.5,13.5L4,8L9.5,2.5L10.92,3.91L7.83,7H13.5M6,18H8V20H6V18Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"UndoVariantIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2022 Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @author Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose text field component.\nIt is recommended to not only provide a placeholder, but also a label.\nThe label should describe what input is expected and the placehold what format the input should have.\n\nNote: the inner html `input` element inherits all the attributes from the\nNcTextField component so you can add things like `autocomplete`, `maxlength`\nand `minlength`.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcTextField :value.sync=\"text1\"\n\t\t\tlabel=\"Leading icon and clear trailing button\"\n\t\t\ttrailing-button-icon=\"close\"\n\t\t\t:show-trailing-button=\"text1 !== ''\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t\t<Magnify :size=\"20\" />\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text4\"\n\t\t\tlabel=\"Internal label\"\n\t\t\tplaceholder=\"That can be used together with placeholder\"\n\t\t\ttrailing-button-icon=\"close\"\n\t\t\t:show-trailing-button=\"text4 !== ''\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t\t<Lock :size=\"20\" />\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text2\"\n\t\t\tlabel=\"Success state\"\n\t\t\tplaceholder=\"Placeholders are possible\"\n\t\t\t:success=\"true\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text3\"\n\t\t\tlabel=\"Error state\"\n\t\t\tplaceholder=\"Enter something valid\"\n\t\t\t:error=\"true\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t</NcTextField>\n\t\t<NcTextField label=\"Disabled\"\n\t\t\t:disabled=\"true\" />\n\t\t<NcTextField 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<NcTextField :value.sync=\"text5\"\n\t\t\t\tid=\"textField\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Input with external label\"\n\t\t\t\t@trailing-button-click=\"clearText\" />\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\nimport Lock from 'vue-material-design-icons/Lock'\nimport Close from 'vue-material-design-icons/Close'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: '',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t}\n\t},\n\n\tcomponents: {\n\t\tMagnify,\n\t\tLock,\n\t\tClose,\n\t},\n\n\tmethods: {\n\t\tclearText() {\n\t\t\tthis.text1 = ''\n\t\t\tthis.text3 = ''\n\t\t}\n\t}\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\tpadding-right: 14px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\tv-on=\"$listeners\"\n\t\t@input=\"handleInput\">\n\t\t<!-- Default slot for the leading icon -->\n\t\t<slot />\n\n\t\t<!-- Trailing icon slot, except for search type input as the browser already adds a trailing close icon -->\n\t\t<template v-if=\"type !== 'search'\" #trailing-button-icon>\n\t\t\t<Close v-if=\"trailingButtonIcon === 'close'\" :size=\"20\" />\n\t\t\t<ArrowRight v-else-if=\"trailingButtonIcon === 'arrowRight'\" :size=\"20\" />\n\t\t\t<Undo v-else-if=\"trailingButtonIcon === 'undo'\" :size=\"20\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\n\nimport NcInputField from '../NcInputField/NcInputField.vue'\n\nimport Close from 'vue-material-design-icons/Close.vue'\nimport ArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport Undo from 'vue-material-design-icons/UndoVariant.vue'\n\nimport { t } from '../../l10n.js'\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcTextField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tClose,\n\t\tArrowRight,\n\t\tUndo,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t/**\n\t\t * The `aria-label` to set on the trailing button\n\t\t * If no explicit value is set it will default to the one matching the `trailingButtonIcon`:\n\t\t * @default 'Clear text'|'Save changes'|'Undo changes'\n\t\t */\n\t\ttrailingButtonLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Specifies which material design icon should be used for the trailing\n\t\t * button.\n\t\t * @type {'close'|'arrowRight'|'undo'}\n\t\t */\n\t\ttrailingButtonIcon: {\n\t\t\ttype: String,\n\t\t\tdefault: 'close',\n\t\t\tvalidator: (value) => [\n\t\t\t\t'close',\n\t\t\t\t'arrowRight',\n\t\t\t\t'undo',\n\t\t\t].includes(value),\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t],\n\n\tcomputed: {\n\t\tpropsAndAttrsToForward() {\n\t\t\tconst predefinedLabels = {\n\t\t\t\tundo: t('Undo changes'),\n\t\t\t\tclose: t('Clear text'),\n\t\t\t\tarrowRight: t('Save changes'),\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\tObject.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key)),\n\t\t\t\t),\n\t\t\t\t// Adjust aria-label for predefined trailing buttons\n\t\t\t\ttrailingButtonLabel: this.trailingButtonLabel || predefinedLabels[this.trailingButtonIcon],\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcInputFieldProps","NcInputField","Close","ArrowRight","Undo","value","predefinedLabels","t","key","event"],"mappings":";oPAoBAA,IAAA;AAAA,EACA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,CAAA,MAAAR,EAAA,IAAAQ,CAAA,CAAA;AAAA,QACA;AAAA;AAAA,QAEA,qBAAA,KAAA,uBAAAF,EAAA,KAAA,kBAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AACA,WAAA,MAAA,WAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,SAAA;AACA,WAAA,MAAA,WAAA,OAAA;AAAA,IACA;AAAA,IAEA,YAAAG,GAAA;AACA,WAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -2,8 +2,8 @@ import i from "./NcInputField.mjs";
2
2
  import { C as l } from "../chunks/Close-271f72e2.mjs";
3
3
  import { A as a } from "../chunks/ArrowRight-74a9fcb2.mjs";
4
4
  import { n as s } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
5
- import { t as r } from "../chunks/l10n-1b905a9a.mjs";
6
- const c = {
5
+ import { r as c, q as u, s as p, a as r } from "../chunks/_l10n-f5af5269.mjs";
6
+ const d = {
7
7
  name: "UndoVariantIcon",
8
8
  emits: ["click"],
9
9
  props: {
@@ -20,28 +20,30 @@ const c = {
20
20
  }
21
21
  }
22
22
  };
23
- var u = function() {
23
+ var f = function() {
24
24
  var t = this, e = t._self._c;
25
25
  return e("span", t._b({ staticClass: "material-design-icon undo-variant-icon", attrs: { "aria-hidden": !t.title, "aria-label": t.title, role: "img" }, on: { click: function(o) {
26
26
  return t.$emit("click", o);
27
27
  } } }, "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: "M13.5,7A6.5,6.5 0 0,1 20,13.5A6.5,6.5 0 0,1 13.5,20H10V18H13.5C16,18 18,16 18,13.5C18,11 16,9 13.5,9H7.83L10.91,12.09L9.5,13.5L4,8L9.5,2.5L10.92,3.91L7.83,7H13.5M6,18H8V20H6V18Z" } }, [t.title ? e("title", [t._v(t._s(t.title))]) : t._e()])])]);
28
- }, p = [], d = /* @__PURE__ */ s(
29
- c,
30
- u,
31
- p,
28
+ }, _ = [], m = /* @__PURE__ */ s(
29
+ d,
30
+ f,
31
+ _,
32
32
  !1,
33
33
  null,
34
34
  null,
35
35
  null,
36
36
  null
37
37
  );
38
- const f = d.exports, _ = new Set(Object.keys(i.props)), m = {
38
+ const g = m.exports;
39
+ c(p, u);
40
+ const h = new Set(Object.keys(i.props)), v = {
39
41
  name: "NcTextField",
40
42
  components: {
41
43
  NcInputField: i,
42
44
  Close: l,
43
45
  ArrowRight: a,
44
- Undo: f
46
+ Undo: g
45
47
  },
46
48
  // Allow forwarding all attributes
47
49
  inheritAttrs: !1,
@@ -94,7 +96,7 @@ const f = d.exports, _ = new Set(Object.keys(i.props)), m = {
94
96
  ...this.$attrs,
95
97
  // Proxy original NcInputField's props
96
98
  ...Object.fromEntries(
97
- Object.entries(this.$props).filter(([t]) => _.has(t))
99
+ Object.entries(this.$props).filter(([t]) => h.has(t))
98
100
  ),
99
101
  // Adjust aria-label for predefined trailing buttons
100
102
  trailingButtonLabel: this.trailingButtonLabel || n[this.trailingButtonIcon]
@@ -123,22 +125,22 @@ const f = d.exports, _ = new Set(Object.keys(i.props)), m = {
123
125
  }
124
126
  }
125
127
  };
126
- var g = function() {
128
+ var F = function() {
127
129
  var t = this, e = t._self._c;
128
130
  return e("NcInputField", t._g(t._b({ ref: "inputField", on: { input: t.handleInput }, scopedSlots: t._u([t.type !== "search" ? { key: "trailing-button-icon", fn: function() {
129
131
  return [t.trailingButtonIcon === "close" ? e("Close", { attrs: { size: 20 } }) : t.trailingButtonIcon === "arrowRight" ? e("ArrowRight", { attrs: { size: 20 } }) : t.trailingButtonIcon === "undo" ? e("Undo", { attrs: { size: 20 } }) : t._e()];
130
132
  }, proxy: !0 } : null], null, !0) }, "NcInputField", t.propsAndAttrsToForward, !1), t.$listeners), [t._t("default")], 2);
131
- }, h = [], v = /* @__PURE__ */ s(
132
- m,
133
- g,
134
- h,
133
+ }, b = [], C = /* @__PURE__ */ s(
134
+ v,
135
+ F,
136
+ b,
135
137
  !1,
136
138
  null,
137
139
  null,
138
140
  null,
139
141
  null
140
142
  );
141
- const w = v.exports;
143
+ const y = C.exports;
142
144
  export {
143
- w as default
145
+ y as default
144
146
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NcTextField.mjs","sources":["../../node_modules/vue-material-design-icons/UndoVariant.vue","../../src/components/NcTextField/NcTextField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon undo-variant-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=\"M13.5,7A6.5,6.5 0 0,1 20,13.5A6.5,6.5 0 0,1 13.5,20H10V18H13.5C16,18 18,16 18,13.5C18,11 16,9 13.5,9H7.83L10.91,12.09L9.5,13.5L4,8L9.5,2.5L10.92,3.91L7.83,7H13.5M6,18H8V20H6V18Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"UndoVariantIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2022 Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @author Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose text field component.\nIt is recommended to not only provide a placeholder, but also a label.\nThe label should describe what input is expected and the placehold what format the input should have.\n\nNote: the inner html `input` element inherits all the attributes from the\nNcTextField component so you can add things like `autocomplete`, `maxlength`\nand `minlength`.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcTextField :value.sync=\"text1\"\n\t\t\tlabel=\"Leading icon and clear trailing button\"\n\t\t\ttrailing-button-icon=\"close\"\n\t\t\t:show-trailing-button=\"text1 !== ''\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t\t<Magnify :size=\"20\" />\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text4\"\n\t\t\tlabel=\"Internal label\"\n\t\t\tplaceholder=\"That can be used together with placeholder\"\n\t\t\ttrailing-button-icon=\"close\"\n\t\t\t:show-trailing-button=\"text4 !== ''\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t\t<Lock :size=\"20\" />\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text2\"\n\t\t\tlabel=\"Success state\"\n\t\t\tplaceholder=\"Placeholders are possible\"\n\t\t\t:success=\"true\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text3\"\n\t\t\tlabel=\"Error state\"\n\t\t\tplaceholder=\"Enter something valid\"\n\t\t\t:error=\"true\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t</NcTextField>\n\t\t<NcTextField label=\"Disabled\"\n\t\t\t:disabled=\"true\" />\n\t\t<NcTextField 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<NcTextField :value.sync=\"text5\"\n\t\t\t\tid=\"textField\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Input with external label\"\n\t\t\t\t@trailing-button-click=\"clearText\" />\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\nimport Lock from 'vue-material-design-icons/Lock'\nimport Close from 'vue-material-design-icons/Close'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: '',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t}\n\t},\n\n\tcomponents: {\n\t\tMagnify,\n\t\tLock,\n\t\tClose,\n\t},\n\n\tmethods: {\n\t\tclearText() {\n\t\t\tthis.text1 = ''\n\t\t\tthis.text3 = ''\n\t\t}\n\t}\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\tpadding-right: 14px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\tv-on=\"$listeners\"\n\t\t@input=\"handleInput\">\n\t\t<!-- Default slot for the leading icon -->\n\t\t<slot />\n\n\t\t<!-- Trailing icon slot, except for search type input as the browser already adds a trailing close icon -->\n\t\t<template v-if=\"type !== 'search'\" #trailing-button-icon>\n\t\t\t<Close v-if=\"trailingButtonIcon === 'close'\" :size=\"20\" />\n\t\t\t<ArrowRight v-else-if=\"trailingButtonIcon === 'arrowRight'\" :size=\"20\" />\n\t\t\t<Undo v-else-if=\"trailingButtonIcon === 'undo'\" :size=\"20\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\n\nimport NcInputField from '../NcInputField/NcInputField.vue'\n\nimport Close from 'vue-material-design-icons/Close.vue'\nimport ArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport Undo from 'vue-material-design-icons/UndoVariant.vue'\n\nimport { t } from '../../l10n.js'\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcTextField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tClose,\n\t\tArrowRight,\n\t\tUndo,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t/**\n\t\t * The `aria-label` to set on the trailing button\n\t\t * If no explicit value is set it will default to the one matching the `trailingButtonIcon`:\n\t\t * @default 'Clear text'|'Save changes'|'Undo changes'\n\t\t */\n\t\ttrailingButtonLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Specifies which material design icon should be used for the trailing\n\t\t * button.\n\t\t * @type {'close'|'arrowRight'|'undo'}\n\t\t */\n\t\ttrailingButtonIcon: {\n\t\t\ttype: String,\n\t\t\tdefault: 'close',\n\t\t\tvalidator: (value) => [\n\t\t\t\t'close',\n\t\t\t\t'arrowRight',\n\t\t\t\t'undo',\n\t\t\t].includes(value),\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t],\n\n\tcomputed: {\n\t\tpropsAndAttrsToForward() {\n\t\t\tconst predefinedLabels = {\n\t\t\t\tundo: t('Undo changes'),\n\t\t\t\tclose: t('Clear text'),\n\t\t\t\tarrowRight: t('Save changes'),\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\tObject.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key)),\n\t\t\t\t),\n\t\t\t\t// Adjust aria-label for predefined trailing buttons\n\t\t\t\ttrailingButtonLabel: this.trailingButtonLabel || predefinedLabels[this.trailingButtonIcon],\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcInputFieldProps","NcInputField","Close","ArrowRight","Undo","value","predefinedLabels","t","key","event"],"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;;;;;;;;;;;;;;;;qBC0HAC,IAAA,IAAA,IAAA,OAAA,KAAAC,EAAA,KAAA,CAAA,GAEAF,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAE;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,MAAAC;AAAA,EACA;AAAA;AAAA,EAGA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,KAAA,CAAA;AAAA;AAAA,IAGA,GAAAH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAI,MAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,yBAAA;AACA,YAAAC,IAAA;AAAA,QACA,MAAAC,EAAA,cAAA;AAAA,QACA,OAAAA,EAAA,YAAA;AAAA,QACA,YAAAA,EAAA,cAAA;AAAA,MACA;AAEA,aAAA;AAAA;AAAA,QAEA,GAAA,KAAA;AAAA;AAAA,QAEA,GAAA,OAAA;AAAA,UACA,OAAA,QAAA,KAAA,MAAA,EAAA,OAAA,CAAA,CAAAC,CAAA,MAAAR,EAAA,IAAAQ,CAAA,CAAA;AAAA,QACA;AAAA;AAAA,QAEA,qBAAA,KAAA,uBAAAF,EAAA,KAAA,kBAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AACA,WAAA,MAAA,WAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,SAAA;AACA,WAAA,MAAA,WAAA,OAAA;AAAA,IACA;AAAA,IAEA,YAAAG,GAAA;AACA,WAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"NcTextField.mjs","sources":["../../node_modules/vue-material-design-icons/UndoVariant.vue","../../src/components/NcTextField/NcTextField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon undo-variant-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=\"M13.5,7A6.5,6.5 0 0,1 20,13.5A6.5,6.5 0 0,1 13.5,20H10V18H13.5C16,18 18,16 18,13.5C18,11 16,9 13.5,9H7.83L10.91,12.09L9.5,13.5L4,8L9.5,2.5L10.92,3.91L7.83,7H13.5M6,18H8V20H6V18Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"UndoVariantIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2022 Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @author Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose text field component.\nIt is recommended to not only provide a placeholder, but also a label.\nThe label should describe what input is expected and the placehold what format the input should have.\n\nNote: the inner html `input` element inherits all the attributes from the\nNcTextField component so you can add things like `autocomplete`, `maxlength`\nand `minlength`.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcTextField :value.sync=\"text1\"\n\t\t\tlabel=\"Leading icon and clear trailing button\"\n\t\t\ttrailing-button-icon=\"close\"\n\t\t\t:show-trailing-button=\"text1 !== ''\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t\t<Magnify :size=\"20\" />\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text4\"\n\t\t\tlabel=\"Internal label\"\n\t\t\tplaceholder=\"That can be used together with placeholder\"\n\t\t\ttrailing-button-icon=\"close\"\n\t\t\t:show-trailing-button=\"text4 !== ''\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t\t<Lock :size=\"20\" />\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text2\"\n\t\t\tlabel=\"Success state\"\n\t\t\tplaceholder=\"Placeholders are possible\"\n\t\t\t:success=\"true\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text3\"\n\t\t\tlabel=\"Error state\"\n\t\t\tplaceholder=\"Enter something valid\"\n\t\t\t:error=\"true\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t</NcTextField>\n\t\t<NcTextField label=\"Disabled\"\n\t\t\t:disabled=\"true\" />\n\t\t<NcTextField 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<NcTextField :value.sync=\"text5\"\n\t\t\t\tid=\"textField\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Input with external label\"\n\t\t\t\t@trailing-button-click=\"clearText\" />\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\nimport Lock from 'vue-material-design-icons/Lock'\nimport Close from 'vue-material-design-icons/Close'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: '',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t}\n\t},\n\n\tcomponents: {\n\t\tMagnify,\n\t\tLock,\n\t\tClose,\n\t},\n\n\tmethods: {\n\t\tclearText() {\n\t\t\tthis.text1 = ''\n\t\t\tthis.text3 = ''\n\t\t}\n\t}\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\tpadding-right: 14px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\tv-on=\"$listeners\"\n\t\t@input=\"handleInput\">\n\t\t<!-- Default slot for the leading icon -->\n\t\t<slot />\n\n\t\t<!-- Trailing icon slot, except for search type input as the browser already adds a trailing close icon -->\n\t\t<template v-if=\"type !== 'search'\" #trailing-button-icon>\n\t\t\t<Close v-if=\"trailingButtonIcon === 'close'\" :size=\"20\" />\n\t\t\t<ArrowRight v-else-if=\"trailingButtonIcon === 'arrowRight'\" :size=\"20\" />\n\t\t\t<Undo v-else-if=\"trailingButtonIcon === 'undo'\" :size=\"20\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\n\nimport NcInputField from '../NcInputField/NcInputField.vue'\n\nimport Close from 'vue-material-design-icons/Close.vue'\nimport ArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport Undo from 'vue-material-design-icons/UndoVariant.vue'\n\nimport { t } from '../../l10n.js'\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcTextField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tClose,\n\t\tArrowRight,\n\t\tUndo,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t/**\n\t\t * The `aria-label` to set on the trailing button\n\t\t * If no explicit value is set it will default to the one matching the `trailingButtonIcon`:\n\t\t * @default 'Clear text'|'Save changes'|'Undo changes'\n\t\t */\n\t\ttrailingButtonLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Specifies which material design icon should be used for the trailing\n\t\t * button.\n\t\t * @type {'close'|'arrowRight'|'undo'}\n\t\t */\n\t\ttrailingButtonIcon: {\n\t\t\ttype: String,\n\t\t\tdefault: 'close',\n\t\t\tvalidator: (value) => [\n\t\t\t\t'close',\n\t\t\t\t'arrowRight',\n\t\t\t\t'undo',\n\t\t\t].includes(value),\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t],\n\n\tcomputed: {\n\t\tpropsAndAttrsToForward() {\n\t\t\tconst predefinedLabels = {\n\t\t\t\tundo: t('Undo changes'),\n\t\t\t\tclose: t('Clear text'),\n\t\t\t\tarrowRight: t('Save changes'),\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\tObject.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key)),\n\t\t\t\t),\n\t\t\t\t// Adjust aria-label for predefined trailing buttons\n\t\t\t\ttrailingButtonLabel: this.trailingButtonLabel || predefinedLabels[this.trailingButtonIcon],\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcInputFieldProps","NcInputField","Close","ArrowRight","Undo","value","predefinedLabels","t","key","event"],"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;;;;;;;;;;;;;;;;;;AC0HA,MAAAC,IAAA,IAAA,IAAA,OAAA,KAAAC,EAAA,KAAA,CAAA,GAEAF,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAE;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,MAAAC;AAAA,EACA;AAAA;AAAA,EAGA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,KAAA,CAAA;AAAA;AAAA,IAGA,GAAAH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAI,MAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,yBAAA;AACA,YAAAC,IAAA;AAAA,QACA,MAAAC,EAAA,cAAA;AAAA,QACA,OAAAA,EAAA,YAAA;AAAA,QACA,YAAAA,EAAA,cAAA;AAAA,MACA;AAEA,aAAA;AAAA;AAAA,QAEA,GAAA,KAAA;AAAA;AAAA,QAEA,GAAA,OAAA;AAAA,UACA,OAAA,QAAA,KAAA,MAAA,EAAA,OAAA,CAAA,CAAAC,CAAA,MAAAR,EAAA,IAAAQ,CAAA,CAAA;AAAA,QACA;AAAA;AAAA,QAEA,qBAAA,KAAA,uBAAAF,EAAA,KAAA,kBAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AACA,WAAA,MAAA,WAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,SAAA;AACA,WAAA,MAAA,WAAA,OAAA;AAAA,IACA;AAAA,IAEA,YAAAG,GAAA;AACA,WAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
- const N = require("../chunks/l10n-070da9ad.cjs"), t = require("../chunks/logger-4998b668.cjs"), e = require("@nextcloud/calendar-js"), Z = require("../chunks/GenRandomId-c214d235.cjs"), Y = require("./NcSelect.cjs"), M = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
2
+ const F = require("../chunks/_l10n-72c5e29e.cjs"), t = require("../chunks/logger-4998b668.cjs"), e = require("@nextcloud/calendar-js"), Z = require("../chunks/GenRandomId-c214d235.cjs"), Y = require("./NcSelect.cjs"), M = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
3
+ F.register(F.t22);
3
4
  /**
4
5
  * @copyright Copyright (c) 2019 Georg Ehrke
5
6
  *
@@ -25,25 +26,25 @@ function l(T = [], n = []) {
25
26
  const A = {}, r = [];
26
27
  for (const E of T) {
27
28
  const D = E.split("/");
28
- let [S, F] = [D.shift(), D.join("/")];
29
- F || (F = S, S = N.t("Global")), A[S] = A[S] || {
29
+ let [S, N] = [D.shift(), D.join("/")];
30
+ N || (N = S, S = F.t("Global")), A[S] = A[S] || {
30
31
  continent: S,
31
32
  regions: []
32
33
  }, A[S].regions.push({
33
- label: i(F),
34
+ label: i(N),
34
35
  cities: [],
35
36
  timezoneId: E
36
37
  });
37
38
  }
38
39
  for (const E of n) {
39
- const { continent: D, label: S, timezoneId: F } = E;
40
+ const { continent: D, label: S, timezoneId: N } = E;
40
41
  A[D] = A[D] || {
41
42
  continent: D,
42
43
  regions: []
43
44
  }, A[D].regions.push({
44
45
  label: S,
45
46
  cities: [],
46
- timezoneId: F
47
+ timezoneId: N
47
48
  });
48
49
  }
49
50
  for (const E in A)
@@ -7093,6 +7094,7 @@ function s() {
7093
7094
  Object.prototype.hasOwnProperty.call(R.aliases, [T]) && O.registerAlias(T, R.aliases[T].aliasTo);
7094
7095
  a = !0;
7095
7096
  }
7097
+ F.register(F.t34);
7096
7098
  const c = {
7097
7099
  name: "NcTimezonePicker",
7098
7100
  components: {
@@ -7124,7 +7126,7 @@ const c = {
7124
7126
  emits: ["input"],
7125
7127
  computed: {
7126
7128
  placeholder() {
7127
- return N.t("Type to search time zone");
7129
+ return F.t("Type to search time zone");
7128
7130
  },
7129
7131
  selectedTimezone() {
7130
7132
  for (const T of this.additionalTimezones)
@@ -7148,7 +7150,7 @@ const c = {
7148
7150
  }
7149
7151
  },
7150
7152
  methods: {
7151
- t: N.t,
7153
+ t: F.t,
7152
7154
  change(T) {
7153
7155
  T && this.$emit("input", T.timezoneId);
7154
7156
  },
@@ -1 +1 @@
1
- {"version":3,"file":"NcTimezonePicker.cjs","sources":["../../src/components/NcTimezonePicker/timezone.js","../../src/components/NcTimezonePicker/timezoneDataProviderService.js","../../src/components/NcTimezonePicker/NcTimezonePicker.vue"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <oc.list@georgehrke.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { t } from '../../l10n.js'\n\n/**\n *\n * @param {string[]} timezoneList List of Olsen timezones\n * @param {Array} additionalTimezones List of additional timezones\n * @return {Array}\n */\nexport function getSortedTimezoneList(timezoneList = [], additionalTimezones = []) {\n\tconst sortedByContinent = {}\n\tconst sortedList = []\n\n\tfor (const timezoneId of timezoneList) {\n\t\tconst components = timezoneId.split('/')\n\t\tlet [continent, name] = [components.shift(), components.join('/')]\n\t\tif (!name) {\n\t\t\tname = continent\n\t\t\t// TRANSLATORS This refers to global timezones in the timezone picker\n\t\t\tcontinent = t('Global')\n\t\t}\n\n\t\tsortedByContinent[continent] = sortedByContinent[continent] || {\n\t\t\tcontinent,\n\t\t\tregions: [],\n\t\t}\n\n\t\tsortedByContinent[continent].regions.push({\n\t\t\tlabel: getReadableTimezoneName(name),\n\t\t\tcities: [],\n\t\t\ttimezoneId,\n\t\t})\n\t}\n\n\tfor (const additionalTimezone of additionalTimezones) {\n\t\tconst { continent, label, timezoneId } = additionalTimezone\n\n\t\tsortedByContinent[continent] = sortedByContinent[continent] || {\n\t\t\tcontinent,\n\t\t\tregions: [],\n\t\t}\n\n\t\tsortedByContinent[continent].regions.push({\n\t\t\tlabel,\n\t\t\tcities: [],\n\t\t\ttimezoneId,\n\t\t})\n\t}\n\n\tfor (const continent in sortedByContinent) {\n\t\tif (!Object.prototype.hasOwnProperty.call(sortedByContinent, continent)) {\n\t\t\tcontinue\n\t\t}\n\n\t\tsortedByContinent[continent].regions.sort((a, b) => {\n\t\t\tif (a.label < b.label) {\n\t\t\t\treturn -1\n\t\t\t}\n\n\t\t\treturn 1\n\t\t})\n\t\tsortedList.push(sortedByContinent[continent])\n\t}\n\n\t// Sort continents by name\n\tsortedList.sort((a, b) => {\n\t\tif (a.continent < b.continent) {\n\t\t\treturn -1\n\t\t}\n\n\t\treturn 1\n\t})\n\n\treturn sortedList\n}\n\n/**\n * Get human-readable name for timezoneId\n *\n * @param {string} timezoneId TimezoneId to turn human-readable\n * @return {string}\n */\nexport function getReadableTimezoneName(timezoneId) {\n\treturn timezoneId\n\t\t.split('_')\n\t\t.join(' ')\n\t\t.replace('St ', 'St. ')\n\t\t.split('/')\n\t\t.join(' - ')\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <oc.list@georgehrke.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport tzData from '../../../resources/timezones/zones.json'\nimport logger from '../../utils/logger.js'\n\nimport { getTimezoneManager } from '@nextcloud/calendar-js'\n\nconst timezoneManager = getTimezoneManager()\nlet initialized = false\n\n/**\n * Gets the timezone-manager\n * initializes it if necessary\n *\n * @return {object}\n */\nexport default function() {\n\tif (!initialized) {\n\t\tinitialize()\n\t}\n\n\treturn timezoneManager\n}\n\n/**\n * Initializes the timezone-manager with all timezones shipped by the calendar app\n */\nfunction initialize() {\n\tlogger.debug(`Using version ${tzData.version} of the timezone database`)\n\n\tfor (const tzid in tzData.zones) {\n\t\tif (Object.prototype.hasOwnProperty.call(tzData.zones, [tzid])) {\n\t\t\tconst ics = [\n\t\t\t\t'BEGIN:VTIMEZONE',\n\t\t\t\t'TZID:' + tzid,\n\t\t\t\t...tzData.zones[tzid].ics,\n\t\t\t\t'END:VTIMEZONE',\n\t\t\t].join('\\r\\n')\n\t\t\ttimezoneManager.registerTimezoneFromICS(tzid, ics)\n\t\t}\n\t}\n\n\tfor (const tzid in tzData.aliases) {\n\t\tif (Object.prototype.hasOwnProperty.call(tzData.aliases, [tzid])) {\n\t\t\ttimezoneManager.registerAlias(tzid, tzData.aliases[tzid].aliasTo)\n\t\t}\n\t}\n\n\tinitialized = true\n}\n","<!--\n - @copyright Copyright (c) 2021 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @author Christoph Wurst <christoph@winzerhof-wurst.at>\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### Example\n```vue\n<template>\n\t<span>\n\t\t<NcTimezonePicker v-model=\"tz\" />\n\t</span>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttz: 'Hawaiian Standard Time',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcSelect :aria-label-combobox=\"t('Search for time zone')\"\n\t\t:clearable=\"false\"\n\t\t:filter-by=\"filterBy\"\n\t\t:multiple=\"false\"\n\t\t:options=\"options\"\n\t\t:placeholder=\"placeholder\"\n\t\t:selectable=\"isSelectable\"\n\t\t:uid=\"uid\"\n\t\t:value=\"selectedTimezone\"\n\t\tlabel=\"label\"\n\t\t@option:selected=\"change\" />\n</template>\n\n<script>\nimport {\n\tgetReadableTimezoneName,\n\tgetSortedTimezoneList,\n} from './timezone.js'\nimport getTimezoneManager from './timezoneDataProviderService.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport NcSelect from '../NcSelect/index.js'\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcTimezonePicker',\n\tcomponents: {\n\t\tNcSelect,\n\t},\n\tprops: {\n\t\t/**\n\t\t * An array of additional timezones to include with the standard database. Useful if there is a custom timezone, e.g. read from user data\n\t\t */\n\t\tadditionalTimezones: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\t\t/**\n\t\t * The selected timezone. Use v-model for two-way binding. The default timezone is floating, which means a time independent of timezone. See https://icalendar.org/CalDAV-Access-RFC-4791/7-3-date-and-floating-time.html for details.\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: 'floating',\n\t\t},\n\t\t/**\n\t\t * ID of the inner vue-select element, can be used for labels like: `vs-${uid}__combobox`\n\t\t */\n\t\tuid: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: () => `tz-${GenRandomId(5)}`,\n\t\t},\n\t},\n\temits: ['input'],\n\tcomputed: {\n\t\tplaceholder() {\n\t\t\treturn t('Type to search time zone')\n\t\t},\n\t\tselectedTimezone() {\n\t\t\tfor (const additionalTimezone of this.additionalTimezones) {\n\t\t\t\tif (additionalTimezone.timezoneId === this.value) {\n\t\t\t\t\treturn additionalTimezone\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tlabel: getReadableTimezoneName(this.value),\n\t\t\t\ttimezoneId: this.value,\n\t\t\t}\n\t\t},\n\t\toptions() {\n\t\t\tconst timezoneManager = getTimezoneManager()\n\t\t\tconst timezoneList = getSortedTimezoneList(timezoneManager.listAllTimezones(), this.additionalTimezones)\n\t\t\t/**\n\t\t\t * Since NcSelect does not support groups,\n\t\t\t * we create an object with the grouped timezones and continent labels.\n\t\t\t */\n\t\t\tlet timezonesGrouped = []\n\t\t\tObject.values(timezoneList).forEach(group => {\n\t\t\t\t// Add an entry as group label\n\t\t\t\ttimezonesGrouped.push({\n\t\t\t\t\tlabel: group.continent,\n\t\t\t\t\ttimezoneId: `tz-group__${group.continent}`,\n\t\t\t\t\tregions: group.regions,\n\t\t\t\t})\n\t\t\t\ttimezonesGrouped = timezonesGrouped.concat(group.regions)\n\t\t\t})\n\t\t\treturn timezonesGrouped\n\t\t},\n\t},\n\tmethods: {\n\t\tt,\n\n\t\tchange(newValue) {\n\t\t\tif (!newValue) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Two-way binding of the value prop. Use v-model=\"selectedTimezone\" for two-way binding\n\t\t\t */\n\t\t\tthis.$emit('input', newValue.timezoneId)\n\t\t},\n\n\t\t/**\n\t\t * Returns whether this is a continent label,\n\t\t * or an actual timezone. Continent labels are not selectable.\n\t\t *\n\t\t * @param {string} option The option\n\t\t * @return {boolean}\n\t\t */\n\t\tisSelectable(option) {\n\t\t\treturn !option.timezoneId.startsWith('tz-group__')\n\t\t},\n\n\t\t/**\n\t\t * Function to filter the timezone list.\n\t\t * We search in the timezoneId, so both continent and region names can be matched.\n\t\t *\n\t\t * @param {object} option The timezone option\n\t\t * @param {string} label The label of the timezone\n\t\t * @param {string} search The search string\n\t\t * @return {boolean}\n\t\t */\n\t\tfilterBy(option, label, search) {\n\t\t\t// We split the search term in case one searches \"<continent> <region>\".\n\t\t\tconst terms = search.trim().split(' ')\n\n\t\t\t// For the continent labels, we have to check if one region matches every search term.\n\t\t\tif (option.timezoneId.startsWith('tz-group__')) {\n\t\t\t\treturn option.regions.some(region => {\n\t\t\t\t\treturn this.matchTimezoneId(region.timezoneId, terms)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// For a region, every search term must be found.\n\t\t\treturn this.matchTimezoneId(option.timezoneId, terms)\n\t\t},\n\n\t\tmatchTimezoneId(timezoneId, terms) {\n\t\t\treturn terms.every(term => timezoneId.toLowerCase().includes(term.toLowerCase()))\n\t\t},\n\t},\n}\n</script>\n"],"names":["getSortedTimezoneList","timezoneList","additionalTimezones","sortedByContinent","sortedList","timezoneId","components","continent","name","t","getReadableTimezoneName","additionalTimezone","label","a","b","timezoneManager","getTimezoneManager","initialized","initialize","logger","tzData","tzid","ics","_sfc_main","NcSelect","GenRandomId","timezonesGrouped","group","newValue","option","search","terms","region","term"],"mappings":";;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BO,SAASA,EAAsBC,IAAe,IAAIC,IAAsB,CAAA,GAAI;AAClF,QAAMC,IAAoB,CAAE,GACtBC,IAAa,CAAE;AAErB,aAAWC,KAAcJ,GAAc;AACtC,UAAMK,IAAaD,EAAW,MAAM,GAAG;AACvC,QAAI,CAACE,GAAWC,CAAI,IAAI,CAACF,EAAW,MAAK,GAAIA,EAAW,KAAK,GAAG,CAAC;AACjE,IAAKE,MACJA,IAAOD,GAEPA,IAAYE,EAAC,EAAC,QAAQ,IAGvBN,EAAkBI,CAAS,IAAIJ,EAAkBI,CAAS,KAAK;AAAA,MAC9D,WAAAA;AAAA,MACA,SAAS,CAAE;AAAA,IACX,GAEDJ,EAAkBI,CAAS,EAAE,QAAQ,KAAK;AAAA,MACzC,OAAOG,EAAwBF,CAAI;AAAA,MACnC,QAAQ,CAAE;AAAA,MACV,YAAAH;AAAA,IACH,CAAG;AAAA,EACD;AAED,aAAWM,KAAsBT,GAAqB;AACrD,UAAM,EAAE,WAAAK,GAAW,OAAAK,GAAO,YAAAP,EAAY,IAAGM;AAEzC,IAAAR,EAAkBI,CAAS,IAAI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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,aAAAC,GAAA;AACA,aAAA,CAAAA,EAAA,WAAA,WAAA,YAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAWA,SAAAA,GAAAjB,GAAAkB,GAAA;AAEA,YAAAC,IAAAD,EAAA,KAAA,EAAA,MAAA,GAAA;AAGA,aAAAD,EAAA,WAAA,WAAA,YAAA,IACAA,EAAA,QAAA,KAAA,CAAAG,MACA,KAAA,gBAAAA,EAAA,YAAAD,CAAA,CACA,IAIA,KAAA,gBAAAF,EAAA,YAAAE,CAAA;AAAA,IACA;AAAA,IAEA,gBAAA1B,GAAA0B,GAAA;AACA,aAAAA,EAAA,MAAA,CAAAE,MAAA5B,EAAA,YAAA,EAAA,SAAA4B,EAAA,YAAA,CAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcTimezonePicker.cjs","sources":["../../src/components/NcTimezonePicker/timezone.js","../../src/components/NcTimezonePicker/timezoneDataProviderService.js","../../src/components/NcTimezonePicker/NcTimezonePicker.vue"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <oc.list@georgehrke.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { t } from '../../l10n.js'\n\n/**\n *\n * @param {string[]} timezoneList List of Olsen timezones\n * @param {Array} additionalTimezones List of additional timezones\n * @return {Array}\n */\nexport function getSortedTimezoneList(timezoneList = [], additionalTimezones = []) {\n\tconst sortedByContinent = {}\n\tconst sortedList = []\n\n\tfor (const timezoneId of timezoneList) {\n\t\tconst components = timezoneId.split('/')\n\t\tlet [continent, name] = [components.shift(), components.join('/')]\n\t\tif (!name) {\n\t\t\tname = continent\n\t\t\t// TRANSLATORS This refers to global timezones in the timezone picker\n\t\t\tcontinent = t('Global')\n\t\t}\n\n\t\tsortedByContinent[continent] = sortedByContinent[continent] || {\n\t\t\tcontinent,\n\t\t\tregions: [],\n\t\t}\n\n\t\tsortedByContinent[continent].regions.push({\n\t\t\tlabel: getReadableTimezoneName(name),\n\t\t\tcities: [],\n\t\t\ttimezoneId,\n\t\t})\n\t}\n\n\tfor (const additionalTimezone of additionalTimezones) {\n\t\tconst { continent, label, timezoneId } = additionalTimezone\n\n\t\tsortedByContinent[continent] = sortedByContinent[continent] || {\n\t\t\tcontinent,\n\t\t\tregions: [],\n\t\t}\n\n\t\tsortedByContinent[continent].regions.push({\n\t\t\tlabel,\n\t\t\tcities: [],\n\t\t\ttimezoneId,\n\t\t})\n\t}\n\n\tfor (const continent in sortedByContinent) {\n\t\tif (!Object.prototype.hasOwnProperty.call(sortedByContinent, continent)) {\n\t\t\tcontinue\n\t\t}\n\n\t\tsortedByContinent[continent].regions.sort((a, b) => {\n\t\t\tif (a.label < b.label) {\n\t\t\t\treturn -1\n\t\t\t}\n\n\t\t\treturn 1\n\t\t})\n\t\tsortedList.push(sortedByContinent[continent])\n\t}\n\n\t// Sort continents by name\n\tsortedList.sort((a, b) => {\n\t\tif (a.continent < b.continent) {\n\t\t\treturn -1\n\t\t}\n\n\t\treturn 1\n\t})\n\n\treturn sortedList\n}\n\n/**\n * Get human-readable name for timezoneId\n *\n * @param {string} timezoneId TimezoneId to turn human-readable\n * @return {string}\n */\nexport function getReadableTimezoneName(timezoneId) {\n\treturn timezoneId\n\t\t.split('_')\n\t\t.join(' ')\n\t\t.replace('St ', 'St. ')\n\t\t.split('/')\n\t\t.join(' - ')\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <oc.list@georgehrke.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport tzData from '../../../resources/timezones/zones.json'\nimport logger from '../../utils/logger.js'\n\nimport { getTimezoneManager } from '@nextcloud/calendar-js'\n\nconst timezoneManager = getTimezoneManager()\nlet initialized = false\n\n/**\n * Gets the timezone-manager\n * initializes it if necessary\n *\n * @return {object}\n */\nexport default function() {\n\tif (!initialized) {\n\t\tinitialize()\n\t}\n\n\treturn timezoneManager\n}\n\n/**\n * Initializes the timezone-manager with all timezones shipped by the calendar app\n */\nfunction initialize() {\n\tlogger.debug(`Using version ${tzData.version} of the timezone database`)\n\n\tfor (const tzid in tzData.zones) {\n\t\tif (Object.prototype.hasOwnProperty.call(tzData.zones, [tzid])) {\n\t\t\tconst ics = [\n\t\t\t\t'BEGIN:VTIMEZONE',\n\t\t\t\t'TZID:' + tzid,\n\t\t\t\t...tzData.zones[tzid].ics,\n\t\t\t\t'END:VTIMEZONE',\n\t\t\t].join('\\r\\n')\n\t\t\ttimezoneManager.registerTimezoneFromICS(tzid, ics)\n\t\t}\n\t}\n\n\tfor (const tzid in tzData.aliases) {\n\t\tif (Object.prototype.hasOwnProperty.call(tzData.aliases, [tzid])) {\n\t\t\ttimezoneManager.registerAlias(tzid, tzData.aliases[tzid].aliasTo)\n\t\t}\n\t}\n\n\tinitialized = true\n}\n","<!--\n - @copyright Copyright (c) 2021 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @author Christoph Wurst <christoph@winzerhof-wurst.at>\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### Example\n```vue\n<template>\n\t<span>\n\t\t<NcTimezonePicker v-model=\"tz\" />\n\t</span>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttz: 'Hawaiian Standard Time',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcSelect :aria-label-combobox=\"t('Search for time zone')\"\n\t\t:clearable=\"false\"\n\t\t:filter-by=\"filterBy\"\n\t\t:multiple=\"false\"\n\t\t:options=\"options\"\n\t\t:placeholder=\"placeholder\"\n\t\t:selectable=\"isSelectable\"\n\t\t:uid=\"uid\"\n\t\t:value=\"selectedTimezone\"\n\t\tlabel=\"label\"\n\t\t@option:selected=\"change\" />\n</template>\n\n<script>\nimport {\n\tgetReadableTimezoneName,\n\tgetSortedTimezoneList,\n} from './timezone.js'\nimport getTimezoneManager from './timezoneDataProviderService.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport NcSelect from '../NcSelect/index.js'\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcTimezonePicker',\n\tcomponents: {\n\t\tNcSelect,\n\t},\n\tprops: {\n\t\t/**\n\t\t * An array of additional timezones to include with the standard database. Useful if there is a custom timezone, e.g. read from user data\n\t\t */\n\t\tadditionalTimezones: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\t\t/**\n\t\t * The selected timezone. Use v-model for two-way binding. The default timezone is floating, which means a time independent of timezone. See https://icalendar.org/CalDAV-Access-RFC-4791/7-3-date-and-floating-time.html for details.\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: 'floating',\n\t\t},\n\t\t/**\n\t\t * ID of the inner vue-select element, can be used for labels like: `vs-${uid}__combobox`\n\t\t */\n\t\tuid: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: () => `tz-${GenRandomId(5)}`,\n\t\t},\n\t},\n\temits: ['input'],\n\tcomputed: {\n\t\tplaceholder() {\n\t\t\treturn t('Type to search time zone')\n\t\t},\n\t\tselectedTimezone() {\n\t\t\tfor (const additionalTimezone of this.additionalTimezones) {\n\t\t\t\tif (additionalTimezone.timezoneId === this.value) {\n\t\t\t\t\treturn additionalTimezone\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tlabel: getReadableTimezoneName(this.value),\n\t\t\t\ttimezoneId: this.value,\n\t\t\t}\n\t\t},\n\t\toptions() {\n\t\t\tconst timezoneManager = getTimezoneManager()\n\t\t\tconst timezoneList = getSortedTimezoneList(timezoneManager.listAllTimezones(), this.additionalTimezones)\n\t\t\t/**\n\t\t\t * Since NcSelect does not support groups,\n\t\t\t * we create an object with the grouped timezones and continent labels.\n\t\t\t */\n\t\t\tlet timezonesGrouped = []\n\t\t\tObject.values(timezoneList).forEach(group => {\n\t\t\t\t// Add an entry as group label\n\t\t\t\ttimezonesGrouped.push({\n\t\t\t\t\tlabel: group.continent,\n\t\t\t\t\ttimezoneId: `tz-group__${group.continent}`,\n\t\t\t\t\tregions: group.regions,\n\t\t\t\t})\n\t\t\t\ttimezonesGrouped = timezonesGrouped.concat(group.regions)\n\t\t\t})\n\t\t\treturn timezonesGrouped\n\t\t},\n\t},\n\tmethods: {\n\t\tt,\n\n\t\tchange(newValue) {\n\t\t\tif (!newValue) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Two-way binding of the value prop. Use v-model=\"selectedTimezone\" for two-way binding\n\t\t\t */\n\t\t\tthis.$emit('input', newValue.timezoneId)\n\t\t},\n\n\t\t/**\n\t\t * Returns whether this is a continent label,\n\t\t * or an actual timezone. Continent labels are not selectable.\n\t\t *\n\t\t * @param {string} option The option\n\t\t * @return {boolean}\n\t\t */\n\t\tisSelectable(option) {\n\t\t\treturn !option.timezoneId.startsWith('tz-group__')\n\t\t},\n\n\t\t/**\n\t\t * Function to filter the timezone list.\n\t\t * We search in the timezoneId, so both continent and region names can be matched.\n\t\t *\n\t\t * @param {object} option The timezone option\n\t\t * @param {string} label The label of the timezone\n\t\t * @param {string} search The search string\n\t\t * @return {boolean}\n\t\t */\n\t\tfilterBy(option, label, search) {\n\t\t\t// We split the search term in case one searches \"<continent> <region>\".\n\t\t\tconst terms = search.trim().split(' ')\n\n\t\t\t// For the continent labels, we have to check if one region matches every search term.\n\t\t\tif (option.timezoneId.startsWith('tz-group__')) {\n\t\t\t\treturn option.regions.some(region => {\n\t\t\t\t\treturn this.matchTimezoneId(region.timezoneId, terms)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// For a region, every search term must be found.\n\t\t\treturn this.matchTimezoneId(option.timezoneId, terms)\n\t\t},\n\n\t\tmatchTimezoneId(timezoneId, terms) {\n\t\t\treturn terms.every(term => timezoneId.toLowerCase().includes(term.toLowerCase()))\n\t\t},\n\t},\n}\n</script>\n"],"names":["getSortedTimezoneList","timezoneList","additionalTimezones","sortedByContinent","sortedList","timezoneId","components","continent","name","t","getReadableTimezoneName","additionalTimezone","label","a","b","timezoneManager","getTimezoneManager","initialized","initialize","logger","tzData","tzid","ics","_sfc_main","NcSelect","GenRandomId","timezonesGrouped","group","newValue","option","search","terms","region","term"],"mappings":";;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AAA,YAAA,CAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,10 @@
1
- import { t as N } from "../chunks/l10n-1b905a9a.mjs";
2
- import { l as t } from "../chunks/logger-3612e664.mjs";
3
- import { getTimezoneManager as e } from "@nextcloud/calendar-js";
4
- import { G as Z } from "../chunks/GenRandomId-cb9ccebe.mjs";
5
- import Y from "./NcSelect.mjs";
6
- import { n as M } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
1
+ import { r as i, o as e, a as N, p as Z } from "../chunks/_l10n-f5af5269.mjs";
2
+ import { l as Y } from "../chunks/logger-3612e664.mjs";
3
+ import { getTimezoneManager as M } from "@nextcloud/calendar-js";
4
+ import { G as l } from "../chunks/GenRandomId-cb9ccebe.mjs";
5
+ import B from "./NcSelect.mjs";
6
+ import { n as u } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
7
+ i(e);
7
8
  /**
8
9
  * @copyright Copyright (c) 2019 Georg Ehrke
9
10
  *
@@ -25,7 +26,7 @@ import { n as M } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
25
26
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
26
27
  *
27
28
  */
28
- function l(T = [], n = []) {
29
+ function d(T = [], n = []) {
29
30
  const A = {}, r = [];
30
31
  for (const E of T) {
31
32
  const D = E.split("/");
@@ -34,7 +35,7 @@ function l(T = [], n = []) {
34
35
  continent: S,
35
36
  regions: []
36
37
  }, A[S].regions.push({
37
- label: i(F),
38
+ label: a(F),
38
39
  cities: [],
39
40
  timezoneId: E
40
41
  });
@@ -54,10 +55,10 @@ function l(T = [], n = []) {
54
55
  Object.prototype.hasOwnProperty.call(A, E) && (A[E].regions.sort((D, S) => D.label < S.label ? -1 : 1), r.push(A[E]));
55
56
  return r.sort((E, D) => E.continent < D.continent ? -1 : 1), r;
56
57
  }
57
- function i(T) {
58
+ function a(T) {
58
59
  return T.split("_").join(" ").replace("St ", "St. ").split("/").join(" - ");
59
60
  }
60
- const B = "2.2019c", u = {
61
+ const o = "2.2019c", s = {
61
62
  "AUS Central Standard Time": {
62
63
  aliasTo: "Australia/Darwin"
63
64
  },
@@ -460,7 +461,7 @@ const B = "2.2019c", u = {
460
461
  utc: {
461
462
  aliasTo: "UTC"
462
463
  }
463
- }, d = {
464
+ }, c = {
464
465
  "Africa/Abidjan": {
465
466
  ics: [
466
467
  `BEGIN:STANDARD\r
@@ -7050,9 +7051,9 @@ END:STANDARD`
7050
7051
  longitude: "-1761000"
7051
7052
  }
7052
7053
  }, R = {
7053
- version: B,
7054
- aliases: u,
7055
- zones: d
7054
+ version: o,
7055
+ aliases: s,
7056
+ zones: c
7056
7057
  };
7057
7058
  /**
7058
7059
  * @copyright Copyright (c) 2019 Georg Ehrke
@@ -7075,13 +7076,13 @@ END:STANDARD`
7075
7076
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
7076
7077
  *
7077
7078
  */
7078
- const O = e();
7079
- let a = !1;
7080
- function o() {
7081
- return a || s(), O;
7079
+ const O = M();
7080
+ let t = !1;
7081
+ function I() {
7082
+ return t || G(), O;
7082
7083
  }
7083
- function s() {
7084
- t.debug(`Using version ${R.version} of the timezone database`);
7084
+ function G() {
7085
+ Y.debug(`Using version ${R.version} of the timezone database`);
7085
7086
  for (const T in R.zones)
7086
7087
  if (Object.prototype.hasOwnProperty.call(R.zones, [T])) {
7087
7088
  const n = [
@@ -7095,12 +7096,13 @@ function s() {
7095
7096
  }
7096
7097
  for (const T in R.aliases)
7097
7098
  Object.prototype.hasOwnProperty.call(R.aliases, [T]) && O.registerAlias(T, R.aliases[T].aliasTo);
7098
- a = !0;
7099
+ t = !0;
7099
7100
  }
7100
- const c = {
7101
+ i(Z);
7102
+ const L = {
7101
7103
  name: "NcTimezonePicker",
7102
7104
  components: {
7103
- NcSelect: Y
7105
+ NcSelect: B
7104
7106
  },
7105
7107
  props: {
7106
7108
  /**
@@ -7122,7 +7124,7 @@ const c = {
7122
7124
  */
7123
7125
  uid: {
7124
7126
  type: [String, Number],
7125
- default: () => `tz-${Z(5)}`
7127
+ default: () => `tz-${l(5)}`
7126
7128
  }
7127
7129
  },
7128
7130
  emits: ["input"],
@@ -7135,12 +7137,12 @@ const c = {
7135
7137
  if (T.timezoneId === this.value)
7136
7138
  return T;
7137
7139
  return {
7138
- label: i(this.value),
7140
+ label: a(this.value),
7139
7141
  timezoneId: this.value
7140
7142
  };
7141
7143
  },
7142
7144
  options() {
7143
- const T = o(), n = l(T.listAllTimezones(), this.additionalTimezones);
7145
+ const T = I(), n = d(T.listAllTimezones(), this.additionalTimezones);
7144
7146
  let A = [];
7145
7147
  return Object.values(n).forEach((r) => {
7146
7148
  A.push({
@@ -7184,20 +7186,20 @@ const c = {
7184
7186
  }
7185
7187
  }
7186
7188
  };
7187
- var I = function() {
7189
+ var H = function() {
7188
7190
  var n = this, A = n._self._c;
7189
7191
  return A("NcSelect", { attrs: { "aria-label-combobox": n.t("Search for time zone"), clearable: !1, "filter-by": n.filterBy, multiple: !1, options: n.options, placeholder: n.placeholder, selectable: n.isSelectable, uid: n.uid, value: n.selectedTimezone, label: "label" }, on: { "option:selected": n.change } });
7190
- }, G = [], L = /* @__PURE__ */ M(
7191
- c,
7192
- I,
7193
- G,
7192
+ }, U = [], g = /* @__PURE__ */ u(
7193
+ L,
7194
+ H,
7195
+ U,
7194
7196
  !1,
7195
7197
  null,
7196
7198
  null,
7197
7199
  null,
7198
7200
  null
7199
7201
  );
7200
- const f = L.exports;
7202
+ const P = g.exports;
7201
7203
  export {
7202
- f as default
7204
+ P as default
7203
7205
  };