buefy 0.9.26 → 0.9.28

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 (259) hide show
  1. package/README.md +3 -1
  2. package/dist/buefy.css +15904 -0
  3. package/dist/buefy.esm.js +17883 -0
  4. package/dist/buefy.esm.min.js +2 -0
  5. package/dist/buefy.js +17967 -0
  6. package/dist/buefy.min.css +1 -0
  7. package/dist/buefy.min.js +2 -0
  8. package/dist/cjs/Autocomplete-7a39c5ce.js +673 -0
  9. package/dist/cjs/Button-01827709.js +114 -0
  10. package/dist/cjs/CheckRadioMixin-c910f2ed.js +45 -0
  11. package/dist/cjs/Checkbox-43f54cc7.js +70 -0
  12. package/dist/cjs/Datepicker-680659bc.js +1679 -0
  13. package/dist/cjs/DropdownItem-422f8c34.js +559 -0
  14. package/dist/cjs/Field-4557b10c.js +315 -0
  15. package/dist/cjs/FormElementMixin-193a88b8.js +163 -0
  16. package/dist/cjs/Icon-78961800.js +189 -0
  17. package/dist/cjs/Image-c4bcd9b3.js +299 -0
  18. package/dist/cjs/InjectedChildMixin-d6bf7f91.js +135 -0
  19. package/dist/cjs/Input-e5a72d97.js +248 -0
  20. package/dist/cjs/Loading-6f2c7075.js +150 -0
  21. package/dist/cjs/MessageMixin-8d959514.js +146 -0
  22. package/dist/cjs/Modal-4cf07210.js +278 -0
  23. package/dist/cjs/NoticeMixin-01121bd2.js +154 -0
  24. package/dist/cjs/Pagination-d6b3fb85.js +413 -0
  25. package/dist/cjs/Select-2b3879bc.js +100 -0
  26. package/dist/cjs/SlotComponent-4fb48389.js +53 -0
  27. package/dist/cjs/TabbedChildMixin-907cad32.js +222 -0
  28. package/dist/cjs/Tag-437f65fb.js +154 -0
  29. package/dist/cjs/Timepicker-498fa02b.js +67 -0
  30. package/dist/cjs/TimepickerMixin-6c1a4ab4.js +661 -0
  31. package/dist/cjs/Tooltip-c1df7ee3.js +370 -0
  32. package/dist/cjs/_rollupPluginBabelHelpers-8b2e54ad.js +365 -0
  33. package/dist/cjs/autocomplete.js +22 -0
  34. package/dist/cjs/breadcrumb.js +139 -0
  35. package/dist/cjs/button.js +20 -0
  36. package/dist/cjs/carousel.js +662 -0
  37. package/dist/cjs/checkbox.js +86 -0
  38. package/dist/cjs/clockpicker.js +461 -0
  39. package/dist/cjs/collapse.js +128 -0
  40. package/dist/cjs/colorpicker.js +23 -0
  41. package/dist/cjs/config-8cfb5a4a.js +81 -0
  42. package/dist/cjs/config.js +18 -0
  43. package/dist/cjs/datepicker.js +27 -0
  44. package/dist/cjs/datetimepicker.js +377 -0
  45. package/dist/cjs/dialog.js +308 -0
  46. package/dist/cjs/dropdown.js +23 -0
  47. package/dist/cjs/field.js +18 -0
  48. package/dist/cjs/helpers.js +375 -0
  49. package/dist/cjs/icon.js +19 -0
  50. package/dist/cjs/image.js +19 -0
  51. package/dist/cjs/index-99d1c930.js +1633 -0
  52. package/dist/cjs/index.js +216 -0
  53. package/dist/cjs/input.js +21 -0
  54. package/dist/cjs/loading.js +38 -0
  55. package/dist/cjs/menu.js +304 -0
  56. package/dist/cjs/message.js +67 -0
  57. package/dist/cjs/modal.js +59 -0
  58. package/dist/cjs/navbar.js +679 -0
  59. package/dist/cjs/notification.js +181 -0
  60. package/dist/cjs/numberinput.js +278 -0
  61. package/dist/cjs/pagination.js +22 -0
  62. package/dist/cjs/plugins-7f41b028.js +94 -0
  63. package/dist/cjs/progress.js +239 -0
  64. package/dist/cjs/radio.js +130 -0
  65. package/dist/cjs/rate.js +156 -0
  66. package/dist/cjs/select.js +21 -0
  67. package/dist/cjs/sidebar.js +303 -0
  68. package/dist/cjs/skeleton.js +111 -0
  69. package/dist/cjs/slider.js +603 -0
  70. package/dist/cjs/snackbar.js +132 -0
  71. package/dist/cjs/ssr-20dba236.js +10 -0
  72. package/dist/cjs/steps.js +278 -0
  73. package/dist/cjs/switch.js +139 -0
  74. package/dist/cjs/table.js +1695 -0
  75. package/dist/cjs/tabs.js +214 -0
  76. package/dist/cjs/tag.js +70 -0
  77. package/dist/cjs/taginput.js +331 -0
  78. package/dist/cjs/timepicker.js +28 -0
  79. package/dist/cjs/toast.js +106 -0
  80. package/dist/cjs/tooltip.js +19 -0
  81. package/dist/cjs/trapFocus-261420b0.js +49 -0
  82. package/dist/cjs/upload.js +205 -0
  83. package/dist/components/autocomplete/index.js +1620 -0
  84. package/dist/components/autocomplete/index.min.js +2 -0
  85. package/dist/components/breadcrumb/index.js +297 -0
  86. package/dist/components/breadcrumb/index.min.js +2 -0
  87. package/dist/components/button/index.js +569 -0
  88. package/dist/components/button/index.min.js +2 -0
  89. package/dist/components/carousel/index.js +1629 -0
  90. package/dist/components/carousel/index.min.js +2 -0
  91. package/dist/components/checkbox/index.js +279 -0
  92. package/dist/components/checkbox/index.min.js +2 -0
  93. package/dist/components/clockpicker/index.js +3131 -0
  94. package/dist/components/clockpicker/index.min.js +2 -0
  95. package/dist/components/collapse/index.js +217 -0
  96. package/dist/components/collapse/index.min.js +2 -0
  97. package/dist/components/colorpicker/index.js +4249 -0
  98. package/dist/components/colorpicker/index.min.js +2 -0
  99. package/dist/components/datepicker/index.js +3845 -0
  100. package/dist/components/datepicker/index.min.js +2 -0
  101. package/dist/components/datetimepicker/index.js +4902 -0
  102. package/dist/components/datetimepicker/index.min.js +2 -0
  103. package/dist/components/dialog/index.js +1168 -0
  104. package/dist/components/dialog/index.min.js +2 -0
  105. package/dist/components/dropdown/index.js +1043 -0
  106. package/dist/components/dropdown/index.min.js +2 -0
  107. package/dist/components/field/index.js +511 -0
  108. package/dist/components/field/index.min.js +2 -0
  109. package/dist/components/icon/index.js +463 -0
  110. package/dist/components/icon/index.min.js +2 -0
  111. package/dist/components/image/index.js +513 -0
  112. package/dist/components/image/index.min.js +2 -0
  113. package/dist/components/input/index.js +862 -0
  114. package/dist/components/input/index.min.js +2 -0
  115. package/dist/components/loading/index.js +366 -0
  116. package/dist/components/loading/index.min.js +2 -0
  117. package/dist/components/menu/index.js +748 -0
  118. package/dist/components/menu/index.min.js +2 -0
  119. package/dist/components/message/index.js +650 -0
  120. package/dist/components/message/index.min.js +2 -0
  121. package/dist/components/modal/index.js +624 -0
  122. package/dist/components/modal/index.min.js +2 -0
  123. package/dist/components/navbar/index.js +805 -0
  124. package/dist/components/navbar/index.min.js +2 -0
  125. package/dist/components/notification/index.js +923 -0
  126. package/dist/components/notification/index.min.js +2 -0
  127. package/dist/components/numberinput/index.js +1119 -0
  128. package/dist/components/numberinput/index.min.js +2 -0
  129. package/dist/components/pagination/index.js +868 -0
  130. package/dist/components/pagination/index.min.js +2 -0
  131. package/dist/components/progress/index.js +621 -0
  132. package/dist/components/progress/index.min.js +2 -0
  133. package/dist/components/radio/index.js +260 -0
  134. package/dist/components/radio/index.min.js +2 -0
  135. package/dist/components/rate/index.js +600 -0
  136. package/dist/components/rate/index.min.js +2 -0
  137. package/dist/components/select/index.js +715 -0
  138. package/dist/components/select/index.min.js +2 -0
  139. package/dist/components/sidebar/index.js +467 -0
  140. package/dist/components/sidebar/index.min.js +2 -0
  141. package/dist/components/skeleton/index.js +200 -0
  142. package/dist/components/skeleton/index.min.js +2 -0
  143. package/dist/components/slider/index.js +1264 -0
  144. package/dist/components/slider/index.min.js +2 -0
  145. package/dist/components/snackbar/index.js +527 -0
  146. package/dist/components/snackbar/index.min.js +2 -0
  147. package/dist/components/steps/index.js +1180 -0
  148. package/dist/components/steps/index.min.js +2 -0
  149. package/dist/components/switch/index.js +297 -0
  150. package/dist/components/switch/index.min.js +2 -0
  151. package/dist/components/table/index.js +3480 -0
  152. package/dist/components/table/index.min.js +2 -0
  153. package/dist/components/tabs/index.js +1116 -0
  154. package/dist/components/tabs/index.min.js +2 -0
  155. package/dist/components/tag/index.js +307 -0
  156. package/dist/components/tag/index.min.js +2 -0
  157. package/dist/components/taginput/index.js +2104 -0
  158. package/dist/components/taginput/index.min.js +2 -0
  159. package/dist/components/timepicker/index.js +2843 -0
  160. package/dist/components/timepicker/index.min.js +2 -0
  161. package/dist/components/toast/index.js +501 -0
  162. package/dist/components/toast/index.min.js +2 -0
  163. package/dist/components/tooltip/index.js +630 -0
  164. package/dist/components/tooltip/index.min.js +2 -0
  165. package/dist/components/upload/index.js +525 -0
  166. package/dist/components/upload/index.min.js +2 -0
  167. package/dist/esm/Autocomplete-1a6e8770.js +671 -0
  168. package/dist/esm/Button-521f6efc.js +112 -0
  169. package/dist/esm/CheckRadioMixin-e726a83c.js +43 -0
  170. package/dist/esm/Checkbox-1d02686e.js +68 -0
  171. package/dist/esm/Datepicker-0ae1e826.js +1677 -0
  172. package/dist/esm/DropdownItem-55682322.js +556 -0
  173. package/dist/esm/Field-3ceba31e.js +313 -0
  174. package/dist/esm/FormElementMixin-b223d3c7.js +161 -0
  175. package/dist/esm/Icon-60d47b31.js +187 -0
  176. package/dist/esm/Image-75808acb.js +297 -0
  177. package/dist/esm/InjectedChildMixin-b4220787.js +130 -0
  178. package/dist/esm/Input-20612b63.js +246 -0
  179. package/dist/esm/Loading-ae028ea5.js +148 -0
  180. package/dist/esm/MessageMixin-d577a9f5.js +144 -0
  181. package/dist/esm/Modal-7da7641f.js +276 -0
  182. package/dist/esm/NoticeMixin-bd6f61d9.js +152 -0
  183. package/dist/esm/Pagination-68f12c1e.js +409 -0
  184. package/dist/esm/Select-97781d4e.js +98 -0
  185. package/dist/esm/SlotComponent-8871a20f.js +51 -0
  186. package/dist/esm/TabbedChildMixin-bcb13767.js +219 -0
  187. package/dist/esm/Tag-6365aa46.js +152 -0
  188. package/dist/esm/Timepicker-38480bbc.js +65 -0
  189. package/dist/esm/TimepickerMixin-d736b0a9.js +659 -0
  190. package/dist/esm/Tooltip-d98a769c.js +368 -0
  191. package/dist/esm/_rollupPluginBabelHelpers-df313029.js +350 -0
  192. package/dist/esm/autocomplete.js +18 -0
  193. package/dist/esm/breadcrumb.js +133 -0
  194. package/dist/esm/button.js +16 -0
  195. package/dist/esm/carousel.js +655 -0
  196. package/dist/esm/checkbox.js +81 -0
  197. package/dist/esm/clockpicker.js +456 -0
  198. package/dist/esm/collapse.js +123 -0
  199. package/dist/esm/colorpicker.js +14 -0
  200. package/dist/esm/config-e7d4b9c2.js +78 -0
  201. package/dist/esm/config.js +14 -0
  202. package/dist/esm/datepicker.js +23 -0
  203. package/dist/esm/datetimepicker.js +372 -0
  204. package/dist/esm/dialog.js +302 -0
  205. package/dist/esm/dropdown.js +18 -0
  206. package/dist/esm/field.js +14 -0
  207. package/dist/esm/helpers.js +348 -0
  208. package/dist/esm/icon.js +15 -0
  209. package/dist/esm/image.js +15 -0
  210. package/dist/esm/index-903f63ea.js +1629 -0
  211. package/dist/esm/index.js +182 -0
  212. package/dist/esm/input.js +17 -0
  213. package/dist/esm/loading.js +33 -0
  214. package/dist/esm/menu.js +297 -0
  215. package/dist/esm/message.js +62 -0
  216. package/dist/esm/modal.js +54 -0
  217. package/dist/esm/navbar.js +672 -0
  218. package/dist/esm/notification.js +175 -0
  219. package/dist/esm/numberinput.js +273 -0
  220. package/dist/esm/pagination.js +17 -0
  221. package/dist/esm/plugins-218aea86.js +89 -0
  222. package/dist/esm/progress.js +233 -0
  223. package/dist/esm/radio.js +124 -0
  224. package/dist/esm/rate.js +151 -0
  225. package/dist/esm/select.js +17 -0
  226. package/dist/esm/sidebar.js +298 -0
  227. package/dist/esm/skeleton.js +106 -0
  228. package/dist/esm/slider.js +597 -0
  229. package/dist/esm/snackbar.js +126 -0
  230. package/dist/esm/ssr-b847d137.js +7 -0
  231. package/dist/esm/steps.js +272 -0
  232. package/dist/esm/switch.js +134 -0
  233. package/dist/esm/table.js +1689 -0
  234. package/dist/esm/tabs.js +208 -0
  235. package/dist/esm/tag.js +65 -0
  236. package/dist/esm/taginput.js +326 -0
  237. package/dist/esm/timepicker.js +24 -0
  238. package/dist/esm/toast.js +100 -0
  239. package/dist/esm/tooltip.js +15 -0
  240. package/dist/esm/trapFocus-f0736873.js +47 -0
  241. package/dist/esm/upload.js +200 -0
  242. package/dist/vetur/attributes.json +3238 -0
  243. package/dist/vetur/tags.json +1183 -0
  244. package/package.json +3 -3
  245. package/src/components/autocomplete/Autocomplete.spec.js +16 -0
  246. package/src/components/autocomplete/Autocomplete.vue +9 -3
  247. package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue +2 -0
  248. package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue +2 -0
  249. package/src/components/dropdown/Dropdown.vue +51 -3
  250. package/src/components/numberinput/Numberinput.vue +4 -0
  251. package/src/components/sidebar/Sidebar.vue +1 -0
  252. package/src/components/slider/Slider.vue +7 -2
  253. package/src/components/slider/SliderThumb.vue +8 -0
  254. package/src/components/table/Table.vue +4 -1
  255. package/src/components/table/TableColumn.spec.js +51 -0
  256. package/src/components/table/TableColumn.vue +8 -1
  257. package/src/components/taginput/Taginput.vue +7 -2
  258. package/src/components/tooltip/Tooltip.vue +10 -3
  259. package/src/scss/components/_dropdown.scss +4 -2
@@ -0,0 +1,2104 @@
1
+ /*! Buefy v0.9.28 | MIT License | github.com/buefy/buefy */
2
+ (function (global, factory) {
3
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
5
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Taginput = {}));
6
+ })(this, (function (exports) { 'use strict';
7
+
8
+ function ownKeys(e, r) {
9
+ var t = Object.keys(e);
10
+ if (Object.getOwnPropertySymbols) {
11
+ var o = Object.getOwnPropertySymbols(e);
12
+ r && (o = o.filter(function (r) {
13
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
14
+ })), t.push.apply(t, o);
15
+ }
16
+ return t;
17
+ }
18
+ function _objectSpread2(e) {
19
+ for (var r = 1; r < arguments.length; r++) {
20
+ var t = null != arguments[r] ? arguments[r] : {};
21
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
22
+ _defineProperty(e, r, t[r]);
23
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
24
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
25
+ });
26
+ }
27
+ return e;
28
+ }
29
+ function _toPrimitive(t, r) {
30
+ if ("object" != typeof t || !t) return t;
31
+ var e = t[Symbol.toPrimitive];
32
+ if (void 0 !== e) {
33
+ var i = e.call(t, r || "default");
34
+ if ("object" != typeof i) return i;
35
+ throw new TypeError("@@toPrimitive must return a primitive value.");
36
+ }
37
+ return ("string" === r ? String : Number)(t);
38
+ }
39
+ function _toPropertyKey(t) {
40
+ var i = _toPrimitive(t, "string");
41
+ return "symbol" == typeof i ? i : String(i);
42
+ }
43
+ function _typeof(o) {
44
+ "@babel/helpers - typeof";
45
+
46
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
47
+ return typeof o;
48
+ } : function (o) {
49
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
50
+ }, _typeof(o);
51
+ }
52
+ function _defineProperty(obj, key, value) {
53
+ key = _toPropertyKey(key);
54
+ if (key in obj) {
55
+ Object.defineProperty(obj, key, {
56
+ value: value,
57
+ enumerable: true,
58
+ configurable: true,
59
+ writable: true
60
+ });
61
+ } else {
62
+ obj[key] = value;
63
+ }
64
+ return obj;
65
+ }
66
+ function _objectWithoutPropertiesLoose(source, excluded) {
67
+ if (source == null) return {};
68
+ var target = {};
69
+ var sourceKeys = Object.keys(source);
70
+ var key, i;
71
+ for (i = 0; i < sourceKeys.length; i++) {
72
+ key = sourceKeys[i];
73
+ if (excluded.indexOf(key) >= 0) continue;
74
+ target[key] = source[key];
75
+ }
76
+ return target;
77
+ }
78
+ function _objectWithoutProperties(source, excluded) {
79
+ if (source == null) return {};
80
+ var target = _objectWithoutPropertiesLoose(source, excluded);
81
+ var key, i;
82
+ if (Object.getOwnPropertySymbols) {
83
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
84
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
85
+ key = sourceSymbolKeys[i];
86
+ if (excluded.indexOf(key) >= 0) continue;
87
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
88
+ target[key] = source[key];
89
+ }
90
+ }
91
+ return target;
92
+ }
93
+ function _toArray(arr) {
94
+ return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
95
+ }
96
+ function _toConsumableArray(arr) {
97
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
98
+ }
99
+ function _arrayWithoutHoles(arr) {
100
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
101
+ }
102
+ function _arrayWithHoles(arr) {
103
+ if (Array.isArray(arr)) return arr;
104
+ }
105
+ function _iterableToArray(iter) {
106
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
107
+ }
108
+ function _unsupportedIterableToArray(o, minLen) {
109
+ if (!o) return;
110
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
111
+ var n = Object.prototype.toString.call(o).slice(8, -1);
112
+ if (n === "Object" && o.constructor) n = o.constructor.name;
113
+ if (n === "Map" || n === "Set") return Array.from(o);
114
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
115
+ }
116
+ function _arrayLikeToArray(arr, len) {
117
+ if (len == null || len > arr.length) len = arr.length;
118
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
119
+ return arr2;
120
+ }
121
+ function _nonIterableSpread() {
122
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
123
+ }
124
+ function _nonIterableRest() {
125
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
126
+ }
127
+ function _createForOfIteratorHelper(o, allowArrayLike) {
128
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
129
+ if (!it) {
130
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
131
+ if (it) o = it;
132
+ var i = 0;
133
+ var F = function () {};
134
+ return {
135
+ s: F,
136
+ n: function () {
137
+ if (i >= o.length) return {
138
+ done: true
139
+ };
140
+ return {
141
+ done: false,
142
+ value: o[i++]
143
+ };
144
+ },
145
+ e: function (e) {
146
+ throw e;
147
+ },
148
+ f: F
149
+ };
150
+ }
151
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
152
+ }
153
+ var normalCompletion = true,
154
+ didErr = false,
155
+ err;
156
+ return {
157
+ s: function () {
158
+ it = it.call(o);
159
+ },
160
+ n: function () {
161
+ var step = it.next();
162
+ normalCompletion = step.done;
163
+ return step;
164
+ },
165
+ e: function (e) {
166
+ didErr = true;
167
+ err = e;
168
+ },
169
+ f: function () {
170
+ try {
171
+ if (!normalCompletion && it.return != null) it.return();
172
+ } finally {
173
+ if (didErr) throw err;
174
+ }
175
+ }
176
+ };
177
+ }
178
+
179
+ /**
180
+ * Get value of an object property/path even if it's nested
181
+ */
182
+ function getValueByPath(obj, path) {
183
+ return path.split('.').reduce(function (o, i) {
184
+ return o ? o[i] : null;
185
+ }, obj);
186
+ }
187
+
188
+ /**
189
+ * Merge function to replace Object.assign with deep merging possibility
190
+ */
191
+ var isObject = function isObject(item) {
192
+ return _typeof(item) === 'object' && !Array.isArray(item);
193
+ };
194
+ var mergeFn = function mergeFn(target, source) {
195
+ var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
196
+ if (deep || !Object.assign) {
197
+ var isDeep = function isDeep(prop) {
198
+ return isObject(source[prop]) && target !== null && target.hasOwnProperty(prop) && isObject(target[prop]);
199
+ };
200
+ var replaced = Object.getOwnPropertyNames(source).map(function (prop) {
201
+ return _defineProperty({}, prop, isDeep(prop) ? mergeFn(target[prop], source[prop], deep) : source[prop]);
202
+ }).reduce(function (a, b) {
203
+ return _objectSpread2(_objectSpread2({}, a), b);
204
+ }, {});
205
+ return _objectSpread2(_objectSpread2({}, target), replaced);
206
+ } else {
207
+ return Object.assign(target, source);
208
+ }
209
+ };
210
+ var merge = mergeFn;
211
+ function removeElement(el) {
212
+ if (typeof el.remove !== 'undefined') {
213
+ el.remove();
214
+ } else if (typeof el.parentNode !== 'undefined' && el.parentNode !== null) {
215
+ el.parentNode.removeChild(el);
216
+ }
217
+ }
218
+ function createAbsoluteElement(el) {
219
+ var root = document.createElement('div');
220
+ root.style.position = 'absolute';
221
+ root.style.left = '0px';
222
+ root.style.top = '0px';
223
+ root.style.width = '100%';
224
+ var wrapper = document.createElement('div');
225
+ root.appendChild(wrapper);
226
+ wrapper.appendChild(el);
227
+ document.body.appendChild(root);
228
+ return root;
229
+ }
230
+ function isVueComponent(c) {
231
+ return c && c._isVue;
232
+ }
233
+ function toCssWidth(width) {
234
+ return width === undefined ? null : isNaN(width) ? width : width + 'px';
235
+ }
236
+ function isCustomElement(vm) {
237
+ return 'shadowRoot' in vm.$root.$options;
238
+ }
239
+
240
+ //
241
+ //
242
+ //
243
+ //
244
+ //
245
+ //
246
+ //
247
+ //
248
+ //
249
+ //
250
+ //
251
+ //
252
+ //
253
+ //
254
+ //
255
+ //
256
+ //
257
+ //
258
+ //
259
+ //
260
+ //
261
+ //
262
+ //
263
+ //
264
+ //
265
+ //
266
+ //
267
+ //
268
+ //
269
+ //
270
+ //
271
+ //
272
+ //
273
+ //
274
+ //
275
+ //
276
+ //
277
+ //
278
+ //
279
+ //
280
+ //
281
+ //
282
+ //
283
+ //
284
+ //
285
+ //
286
+ //
287
+ //
288
+ //
289
+ //
290
+ //
291
+ //
292
+ //
293
+ //
294
+ //
295
+ //
296
+ //
297
+ //
298
+ //
299
+ //
300
+ //
301
+ //
302
+ //
303
+ //
304
+ //
305
+
306
+ var script$4 = {
307
+ name: 'BTag',
308
+ props: {
309
+ attached: Boolean,
310
+ closable: Boolean,
311
+ type: [String, Object],
312
+ size: String,
313
+ rounded: Boolean,
314
+ disabled: Boolean,
315
+ ellipsis: Boolean,
316
+ tabstop: {
317
+ type: Boolean,
318
+ default: true
319
+ },
320
+ ariaCloseLabel: String,
321
+ icon: String,
322
+ iconType: String,
323
+ iconPack: String,
324
+ closeType: String,
325
+ closeIcon: String,
326
+ closeIconPack: String,
327
+ closeIconType: String
328
+ },
329
+ methods: {
330
+ /**
331
+ * Emit close event when delete button is clicked
332
+ * or delete key is pressed.
333
+ */
334
+ close: function close(event) {
335
+ if (this.disabled) return;
336
+ this.$emit('close', event);
337
+ },
338
+ /**
339
+ * Emit click event when tag is clicked.
340
+ */
341
+ click: function click(event) {
342
+ if (this.disabled) return;
343
+ this.$emit('click', event);
344
+ }
345
+ }
346
+ };
347
+
348
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
349
+ if (typeof shadowMode !== 'boolean') {
350
+ createInjectorSSR = createInjector;
351
+ createInjector = shadowMode;
352
+ shadowMode = false;
353
+ }
354
+ // Vue.extend constructor export interop.
355
+ const options = typeof script === 'function' ? script.options : script;
356
+ // render functions
357
+ if (template && template.render) {
358
+ options.render = template.render;
359
+ options.staticRenderFns = template.staticRenderFns;
360
+ options._compiled = true;
361
+ // functional template
362
+ if (isFunctionalTemplate) {
363
+ options.functional = true;
364
+ }
365
+ }
366
+ // scopedId
367
+ if (scopeId) {
368
+ options._scopeId = scopeId;
369
+ }
370
+ let hook;
371
+ if (moduleIdentifier) {
372
+ // server build
373
+ hook = function (context) {
374
+ // 2.3 injection
375
+ context =
376
+ context || // cached call
377
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
378
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
379
+ // 2.2 with runInNewContext: true
380
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
381
+ context = __VUE_SSR_CONTEXT__;
382
+ }
383
+ // inject component styles
384
+ if (style) {
385
+ style.call(this, createInjectorSSR(context));
386
+ }
387
+ // register component module identifier for async chunk inference
388
+ if (context && context._registeredComponents) {
389
+ context._registeredComponents.add(moduleIdentifier);
390
+ }
391
+ };
392
+ // used by ssr in case component is cached and beforeCreate
393
+ // never gets called
394
+ options._ssrRegister = hook;
395
+ }
396
+ else if (style) {
397
+ hook = shadowMode
398
+ ? function (context) {
399
+ style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
400
+ }
401
+ : function (context) {
402
+ style.call(this, createInjector(context));
403
+ };
404
+ }
405
+ if (hook) {
406
+ if (options.functional) {
407
+ // register for functional component in vue file
408
+ const originalRender = options.render;
409
+ options.render = function renderWithStyleInjection(h, context) {
410
+ hook.call(context);
411
+ return originalRender(h, context);
412
+ };
413
+ }
414
+ else {
415
+ // inject component registration as beforeCreate hook
416
+ const existing = options.beforeCreate;
417
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
418
+ }
419
+ }
420
+ return script;
421
+ }
422
+
423
+ /* script */
424
+ const __vue_script__$4 = script$4;
425
+
426
+ /* template */
427
+ var __vue_render__$4 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.attached && _vm.closable)?_c('div',{staticClass:"tags has-addons inline-tags"},[_c('span',{staticClass:"tag",class:[_vm.type, _vm.size, { 'is-rounded': _vm.rounded }]},[(_vm.icon)?_c('b-icon',{attrs:{"icon":_vm.icon,"size":_vm.size,"type":_vm.iconType,"pack":_vm.iconPack}}):_vm._e(),_c('span',{class:{ 'has-ellipsis': _vm.ellipsis },on:{"click":_vm.click}},[_vm._t("default")],2)],1),_c('a',{staticClass:"tag",class:[_vm.size,
428
+ _vm.closeType,
429
+ {'is-rounded': _vm.rounded},
430
+ _vm.closeIcon ? 'has-delete-icon' : 'is-delete'],attrs:{"role":"button","aria-label":_vm.ariaCloseLabel,"tabindex":_vm.tabstop ? 0 : false,"disabled":_vm.disabled},on:{"click":_vm.close,"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"delete",[8,46],$event.key,["Backspace","Delete","Del"])){ return null; }$event.preventDefault();return _vm.close($event)}}},[(_vm.closeIcon)?_c('b-icon',{attrs:{"custom-class":"","icon":_vm.closeIcon,"size":_vm.size,"type":_vm.closeIconType,"pack":_vm.closeIconPack}}):_vm._e()],1)]):_c('span',{staticClass:"tag",class:[_vm.type, _vm.size, { 'is-rounded': _vm.rounded }]},[(_vm.icon)?_c('b-icon',{attrs:{"icon":_vm.icon,"size":_vm.size,"type":_vm.iconType,"pack":_vm.iconPack}}):_vm._e(),_c('span',{class:{ 'has-ellipsis': _vm.ellipsis },on:{"click":_vm.click}},[_vm._t("default")],2),(_vm.closable)?_c('a',{staticClass:"delete is-small",class:_vm.closeType,attrs:{"role":"button","aria-label":_vm.ariaCloseLabel,"disabled":_vm.disabled,"tabindex":_vm.tabstop ? 0 : false},on:{"click":_vm.close,"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"delete",[8,46],$event.key,["Backspace","Delete","Del"])){ return null; }$event.preventDefault();return _vm.close($event)}}}):_vm._e()],1)};
431
+ var __vue_staticRenderFns__$4 = [];
432
+
433
+ /* style */
434
+ const __vue_inject_styles__$4 = undefined;
435
+ /* scoped */
436
+ const __vue_scope_id__$4 = undefined;
437
+ /* module identifier */
438
+ const __vue_module_identifier__$4 = undefined;
439
+ /* functional template */
440
+ const __vue_is_functional_template__$4 = false;
441
+ /* style inject */
442
+
443
+ /* style inject SSR */
444
+
445
+ /* style inject shadow dom */
446
+
447
+
448
+
449
+ const __vue_component__$4 = /*#__PURE__*/normalizeComponent(
450
+ { render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
451
+ __vue_inject_styles__$4,
452
+ __vue_script__$4,
453
+ __vue_scope_id__$4,
454
+ __vue_is_functional_template__$4,
455
+ __vue_module_identifier__$4,
456
+ false,
457
+ undefined,
458
+ undefined,
459
+ undefined
460
+ );
461
+
462
+ var Tag = __vue_component__$4;
463
+
464
+ var config = {
465
+ defaultContainerElement: null,
466
+ defaultIconPack: 'mdi',
467
+ defaultIconComponent: null,
468
+ defaultIconPrev: 'chevron-left',
469
+ defaultIconNext: 'chevron-right',
470
+ defaultLocale: undefined,
471
+ defaultDialogConfirmText: null,
472
+ defaultDialogCancelText: null,
473
+ defaultSnackbarDuration: 3500,
474
+ defaultSnackbarPosition: null,
475
+ defaultToastDuration: 2000,
476
+ defaultToastPosition: null,
477
+ defaultNotificationDuration: 2000,
478
+ defaultNotificationPosition: null,
479
+ defaultTooltipType: 'is-primary',
480
+ defaultTooltipDelay: null,
481
+ defaultTooltipCloseDelay: null,
482
+ defaultSidebarDelay: null,
483
+ defaultInputAutocomplete: 'on',
484
+ defaultDateFormatter: null,
485
+ defaultDateParser: null,
486
+ defaultDateCreator: null,
487
+ defaultTimeCreator: null,
488
+ defaultDayNames: null,
489
+ defaultMonthNames: null,
490
+ defaultFirstDayOfWeek: null,
491
+ defaultUnselectableDaysOfWeek: null,
492
+ defaultTimeFormatter: null,
493
+ defaultTimeParser: null,
494
+ defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
495
+ defaultModalScroll: null,
496
+ defaultDatepickerMobileNative: true,
497
+ defaultTimepickerMobileNative: true,
498
+ defaultTimepickerMobileModal: true,
499
+ defaultNoticeQueue: true,
500
+ defaultInputHasCounter: true,
501
+ defaultTaginputHasCounter: true,
502
+ defaultUseHtml5Validation: true,
503
+ defaultDropdownMobileModal: true,
504
+ defaultFieldLabelPosition: null,
505
+ defaultDatepickerYearsRange: [-100, 10],
506
+ defaultDatepickerNearbyMonthDays: true,
507
+ defaultDatepickerNearbySelectableMonthDays: false,
508
+ defaultDatepickerShowWeekNumber: false,
509
+ defaultDatepickerWeekNumberClickable: false,
510
+ defaultDatepickerMobileModal: true,
511
+ defaultTrapFocus: true,
512
+ defaultAutoFocus: true,
513
+ defaultButtonRounded: false,
514
+ defaultSwitchRounded: true,
515
+ defaultCarouselInterval: 3500,
516
+ defaultTabsExpanded: false,
517
+ defaultTabsAnimated: true,
518
+ defaultTabsType: null,
519
+ defaultStatusIcon: true,
520
+ defaultProgrammaticPromise: false,
521
+ defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
522
+ defaultImageWebpFallback: null,
523
+ defaultImageLazy: true,
524
+ defaultImageResponsive: true,
525
+ defaultImageRatio: null,
526
+ defaultImageSrcsetFormatter: null,
527
+ defaultBreadcrumbTag: 'a',
528
+ defaultBreadcrumbAlign: 'is-left',
529
+ defaultBreadcrumbSeparator: '',
530
+ defaultBreadcrumbSize: 'is-medium',
531
+ customIconPacks: null
532
+ };
533
+
534
+ var FormElementMixin = {
535
+ props: {
536
+ size: String,
537
+ expanded: Boolean,
538
+ loading: Boolean,
539
+ rounded: Boolean,
540
+ icon: String,
541
+ iconPack: String,
542
+ // Native options to use in HTML5 validation
543
+ autocomplete: String,
544
+ maxlength: [Number, String],
545
+ useHtml5Validation: {
546
+ type: Boolean,
547
+ default: function _default() {
548
+ return config.defaultUseHtml5Validation;
549
+ }
550
+ },
551
+ validationMessage: String,
552
+ locale: {
553
+ type: [String, Array],
554
+ default: function _default() {
555
+ return config.defaultLocale;
556
+ }
557
+ },
558
+ statusIcon: {
559
+ type: Boolean,
560
+ default: function _default() {
561
+ return config.defaultStatusIcon;
562
+ }
563
+ }
564
+ },
565
+ data: function data() {
566
+ return {
567
+ isValid: true,
568
+ isFocused: false,
569
+ newIconPack: this.iconPack || config.defaultIconPack
570
+ };
571
+ },
572
+ computed: {
573
+ /**
574
+ * Find parent Field, max 3 levels deep.
575
+ */
576
+ parentField: function parentField() {
577
+ var parent = this.$parent;
578
+ for (var i = 0; i < 3; i++) {
579
+ if (parent && !parent.$data._isField) {
580
+ parent = parent.$parent;
581
+ }
582
+ }
583
+ return parent;
584
+ },
585
+ /**
586
+ * Get the type prop from parent if it's a Field.
587
+ */
588
+ statusType: function statusType() {
589
+ var _ref = this.parentField || {},
590
+ newType = _ref.newType;
591
+ if (!newType) return;
592
+ if (typeof newType === 'string') {
593
+ return newType;
594
+ } else {
595
+ for (var key in newType) {
596
+ if (newType[key]) {
597
+ return key;
598
+ }
599
+ }
600
+ }
601
+ },
602
+ /**
603
+ * Get the message prop from parent if it's a Field.
604
+ */
605
+ statusMessage: function statusMessage() {
606
+ if (!this.parentField) return;
607
+ return this.parentField.newMessage || this.parentField.$slots.message;
608
+ },
609
+ /**
610
+ * Fix icon size for inputs, large was too big
611
+ */
612
+ iconSize: function iconSize() {
613
+ switch (this.size) {
614
+ case 'is-small':
615
+ return this.size;
616
+ case 'is-medium':
617
+ return;
618
+ case 'is-large':
619
+ return this.newIconPack === 'mdi' ? 'is-medium' : '';
620
+ }
621
+ }
622
+ },
623
+ methods: {
624
+ /**
625
+ * Focus method that work dynamically depending on the component.
626
+ */
627
+ focus: function focus() {
628
+ var el = this.getElement();
629
+ if (el === undefined) return;
630
+ this.$nextTick(function () {
631
+ if (el) el.focus();
632
+ });
633
+ },
634
+ onBlur: function onBlur($event) {
635
+ this.isFocused = false;
636
+ this.$emit('blur', $event);
637
+ this.checkHtml5Validity();
638
+ },
639
+ onFocus: function onFocus($event) {
640
+ this.isFocused = true;
641
+ this.$emit('focus', $event);
642
+ },
643
+ getElement: function getElement() {
644
+ var el = this.$refs[this.$data._elementRef];
645
+ while (isVueComponent(el)) {
646
+ el = el.$refs[el.$data._elementRef];
647
+ }
648
+ return el;
649
+ },
650
+ setInvalid: function setInvalid() {
651
+ var type = 'is-danger';
652
+ var message = this.validationMessage || this.getElement().validationMessage;
653
+ this.setValidity(type, message);
654
+ },
655
+ setValidity: function setValidity(type, message) {
656
+ var _this = this;
657
+ this.$nextTick(function () {
658
+ if (_this.parentField) {
659
+ // Set type only if not defined
660
+ if (!_this.parentField.type) {
661
+ _this.parentField.newType = type;
662
+ }
663
+ // Set message only if not defined
664
+ if (!_this.parentField.message) {
665
+ _this.parentField.newMessage = message;
666
+ }
667
+ }
668
+ });
669
+ },
670
+ /**
671
+ * Check HTML5 validation, set isValid property.
672
+ * If validation fail, send 'is-danger' type,
673
+ * and error message to parent if it's a Field.
674
+ */
675
+ checkHtml5Validity: function checkHtml5Validity() {
676
+ if (!this.useHtml5Validation) return;
677
+ var el = this.getElement();
678
+ if (el === undefined) return;
679
+ if (!el.checkValidity()) {
680
+ this.setInvalid();
681
+ this.isValid = false;
682
+ } else {
683
+ this.setValidity(null, null);
684
+ this.isValid = true;
685
+ }
686
+ return this.isValid;
687
+ }
688
+ }
689
+ };
690
+
691
+ var mdiIcons = {
692
+ sizes: {
693
+ 'default': 'mdi-24px',
694
+ 'is-small': null,
695
+ 'is-medium': 'mdi-36px',
696
+ 'is-large': 'mdi-48px'
697
+ },
698
+ iconPrefix: 'mdi-'
699
+ };
700
+ var faIcons = function faIcons() {
701
+ var faIconPrefix = config && config.defaultIconComponent ? '' : 'fa-';
702
+ return {
703
+ sizes: {
704
+ 'default': null,
705
+ 'is-small': null,
706
+ 'is-medium': faIconPrefix + 'lg',
707
+ 'is-large': faIconPrefix + '2x'
708
+ },
709
+ iconPrefix: faIconPrefix,
710
+ internalIcons: {
711
+ 'information': 'info-circle',
712
+ 'alert': 'exclamation-triangle',
713
+ 'alert-circle': 'exclamation-circle',
714
+ 'chevron-right': 'angle-right',
715
+ 'chevron-left': 'angle-left',
716
+ 'chevron-down': 'angle-down',
717
+ 'eye-off': 'eye-slash',
718
+ 'menu-down': 'caret-down',
719
+ 'menu-up': 'caret-up',
720
+ 'close-circle': 'times-circle'
721
+ }
722
+ };
723
+ };
724
+ var getIcons = function getIcons() {
725
+ var icons = {
726
+ mdi: mdiIcons,
727
+ fa: faIcons(),
728
+ fas: faIcons(),
729
+ far: faIcons(),
730
+ fad: faIcons(),
731
+ fab: faIcons(),
732
+ fal: faIcons(),
733
+ 'fa-solid': faIcons(),
734
+ 'fa-regular': faIcons(),
735
+ 'fa-light': faIcons(),
736
+ 'fa-thin': faIcons(),
737
+ 'fa-duotone': faIcons(),
738
+ 'fa-brands': faIcons()
739
+ };
740
+ if (config && config.customIconPacks) {
741
+ icons = merge(icons, config.customIconPacks, true);
742
+ }
743
+ return icons;
744
+ };
745
+ var getIcons$1 = getIcons;
746
+
747
+ var script$3 = {
748
+ name: 'BIcon',
749
+ props: {
750
+ type: [String, Object],
751
+ component: String,
752
+ pack: String,
753
+ icon: String,
754
+ size: String,
755
+ customSize: String,
756
+ customClass: String,
757
+ both: Boolean // This is used internally to show both MDI and FA icon
758
+ },
759
+ computed: {
760
+ iconConfig: function iconConfig() {
761
+ var allIcons = getIcons$1();
762
+ return allIcons[this.newPack];
763
+ },
764
+ iconPrefix: function iconPrefix() {
765
+ if (this.iconConfig && this.iconConfig.iconPrefix) {
766
+ return this.iconConfig.iconPrefix;
767
+ }
768
+ return '';
769
+ },
770
+ /**
771
+ * Internal icon name based on the pack.
772
+ * If pack is 'fa', gets the equivalent FA icon name of the MDI,
773
+ * internal icons are always MDI.
774
+ */
775
+ newIcon: function newIcon() {
776
+ return "".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon));
777
+ },
778
+ newPack: function newPack() {
779
+ return this.pack || config.defaultIconPack;
780
+ },
781
+ newType: function newType() {
782
+ if (!this.type) return;
783
+ var splitType = [];
784
+ if (typeof this.type === 'string') {
785
+ splitType = this.type.split('-');
786
+ } else {
787
+ for (var key in this.type) {
788
+ if (this.type[key]) {
789
+ splitType = key.split('-');
790
+ break;
791
+ }
792
+ }
793
+ }
794
+ if (splitType.length <= 1) return;
795
+ var _splitType = splitType,
796
+ _splitType2 = _toArray(_splitType),
797
+ type = _splitType2.slice(1);
798
+ return "has-text-".concat(type.join('-'));
799
+ },
800
+ newCustomSize: function newCustomSize() {
801
+ return this.customSize || this.customSizeByPack;
802
+ },
803
+ customSizeByPack: function customSizeByPack() {
804
+ if (this.iconConfig && this.iconConfig.sizes) {
805
+ if (this.size && this.iconConfig.sizes[this.size] !== undefined) {
806
+ return this.iconConfig.sizes[this.size];
807
+ } else if (this.iconConfig.sizes.default) {
808
+ return this.iconConfig.sizes.default;
809
+ }
810
+ }
811
+ return null;
812
+ },
813
+ useIconComponent: function useIconComponent() {
814
+ return this.component || config.defaultIconComponent;
815
+ }
816
+ },
817
+ methods: {
818
+ /**
819
+ * Equivalent icon name of the MDI.
820
+ */
821
+ getEquivalentIconOf: function getEquivalentIconOf(value) {
822
+ // Only transform the class if the both prop is set to true
823
+ if (!this.both) {
824
+ return value;
825
+ }
826
+ if (this.iconConfig && this.iconConfig.internalIcons && this.iconConfig.internalIcons[value]) {
827
+ return this.iconConfig.internalIcons[value];
828
+ }
829
+ return value;
830
+ }
831
+ }
832
+ };
833
+
834
+ /* script */
835
+ const __vue_script__$3 = script$3;
836
+
837
+ /* template */
838
+ var __vue_render__$3 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:"icon",class:[_vm.newType, _vm.size]},[(!_vm.useIconComponent)?_c('i',{class:[_vm.newPack, _vm.newIcon, _vm.newCustomSize, _vm.customClass]}):_c(_vm.useIconComponent,{tag:"component",class:[_vm.customClass],attrs:{"icon":[_vm.newPack, _vm.newIcon],"size":_vm.newCustomSize}})],1)};
839
+ var __vue_staticRenderFns__$3 = [];
840
+
841
+ /* style */
842
+ const __vue_inject_styles__$3 = undefined;
843
+ /* scoped */
844
+ const __vue_scope_id__$3 = undefined;
845
+ /* module identifier */
846
+ const __vue_module_identifier__$3 = undefined;
847
+ /* functional template */
848
+ const __vue_is_functional_template__$3 = false;
849
+ /* style inject */
850
+
851
+ /* style inject SSR */
852
+
853
+ /* style inject shadow dom */
854
+
855
+
856
+
857
+ const __vue_component__$3 = /*#__PURE__*/normalizeComponent(
858
+ { render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
859
+ __vue_inject_styles__$3,
860
+ __vue_script__$3,
861
+ __vue_scope_id__$3,
862
+ __vue_is_functional_template__$3,
863
+ __vue_module_identifier__$3,
864
+ false,
865
+ undefined,
866
+ undefined,
867
+ undefined
868
+ );
869
+
870
+ var Icon = __vue_component__$3;
871
+
872
+ var script$2 = {
873
+ name: 'BInput',
874
+ components: _defineProperty({}, Icon.name, Icon),
875
+ mixins: [FormElementMixin],
876
+ inheritAttrs: false,
877
+ props: {
878
+ value: [Number, String],
879
+ type: {
880
+ type: String,
881
+ default: 'text'
882
+ },
883
+ lazy: {
884
+ type: Boolean,
885
+ default: false
886
+ },
887
+ passwordReveal: Boolean,
888
+ iconClickable: Boolean,
889
+ hasCounter: {
890
+ type: Boolean,
891
+ default: function _default() {
892
+ return config.defaultInputHasCounter;
893
+ }
894
+ },
895
+ customClass: {
896
+ type: String,
897
+ default: ''
898
+ },
899
+ iconRight: String,
900
+ iconRightClickable: Boolean,
901
+ iconRightType: String
902
+ },
903
+ data: function data() {
904
+ return {
905
+ newValue: this.value,
906
+ newType: this.type,
907
+ newAutocomplete: this.autocomplete || config.defaultInputAutocomplete,
908
+ isPasswordVisible: false,
909
+ _elementRef: this.type === 'textarea' ? 'textarea' : 'input'
910
+ };
911
+ },
912
+ computed: {
913
+ computedValue: {
914
+ get: function get() {
915
+ return this.newValue;
916
+ },
917
+ set: function set(value) {
918
+ this.newValue = value;
919
+ this.$emit('input', value);
920
+ }
921
+ },
922
+ rootClasses: function rootClasses() {
923
+ return [this.iconPosition, this.size, {
924
+ 'is-expanded': this.expanded,
925
+ 'is-loading': this.loading,
926
+ 'is-clearfix': !this.hasMessage
927
+ }];
928
+ },
929
+ inputClasses: function inputClasses() {
930
+ return [this.statusType, this.size, {
931
+ 'is-rounded': this.rounded
932
+ }];
933
+ },
934
+ hasIconRight: function hasIconRight() {
935
+ return this.passwordReveal || this.loading || this.statusIcon && this.statusTypeIcon || this.iconRight;
936
+ },
937
+ rightIcon: function rightIcon() {
938
+ if (this.passwordReveal) {
939
+ return this.passwordVisibleIcon;
940
+ } else if (this.iconRight) {
941
+ return this.iconRight;
942
+ }
943
+ return this.statusTypeIcon;
944
+ },
945
+ rightIconType: function rightIconType() {
946
+ if (this.passwordReveal) {
947
+ return 'is-primary';
948
+ } else if (this.iconRight) {
949
+ return this.iconRightType || null;
950
+ }
951
+ return this.statusType;
952
+ },
953
+ /**
954
+ * Position of the icon or if it's both sides.
955
+ */
956
+ iconPosition: function iconPosition() {
957
+ var iconClasses = '';
958
+ if (this.icon) {
959
+ iconClasses += 'has-icons-left ';
960
+ }
961
+ if (this.hasIconRight) {
962
+ iconClasses += 'has-icons-right';
963
+ }
964
+ return iconClasses;
965
+ },
966
+ /**
967
+ * Icon name (MDI) based on the type.
968
+ */
969
+ statusTypeIcon: function statusTypeIcon() {
970
+ switch (this.statusType) {
971
+ case 'is-success':
972
+ return 'check';
973
+ case 'is-danger':
974
+ return 'alert-circle';
975
+ case 'is-info':
976
+ return 'information';
977
+ case 'is-warning':
978
+ return 'alert';
979
+ }
980
+ },
981
+ /**
982
+ * Check if have any message prop from parent if it's a Field.
983
+ */
984
+ hasMessage: function hasMessage() {
985
+ return !!this.statusMessage;
986
+ },
987
+ /**
988
+ * Current password-reveal icon name.
989
+ */
990
+ passwordVisibleIcon: function passwordVisibleIcon() {
991
+ return !this.isPasswordVisible ? 'eye' : 'eye-off';
992
+ },
993
+ /**
994
+ * Get value length
995
+ */
996
+ valueLength: function valueLength() {
997
+ if (typeof this.computedValue === 'string') {
998
+ return Array.from(this.computedValue).length;
999
+ } else if (typeof this.computedValue === 'number') {
1000
+ return this.computedValue.toString().length;
1001
+ }
1002
+ return 0;
1003
+ }
1004
+ },
1005
+ watch: {
1006
+ /**
1007
+ * When v-model is changed:
1008
+ * 1. Set internal value.
1009
+ * 2. Validate it if the value came from outside;
1010
+ * i.e., not equal to computedValue
1011
+ */
1012
+ value: function value(_value) {
1013
+ var _this = this;
1014
+ var fromOutside = this.computedValue != _value; // eslint-disable-line eqeqeq
1015
+ this.newValue = _value;
1016
+ if (fromOutside) {
1017
+ // validation must wait for DOM updated
1018
+ this.$nextTick(function () {
1019
+ !_this.isValid && _this.checkHtml5Validity();
1020
+ });
1021
+ }
1022
+ },
1023
+ type: function type(_type) {
1024
+ this.newType = _type;
1025
+ }
1026
+ },
1027
+ methods: {
1028
+ /**
1029
+ * Toggle the visibility of a password-reveal input
1030
+ * by changing the type and focus the input right away.
1031
+ */
1032
+ togglePasswordVisibility: function togglePasswordVisibility() {
1033
+ var _this2 = this;
1034
+ this.isPasswordVisible = !this.isPasswordVisible;
1035
+ this.newType = this.isPasswordVisible ? 'text' : 'password';
1036
+ this.$nextTick(function () {
1037
+ _this2.focus();
1038
+ });
1039
+ },
1040
+ iconClick: function iconClick(emit, event) {
1041
+ var _this3 = this;
1042
+ this.$emit(emit, event);
1043
+ this.$nextTick(function () {
1044
+ _this3.focus();
1045
+ });
1046
+ },
1047
+ rightIconClick: function rightIconClick(event) {
1048
+ if (this.passwordReveal) {
1049
+ this.togglePasswordVisibility();
1050
+ } else if (this.iconRightClickable) {
1051
+ this.iconClick('icon-right-click', event);
1052
+ }
1053
+ },
1054
+ onInput: function onInput(event) {
1055
+ if (!this.lazy) {
1056
+ var value = event.target.value;
1057
+ this.updateValue(value);
1058
+ }
1059
+ },
1060
+ onChange: function onChange(event) {
1061
+ if (this.lazy) {
1062
+ var value = event.target.value;
1063
+ this.updateValue(value);
1064
+ }
1065
+ },
1066
+ updateValue: function updateValue(value) {
1067
+ this.computedValue = value;
1068
+ !this.isValid && this.checkHtml5Validity();
1069
+ }
1070
+ }
1071
+ };
1072
+
1073
+ /* script */
1074
+ const __vue_script__$2 = script$2;
1075
+
1076
+ /* template */
1077
+ var __vue_render__$2 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"control",class:_vm.rootClasses},[(_vm.type !== 'textarea')?_c('input',_vm._b({ref:"input",staticClass:"input",class:[_vm.inputClasses, _vm.customClass],attrs:{"type":_vm.newType,"autocomplete":_vm.newAutocomplete,"maxlength":_vm.maxlength},domProps:{"value":_vm.computedValue},on:{"input":_vm.onInput,"change":_vm.onChange,"blur":_vm.onBlur,"focus":_vm.onFocus}},'input',_vm.$attrs,false)):_c('textarea',_vm._b({ref:"textarea",staticClass:"textarea",class:[_vm.inputClasses, _vm.customClass],attrs:{"maxlength":_vm.maxlength},domProps:{"value":_vm.computedValue},on:{"input":_vm.onInput,"change":_vm.onChange,"blur":_vm.onBlur,"focus":_vm.onFocus}},'textarea',_vm.$attrs,false)),(_vm.icon)?_c('b-icon',{staticClass:"is-left",class:{'is-clickable': _vm.iconClickable},attrs:{"icon":_vm.icon,"pack":_vm.iconPack,"size":_vm.iconSize},nativeOn:{"click":function($event){return _vm.iconClick('icon-click', $event)}}}):_vm._e(),(!_vm.loading && _vm.hasIconRight)?_c('b-icon',{staticClass:"is-right",class:{ 'is-clickable': _vm.passwordReveal || _vm.iconRightClickable },attrs:{"icon":_vm.rightIcon,"pack":_vm.iconPack,"size":_vm.iconSize,"type":_vm.rightIconType,"both":""},nativeOn:{"click":function($event){return _vm.rightIconClick($event)}}}):_vm._e(),(_vm.maxlength && _vm.hasCounter && _vm.type !== 'number')?_c('small',{staticClass:"help counter",class:{ 'is-invisible': !_vm.isFocused }},[_vm._v(" "+_vm._s(_vm.valueLength)+" / "+_vm._s(_vm.maxlength)+" ")]):_vm._e()],1)};
1078
+ var __vue_staticRenderFns__$2 = [];
1079
+
1080
+ /* style */
1081
+ const __vue_inject_styles__$2 = undefined;
1082
+ /* scoped */
1083
+ const __vue_scope_id__$2 = undefined;
1084
+ /* module identifier */
1085
+ const __vue_module_identifier__$2 = undefined;
1086
+ /* functional template */
1087
+ const __vue_is_functional_template__$2 = false;
1088
+ /* style inject */
1089
+
1090
+ /* style inject SSR */
1091
+
1092
+ /* style inject shadow dom */
1093
+
1094
+
1095
+
1096
+ const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
1097
+ { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
1098
+ __vue_inject_styles__$2,
1099
+ __vue_script__$2,
1100
+ __vue_scope_id__$2,
1101
+ __vue_is_functional_template__$2,
1102
+ __vue_module_identifier__$2,
1103
+ false,
1104
+ undefined,
1105
+ undefined,
1106
+ undefined
1107
+ );
1108
+
1109
+ var Input = __vue_component__$2;
1110
+
1111
+ var script$1 = {
1112
+ name: 'BAutocomplete',
1113
+ components: _defineProperty({}, Input.name, Input),
1114
+ mixins: [FormElementMixin],
1115
+ inheritAttrs: false,
1116
+ props: {
1117
+ value: [Number, String],
1118
+ data: {
1119
+ type: Array,
1120
+ default: function _default() {
1121
+ return [];
1122
+ }
1123
+ },
1124
+ field: {
1125
+ type: String,
1126
+ default: 'value'
1127
+ },
1128
+ keepFirst: Boolean,
1129
+ clearOnSelect: Boolean,
1130
+ openOnFocus: Boolean,
1131
+ customFormatter: Function,
1132
+ checkInfiniteScroll: Boolean,
1133
+ keepOpen: Boolean,
1134
+ selectOnClickOutside: Boolean,
1135
+ clearable: Boolean,
1136
+ maxHeight: [String, Number],
1137
+ dropdownPosition: {
1138
+ type: String,
1139
+ default: 'auto'
1140
+ },
1141
+ groupField: String,
1142
+ groupOptions: String,
1143
+ iconRight: String,
1144
+ iconRightClickable: Boolean,
1145
+ appendToBody: Boolean,
1146
+ type: {
1147
+ type: String,
1148
+ default: 'text'
1149
+ },
1150
+ confirmKeys: {
1151
+ type: Array,
1152
+ default: function _default() {
1153
+ return ['Tab', 'Enter'];
1154
+ }
1155
+ },
1156
+ selectableHeader: Boolean,
1157
+ selectableFooter: Boolean
1158
+ },
1159
+ data: function data() {
1160
+ return {
1161
+ selected: null,
1162
+ hovered: null,
1163
+ headerHovered: null,
1164
+ footerHovered: null,
1165
+ isActive: false,
1166
+ newValue: this.value,
1167
+ newAutocomplete: this.autocomplete || 'off',
1168
+ ariaAutocomplete: this.keepFirst ? 'both' : 'list',
1169
+ isListInViewportVertically: true,
1170
+ hasFocus: false,
1171
+ style: {},
1172
+ _isAutocomplete: true,
1173
+ _elementRef: 'input',
1174
+ _bodyEl: undefined,
1175
+ // Used to append to body
1176
+ timeOutID: null
1177
+ };
1178
+ },
1179
+ computed: {
1180
+ computedData: function computedData() {
1181
+ var _this = this;
1182
+ if (this.groupField) {
1183
+ if (this.groupOptions) {
1184
+ var newData = [];
1185
+ this.data.forEach(function (option) {
1186
+ var group = getValueByPath(option, _this.groupField);
1187
+ var items = getValueByPath(option, _this.groupOptions);
1188
+ newData.push({
1189
+ group: group,
1190
+ items: items
1191
+ });
1192
+ });
1193
+ return newData;
1194
+ } else {
1195
+ var tmp = {};
1196
+ this.data.forEach(function (option) {
1197
+ var group = getValueByPath(option, _this.groupField);
1198
+ if (!tmp[group]) tmp[group] = [];
1199
+ tmp[group].push(option);
1200
+ });
1201
+ var _newData = [];
1202
+ Object.keys(tmp).forEach(function (group) {
1203
+ _newData.push({
1204
+ group: group,
1205
+ items: tmp[group]
1206
+ });
1207
+ });
1208
+ return _newData;
1209
+ }
1210
+ }
1211
+ return [{
1212
+ items: this.data
1213
+ }];
1214
+ },
1215
+ isEmpty: function isEmpty() {
1216
+ if (!this.computedData) return true;
1217
+ return !this.computedData.some(function (element) {
1218
+ return element.items && element.items.length;
1219
+ });
1220
+ },
1221
+ /**
1222
+ * White-listed items to not close when clicked.
1223
+ * Add input, dropdown and all children.
1224
+ */
1225
+ whiteList: function whiteList() {
1226
+ var whiteList = [];
1227
+ whiteList.push(this.$refs.input.$el.querySelector('input'));
1228
+ whiteList.push(this.$refs.dropdown);
1229
+ // Add all children from dropdown
1230
+ if (this.$refs.dropdown !== undefined) {
1231
+ var children = this.$refs.dropdown.querySelectorAll('*');
1232
+ var _iterator = _createForOfIteratorHelper(children),
1233
+ _step;
1234
+ try {
1235
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1236
+ var child = _step.value;
1237
+ whiteList.push(child);
1238
+ }
1239
+ } catch (err) {
1240
+ _iterator.e(err);
1241
+ } finally {
1242
+ _iterator.f();
1243
+ }
1244
+ }
1245
+ if (this.$parent.$data._isTaginput) {
1246
+ // Add taginput container
1247
+ whiteList.push(this.$parent.$el);
1248
+ // Add .tag and .delete
1249
+ var tagInputChildren = this.$parent.$el.querySelectorAll('*');
1250
+ var _iterator2 = _createForOfIteratorHelper(tagInputChildren),
1251
+ _step2;
1252
+ try {
1253
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1254
+ var tagInputChild = _step2.value;
1255
+ whiteList.push(tagInputChild);
1256
+ }
1257
+ } catch (err) {
1258
+ _iterator2.e(err);
1259
+ } finally {
1260
+ _iterator2.f();
1261
+ }
1262
+ }
1263
+ return whiteList;
1264
+ },
1265
+ /**
1266
+ * Check if exists default slot
1267
+ */
1268
+ hasDefaultSlot: function hasDefaultSlot() {
1269
+ return !!this.$scopedSlots.default;
1270
+ },
1271
+ /**
1272
+ * Check if exists group slot
1273
+ */
1274
+ hasGroupSlot: function hasGroupSlot() {
1275
+ return !!this.$scopedSlots.group;
1276
+ },
1277
+ /**
1278
+ * Check if exists "empty" slot
1279
+ */
1280
+ hasEmptySlot: function hasEmptySlot() {
1281
+ return !!this.$slots.empty;
1282
+ },
1283
+ /**
1284
+ * Check if exists "header" slot
1285
+ */
1286
+ hasHeaderSlot: function hasHeaderSlot() {
1287
+ return !!this.$slots.header;
1288
+ },
1289
+ /**
1290
+ * Check if exists "footer" slot
1291
+ */
1292
+ hasFooterSlot: function hasFooterSlot() {
1293
+ return !!this.$slots.footer;
1294
+ },
1295
+ /**
1296
+ * Apply dropdownPosition property
1297
+ */
1298
+ isOpenedTop: function isOpenedTop() {
1299
+ return this.dropdownPosition === 'top' || this.dropdownPosition === 'auto' && !this.isListInViewportVertically;
1300
+ },
1301
+ newIconRight: function newIconRight() {
1302
+ if (this.clearable && this.newValue) {
1303
+ return 'close-circle';
1304
+ }
1305
+ return this.iconRight;
1306
+ },
1307
+ newIconRightClickable: function newIconRightClickable() {
1308
+ if (this.clearable) {
1309
+ return true;
1310
+ }
1311
+ return this.iconRightClickable;
1312
+ },
1313
+ contentStyle: function contentStyle() {
1314
+ return {
1315
+ maxHeight: toCssWidth(this.maxHeight)
1316
+ };
1317
+ }
1318
+ },
1319
+ watch: {
1320
+ /**
1321
+ * When dropdown is toggled, check the visibility to know when
1322
+ * to open upwards.
1323
+ */
1324
+ isActive: function isActive(active) {
1325
+ var _this2 = this;
1326
+ if (this.dropdownPosition === 'auto') {
1327
+ if (active) {
1328
+ this.calcDropdownInViewportVertical();
1329
+ } else {
1330
+ // Timeout to wait for the animation to finish before recalculating
1331
+ this.timeOutID = setTimeout(function () {
1332
+ _this2.calcDropdownInViewportVertical();
1333
+ }, 100);
1334
+ }
1335
+ }
1336
+ this.$nextTick(function () {
1337
+ _this2.$emit('active', active);
1338
+ });
1339
+ },
1340
+ /**
1341
+ * When checkInfiniteScroll property changes scroll event should be removed or added
1342
+ */
1343
+ checkInfiniteScroll: function checkInfiniteScroll(_checkInfiniteScroll) {
1344
+ if ((this.$refs.dropdown && this.$refs.dropdown.querySelector('.dropdown-content')) === false) return;
1345
+ var list = this.$refs.dropdown.querySelector('.dropdown-content');
1346
+ if (_checkInfiniteScroll === true) {
1347
+ list.addEventListener('scroll', this.checkIfReachedTheEndOfScroll);
1348
+ return;
1349
+ }
1350
+ list.removeEventListener('scroll', this.checkIfReachedTheEndOfScroll);
1351
+ },
1352
+ /**
1353
+ * When updating input's value
1354
+ * 1. Emit changes
1355
+ * 2. If value isn't the same as selected, set null
1356
+ * 3. Close dropdown if value is clear or else open it
1357
+ */
1358
+ newValue: function newValue(value) {
1359
+ this.$emit('input', value);
1360
+ // Check if selected is invalid
1361
+ var currentValue = this.getValue(this.selected);
1362
+ if (currentValue && currentValue !== value) {
1363
+ this.setSelected(null, false);
1364
+ }
1365
+ // Close dropdown if input is clear or else open it
1366
+ if (this.hasFocus && (!this.openOnFocus || value)) {
1367
+ this.isActive = !!value;
1368
+ }
1369
+ },
1370
+ /**
1371
+ * When v-model is changed:
1372
+ * 1. Update internal value.
1373
+ * 2. If it's invalid, validate again.
1374
+ */
1375
+ value: function value(_value) {
1376
+ this.newValue = _value;
1377
+ },
1378
+ /**
1379
+ * Select first option if "keep-first
1380
+ */
1381
+ data: function data() {
1382
+ var _this3 = this;
1383
+ // Keep first option always pre-selected
1384
+ if (this.keepFirst) {
1385
+ this.$nextTick(function () {
1386
+ if (_this3.isActive) {
1387
+ _this3.selectFirstOption(_this3.computedData);
1388
+ } else {
1389
+ _this3.setHovered(null);
1390
+ }
1391
+ });
1392
+ } else {
1393
+ if (this.hovered) {
1394
+ // reset hovered if list doesn't contain it
1395
+ var hoveredValue = this.getValue(this.hovered);
1396
+ var data = this.computedData.map(function (d) {
1397
+ return d.items;
1398
+ }).reduce(function (a, b) {
1399
+ return [].concat(_toConsumableArray(a), _toConsumableArray(b));
1400
+ }, []);
1401
+ if (!data.some(function (d) {
1402
+ return _this3.getValue(d) === hoveredValue;
1403
+ })) {
1404
+ this.setHovered(null);
1405
+ }
1406
+ }
1407
+ }
1408
+ }
1409
+ },
1410
+ methods: {
1411
+ /**
1412
+ * Set which option is currently hovered.
1413
+ */
1414
+ setHovered: function setHovered(option) {
1415
+ if (option === undefined) return;
1416
+ this.hovered = option;
1417
+ },
1418
+ /**
1419
+ * Set which option is currently selected, update v-model,
1420
+ * update input value and close dropdown.
1421
+ */
1422
+ setSelected: function setSelected(option) {
1423
+ var _this4 = this;
1424
+ var closeDropdown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1425
+ var event = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
1426
+ if (option === undefined) return;
1427
+ this.selected = option;
1428
+ this.$emit('select', this.selected, event);
1429
+ if (this.selected !== null) {
1430
+ if (this.clearOnSelect) {
1431
+ var input = this.$refs.input;
1432
+ input.newValue = '';
1433
+ input.$refs.input.value = '';
1434
+ } else {
1435
+ this.newValue = this.getValue(this.selected);
1436
+ }
1437
+ this.setHovered(null);
1438
+ }
1439
+ closeDropdown && this.$nextTick(function () {
1440
+ _this4.isActive = false;
1441
+ });
1442
+ this.checkValidity();
1443
+ },
1444
+ /**
1445
+ * Select first option
1446
+ */
1447
+ selectFirstOption: function selectFirstOption(computedData) {
1448
+ var _this5 = this;
1449
+ this.$nextTick(function () {
1450
+ var nonEmptyElements = computedData.filter(function (element) {
1451
+ return element.items && element.items.length;
1452
+ });
1453
+ if (nonEmptyElements.length) {
1454
+ var option = nonEmptyElements[0].items[0];
1455
+ _this5.setHovered(option);
1456
+ } else {
1457
+ _this5.setHovered(null);
1458
+ }
1459
+ });
1460
+ },
1461
+ keydown: function keydown(event) {
1462
+ var key = event.key; // cannot destructure preventDefault (https://stackoverflow.com/a/49616808/2774496)
1463
+ // prevent emit submit event
1464
+ if (key === 'Enter') event.preventDefault();
1465
+ // Close dropdown on Tab & no hovered
1466
+ if (key === 'Escape' || key === 'Tab') {
1467
+ this.isActive = false;
1468
+ }
1469
+ if (this.confirmKeys.indexOf(key) >= 0) {
1470
+ // If adding by comma, don't add the comma to the input
1471
+ if (key === ',') event.preventDefault();
1472
+ // Close dropdown on select by Tab
1473
+ var closeDropdown = !this.keepOpen || key === 'Tab';
1474
+ if (this.hovered === null) {
1475
+ // header and footer uses headerHovered && footerHovered. If header or footer
1476
+ // was selected then fire event otherwise just return so a value isn't selected
1477
+ this.checkIfHeaderOrFooterSelected(event, null, closeDropdown);
1478
+ return;
1479
+ }
1480
+ this.setSelected(this.hovered, closeDropdown, event);
1481
+ }
1482
+ },
1483
+ selectHeaderOrFoterByClick: function selectHeaderOrFoterByClick(event, origin) {
1484
+ this.checkIfHeaderOrFooterSelected(event, {
1485
+ origin: origin
1486
+ });
1487
+ },
1488
+ /**
1489
+ * Check if header or footer was selected.
1490
+ */
1491
+ checkIfHeaderOrFooterSelected: function checkIfHeaderOrFooterSelected(event, triggerClick) {
1492
+ var closeDropdown = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
1493
+ if (this.selectableHeader && (this.headerHovered || triggerClick && triggerClick.origin === 'header')) {
1494
+ this.$emit('select-header', event);
1495
+ this.headerHovered = false;
1496
+ if (triggerClick) this.setHovered(null);
1497
+ if (closeDropdown) this.isActive = false;
1498
+ }
1499
+ if (this.selectableFooter && (this.footerHovered || triggerClick && triggerClick.origin === 'footer')) {
1500
+ this.$emit('select-footer', event);
1501
+ this.footerHovered = false;
1502
+ if (triggerClick) this.setHovered(null);
1503
+ if (closeDropdown) this.isActive = false;
1504
+ }
1505
+ },
1506
+ /**
1507
+ * Close dropdown if clicked outside.
1508
+ */
1509
+ clickedOutside: function clickedOutside(event) {
1510
+ var target = isCustomElement(this) ? event.composedPath()[0] : event.target;
1511
+ if (!this.hasFocus && this.whiteList.indexOf(target) < 0) {
1512
+ if (this.keepFirst && this.hovered && this.selectOnClickOutside) {
1513
+ this.setSelected(this.hovered, true);
1514
+ } else {
1515
+ this.isActive = false;
1516
+ }
1517
+ }
1518
+ },
1519
+ /**
1520
+ * Return display text for the input.
1521
+ * If object, get value from path, or else just the value.
1522
+ */
1523
+ getValue: function getValue(option) {
1524
+ if (option === null) return;
1525
+ if (typeof this.customFormatter !== 'undefined') {
1526
+ return this.customFormatter(option);
1527
+ }
1528
+ return _typeof(option) === 'object' ? getValueByPath(option, this.field) : option;
1529
+ },
1530
+ /**
1531
+ * Check if the scroll list inside the dropdown
1532
+ * reached it's end.
1533
+ */
1534
+ checkIfReachedTheEndOfScroll: function checkIfReachedTheEndOfScroll() {
1535
+ var list = this.$refs.dropdown.querySelector('.dropdown-content');
1536
+ var footerHeight = this.hasFooterSlot ? list.querySelectorAll('div.dropdown-footer')[0].clientHeight : 0;
1537
+ if (list.clientHeight !== list.scrollHeight && list.scrollTop + list.parentElement.clientHeight + footerHeight >= list.scrollHeight) {
1538
+ this.$emit('infinite-scroll');
1539
+ }
1540
+ },
1541
+ /**
1542
+ * Calculate if the dropdown is vertically visible when activated,
1543
+ * otherwise it is openened upwards.
1544
+ */
1545
+ calcDropdownInViewportVertical: function calcDropdownInViewportVertical() {
1546
+ var _this6 = this;
1547
+ this.$nextTick(function () {
1548
+ /**
1549
+ * this.$refs.dropdown may be undefined
1550
+ * when Autocomplete is conditional rendered
1551
+ */
1552
+ if (_this6.$refs.dropdown === undefined) return;
1553
+ var rect = _this6.$refs.dropdown.getBoundingClientRect();
1554
+ _this6.isListInViewportVertically = rect.top >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight);
1555
+ if (_this6.appendToBody) {
1556
+ _this6.updateAppendToBody();
1557
+ }
1558
+ });
1559
+ },
1560
+ /**
1561
+ * Arrows keys listener.
1562
+ * If dropdown is active, set hovered option, or else just open.
1563
+ */
1564
+ keyArrows: function keyArrows(direction) {
1565
+ var sum = direction === 'down' ? 1 : -1;
1566
+ if (this.isActive) {
1567
+ var data = this.computedData.map(function (d) {
1568
+ return d.items;
1569
+ }).reduce(function (a, b) {
1570
+ return [].concat(_toConsumableArray(a), _toConsumableArray(b));
1571
+ }, []);
1572
+ if (this.hasHeaderSlot && this.selectableHeader) {
1573
+ data.unshift(undefined);
1574
+ }
1575
+ if (this.hasFooterSlot && this.selectableFooter) {
1576
+ data.push(undefined);
1577
+ }
1578
+ var index;
1579
+ if (this.headerHovered) {
1580
+ index = 0 + sum;
1581
+ } else if (this.footerHovered) {
1582
+ index = data.length - 1 + sum;
1583
+ } else {
1584
+ index = data.indexOf(this.hovered) + sum;
1585
+ }
1586
+ index = index > data.length - 1 ? data.length - 1 : index;
1587
+ index = index < 0 ? 0 : index;
1588
+ this.footerHovered = false;
1589
+ this.headerHovered = false;
1590
+ this.setHovered(data[index] !== undefined ? data[index] : null);
1591
+ if (this.hasFooterSlot && this.selectableFooter && index === data.length - 1) {
1592
+ this.footerHovered = true;
1593
+ }
1594
+ if (this.hasHeaderSlot && this.selectableHeader && index === 0) {
1595
+ this.headerHovered = true;
1596
+ }
1597
+ var list = this.$refs.dropdown.querySelector('.dropdown-content');
1598
+ var querySelectorText = 'a.dropdown-item:not(.is-disabled)';
1599
+ if (this.hasHeaderSlot && this.selectableHeader) {
1600
+ querySelectorText += ',div.dropdown-header';
1601
+ }
1602
+ if (this.hasFooterSlot && this.selectableFooter) {
1603
+ querySelectorText += ',div.dropdown-footer';
1604
+ }
1605
+ var element = list.querySelectorAll(querySelectorText)[index];
1606
+ if (!element) return;
1607
+ var visMin = list.scrollTop;
1608
+ var visMax = list.scrollTop + list.clientHeight - element.clientHeight;
1609
+ if (element.offsetTop < visMin) {
1610
+ list.scrollTop = element.offsetTop;
1611
+ } else if (element.offsetTop >= visMax) {
1612
+ list.scrollTop = element.offsetTop - list.clientHeight + element.clientHeight;
1613
+ }
1614
+ } else {
1615
+ this.isActive = true;
1616
+ }
1617
+ },
1618
+ /**
1619
+ * Focus listener.
1620
+ * If value is the same as selected, select all text.
1621
+ */
1622
+ focused: function focused(event) {
1623
+ if (this.getValue(this.selected) === this.newValue) {
1624
+ this.$el.querySelector('input').select();
1625
+ }
1626
+ if (this.openOnFocus) {
1627
+ this.isActive = true;
1628
+ if (this.keepFirst) {
1629
+ // If open on focus, update the hovered
1630
+ this.selectFirstOption(this.computedData);
1631
+ }
1632
+ }
1633
+ this.hasFocus = true;
1634
+ this.$emit('focus', event);
1635
+ },
1636
+ /**
1637
+ * Blur listener.
1638
+ */
1639
+ onBlur: function onBlur(event) {
1640
+ this.hasFocus = false;
1641
+ this.$emit('blur', event);
1642
+ },
1643
+ onInput: function onInput() {
1644
+ var currentValue = this.getValue(this.selected);
1645
+ if (currentValue && currentValue === this.newValue) return;
1646
+ this.$emit('typing', this.newValue);
1647
+ this.checkValidity();
1648
+ },
1649
+ rightIconClick: function rightIconClick(event) {
1650
+ if (this.clearable) {
1651
+ this.newValue = '';
1652
+ this.setSelected(null, false);
1653
+ if (this.openOnFocus) {
1654
+ this.$refs.input.$el.focus();
1655
+ }
1656
+ } else {
1657
+ this.$emit('icon-right-click', event);
1658
+ }
1659
+ },
1660
+ checkValidity: function checkValidity() {
1661
+ var _this7 = this;
1662
+ if (this.useHtml5Validation) {
1663
+ this.$nextTick(function () {
1664
+ _this7.checkHtml5Validity();
1665
+ });
1666
+ }
1667
+ },
1668
+ updateAppendToBody: function updateAppendToBody() {
1669
+ var dropdownMenu = this.$refs.dropdown;
1670
+ var trigger = this.$parent.$data._isTaginput ? this.$parent.$el : this.$refs.input.$el;
1671
+ if (dropdownMenu && trigger) {
1672
+ // update wrapper dropdown
1673
+ var root = this.$data._bodyEl;
1674
+ root.classList.forEach(function (item) {
1675
+ return root.classList.remove(item);
1676
+ });
1677
+ root.classList.add('autocomplete');
1678
+ root.classList.add('control');
1679
+ if (this.expandend) {
1680
+ root.classList.add('is-expandend');
1681
+ }
1682
+ var rect = trigger.getBoundingClientRect();
1683
+ var top = rect.top + window.scrollY;
1684
+ var left = rect.left + window.scrollX;
1685
+ if (!this.isOpenedTop) {
1686
+ top += trigger.clientHeight;
1687
+ } else {
1688
+ top -= dropdownMenu.clientHeight;
1689
+ }
1690
+ this.style = {
1691
+ position: 'absolute',
1692
+ top: "".concat(top, "px"),
1693
+ left: "".concat(left, "px"),
1694
+ width: "".concat(trigger.clientWidth, "px"),
1695
+ maxWidth: "".concat(trigger.clientWidth, "px"),
1696
+ zIndex: '99'
1697
+ };
1698
+ }
1699
+ }
1700
+ },
1701
+ created: function created() {
1702
+ if (typeof window !== 'undefined') {
1703
+ document.addEventListener('click', this.clickedOutside);
1704
+ if (this.dropdownPosition === 'auto') {
1705
+ window.addEventListener('resize', this.calcDropdownInViewportVertical);
1706
+ }
1707
+ }
1708
+ },
1709
+ mounted: function mounted() {
1710
+ if (this.checkInfiniteScroll && this.$refs.dropdown && this.$refs.dropdown.querySelector('.dropdown-content')) {
1711
+ var list = this.$refs.dropdown.querySelector('.dropdown-content');
1712
+ list.addEventListener('scroll', this.checkIfReachedTheEndOfScroll);
1713
+ }
1714
+ if (this.appendToBody) {
1715
+ this.$data._bodyEl = createAbsoluteElement(this.$refs.dropdown);
1716
+ this.updateAppendToBody();
1717
+ }
1718
+ },
1719
+ beforeDestroy: function beforeDestroy() {
1720
+ if (typeof window !== 'undefined') {
1721
+ document.removeEventListener('click', this.clickedOutside);
1722
+ if (this.dropdownPosition === 'auto') {
1723
+ window.removeEventListener('resize', this.calcDropdownInViewportVertical);
1724
+ }
1725
+ }
1726
+ if (this.checkInfiniteScroll && this.$refs.dropdown && this.$refs.dropdown.querySelector('.dropdown-content')) {
1727
+ var list = this.$refs.dropdown.querySelector('.dropdown-content');
1728
+ list.removeEventListener('scroll', this.checkIfReachedTheEndOfScroll);
1729
+ }
1730
+ if (this.appendToBody) {
1731
+ removeElement(this.$data._bodyEl);
1732
+ }
1733
+ clearTimeout(this.timeOutID);
1734
+ }
1735
+ };
1736
+
1737
+ /* script */
1738
+ const __vue_script__$1 = script$1;
1739
+
1740
+ /* template */
1741
+ var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"autocomplete control",class:{ 'is-expanded': _vm.expanded }},[_c('b-input',_vm._b({ref:"input",attrs:{"type":_vm.type,"size":_vm.size,"loading":_vm.loading,"rounded":_vm.rounded,"icon":_vm.icon,"icon-right":_vm.newIconRight,"icon-right-clickable":_vm.newIconRightClickable,"icon-pack":_vm.iconPack,"maxlength":_vm.maxlength,"autocomplete":_vm.newAutocomplete,"use-html5-validation":false,"aria-autocomplete":_vm.ariaAutocomplete},on:{"input":_vm.onInput,"focus":_vm.focused,"blur":_vm.onBlur,"icon-right-click":_vm.rightIconClick,"icon-click":function (event) { return _vm.$emit('icon-click', event); }},nativeOn:{"keydown":[function($event){return _vm.keydown($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }$event.preventDefault();return _vm.keyArrows('up')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }$event.preventDefault();return _vm.keyArrows('down')}]},model:{value:(_vm.newValue),callback:function ($$v) {_vm.newValue=$$v;},expression:"newValue"}},'b-input',_vm.$attrs,false)),_c('transition',{attrs:{"name":"fade"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive && (!_vm.isEmpty || _vm.hasEmptySlot || _vm.hasHeaderSlot || _vm.hasFooterSlot)),expression:"isActive && (!isEmpty || hasEmptySlot || hasHeaderSlot || hasFooterSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{ 'is-opened-top': _vm.isOpenedTop && !_vm.appendToBody },style:(_vm.style)},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"dropdown-content",style:(_vm.contentStyle)},[(_vm.hasHeaderSlot)?_c('div',{staticClass:"dropdown-item dropdown-header",class:{ 'is-hovered': _vm.headerHovered },attrs:{"role":"button","tabindex":"0"},on:{"click":function($event){return _vm.selectHeaderOrFoterByClick($event, 'header')}}},[_vm._t("header")],2):_vm._e(),_vm._l((_vm.computedData),function(element,groupindex){return [(element.group)?_c('div',{key:groupindex + 'group',staticClass:"dropdown-item"},[(_vm.hasGroupSlot)?_vm._t("group",null,{"group":element.group,"index":groupindex}):_c('span',{staticClass:"has-text-weight-bold"},[_vm._v(" "+_vm._s(element.group)+" ")])],2):_vm._e(),_vm._l((element.items),function(option,index){return _c('a',{key:groupindex + ':' + index,staticClass:"dropdown-item",class:{ 'is-hovered': option === _vm.hovered },attrs:{"role":"button","tabindex":"0"},on:{"click":function($event){$event.stopPropagation();return _vm.setSelected(option, !_vm.keepOpen, $event)}}},[(_vm.hasDefaultSlot)?_vm._t("default",null,{"option":option,"index":index}):_c('span',[_vm._v(" "+_vm._s(_vm.getValue(option, true))+" ")])],2)})]}),(_vm.isEmpty && _vm.hasEmptySlot)?_c('div',{staticClass:"dropdown-item is-disabled"},[_vm._t("empty")],2):_vm._e(),(_vm.hasFooterSlot)?_c('div',{staticClass:"dropdown-item dropdown-footer",class:{ 'is-hovered': _vm.footerHovered },attrs:{"role":"button","tabindex":"0"},on:{"click":function($event){return _vm.selectHeaderOrFoterByClick($event, 'footer')}}},[_vm._t("footer")],2):_vm._e()],2)])])],1)};
1742
+ var __vue_staticRenderFns__$1 = [];
1743
+
1744
+ /* style */
1745
+ const __vue_inject_styles__$1 = undefined;
1746
+ /* scoped */
1747
+ const __vue_scope_id__$1 = undefined;
1748
+ /* module identifier */
1749
+ const __vue_module_identifier__$1 = undefined;
1750
+ /* functional template */
1751
+ const __vue_is_functional_template__$1 = false;
1752
+ /* style inject */
1753
+
1754
+ /* style inject SSR */
1755
+
1756
+ /* style inject shadow dom */
1757
+
1758
+
1759
+
1760
+ const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
1761
+ { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
1762
+ __vue_inject_styles__$1,
1763
+ __vue_script__$1,
1764
+ __vue_scope_id__$1,
1765
+ __vue_is_functional_template__$1,
1766
+ __vue_module_identifier__$1,
1767
+ false,
1768
+ undefined,
1769
+ undefined,
1770
+ undefined
1771
+ );
1772
+
1773
+ var Autocomplete = __vue_component__$1;
1774
+
1775
+ var _excluded = ["input"];
1776
+ var script = {
1777
+ name: 'BTaginput',
1778
+ components: _defineProperty(_defineProperty({}, Autocomplete.name, Autocomplete), Tag.name, Tag),
1779
+ mixins: [FormElementMixin],
1780
+ inheritAttrs: false,
1781
+ props: {
1782
+ value: {
1783
+ type: Array,
1784
+ default: function _default() {
1785
+ return [];
1786
+ }
1787
+ },
1788
+ data: {
1789
+ type: Array,
1790
+ default: function _default() {
1791
+ return [];
1792
+ }
1793
+ },
1794
+ type: String,
1795
+ closeType: String,
1796
+ rounded: {
1797
+ type: Boolean,
1798
+ default: false
1799
+ },
1800
+ attached: {
1801
+ type: Boolean,
1802
+ default: false
1803
+ },
1804
+ maxtags: {
1805
+ type: [Number, String],
1806
+ required: false
1807
+ },
1808
+ hasCounter: {
1809
+ type: Boolean,
1810
+ default: function _default() {
1811
+ return config.defaultTaginputHasCounter;
1812
+ }
1813
+ },
1814
+ field: {
1815
+ type: String,
1816
+ default: 'value'
1817
+ },
1818
+ autocomplete: Boolean,
1819
+ groupField: String,
1820
+ groupOptions: String,
1821
+ nativeAutocomplete: String,
1822
+ openOnFocus: Boolean,
1823
+ keepOpen: {
1824
+ type: Boolean,
1825
+ default: true
1826
+ },
1827
+ keepFirst: Boolean,
1828
+ disabled: Boolean,
1829
+ ellipsis: Boolean,
1830
+ closable: {
1831
+ type: Boolean,
1832
+ default: true
1833
+ },
1834
+ ariaCloseLabel: String,
1835
+ confirmKeys: {
1836
+ type: Array,
1837
+ default: function _default() {
1838
+ return [',', 'Tab', 'Enter'];
1839
+ }
1840
+ },
1841
+ removeOnKeys: {
1842
+ type: Array,
1843
+ default: function _default() {
1844
+ return ['Backspace'];
1845
+ }
1846
+ },
1847
+ allowNew: Boolean,
1848
+ onPasteSeparators: {
1849
+ type: Array,
1850
+ default: function _default() {
1851
+ return [','];
1852
+ }
1853
+ },
1854
+ beforeAdding: {
1855
+ type: Function,
1856
+ default: function _default() {
1857
+ return true;
1858
+ }
1859
+ },
1860
+ allowDuplicates: {
1861
+ type: Boolean,
1862
+ default: false
1863
+ },
1864
+ checkInfiniteScroll: {
1865
+ type: Boolean,
1866
+ default: false
1867
+ },
1868
+ createTag: {
1869
+ type: Function,
1870
+ default: function _default(tag) {
1871
+ return tag;
1872
+ }
1873
+ },
1874
+ appendToBody: Boolean
1875
+ },
1876
+ data: function data() {
1877
+ return {
1878
+ tags: Array.isArray(this.value) ? this.value.slice(0) : this.value || [],
1879
+ newTag: '',
1880
+ isComposing: false,
1881
+ _elementRef: 'autocomplete',
1882
+ _isTaginput: true,
1883
+ requestID: null
1884
+ };
1885
+ },
1886
+ computed: {
1887
+ listeners: function listeners() {
1888
+ var _this$$listeners = this.$listeners;
1889
+ _this$$listeners.input;
1890
+ var listeners = _objectWithoutProperties(_this$$listeners, _excluded);
1891
+ return listeners;
1892
+ },
1893
+ rootClasses: function rootClasses() {
1894
+ return {
1895
+ 'is-expanded': this.expanded
1896
+ };
1897
+ },
1898
+ containerClasses: function containerClasses() {
1899
+ return {
1900
+ 'is-focused': this.isFocused,
1901
+ 'is-focusable': this.hasInput
1902
+ };
1903
+ },
1904
+ valueLength: function valueLength() {
1905
+ return this.newTag.trim().length;
1906
+ },
1907
+ hasDefaultSlot: function hasDefaultSlot() {
1908
+ return !!this.$scopedSlots.default;
1909
+ },
1910
+ hasEmptySlot: function hasEmptySlot() {
1911
+ return !!this.$slots.empty;
1912
+ },
1913
+ hasHeaderSlot: function hasHeaderSlot() {
1914
+ return !!this.$slots.header;
1915
+ },
1916
+ hasFooterSlot: function hasFooterSlot() {
1917
+ return !!this.$slots.footer;
1918
+ },
1919
+ /**
1920
+ * Show the input field if a maxtags hasn't been set or reached.
1921
+ */
1922
+ hasInput: function hasInput() {
1923
+ return this.maxtags == null || this.maxtags === 1 || this.tagsLength < this.maxtags;
1924
+ },
1925
+ tagsLength: function tagsLength() {
1926
+ return this.tags.length;
1927
+ },
1928
+ /**
1929
+ * If Taginput has onPasteSeparators prop,
1930
+ * returning new RegExp used to split pasted string.
1931
+ */
1932
+ separatorsAsRegExp: function separatorsAsRegExp() {
1933
+ var sep = this.onPasteSeparators;
1934
+ return sep.length ? new RegExp(sep.map(function (s) {
1935
+ return s ? s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') : null;
1936
+ }).join('|'), 'g') : null;
1937
+ }
1938
+ },
1939
+ watch: {
1940
+ /**
1941
+ * When v-model is changed set internal value.
1942
+ */
1943
+ value: function value(_value) {
1944
+ this.tags = Array.isArray(_value) ? _value.slice(0) : _value || [];
1945
+ },
1946
+ hasInput: function hasInput() {
1947
+ if (!this.hasInput) this.onBlur();
1948
+ }
1949
+ },
1950
+ methods: {
1951
+ addTag: function addTag(tag) {
1952
+ var _this = this;
1953
+ var tagToAdd = tag || this.newTag.trim();
1954
+ if (tagToAdd) {
1955
+ if (!this.autocomplete) {
1956
+ var reg = this.separatorsAsRegExp;
1957
+ if (reg && tagToAdd.match(reg)) {
1958
+ tagToAdd.split(reg).map(function (t) {
1959
+ return t.trim();
1960
+ }).filter(function (t) {
1961
+ return t.length !== 0;
1962
+ }).map(this.addTag);
1963
+ return;
1964
+ }
1965
+ }
1966
+ // Add the tag input if it is not blank
1967
+ // or previously added (if not allowDuplicates).
1968
+ var add = !this.allowDuplicates ? this.tags.indexOf(tagToAdd) === -1 : true;
1969
+ if (add && this.beforeAdding(tagToAdd)) {
1970
+ if (this.maxtags === 1) {
1971
+ this.tags = []; // replace existing tag if only 1 is allowed
1972
+ }
1973
+ this.tags.push(this.createTag(tagToAdd));
1974
+ this.$emit('input', this.tags);
1975
+ this.$emit('add', tagToAdd);
1976
+ }
1977
+
1978
+ // after autocomplete events
1979
+ this.requestID = requestAnimationFrame(function () {
1980
+ _this.newTag = '';
1981
+ _this.$emit('typing', '');
1982
+ });
1983
+ }
1984
+ },
1985
+ getNormalizedTagText: function getNormalizedTagText(tag) {
1986
+ if (_typeof(tag) === 'object') {
1987
+ tag = getValueByPath(tag, this.field);
1988
+ }
1989
+ return "".concat(tag);
1990
+ },
1991
+ customOnBlur: function customOnBlur(event) {
1992
+ // Add tag on-blur if not select only
1993
+ if (!this.autocomplete) this.addTag();
1994
+ this.onBlur(event);
1995
+ },
1996
+ onSelect: function onSelect(option) {
1997
+ var _this2 = this;
1998
+ if (!option) return;
1999
+ this.addTag(option);
2000
+ this.$nextTick(function () {
2001
+ _this2.newTag = '';
2002
+ });
2003
+ },
2004
+ removeTag: function removeTag(index, event) {
2005
+ var tag = this.tags.splice(index, 1)[0];
2006
+ this.$emit('input', this.tags);
2007
+ this.$emit('remove', tag);
2008
+ if (event) event.stopPropagation();
2009
+ if (this.openOnFocus && this.$refs.autocomplete) {
2010
+ this.$refs.autocomplete.focus();
2011
+ }
2012
+ return tag;
2013
+ },
2014
+ removeLastTag: function removeLastTag() {
2015
+ if (this.tagsLength > 0) {
2016
+ this.removeTag(this.tagsLength - 1);
2017
+ }
2018
+ },
2019
+ keydown: function keydown(event) {
2020
+ var key = event.key; // cannot destructure preventDefault (https://stackoverflow.com/a/49616808/2774496)
2021
+ if (this.removeOnKeys.indexOf(key) !== -1 && !this.newTag.length) {
2022
+ this.removeLastTag();
2023
+ }
2024
+ // Stop if is to accept select only
2025
+ if (this.autocomplete && !this.allowNew) return;
2026
+ if (this.confirmKeys.indexOf(key) >= 0) {
2027
+ // Allow Tab to advance to next field regardless
2028
+ if (key !== 'Tab') event.preventDefault();
2029
+ if (key === 'Enter' && this.isComposing) return;
2030
+ this.addTag();
2031
+ }
2032
+ },
2033
+ onTyping: function onTyping(event) {
2034
+ this.$emit('typing', event.trim());
2035
+ },
2036
+ emitInfiniteScroll: function emitInfiniteScroll() {
2037
+ this.$emit('infinite-scroll');
2038
+ }
2039
+ },
2040
+ beforeDestroy: function beforeDestroy() {
2041
+ cancelAnimationFrame(this.requestID);
2042
+ }
2043
+ };
2044
+
2045
+ /* script */
2046
+ const __vue_script__ = script;
2047
+
2048
+ /* template */
2049
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"taginput control",class:_vm.rootClasses},[_c('div',{staticClass:"taginput-container",class:[_vm.statusType, _vm.size, _vm.containerClasses],attrs:{"disabled":_vm.disabled},on:{"click":function($event){_vm.hasInput && _vm.focus($event);}}},[_vm._t("selected",_vm._l((_vm.tags),function(tag,index){return _c('b-tag',{key:_vm.getNormalizedTagText(tag) + index,attrs:{"type":_vm.type,"close-type":_vm.closeType,"size":_vm.size,"rounded":_vm.rounded,"attached":_vm.attached,"tabstop":false,"disabled":_vm.disabled,"ellipsis":_vm.ellipsis,"closable":_vm.closable,"aria-close-label":_vm.ariaCloseLabel,"title":_vm.ellipsis && _vm.getNormalizedTagText(tag)},on:{"close":function($event){return _vm.removeTag(index, $event)}}},[_vm._t("tag",[_vm._v(" "+_vm._s(_vm.getNormalizedTagText(tag))+" ")],{"tag":tag})],2)}),{"tags":_vm.tags}),(_vm.hasInput)?_c('b-autocomplete',_vm._g(_vm._b({ref:"autocomplete",attrs:{"data":_vm.data,"field":_vm.field,"icon":_vm.icon,"icon-pack":_vm.iconPack,"maxlength":_vm.maxlength,"has-counter":false,"size":_vm.size,"disabled":_vm.disabled,"loading":_vm.loading,"autocomplete":_vm.nativeAutocomplete,"open-on-focus":_vm.openOnFocus,"keep-open":_vm.keepOpen,"keep-first":_vm.keepFirst,"group-field":_vm.groupField,"group-options":_vm.groupOptions,"use-html5-validation":_vm.useHtml5Validation,"check-infinite-scroll":_vm.checkInfiniteScroll,"append-to-body":_vm.appendToBody,"confirm-keys":_vm.confirmKeys},on:{"typing":_vm.onTyping,"focus":_vm.onFocus,"blur":_vm.customOnBlur,"select":_vm.onSelect,"infinite-scroll":_vm.emitInfiniteScroll},nativeOn:{"keydown":function($event){return _vm.keydown($event)},"compositionstart":function($event){_vm.isComposing = true;},"compositionend":function($event){_vm.isComposing = false;}},scopedSlots:_vm._u([(_vm.hasHeaderSlot)?{key:"header",fn:function(){return [_vm._t("header")]},proxy:true}:null,(_vm.hasDefaultSlot)?{key:"default",fn:function(props){return [_vm._t("default",null,{"option":props.option,"index":props.index})]}}:null,(_vm.hasEmptySlot)?{key:"empty",fn:function(){return [_vm._t("empty")]},proxy:true}:null,(_vm.hasFooterSlot)?{key:"footer",fn:function(){return [_vm._t("footer")]},proxy:true}:null],null,true),model:{value:(_vm.newTag),callback:function ($$v) {_vm.newTag=$$v;},expression:"newTag"}},'b-autocomplete',_vm.$attrs,false),_vm.listeners)):_vm._e()],2),(_vm.hasCounter && (_vm.maxtags || _vm.maxlength))?_c('small',{staticClass:"help counter"},[(_vm.maxlength && _vm.valueLength > 0)?[_vm._v(" "+_vm._s(_vm.valueLength)+" / "+_vm._s(_vm.maxlength)+" ")]:(_vm.maxtags)?[_vm._v(" "+_vm._s(_vm.tagsLength)+" / "+_vm._s(_vm.maxtags)+" ")]:_vm._e()],2):_vm._e()])};
2050
+ var __vue_staticRenderFns__ = [];
2051
+
2052
+ /* style */
2053
+ const __vue_inject_styles__ = undefined;
2054
+ /* scoped */
2055
+ const __vue_scope_id__ = undefined;
2056
+ /* module identifier */
2057
+ const __vue_module_identifier__ = undefined;
2058
+ /* functional template */
2059
+ const __vue_is_functional_template__ = false;
2060
+ /* style inject */
2061
+
2062
+ /* style inject SSR */
2063
+
2064
+ /* style inject shadow dom */
2065
+
2066
+
2067
+
2068
+ const __vue_component__ = /*#__PURE__*/normalizeComponent(
2069
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
2070
+ __vue_inject_styles__,
2071
+ __vue_script__,
2072
+ __vue_scope_id__,
2073
+ __vue_is_functional_template__,
2074
+ __vue_module_identifier__,
2075
+ false,
2076
+ undefined,
2077
+ undefined,
2078
+ undefined
2079
+ );
2080
+
2081
+ var Taginput = __vue_component__;
2082
+
2083
+ var use = function use(plugin) {
2084
+ if (typeof window !== 'undefined' && window.Vue) {
2085
+ window.Vue.use(plugin);
2086
+ }
2087
+ };
2088
+ var registerComponent = function registerComponent(Vue, component) {
2089
+ Vue.component(component.name, component);
2090
+ };
2091
+
2092
+ var Plugin = {
2093
+ install: function install(Vue) {
2094
+ registerComponent(Vue, Taginput);
2095
+ }
2096
+ };
2097
+ use(Plugin);
2098
+
2099
+ exports.BTaginput = Taginput;
2100
+ exports["default"] = Plugin;
2101
+
2102
+ Object.defineProperty(exports, '__esModule', { value: true });
2103
+
2104
+ }));