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,1119 @@
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.Numberinput = {}));
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 _arrayWithHoles(arr) {
70
+ if (Array.isArray(arr)) return arr;
71
+ }
72
+ function _iterableToArray(iter) {
73
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
74
+ }
75
+ function _unsupportedIterableToArray(o, minLen) {
76
+ if (!o) return;
77
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
78
+ var n = Object.prototype.toString.call(o).slice(8, -1);
79
+ if (n === "Object" && o.constructor) n = o.constructor.name;
80
+ if (n === "Map" || n === "Set") return Array.from(o);
81
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
82
+ }
83
+ function _arrayLikeToArray(arr, len) {
84
+ if (len == null || len > arr.length) len = arr.length;
85
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
86
+ return arr2;
87
+ }
88
+ function _nonIterableRest() {
89
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
90
+ }
91
+
92
+ var config = {
93
+ defaultContainerElement: null,
94
+ defaultIconPack: 'mdi',
95
+ defaultIconComponent: null,
96
+ defaultIconPrev: 'chevron-left',
97
+ defaultIconNext: 'chevron-right',
98
+ defaultLocale: undefined,
99
+ defaultDialogConfirmText: null,
100
+ defaultDialogCancelText: null,
101
+ defaultSnackbarDuration: 3500,
102
+ defaultSnackbarPosition: null,
103
+ defaultToastDuration: 2000,
104
+ defaultToastPosition: null,
105
+ defaultNotificationDuration: 2000,
106
+ defaultNotificationPosition: null,
107
+ defaultTooltipType: 'is-primary',
108
+ defaultTooltipDelay: null,
109
+ defaultTooltipCloseDelay: null,
110
+ defaultSidebarDelay: null,
111
+ defaultInputAutocomplete: 'on',
112
+ defaultDateFormatter: null,
113
+ defaultDateParser: null,
114
+ defaultDateCreator: null,
115
+ defaultTimeCreator: null,
116
+ defaultDayNames: null,
117
+ defaultMonthNames: null,
118
+ defaultFirstDayOfWeek: null,
119
+ defaultUnselectableDaysOfWeek: null,
120
+ defaultTimeFormatter: null,
121
+ defaultTimeParser: null,
122
+ defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
123
+ defaultModalScroll: null,
124
+ defaultDatepickerMobileNative: true,
125
+ defaultTimepickerMobileNative: true,
126
+ defaultTimepickerMobileModal: true,
127
+ defaultNoticeQueue: true,
128
+ defaultInputHasCounter: true,
129
+ defaultTaginputHasCounter: true,
130
+ defaultUseHtml5Validation: true,
131
+ defaultDropdownMobileModal: true,
132
+ defaultFieldLabelPosition: null,
133
+ defaultDatepickerYearsRange: [-100, 10],
134
+ defaultDatepickerNearbyMonthDays: true,
135
+ defaultDatepickerNearbySelectableMonthDays: false,
136
+ defaultDatepickerShowWeekNumber: false,
137
+ defaultDatepickerWeekNumberClickable: false,
138
+ defaultDatepickerMobileModal: true,
139
+ defaultTrapFocus: true,
140
+ defaultAutoFocus: true,
141
+ defaultButtonRounded: false,
142
+ defaultSwitchRounded: true,
143
+ defaultCarouselInterval: 3500,
144
+ defaultTabsExpanded: false,
145
+ defaultTabsAnimated: true,
146
+ defaultTabsType: null,
147
+ defaultStatusIcon: true,
148
+ defaultProgrammaticPromise: false,
149
+ defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
150
+ defaultImageWebpFallback: null,
151
+ defaultImageLazy: true,
152
+ defaultImageResponsive: true,
153
+ defaultImageRatio: null,
154
+ defaultImageSrcsetFormatter: null,
155
+ defaultBreadcrumbTag: 'a',
156
+ defaultBreadcrumbAlign: 'is-left',
157
+ defaultBreadcrumbSeparator: '',
158
+ defaultBreadcrumbSize: 'is-medium',
159
+ customIconPacks: null
160
+ };
161
+
162
+ /**
163
+ * Merge function to replace Object.assign with deep merging possibility
164
+ */
165
+ var isObject = function isObject(item) {
166
+ return _typeof(item) === 'object' && !Array.isArray(item);
167
+ };
168
+ var mergeFn = function mergeFn(target, source) {
169
+ var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
170
+ if (deep || !Object.assign) {
171
+ var isDeep = function isDeep(prop) {
172
+ return isObject(source[prop]) && target !== null && target.hasOwnProperty(prop) && isObject(target[prop]);
173
+ };
174
+ var replaced = Object.getOwnPropertyNames(source).map(function (prop) {
175
+ return _defineProperty({}, prop, isDeep(prop) ? mergeFn(target[prop], source[prop], deep) : source[prop]);
176
+ }).reduce(function (a, b) {
177
+ return _objectSpread2(_objectSpread2({}, a), b);
178
+ }, {});
179
+ return _objectSpread2(_objectSpread2({}, target), replaced);
180
+ } else {
181
+ return Object.assign(target, source);
182
+ }
183
+ };
184
+ var merge = mergeFn;
185
+ function isVueComponent(c) {
186
+ return c && c._isVue;
187
+ }
188
+
189
+ var mdiIcons = {
190
+ sizes: {
191
+ 'default': 'mdi-24px',
192
+ 'is-small': null,
193
+ 'is-medium': 'mdi-36px',
194
+ 'is-large': 'mdi-48px'
195
+ },
196
+ iconPrefix: 'mdi-'
197
+ };
198
+ var faIcons = function faIcons() {
199
+ var faIconPrefix = config && config.defaultIconComponent ? '' : 'fa-';
200
+ return {
201
+ sizes: {
202
+ 'default': null,
203
+ 'is-small': null,
204
+ 'is-medium': faIconPrefix + 'lg',
205
+ 'is-large': faIconPrefix + '2x'
206
+ },
207
+ iconPrefix: faIconPrefix,
208
+ internalIcons: {
209
+ 'information': 'info-circle',
210
+ 'alert': 'exclamation-triangle',
211
+ 'alert-circle': 'exclamation-circle',
212
+ 'chevron-right': 'angle-right',
213
+ 'chevron-left': 'angle-left',
214
+ 'chevron-down': 'angle-down',
215
+ 'eye-off': 'eye-slash',
216
+ 'menu-down': 'caret-down',
217
+ 'menu-up': 'caret-up',
218
+ 'close-circle': 'times-circle'
219
+ }
220
+ };
221
+ };
222
+ var getIcons = function getIcons() {
223
+ var icons = {
224
+ mdi: mdiIcons,
225
+ fa: faIcons(),
226
+ fas: faIcons(),
227
+ far: faIcons(),
228
+ fad: faIcons(),
229
+ fab: faIcons(),
230
+ fal: faIcons(),
231
+ 'fa-solid': faIcons(),
232
+ 'fa-regular': faIcons(),
233
+ 'fa-light': faIcons(),
234
+ 'fa-thin': faIcons(),
235
+ 'fa-duotone': faIcons(),
236
+ 'fa-brands': faIcons()
237
+ };
238
+ if (config && config.customIconPacks) {
239
+ icons = merge(icons, config.customIconPacks, true);
240
+ }
241
+ return icons;
242
+ };
243
+ var getIcons$1 = getIcons;
244
+
245
+ var script$2 = {
246
+ name: 'BIcon',
247
+ props: {
248
+ type: [String, Object],
249
+ component: String,
250
+ pack: String,
251
+ icon: String,
252
+ size: String,
253
+ customSize: String,
254
+ customClass: String,
255
+ both: Boolean // This is used internally to show both MDI and FA icon
256
+ },
257
+ computed: {
258
+ iconConfig: function iconConfig() {
259
+ var allIcons = getIcons$1();
260
+ return allIcons[this.newPack];
261
+ },
262
+ iconPrefix: function iconPrefix() {
263
+ if (this.iconConfig && this.iconConfig.iconPrefix) {
264
+ return this.iconConfig.iconPrefix;
265
+ }
266
+ return '';
267
+ },
268
+ /**
269
+ * Internal icon name based on the pack.
270
+ * If pack is 'fa', gets the equivalent FA icon name of the MDI,
271
+ * internal icons are always MDI.
272
+ */
273
+ newIcon: function newIcon() {
274
+ return "".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon));
275
+ },
276
+ newPack: function newPack() {
277
+ return this.pack || config.defaultIconPack;
278
+ },
279
+ newType: function newType() {
280
+ if (!this.type) return;
281
+ var splitType = [];
282
+ if (typeof this.type === 'string') {
283
+ splitType = this.type.split('-');
284
+ } else {
285
+ for (var key in this.type) {
286
+ if (this.type[key]) {
287
+ splitType = key.split('-');
288
+ break;
289
+ }
290
+ }
291
+ }
292
+ if (splitType.length <= 1) return;
293
+ var _splitType = splitType,
294
+ _splitType2 = _toArray(_splitType),
295
+ type = _splitType2.slice(1);
296
+ return "has-text-".concat(type.join('-'));
297
+ },
298
+ newCustomSize: function newCustomSize() {
299
+ return this.customSize || this.customSizeByPack;
300
+ },
301
+ customSizeByPack: function customSizeByPack() {
302
+ if (this.iconConfig && this.iconConfig.sizes) {
303
+ if (this.size && this.iconConfig.sizes[this.size] !== undefined) {
304
+ return this.iconConfig.sizes[this.size];
305
+ } else if (this.iconConfig.sizes.default) {
306
+ return this.iconConfig.sizes.default;
307
+ }
308
+ }
309
+ return null;
310
+ },
311
+ useIconComponent: function useIconComponent() {
312
+ return this.component || config.defaultIconComponent;
313
+ }
314
+ },
315
+ methods: {
316
+ /**
317
+ * Equivalent icon name of the MDI.
318
+ */
319
+ getEquivalentIconOf: function getEquivalentIconOf(value) {
320
+ // Only transform the class if the both prop is set to true
321
+ if (!this.both) {
322
+ return value;
323
+ }
324
+ if (this.iconConfig && this.iconConfig.internalIcons && this.iconConfig.internalIcons[value]) {
325
+ return this.iconConfig.internalIcons[value];
326
+ }
327
+ return value;
328
+ }
329
+ }
330
+ };
331
+
332
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
333
+ if (typeof shadowMode !== 'boolean') {
334
+ createInjectorSSR = createInjector;
335
+ createInjector = shadowMode;
336
+ shadowMode = false;
337
+ }
338
+ // Vue.extend constructor export interop.
339
+ const options = typeof script === 'function' ? script.options : script;
340
+ // render functions
341
+ if (template && template.render) {
342
+ options.render = template.render;
343
+ options.staticRenderFns = template.staticRenderFns;
344
+ options._compiled = true;
345
+ // functional template
346
+ if (isFunctionalTemplate) {
347
+ options.functional = true;
348
+ }
349
+ }
350
+ // scopedId
351
+ if (scopeId) {
352
+ options._scopeId = scopeId;
353
+ }
354
+ let hook;
355
+ if (moduleIdentifier) {
356
+ // server build
357
+ hook = function (context) {
358
+ // 2.3 injection
359
+ context =
360
+ context || // cached call
361
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
362
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
363
+ // 2.2 with runInNewContext: true
364
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
365
+ context = __VUE_SSR_CONTEXT__;
366
+ }
367
+ // inject component styles
368
+ if (style) {
369
+ style.call(this, createInjectorSSR(context));
370
+ }
371
+ // register component module identifier for async chunk inference
372
+ if (context && context._registeredComponents) {
373
+ context._registeredComponents.add(moduleIdentifier);
374
+ }
375
+ };
376
+ // used by ssr in case component is cached and beforeCreate
377
+ // never gets called
378
+ options._ssrRegister = hook;
379
+ }
380
+ else if (style) {
381
+ hook = shadowMode
382
+ ? function (context) {
383
+ style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
384
+ }
385
+ : function (context) {
386
+ style.call(this, createInjector(context));
387
+ };
388
+ }
389
+ if (hook) {
390
+ if (options.functional) {
391
+ // register for functional component in vue file
392
+ const originalRender = options.render;
393
+ options.render = function renderWithStyleInjection(h, context) {
394
+ hook.call(context);
395
+ return originalRender(h, context);
396
+ };
397
+ }
398
+ else {
399
+ // inject component registration as beforeCreate hook
400
+ const existing = options.beforeCreate;
401
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
402
+ }
403
+ }
404
+ return script;
405
+ }
406
+
407
+ /* script */
408
+ const __vue_script__$2 = script$2;
409
+
410
+ /* template */
411
+ var __vue_render__$2 = 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)};
412
+ var __vue_staticRenderFns__$2 = [];
413
+
414
+ /* style */
415
+ const __vue_inject_styles__$2 = undefined;
416
+ /* scoped */
417
+ const __vue_scope_id__$2 = undefined;
418
+ /* module identifier */
419
+ const __vue_module_identifier__$2 = undefined;
420
+ /* functional template */
421
+ const __vue_is_functional_template__$2 = false;
422
+ /* style inject */
423
+
424
+ /* style inject SSR */
425
+
426
+ /* style inject shadow dom */
427
+
428
+
429
+
430
+ const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
431
+ { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
432
+ __vue_inject_styles__$2,
433
+ __vue_script__$2,
434
+ __vue_scope_id__$2,
435
+ __vue_is_functional_template__$2,
436
+ __vue_module_identifier__$2,
437
+ false,
438
+ undefined,
439
+ undefined,
440
+ undefined
441
+ );
442
+
443
+ var Icon = __vue_component__$2;
444
+
445
+ var FormElementMixin = {
446
+ props: {
447
+ size: String,
448
+ expanded: Boolean,
449
+ loading: Boolean,
450
+ rounded: Boolean,
451
+ icon: String,
452
+ iconPack: String,
453
+ // Native options to use in HTML5 validation
454
+ autocomplete: String,
455
+ maxlength: [Number, String],
456
+ useHtml5Validation: {
457
+ type: Boolean,
458
+ default: function _default() {
459
+ return config.defaultUseHtml5Validation;
460
+ }
461
+ },
462
+ validationMessage: String,
463
+ locale: {
464
+ type: [String, Array],
465
+ default: function _default() {
466
+ return config.defaultLocale;
467
+ }
468
+ },
469
+ statusIcon: {
470
+ type: Boolean,
471
+ default: function _default() {
472
+ return config.defaultStatusIcon;
473
+ }
474
+ }
475
+ },
476
+ data: function data() {
477
+ return {
478
+ isValid: true,
479
+ isFocused: false,
480
+ newIconPack: this.iconPack || config.defaultIconPack
481
+ };
482
+ },
483
+ computed: {
484
+ /**
485
+ * Find parent Field, max 3 levels deep.
486
+ */
487
+ parentField: function parentField() {
488
+ var parent = this.$parent;
489
+ for (var i = 0; i < 3; i++) {
490
+ if (parent && !parent.$data._isField) {
491
+ parent = parent.$parent;
492
+ }
493
+ }
494
+ return parent;
495
+ },
496
+ /**
497
+ * Get the type prop from parent if it's a Field.
498
+ */
499
+ statusType: function statusType() {
500
+ var _ref = this.parentField || {},
501
+ newType = _ref.newType;
502
+ if (!newType) return;
503
+ if (typeof newType === 'string') {
504
+ return newType;
505
+ } else {
506
+ for (var key in newType) {
507
+ if (newType[key]) {
508
+ return key;
509
+ }
510
+ }
511
+ }
512
+ },
513
+ /**
514
+ * Get the message prop from parent if it's a Field.
515
+ */
516
+ statusMessage: function statusMessage() {
517
+ if (!this.parentField) return;
518
+ return this.parentField.newMessage || this.parentField.$slots.message;
519
+ },
520
+ /**
521
+ * Fix icon size for inputs, large was too big
522
+ */
523
+ iconSize: function iconSize() {
524
+ switch (this.size) {
525
+ case 'is-small':
526
+ return this.size;
527
+ case 'is-medium':
528
+ return;
529
+ case 'is-large':
530
+ return this.newIconPack === 'mdi' ? 'is-medium' : '';
531
+ }
532
+ }
533
+ },
534
+ methods: {
535
+ /**
536
+ * Focus method that work dynamically depending on the component.
537
+ */
538
+ focus: function focus() {
539
+ var el = this.getElement();
540
+ if (el === undefined) return;
541
+ this.$nextTick(function () {
542
+ if (el) el.focus();
543
+ });
544
+ },
545
+ onBlur: function onBlur($event) {
546
+ this.isFocused = false;
547
+ this.$emit('blur', $event);
548
+ this.checkHtml5Validity();
549
+ },
550
+ onFocus: function onFocus($event) {
551
+ this.isFocused = true;
552
+ this.$emit('focus', $event);
553
+ },
554
+ getElement: function getElement() {
555
+ var el = this.$refs[this.$data._elementRef];
556
+ while (isVueComponent(el)) {
557
+ el = el.$refs[el.$data._elementRef];
558
+ }
559
+ return el;
560
+ },
561
+ setInvalid: function setInvalid() {
562
+ var type = 'is-danger';
563
+ var message = this.validationMessage || this.getElement().validationMessage;
564
+ this.setValidity(type, message);
565
+ },
566
+ setValidity: function setValidity(type, message) {
567
+ var _this = this;
568
+ this.$nextTick(function () {
569
+ if (_this.parentField) {
570
+ // Set type only if not defined
571
+ if (!_this.parentField.type) {
572
+ _this.parentField.newType = type;
573
+ }
574
+ // Set message only if not defined
575
+ if (!_this.parentField.message) {
576
+ _this.parentField.newMessage = message;
577
+ }
578
+ }
579
+ });
580
+ },
581
+ /**
582
+ * Check HTML5 validation, set isValid property.
583
+ * If validation fail, send 'is-danger' type,
584
+ * and error message to parent if it's a Field.
585
+ */
586
+ checkHtml5Validity: function checkHtml5Validity() {
587
+ if (!this.useHtml5Validation) return;
588
+ var el = this.getElement();
589
+ if (el === undefined) return;
590
+ if (!el.checkValidity()) {
591
+ this.setInvalid();
592
+ this.isValid = false;
593
+ } else {
594
+ this.setValidity(null, null);
595
+ this.isValid = true;
596
+ }
597
+ return this.isValid;
598
+ }
599
+ }
600
+ };
601
+
602
+ var script$1 = {
603
+ name: 'BInput',
604
+ components: _defineProperty({}, Icon.name, Icon),
605
+ mixins: [FormElementMixin],
606
+ inheritAttrs: false,
607
+ props: {
608
+ value: [Number, String],
609
+ type: {
610
+ type: String,
611
+ default: 'text'
612
+ },
613
+ lazy: {
614
+ type: Boolean,
615
+ default: false
616
+ },
617
+ passwordReveal: Boolean,
618
+ iconClickable: Boolean,
619
+ hasCounter: {
620
+ type: Boolean,
621
+ default: function _default() {
622
+ return config.defaultInputHasCounter;
623
+ }
624
+ },
625
+ customClass: {
626
+ type: String,
627
+ default: ''
628
+ },
629
+ iconRight: String,
630
+ iconRightClickable: Boolean,
631
+ iconRightType: String
632
+ },
633
+ data: function data() {
634
+ return {
635
+ newValue: this.value,
636
+ newType: this.type,
637
+ newAutocomplete: this.autocomplete || config.defaultInputAutocomplete,
638
+ isPasswordVisible: false,
639
+ _elementRef: this.type === 'textarea' ? 'textarea' : 'input'
640
+ };
641
+ },
642
+ computed: {
643
+ computedValue: {
644
+ get: function get() {
645
+ return this.newValue;
646
+ },
647
+ set: function set(value) {
648
+ this.newValue = value;
649
+ this.$emit('input', value);
650
+ }
651
+ },
652
+ rootClasses: function rootClasses() {
653
+ return [this.iconPosition, this.size, {
654
+ 'is-expanded': this.expanded,
655
+ 'is-loading': this.loading,
656
+ 'is-clearfix': !this.hasMessage
657
+ }];
658
+ },
659
+ inputClasses: function inputClasses() {
660
+ return [this.statusType, this.size, {
661
+ 'is-rounded': this.rounded
662
+ }];
663
+ },
664
+ hasIconRight: function hasIconRight() {
665
+ return this.passwordReveal || this.loading || this.statusIcon && this.statusTypeIcon || this.iconRight;
666
+ },
667
+ rightIcon: function rightIcon() {
668
+ if (this.passwordReveal) {
669
+ return this.passwordVisibleIcon;
670
+ } else if (this.iconRight) {
671
+ return this.iconRight;
672
+ }
673
+ return this.statusTypeIcon;
674
+ },
675
+ rightIconType: function rightIconType() {
676
+ if (this.passwordReveal) {
677
+ return 'is-primary';
678
+ } else if (this.iconRight) {
679
+ return this.iconRightType || null;
680
+ }
681
+ return this.statusType;
682
+ },
683
+ /**
684
+ * Position of the icon or if it's both sides.
685
+ */
686
+ iconPosition: function iconPosition() {
687
+ var iconClasses = '';
688
+ if (this.icon) {
689
+ iconClasses += 'has-icons-left ';
690
+ }
691
+ if (this.hasIconRight) {
692
+ iconClasses += 'has-icons-right';
693
+ }
694
+ return iconClasses;
695
+ },
696
+ /**
697
+ * Icon name (MDI) based on the type.
698
+ */
699
+ statusTypeIcon: function statusTypeIcon() {
700
+ switch (this.statusType) {
701
+ case 'is-success':
702
+ return 'check';
703
+ case 'is-danger':
704
+ return 'alert-circle';
705
+ case 'is-info':
706
+ return 'information';
707
+ case 'is-warning':
708
+ return 'alert';
709
+ }
710
+ },
711
+ /**
712
+ * Check if have any message prop from parent if it's a Field.
713
+ */
714
+ hasMessage: function hasMessage() {
715
+ return !!this.statusMessage;
716
+ },
717
+ /**
718
+ * Current password-reveal icon name.
719
+ */
720
+ passwordVisibleIcon: function passwordVisibleIcon() {
721
+ return !this.isPasswordVisible ? 'eye' : 'eye-off';
722
+ },
723
+ /**
724
+ * Get value length
725
+ */
726
+ valueLength: function valueLength() {
727
+ if (typeof this.computedValue === 'string') {
728
+ return Array.from(this.computedValue).length;
729
+ } else if (typeof this.computedValue === 'number') {
730
+ return this.computedValue.toString().length;
731
+ }
732
+ return 0;
733
+ }
734
+ },
735
+ watch: {
736
+ /**
737
+ * When v-model is changed:
738
+ * 1. Set internal value.
739
+ * 2. Validate it if the value came from outside;
740
+ * i.e., not equal to computedValue
741
+ */
742
+ value: function value(_value) {
743
+ var _this = this;
744
+ var fromOutside = this.computedValue != _value; // eslint-disable-line eqeqeq
745
+ this.newValue = _value;
746
+ if (fromOutside) {
747
+ // validation must wait for DOM updated
748
+ this.$nextTick(function () {
749
+ !_this.isValid && _this.checkHtml5Validity();
750
+ });
751
+ }
752
+ },
753
+ type: function type(_type) {
754
+ this.newType = _type;
755
+ }
756
+ },
757
+ methods: {
758
+ /**
759
+ * Toggle the visibility of a password-reveal input
760
+ * by changing the type and focus the input right away.
761
+ */
762
+ togglePasswordVisibility: function togglePasswordVisibility() {
763
+ var _this2 = this;
764
+ this.isPasswordVisible = !this.isPasswordVisible;
765
+ this.newType = this.isPasswordVisible ? 'text' : 'password';
766
+ this.$nextTick(function () {
767
+ _this2.focus();
768
+ });
769
+ },
770
+ iconClick: function iconClick(emit, event) {
771
+ var _this3 = this;
772
+ this.$emit(emit, event);
773
+ this.$nextTick(function () {
774
+ _this3.focus();
775
+ });
776
+ },
777
+ rightIconClick: function rightIconClick(event) {
778
+ if (this.passwordReveal) {
779
+ this.togglePasswordVisibility();
780
+ } else if (this.iconRightClickable) {
781
+ this.iconClick('icon-right-click', event);
782
+ }
783
+ },
784
+ onInput: function onInput(event) {
785
+ if (!this.lazy) {
786
+ var value = event.target.value;
787
+ this.updateValue(value);
788
+ }
789
+ },
790
+ onChange: function onChange(event) {
791
+ if (this.lazy) {
792
+ var value = event.target.value;
793
+ this.updateValue(value);
794
+ }
795
+ },
796
+ updateValue: function updateValue(value) {
797
+ this.computedValue = value;
798
+ !this.isValid && this.checkHtml5Validity();
799
+ }
800
+ }
801
+ };
802
+
803
+ /* script */
804
+ const __vue_script__$1 = script$1;
805
+
806
+ /* template */
807
+ var __vue_render__$1 = 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)};
808
+ var __vue_staticRenderFns__$1 = [];
809
+
810
+ /* style */
811
+ const __vue_inject_styles__$1 = undefined;
812
+ /* scoped */
813
+ const __vue_scope_id__$1 = undefined;
814
+ /* module identifier */
815
+ const __vue_module_identifier__$1 = undefined;
816
+ /* functional template */
817
+ const __vue_is_functional_template__$1 = false;
818
+ /* style inject */
819
+
820
+ /* style inject SSR */
821
+
822
+ /* style inject shadow dom */
823
+
824
+
825
+
826
+ const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
827
+ { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
828
+ __vue_inject_styles__$1,
829
+ __vue_script__$1,
830
+ __vue_scope_id__$1,
831
+ __vue_is_functional_template__$1,
832
+ __vue_module_identifier__$1,
833
+ false,
834
+ undefined,
835
+ undefined,
836
+ undefined
837
+ );
838
+
839
+ var Input = __vue_component__$1;
840
+
841
+ var script = {
842
+ name: 'BNumberinput',
843
+ components: _defineProperty(_defineProperty({}, Icon.name, Icon), Input.name, Input),
844
+ mixins: [FormElementMixin],
845
+ inheritAttrs: false,
846
+ props: {
847
+ value: Number,
848
+ min: {
849
+ type: [Number, String]
850
+ },
851
+ max: [Number, String],
852
+ step: [Number, String],
853
+ minStep: [Number, String],
854
+ exponential: [Boolean, Number],
855
+ disabled: Boolean,
856
+ type: {
857
+ type: String,
858
+ default: 'is-primary'
859
+ },
860
+ editable: {
861
+ type: Boolean,
862
+ default: true
863
+ },
864
+ controls: {
865
+ type: Boolean,
866
+ default: true
867
+ },
868
+ controlsAlignment: {
869
+ type: String,
870
+ default: 'center',
871
+ validator: function validator(value) {
872
+ return ['left', 'right', 'center'].indexOf(value) >= 0;
873
+ }
874
+ },
875
+ controlsRounded: {
876
+ type: Boolean,
877
+ default: false
878
+ },
879
+ controlsPosition: String,
880
+ placeholder: [Number, String],
881
+ ariaMinusLabel: String,
882
+ ariaPlusLabel: String,
883
+ longPress: {
884
+ type: Boolean,
885
+ default: true
886
+ }
887
+ },
888
+ data: function data() {
889
+ return {
890
+ newValue: this.value,
891
+ newStep: this.step || 1,
892
+ newMinStep: this.minStep,
893
+ timesPressed: 1,
894
+ _elementRef: 'input'
895
+ };
896
+ },
897
+ computed: {
898
+ computedValue: {
899
+ get: function get() {
900
+ return this.newValue;
901
+ },
902
+ set: function set(value) {
903
+ var _this = this;
904
+ // Parses the number, so that "0" => 0, and "invalid" => null
905
+ var newValue = Number(value) === 0 ? 0 : Number(value) || null;
906
+ if (value === '' || value === undefined || value === null) {
907
+ newValue = null;
908
+ }
909
+ this.newValue = newValue;
910
+ if (newValue === null) {
911
+ this.$emit('input', newValue);
912
+ } else if (!isNaN(newValue) && newValue !== '-0') {
913
+ this.$emit('input', Number(newValue));
914
+ }
915
+ this.$nextTick(function () {
916
+ if (_this.$refs.input) {
917
+ _this.$refs.input.checkHtml5Validity();
918
+ }
919
+ });
920
+ }
921
+ },
922
+ controlsLeft: function controlsLeft() {
923
+ if (this.controls && this.controlsAlignment !== 'right') {
924
+ return this.controlsAlignment === 'left' ? ['minus', 'plus'] : ['minus'];
925
+ }
926
+ return [];
927
+ },
928
+ controlsRight: function controlsRight() {
929
+ if (this.controls && this.controlsAlignment !== 'left') {
930
+ return this.controlsAlignment === 'right' ? ['minus', 'plus'] : ['plus'];
931
+ }
932
+ return [];
933
+ },
934
+ fieldClasses: function fieldClasses() {
935
+ return [{
936
+ 'has-addons': this.controlsPosition === 'compact'
937
+ }, {
938
+ 'is-grouped': this.controlsPosition !== 'compact'
939
+ }, {
940
+ 'is-expanded': this.expanded
941
+ }];
942
+ },
943
+ buttonClasses: function buttonClasses() {
944
+ return [this.type, this.size, {
945
+ 'is-rounded': this.controlsRounded
946
+ }];
947
+ },
948
+ minNumber: function minNumber() {
949
+ return typeof this.min === 'string' ? parseFloat(this.min) : this.min;
950
+ },
951
+ maxNumber: function maxNumber() {
952
+ return typeof this.max === 'string' ? parseFloat(this.max) : this.max;
953
+ },
954
+ stepNumber: function stepNumber() {
955
+ if (this.newStep === 'any') {
956
+ return 1;
957
+ }
958
+ return typeof this.newStep === 'string' ? parseFloat(this.newStep) : this.newStep;
959
+ },
960
+ minStepNumber: function minStepNumber() {
961
+ if (this.newStep === 'any' && typeof this.newMinStep === 'undefined') {
962
+ return 'any';
963
+ }
964
+ var step = typeof this.newMinStep !== 'undefined' ? this.newMinStep : this.newStep;
965
+ return typeof step === 'string' ? parseFloat(step) : step;
966
+ },
967
+ disabledMin: function disabledMin() {
968
+ return this.computedValue - this.stepNumber < this.minNumber;
969
+ },
970
+ disabledMax: function disabledMax() {
971
+ return this.computedValue + this.stepNumber > this.maxNumber;
972
+ },
973
+ stepDecimals: function stepDecimals() {
974
+ var step = this.minStepNumber.toString();
975
+ var index = step.indexOf('.');
976
+ if (index >= 0) {
977
+ return step.substring(index + 1).length;
978
+ }
979
+ return 0;
980
+ }
981
+ },
982
+ watch: {
983
+ /**
984
+ * When v-model is changed:
985
+ * 1. Set internal value.
986
+ */
987
+ value: {
988
+ immediate: true,
989
+ handler: function handler(value) {
990
+ this.newValue = value;
991
+ }
992
+ },
993
+ step: function step(value) {
994
+ this.newStep = value;
995
+ },
996
+ minStep: function minStep(value) {
997
+ this.newMinStep = value;
998
+ }
999
+ },
1000
+ methods: {
1001
+ isDisabled: function isDisabled(control) {
1002
+ return this.disabled || (control === 'plus' ? this.disabledMax : this.disabledMin);
1003
+ },
1004
+ decrement: function decrement() {
1005
+ if (this.computedValue === null || typeof this.computedValue === 'undefined') {
1006
+ if (this.maxNumber !== null && typeof this.maxNumber !== 'undefined') {
1007
+ this.computedValue = this.maxNumber;
1008
+ return;
1009
+ }
1010
+ this.computedValue = 0;
1011
+ }
1012
+ if (typeof this.minNumber === 'undefined' || this.computedValue - this.stepNumber >= this.minNumber) {
1013
+ var value = this.computedValue - this.stepNumber;
1014
+ this.computedValue = parseFloat(value.toFixed(this.stepDecimals));
1015
+ }
1016
+ },
1017
+ increment: function increment() {
1018
+ if (this.computedValue === null || typeof this.computedValue === 'undefined' || this.computedValue < this.minNumber) {
1019
+ if (this.minNumber !== null && typeof this.minNumber !== 'undefined') {
1020
+ this.computedValue = this.minNumber;
1021
+ return;
1022
+ }
1023
+ this.computedValue = 0;
1024
+ }
1025
+ if (typeof this.maxNumber === 'undefined' || this.computedValue + this.stepNumber <= this.maxNumber) {
1026
+ var value = this.computedValue + this.stepNumber;
1027
+ this.computedValue = parseFloat(value.toFixed(this.stepDecimals));
1028
+ }
1029
+ },
1030
+ onControlClick: function onControlClick(event, inc) {
1031
+ // IE 11 -> filter click event
1032
+ if (event.detail !== 0 || event.type !== 'click') return;
1033
+ if (inc) this.increment();else this.decrement();
1034
+ },
1035
+ longPressTick: function longPressTick(inc) {
1036
+ var _this2 = this;
1037
+ if (inc) this.increment();else this.decrement();
1038
+ if (!this.longPress) return;
1039
+ this._$intervalRef = setTimeout(function () {
1040
+ _this2.longPressTick(inc);
1041
+ }, this.exponential ? 250 / (this.exponential * this.timesPressed++) : 250);
1042
+ },
1043
+ onStartLongPress: function onStartLongPress(event, inc) {
1044
+ if (event.button !== 0 && event.type !== 'touchstart') return;
1045
+ clearTimeout(this._$intervalRef);
1046
+ this.longPressTick(inc);
1047
+ },
1048
+ onStopLongPress: function onStopLongPress() {
1049
+ if (!this._$intervalRef) return;
1050
+ this.timesPressed = 1;
1051
+ clearTimeout(this._$intervalRef);
1052
+ this._$intervalRef = null;
1053
+ }
1054
+ },
1055
+ beforeDestroy: function beforeDestroy() {
1056
+ clearTimeout(this._$intervalRef);
1057
+ }
1058
+ };
1059
+
1060
+ /* script */
1061
+ const __vue_script__ = script;
1062
+
1063
+ /* template */
1064
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"b-numberinput field",class:_vm.fieldClasses},[_vm._l((_vm.controlsLeft),function(control){return _c('p',{key:control,class:['control', control],on:{"mouseup":_vm.onStopLongPress,"mouseleave":_vm.onStopLongPress,"touchend":_vm.onStopLongPress,"touchcancel":_vm.onStopLongPress}},[_c('button',{staticClass:"button",class:_vm.buttonClasses,attrs:{"type":"button","disabled":_vm.isDisabled(control),"aria-label":control === 'plus' ? _vm.ariaPlusLabel : _vm.ariaMinusLabel},on:{"mousedown":function($event){!_vm.isDisabled(control) && _vm.onStartLongPress($event, control === 'plus');},"touchstart":function($event){$event.preventDefault();!_vm.isDisabled(control) && _vm.onStartLongPress($event, control === 'plus');},"click":function($event){!_vm.isDisabled(control) && _vm.onControlClick($event, control === 'plus');}}},[_c('b-icon',{attrs:{"both":"","icon":control,"pack":_vm.iconPack,"size":_vm.iconSize}})],1)])}),_c('b-input',_vm._b({ref:"input",attrs:{"type":"number","step":_vm.minStepNumber,"max":_vm.max,"min":_vm.min,"size":_vm.size,"disabled":_vm.disabled,"readonly":!_vm.editable,"loading":_vm.loading,"rounded":_vm.rounded,"icon":_vm.icon,"icon-pack":_vm.iconPack,"autocomplete":_vm.autocomplete,"expanded":_vm.expanded,"placeholder":_vm.placeholder,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":function($event){return _vm.$emit('focus', $event)},"blur":function($event){return _vm.$emit('blur', $event)}},model:{value:(_vm.computedValue),callback:function ($$v) {_vm.computedValue=$$v;},expression:"computedValue"}},'b-input',_vm.$attrs,false)),_vm._l((_vm.controlsRight),function(control){return _c('p',{key:control,class:['control', control],on:{"mouseup":_vm.onStopLongPress,"mouseleave":_vm.onStopLongPress,"touchend":_vm.onStopLongPress,"touchcancel":_vm.onStopLongPress}},[_c('button',{staticClass:"button",class:_vm.buttonClasses,attrs:{"type":"button","disabled":_vm.isDisabled(control),"aria-label":control === 'plus' ? _vm.ariaPlusLabel : _vm.ariaMinusLabel},on:{"mousedown":function($event){!_vm.isDisabled(control) && _vm.onStartLongPress($event, control === 'plus');},"touchstart":function($event){$event.preventDefault();!_vm.isDisabled(control) && _vm.onStartLongPress($event, control === 'plus');},"click":function($event){!_vm.isDisabled(control) && _vm.onControlClick($event, control === 'plus');}}},[_c('b-icon',{attrs:{"both":"","icon":control,"pack":_vm.iconPack,"size":_vm.iconSize}})],1)])})],2)};
1065
+ var __vue_staticRenderFns__ = [];
1066
+
1067
+ /* style */
1068
+ const __vue_inject_styles__ = undefined;
1069
+ /* scoped */
1070
+ const __vue_scope_id__ = undefined;
1071
+ /* module identifier */
1072
+ const __vue_module_identifier__ = undefined;
1073
+ /* functional template */
1074
+ const __vue_is_functional_template__ = false;
1075
+ /* style inject */
1076
+
1077
+ /* style inject SSR */
1078
+
1079
+ /* style inject shadow dom */
1080
+
1081
+
1082
+
1083
+ const __vue_component__ = /*#__PURE__*/normalizeComponent(
1084
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
1085
+ __vue_inject_styles__,
1086
+ __vue_script__,
1087
+ __vue_scope_id__,
1088
+ __vue_is_functional_template__,
1089
+ __vue_module_identifier__,
1090
+ false,
1091
+ undefined,
1092
+ undefined,
1093
+ undefined
1094
+ );
1095
+
1096
+ var Numberinput = __vue_component__;
1097
+
1098
+ var use = function use(plugin) {
1099
+ if (typeof window !== 'undefined' && window.Vue) {
1100
+ window.Vue.use(plugin);
1101
+ }
1102
+ };
1103
+ var registerComponent = function registerComponent(Vue, component) {
1104
+ Vue.component(component.name, component);
1105
+ };
1106
+
1107
+ var Plugin = {
1108
+ install: function install(Vue) {
1109
+ registerComponent(Vue, Numberinput);
1110
+ }
1111
+ };
1112
+ use(Plugin);
1113
+
1114
+ exports.BNumberinput = Numberinput;
1115
+ exports["default"] = Plugin;
1116
+
1117
+ Object.defineProperty(exports, '__esModule', { value: true });
1118
+
1119
+ }));