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,2843 @@
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.Timepicker = {}));
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 _toArray(arr) {
67
+ return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
68
+ }
69
+ function _toConsumableArray(arr) {
70
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
71
+ }
72
+ function _arrayWithoutHoles(arr) {
73
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
74
+ }
75
+ function _arrayWithHoles(arr) {
76
+ if (Array.isArray(arr)) return arr;
77
+ }
78
+ function _iterableToArray(iter) {
79
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
80
+ }
81
+ function _unsupportedIterableToArray(o, minLen) {
82
+ if (!o) return;
83
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
84
+ var n = Object.prototype.toString.call(o).slice(8, -1);
85
+ if (n === "Object" && o.constructor) n = o.constructor.name;
86
+ if (n === "Map" || n === "Set") return Array.from(o);
87
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
88
+ }
89
+ function _arrayLikeToArray(arr, len) {
90
+ if (len == null || len > arr.length) len = arr.length;
91
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
92
+ return arr2;
93
+ }
94
+ function _nonIterableSpread() {
95
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
96
+ }
97
+ function _nonIterableRest() {
98
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
99
+ }
100
+ function _createForOfIteratorHelper(o, allowArrayLike) {
101
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
102
+ if (!it) {
103
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
104
+ if (it) o = it;
105
+ var i = 0;
106
+ var F = function () {};
107
+ return {
108
+ s: F,
109
+ n: function () {
110
+ if (i >= o.length) return {
111
+ done: true
112
+ };
113
+ return {
114
+ done: false,
115
+ value: o[i++]
116
+ };
117
+ },
118
+ e: function (e) {
119
+ throw e;
120
+ },
121
+ f: F
122
+ };
123
+ }
124
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
125
+ }
126
+ var normalCompletion = true,
127
+ didErr = false,
128
+ err;
129
+ return {
130
+ s: function () {
131
+ it = it.call(o);
132
+ },
133
+ n: function () {
134
+ var step = it.next();
135
+ normalCompletion = step.done;
136
+ return step;
137
+ },
138
+ e: function (e) {
139
+ didErr = true;
140
+ err = e;
141
+ },
142
+ f: function () {
143
+ try {
144
+ if (!normalCompletion && it.return != null) it.return();
145
+ } finally {
146
+ if (didErr) throw err;
147
+ }
148
+ }
149
+ };
150
+ }
151
+
152
+ var config = {
153
+ defaultContainerElement: null,
154
+ defaultIconPack: 'mdi',
155
+ defaultIconComponent: null,
156
+ defaultIconPrev: 'chevron-left',
157
+ defaultIconNext: 'chevron-right',
158
+ defaultLocale: undefined,
159
+ defaultDialogConfirmText: null,
160
+ defaultDialogCancelText: null,
161
+ defaultSnackbarDuration: 3500,
162
+ defaultSnackbarPosition: null,
163
+ defaultToastDuration: 2000,
164
+ defaultToastPosition: null,
165
+ defaultNotificationDuration: 2000,
166
+ defaultNotificationPosition: null,
167
+ defaultTooltipType: 'is-primary',
168
+ defaultTooltipDelay: null,
169
+ defaultTooltipCloseDelay: null,
170
+ defaultSidebarDelay: null,
171
+ defaultInputAutocomplete: 'on',
172
+ defaultDateFormatter: null,
173
+ defaultDateParser: null,
174
+ defaultDateCreator: null,
175
+ defaultTimeCreator: null,
176
+ defaultDayNames: null,
177
+ defaultMonthNames: null,
178
+ defaultFirstDayOfWeek: null,
179
+ defaultUnselectableDaysOfWeek: null,
180
+ defaultTimeFormatter: null,
181
+ defaultTimeParser: null,
182
+ defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
183
+ defaultModalScroll: null,
184
+ defaultDatepickerMobileNative: true,
185
+ defaultTimepickerMobileNative: true,
186
+ defaultTimepickerMobileModal: true,
187
+ defaultNoticeQueue: true,
188
+ defaultInputHasCounter: true,
189
+ defaultTaginputHasCounter: true,
190
+ defaultUseHtml5Validation: true,
191
+ defaultDropdownMobileModal: true,
192
+ defaultFieldLabelPosition: null,
193
+ defaultDatepickerYearsRange: [-100, 10],
194
+ defaultDatepickerNearbyMonthDays: true,
195
+ defaultDatepickerNearbySelectableMonthDays: false,
196
+ defaultDatepickerShowWeekNumber: false,
197
+ defaultDatepickerWeekNumberClickable: false,
198
+ defaultDatepickerMobileModal: true,
199
+ defaultTrapFocus: true,
200
+ defaultAutoFocus: true,
201
+ defaultButtonRounded: false,
202
+ defaultSwitchRounded: true,
203
+ defaultCarouselInterval: 3500,
204
+ defaultTabsExpanded: false,
205
+ defaultTabsAnimated: true,
206
+ defaultTabsType: null,
207
+ defaultStatusIcon: true,
208
+ defaultProgrammaticPromise: false,
209
+ defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
210
+ defaultImageWebpFallback: null,
211
+ defaultImageLazy: true,
212
+ defaultImageResponsive: true,
213
+ defaultImageRatio: null,
214
+ defaultImageSrcsetFormatter: null,
215
+ defaultBreadcrumbTag: 'a',
216
+ defaultBreadcrumbAlign: 'is-left',
217
+ defaultBreadcrumbSeparator: '',
218
+ defaultBreadcrumbSize: 'is-medium',
219
+ customIconPacks: null
220
+ };
221
+
222
+ /**
223
+ * Checks if the flag is set
224
+ * @param val
225
+ * @param flag
226
+ * @returns {boolean}
227
+ */
228
+ function hasFlag(val, flag) {
229
+ return (val & flag) === flag;
230
+ }
231
+
232
+ /**
233
+ * Merge function to replace Object.assign with deep merging possibility
234
+ */
235
+ var isObject = function isObject(item) {
236
+ return _typeof(item) === 'object' && !Array.isArray(item);
237
+ };
238
+ var mergeFn = function mergeFn(target, source) {
239
+ var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
240
+ if (deep || !Object.assign) {
241
+ var isDeep = function isDeep(prop) {
242
+ return isObject(source[prop]) && target !== null && target.hasOwnProperty(prop) && isObject(target[prop]);
243
+ };
244
+ var replaced = Object.getOwnPropertyNames(source).map(function (prop) {
245
+ return _defineProperty({}, prop, isDeep(prop) ? mergeFn(target[prop], source[prop], deep) : source[prop]);
246
+ }).reduce(function (a, b) {
247
+ return _objectSpread2(_objectSpread2({}, a), b);
248
+ }, {});
249
+ return _objectSpread2(_objectSpread2({}, target), replaced);
250
+ } else {
251
+ return Object.assign(target, source);
252
+ }
253
+ };
254
+ var merge = mergeFn;
255
+
256
+ /**
257
+ * Mobile detection
258
+ * https://www.abeautifulsite.net/detecting-mobile-devices-with-javascript
259
+ */
260
+ var isMobile = {
261
+ Android: function Android() {
262
+ return typeof window !== 'undefined' && window.navigator.userAgent.match(/Android/i);
263
+ },
264
+ BlackBerry: function BlackBerry() {
265
+ return typeof window !== 'undefined' && window.navigator.userAgent.match(/BlackBerry/i);
266
+ },
267
+ iOS: function iOS() {
268
+ return typeof window !== 'undefined' && (window.navigator.userAgent.match(/iPhone|iPad|iPod/i) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);
269
+ },
270
+ Opera: function Opera() {
271
+ return typeof window !== 'undefined' && window.navigator.userAgent.match(/Opera Mini/i);
272
+ },
273
+ Windows: function Windows() {
274
+ return typeof window !== 'undefined' && window.navigator.userAgent.match(/IEMobile/i);
275
+ },
276
+ any: function any() {
277
+ return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows();
278
+ }
279
+ };
280
+ function removeElement(el) {
281
+ if (typeof el.remove !== 'undefined') {
282
+ el.remove();
283
+ } else if (typeof el.parentNode !== 'undefined' && el.parentNode !== null) {
284
+ el.parentNode.removeChild(el);
285
+ }
286
+ }
287
+ function createAbsoluteElement(el) {
288
+ var root = document.createElement('div');
289
+ root.style.position = 'absolute';
290
+ root.style.left = '0px';
291
+ root.style.top = '0px';
292
+ root.style.width = '100%';
293
+ var wrapper = document.createElement('div');
294
+ root.appendChild(wrapper);
295
+ wrapper.appendChild(el);
296
+ document.body.appendChild(root);
297
+ return root;
298
+ }
299
+ function isVueComponent(c) {
300
+ return c && c._isVue;
301
+ }
302
+ function toCssWidth(width) {
303
+ return width === undefined ? null : isNaN(width) ? width : width + 'px';
304
+ }
305
+
306
+ /**
307
+ * Accept a regex with group names and return an object
308
+ * ex. matchWithGroups(/((?!=<year>)\d+)\/((?!=<month>)\d+)\/((?!=<day>)\d+)/, '2000/12/25')
309
+ * will return { year: 2000, month: 12, day: 25 }
310
+ * @param {String} includes injections of (?!={groupname}) for each group
311
+ * @param {String} the string to run regex
312
+ * @return {Object} an object with a property for each group having the group's match as the value
313
+ */
314
+ function matchWithGroups(pattern, str) {
315
+ var matches = str.match(pattern);
316
+ return pattern
317
+ // get the pattern as a string
318
+ .toString()
319
+ // suss out the groups
320
+ .match(/<(.+?)>/g)
321
+ // remove the braces
322
+ .map(function (group) {
323
+ var groupMatches = group.match(/<(.+)>/);
324
+ if (!groupMatches || groupMatches.length <= 0) {
325
+ return null;
326
+ }
327
+ return group.match(/<(.+)>/)[1];
328
+ })
329
+ // create an object with a property for each group having the group's match as the value
330
+ .reduce(function (acc, curr, index, arr) {
331
+ if (matches && matches.length > index) {
332
+ acc[curr] = matches[index + 1];
333
+ } else {
334
+ acc[curr] = null;
335
+ }
336
+ return acc;
337
+ }, {});
338
+ }
339
+ function isCustomElement(vm) {
340
+ return 'shadowRoot' in vm.$root.$options;
341
+ }
342
+
343
+ var FormElementMixin = {
344
+ props: {
345
+ size: String,
346
+ expanded: Boolean,
347
+ loading: Boolean,
348
+ rounded: Boolean,
349
+ icon: String,
350
+ iconPack: String,
351
+ // Native options to use in HTML5 validation
352
+ autocomplete: String,
353
+ maxlength: [Number, String],
354
+ useHtml5Validation: {
355
+ type: Boolean,
356
+ default: function _default() {
357
+ return config.defaultUseHtml5Validation;
358
+ }
359
+ },
360
+ validationMessage: String,
361
+ locale: {
362
+ type: [String, Array],
363
+ default: function _default() {
364
+ return config.defaultLocale;
365
+ }
366
+ },
367
+ statusIcon: {
368
+ type: Boolean,
369
+ default: function _default() {
370
+ return config.defaultStatusIcon;
371
+ }
372
+ }
373
+ },
374
+ data: function data() {
375
+ return {
376
+ isValid: true,
377
+ isFocused: false,
378
+ newIconPack: this.iconPack || config.defaultIconPack
379
+ };
380
+ },
381
+ computed: {
382
+ /**
383
+ * Find parent Field, max 3 levels deep.
384
+ */
385
+ parentField: function parentField() {
386
+ var parent = this.$parent;
387
+ for (var i = 0; i < 3; i++) {
388
+ if (parent && !parent.$data._isField) {
389
+ parent = parent.$parent;
390
+ }
391
+ }
392
+ return parent;
393
+ },
394
+ /**
395
+ * Get the type prop from parent if it's a Field.
396
+ */
397
+ statusType: function statusType() {
398
+ var _ref = this.parentField || {},
399
+ newType = _ref.newType;
400
+ if (!newType) return;
401
+ if (typeof newType === 'string') {
402
+ return newType;
403
+ } else {
404
+ for (var key in newType) {
405
+ if (newType[key]) {
406
+ return key;
407
+ }
408
+ }
409
+ }
410
+ },
411
+ /**
412
+ * Get the message prop from parent if it's a Field.
413
+ */
414
+ statusMessage: function statusMessage() {
415
+ if (!this.parentField) return;
416
+ return this.parentField.newMessage || this.parentField.$slots.message;
417
+ },
418
+ /**
419
+ * Fix icon size for inputs, large was too big
420
+ */
421
+ iconSize: function iconSize() {
422
+ switch (this.size) {
423
+ case 'is-small':
424
+ return this.size;
425
+ case 'is-medium':
426
+ return;
427
+ case 'is-large':
428
+ return this.newIconPack === 'mdi' ? 'is-medium' : '';
429
+ }
430
+ }
431
+ },
432
+ methods: {
433
+ /**
434
+ * Focus method that work dynamically depending on the component.
435
+ */
436
+ focus: function focus() {
437
+ var el = this.getElement();
438
+ if (el === undefined) return;
439
+ this.$nextTick(function () {
440
+ if (el) el.focus();
441
+ });
442
+ },
443
+ onBlur: function onBlur($event) {
444
+ this.isFocused = false;
445
+ this.$emit('blur', $event);
446
+ this.checkHtml5Validity();
447
+ },
448
+ onFocus: function onFocus($event) {
449
+ this.isFocused = true;
450
+ this.$emit('focus', $event);
451
+ },
452
+ getElement: function getElement() {
453
+ var el = this.$refs[this.$data._elementRef];
454
+ while (isVueComponent(el)) {
455
+ el = el.$refs[el.$data._elementRef];
456
+ }
457
+ return el;
458
+ },
459
+ setInvalid: function setInvalid() {
460
+ var type = 'is-danger';
461
+ var message = this.validationMessage || this.getElement().validationMessage;
462
+ this.setValidity(type, message);
463
+ },
464
+ setValidity: function setValidity(type, message) {
465
+ var _this = this;
466
+ this.$nextTick(function () {
467
+ if (_this.parentField) {
468
+ // Set type only if not defined
469
+ if (!_this.parentField.type) {
470
+ _this.parentField.newType = type;
471
+ }
472
+ // Set message only if not defined
473
+ if (!_this.parentField.message) {
474
+ _this.parentField.newMessage = message;
475
+ }
476
+ }
477
+ });
478
+ },
479
+ /**
480
+ * Check HTML5 validation, set isValid property.
481
+ * If validation fail, send 'is-danger' type,
482
+ * and error message to parent if it's a Field.
483
+ */
484
+ checkHtml5Validity: function checkHtml5Validity() {
485
+ if (!this.useHtml5Validation) return;
486
+ var el = this.getElement();
487
+ if (el === undefined) return;
488
+ if (!el.checkValidity()) {
489
+ this.setInvalid();
490
+ this.isValid = false;
491
+ } else {
492
+ this.setValidity(null, null);
493
+ this.isValid = true;
494
+ }
495
+ return this.isValid;
496
+ }
497
+ }
498
+ };
499
+
500
+ var AM = 'AM';
501
+ var PM = 'PM';
502
+ var HOUR_FORMAT_24 = '24';
503
+ var HOUR_FORMAT_12 = '12';
504
+ var defaultTimeFormatter = function defaultTimeFormatter(date, vm) {
505
+ return vm.dtf.format(date);
506
+ };
507
+ var defaultTimeParser = function defaultTimeParser(timeString, vm) {
508
+ if (timeString) {
509
+ var d = null;
510
+ if (vm.computedValue && !isNaN(vm.computedValue)) {
511
+ d = new Date(vm.computedValue);
512
+ } else {
513
+ d = vm.timeCreator();
514
+ d.setMilliseconds(0);
515
+ }
516
+ if (vm.dtf.formatToParts && typeof vm.dtf.formatToParts === 'function') {
517
+ var formatRegex = vm.dtf.formatToParts(d).map(function (part) {
518
+ if (part.type === 'literal') {
519
+ return part.value.replace(/ /g, '\\s?');
520
+ } else if (part.type === 'dayPeriod') {
521
+ return "((?!=<".concat(part.type, ">)(").concat(vm.amString, "|").concat(vm.pmString, "|").concat(AM, "|").concat(PM, "|").concat(AM.toLowerCase(), "|").concat(PM.toLowerCase(), ")?)");
522
+ }
523
+ return "((?!=<".concat(part.type, ">)\\d+)");
524
+ }).join('');
525
+ var timeGroups = matchWithGroups(formatRegex, timeString);
526
+
527
+ // We do a simple validation for the group.
528
+ // If it is not valid, it will fallback to Date.parse below
529
+ timeGroups.hour = timeGroups.hour ? parseInt(timeGroups.hour, 10) : null;
530
+ timeGroups.minute = timeGroups.minute ? parseInt(timeGroups.minute, 10) : null;
531
+ timeGroups.second = timeGroups.second ? parseInt(timeGroups.second, 10) : null;
532
+ if (timeGroups.hour && timeGroups.hour >= 0 && timeGroups.hour < 24 && timeGroups.minute && timeGroups.minute >= 0 && timeGroups.minute < 59) {
533
+ if (timeGroups.dayPeriod && (timeGroups.dayPeriod.toLowerCase() === vm.pmString.toLowerCase() || timeGroups.dayPeriod.toLowerCase() === PM.toLowerCase()) && timeGroups.hour < 12) {
534
+ timeGroups.hour += 12;
535
+ }
536
+ d.setHours(timeGroups.hour);
537
+ d.setMinutes(timeGroups.minute);
538
+ d.setSeconds(timeGroups.second || 0);
539
+ return d;
540
+ }
541
+ }
542
+
543
+ // Fallback if formatToParts is not supported or if we were not able to parse a valid date
544
+ var am = false;
545
+ if (vm.hourFormat === HOUR_FORMAT_12) {
546
+ var dateString12 = timeString.split(' ');
547
+ timeString = dateString12[0];
548
+ am = dateString12[1] === vm.amString || dateString12[1] === AM;
549
+ }
550
+ var time = timeString.split(':');
551
+ var hours = parseInt(time[0], 10);
552
+ var minutes = parseInt(time[1], 10);
553
+ var seconds = vm.enableSeconds ? parseInt(time[2], 10) : 0;
554
+ if (isNaN(hours) || hours < 0 || hours > 23 || vm.hourFormat === HOUR_FORMAT_12 && (hours < 1 || hours > 12) || isNaN(minutes) || minutes < 0 || minutes > 59) {
555
+ return null;
556
+ }
557
+ d.setSeconds(seconds);
558
+ d.setMinutes(minutes);
559
+ if (vm.hourFormat === HOUR_FORMAT_12) {
560
+ if (am && hours === 12) {
561
+ hours = 0;
562
+ } else if (!am && hours !== 12) {
563
+ hours += 12;
564
+ }
565
+ }
566
+ d.setHours(hours);
567
+ return new Date(d.getTime());
568
+ }
569
+ return null;
570
+ };
571
+ var TimepickerMixin = {
572
+ mixins: [FormElementMixin],
573
+ inheritAttrs: false,
574
+ props: {
575
+ value: Date,
576
+ inline: Boolean,
577
+ minTime: Date,
578
+ maxTime: Date,
579
+ placeholder: String,
580
+ editable: Boolean,
581
+ disabled: Boolean,
582
+ hourFormat: {
583
+ type: String,
584
+ validator: function validator(value) {
585
+ return value === HOUR_FORMAT_24 || value === HOUR_FORMAT_12;
586
+ }
587
+ },
588
+ incrementHours: {
589
+ type: Number,
590
+ default: 1
591
+ },
592
+ incrementMinutes: {
593
+ type: Number,
594
+ default: 1
595
+ },
596
+ incrementSeconds: {
597
+ type: Number,
598
+ default: 1
599
+ },
600
+ timeFormatter: {
601
+ type: Function,
602
+ default: function _default(date, vm) {
603
+ if (typeof config.defaultTimeFormatter === 'function') {
604
+ return config.defaultTimeFormatter(date);
605
+ } else {
606
+ return defaultTimeFormatter(date, vm);
607
+ }
608
+ }
609
+ },
610
+ timeParser: {
611
+ type: Function,
612
+ default: function _default(date, vm) {
613
+ if (typeof config.defaultTimeParser === 'function') {
614
+ return config.defaultTimeParser(date);
615
+ } else {
616
+ return defaultTimeParser(date, vm);
617
+ }
618
+ }
619
+ },
620
+ mobileNative: {
621
+ type: Boolean,
622
+ default: function _default() {
623
+ return config.defaultTimepickerMobileNative;
624
+ }
625
+ },
626
+ mobileModal: {
627
+ type: Boolean,
628
+ default: function _default() {
629
+ return config.defaultTimepickerMobileModal;
630
+ }
631
+ },
632
+ timeCreator: {
633
+ type: Function,
634
+ default: function _default() {
635
+ if (typeof config.defaultTimeCreator === 'function') {
636
+ return config.defaultTimeCreator();
637
+ } else {
638
+ return new Date();
639
+ }
640
+ }
641
+ },
642
+ position: String,
643
+ unselectableTimes: Array,
644
+ openOnFocus: Boolean,
645
+ enableSeconds: Boolean,
646
+ defaultMinutes: Number,
647
+ defaultSeconds: Number,
648
+ focusable: {
649
+ type: Boolean,
650
+ default: true
651
+ },
652
+ tzOffset: {
653
+ type: Number,
654
+ default: 0
655
+ },
656
+ appendToBody: Boolean,
657
+ resetOnMeridianChange: {
658
+ type: Boolean,
659
+ default: false
660
+ }
661
+ },
662
+ data: function data() {
663
+ return {
664
+ dateSelected: this.value,
665
+ hoursSelected: null,
666
+ minutesSelected: null,
667
+ secondsSelected: null,
668
+ meridienSelected: null,
669
+ _elementRef: 'input',
670
+ AM: AM,
671
+ PM: PM,
672
+ HOUR_FORMAT_24: HOUR_FORMAT_24,
673
+ HOUR_FORMAT_12: HOUR_FORMAT_12
674
+ };
675
+ },
676
+ computed: {
677
+ computedValue: {
678
+ get: function get() {
679
+ return this.dateSelected;
680
+ },
681
+ set: function set(value) {
682
+ this.dateSelected = value;
683
+ this.$emit('input', this.dateSelected);
684
+ }
685
+ },
686
+ localeOptions: function localeOptions() {
687
+ return new Intl.DateTimeFormat(this.locale, {
688
+ hour: 'numeric',
689
+ minute: 'numeric',
690
+ second: this.enableSeconds ? 'numeric' : undefined
691
+ }).resolvedOptions();
692
+ },
693
+ dtf: function dtf() {
694
+ return new Intl.DateTimeFormat(this.locale, {
695
+ hour: this.localeOptions.hour || 'numeric',
696
+ minute: this.localeOptions.minute || 'numeric',
697
+ second: this.enableSeconds ? this.localeOptions.second || 'numeric' : undefined,
698
+ // Fixes 12 hour display github.com/buefy/buefy/issues/3418
699
+ hourCycle: !this.isHourFormat24 ? 'h12' : 'h23'
700
+ });
701
+ },
702
+ newHourFormat: function newHourFormat() {
703
+ return this.hourFormat || (this.localeOptions.hour12 ? HOUR_FORMAT_12 : HOUR_FORMAT_24);
704
+ },
705
+ sampleTime: function sampleTime() {
706
+ var d = this.timeCreator();
707
+ d.setHours(10);
708
+ d.setSeconds(0);
709
+ d.setMinutes(0);
710
+ d.setMilliseconds(0);
711
+ return d;
712
+ },
713
+ hourLiteral: function hourLiteral() {
714
+ if (this.dtf.formatToParts && typeof this.dtf.formatToParts === 'function') {
715
+ var d = this.sampleTime;
716
+ var parts = this.dtf.formatToParts(d);
717
+ var literal = parts.find(function (part, idx) {
718
+ return idx > 0 && parts[idx - 1].type === 'hour';
719
+ });
720
+ if (literal) {
721
+ return literal.value;
722
+ }
723
+ }
724
+ return ':';
725
+ },
726
+ minuteLiteral: function minuteLiteral() {
727
+ if (this.dtf.formatToParts && typeof this.dtf.formatToParts === 'function') {
728
+ var d = this.sampleTime;
729
+ var parts = this.dtf.formatToParts(d);
730
+ var literal = parts.find(function (part, idx) {
731
+ return idx > 0 && parts[idx - 1].type === 'minute';
732
+ });
733
+ if (literal) {
734
+ return literal.value;
735
+ }
736
+ }
737
+ return ':';
738
+ },
739
+ secondLiteral: function secondLiteral() {
740
+ if (this.dtf.formatToParts && typeof this.dtf.formatToParts === 'function') {
741
+ var d = this.sampleTime;
742
+ var parts = this.dtf.formatToParts(d);
743
+ var literal = parts.find(function (part, idx) {
744
+ return idx > 0 && parts[idx - 1].type === 'second';
745
+ });
746
+ if (literal) {
747
+ return literal.value;
748
+ }
749
+ }
750
+ },
751
+ amString: function amString() {
752
+ if (this.dtf.formatToParts && typeof this.dtf.formatToParts === 'function') {
753
+ var d = this.sampleTime;
754
+ d.setHours(10);
755
+ var dayPeriod = this.dtf.formatToParts(d).find(function (part) {
756
+ return part.type === 'dayPeriod';
757
+ });
758
+ if (dayPeriod) {
759
+ return dayPeriod.value;
760
+ }
761
+ }
762
+ return AM;
763
+ },
764
+ pmString: function pmString() {
765
+ if (this.dtf.formatToParts && typeof this.dtf.formatToParts === 'function') {
766
+ var d = this.sampleTime;
767
+ d.setHours(20);
768
+ var dayPeriod = this.dtf.formatToParts(d).find(function (part) {
769
+ return part.type === 'dayPeriod';
770
+ });
771
+ if (dayPeriod) {
772
+ return dayPeriod.value;
773
+ }
774
+ }
775
+ return PM;
776
+ },
777
+ hours: function hours() {
778
+ if (!this.incrementHours || this.incrementHours < 1) throw new Error('Hour increment cannot be null or less than 1.');
779
+ var hours = [];
780
+ var numberOfHours = this.isHourFormat24 ? 24 : 12;
781
+ for (var i = 0; i < numberOfHours; i += this.incrementHours) {
782
+ var value = i;
783
+ var label = value;
784
+ if (!this.isHourFormat24) {
785
+ value = i + 1;
786
+ label = value;
787
+ if (this.meridienSelected === this.amString) {
788
+ if (value === 12) {
789
+ value = 0;
790
+ }
791
+ } else if (this.meridienSelected === this.pmString) {
792
+ if (value !== 12) {
793
+ value += 12;
794
+ }
795
+ }
796
+ }
797
+ hours.push({
798
+ label: this.formatNumber(label),
799
+ value: value
800
+ });
801
+ }
802
+ return hours;
803
+ },
804
+ minutes: function minutes() {
805
+ if (!this.incrementMinutes || this.incrementMinutes < 1) throw new Error('Minute increment cannot be null or less than 1.');
806
+ var minutes = [];
807
+ for (var i = 0; i < 60; i += this.incrementMinutes) {
808
+ minutes.push({
809
+ label: this.formatNumber(i, true),
810
+ value: i
811
+ });
812
+ }
813
+ return minutes;
814
+ },
815
+ seconds: function seconds() {
816
+ if (!this.incrementSeconds || this.incrementSeconds < 1) throw new Error('Second increment cannot be null or less than 1.');
817
+ var seconds = [];
818
+ for (var i = 0; i < 60; i += this.incrementSeconds) {
819
+ seconds.push({
820
+ label: this.formatNumber(i, true),
821
+ value: i
822
+ });
823
+ }
824
+ return seconds;
825
+ },
826
+ meridiens: function meridiens() {
827
+ return [this.amString, this.pmString];
828
+ },
829
+ isMobile: function isMobile$1() {
830
+ return this.mobileNative && isMobile.any();
831
+ },
832
+ isHourFormat24: function isHourFormat24() {
833
+ return this.newHourFormat === HOUR_FORMAT_24;
834
+ }
835
+ },
836
+ watch: {
837
+ hourFormat: function hourFormat() {
838
+ if (this.hoursSelected !== null) {
839
+ this.meridienSelected = this.hoursSelected >= 12 ? this.pmString : this.amString;
840
+ }
841
+ },
842
+ locale: function locale() {
843
+ // see updateInternalState default
844
+ if (!this.value) {
845
+ this.meridienSelected = this.amString;
846
+ }
847
+ },
848
+ /**
849
+ * When v-model is changed:
850
+ * 1. Update internal value.
851
+ * 2. If it's invalid, validate again.
852
+ */
853
+ value: {
854
+ handler: function handler(value) {
855
+ this.updateInternalState(value);
856
+ !this.isValid && this.$refs.input.checkHtml5Validity();
857
+ },
858
+ immediate: true
859
+ }
860
+ },
861
+ methods: {
862
+ onMeridienChange: function onMeridienChange(value) {
863
+ if (this.hoursSelected !== null && this.resetOnMeridianChange) {
864
+ this.hoursSelected = null;
865
+ this.minutesSelected = null;
866
+ this.secondsSelected = null;
867
+ this.computedValue = null;
868
+ } else if (this.hoursSelected !== null) {
869
+ if (value === this.pmString) {
870
+ this.hoursSelected += 12;
871
+ } else if (value === this.amString) {
872
+ this.hoursSelected -= 12;
873
+ }
874
+ }
875
+ this.updateDateSelected(this.hoursSelected, this.minutesSelected, this.enableSeconds ? this.secondsSelected : 0, value);
876
+ },
877
+ onHoursChange: function onHoursChange(value) {
878
+ if (!this.minutesSelected && typeof this.defaultMinutes !== 'undefined') {
879
+ this.minutesSelected = this.defaultMinutes;
880
+ }
881
+ if (!this.secondsSelected && typeof this.defaultSeconds !== 'undefined') {
882
+ this.secondsSelected = this.defaultSeconds;
883
+ }
884
+ this.updateDateSelected(parseInt(value, 10), this.minutesSelected, this.enableSeconds ? this.secondsSelected : 0, this.meridienSelected);
885
+ },
886
+ onMinutesChange: function onMinutesChange(value) {
887
+ if (!this.secondsSelected && this.defaultSeconds) {
888
+ this.secondsSelected = this.defaultSeconds;
889
+ }
890
+ this.updateDateSelected(this.hoursSelected, parseInt(value, 10), this.enableSeconds ? this.secondsSelected : 0, this.meridienSelected);
891
+ },
892
+ onSecondsChange: function onSecondsChange(value) {
893
+ this.updateDateSelected(this.hoursSelected, this.minutesSelected, parseInt(value, 10), this.meridienSelected);
894
+ },
895
+ updateDateSelected: function updateDateSelected(hours, minutes, seconds, meridiens) {
896
+ if (hours != null && minutes != null && (!this.isHourFormat24 && meridiens !== null || this.isHourFormat24)) {
897
+ var time = null;
898
+ if (this.computedValue && !isNaN(this.computedValue)) {
899
+ time = new Date(this.computedValue);
900
+ } else {
901
+ time = this.timeCreator();
902
+ time.setMilliseconds(0);
903
+ }
904
+ time.setHours(hours);
905
+ time.setMinutes(minutes);
906
+ time.setSeconds(seconds);
907
+ if (!isNaN(time.getTime())) this.computedValue = new Date(time.getTime());
908
+ }
909
+ },
910
+ updateInternalState: function updateInternalState(value) {
911
+ if (value) {
912
+ this.hoursSelected = value.getHours();
913
+ this.minutesSelected = value.getMinutes();
914
+ this.secondsSelected = value.getSeconds();
915
+ this.meridienSelected = value.getHours() >= 12 ? this.pmString : this.amString;
916
+ } else {
917
+ this.hoursSelected = null;
918
+ this.minutesSelected = null;
919
+ this.secondsSelected = null;
920
+ this.meridienSelected = this.amString;
921
+ }
922
+ this.dateSelected = value;
923
+ },
924
+ isHourDisabled: function isHourDisabled(hour) {
925
+ var _this = this;
926
+ var disabled = false;
927
+ if (this.minTime) {
928
+ var minHours = this.minTime.getHours();
929
+ var noMinutesAvailable = this.minutes.every(function (minute) {
930
+ return _this.isMinuteDisabledForHour(hour, minute.value);
931
+ });
932
+ disabled = hour < minHours || noMinutesAvailable;
933
+ }
934
+ if (this.maxTime) {
935
+ if (!disabled) {
936
+ var maxHours = this.maxTime.getHours();
937
+ disabled = hour > maxHours;
938
+ }
939
+ }
940
+ if (this.unselectableTimes) {
941
+ if (!disabled) {
942
+ var unselectable = this.unselectableTimes.filter(function (time) {
943
+ if (_this.enableSeconds && _this.secondsSelected !== null) {
944
+ return time.getHours() === hour && time.getMinutes() === _this.minutesSelected && time.getSeconds() === _this.secondsSelected;
945
+ } else if (_this.minutesSelected !== null) {
946
+ return time.getHours() === hour && time.getMinutes() === _this.minutesSelected;
947
+ }
948
+ return false;
949
+ });
950
+ if (unselectable.length > 0) {
951
+ disabled = true;
952
+ } else {
953
+ disabled = this.minutes.every(function (minute) {
954
+ return _this.unselectableTimes.filter(function (time) {
955
+ return time.getHours() === hour && time.getMinutes() === minute.value;
956
+ }).length > 0;
957
+ });
958
+ }
959
+ }
960
+ }
961
+ return disabled;
962
+ },
963
+ isMinuteDisabledForHour: function isMinuteDisabledForHour(hour, minute) {
964
+ var disabled = false;
965
+ if (this.minTime) {
966
+ var minHours = this.minTime.getHours();
967
+ var minMinutes = this.minTime.getMinutes();
968
+ disabled = hour === minHours && minute < minMinutes;
969
+ }
970
+ if (this.maxTime) {
971
+ if (!disabled) {
972
+ var maxHours = this.maxTime.getHours();
973
+ var maxMinutes = this.maxTime.getMinutes();
974
+ disabled = hour === maxHours && minute > maxMinutes;
975
+ }
976
+ }
977
+ return disabled;
978
+ },
979
+ isMinuteDisabled: function isMinuteDisabled(minute) {
980
+ var _this2 = this;
981
+ var disabled = false;
982
+ if (this.hoursSelected !== null) {
983
+ if (this.isHourDisabled(this.hoursSelected)) {
984
+ disabled = true;
985
+ } else {
986
+ disabled = this.isMinuteDisabledForHour(this.hoursSelected, minute);
987
+ }
988
+ if (this.unselectableTimes) {
989
+ if (!disabled) {
990
+ var unselectable = this.unselectableTimes.filter(function (time) {
991
+ if (_this2.enableSeconds && _this2.secondsSelected !== null) {
992
+ return time.getHours() === _this2.hoursSelected && time.getMinutes() === minute && time.getSeconds() === _this2.secondsSelected;
993
+ } else {
994
+ return time.getHours() === _this2.hoursSelected && time.getMinutes() === minute;
995
+ }
996
+ });
997
+ disabled = unselectable.length > 0;
998
+ }
999
+ }
1000
+ }
1001
+ return disabled;
1002
+ },
1003
+ isSecondDisabled: function isSecondDisabled(second) {
1004
+ var _this3 = this;
1005
+ var disabled = false;
1006
+ if (this.minutesSelected !== null) {
1007
+ if (this.isMinuteDisabled(this.minutesSelected)) {
1008
+ disabled = true;
1009
+ } else {
1010
+ if (this.minTime) {
1011
+ var minHours = this.minTime.getHours();
1012
+ var minMinutes = this.minTime.getMinutes();
1013
+ var minSeconds = this.minTime.getSeconds();
1014
+ disabled = this.hoursSelected === minHours && this.minutesSelected === minMinutes && second < minSeconds;
1015
+ }
1016
+ if (this.maxTime) {
1017
+ if (!disabled) {
1018
+ var maxHours = this.maxTime.getHours();
1019
+ var maxMinutes = this.maxTime.getMinutes();
1020
+ var maxSeconds = this.maxTime.getSeconds();
1021
+ disabled = this.hoursSelected === maxHours && this.minutesSelected === maxMinutes && second > maxSeconds;
1022
+ }
1023
+ }
1024
+ }
1025
+ if (this.unselectableTimes) {
1026
+ if (!disabled) {
1027
+ var unselectable = this.unselectableTimes.filter(function (time) {
1028
+ return time.getHours() === _this3.hoursSelected && time.getMinutes() === _this3.minutesSelected && time.getSeconds() === second;
1029
+ });
1030
+ disabled = unselectable.length > 0;
1031
+ }
1032
+ }
1033
+ }
1034
+ return disabled;
1035
+ },
1036
+ /*
1037
+ * Parse string into date
1038
+ */
1039
+ onChange: function onChange(value) {
1040
+ var date = this.timeParser(value, this);
1041
+ this.updateInternalState(date);
1042
+ if (date && !isNaN(date)) {
1043
+ this.computedValue = date;
1044
+ } else {
1045
+ // Force refresh input value when not valid date
1046
+ this.computedValue = null;
1047
+ this.$refs.input.newValue = this.computedValue;
1048
+ }
1049
+ },
1050
+ /*
1051
+ * Toggle timepicker
1052
+ */
1053
+ toggle: function toggle(active) {
1054
+ if (this.$refs.dropdown) {
1055
+ this.$refs.dropdown.isActive = typeof active === 'boolean' ? active : !this.$refs.dropdown.isActive;
1056
+ }
1057
+ },
1058
+ /*
1059
+ * Close timepicker
1060
+ */
1061
+ close: function close() {
1062
+ this.toggle(false);
1063
+ },
1064
+ /*
1065
+ * Call default onFocus method and show timepicker
1066
+ */
1067
+ handleOnFocus: function handleOnFocus() {
1068
+ this.onFocus();
1069
+ if (this.openOnFocus) {
1070
+ this.toggle(true);
1071
+ }
1072
+ },
1073
+ /*
1074
+ * Format date into string 'HH-MM-SS'
1075
+ */
1076
+ formatHHMMSS: function formatHHMMSS(value) {
1077
+ var date = new Date(value);
1078
+ if (value && !isNaN(date)) {
1079
+ var hours = date.getHours();
1080
+ var minutes = date.getMinutes();
1081
+ var seconds = date.getSeconds();
1082
+ return this.formatNumber(hours, true) + ':' + this.formatNumber(minutes, true) + ':' + this.formatNumber(seconds, true);
1083
+ }
1084
+ return '';
1085
+ },
1086
+ /*
1087
+ * Parse time from string
1088
+ */
1089
+ onChangeNativePicker: function onChangeNativePicker(event) {
1090
+ var date = event.target.value;
1091
+ if (date) {
1092
+ var time = null;
1093
+ if (this.computedValue && !isNaN(this.computedValue)) {
1094
+ time = new Date(this.computedValue);
1095
+ } else {
1096
+ time = new Date();
1097
+ time.setMilliseconds(0);
1098
+ }
1099
+ var t = date.split(':');
1100
+ time.setHours(parseInt(t[0], 10));
1101
+ time.setMinutes(parseInt(t[1], 10));
1102
+ time.setSeconds(t[2] ? parseInt(t[2], 10) : 0);
1103
+ this.computedValue = new Date(time.getTime());
1104
+ } else {
1105
+ this.computedValue = null;
1106
+ }
1107
+ },
1108
+ formatNumber: function formatNumber(value, prependZero) {
1109
+ return this.isHourFormat24 || prependZero ? this.pad(value) : value;
1110
+ },
1111
+ pad: function pad(value) {
1112
+ return (value < 10 ? '0' : '') + value;
1113
+ },
1114
+ /*
1115
+ * Format date into string
1116
+ */
1117
+ formatValue: function formatValue(date) {
1118
+ if (date && !isNaN(date)) {
1119
+ return this.timeFormatter(date, this);
1120
+ } else {
1121
+ return null;
1122
+ }
1123
+ },
1124
+ /**
1125
+ * Keypress event that is bound to the document.
1126
+ */
1127
+ keyPress: function keyPress(_ref) {
1128
+ var key = _ref.key;
1129
+ if (this.$refs.dropdown && this.$refs.dropdown.isActive && (key === 'Escape' || key === 'Esc')) {
1130
+ this.toggle(false);
1131
+ }
1132
+ },
1133
+ /**
1134
+ * Emit 'blur' event on dropdown is not active (closed)
1135
+ */
1136
+ onActiveChange: function onActiveChange(value) {
1137
+ if (!value) {
1138
+ this.onBlur();
1139
+ }
1140
+ }
1141
+ },
1142
+ created: function created() {
1143
+ if (typeof window !== 'undefined') {
1144
+ document.addEventListener('keyup', this.keyPress);
1145
+ }
1146
+ },
1147
+ beforeDestroy: function beforeDestroy() {
1148
+ if (typeof window !== 'undefined') {
1149
+ document.removeEventListener('keyup', this.keyPress);
1150
+ }
1151
+ }
1152
+ };
1153
+
1154
+ var findFocusable = function findFocusable(element) {
1155
+ var programmatic = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1156
+ if (!element) {
1157
+ return null;
1158
+ }
1159
+ if (programmatic) {
1160
+ return element.querySelectorAll("*[tabindex=\"-1\"]");
1161
+ }
1162
+ return element.querySelectorAll("a[href]:not([tabindex=\"-1\"]),\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n *[tabindex]:not([tabindex=\"-1\"]),\n *[contenteditable]");
1163
+ };
1164
+ var onKeyDown;
1165
+ var bind = function bind(el, _ref) {
1166
+ var _ref$value = _ref.value,
1167
+ value = _ref$value === void 0 ? true : _ref$value;
1168
+ if (value) {
1169
+ var focusable = findFocusable(el);
1170
+ var focusableProg = findFocusable(el, true);
1171
+ if (focusable && focusable.length > 0) {
1172
+ onKeyDown = function onKeyDown(event) {
1173
+ // Need to get focusable each time since it can change between key events
1174
+ // ex. changing month in a datepicker
1175
+ focusable = findFocusable(el);
1176
+ focusableProg = findFocusable(el, true);
1177
+ var firstFocusable = focusable[0];
1178
+ var lastFocusable = focusable[focusable.length - 1];
1179
+ if (event.target === firstFocusable && event.shiftKey && event.key === 'Tab') {
1180
+ event.preventDefault();
1181
+ lastFocusable.focus();
1182
+ } else if ((event.target === lastFocusable || Array.from(focusableProg).indexOf(event.target) >= 0) && !event.shiftKey && event.key === 'Tab') {
1183
+ event.preventDefault();
1184
+ firstFocusable.focus();
1185
+ }
1186
+ };
1187
+ el.addEventListener('keydown', onKeyDown);
1188
+ }
1189
+ }
1190
+ };
1191
+ var unbind = function unbind(el) {
1192
+ el.removeEventListener('keydown', onKeyDown);
1193
+ };
1194
+ var directive = {
1195
+ bind: bind,
1196
+ unbind: unbind
1197
+ };
1198
+ var trapFocus = directive;
1199
+
1200
+ var items = 1;
1201
+ var sorted$1 = 3;
1202
+ var ProviderParentMixin = (function (itemName) {
1203
+ var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1204
+ var mixin = {
1205
+ provide: function provide() {
1206
+ return _defineProperty({}, 'b' + itemName, this);
1207
+ }
1208
+ };
1209
+ if (hasFlag(flags, items)) {
1210
+ mixin.data = function () {
1211
+ return {
1212
+ childItems: []
1213
+ };
1214
+ };
1215
+ mixin.methods = {
1216
+ _registerItem: function _registerItem(item) {
1217
+ this.childItems.push(item);
1218
+ },
1219
+ _unregisterItem: function _unregisterItem(item) {
1220
+ this.childItems = this.childItems.filter(function (i) {
1221
+ return i !== item;
1222
+ });
1223
+ }
1224
+ };
1225
+ if (hasFlag(flags, sorted$1)) {
1226
+ mixin.watch = {
1227
+ /**
1228
+ * When items are added/removed deep search in the elements default's slot
1229
+ * And mark the items with their index
1230
+ */
1231
+ childItems: function childItems(items) {
1232
+ if (items.length > 0 && this.$scopedSlots.default) {
1233
+ var tag = items[0].$vnode.tag;
1234
+ var index = 0;
1235
+ var deepSearch = function deepSearch(children) {
1236
+ var _iterator = _createForOfIteratorHelper(children),
1237
+ _step;
1238
+ try {
1239
+ var _loop = function _loop() {
1240
+ var child = _step.value;
1241
+ if (child.tag === tag) {
1242
+ // An item with the same tag will for sure be found
1243
+ var it = items.find(function (i) {
1244
+ return i.$vnode === child;
1245
+ });
1246
+ if (it) {
1247
+ it.index = index++;
1248
+ }
1249
+ } else if (child.tag) {
1250
+ var sub = child.componentInstance ? child.componentInstance.$scopedSlots.default ? child.componentInstance.$scopedSlots.default() : child.componentInstance.$children : child.children;
1251
+ if (Array.isArray(sub) && sub.length > 0) {
1252
+ deepSearch(sub.map(function (e) {
1253
+ return e.$vnode;
1254
+ }));
1255
+ }
1256
+ }
1257
+ };
1258
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1259
+ _loop();
1260
+ }
1261
+ } catch (err) {
1262
+ _iterator.e(err);
1263
+ } finally {
1264
+ _iterator.f();
1265
+ }
1266
+ return false;
1267
+ };
1268
+ deepSearch(this.$scopedSlots.default());
1269
+ }
1270
+ }
1271
+ };
1272
+ mixin.computed = {
1273
+ /**
1274
+ * When items are added/removed sort them according to their position
1275
+ */
1276
+ sortedItems: function sortedItems() {
1277
+ return this.childItems.slice().sort(function (i1, i2) {
1278
+ return i1.index - i2.index;
1279
+ });
1280
+ }
1281
+ };
1282
+ }
1283
+ }
1284
+ return mixin;
1285
+ });
1286
+
1287
+ var DEFAULT_CLOSE_OPTIONS = ['escape', 'outside'];
1288
+ var script$7 = {
1289
+ name: 'BDropdown',
1290
+ directives: {
1291
+ trapFocus: trapFocus
1292
+ },
1293
+ mixins: [ProviderParentMixin('dropdown')],
1294
+ props: {
1295
+ value: {
1296
+ type: [String, Number, Boolean, Object, Array, Function],
1297
+ default: null
1298
+ },
1299
+ disabled: Boolean,
1300
+ inline: Boolean,
1301
+ scrollable: Boolean,
1302
+ maxHeight: {
1303
+ type: [String, Number],
1304
+ default: 200
1305
+ },
1306
+ position: {
1307
+ type: String,
1308
+ validator: function validator(value) {
1309
+ return ['is-top-right', 'is-top-left', 'is-bottom-left', 'is-bottom-right'].indexOf(value) > -1;
1310
+ }
1311
+ },
1312
+ triggers: {
1313
+ type: Array,
1314
+ default: function _default() {
1315
+ return ['click'];
1316
+ }
1317
+ },
1318
+ mobileModal: {
1319
+ type: Boolean,
1320
+ default: function _default() {
1321
+ return config.defaultDropdownMobileModal;
1322
+ }
1323
+ },
1324
+ ariaRole: {
1325
+ type: String,
1326
+ validator: function validator(value) {
1327
+ return ['menu', 'list', 'dialog'].indexOf(value) > -1;
1328
+ },
1329
+ default: null
1330
+ },
1331
+ animation: {
1332
+ type: String,
1333
+ default: 'fade'
1334
+ },
1335
+ multiple: Boolean,
1336
+ trapFocus: {
1337
+ type: Boolean,
1338
+ default: function _default() {
1339
+ return config.defaultTrapFocus;
1340
+ }
1341
+ },
1342
+ closeOnClick: {
1343
+ type: Boolean,
1344
+ default: true
1345
+ },
1346
+ canClose: {
1347
+ type: [Array, Boolean],
1348
+ default: true
1349
+ },
1350
+ expanded: Boolean,
1351
+ appendToBody: Boolean,
1352
+ appendToBodyCopyParent: Boolean,
1353
+ triggerTabindex: {
1354
+ type: Number,
1355
+ default: 0
1356
+ }
1357
+ },
1358
+ data: function data() {
1359
+ return {
1360
+ selected: this.value,
1361
+ style: {},
1362
+ isActive: false,
1363
+ isHoverable: false,
1364
+ maybeTap: false,
1365
+ isTouchEnabled: false,
1366
+ _bodyEl: undefined,
1367
+ // Used to append to body
1368
+ timeOutID: null,
1369
+ timeOutID2: null
1370
+ };
1371
+ },
1372
+ computed: {
1373
+ rootClasses: function rootClasses() {
1374
+ return [this.position, {
1375
+ 'is-disabled': this.disabled,
1376
+ 'is-hoverable': this.hoverable,
1377
+ 'is-inline': this.inline,
1378
+ 'is-active': this.isActive || this.inline,
1379
+ 'is-mobile-modal': this.isMobileModal,
1380
+ 'is-expanded': this.expanded,
1381
+ 'is-touch-enabled': this.isTouchEnabled
1382
+ }];
1383
+ },
1384
+ isMobileModal: function isMobileModal() {
1385
+ return this.mobileModal && !this.inline;
1386
+ },
1387
+ cancelOptions: function cancelOptions() {
1388
+ return typeof this.canClose === 'boolean' ? this.canClose ? DEFAULT_CLOSE_OPTIONS : [] : this.canClose;
1389
+ },
1390
+ contentStyle: function contentStyle() {
1391
+ return {
1392
+ maxHeight: this.scrollable ? toCssWidth(this.maxHeight) : null,
1393
+ overflow: this.scrollable ? 'auto' : null
1394
+ };
1395
+ },
1396
+ hoverable: function hoverable() {
1397
+ return this.triggers.indexOf('hover') >= 0;
1398
+ }
1399
+ },
1400
+ watch: {
1401
+ /**
1402
+ * When v-model is changed set the new selected item.
1403
+ */
1404
+ value: function value(_value) {
1405
+ this.selected = _value;
1406
+ },
1407
+ /**
1408
+ * Emit event when isActive value is changed.
1409
+ *
1410
+ * Also resets `isTouchEnabled` when it turns inactive.
1411
+ */
1412
+ isActive: function isActive(value) {
1413
+ var _this = this;
1414
+ this.$emit('active-change', value);
1415
+ if (!value) {
1416
+ // delays to reset the touch enabled flag until the dropdown
1417
+ // menu disappears to avoid glitches
1418
+ // also takes care of chattering, e.g., repeated quick taps,
1419
+ // otherwise the flag may become inconsistent with the actual
1420
+ // state of the dropdown menu
1421
+ this.timeOutID = setTimeout(function () {
1422
+ if (!_this.isActive) {
1423
+ _this.isTouchEnabled = false;
1424
+ }
1425
+ }, 250);
1426
+ }
1427
+ this.handleScroll();
1428
+ if (this.appendToBody) {
1429
+ this.$nextTick(function () {
1430
+ _this.updateAppendToBody();
1431
+ });
1432
+ }
1433
+ },
1434
+ isHoverable: function isHoverable(value) {
1435
+ if (this.hoverable) {
1436
+ this.$emit('active-change', value);
1437
+ }
1438
+ }
1439
+ },
1440
+ methods: {
1441
+ handleScroll: function handleScroll() {
1442
+ if (typeof window === 'undefined') return;
1443
+ if (this.isMobileModal) {
1444
+ if (this.isActive) {
1445
+ document.documentElement.classList.add('is-clipped-touch');
1446
+ } else {
1447
+ document.documentElement.classList.remove('is-clipped-touch');
1448
+ }
1449
+ }
1450
+ },
1451
+ /**
1452
+ * Click listener from DropdownItem.
1453
+ * 1. Set new selected item.
1454
+ * 2. Emit input event to update the user v-model.
1455
+ * 3. Close the dropdown.
1456
+ */
1457
+ selectItem: function selectItem(value) {
1458
+ if (this.multiple) {
1459
+ if (this.selected) {
1460
+ if (this.selected.indexOf(value) === -1) {
1461
+ // Add value
1462
+ this.selected = [].concat(_toConsumableArray(this.selected), [value]);
1463
+ } else {
1464
+ // Remove value
1465
+ this.selected = this.selected.filter(function (val) {
1466
+ return val !== value;
1467
+ });
1468
+ }
1469
+ } else {
1470
+ this.selected = [value];
1471
+ }
1472
+ this.$emit('change', this.selected);
1473
+ } else {
1474
+ if (this.selected !== value) {
1475
+ this.selected = value;
1476
+ this.$emit('change', this.selected);
1477
+ }
1478
+ }
1479
+ this.$emit('input', this.selected);
1480
+ if (!this.multiple) {
1481
+ this.isActive = !this.closeOnClick;
1482
+ if (this.hoverable && this.closeOnClick) {
1483
+ this.isHoverable = false;
1484
+ }
1485
+ }
1486
+ },
1487
+ /**
1488
+ * White-listed items to not close when clicked.
1489
+ */
1490
+ isInWhiteList: function isInWhiteList(el) {
1491
+ if (el === this.$refs.dropdownMenu) return true;
1492
+ if (el === this.$refs.trigger) return true;
1493
+ // All chidren from dropdown
1494
+ if (this.$refs.dropdownMenu !== undefined) {
1495
+ var children = this.$refs.dropdownMenu.querySelectorAll('*');
1496
+ var _iterator = _createForOfIteratorHelper(children),
1497
+ _step;
1498
+ try {
1499
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1500
+ var child = _step.value;
1501
+ if (el === child) {
1502
+ return true;
1503
+ }
1504
+ }
1505
+ } catch (err) {
1506
+ _iterator.e(err);
1507
+ } finally {
1508
+ _iterator.f();
1509
+ }
1510
+ }
1511
+ // All children from trigger
1512
+ if (this.$refs.trigger !== undefined) {
1513
+ var _children = this.$refs.trigger.querySelectorAll('*');
1514
+ var _iterator2 = _createForOfIteratorHelper(_children),
1515
+ _step2;
1516
+ try {
1517
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1518
+ var _child = _step2.value;
1519
+ if (el === _child) {
1520
+ return true;
1521
+ }
1522
+ }
1523
+ } catch (err) {
1524
+ _iterator2.e(err);
1525
+ } finally {
1526
+ _iterator2.f();
1527
+ }
1528
+ }
1529
+ return false;
1530
+ },
1531
+ /**
1532
+ * Close dropdown if clicked outside.
1533
+ */
1534
+ clickedOutside: function clickedOutside(event) {
1535
+ if (this.cancelOptions.indexOf('outside') < 0) return;
1536
+ if (this.inline) return;
1537
+ var target = isCustomElement(this) ? event.composedPath()[0] : event.target;
1538
+ if (!this.isInWhiteList(target)) this.isActive = false;
1539
+ },
1540
+ /**
1541
+ * Keypress event that is bound to the document
1542
+ */
1543
+ keyPress: function keyPress(_ref) {
1544
+ var key = _ref.key;
1545
+ if (this.isActive && (key === 'Escape' || key === 'Esc')) {
1546
+ if (this.cancelOptions.indexOf('escape') < 0) return;
1547
+ this.isActive = false;
1548
+ }
1549
+ },
1550
+ onClick: function onClick() {
1551
+ // hover precedes
1552
+ if (this.triggers.indexOf('hover') !== -1) return;
1553
+ if (this.triggers.indexOf('click') < 0) return;
1554
+ this.toggle();
1555
+ },
1556
+ onContextMenu: function onContextMenu() {
1557
+ if (this.triggers.indexOf('contextmenu') < 0) return;
1558
+ this.toggle();
1559
+ },
1560
+ onHover: function onHover() {
1561
+ if (this.triggers.indexOf('hover') < 0) return;
1562
+ // touch precedes
1563
+ if (this.isTouchEnabled) return;
1564
+ this.isHoverable = true;
1565
+ },
1566
+ // takes care of touch-enabled devices
1567
+ // - does nothing if hover trigger is disabled
1568
+ // - suppresses hover trigger by setting isTouchEnabled
1569
+ // - handles only a tap; i.e., touchstart on the trigger immediately
1570
+ // folowed by touchend
1571
+ onTouchStart: function onTouchStart() {
1572
+ this.maybeTap = true;
1573
+ },
1574
+ onTouchMove: function onTouchMove() {
1575
+ this.maybeTap = false;
1576
+ },
1577
+ onTouchEnd: function onTouchEnd(e) {
1578
+ if (this.triggers.indexOf('hover') === -1) return;
1579
+ if (!this.maybeTap) return;
1580
+ // tap on dropdown contents may happen without preventDefault
1581
+ e.preventDefault();
1582
+ this.maybeTap = false;
1583
+ this.isTouchEnabled = true;
1584
+ this.toggle();
1585
+ },
1586
+ onFocus: function onFocus() {
1587
+ if (this.triggers.indexOf('focus') < 0) return;
1588
+ this.toggle();
1589
+ },
1590
+ /**
1591
+ * Toggle dropdown if it's not disabled.
1592
+ */
1593
+ toggle: function toggle() {
1594
+ var _this2 = this;
1595
+ if (this.disabled) return;
1596
+ if (!this.isActive) {
1597
+ // if not active, toggle after clickOutside event
1598
+ // this fixes toggling programmatic
1599
+ this.$nextTick(function () {
1600
+ var value = !_this2.isActive;
1601
+ _this2.isActive = value;
1602
+ // Vue 2.6.x ???
1603
+ _this2.timeOutID2 = setTimeout(function () {
1604
+ return _this2.isActive = value;
1605
+ });
1606
+ });
1607
+ } else {
1608
+ this.isActive = !this.isActive;
1609
+ }
1610
+ },
1611
+ updateAppendToBody: function updateAppendToBody() {
1612
+ var dropdown = this.$refs.dropdown;
1613
+ var dropdownMenu = this.$refs.dropdownMenu;
1614
+ var trigger = this.$refs.trigger;
1615
+ if (dropdownMenu && trigger) {
1616
+ // update wrapper dropdown
1617
+ var dropdownWrapper = this.$data._bodyEl.children[0];
1618
+ dropdownWrapper.classList.forEach(function (item) {
1619
+ return dropdownWrapper.classList.remove(item);
1620
+ });
1621
+ dropdownWrapper.classList.add('dropdown');
1622
+ dropdownWrapper.classList.add('dropdown-menu-animation');
1623
+ if (this.$vnode && this.$vnode.data && this.$vnode.data.staticClass) {
1624
+ dropdownWrapper.classList.add(this.$vnode.data.staticClass);
1625
+ }
1626
+ this.rootClasses.forEach(function (item) {
1627
+ // skip position prop
1628
+ if (item && _typeof(item) === 'object') {
1629
+ for (var key in item) {
1630
+ if (item[key]) {
1631
+ dropdownWrapper.classList.add(key);
1632
+ }
1633
+ }
1634
+ }
1635
+ });
1636
+ if (this.appendToBodyCopyParent) {
1637
+ var parentNode = this.$refs.dropdown.parentNode;
1638
+ var parent = this.$data._bodyEl;
1639
+ parent.classList.forEach(function (item) {
1640
+ return parent.classList.remove(item);
1641
+ });
1642
+ parentNode.classList.forEach(function (item) {
1643
+ parent.classList.add(item);
1644
+ });
1645
+ }
1646
+ var rect = trigger.getBoundingClientRect();
1647
+ var top = rect.top + window.scrollY;
1648
+ var left = rect.left + window.scrollX;
1649
+ if (!this.position || this.position.indexOf('bottom') >= 0) {
1650
+ top += trigger.clientHeight;
1651
+ } else {
1652
+ top -= dropdownMenu.clientHeight;
1653
+ }
1654
+ if (this.position && this.position.indexOf('left') >= 0) {
1655
+ left -= dropdownMenu.clientWidth - trigger.clientWidth;
1656
+ }
1657
+ this.style = {
1658
+ position: 'absolute',
1659
+ top: "".concat(top, "px"),
1660
+ left: "".concat(left, "px"),
1661
+ zIndex: '99',
1662
+ width: this.expanded ? "".concat(dropdown.offsetWidth, "px") : undefined
1663
+ };
1664
+ }
1665
+ }
1666
+ },
1667
+ mounted: function mounted() {
1668
+ if (this.appendToBody) {
1669
+ this.$data._bodyEl = createAbsoluteElement(this.$refs.dropdownMenu);
1670
+ this.updateAppendToBody();
1671
+ }
1672
+ },
1673
+ created: function created() {
1674
+ if (typeof window !== 'undefined') {
1675
+ document.addEventListener('click', this.clickedOutside);
1676
+ document.addEventListener('keyup', this.keyPress);
1677
+ }
1678
+ },
1679
+ beforeDestroy: function beforeDestroy() {
1680
+ if (typeof window !== 'undefined') {
1681
+ document.removeEventListener('click', this.clickedOutside);
1682
+ document.removeEventListener('keyup', this.keyPress);
1683
+ }
1684
+ if (this.appendToBody) {
1685
+ removeElement(this.$data._bodyEl);
1686
+ }
1687
+ clearTimeout(this.timeOutID);
1688
+ clearTimeout(this.timeOutID2);
1689
+ }
1690
+ };
1691
+
1692
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
1693
+ if (typeof shadowMode !== 'boolean') {
1694
+ createInjectorSSR = createInjector;
1695
+ createInjector = shadowMode;
1696
+ shadowMode = false;
1697
+ }
1698
+ // Vue.extend constructor export interop.
1699
+ const options = typeof script === 'function' ? script.options : script;
1700
+ // render functions
1701
+ if (template && template.render) {
1702
+ options.render = template.render;
1703
+ options.staticRenderFns = template.staticRenderFns;
1704
+ options._compiled = true;
1705
+ // functional template
1706
+ if (isFunctionalTemplate) {
1707
+ options.functional = true;
1708
+ }
1709
+ }
1710
+ // scopedId
1711
+ if (scopeId) {
1712
+ options._scopeId = scopeId;
1713
+ }
1714
+ let hook;
1715
+ if (moduleIdentifier) {
1716
+ // server build
1717
+ hook = function (context) {
1718
+ // 2.3 injection
1719
+ context =
1720
+ context || // cached call
1721
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
1722
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
1723
+ // 2.2 with runInNewContext: true
1724
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1725
+ context = __VUE_SSR_CONTEXT__;
1726
+ }
1727
+ // inject component styles
1728
+ if (style) {
1729
+ style.call(this, createInjectorSSR(context));
1730
+ }
1731
+ // register component module identifier for async chunk inference
1732
+ if (context && context._registeredComponents) {
1733
+ context._registeredComponents.add(moduleIdentifier);
1734
+ }
1735
+ };
1736
+ // used by ssr in case component is cached and beforeCreate
1737
+ // never gets called
1738
+ options._ssrRegister = hook;
1739
+ }
1740
+ else if (style) {
1741
+ hook = shadowMode
1742
+ ? function (context) {
1743
+ style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
1744
+ }
1745
+ : function (context) {
1746
+ style.call(this, createInjector(context));
1747
+ };
1748
+ }
1749
+ if (hook) {
1750
+ if (options.functional) {
1751
+ // register for functional component in vue file
1752
+ const originalRender = options.render;
1753
+ options.render = function renderWithStyleInjection(h, context) {
1754
+ hook.call(context);
1755
+ return originalRender(h, context);
1756
+ };
1757
+ }
1758
+ else {
1759
+ // inject component registration as beforeCreate hook
1760
+ const existing = options.beforeCreate;
1761
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
1762
+ }
1763
+ }
1764
+ return script;
1765
+ }
1766
+
1767
+ /* script */
1768
+ const __vue_script__$7 = script$7;
1769
+
1770
+ /* template */
1771
+ var __vue_render__$6 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"dropdown",staticClass:"dropdown dropdown-menu-animation",class:_vm.rootClasses,on:{"mouseleave":function($event){_vm.isHoverable = false;}}},[(!_vm.inline)?_c('div',{ref:"trigger",staticClass:"dropdown-trigger",attrs:{"tabindex":_vm.disabled ? false : _vm.triggerTabindex,"aria-haspopup":"true"},on:{"click":_vm.onClick,"contextmenu":function($event){$event.preventDefault();return _vm.onContextMenu($event)},"mouseenter":_vm.onHover,"!focus":function($event){return _vm.onFocus($event)},"touchstart":_vm.onTouchStart,"touchmove":_vm.onTouchMove,"touchend":_vm.onTouchEnd}},[_vm._t("trigger",null,{"active":_vm.isActive})],2):_vm._e(),_c('transition',{attrs:{"name":_vm.animation}},[(_vm.isMobileModal)?_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"background",attrs:{"aria-hidden":!_vm.isActive}}):_vm._e()]),_c('transition',{attrs:{"name":_vm.animation}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:((!_vm.disabled && (_vm.isActive || _vm.isHoverable)) || _vm.inline),expression:"(!disabled && (isActive || isHoverable)) || inline"},{name:"trap-focus",rawName:"v-trap-focus",value:(_vm.trapFocus),expression:"trapFocus"}],ref:"dropdownMenu",staticClass:"dropdown-menu",style:(_vm.style),attrs:{"aria-hidden":!_vm.isActive}},[_c('div',{staticClass:"dropdown-content",style:(_vm.contentStyle),attrs:{"role":_vm.ariaRole,"aria-modal":!_vm.inline}},[_vm._t("default")],2)])])],1)};
1772
+ var __vue_staticRenderFns__$6 = [];
1773
+
1774
+ /* style */
1775
+ const __vue_inject_styles__$7 = undefined;
1776
+ /* scoped */
1777
+ const __vue_scope_id__$7 = undefined;
1778
+ /* module identifier */
1779
+ const __vue_module_identifier__$7 = undefined;
1780
+ /* functional template */
1781
+ const __vue_is_functional_template__$7 = false;
1782
+ /* style inject */
1783
+
1784
+ /* style inject SSR */
1785
+
1786
+ /* style inject shadow dom */
1787
+
1788
+
1789
+
1790
+ const __vue_component__$7 = /*#__PURE__*/normalizeComponent(
1791
+ { render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
1792
+ __vue_inject_styles__$7,
1793
+ __vue_script__$7,
1794
+ __vue_scope_id__$7,
1795
+ __vue_is_functional_template__$7,
1796
+ __vue_module_identifier__$7,
1797
+ false,
1798
+ undefined,
1799
+ undefined,
1800
+ undefined
1801
+ );
1802
+
1803
+ var Dropdown = __vue_component__$7;
1804
+
1805
+ var sorted = 1;
1806
+ var optional = 2;
1807
+ var InjectedChildMixin = (function (parentItemName) {
1808
+ var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1809
+ var mixin = {
1810
+ inject: {
1811
+ parent: {
1812
+ from: 'b' + parentItemName,
1813
+ default: false
1814
+ }
1815
+ },
1816
+ created: function created() {
1817
+ if (!this.parent) {
1818
+ if (!hasFlag(flags, optional)) {
1819
+ this.$destroy();
1820
+ throw new Error('You should wrap ' + this.$options.name + ' in a ' + parentItemName);
1821
+ }
1822
+ } else if (this.parent._registerItem) {
1823
+ this.parent._registerItem(this);
1824
+ }
1825
+ },
1826
+ beforeDestroy: function beforeDestroy() {
1827
+ if (this.parent && this.parent._unregisterItem) {
1828
+ this.parent._unregisterItem(this);
1829
+ }
1830
+ }
1831
+ };
1832
+ if (hasFlag(flags, sorted)) {
1833
+ mixin.data = function () {
1834
+ return {
1835
+ index: null
1836
+ };
1837
+ };
1838
+ }
1839
+ return mixin;
1840
+ });
1841
+
1842
+ //
1843
+ var script$6 = {
1844
+ name: 'BDropdownItem',
1845
+ mixins: [InjectedChildMixin('dropdown')],
1846
+ props: {
1847
+ value: {
1848
+ type: [String, Number, Boolean, Object, Array, Function],
1849
+ default: null
1850
+ },
1851
+ separator: Boolean,
1852
+ disabled: Boolean,
1853
+ custom: Boolean,
1854
+ focusable: {
1855
+ type: Boolean,
1856
+ default: true
1857
+ },
1858
+ paddingless: Boolean,
1859
+ hasLink: Boolean,
1860
+ ariaRole: {
1861
+ type: String,
1862
+ default: ''
1863
+ }
1864
+ },
1865
+ computed: {
1866
+ anchorClasses: function anchorClasses() {
1867
+ return {
1868
+ 'is-disabled': this.parent.disabled || this.disabled,
1869
+ 'is-paddingless': this.paddingless,
1870
+ 'is-active': this.isActive
1871
+ };
1872
+ },
1873
+ itemClasses: function itemClasses() {
1874
+ return {
1875
+ 'dropdown-item': !this.hasLink,
1876
+ 'is-disabled': this.disabled,
1877
+ 'is-paddingless': this.paddingless,
1878
+ 'is-active': this.isActive,
1879
+ 'has-link': this.hasLink
1880
+ };
1881
+ },
1882
+ ariaRoleItem: function ariaRoleItem() {
1883
+ return this.ariaRole === 'menuitem' || this.ariaRole === 'listitem' ? this.ariaRole : null;
1884
+ },
1885
+ isClickable: function isClickable() {
1886
+ return !this.parent.disabled && !this.separator && !this.disabled && !this.custom;
1887
+ },
1888
+ isActive: function isActive() {
1889
+ if (this.parent.selected === null) return false;
1890
+ if (this.parent.multiple) return this.parent.selected.indexOf(this.value) >= 0;
1891
+ return this.value === this.parent.selected;
1892
+ },
1893
+ isFocusable: function isFocusable() {
1894
+ return this.hasLink ? false : this.focusable;
1895
+ }
1896
+ },
1897
+ methods: {
1898
+ /**
1899
+ * Click listener, select the item.
1900
+ */
1901
+ selectItem: function selectItem() {
1902
+ if (!this.isClickable) return;
1903
+ this.parent.selectItem(this.value);
1904
+ this.$emit('click');
1905
+ }
1906
+ }
1907
+ };
1908
+
1909
+ /* script */
1910
+ const __vue_script__$6 = script$6;
1911
+
1912
+ /* template */
1913
+ var __vue_render__$5 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.separator)?_c('hr',{staticClass:"dropdown-divider"}):(!_vm.custom && !_vm.hasLink)?_c('a',{staticClass:"dropdown-item",class:_vm.anchorClasses,attrs:{"role":_vm.ariaRoleItem,"tabindex":_vm.isFocusable ? 0 : null},on:{"click":_vm.selectItem}},[_vm._t("default")],2):_c('div',{class:_vm.itemClasses,attrs:{"role":_vm.ariaRoleItem,"tabindex":_vm.isFocusable ? 0 : null},on:{"click":_vm.selectItem}},[_vm._t("default")],2)};
1914
+ var __vue_staticRenderFns__$5 = [];
1915
+
1916
+ /* style */
1917
+ const __vue_inject_styles__$6 = undefined;
1918
+ /* scoped */
1919
+ const __vue_scope_id__$6 = undefined;
1920
+ /* module identifier */
1921
+ const __vue_module_identifier__$6 = undefined;
1922
+ /* functional template */
1923
+ const __vue_is_functional_template__$6 = false;
1924
+ /* style inject */
1925
+
1926
+ /* style inject SSR */
1927
+
1928
+ /* style inject shadow dom */
1929
+
1930
+
1931
+
1932
+ const __vue_component__$6 = /*#__PURE__*/normalizeComponent(
1933
+ { render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
1934
+ __vue_inject_styles__$6,
1935
+ __vue_script__$6,
1936
+ __vue_scope_id__$6,
1937
+ __vue_is_functional_template__$6,
1938
+ __vue_module_identifier__$6,
1939
+ false,
1940
+ undefined,
1941
+ undefined,
1942
+ undefined
1943
+ );
1944
+
1945
+ var DropdownItem = __vue_component__$6;
1946
+
1947
+ var mdiIcons = {
1948
+ sizes: {
1949
+ 'default': 'mdi-24px',
1950
+ 'is-small': null,
1951
+ 'is-medium': 'mdi-36px',
1952
+ 'is-large': 'mdi-48px'
1953
+ },
1954
+ iconPrefix: 'mdi-'
1955
+ };
1956
+ var faIcons = function faIcons() {
1957
+ var faIconPrefix = config && config.defaultIconComponent ? '' : 'fa-';
1958
+ return {
1959
+ sizes: {
1960
+ 'default': null,
1961
+ 'is-small': null,
1962
+ 'is-medium': faIconPrefix + 'lg',
1963
+ 'is-large': faIconPrefix + '2x'
1964
+ },
1965
+ iconPrefix: faIconPrefix,
1966
+ internalIcons: {
1967
+ 'information': 'info-circle',
1968
+ 'alert': 'exclamation-triangle',
1969
+ 'alert-circle': 'exclamation-circle',
1970
+ 'chevron-right': 'angle-right',
1971
+ 'chevron-left': 'angle-left',
1972
+ 'chevron-down': 'angle-down',
1973
+ 'eye-off': 'eye-slash',
1974
+ 'menu-down': 'caret-down',
1975
+ 'menu-up': 'caret-up',
1976
+ 'close-circle': 'times-circle'
1977
+ }
1978
+ };
1979
+ };
1980
+ var getIcons = function getIcons() {
1981
+ var icons = {
1982
+ mdi: mdiIcons,
1983
+ fa: faIcons(),
1984
+ fas: faIcons(),
1985
+ far: faIcons(),
1986
+ fad: faIcons(),
1987
+ fab: faIcons(),
1988
+ fal: faIcons(),
1989
+ 'fa-solid': faIcons(),
1990
+ 'fa-regular': faIcons(),
1991
+ 'fa-light': faIcons(),
1992
+ 'fa-thin': faIcons(),
1993
+ 'fa-duotone': faIcons(),
1994
+ 'fa-brands': faIcons()
1995
+ };
1996
+ if (config && config.customIconPacks) {
1997
+ icons = merge(icons, config.customIconPacks, true);
1998
+ }
1999
+ return icons;
2000
+ };
2001
+ var getIcons$1 = getIcons;
2002
+
2003
+ var script$5 = {
2004
+ name: 'BIcon',
2005
+ props: {
2006
+ type: [String, Object],
2007
+ component: String,
2008
+ pack: String,
2009
+ icon: String,
2010
+ size: String,
2011
+ customSize: String,
2012
+ customClass: String,
2013
+ both: Boolean // This is used internally to show both MDI and FA icon
2014
+ },
2015
+ computed: {
2016
+ iconConfig: function iconConfig() {
2017
+ var allIcons = getIcons$1();
2018
+ return allIcons[this.newPack];
2019
+ },
2020
+ iconPrefix: function iconPrefix() {
2021
+ if (this.iconConfig && this.iconConfig.iconPrefix) {
2022
+ return this.iconConfig.iconPrefix;
2023
+ }
2024
+ return '';
2025
+ },
2026
+ /**
2027
+ * Internal icon name based on the pack.
2028
+ * If pack is 'fa', gets the equivalent FA icon name of the MDI,
2029
+ * internal icons are always MDI.
2030
+ */
2031
+ newIcon: function newIcon() {
2032
+ return "".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon));
2033
+ },
2034
+ newPack: function newPack() {
2035
+ return this.pack || config.defaultIconPack;
2036
+ },
2037
+ newType: function newType() {
2038
+ if (!this.type) return;
2039
+ var splitType = [];
2040
+ if (typeof this.type === 'string') {
2041
+ splitType = this.type.split('-');
2042
+ } else {
2043
+ for (var key in this.type) {
2044
+ if (this.type[key]) {
2045
+ splitType = key.split('-');
2046
+ break;
2047
+ }
2048
+ }
2049
+ }
2050
+ if (splitType.length <= 1) return;
2051
+ var _splitType = splitType,
2052
+ _splitType2 = _toArray(_splitType),
2053
+ type = _splitType2.slice(1);
2054
+ return "has-text-".concat(type.join('-'));
2055
+ },
2056
+ newCustomSize: function newCustomSize() {
2057
+ return this.customSize || this.customSizeByPack;
2058
+ },
2059
+ customSizeByPack: function customSizeByPack() {
2060
+ if (this.iconConfig && this.iconConfig.sizes) {
2061
+ if (this.size && this.iconConfig.sizes[this.size] !== undefined) {
2062
+ return this.iconConfig.sizes[this.size];
2063
+ } else if (this.iconConfig.sizes.default) {
2064
+ return this.iconConfig.sizes.default;
2065
+ }
2066
+ }
2067
+ return null;
2068
+ },
2069
+ useIconComponent: function useIconComponent() {
2070
+ return this.component || config.defaultIconComponent;
2071
+ }
2072
+ },
2073
+ methods: {
2074
+ /**
2075
+ * Equivalent icon name of the MDI.
2076
+ */
2077
+ getEquivalentIconOf: function getEquivalentIconOf(value) {
2078
+ // Only transform the class if the both prop is set to true
2079
+ if (!this.both) {
2080
+ return value;
2081
+ }
2082
+ if (this.iconConfig && this.iconConfig.internalIcons && this.iconConfig.internalIcons[value]) {
2083
+ return this.iconConfig.internalIcons[value];
2084
+ }
2085
+ return value;
2086
+ }
2087
+ }
2088
+ };
2089
+
2090
+ /* script */
2091
+ const __vue_script__$5 = script$5;
2092
+
2093
+ /* template */
2094
+ var __vue_render__$4 = 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)};
2095
+ var __vue_staticRenderFns__$4 = [];
2096
+
2097
+ /* style */
2098
+ const __vue_inject_styles__$5 = undefined;
2099
+ /* scoped */
2100
+ const __vue_scope_id__$5 = undefined;
2101
+ /* module identifier */
2102
+ const __vue_module_identifier__$5 = undefined;
2103
+ /* functional template */
2104
+ const __vue_is_functional_template__$5 = false;
2105
+ /* style inject */
2106
+
2107
+ /* style inject SSR */
2108
+
2109
+ /* style inject shadow dom */
2110
+
2111
+
2112
+
2113
+ const __vue_component__$5 = /*#__PURE__*/normalizeComponent(
2114
+ { render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
2115
+ __vue_inject_styles__$5,
2116
+ __vue_script__$5,
2117
+ __vue_scope_id__$5,
2118
+ __vue_is_functional_template__$5,
2119
+ __vue_module_identifier__$5,
2120
+ false,
2121
+ undefined,
2122
+ undefined,
2123
+ undefined
2124
+ );
2125
+
2126
+ var Icon = __vue_component__$5;
2127
+
2128
+ var script$4 = {
2129
+ name: 'BInput',
2130
+ components: _defineProperty({}, Icon.name, Icon),
2131
+ mixins: [FormElementMixin],
2132
+ inheritAttrs: false,
2133
+ props: {
2134
+ value: [Number, String],
2135
+ type: {
2136
+ type: String,
2137
+ default: 'text'
2138
+ },
2139
+ lazy: {
2140
+ type: Boolean,
2141
+ default: false
2142
+ },
2143
+ passwordReveal: Boolean,
2144
+ iconClickable: Boolean,
2145
+ hasCounter: {
2146
+ type: Boolean,
2147
+ default: function _default() {
2148
+ return config.defaultInputHasCounter;
2149
+ }
2150
+ },
2151
+ customClass: {
2152
+ type: String,
2153
+ default: ''
2154
+ },
2155
+ iconRight: String,
2156
+ iconRightClickable: Boolean,
2157
+ iconRightType: String
2158
+ },
2159
+ data: function data() {
2160
+ return {
2161
+ newValue: this.value,
2162
+ newType: this.type,
2163
+ newAutocomplete: this.autocomplete || config.defaultInputAutocomplete,
2164
+ isPasswordVisible: false,
2165
+ _elementRef: this.type === 'textarea' ? 'textarea' : 'input'
2166
+ };
2167
+ },
2168
+ computed: {
2169
+ computedValue: {
2170
+ get: function get() {
2171
+ return this.newValue;
2172
+ },
2173
+ set: function set(value) {
2174
+ this.newValue = value;
2175
+ this.$emit('input', value);
2176
+ }
2177
+ },
2178
+ rootClasses: function rootClasses() {
2179
+ return [this.iconPosition, this.size, {
2180
+ 'is-expanded': this.expanded,
2181
+ 'is-loading': this.loading,
2182
+ 'is-clearfix': !this.hasMessage
2183
+ }];
2184
+ },
2185
+ inputClasses: function inputClasses() {
2186
+ return [this.statusType, this.size, {
2187
+ 'is-rounded': this.rounded
2188
+ }];
2189
+ },
2190
+ hasIconRight: function hasIconRight() {
2191
+ return this.passwordReveal || this.loading || this.statusIcon && this.statusTypeIcon || this.iconRight;
2192
+ },
2193
+ rightIcon: function rightIcon() {
2194
+ if (this.passwordReveal) {
2195
+ return this.passwordVisibleIcon;
2196
+ } else if (this.iconRight) {
2197
+ return this.iconRight;
2198
+ }
2199
+ return this.statusTypeIcon;
2200
+ },
2201
+ rightIconType: function rightIconType() {
2202
+ if (this.passwordReveal) {
2203
+ return 'is-primary';
2204
+ } else if (this.iconRight) {
2205
+ return this.iconRightType || null;
2206
+ }
2207
+ return this.statusType;
2208
+ },
2209
+ /**
2210
+ * Position of the icon or if it's both sides.
2211
+ */
2212
+ iconPosition: function iconPosition() {
2213
+ var iconClasses = '';
2214
+ if (this.icon) {
2215
+ iconClasses += 'has-icons-left ';
2216
+ }
2217
+ if (this.hasIconRight) {
2218
+ iconClasses += 'has-icons-right';
2219
+ }
2220
+ return iconClasses;
2221
+ },
2222
+ /**
2223
+ * Icon name (MDI) based on the type.
2224
+ */
2225
+ statusTypeIcon: function statusTypeIcon() {
2226
+ switch (this.statusType) {
2227
+ case 'is-success':
2228
+ return 'check';
2229
+ case 'is-danger':
2230
+ return 'alert-circle';
2231
+ case 'is-info':
2232
+ return 'information';
2233
+ case 'is-warning':
2234
+ return 'alert';
2235
+ }
2236
+ },
2237
+ /**
2238
+ * Check if have any message prop from parent if it's a Field.
2239
+ */
2240
+ hasMessage: function hasMessage() {
2241
+ return !!this.statusMessage;
2242
+ },
2243
+ /**
2244
+ * Current password-reveal icon name.
2245
+ */
2246
+ passwordVisibleIcon: function passwordVisibleIcon() {
2247
+ return !this.isPasswordVisible ? 'eye' : 'eye-off';
2248
+ },
2249
+ /**
2250
+ * Get value length
2251
+ */
2252
+ valueLength: function valueLength() {
2253
+ if (typeof this.computedValue === 'string') {
2254
+ return Array.from(this.computedValue).length;
2255
+ } else if (typeof this.computedValue === 'number') {
2256
+ return this.computedValue.toString().length;
2257
+ }
2258
+ return 0;
2259
+ }
2260
+ },
2261
+ watch: {
2262
+ /**
2263
+ * When v-model is changed:
2264
+ * 1. Set internal value.
2265
+ * 2. Validate it if the value came from outside;
2266
+ * i.e., not equal to computedValue
2267
+ */
2268
+ value: function value(_value) {
2269
+ var _this = this;
2270
+ var fromOutside = this.computedValue != _value; // eslint-disable-line eqeqeq
2271
+ this.newValue = _value;
2272
+ if (fromOutside) {
2273
+ // validation must wait for DOM updated
2274
+ this.$nextTick(function () {
2275
+ !_this.isValid && _this.checkHtml5Validity();
2276
+ });
2277
+ }
2278
+ },
2279
+ type: function type(_type) {
2280
+ this.newType = _type;
2281
+ }
2282
+ },
2283
+ methods: {
2284
+ /**
2285
+ * Toggle the visibility of a password-reveal input
2286
+ * by changing the type and focus the input right away.
2287
+ */
2288
+ togglePasswordVisibility: function togglePasswordVisibility() {
2289
+ var _this2 = this;
2290
+ this.isPasswordVisible = !this.isPasswordVisible;
2291
+ this.newType = this.isPasswordVisible ? 'text' : 'password';
2292
+ this.$nextTick(function () {
2293
+ _this2.focus();
2294
+ });
2295
+ },
2296
+ iconClick: function iconClick(emit, event) {
2297
+ var _this3 = this;
2298
+ this.$emit(emit, event);
2299
+ this.$nextTick(function () {
2300
+ _this3.focus();
2301
+ });
2302
+ },
2303
+ rightIconClick: function rightIconClick(event) {
2304
+ if (this.passwordReveal) {
2305
+ this.togglePasswordVisibility();
2306
+ } else if (this.iconRightClickable) {
2307
+ this.iconClick('icon-right-click', event);
2308
+ }
2309
+ },
2310
+ onInput: function onInput(event) {
2311
+ if (!this.lazy) {
2312
+ var value = event.target.value;
2313
+ this.updateValue(value);
2314
+ }
2315
+ },
2316
+ onChange: function onChange(event) {
2317
+ if (this.lazy) {
2318
+ var value = event.target.value;
2319
+ this.updateValue(value);
2320
+ }
2321
+ },
2322
+ updateValue: function updateValue(value) {
2323
+ this.computedValue = value;
2324
+ !this.isValid && this.checkHtml5Validity();
2325
+ }
2326
+ }
2327
+ };
2328
+
2329
+ /* script */
2330
+ const __vue_script__$4 = script$4;
2331
+
2332
+ /* template */
2333
+ var __vue_render__$3 = 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)};
2334
+ var __vue_staticRenderFns__$3 = [];
2335
+
2336
+ /* style */
2337
+ const __vue_inject_styles__$4 = undefined;
2338
+ /* scoped */
2339
+ const __vue_scope_id__$4 = undefined;
2340
+ /* module identifier */
2341
+ const __vue_module_identifier__$4 = undefined;
2342
+ /* functional template */
2343
+ const __vue_is_functional_template__$4 = false;
2344
+ /* style inject */
2345
+
2346
+ /* style inject SSR */
2347
+
2348
+ /* style inject shadow dom */
2349
+
2350
+
2351
+
2352
+ const __vue_component__$4 = /*#__PURE__*/normalizeComponent(
2353
+ { render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
2354
+ __vue_inject_styles__$4,
2355
+ __vue_script__$4,
2356
+ __vue_scope_id__$4,
2357
+ __vue_is_functional_template__$4,
2358
+ __vue_module_identifier__$4,
2359
+ false,
2360
+ undefined,
2361
+ undefined,
2362
+ undefined
2363
+ );
2364
+
2365
+ var Input = __vue_component__$4;
2366
+
2367
+ var script$3 = {
2368
+ name: 'BFieldBody',
2369
+ props: {
2370
+ message: {
2371
+ type: [String, Array]
2372
+ },
2373
+ type: {
2374
+ type: [String, Object]
2375
+ }
2376
+ },
2377
+ render: function render(createElement) {
2378
+ var _this = this;
2379
+ var first = true;
2380
+ return createElement('div', {
2381
+ attrs: {
2382
+ 'class': 'field-body'
2383
+ }
2384
+ }, this.$slots.default.map(function (element) {
2385
+ // skip returns and comments
2386
+ if (!element.tag) {
2387
+ return element;
2388
+ }
2389
+ var message;
2390
+ if (first) {
2391
+ message = _this.message;
2392
+ first = false;
2393
+ }
2394
+ return createElement('b-field', {
2395
+ attrs: {
2396
+ type: _this.type,
2397
+ message: message
2398
+ }
2399
+ }, [element]);
2400
+ }));
2401
+ }
2402
+ };
2403
+
2404
+ /* script */
2405
+ const __vue_script__$3 = script$3;
2406
+
2407
+ /* template */
2408
+
2409
+ /* style */
2410
+ const __vue_inject_styles__$3 = undefined;
2411
+ /* scoped */
2412
+ const __vue_scope_id__$3 = undefined;
2413
+ /* module identifier */
2414
+ const __vue_module_identifier__$3 = undefined;
2415
+ /* functional template */
2416
+ const __vue_is_functional_template__$3 = undefined;
2417
+ /* style inject */
2418
+
2419
+ /* style inject SSR */
2420
+
2421
+ /* style inject shadow dom */
2422
+
2423
+
2424
+
2425
+ const __vue_component__$3 = /*#__PURE__*/normalizeComponent(
2426
+ {},
2427
+ __vue_inject_styles__$3,
2428
+ __vue_script__$3,
2429
+ __vue_scope_id__$3,
2430
+ __vue_is_functional_template__$3,
2431
+ __vue_module_identifier__$3,
2432
+ false,
2433
+ undefined,
2434
+ undefined,
2435
+ undefined
2436
+ );
2437
+
2438
+ var FieldBody = __vue_component__$3;
2439
+
2440
+ var script$2 = {
2441
+ name: 'BField',
2442
+ components: _defineProperty({}, FieldBody.name, FieldBody),
2443
+ provide: function provide() {
2444
+ return {
2445
+ 'BField': this
2446
+ };
2447
+ },
2448
+ inject: {
2449
+ parent: {
2450
+ from: 'BField',
2451
+ default: false
2452
+ }
2453
+ },
2454
+ // Used internally only when using Field in Field
2455
+ props: {
2456
+ type: [String, Object],
2457
+ label: String,
2458
+ labelFor: String,
2459
+ message: [String, Array, Object],
2460
+ grouped: Boolean,
2461
+ groupMultiline: Boolean,
2462
+ position: String,
2463
+ expanded: Boolean,
2464
+ horizontal: Boolean,
2465
+ addons: {
2466
+ type: Boolean,
2467
+ default: true
2468
+ },
2469
+ customClass: String,
2470
+ labelPosition: {
2471
+ type: String,
2472
+ default: function _default() {
2473
+ return config.defaultFieldLabelPosition;
2474
+ }
2475
+ }
2476
+ },
2477
+ data: function data() {
2478
+ return {
2479
+ newType: this.type,
2480
+ newMessage: this.message,
2481
+ fieldLabelSize: null,
2482
+ _isField: true // Used internally by Input and Select
2483
+ };
2484
+ },
2485
+ computed: {
2486
+ rootClasses: function rootClasses() {
2487
+ return [{
2488
+ 'is-expanded': this.expanded,
2489
+ 'is-horizontal': this.horizontal,
2490
+ 'is-floating-in-label': this.hasLabel && !this.horizontal && this.labelPosition === 'inside',
2491
+ 'is-floating-label': this.hasLabel && !this.horizontal && this.labelPosition === 'on-border'
2492
+ }, this.numberInputClasses];
2493
+ },
2494
+ innerFieldClasses: function innerFieldClasses() {
2495
+ return [this.fieldType(), this.newPosition, {
2496
+ 'is-grouped-multiline': this.groupMultiline
2497
+ }];
2498
+ },
2499
+ hasInnerField: function hasInnerField() {
2500
+ return this.grouped || this.groupMultiline || this.hasAddons();
2501
+ },
2502
+ /**
2503
+ * Correct Bulma class for the side of the addon or group.
2504
+ *
2505
+ * This is not kept like the others (is-small, etc.),
2506
+ * because since 'has-addons' is set automatically it
2507
+ * doesn't make sense to teach users what addons are exactly.
2508
+ */
2509
+ newPosition: function newPosition() {
2510
+ if (this.position === undefined) return;
2511
+ var position = this.position.split('-');
2512
+ if (position.length < 1) return;
2513
+ var prefix = this.grouped ? 'is-grouped-' : 'has-addons-';
2514
+ if (this.position) return prefix + position[1];
2515
+ },
2516
+ /**
2517
+ * Formatted message in case it's an array
2518
+ * (each element is separated by <br> tag)
2519
+ */
2520
+ formattedMessage: function formattedMessage() {
2521
+ if (this.parent && this.parent.hasInnerField) {
2522
+ return ''; // Message will be displayed in parent field
2523
+ }
2524
+ if (typeof this.newMessage === 'string') {
2525
+ return [this.newMessage];
2526
+ }
2527
+ var messages = [];
2528
+ if (Array.isArray(this.newMessage)) {
2529
+ this.newMessage.forEach(function (message) {
2530
+ if (typeof message === 'string') {
2531
+ messages.push(message);
2532
+ } else {
2533
+ for (var key in message) {
2534
+ if (message[key]) {
2535
+ messages.push(key);
2536
+ }
2537
+ }
2538
+ }
2539
+ });
2540
+ } else {
2541
+ for (var key in this.newMessage) {
2542
+ if (this.newMessage[key]) {
2543
+ messages.push(key);
2544
+ }
2545
+ }
2546
+ }
2547
+ return messages.filter(function (m) {
2548
+ if (m) return m;
2549
+ });
2550
+ },
2551
+ hasLabel: function hasLabel() {
2552
+ return this.label || this.$slots.label;
2553
+ },
2554
+ hasMessage: function hasMessage() {
2555
+ return (!this.parent || !this.parent.hasInnerField) && this.newMessage || this.$slots.message;
2556
+ },
2557
+ numberInputClasses: function numberInputClasses() {
2558
+ if (this.$slots.default) {
2559
+ var numberinput = this.$slots.default.filter(function (node) {
2560
+ return node.tag && node.tag.toLowerCase().indexOf('numberinput') >= 0;
2561
+ })[0];
2562
+ if (numberinput) {
2563
+ var classes = ['has-numberinput'];
2564
+ var controlsPosition = numberinput.componentOptions.propsData.controlsPosition;
2565
+ var size = numberinput.componentOptions.propsData.size;
2566
+ if (controlsPosition) {
2567
+ classes.push("has-numberinput-".concat(controlsPosition));
2568
+ }
2569
+ if (size) {
2570
+ classes.push("has-numberinput-".concat(size));
2571
+ }
2572
+ return classes;
2573
+ }
2574
+ }
2575
+ return null;
2576
+ }
2577
+ },
2578
+ watch: {
2579
+ /**
2580
+ * Set internal type when prop change.
2581
+ */
2582
+ type: function type(value) {
2583
+ this.newType = value;
2584
+ },
2585
+ /**
2586
+ * Set internal message when prop change.
2587
+ */
2588
+ message: function message(value) {
2589
+ this.newMessage = value;
2590
+ },
2591
+ /**
2592
+ * Set parent message if we use Field in Field.
2593
+ */
2594
+ newMessage: function newMessage(value) {
2595
+ if (this.parent && this.parent.hasInnerField) {
2596
+ if (!this.parent.type) {
2597
+ this.parent.newType = this.newType;
2598
+ }
2599
+ if (!this.parent.message) {
2600
+ this.parent.newMessage = value;
2601
+ }
2602
+ }
2603
+ }
2604
+ },
2605
+ methods: {
2606
+ /**
2607
+ * Field has addons if there are more than one slot
2608
+ * (element / component) in the Field.
2609
+ * Or is grouped when prop is set.
2610
+ * Is a method to be called when component re-render.
2611
+ */
2612
+ fieldType: function fieldType() {
2613
+ if (this.grouped) return 'is-grouped';
2614
+ if (this.hasAddons()) return 'has-addons';
2615
+ },
2616
+ hasAddons: function hasAddons() {
2617
+ var renderedNode = 0;
2618
+ if (this.$slots.default) {
2619
+ renderedNode = this.$slots.default.reduce(function (i, node) {
2620
+ return node.tag ? i + 1 : i;
2621
+ }, 0);
2622
+ }
2623
+ return renderedNode > 1 && this.addons && !this.horizontal;
2624
+ }
2625
+ },
2626
+ mounted: function mounted() {
2627
+ if (this.horizontal) {
2628
+ // Bulma docs: .is-normal for any .input or .button
2629
+ var elements = this.$el.querySelectorAll('.input, .select, .button, .textarea, .b-slider');
2630
+ if (elements.length > 0) {
2631
+ this.fieldLabelSize = 'is-normal';
2632
+ }
2633
+ }
2634
+ }
2635
+ };
2636
+
2637
+ /* script */
2638
+ const __vue_script__$2 = script$2;
2639
+
2640
+ /* template */
2641
+ var __vue_render__$2 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"field",class:_vm.rootClasses},[(_vm.horizontal)?_c('div',{staticClass:"field-label",class:[_vm.customClass, _vm.fieldLabelSize]},[(_vm.hasLabel)?_c('label',{staticClass:"label",class:_vm.customClass,attrs:{"for":_vm.labelFor}},[(_vm.$slots.label)?_vm._t("label"):[_vm._v(_vm._s(_vm.label))]],2):_vm._e()]):[(_vm.hasLabel)?_c('label',{staticClass:"label",class:_vm.customClass,attrs:{"for":_vm.labelFor}},[(_vm.$slots.label)?_vm._t("label"):[_vm._v(_vm._s(_vm.label))]],2):_vm._e()],(_vm.horizontal)?_c('b-field-body',{attrs:{"message":_vm.newMessage ? _vm.formattedMessage : '',"type":_vm.newType}},[_vm._t("default")],2):(_vm.hasInnerField)?_c('div',{staticClass:"field-body"},[_c('b-field',{class:_vm.innerFieldClasses,attrs:{"addons":false,"type":_vm.type}},[_vm._t("default")],2)],1):[_vm._t("default")],(_vm.hasMessage && !_vm.horizontal)?_c('p',{staticClass:"help",class:_vm.newType},[(_vm.$slots.message)?_vm._t("message",null,{"messages":_vm.formattedMessage}):[_vm._l((_vm.formattedMessage),function(mess,i){return [_vm._v(" "+_vm._s(mess)+" "),((i + 1) < _vm.formattedMessage.length)?_c('br',{key:i}):_vm._e()]})]],2):_vm._e()],2)};
2642
+ var __vue_staticRenderFns__$2 = [];
2643
+
2644
+ /* style */
2645
+ const __vue_inject_styles__$2 = undefined;
2646
+ /* scoped */
2647
+ const __vue_scope_id__$2 = undefined;
2648
+ /* module identifier */
2649
+ const __vue_module_identifier__$2 = undefined;
2650
+ /* functional template */
2651
+ const __vue_is_functional_template__$2 = false;
2652
+ /* style inject */
2653
+
2654
+ /* style inject SSR */
2655
+
2656
+ /* style inject shadow dom */
2657
+
2658
+
2659
+
2660
+ const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
2661
+ { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
2662
+ __vue_inject_styles__$2,
2663
+ __vue_script__$2,
2664
+ __vue_scope_id__$2,
2665
+ __vue_is_functional_template__$2,
2666
+ __vue_module_identifier__$2,
2667
+ false,
2668
+ undefined,
2669
+ undefined,
2670
+ undefined
2671
+ );
2672
+
2673
+ var Field = __vue_component__$2;
2674
+
2675
+ var script$1 = {
2676
+ name: 'BSelect',
2677
+ components: _defineProperty({}, Icon.name, Icon),
2678
+ mixins: [FormElementMixin],
2679
+ inheritAttrs: false,
2680
+ props: {
2681
+ value: {
2682
+ type: [String, Number, Boolean, Object, Array, Function, Date],
2683
+ default: null
2684
+ },
2685
+ placeholder: String,
2686
+ multiple: Boolean,
2687
+ nativeSize: [String, Number]
2688
+ },
2689
+ data: function data() {
2690
+ return {
2691
+ selected: this.value,
2692
+ _elementRef: 'select'
2693
+ };
2694
+ },
2695
+ computed: {
2696
+ computedValue: {
2697
+ get: function get() {
2698
+ return this.selected;
2699
+ },
2700
+ set: function set(value) {
2701
+ this.selected = value;
2702
+ this.$emit('input', value);
2703
+ !this.isValid && this.checkHtml5Validity();
2704
+ }
2705
+ },
2706
+ spanClasses: function spanClasses() {
2707
+ return [this.size, this.statusType, {
2708
+ 'is-fullwidth': this.expanded,
2709
+ 'is-loading': this.loading,
2710
+ 'is-multiple': this.multiple,
2711
+ 'is-rounded': this.rounded,
2712
+ 'is-empty': this.selected === null
2713
+ }];
2714
+ }
2715
+ },
2716
+ watch: {
2717
+ /**
2718
+ * When v-model is changed:
2719
+ * 1. Set the selected option.
2720
+ * 2. If it's invalid, validate again.
2721
+ */
2722
+ value: function value(_value) {
2723
+ this.selected = _value;
2724
+ !this.isValid && this.checkHtml5Validity();
2725
+ }
2726
+ }
2727
+ };
2728
+
2729
+ /* script */
2730
+ const __vue_script__$1 = script$1;
2731
+
2732
+ /* template */
2733
+ var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"control",class:{ 'is-expanded': _vm.expanded, 'has-icons-left': _vm.icon }},[_c('span',{staticClass:"select",class:_vm.spanClasses},[_c('select',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.computedValue),expression:"computedValue"}],ref:"select",attrs:{"multiple":_vm.multiple,"size":_vm.nativeSize},on:{"blur":function($event){_vm.$emit('blur', $event) && _vm.checkHtml5Validity();},"focus":function($event){return _vm.$emit('focus', $event)},"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.computedValue=$event.target.multiple ? $$selectedVal : $$selectedVal[0];}}},'select',_vm.$attrs,false),[(_vm.placeholder)?[(_vm.computedValue == null)?_c('option',{attrs:{"disabled":"","hidden":""},domProps:{"value":null}},[_vm._v(" "+_vm._s(_vm.placeholder)+" ")]):_vm._e()]:_vm._e(),_vm._t("default")],2)]),(_vm.icon)?_c('b-icon',{staticClass:"is-left",attrs:{"icon":_vm.icon,"pack":_vm.iconPack,"size":_vm.iconSize}}):_vm._e()],1)};
2734
+ var __vue_staticRenderFns__$1 = [];
2735
+
2736
+ /* style */
2737
+ const __vue_inject_styles__$1 = undefined;
2738
+ /* scoped */
2739
+ const __vue_scope_id__$1 = undefined;
2740
+ /* module identifier */
2741
+ const __vue_module_identifier__$1 = undefined;
2742
+ /* functional template */
2743
+ const __vue_is_functional_template__$1 = false;
2744
+ /* style inject */
2745
+
2746
+ /* style inject SSR */
2747
+
2748
+ /* style inject shadow dom */
2749
+
2750
+
2751
+
2752
+ const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
2753
+ { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
2754
+ __vue_inject_styles__$1,
2755
+ __vue_script__$1,
2756
+ __vue_scope_id__$1,
2757
+ __vue_is_functional_template__$1,
2758
+ __vue_module_identifier__$1,
2759
+ false,
2760
+ undefined,
2761
+ undefined,
2762
+ undefined
2763
+ );
2764
+
2765
+ var Select = __vue_component__$1;
2766
+
2767
+ var script = {
2768
+ name: 'BTimepicker',
2769
+ components: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Input.name, Input), Field.name, Field), Select.name, Select), Icon.name, Icon), Dropdown.name, Dropdown), DropdownItem.name, DropdownItem),
2770
+ mixins: [TimepickerMixin],
2771
+ inheritAttrs: false,
2772
+ data: function data() {
2773
+ return {
2774
+ _isTimepicker: true
2775
+ };
2776
+ },
2777
+ computed: {
2778
+ nativeStep: function nativeStep() {
2779
+ if (this.enableSeconds) return '1';
2780
+ }
2781
+ }
2782
+ };
2783
+
2784
+ /* script */
2785
+ const __vue_script__ = script;
2786
+
2787
+ /* template */
2788
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"timepicker control",class:[_vm.size, {'is-expanded': _vm.expanded}]},[(!_vm.isMobile || _vm.inline)?_c('b-dropdown',{ref:"dropdown",attrs:{"position":_vm.position,"disabled":_vm.disabled,"inline":_vm.inline,"mobile-modal":_vm.mobileModal,"append-to-body":_vm.appendToBody,"append-to-body-copy-parent":""},on:{"active-change":_vm.onActiveChange},scopedSlots:_vm._u([(!_vm.inline)?{key:"trigger",fn:function(){return [_vm._t("trigger",[_c('b-input',_vm._b({ref:"input",attrs:{"autocomplete":"off","value":_vm.formatValue(_vm.computedValue),"placeholder":_vm.placeholder,"size":_vm.size,"icon":_vm.icon,"icon-pack":_vm.iconPack,"loading":_vm.loading,"disabled":_vm.disabled,"readonly":!_vm.editable,"rounded":_vm.rounded,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.handleOnFocus},nativeOn:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.toggle(true)},"change":function($event){return _vm.onChange($event.target.value)}}},'b-input',_vm.$attrs,false))])]},proxy:true}:null],null,true)},[_c('b-dropdown-item',{attrs:{"disabled":_vm.disabled,"focusable":_vm.focusable,"custom":""}},[_c('b-field',{attrs:{"grouped":"","position":"is-centered"}},[_c('b-select',{attrs:{"disabled":_vm.disabled,"placeholder":"00"},nativeOn:{"change":function($event){return _vm.onHoursChange($event.target.value)}},model:{value:(_vm.hoursSelected),callback:function ($$v) {_vm.hoursSelected=$$v;},expression:"hoursSelected"}},_vm._l((_vm.hours),function(hour){return _c('option',{key:hour.value,attrs:{"disabled":_vm.isHourDisabled(hour.value)},domProps:{"value":hour.value}},[_vm._v(" "+_vm._s(hour.label)+" ")])}),0),_c('span',{staticClass:"control is-colon"},[_vm._v(_vm._s(_vm.hourLiteral))]),_c('b-select',{attrs:{"disabled":_vm.disabled,"placeholder":"00"},nativeOn:{"change":function($event){return _vm.onMinutesChange($event.target.value)}},model:{value:(_vm.minutesSelected),callback:function ($$v) {_vm.minutesSelected=$$v;},expression:"minutesSelected"}},_vm._l((_vm.minutes),function(minute){return _c('option',{key:minute.value,attrs:{"disabled":_vm.isMinuteDisabled(minute.value)},domProps:{"value":minute.value}},[_vm._v(" "+_vm._s(minute.label)+" ")])}),0),(_vm.enableSeconds)?[_c('span',{staticClass:"control is-colon"},[_vm._v(_vm._s(_vm.minuteLiteral))]),_c('b-select',{attrs:{"disabled":_vm.disabled,"placeholder":"00"},nativeOn:{"change":function($event){return _vm.onSecondsChange($event.target.value)}},model:{value:(_vm.secondsSelected),callback:function ($$v) {_vm.secondsSelected=$$v;},expression:"secondsSelected"}},_vm._l((_vm.seconds),function(second){return _c('option',{key:second.value,attrs:{"disabled":_vm.isSecondDisabled(second.value)},domProps:{"value":second.value}},[_vm._v(" "+_vm._s(second.label)+" ")])}),0),_c('span',{staticClass:"control is-colon"},[_vm._v(_vm._s(_vm.secondLiteral))])]:_vm._e(),(!_vm.isHourFormat24)?_c('b-select',{attrs:{"disabled":_vm.disabled},nativeOn:{"change":function($event){return _vm.onMeridienChange($event.target.value)}},model:{value:(_vm.meridienSelected),callback:function ($$v) {_vm.meridienSelected=$$v;},expression:"meridienSelected"}},_vm._l((_vm.meridiens),function(meridien){return _c('option',{key:meridien,domProps:{"value":meridien}},[_vm._v(" "+_vm._s(meridien)+" ")])}),0):_vm._e()],2),(_vm.$slots.default !== undefined && _vm.$slots.default.length)?_c('footer',{staticClass:"timepicker-footer"},[_vm._t("default")],2):_vm._e()],1)],1):_c('b-input',_vm._b({ref:"input",attrs:{"type":"time","step":_vm.nativeStep,"autocomplete":"off","value":_vm.formatHHMMSS(_vm.computedValue),"placeholder":_vm.placeholder,"size":_vm.size,"icon":_vm.icon,"icon-pack":_vm.iconPack,"rounded":_vm.rounded,"loading":_vm.loading,"max":_vm.formatHHMMSS(_vm.maxTime),"min":_vm.formatHHMMSS(_vm.minTime),"disabled":_vm.disabled,"readonly":false,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.handleOnFocus,"blur":function($event){_vm.onBlur() && _vm.checkHtml5Validity();}},nativeOn:{"change":function($event){return _vm.onChange($event.target.value)}}},'b-input',_vm.$attrs,false))],1)};
2789
+ var __vue_staticRenderFns__ = [];
2790
+
2791
+ /* style */
2792
+ const __vue_inject_styles__ = undefined;
2793
+ /* scoped */
2794
+ const __vue_scope_id__ = undefined;
2795
+ /* module identifier */
2796
+ const __vue_module_identifier__ = undefined;
2797
+ /* functional template */
2798
+ const __vue_is_functional_template__ = false;
2799
+ /* style inject */
2800
+
2801
+ /* style inject SSR */
2802
+
2803
+ /* style inject shadow dom */
2804
+
2805
+
2806
+
2807
+ const __vue_component__ = /*#__PURE__*/normalizeComponent(
2808
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
2809
+ __vue_inject_styles__,
2810
+ __vue_script__,
2811
+ __vue_scope_id__,
2812
+ __vue_is_functional_template__,
2813
+ __vue_module_identifier__,
2814
+ false,
2815
+ undefined,
2816
+ undefined,
2817
+ undefined
2818
+ );
2819
+
2820
+ var Timepicker = __vue_component__;
2821
+
2822
+ var use = function use(plugin) {
2823
+ if (typeof window !== 'undefined' && window.Vue) {
2824
+ window.Vue.use(plugin);
2825
+ }
2826
+ };
2827
+ var registerComponent = function registerComponent(Vue, component) {
2828
+ Vue.component(component.name, component);
2829
+ };
2830
+
2831
+ var Plugin = {
2832
+ install: function install(Vue) {
2833
+ registerComponent(Vue, Timepicker);
2834
+ }
2835
+ };
2836
+ use(Plugin);
2837
+
2838
+ exports.BTimepicker = Timepicker;
2839
+ exports["default"] = Plugin;
2840
+
2841
+ Object.defineProperty(exports, '__esModule', { value: true });
2842
+
2843
+ }));