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,23 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var colorpicker = require('./index-99d1c930.js');
6
+ require('./plugins-7f41b028.js');
7
+ require('./_rollupPluginBabelHelpers-8b2e54ad.js');
8
+ require('./FormElementMixin-193a88b8.js');
9
+ require('./config-8cfb5a4a.js');
10
+ require('./helpers.js');
11
+ require('./DropdownItem-422f8c34.js');
12
+ require('./trapFocus-261420b0.js');
13
+ require('./InjectedChildMixin-d6bf7f91.js');
14
+ require('./Input-e5a72d97.js');
15
+ require('./Icon-78961800.js');
16
+ require('./Field-4557b10c.js');
17
+ require('./Select-2b3879bc.js');
18
+ require('./Tooltip-c1df7ee3.js');
19
+
20
+
21
+
22
+ exports.BColorpicker = colorpicker.Colorpicker;
23
+ exports["default"] = colorpicker.Plugin;
@@ -0,0 +1,81 @@
1
+ 'use strict';
2
+
3
+ exports.config = {
4
+ defaultContainerElement: null,
5
+ defaultIconPack: 'mdi',
6
+ defaultIconComponent: null,
7
+ defaultIconPrev: 'chevron-left',
8
+ defaultIconNext: 'chevron-right',
9
+ defaultLocale: undefined,
10
+ defaultDialogConfirmText: null,
11
+ defaultDialogCancelText: null,
12
+ defaultSnackbarDuration: 3500,
13
+ defaultSnackbarPosition: null,
14
+ defaultToastDuration: 2000,
15
+ defaultToastPosition: null,
16
+ defaultNotificationDuration: 2000,
17
+ defaultNotificationPosition: null,
18
+ defaultTooltipType: 'is-primary',
19
+ defaultTooltipDelay: null,
20
+ defaultTooltipCloseDelay: null,
21
+ defaultSidebarDelay: null,
22
+ defaultInputAutocomplete: 'on',
23
+ defaultDateFormatter: null,
24
+ defaultDateParser: null,
25
+ defaultDateCreator: null,
26
+ defaultTimeCreator: null,
27
+ defaultDayNames: null,
28
+ defaultMonthNames: null,
29
+ defaultFirstDayOfWeek: null,
30
+ defaultUnselectableDaysOfWeek: null,
31
+ defaultTimeFormatter: null,
32
+ defaultTimeParser: null,
33
+ defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
34
+ defaultModalScroll: null,
35
+ defaultDatepickerMobileNative: true,
36
+ defaultTimepickerMobileNative: true,
37
+ defaultTimepickerMobileModal: true,
38
+ defaultNoticeQueue: true,
39
+ defaultInputHasCounter: true,
40
+ defaultTaginputHasCounter: true,
41
+ defaultUseHtml5Validation: true,
42
+ defaultDropdownMobileModal: true,
43
+ defaultFieldLabelPosition: null,
44
+ defaultDatepickerYearsRange: [-100, 10],
45
+ defaultDatepickerNearbyMonthDays: true,
46
+ defaultDatepickerNearbySelectableMonthDays: false,
47
+ defaultDatepickerShowWeekNumber: false,
48
+ defaultDatepickerWeekNumberClickable: false,
49
+ defaultDatepickerMobileModal: true,
50
+ defaultTrapFocus: true,
51
+ defaultAutoFocus: true,
52
+ defaultButtonRounded: false,
53
+ defaultSwitchRounded: true,
54
+ defaultCarouselInterval: 3500,
55
+ defaultTabsExpanded: false,
56
+ defaultTabsAnimated: true,
57
+ defaultTabsType: null,
58
+ defaultStatusIcon: true,
59
+ defaultProgrammaticPromise: false,
60
+ defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
61
+ defaultImageWebpFallback: null,
62
+ defaultImageLazy: true,
63
+ defaultImageResponsive: true,
64
+ defaultImageRatio: null,
65
+ defaultImageSrcsetFormatter: null,
66
+ defaultBreadcrumbTag: 'a',
67
+ defaultBreadcrumbAlign: 'is-left',
68
+ defaultBreadcrumbSeparator: '',
69
+ defaultBreadcrumbSize: 'is-medium',
70
+ customIconPacks: null
71
+ };
72
+ var setOptions = function setOptions(options) {
73
+ exports.config = options;
74
+ };
75
+ var setVueInstance = function setVueInstance(Vue) {
76
+ exports.VueInstance = Vue;
77
+ };
78
+ exports.VueInstance = void 0;
79
+
80
+ exports.setOptions = setOptions;
81
+ exports.setVueInstance = setVueInstance;
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var config = require('./config-8cfb5a4a.js');
6
+ var helpers = require('./helpers.js');
7
+ require('./_rollupPluginBabelHelpers-8b2e54ad.js');
8
+
9
+ var ConfigComponent = {
10
+ getOptions: function getOptions() {
11
+ return config.config;
12
+ },
13
+ setOptions: function setOptions(options) {
14
+ config.setOptions(helpers.merge(config.config, options, true));
15
+ }
16
+ };
17
+
18
+ exports["default"] = ConfigComponent;
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Datepicker = require('./Datepicker-680659bc.js');
6
+ var plugins = require('./plugins-7f41b028.js');
7
+ require('./_rollupPluginBabelHelpers-8b2e54ad.js');
8
+ require('./FormElementMixin-193a88b8.js');
9
+ require('./config-8cfb5a4a.js');
10
+ require('./helpers.js');
11
+ require('./DropdownItem-422f8c34.js');
12
+ require('./trapFocus-261420b0.js');
13
+ require('./InjectedChildMixin-d6bf7f91.js');
14
+ require('./Input-e5a72d97.js');
15
+ require('./Icon-78961800.js');
16
+ require('./Field-4557b10c.js');
17
+ require('./Select-2b3879bc.js');
18
+
19
+ var Plugin = {
20
+ install: function install(Vue) {
21
+ plugins.registerComponent(Vue, Datepicker.Datepicker);
22
+ }
23
+ };
24
+ plugins.use(Plugin);
25
+
26
+ exports.BDatepicker = Datepicker.Datepicker;
27
+ exports["default"] = Plugin;
@@ -0,0 +1,377 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-8b2e54ad.js');
6
+ var FormElementMixin = require('./FormElementMixin-193a88b8.js');
7
+ var helpers = require('./helpers.js');
8
+ var config = require('./config-8cfb5a4a.js');
9
+ var Datepicker = require('./Datepicker-680659bc.js');
10
+ var Timepicker = require('./Timepicker-498fa02b.js');
11
+ var plugins = require('./plugins-7f41b028.js');
12
+ require('./DropdownItem-422f8c34.js');
13
+ require('./trapFocus-261420b0.js');
14
+ require('./InjectedChildMixin-d6bf7f91.js');
15
+ require('./Input-e5a72d97.js');
16
+ require('./Icon-78961800.js');
17
+ require('./Field-4557b10c.js');
18
+ require('./Select-2b3879bc.js');
19
+ require('./TimepickerMixin-6c1a4ab4.js');
20
+
21
+ var AM = 'AM';
22
+ var PM = 'PM';
23
+ var script = {
24
+ name: 'BDatetimepicker',
25
+ components: _rollupPluginBabelHelpers._defineProperty(_rollupPluginBabelHelpers._defineProperty({}, Datepicker.Datepicker.name, Datepicker.Datepicker), Timepicker.Timepicker.name, Timepicker.Timepicker),
26
+ mixins: [FormElementMixin.FormElementMixin],
27
+ inheritAttrs: false,
28
+ props: {
29
+ value: {
30
+ type: Date
31
+ },
32
+ editable: {
33
+ type: Boolean,
34
+ default: false
35
+ },
36
+ placeholder: String,
37
+ horizontalTimePicker: Boolean,
38
+ disabled: Boolean,
39
+ firstDayOfWeek: {
40
+ type: Number,
41
+ default: function _default() {
42
+ if (typeof config.config.defaultFirstDayOfWeek === 'number') {
43
+ return config.config.defaultFirstDayOfWeek;
44
+ } else {
45
+ return 0;
46
+ }
47
+ }
48
+ },
49
+ rulesForFirstWeek: {
50
+ type: Number,
51
+ default: function _default() {
52
+ return 4;
53
+ }
54
+ },
55
+ icon: String,
56
+ iconRight: String,
57
+ iconRightClickable: Boolean,
58
+ iconPack: String,
59
+ inline: Boolean,
60
+ openOnFocus: Boolean,
61
+ position: String,
62
+ mobileNative: {
63
+ type: Boolean,
64
+ default: true
65
+ },
66
+ minDatetime: Date,
67
+ maxDatetime: Date,
68
+ nearbyMonthDays: {
69
+ type: Boolean,
70
+ default: config.config.defaultDatepickerNearbyMonthDays
71
+ },
72
+ datetimeFormatter: {
73
+ type: Function
74
+ },
75
+ datetimeParser: {
76
+ type: Function
77
+ },
78
+ datetimeCreator: {
79
+ type: Function,
80
+ default: function _default(date) {
81
+ if (typeof config.config.defaultDatetimeCreator === 'function') {
82
+ return config.config.defaultDatetimeCreator(date);
83
+ } else {
84
+ return date;
85
+ }
86
+ }
87
+ },
88
+ datepicker: Object,
89
+ timepicker: Object,
90
+ tzOffset: {
91
+ type: Number,
92
+ default: 0
93
+ },
94
+ focusable: {
95
+ type: Boolean,
96
+ default: true
97
+ },
98
+ appendToBody: Boolean
99
+ },
100
+ data: function data() {
101
+ return {
102
+ newValue: this.adjustValue(this.value)
103
+ };
104
+ },
105
+ computed: {
106
+ computedValue: {
107
+ get: function get() {
108
+ return this.newValue;
109
+ },
110
+ set: function set(value) {
111
+ if (value) {
112
+ var val = new Date(value.getTime());
113
+ if (this.newValue) {
114
+ // restore time part
115
+ if ((value.getDate() !== this.newValue.getDate() || value.getMonth() !== this.newValue.getMonth() || value.getFullYear() !== this.newValue.getFullYear()) && value.getHours() === 0 && value.getMinutes() === 0 && value.getSeconds() === 0) {
116
+ val.setHours(this.newValue.getHours(), this.newValue.getMinutes(), this.newValue.getSeconds(), 0);
117
+ }
118
+ } else {
119
+ val = this.datetimeCreator(value);
120
+ }
121
+ // check min and max range
122
+ if (this.minDatetime && val < this.adjustValue(this.minDatetime)) {
123
+ val = this.adjustValue(this.minDatetime);
124
+ } else if (this.maxDatetime && val > this.adjustValue(this.maxDatetime)) {
125
+ val = this.adjustValue(this.maxDatetime);
126
+ }
127
+ this.newValue = new Date(val.getTime());
128
+ } else {
129
+ this.newValue = this.adjustValue(value);
130
+ }
131
+ var adjustedValue = this.adjustValue(this.newValue, true); // reverse adjust
132
+ this.$emit('input', adjustedValue);
133
+ }
134
+ },
135
+ localeOptions: function localeOptions() {
136
+ return new Intl.DateTimeFormat(this.locale, {
137
+ year: 'numeric',
138
+ month: 'numeric',
139
+ day: 'numeric',
140
+ hour: 'numeric',
141
+ minute: 'numeric',
142
+ second: this.enableSeconds() ? 'numeric' : undefined
143
+ }).resolvedOptions();
144
+ },
145
+ dtf: function dtf() {
146
+ return new Intl.DateTimeFormat(this.locale, {
147
+ year: this.localeOptions.year || 'numeric',
148
+ month: this.localeOptions.month || 'numeric',
149
+ day: this.localeOptions.day || 'numeric',
150
+ hour: this.localeOptions.hour || 'numeric',
151
+ minute: this.localeOptions.minute || 'numeric',
152
+ second: this.enableSeconds() ? this.localeOptions.second || 'numeric' : undefined,
153
+ hourCycle: !this.isHourFormat24() ? 'h12' : 'h23'
154
+ });
155
+ },
156
+ isMobileNative: function isMobileNative() {
157
+ return this.mobileNative && this.tzOffset === 0;
158
+ },
159
+ isMobile: function isMobile() {
160
+ return this.isMobileNative && helpers.isMobile.any();
161
+ },
162
+ minDate: function minDate() {
163
+ if (!this.minDatetime) {
164
+ return this.datepicker ? this.adjustValue(this.datepicker.minDate) : null;
165
+ }
166
+ var adjMinDatetime = this.adjustValue(this.minDatetime);
167
+ return new Date(adjMinDatetime.getFullYear(), adjMinDatetime.getMonth(), adjMinDatetime.getDate(), 0, 0, 0, 0);
168
+ },
169
+ maxDate: function maxDate() {
170
+ if (!this.maxDatetime) {
171
+ return this.datepicker ? this.adjustValue(this.datepicker.maxDate) : null;
172
+ }
173
+ var adjMaxDatetime = this.adjustValue(this.maxDatetime);
174
+ return new Date(adjMaxDatetime.getFullYear(), adjMaxDatetime.getMonth(), adjMaxDatetime.getDate(), 0, 0, 0, 0);
175
+ },
176
+ minTime: function minTime() {
177
+ if (!this.minDatetime || this.newValue === null || typeof this.newValue === 'undefined') {
178
+ return this.timepicker ? this.adjustValue(this.timepicker.minTime) : null;
179
+ }
180
+ var adjMinDatetime = this.adjustValue(this.minDatetime);
181
+ if (adjMinDatetime.getFullYear() === this.newValue.getFullYear() && adjMinDatetime.getMonth() === this.newValue.getMonth() && adjMinDatetime.getDate() === this.newValue.getDate()) {
182
+ return adjMinDatetime;
183
+ }
184
+ },
185
+ maxTime: function maxTime() {
186
+ if (!this.maxDatetime || this.newValue === null || typeof this.newValue === 'undefined') {
187
+ return this.timepicker ? this.adjustValue(this.timepicker.maxTime) : null;
188
+ }
189
+ var adjMaxDatetime = this.adjustValue(this.maxDatetime);
190
+ if (adjMaxDatetime.getFullYear() === this.newValue.getFullYear() && adjMaxDatetime.getMonth() === this.newValue.getMonth() && adjMaxDatetime.getDate() === this.newValue.getDate()) {
191
+ return adjMaxDatetime;
192
+ }
193
+ },
194
+ datepickerSize: function datepickerSize() {
195
+ return this.datepicker && this.datepicker.size ? this.datepicker.size : this.size;
196
+ },
197
+ timepickerSize: function timepickerSize() {
198
+ return this.timepicker && this.timepicker.size ? this.timepicker.size : this.size;
199
+ },
200
+ timepickerDisabled: function timepickerDisabled() {
201
+ return this.timepicker && this.timepicker.disabled ? this.timepicker.disabled : this.disabled;
202
+ }
203
+ },
204
+ watch: {
205
+ value: function value() {
206
+ this.newValue = this.adjustValue(this.value);
207
+ },
208
+ tzOffset: function tzOffset() {
209
+ this.newValue = this.adjustValue(this.value);
210
+ }
211
+ },
212
+ methods: {
213
+ enableSeconds: function enableSeconds() {
214
+ if (this.$refs.timepicker) {
215
+ return this.$refs.timepicker.enableSeconds;
216
+ }
217
+ return false;
218
+ },
219
+ isHourFormat24: function isHourFormat24() {
220
+ if (this.$refs.timepicker) {
221
+ return this.$refs.timepicker.isHourFormat24;
222
+ }
223
+ return !this.localeOptions.hour12;
224
+ },
225
+ adjustValue: function adjustValue(value) {
226
+ var reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
227
+ if (!value) return value;
228
+ if (reverse) {
229
+ return new Date(value.getTime() - this.tzOffset * 60000);
230
+ } else {
231
+ return new Date(value.getTime() + this.tzOffset * 60000);
232
+ }
233
+ },
234
+ defaultDatetimeParser: function defaultDatetimeParser(date) {
235
+ if (typeof this.datetimeParser === 'function') {
236
+ return this.datetimeParser(date);
237
+ } else if (typeof config.config.defaultDatetimeParser === 'function') {
238
+ return config.config.defaultDatetimeParser(date);
239
+ } else {
240
+ if (this.dtf.formatToParts && typeof this.dtf.formatToParts === 'function') {
241
+ var dayPeriods = [AM, PM, AM.toLowerCase(), PM.toLowerCase()];
242
+ if (this.$refs.timepicker) {
243
+ dayPeriods.push(this.$refs.timepicker.amString);
244
+ dayPeriods.push(this.$refs.timepicker.pmString);
245
+ }
246
+ var parts = this.dtf.formatToParts(new Date());
247
+ var formatRegex = parts.map(function (part, idx) {
248
+ if (part.type === 'literal') {
249
+ if (idx + 1 < parts.length && parts[idx + 1].type === 'hour') {
250
+ return "[^\\d]+";
251
+ }
252
+ return part.value.replace(/ /g, '\\s?');
253
+ } else if (part.type === 'dayPeriod') {
254
+ return "((?!=<".concat(part.type, ">)(").concat(dayPeriods.join('|'), ")?)");
255
+ }
256
+ return "((?!=<".concat(part.type, ">)\\d+)");
257
+ }).join('');
258
+ var datetimeGroups = helpers.matchWithGroups(formatRegex, date);
259
+
260
+ // We do a simple validation for the group.
261
+ // If it is not valid, it will fallback to Date.parse below
262
+ if (datetimeGroups.year && datetimeGroups.year.length === 4 && datetimeGroups.month && datetimeGroups.month <= 12 && datetimeGroups.day && datetimeGroups.day <= 31 && datetimeGroups.hour && datetimeGroups.hour >= 0 && datetimeGroups.hour < 24 && datetimeGroups.minute && datetimeGroups.minute >= 0 && datetimeGroups.minute <= 59) {
263
+ var d = new Date(datetimeGroups.year, datetimeGroups.month - 1, datetimeGroups.day, datetimeGroups.hour, datetimeGroups.minute, datetimeGroups.second || 0);
264
+ return d;
265
+ }
266
+ }
267
+ return new Date(Date.parse(date));
268
+ }
269
+ },
270
+ defaultDatetimeFormatter: function defaultDatetimeFormatter(date) {
271
+ if (typeof this.datetimeFormatter === 'function') {
272
+ return this.datetimeFormatter(date);
273
+ } else if (typeof config.config.defaultDatetimeFormatter === 'function') {
274
+ return config.config.defaultDatetimeFormatter(date);
275
+ } else {
276
+ return this.dtf.format(date);
277
+ }
278
+ },
279
+ /*
280
+ * Parse date from string
281
+ */
282
+ onChangeNativePicker: function onChangeNativePicker(event) {
283
+ var date = event.target.value;
284
+ var s = date ? date.split(/\D/) : [];
285
+ if (s.length >= 5) {
286
+ var year = parseInt(s[0], 10);
287
+ var month = parseInt(s[1], 10) - 1;
288
+ var day = parseInt(s[2], 10);
289
+ var hours = parseInt(s[3], 10);
290
+ var minutes = parseInt(s[4], 10);
291
+ // Seconds are omitted intentionally; they are unsupported by input
292
+ // type=datetime-local and cause the control to fail native validation
293
+ this.computedValue = new Date(year, month, day, hours, minutes);
294
+ } else {
295
+ this.computedValue = null;
296
+ }
297
+ },
298
+ /*
299
+ * Emit 'active-change' on datepicker active state change
300
+ */
301
+ onActiveChange: function onActiveChange(value) {
302
+ this.$emit('active-change', value);
303
+ },
304
+ formatNative: function formatNative(value) {
305
+ var date = new Date(value);
306
+ if (value && !isNaN(date)) {
307
+ var year = date.getFullYear();
308
+ var month = date.getMonth() + 1;
309
+ var day = date.getDate();
310
+ var hours = date.getHours();
311
+ var minutes = date.getMinutes();
312
+ var seconds = date.getSeconds();
313
+ return year + '-' + ((month < 10 ? '0' : '') + month) + '-' + ((day < 10 ? '0' : '') + day) + 'T' + ((hours < 10 ? '0' : '') + hours) + ':' + ((minutes < 10 ? '0' : '') + minutes) + ':' + ((seconds < 10 ? '0' : '') + seconds);
314
+ }
315
+ return '';
316
+ },
317
+ toggle: function toggle() {
318
+ this.$refs.datepicker.toggle();
319
+ }
320
+ },
321
+ mounted: function mounted() {
322
+ if (!this.isMobile || this.inline) {
323
+ // $refs attached, it's time to refresh datepicker (input)
324
+ if (this.newValue) {
325
+ this.$refs.datepicker.$forceUpdate();
326
+ }
327
+ }
328
+ }
329
+ };
330
+
331
+ /* script */
332
+ const __vue_script__ = script;
333
+
334
+ /* template */
335
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.isMobile || _vm.inline)?_c('b-datepicker',_vm._b({ref:"datepicker",attrs:{"rounded":_vm.rounded,"open-on-focus":_vm.openOnFocus,"position":_vm.position,"loading":_vm.loading,"inline":_vm.inline,"editable":_vm.editable,"expanded":_vm.expanded,"close-on-click":false,"first-day-of-week":_vm.firstDayOfWeek,"rules-for-first-week":_vm.rulesForFirstWeek,"date-formatter":_vm.defaultDatetimeFormatter,"date-parser":_vm.defaultDatetimeParser,"min-date":_vm.minDate,"max-date":_vm.maxDate,"nearby-month-days":_vm.nearbyMonthDays,"icon":_vm.icon,"icon-right":_vm.iconRight,"icon-right-clickable":_vm.iconRightClickable,"icon-pack":_vm.iconPack,"size":_vm.datepickerSize,"placeholder":_vm.placeholder,"horizontal-time-picker":_vm.horizontalTimePicker,"range":false,"disabled":_vm.disabled,"mobile-native":_vm.isMobileNative,"locale":_vm.locale,"focusable":_vm.focusable,"append-to-body":_vm.appendToBody},on:{"focus":_vm.onFocus,"blur":_vm.onBlur,"active-change":_vm.onActiveChange,"icon-right-click":function($event){return _vm.$emit('icon-right-click')},"change-month":function($event){return _vm.$emit('change-month', $event)},"change-year":function($event){return _vm.$emit('change-year', $event)}},model:{value:(_vm.computedValue),callback:function ($$v) {_vm.computedValue=$$v;},expression:"computedValue"}},'b-datepicker',_vm.datepicker,false),[_c('nav',{staticClass:"level is-mobile"},[(_vm.$slots.left !== undefined)?_c('div',{staticClass:"level-item has-text-centered"},[_vm._t("left")],2):_vm._e(),_c('div',{staticClass:"level-item has-text-centered"},[_c('b-timepicker',_vm._b({ref:"timepicker",attrs:{"inline":"","editable":_vm.editable,"min-time":_vm.minTime,"max-time":_vm.maxTime,"size":_vm.timepickerSize,"disabled":_vm.timepickerDisabled,"focusable":_vm.focusable,"mobile-native":_vm.isMobileNative,"locale":_vm.locale},model:{value:(_vm.computedValue),callback:function ($$v) {_vm.computedValue=$$v;},expression:"computedValue"}},'b-timepicker',_vm.timepicker,false))],1),(_vm.$slots.right !== undefined)?_c('div',{staticClass:"level-item has-text-centered"},[_vm._t("right")],2):_vm._e()])]):_c('b-input',_vm._b({ref:"input",attrs:{"type":"datetime-local","autocomplete":"off","value":_vm.formatNative(_vm.computedValue),"placeholder":_vm.placeholder,"size":_vm.size,"icon":_vm.icon,"icon-pack":_vm.iconPack,"rounded":_vm.rounded,"loading":_vm.loading,"max":_vm.formatNative(_vm.maxDate),"min":_vm.formatNative(_vm.minDate),"disabled":_vm.disabled,"readonly":false,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.onFocus,"blur":_vm.onBlur},nativeOn:{"change":function($event){return _vm.onChangeNativePicker($event)}}},'b-input',_vm.$attrs,false))};
336
+ var __vue_staticRenderFns__ = [];
337
+
338
+ /* style */
339
+ const __vue_inject_styles__ = undefined;
340
+ /* scoped */
341
+ const __vue_scope_id__ = undefined;
342
+ /* module identifier */
343
+ const __vue_module_identifier__ = undefined;
344
+ /* functional template */
345
+ const __vue_is_functional_template__ = false;
346
+ /* style inject */
347
+
348
+ /* style inject SSR */
349
+
350
+ /* style inject shadow dom */
351
+
352
+
353
+
354
+ const __vue_component__ = /*#__PURE__*/plugins.normalizeComponent(
355
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
356
+ __vue_inject_styles__,
357
+ __vue_script__,
358
+ __vue_scope_id__,
359
+ __vue_is_functional_template__,
360
+ __vue_module_identifier__,
361
+ false,
362
+ undefined,
363
+ undefined,
364
+ undefined
365
+ );
366
+
367
+ var Datetimepicker = __vue_component__;
368
+
369
+ var Plugin = {
370
+ install: function install(Vue) {
371
+ plugins.registerComponent(Vue, Datetimepicker);
372
+ }
373
+ };
374
+ plugins.use(Plugin);
375
+
376
+ exports.BDatetimepicker = Datetimepicker;
377
+ exports["default"] = Plugin;