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.
- package/README.md +3 -1
- package/dist/buefy.css +15904 -0
- package/dist/buefy.esm.js +17883 -0
- package/dist/buefy.esm.min.js +2 -0
- package/dist/buefy.js +17967 -0
- package/dist/buefy.min.css +1 -0
- package/dist/buefy.min.js +2 -0
- package/dist/cjs/Autocomplete-7a39c5ce.js +673 -0
- package/dist/cjs/Button-01827709.js +114 -0
- package/dist/cjs/CheckRadioMixin-c910f2ed.js +45 -0
- package/dist/cjs/Checkbox-43f54cc7.js +70 -0
- package/dist/cjs/Datepicker-680659bc.js +1679 -0
- package/dist/cjs/DropdownItem-422f8c34.js +559 -0
- package/dist/cjs/Field-4557b10c.js +315 -0
- package/dist/cjs/FormElementMixin-193a88b8.js +163 -0
- package/dist/cjs/Icon-78961800.js +189 -0
- package/dist/cjs/Image-c4bcd9b3.js +299 -0
- package/dist/cjs/InjectedChildMixin-d6bf7f91.js +135 -0
- package/dist/cjs/Input-e5a72d97.js +248 -0
- package/dist/cjs/Loading-6f2c7075.js +150 -0
- package/dist/cjs/MessageMixin-8d959514.js +146 -0
- package/dist/cjs/Modal-4cf07210.js +278 -0
- package/dist/cjs/NoticeMixin-01121bd2.js +154 -0
- package/dist/cjs/Pagination-d6b3fb85.js +413 -0
- package/dist/cjs/Select-2b3879bc.js +100 -0
- package/dist/cjs/SlotComponent-4fb48389.js +53 -0
- package/dist/cjs/TabbedChildMixin-907cad32.js +222 -0
- package/dist/cjs/Tag-437f65fb.js +154 -0
- package/dist/cjs/Timepicker-498fa02b.js +67 -0
- package/dist/cjs/TimepickerMixin-6c1a4ab4.js +661 -0
- package/dist/cjs/Tooltip-c1df7ee3.js +370 -0
- package/dist/cjs/_rollupPluginBabelHelpers-8b2e54ad.js +365 -0
- package/dist/cjs/autocomplete.js +22 -0
- package/dist/cjs/breadcrumb.js +139 -0
- package/dist/cjs/button.js +20 -0
- package/dist/cjs/carousel.js +662 -0
- package/dist/cjs/checkbox.js +86 -0
- package/dist/cjs/clockpicker.js +461 -0
- package/dist/cjs/collapse.js +128 -0
- package/dist/cjs/colorpicker.js +23 -0
- package/dist/cjs/config-8cfb5a4a.js +81 -0
- package/dist/cjs/config.js +18 -0
- package/dist/cjs/datepicker.js +27 -0
- package/dist/cjs/datetimepicker.js +377 -0
- package/dist/cjs/dialog.js +308 -0
- package/dist/cjs/dropdown.js +23 -0
- package/dist/cjs/field.js +18 -0
- package/dist/cjs/helpers.js +375 -0
- package/dist/cjs/icon.js +19 -0
- package/dist/cjs/image.js +19 -0
- package/dist/cjs/index-99d1c930.js +1633 -0
- package/dist/cjs/index.js +216 -0
- package/dist/cjs/input.js +21 -0
- package/dist/cjs/loading.js +38 -0
- package/dist/cjs/menu.js +304 -0
- package/dist/cjs/message.js +67 -0
- package/dist/cjs/modal.js +59 -0
- package/dist/cjs/navbar.js +679 -0
- package/dist/cjs/notification.js +181 -0
- package/dist/cjs/numberinput.js +278 -0
- package/dist/cjs/pagination.js +22 -0
- package/dist/cjs/plugins-7f41b028.js +94 -0
- package/dist/cjs/progress.js +239 -0
- package/dist/cjs/radio.js +130 -0
- package/dist/cjs/rate.js +156 -0
- package/dist/cjs/select.js +21 -0
- package/dist/cjs/sidebar.js +303 -0
- package/dist/cjs/skeleton.js +111 -0
- package/dist/cjs/slider.js +603 -0
- package/dist/cjs/snackbar.js +132 -0
- package/dist/cjs/ssr-20dba236.js +10 -0
- package/dist/cjs/steps.js +278 -0
- package/dist/cjs/switch.js +139 -0
- package/dist/cjs/table.js +1695 -0
- package/dist/cjs/tabs.js +214 -0
- package/dist/cjs/tag.js +70 -0
- package/dist/cjs/taginput.js +331 -0
- package/dist/cjs/timepicker.js +28 -0
- package/dist/cjs/toast.js +106 -0
- package/dist/cjs/tooltip.js +19 -0
- package/dist/cjs/trapFocus-261420b0.js +49 -0
- package/dist/cjs/upload.js +205 -0
- package/dist/components/autocomplete/index.js +1620 -0
- package/dist/components/autocomplete/index.min.js +2 -0
- package/dist/components/breadcrumb/index.js +297 -0
- package/dist/components/breadcrumb/index.min.js +2 -0
- package/dist/components/button/index.js +569 -0
- package/dist/components/button/index.min.js +2 -0
- package/dist/components/carousel/index.js +1629 -0
- package/dist/components/carousel/index.min.js +2 -0
- package/dist/components/checkbox/index.js +279 -0
- package/dist/components/checkbox/index.min.js +2 -0
- package/dist/components/clockpicker/index.js +3131 -0
- package/dist/components/clockpicker/index.min.js +2 -0
- package/dist/components/collapse/index.js +217 -0
- package/dist/components/collapse/index.min.js +2 -0
- package/dist/components/colorpicker/index.js +4249 -0
- package/dist/components/colorpicker/index.min.js +2 -0
- package/dist/components/datepicker/index.js +3845 -0
- package/dist/components/datepicker/index.min.js +2 -0
- package/dist/components/datetimepicker/index.js +4902 -0
- package/dist/components/datetimepicker/index.min.js +2 -0
- package/dist/components/dialog/index.js +1168 -0
- package/dist/components/dialog/index.min.js +2 -0
- package/dist/components/dropdown/index.js +1043 -0
- package/dist/components/dropdown/index.min.js +2 -0
- package/dist/components/field/index.js +511 -0
- package/dist/components/field/index.min.js +2 -0
- package/dist/components/icon/index.js +463 -0
- package/dist/components/icon/index.min.js +2 -0
- package/dist/components/image/index.js +513 -0
- package/dist/components/image/index.min.js +2 -0
- package/dist/components/input/index.js +862 -0
- package/dist/components/input/index.min.js +2 -0
- package/dist/components/loading/index.js +366 -0
- package/dist/components/loading/index.min.js +2 -0
- package/dist/components/menu/index.js +748 -0
- package/dist/components/menu/index.min.js +2 -0
- package/dist/components/message/index.js +650 -0
- package/dist/components/message/index.min.js +2 -0
- package/dist/components/modal/index.js +624 -0
- package/dist/components/modal/index.min.js +2 -0
- package/dist/components/navbar/index.js +805 -0
- package/dist/components/navbar/index.min.js +2 -0
- package/dist/components/notification/index.js +923 -0
- package/dist/components/notification/index.min.js +2 -0
- package/dist/components/numberinput/index.js +1119 -0
- package/dist/components/numberinput/index.min.js +2 -0
- package/dist/components/pagination/index.js +868 -0
- package/dist/components/pagination/index.min.js +2 -0
- package/dist/components/progress/index.js +621 -0
- package/dist/components/progress/index.min.js +2 -0
- package/dist/components/radio/index.js +260 -0
- package/dist/components/radio/index.min.js +2 -0
- package/dist/components/rate/index.js +600 -0
- package/dist/components/rate/index.min.js +2 -0
- package/dist/components/select/index.js +715 -0
- package/dist/components/select/index.min.js +2 -0
- package/dist/components/sidebar/index.js +467 -0
- package/dist/components/sidebar/index.min.js +2 -0
- package/dist/components/skeleton/index.js +200 -0
- package/dist/components/skeleton/index.min.js +2 -0
- package/dist/components/slider/index.js +1264 -0
- package/dist/components/slider/index.min.js +2 -0
- package/dist/components/snackbar/index.js +527 -0
- package/dist/components/snackbar/index.min.js +2 -0
- package/dist/components/steps/index.js +1180 -0
- package/dist/components/steps/index.min.js +2 -0
- package/dist/components/switch/index.js +297 -0
- package/dist/components/switch/index.min.js +2 -0
- package/dist/components/table/index.js +3480 -0
- package/dist/components/table/index.min.js +2 -0
- package/dist/components/tabs/index.js +1116 -0
- package/dist/components/tabs/index.min.js +2 -0
- package/dist/components/tag/index.js +307 -0
- package/dist/components/tag/index.min.js +2 -0
- package/dist/components/taginput/index.js +2104 -0
- package/dist/components/taginput/index.min.js +2 -0
- package/dist/components/timepicker/index.js +2843 -0
- package/dist/components/timepicker/index.min.js +2 -0
- package/dist/components/toast/index.js +501 -0
- package/dist/components/toast/index.min.js +2 -0
- package/dist/components/tooltip/index.js +630 -0
- package/dist/components/tooltip/index.min.js +2 -0
- package/dist/components/upload/index.js +525 -0
- package/dist/components/upload/index.min.js +2 -0
- package/dist/esm/Autocomplete-1a6e8770.js +671 -0
- package/dist/esm/Button-521f6efc.js +112 -0
- package/dist/esm/CheckRadioMixin-e726a83c.js +43 -0
- package/dist/esm/Checkbox-1d02686e.js +68 -0
- package/dist/esm/Datepicker-0ae1e826.js +1677 -0
- package/dist/esm/DropdownItem-55682322.js +556 -0
- package/dist/esm/Field-3ceba31e.js +313 -0
- package/dist/esm/FormElementMixin-b223d3c7.js +161 -0
- package/dist/esm/Icon-60d47b31.js +187 -0
- package/dist/esm/Image-75808acb.js +297 -0
- package/dist/esm/InjectedChildMixin-b4220787.js +130 -0
- package/dist/esm/Input-20612b63.js +246 -0
- package/dist/esm/Loading-ae028ea5.js +148 -0
- package/dist/esm/MessageMixin-d577a9f5.js +144 -0
- package/dist/esm/Modal-7da7641f.js +276 -0
- package/dist/esm/NoticeMixin-bd6f61d9.js +152 -0
- package/dist/esm/Pagination-68f12c1e.js +409 -0
- package/dist/esm/Select-97781d4e.js +98 -0
- package/dist/esm/SlotComponent-8871a20f.js +51 -0
- package/dist/esm/TabbedChildMixin-bcb13767.js +219 -0
- package/dist/esm/Tag-6365aa46.js +152 -0
- package/dist/esm/Timepicker-38480bbc.js +65 -0
- package/dist/esm/TimepickerMixin-d736b0a9.js +659 -0
- package/dist/esm/Tooltip-d98a769c.js +368 -0
- package/dist/esm/_rollupPluginBabelHelpers-df313029.js +350 -0
- package/dist/esm/autocomplete.js +18 -0
- package/dist/esm/breadcrumb.js +133 -0
- package/dist/esm/button.js +16 -0
- package/dist/esm/carousel.js +655 -0
- package/dist/esm/checkbox.js +81 -0
- package/dist/esm/clockpicker.js +456 -0
- package/dist/esm/collapse.js +123 -0
- package/dist/esm/colorpicker.js +14 -0
- package/dist/esm/config-e7d4b9c2.js +78 -0
- package/dist/esm/config.js +14 -0
- package/dist/esm/datepicker.js +23 -0
- package/dist/esm/datetimepicker.js +372 -0
- package/dist/esm/dialog.js +302 -0
- package/dist/esm/dropdown.js +18 -0
- package/dist/esm/field.js +14 -0
- package/dist/esm/helpers.js +348 -0
- package/dist/esm/icon.js +15 -0
- package/dist/esm/image.js +15 -0
- package/dist/esm/index-903f63ea.js +1629 -0
- package/dist/esm/index.js +182 -0
- package/dist/esm/input.js +17 -0
- package/dist/esm/loading.js +33 -0
- package/dist/esm/menu.js +297 -0
- package/dist/esm/message.js +62 -0
- package/dist/esm/modal.js +54 -0
- package/dist/esm/navbar.js +672 -0
- package/dist/esm/notification.js +175 -0
- package/dist/esm/numberinput.js +273 -0
- package/dist/esm/pagination.js +17 -0
- package/dist/esm/plugins-218aea86.js +89 -0
- package/dist/esm/progress.js +233 -0
- package/dist/esm/radio.js +124 -0
- package/dist/esm/rate.js +151 -0
- package/dist/esm/select.js +17 -0
- package/dist/esm/sidebar.js +298 -0
- package/dist/esm/skeleton.js +106 -0
- package/dist/esm/slider.js +597 -0
- package/dist/esm/snackbar.js +126 -0
- package/dist/esm/ssr-b847d137.js +7 -0
- package/dist/esm/steps.js +272 -0
- package/dist/esm/switch.js +134 -0
- package/dist/esm/table.js +1689 -0
- package/dist/esm/tabs.js +208 -0
- package/dist/esm/tag.js +65 -0
- package/dist/esm/taginput.js +326 -0
- package/dist/esm/timepicker.js +24 -0
- package/dist/esm/toast.js +100 -0
- package/dist/esm/tooltip.js +15 -0
- package/dist/esm/trapFocus-f0736873.js +47 -0
- package/dist/esm/upload.js +200 -0
- package/dist/vetur/attributes.json +3238 -0
- package/dist/vetur/tags.json +1183 -0
- package/package.json +3 -3
- package/src/components/autocomplete/Autocomplete.spec.js +16 -0
- package/src/components/autocomplete/Autocomplete.vue +9 -3
- package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue +2 -0
- package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue +2 -0
- package/src/components/dropdown/Dropdown.vue +51 -3
- package/src/components/numberinput/Numberinput.vue +4 -0
- package/src/components/sidebar/Sidebar.vue +1 -0
- package/src/components/slider/Slider.vue +7 -2
- package/src/components/slider/SliderThumb.vue +8 -0
- package/src/components/table/Table.vue +4 -1
- package/src/components/table/TableColumn.spec.js +51 -0
- package/src/components/table/TableColumn.vue +8 -1
- package/src/components/taginput/Taginput.vue +7 -2
- package/src/components/tooltip/Tooltip.vue +10 -3
- package/src/scss/components/_dropdown.scss +4 -2
|
@@ -0,0 +1,1629 @@
|
|
|
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.Carousel = {}));
|
|
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
|
+
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
92
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
93
|
+
if (!it) {
|
|
94
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
95
|
+
if (it) o = it;
|
|
96
|
+
var i = 0;
|
|
97
|
+
var F = function () {};
|
|
98
|
+
return {
|
|
99
|
+
s: F,
|
|
100
|
+
n: function () {
|
|
101
|
+
if (i >= o.length) return {
|
|
102
|
+
done: true
|
|
103
|
+
};
|
|
104
|
+
return {
|
|
105
|
+
done: false,
|
|
106
|
+
value: o[i++]
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
e: function (e) {
|
|
110
|
+
throw e;
|
|
111
|
+
},
|
|
112
|
+
f: F
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
116
|
+
}
|
|
117
|
+
var normalCompletion = true,
|
|
118
|
+
didErr = false,
|
|
119
|
+
err;
|
|
120
|
+
return {
|
|
121
|
+
s: function () {
|
|
122
|
+
it = it.call(o);
|
|
123
|
+
},
|
|
124
|
+
n: function () {
|
|
125
|
+
var step = it.next();
|
|
126
|
+
normalCompletion = step.done;
|
|
127
|
+
return step;
|
|
128
|
+
},
|
|
129
|
+
e: function (e) {
|
|
130
|
+
didErr = true;
|
|
131
|
+
err = e;
|
|
132
|
+
},
|
|
133
|
+
f: function () {
|
|
134
|
+
try {
|
|
135
|
+
if (!normalCompletion && it.return != null) it.return();
|
|
136
|
+
} finally {
|
|
137
|
+
if (didErr) throw err;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
var config = {
|
|
144
|
+
defaultContainerElement: null,
|
|
145
|
+
defaultIconPack: 'mdi',
|
|
146
|
+
defaultIconComponent: null,
|
|
147
|
+
defaultIconPrev: 'chevron-left',
|
|
148
|
+
defaultIconNext: 'chevron-right',
|
|
149
|
+
defaultLocale: undefined,
|
|
150
|
+
defaultDialogConfirmText: null,
|
|
151
|
+
defaultDialogCancelText: null,
|
|
152
|
+
defaultSnackbarDuration: 3500,
|
|
153
|
+
defaultSnackbarPosition: null,
|
|
154
|
+
defaultToastDuration: 2000,
|
|
155
|
+
defaultToastPosition: null,
|
|
156
|
+
defaultNotificationDuration: 2000,
|
|
157
|
+
defaultNotificationPosition: null,
|
|
158
|
+
defaultTooltipType: 'is-primary',
|
|
159
|
+
defaultTooltipDelay: null,
|
|
160
|
+
defaultTooltipCloseDelay: null,
|
|
161
|
+
defaultSidebarDelay: null,
|
|
162
|
+
defaultInputAutocomplete: 'on',
|
|
163
|
+
defaultDateFormatter: null,
|
|
164
|
+
defaultDateParser: null,
|
|
165
|
+
defaultDateCreator: null,
|
|
166
|
+
defaultTimeCreator: null,
|
|
167
|
+
defaultDayNames: null,
|
|
168
|
+
defaultMonthNames: null,
|
|
169
|
+
defaultFirstDayOfWeek: null,
|
|
170
|
+
defaultUnselectableDaysOfWeek: null,
|
|
171
|
+
defaultTimeFormatter: null,
|
|
172
|
+
defaultTimeParser: null,
|
|
173
|
+
defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
|
|
174
|
+
defaultModalScroll: null,
|
|
175
|
+
defaultDatepickerMobileNative: true,
|
|
176
|
+
defaultTimepickerMobileNative: true,
|
|
177
|
+
defaultTimepickerMobileModal: true,
|
|
178
|
+
defaultNoticeQueue: true,
|
|
179
|
+
defaultInputHasCounter: true,
|
|
180
|
+
defaultTaginputHasCounter: true,
|
|
181
|
+
defaultUseHtml5Validation: true,
|
|
182
|
+
defaultDropdownMobileModal: true,
|
|
183
|
+
defaultFieldLabelPosition: null,
|
|
184
|
+
defaultDatepickerYearsRange: [-100, 10],
|
|
185
|
+
defaultDatepickerNearbyMonthDays: true,
|
|
186
|
+
defaultDatepickerNearbySelectableMonthDays: false,
|
|
187
|
+
defaultDatepickerShowWeekNumber: false,
|
|
188
|
+
defaultDatepickerWeekNumberClickable: false,
|
|
189
|
+
defaultDatepickerMobileModal: true,
|
|
190
|
+
defaultTrapFocus: true,
|
|
191
|
+
defaultAutoFocus: true,
|
|
192
|
+
defaultButtonRounded: false,
|
|
193
|
+
defaultSwitchRounded: true,
|
|
194
|
+
defaultCarouselInterval: 3500,
|
|
195
|
+
defaultTabsExpanded: false,
|
|
196
|
+
defaultTabsAnimated: true,
|
|
197
|
+
defaultTabsType: null,
|
|
198
|
+
defaultStatusIcon: true,
|
|
199
|
+
defaultProgrammaticPromise: false,
|
|
200
|
+
defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
|
|
201
|
+
defaultImageWebpFallback: null,
|
|
202
|
+
defaultImageLazy: true,
|
|
203
|
+
defaultImageResponsive: true,
|
|
204
|
+
defaultImageRatio: null,
|
|
205
|
+
defaultImageSrcsetFormatter: null,
|
|
206
|
+
defaultBreadcrumbTag: 'a',
|
|
207
|
+
defaultBreadcrumbAlign: 'is-left',
|
|
208
|
+
defaultBreadcrumbSeparator: '',
|
|
209
|
+
defaultBreadcrumbSize: 'is-medium',
|
|
210
|
+
customIconPacks: null
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* +/- function to native math sign
|
|
215
|
+
*/
|
|
216
|
+
function signPoly(value) {
|
|
217
|
+
if (value < 0) return -1;
|
|
218
|
+
return value > 0 ? 1 : 0;
|
|
219
|
+
}
|
|
220
|
+
var sign = Math.sign || signPoly;
|
|
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
|
+
* Native modulo bug with negative numbers
|
|
234
|
+
* @param n
|
|
235
|
+
* @param mod
|
|
236
|
+
* @returns {number}
|
|
237
|
+
*/
|
|
238
|
+
function mod(n, mod) {
|
|
239
|
+
return (n % mod + mod) % mod;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Asserts a value is beetween min and max
|
|
244
|
+
* @param val
|
|
245
|
+
* @param min
|
|
246
|
+
* @param max
|
|
247
|
+
* @returns {number}
|
|
248
|
+
*/
|
|
249
|
+
function bound(val, min, max) {
|
|
250
|
+
return Math.max(min, Math.min(max, val));
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Merge function to replace Object.assign with deep merging possibility
|
|
255
|
+
*/
|
|
256
|
+
var isObject = function isObject(item) {
|
|
257
|
+
return _typeof(item) === 'object' && !Array.isArray(item);
|
|
258
|
+
};
|
|
259
|
+
var mergeFn = function mergeFn(target, source) {
|
|
260
|
+
var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
261
|
+
if (deep || !Object.assign) {
|
|
262
|
+
var isDeep = function isDeep(prop) {
|
|
263
|
+
return isObject(source[prop]) && target !== null && target.hasOwnProperty(prop) && isObject(target[prop]);
|
|
264
|
+
};
|
|
265
|
+
var replaced = Object.getOwnPropertyNames(source).map(function (prop) {
|
|
266
|
+
return _defineProperty({}, prop, isDeep(prop) ? mergeFn(target[prop], source[prop], deep) : source[prop]);
|
|
267
|
+
}).reduce(function (a, b) {
|
|
268
|
+
return _objectSpread2(_objectSpread2({}, a), b);
|
|
269
|
+
}, {});
|
|
270
|
+
return _objectSpread2(_objectSpread2({}, target), replaced);
|
|
271
|
+
} else {
|
|
272
|
+
return Object.assign(target, source);
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
var merge = mergeFn;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Based on
|
|
279
|
+
* https://github.com/fregante/supports-webp
|
|
280
|
+
*/
|
|
281
|
+
function isWebpSupported() {
|
|
282
|
+
return new Promise(function (resolve) {
|
|
283
|
+
var image = new Image();
|
|
284
|
+
image.onerror = function () {
|
|
285
|
+
return resolve(false);
|
|
286
|
+
};
|
|
287
|
+
image.onload = function () {
|
|
288
|
+
return resolve(image.width === 1);
|
|
289
|
+
};
|
|
290
|
+
image.src = 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=';
|
|
291
|
+
}).catch(function () {
|
|
292
|
+
return false;
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
var mdiIcons = {
|
|
297
|
+
sizes: {
|
|
298
|
+
'default': 'mdi-24px',
|
|
299
|
+
'is-small': null,
|
|
300
|
+
'is-medium': 'mdi-36px',
|
|
301
|
+
'is-large': 'mdi-48px'
|
|
302
|
+
},
|
|
303
|
+
iconPrefix: 'mdi-'
|
|
304
|
+
};
|
|
305
|
+
var faIcons = function faIcons() {
|
|
306
|
+
var faIconPrefix = config && config.defaultIconComponent ? '' : 'fa-';
|
|
307
|
+
return {
|
|
308
|
+
sizes: {
|
|
309
|
+
'default': null,
|
|
310
|
+
'is-small': null,
|
|
311
|
+
'is-medium': faIconPrefix + 'lg',
|
|
312
|
+
'is-large': faIconPrefix + '2x'
|
|
313
|
+
},
|
|
314
|
+
iconPrefix: faIconPrefix,
|
|
315
|
+
internalIcons: {
|
|
316
|
+
'information': 'info-circle',
|
|
317
|
+
'alert': 'exclamation-triangle',
|
|
318
|
+
'alert-circle': 'exclamation-circle',
|
|
319
|
+
'chevron-right': 'angle-right',
|
|
320
|
+
'chevron-left': 'angle-left',
|
|
321
|
+
'chevron-down': 'angle-down',
|
|
322
|
+
'eye-off': 'eye-slash',
|
|
323
|
+
'menu-down': 'caret-down',
|
|
324
|
+
'menu-up': 'caret-up',
|
|
325
|
+
'close-circle': 'times-circle'
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
var getIcons = function getIcons() {
|
|
330
|
+
var icons = {
|
|
331
|
+
mdi: mdiIcons,
|
|
332
|
+
fa: faIcons(),
|
|
333
|
+
fas: faIcons(),
|
|
334
|
+
far: faIcons(),
|
|
335
|
+
fad: faIcons(),
|
|
336
|
+
fab: faIcons(),
|
|
337
|
+
fal: faIcons(),
|
|
338
|
+
'fa-solid': faIcons(),
|
|
339
|
+
'fa-regular': faIcons(),
|
|
340
|
+
'fa-light': faIcons(),
|
|
341
|
+
'fa-thin': faIcons(),
|
|
342
|
+
'fa-duotone': faIcons(),
|
|
343
|
+
'fa-brands': faIcons()
|
|
344
|
+
};
|
|
345
|
+
if (config && config.customIconPacks) {
|
|
346
|
+
icons = merge(icons, config.customIconPacks, true);
|
|
347
|
+
}
|
|
348
|
+
return icons;
|
|
349
|
+
};
|
|
350
|
+
var getIcons$1 = getIcons;
|
|
351
|
+
|
|
352
|
+
var script$4 = {
|
|
353
|
+
name: 'BIcon',
|
|
354
|
+
props: {
|
|
355
|
+
type: [String, Object],
|
|
356
|
+
component: String,
|
|
357
|
+
pack: String,
|
|
358
|
+
icon: String,
|
|
359
|
+
size: String,
|
|
360
|
+
customSize: String,
|
|
361
|
+
customClass: String,
|
|
362
|
+
both: Boolean // This is used internally to show both MDI and FA icon
|
|
363
|
+
},
|
|
364
|
+
computed: {
|
|
365
|
+
iconConfig: function iconConfig() {
|
|
366
|
+
var allIcons = getIcons$1();
|
|
367
|
+
return allIcons[this.newPack];
|
|
368
|
+
},
|
|
369
|
+
iconPrefix: function iconPrefix() {
|
|
370
|
+
if (this.iconConfig && this.iconConfig.iconPrefix) {
|
|
371
|
+
return this.iconConfig.iconPrefix;
|
|
372
|
+
}
|
|
373
|
+
return '';
|
|
374
|
+
},
|
|
375
|
+
/**
|
|
376
|
+
* Internal icon name based on the pack.
|
|
377
|
+
* If pack is 'fa', gets the equivalent FA icon name of the MDI,
|
|
378
|
+
* internal icons are always MDI.
|
|
379
|
+
*/
|
|
380
|
+
newIcon: function newIcon() {
|
|
381
|
+
return "".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon));
|
|
382
|
+
},
|
|
383
|
+
newPack: function newPack() {
|
|
384
|
+
return this.pack || config.defaultIconPack;
|
|
385
|
+
},
|
|
386
|
+
newType: function newType() {
|
|
387
|
+
if (!this.type) return;
|
|
388
|
+
var splitType = [];
|
|
389
|
+
if (typeof this.type === 'string') {
|
|
390
|
+
splitType = this.type.split('-');
|
|
391
|
+
} else {
|
|
392
|
+
for (var key in this.type) {
|
|
393
|
+
if (this.type[key]) {
|
|
394
|
+
splitType = key.split('-');
|
|
395
|
+
break;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
if (splitType.length <= 1) return;
|
|
400
|
+
var _splitType = splitType,
|
|
401
|
+
_splitType2 = _toArray(_splitType),
|
|
402
|
+
type = _splitType2.slice(1);
|
|
403
|
+
return "has-text-".concat(type.join('-'));
|
|
404
|
+
},
|
|
405
|
+
newCustomSize: function newCustomSize() {
|
|
406
|
+
return this.customSize || this.customSizeByPack;
|
|
407
|
+
},
|
|
408
|
+
customSizeByPack: function customSizeByPack() {
|
|
409
|
+
if (this.iconConfig && this.iconConfig.sizes) {
|
|
410
|
+
if (this.size && this.iconConfig.sizes[this.size] !== undefined) {
|
|
411
|
+
return this.iconConfig.sizes[this.size];
|
|
412
|
+
} else if (this.iconConfig.sizes.default) {
|
|
413
|
+
return this.iconConfig.sizes.default;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
return null;
|
|
417
|
+
},
|
|
418
|
+
useIconComponent: function useIconComponent() {
|
|
419
|
+
return this.component || config.defaultIconComponent;
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
methods: {
|
|
423
|
+
/**
|
|
424
|
+
* Equivalent icon name of the MDI.
|
|
425
|
+
*/
|
|
426
|
+
getEquivalentIconOf: function getEquivalentIconOf(value) {
|
|
427
|
+
// Only transform the class if the both prop is set to true
|
|
428
|
+
if (!this.both) {
|
|
429
|
+
return value;
|
|
430
|
+
}
|
|
431
|
+
if (this.iconConfig && this.iconConfig.internalIcons && this.iconConfig.internalIcons[value]) {
|
|
432
|
+
return this.iconConfig.internalIcons[value];
|
|
433
|
+
}
|
|
434
|
+
return value;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
440
|
+
if (typeof shadowMode !== 'boolean') {
|
|
441
|
+
createInjectorSSR = createInjector;
|
|
442
|
+
createInjector = shadowMode;
|
|
443
|
+
shadowMode = false;
|
|
444
|
+
}
|
|
445
|
+
// Vue.extend constructor export interop.
|
|
446
|
+
const options = typeof script === 'function' ? script.options : script;
|
|
447
|
+
// render functions
|
|
448
|
+
if (template && template.render) {
|
|
449
|
+
options.render = template.render;
|
|
450
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
451
|
+
options._compiled = true;
|
|
452
|
+
// functional template
|
|
453
|
+
if (isFunctionalTemplate) {
|
|
454
|
+
options.functional = true;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
// scopedId
|
|
458
|
+
if (scopeId) {
|
|
459
|
+
options._scopeId = scopeId;
|
|
460
|
+
}
|
|
461
|
+
let hook;
|
|
462
|
+
if (moduleIdentifier) {
|
|
463
|
+
// server build
|
|
464
|
+
hook = function (context) {
|
|
465
|
+
// 2.3 injection
|
|
466
|
+
context =
|
|
467
|
+
context || // cached call
|
|
468
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
469
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
|
|
470
|
+
// 2.2 with runInNewContext: true
|
|
471
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
472
|
+
context = __VUE_SSR_CONTEXT__;
|
|
473
|
+
}
|
|
474
|
+
// inject component styles
|
|
475
|
+
if (style) {
|
|
476
|
+
style.call(this, createInjectorSSR(context));
|
|
477
|
+
}
|
|
478
|
+
// register component module identifier for async chunk inference
|
|
479
|
+
if (context && context._registeredComponents) {
|
|
480
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
// used by ssr in case component is cached and beforeCreate
|
|
484
|
+
// never gets called
|
|
485
|
+
options._ssrRegister = hook;
|
|
486
|
+
}
|
|
487
|
+
else if (style) {
|
|
488
|
+
hook = shadowMode
|
|
489
|
+
? function (context) {
|
|
490
|
+
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
491
|
+
}
|
|
492
|
+
: function (context) {
|
|
493
|
+
style.call(this, createInjector(context));
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
if (hook) {
|
|
497
|
+
if (options.functional) {
|
|
498
|
+
// register for functional component in vue file
|
|
499
|
+
const originalRender = options.render;
|
|
500
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
501
|
+
hook.call(context);
|
|
502
|
+
return originalRender(h, context);
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
506
|
+
// inject component registration as beforeCreate hook
|
|
507
|
+
const existing = options.beforeCreate;
|
|
508
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
return script;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/* script */
|
|
515
|
+
const __vue_script__$4 = script$4;
|
|
516
|
+
|
|
517
|
+
/* template */
|
|
518
|
+
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)};
|
|
519
|
+
var __vue_staticRenderFns__$4 = [];
|
|
520
|
+
|
|
521
|
+
/* style */
|
|
522
|
+
const __vue_inject_styles__$4 = undefined;
|
|
523
|
+
/* scoped */
|
|
524
|
+
const __vue_scope_id__$4 = undefined;
|
|
525
|
+
/* module identifier */
|
|
526
|
+
const __vue_module_identifier__$4 = undefined;
|
|
527
|
+
/* functional template */
|
|
528
|
+
const __vue_is_functional_template__$4 = false;
|
|
529
|
+
/* style inject */
|
|
530
|
+
|
|
531
|
+
/* style inject SSR */
|
|
532
|
+
|
|
533
|
+
/* style inject shadow dom */
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
const __vue_component__$4 = /*#__PURE__*/normalizeComponent(
|
|
538
|
+
{ render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
|
|
539
|
+
__vue_inject_styles__$4,
|
|
540
|
+
__vue_script__$4,
|
|
541
|
+
__vue_scope_id__$4,
|
|
542
|
+
__vue_is_functional_template__$4,
|
|
543
|
+
__vue_module_identifier__$4,
|
|
544
|
+
false,
|
|
545
|
+
undefined,
|
|
546
|
+
undefined,
|
|
547
|
+
undefined
|
|
548
|
+
);
|
|
549
|
+
|
|
550
|
+
var Icon = __vue_component__$4;
|
|
551
|
+
|
|
552
|
+
var items = 1;
|
|
553
|
+
var sorted$1 = 3;
|
|
554
|
+
var Sorted$1 = sorted$1;
|
|
555
|
+
var ProviderParentMixin = (function (itemName) {
|
|
556
|
+
var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
557
|
+
var mixin = {
|
|
558
|
+
provide: function provide() {
|
|
559
|
+
return _defineProperty({}, 'b' + itemName, this);
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
if (hasFlag(flags, items)) {
|
|
563
|
+
mixin.data = function () {
|
|
564
|
+
return {
|
|
565
|
+
childItems: []
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
mixin.methods = {
|
|
569
|
+
_registerItem: function _registerItem(item) {
|
|
570
|
+
this.childItems.push(item);
|
|
571
|
+
},
|
|
572
|
+
_unregisterItem: function _unregisterItem(item) {
|
|
573
|
+
this.childItems = this.childItems.filter(function (i) {
|
|
574
|
+
return i !== item;
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
};
|
|
578
|
+
if (hasFlag(flags, sorted$1)) {
|
|
579
|
+
mixin.watch = {
|
|
580
|
+
/**
|
|
581
|
+
* When items are added/removed deep search in the elements default's slot
|
|
582
|
+
* And mark the items with their index
|
|
583
|
+
*/
|
|
584
|
+
childItems: function childItems(items) {
|
|
585
|
+
if (items.length > 0 && this.$scopedSlots.default) {
|
|
586
|
+
var tag = items[0].$vnode.tag;
|
|
587
|
+
var index = 0;
|
|
588
|
+
var deepSearch = function deepSearch(children) {
|
|
589
|
+
var _iterator = _createForOfIteratorHelper(children),
|
|
590
|
+
_step;
|
|
591
|
+
try {
|
|
592
|
+
var _loop = function _loop() {
|
|
593
|
+
var child = _step.value;
|
|
594
|
+
if (child.tag === tag) {
|
|
595
|
+
// An item with the same tag will for sure be found
|
|
596
|
+
var it = items.find(function (i) {
|
|
597
|
+
return i.$vnode === child;
|
|
598
|
+
});
|
|
599
|
+
if (it) {
|
|
600
|
+
it.index = index++;
|
|
601
|
+
}
|
|
602
|
+
} else if (child.tag) {
|
|
603
|
+
var sub = child.componentInstance ? child.componentInstance.$scopedSlots.default ? child.componentInstance.$scopedSlots.default() : child.componentInstance.$children : child.children;
|
|
604
|
+
if (Array.isArray(sub) && sub.length > 0) {
|
|
605
|
+
deepSearch(sub.map(function (e) {
|
|
606
|
+
return e.$vnode;
|
|
607
|
+
}));
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
612
|
+
_loop();
|
|
613
|
+
}
|
|
614
|
+
} catch (err) {
|
|
615
|
+
_iterator.e(err);
|
|
616
|
+
} finally {
|
|
617
|
+
_iterator.f();
|
|
618
|
+
}
|
|
619
|
+
return false;
|
|
620
|
+
};
|
|
621
|
+
deepSearch(this.$scopedSlots.default());
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
mixin.computed = {
|
|
626
|
+
/**
|
|
627
|
+
* When items are added/removed sort them according to their position
|
|
628
|
+
*/
|
|
629
|
+
sortedItems: function sortedItems() {
|
|
630
|
+
return this.childItems.slice().sort(function (i1, i2) {
|
|
631
|
+
return i1.index - i2.index;
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
return mixin;
|
|
638
|
+
});
|
|
639
|
+
|
|
640
|
+
var script$3 = {
|
|
641
|
+
name: 'BCarousel',
|
|
642
|
+
components: _defineProperty({}, Icon.name, Icon),
|
|
643
|
+
mixins: [ProviderParentMixin('carousel', Sorted$1)],
|
|
644
|
+
props: {
|
|
645
|
+
value: {
|
|
646
|
+
type: Number,
|
|
647
|
+
default: 0
|
|
648
|
+
},
|
|
649
|
+
animated: {
|
|
650
|
+
type: String,
|
|
651
|
+
default: 'slide'
|
|
652
|
+
},
|
|
653
|
+
interval: Number,
|
|
654
|
+
hasDrag: {
|
|
655
|
+
type: Boolean,
|
|
656
|
+
default: true
|
|
657
|
+
},
|
|
658
|
+
autoplay: {
|
|
659
|
+
type: Boolean,
|
|
660
|
+
default: true
|
|
661
|
+
},
|
|
662
|
+
pauseHover: {
|
|
663
|
+
type: Boolean,
|
|
664
|
+
default: true
|
|
665
|
+
},
|
|
666
|
+
pauseInfo: {
|
|
667
|
+
type: Boolean,
|
|
668
|
+
default: true
|
|
669
|
+
},
|
|
670
|
+
pauseInfoType: {
|
|
671
|
+
type: String,
|
|
672
|
+
default: 'is-white'
|
|
673
|
+
},
|
|
674
|
+
pauseText: {
|
|
675
|
+
type: String,
|
|
676
|
+
default: 'Pause'
|
|
677
|
+
},
|
|
678
|
+
arrow: {
|
|
679
|
+
type: Boolean,
|
|
680
|
+
default: true
|
|
681
|
+
},
|
|
682
|
+
arrowHover: {
|
|
683
|
+
type: Boolean,
|
|
684
|
+
default: true
|
|
685
|
+
},
|
|
686
|
+
repeat: {
|
|
687
|
+
type: Boolean,
|
|
688
|
+
default: true
|
|
689
|
+
},
|
|
690
|
+
iconPack: String,
|
|
691
|
+
iconSize: String,
|
|
692
|
+
iconPrev: {
|
|
693
|
+
type: String,
|
|
694
|
+
default: function _default() {
|
|
695
|
+
return config.defaultIconPrev;
|
|
696
|
+
}
|
|
697
|
+
},
|
|
698
|
+
iconNext: {
|
|
699
|
+
type: String,
|
|
700
|
+
default: function _default() {
|
|
701
|
+
return config.defaultIconNext;
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
indicator: {
|
|
705
|
+
type: Boolean,
|
|
706
|
+
default: true
|
|
707
|
+
},
|
|
708
|
+
indicatorBackground: Boolean,
|
|
709
|
+
indicatorCustom: Boolean,
|
|
710
|
+
indicatorCustomSize: {
|
|
711
|
+
type: String,
|
|
712
|
+
default: 'is-small'
|
|
713
|
+
},
|
|
714
|
+
indicatorInside: {
|
|
715
|
+
type: Boolean,
|
|
716
|
+
default: true
|
|
717
|
+
},
|
|
718
|
+
indicatorMode: {
|
|
719
|
+
type: String,
|
|
720
|
+
default: 'click'
|
|
721
|
+
},
|
|
722
|
+
indicatorPosition: {
|
|
723
|
+
type: String,
|
|
724
|
+
default: 'is-bottom'
|
|
725
|
+
},
|
|
726
|
+
indicatorStyle: {
|
|
727
|
+
type: String,
|
|
728
|
+
default: 'is-dots'
|
|
729
|
+
},
|
|
730
|
+
overlay: Boolean,
|
|
731
|
+
progress: Boolean,
|
|
732
|
+
progressType: {
|
|
733
|
+
type: String,
|
|
734
|
+
default: 'is-primary'
|
|
735
|
+
},
|
|
736
|
+
withCarouselList: Boolean
|
|
737
|
+
},
|
|
738
|
+
data: function data() {
|
|
739
|
+
return {
|
|
740
|
+
transition: 'next',
|
|
741
|
+
activeChild: this.value || 0,
|
|
742
|
+
isPause: false,
|
|
743
|
+
dragX: false,
|
|
744
|
+
timer: null
|
|
745
|
+
};
|
|
746
|
+
},
|
|
747
|
+
computed: {
|
|
748
|
+
indicatorClasses: function indicatorClasses() {
|
|
749
|
+
return [{
|
|
750
|
+
'has-background': this.indicatorBackground,
|
|
751
|
+
'has-custom': this.indicatorCustom,
|
|
752
|
+
'is-inside': this.indicatorInside
|
|
753
|
+
}, this.indicatorCustom && this.indicatorCustomSize, this.indicatorInside && this.indicatorPosition];
|
|
754
|
+
},
|
|
755
|
+
// checking arrows
|
|
756
|
+
hasPrev: function hasPrev() {
|
|
757
|
+
return this.repeat || this.activeChild !== 0;
|
|
758
|
+
},
|
|
759
|
+
hasNext: function hasNext() {
|
|
760
|
+
return this.repeat || this.activeChild < this.childItems.length - 1;
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
watch: {
|
|
764
|
+
/**
|
|
765
|
+
* When v-model is changed set the new active item.
|
|
766
|
+
*/
|
|
767
|
+
value: function value(_value) {
|
|
768
|
+
this.changeActive(_value);
|
|
769
|
+
},
|
|
770
|
+
/**
|
|
771
|
+
* When carousel-items are updated, set active one.
|
|
772
|
+
*/
|
|
773
|
+
sortedItems: function sortedItems(items) {
|
|
774
|
+
if (this.activeChild >= items.length && this.activeChild > 0) {
|
|
775
|
+
this.changeActive(this.activeChild - 1);
|
|
776
|
+
}
|
|
777
|
+
},
|
|
778
|
+
/**
|
|
779
|
+
* When autoplay is changed, start or pause timer accordingly
|
|
780
|
+
*/
|
|
781
|
+
autoplay: function autoplay(status) {
|
|
782
|
+
status ? this.startTimer() : this.pauseTimer();
|
|
783
|
+
},
|
|
784
|
+
/**
|
|
785
|
+
* Since the timer can get paused at the end, if repeat is changed we need to restart it
|
|
786
|
+
*/
|
|
787
|
+
repeat: function repeat(status) {
|
|
788
|
+
if (status) {
|
|
789
|
+
this.startTimer();
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
methods: {
|
|
794
|
+
startTimer: function startTimer() {
|
|
795
|
+
var _this = this;
|
|
796
|
+
if (!this.autoplay || this.timer) return;
|
|
797
|
+
this.isPause = false;
|
|
798
|
+
this.timer = setInterval(function () {
|
|
799
|
+
if (!_this.repeat && _this.activeChild >= _this.childItems.length - 1) {
|
|
800
|
+
_this.pauseTimer();
|
|
801
|
+
} else {
|
|
802
|
+
_this.next();
|
|
803
|
+
}
|
|
804
|
+
}, this.interval || config.defaultCarouselInterval);
|
|
805
|
+
},
|
|
806
|
+
pauseTimer: function pauseTimer() {
|
|
807
|
+
this.isPause = true;
|
|
808
|
+
if (this.timer) {
|
|
809
|
+
clearInterval(this.timer);
|
|
810
|
+
this.timer = null;
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
restartTimer: function restartTimer() {
|
|
814
|
+
this.pauseTimer();
|
|
815
|
+
this.startTimer();
|
|
816
|
+
},
|
|
817
|
+
checkPause: function checkPause() {
|
|
818
|
+
if (this.pauseHover && this.autoplay) {
|
|
819
|
+
this.pauseTimer();
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
/**
|
|
823
|
+
* Change the active item and emit change event.
|
|
824
|
+
* action only for animated slide, there true = next, false = prev
|
|
825
|
+
*/
|
|
826
|
+
changeActive: function changeActive(newIndex) {
|
|
827
|
+
var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
828
|
+
if (this.activeChild === newIndex || isNaN(newIndex)) return;
|
|
829
|
+
direction = direction || newIndex - this.activeChild;
|
|
830
|
+
newIndex = this.repeat ? mod(newIndex, this.childItems.length) : bound(newIndex, 0, this.childItems.length - 1);
|
|
831
|
+
this.transition = direction > 0 ? 'prev' : 'next';
|
|
832
|
+
// Transition names are reversed from the actual direction for correct effect
|
|
833
|
+
|
|
834
|
+
this.activeChild = newIndex;
|
|
835
|
+
if (newIndex !== this.value) {
|
|
836
|
+
this.$emit('input', newIndex);
|
|
837
|
+
}
|
|
838
|
+
this.restartTimer();
|
|
839
|
+
this.$emit('change', newIndex); // BC
|
|
840
|
+
},
|
|
841
|
+
// Indicator trigger when change active item.
|
|
842
|
+
modeChange: function modeChange(trigger, value) {
|
|
843
|
+
if (this.indicatorMode === trigger) {
|
|
844
|
+
return this.changeActive(value);
|
|
845
|
+
}
|
|
846
|
+
},
|
|
847
|
+
prev: function prev() {
|
|
848
|
+
this.changeActive(this.activeChild - 1, -1);
|
|
849
|
+
},
|
|
850
|
+
next: function next() {
|
|
851
|
+
this.changeActive(this.activeChild + 1, 1);
|
|
852
|
+
},
|
|
853
|
+
// handle drag event
|
|
854
|
+
dragStart: function dragStart(event) {
|
|
855
|
+
if (!this.hasDrag || !event.target.draggable) return;
|
|
856
|
+
this.dragX = event.touches ? event.changedTouches[0].pageX : event.pageX;
|
|
857
|
+
if (event.touches) {
|
|
858
|
+
this.pauseTimer();
|
|
859
|
+
} else {
|
|
860
|
+
event.preventDefault();
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
dragEnd: function dragEnd(event) {
|
|
864
|
+
if (this.dragX === false) return;
|
|
865
|
+
var detected = event.touches ? event.changedTouches[0].pageX : event.pageX;
|
|
866
|
+
var diffX = detected - this.dragX;
|
|
867
|
+
if (Math.abs(diffX) > 30) {
|
|
868
|
+
if (diffX < 0) {
|
|
869
|
+
this.next();
|
|
870
|
+
} else {
|
|
871
|
+
this.prev();
|
|
872
|
+
}
|
|
873
|
+
} else {
|
|
874
|
+
event.target.click();
|
|
875
|
+
this.sortedItems[this.activeChild].$emit('click');
|
|
876
|
+
this.$emit('click');
|
|
877
|
+
}
|
|
878
|
+
if (event.touches) {
|
|
879
|
+
this.startTimer();
|
|
880
|
+
}
|
|
881
|
+
this.dragX = false;
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
mounted: function mounted() {
|
|
885
|
+
this.startTimer();
|
|
886
|
+
},
|
|
887
|
+
beforeDestroy: function beforeDestroy() {
|
|
888
|
+
this.pauseTimer();
|
|
889
|
+
}
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
/* script */
|
|
893
|
+
const __vue_script__$3 = script$3;
|
|
894
|
+
|
|
895
|
+
/* template */
|
|
896
|
+
var __vue_render__$3 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"carousel",class:{'is-overlay': _vm.overlay},on:{"mouseenter":_vm.checkPause,"mouseleave":_vm.startTimer}},[(_vm.progress)?_c('progress',{staticClass:"progress",class:_vm.progressType,attrs:{"max":_vm.childItems.length - 1},domProps:{"value":_vm.activeChild}},[_vm._v(" "+_vm._s(_vm.childItems.length - 1)+" ")]):_vm._e(),_c('div',{staticClass:"carousel-items",on:{"mousedown":_vm.dragStart,"mouseup":_vm.dragEnd,"touchstart":function($event){$event.stopPropagation();return _vm.dragStart($event)},"touchend":function($event){$event.stopPropagation();return _vm.dragEnd($event)}}},[_vm._t("default"),(_vm.arrow)?_c('div',{staticClass:"carousel-arrow",class:{'is-hovered': _vm.arrowHover}},[_c('b-icon',{directives:[{name:"show",rawName:"v-show",value:(_vm.hasPrev),expression:"hasPrev"}],staticClass:"has-icons-left",attrs:{"pack":_vm.iconPack,"icon":_vm.iconPrev,"size":_vm.iconSize,"both":""},nativeOn:{"click":function($event){return _vm.prev($event)}}}),_c('b-icon',{directives:[{name:"show",rawName:"v-show",value:(_vm.hasNext),expression:"hasNext"}],staticClass:"has-icons-right",attrs:{"pack":_vm.iconPack,"icon":_vm.iconNext,"size":_vm.iconSize,"both":""},nativeOn:{"click":function($event){return _vm.next($event)}}})],1):_vm._e()],2),(_vm.autoplay && _vm.pauseHover && _vm.pauseInfo && _vm.isPause)?_c('div',{staticClass:"carousel-pause"},[_c('span',{staticClass:"tag",class:_vm.pauseInfoType},[_vm._v(" "+_vm._s(_vm.pauseText)+" ")])]):_vm._e(),(_vm.withCarouselList && !_vm.indicator)?[_vm._t("list",null,{"active":_vm.activeChild,"switch":_vm.changeActive})]:_vm._e(),(_vm.indicator)?_c('div',{staticClass:"carousel-indicator",class:_vm.indicatorClasses},_vm._l((_vm.sortedItems),function(item,index){return _c('a',{key:item._uid,staticClass:"indicator-item",class:{'is-active': item.isActive},on:{"mouseover":function($event){return _vm.modeChange('hover', index)},"click":function($event){return _vm.modeChange('click', index)}}},[_vm._t("indicators",[_c('span',{staticClass:"indicator-style",class:_vm.indicatorStyle})],{"i":index})],2)}),0):_vm._e(),(_vm.overlay)?[_vm._t("overlay")]:_vm._e()],2)};
|
|
897
|
+
var __vue_staticRenderFns__$3 = [];
|
|
898
|
+
|
|
899
|
+
/* style */
|
|
900
|
+
const __vue_inject_styles__$3 = undefined;
|
|
901
|
+
/* scoped */
|
|
902
|
+
const __vue_scope_id__$3 = undefined;
|
|
903
|
+
/* module identifier */
|
|
904
|
+
const __vue_module_identifier__$3 = undefined;
|
|
905
|
+
/* functional template */
|
|
906
|
+
const __vue_is_functional_template__$3 = false;
|
|
907
|
+
/* style inject */
|
|
908
|
+
|
|
909
|
+
/* style inject SSR */
|
|
910
|
+
|
|
911
|
+
/* style inject shadow dom */
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
const __vue_component__$3 = /*#__PURE__*/normalizeComponent(
|
|
916
|
+
{ render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
|
|
917
|
+
__vue_inject_styles__$3,
|
|
918
|
+
__vue_script__$3,
|
|
919
|
+
__vue_scope_id__$3,
|
|
920
|
+
__vue_is_functional_template__$3,
|
|
921
|
+
__vue_module_identifier__$3,
|
|
922
|
+
false,
|
|
923
|
+
undefined,
|
|
924
|
+
undefined,
|
|
925
|
+
undefined
|
|
926
|
+
);
|
|
927
|
+
|
|
928
|
+
var Carousel = __vue_component__$3;
|
|
929
|
+
|
|
930
|
+
var sorted = 1;
|
|
931
|
+
var optional = 2;
|
|
932
|
+
var Sorted = sorted;
|
|
933
|
+
var InjectedChildMixin = (function (parentItemName) {
|
|
934
|
+
var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
935
|
+
var mixin = {
|
|
936
|
+
inject: {
|
|
937
|
+
parent: {
|
|
938
|
+
from: 'b' + parentItemName,
|
|
939
|
+
default: false
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
created: function created() {
|
|
943
|
+
if (!this.parent) {
|
|
944
|
+
if (!hasFlag(flags, optional)) {
|
|
945
|
+
this.$destroy();
|
|
946
|
+
throw new Error('You should wrap ' + this.$options.name + ' in a ' + parentItemName);
|
|
947
|
+
}
|
|
948
|
+
} else if (this.parent._registerItem) {
|
|
949
|
+
this.parent._registerItem(this);
|
|
950
|
+
}
|
|
951
|
+
},
|
|
952
|
+
beforeDestroy: function beforeDestroy() {
|
|
953
|
+
if (this.parent && this.parent._unregisterItem) {
|
|
954
|
+
this.parent._unregisterItem(this);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
};
|
|
958
|
+
if (hasFlag(flags, sorted)) {
|
|
959
|
+
mixin.data = function () {
|
|
960
|
+
return {
|
|
961
|
+
index: null
|
|
962
|
+
};
|
|
963
|
+
};
|
|
964
|
+
}
|
|
965
|
+
return mixin;
|
|
966
|
+
});
|
|
967
|
+
|
|
968
|
+
//
|
|
969
|
+
var script$2 = {
|
|
970
|
+
name: 'BCarouselItem',
|
|
971
|
+
mixins: [InjectedChildMixin('carousel', Sorted)],
|
|
972
|
+
data: function data() {
|
|
973
|
+
return {
|
|
974
|
+
transitionName: null
|
|
975
|
+
};
|
|
976
|
+
},
|
|
977
|
+
computed: {
|
|
978
|
+
transition: function transition() {
|
|
979
|
+
if (this.parent.animated === 'fade') {
|
|
980
|
+
return 'fade';
|
|
981
|
+
} else if (this.parent.transition) {
|
|
982
|
+
return 'slide-' + this.parent.transition;
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
isActive: function isActive() {
|
|
986
|
+
return this.parent.activeChild === this.index;
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
/* script */
|
|
992
|
+
const __vue_script__$2 = script$2;
|
|
993
|
+
|
|
994
|
+
/* template */
|
|
995
|
+
var __vue_render__$2 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":_vm.transition}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"carousel-item"},[_vm._t("default")],2)])};
|
|
996
|
+
var __vue_staticRenderFns__$2 = [];
|
|
997
|
+
|
|
998
|
+
/* style */
|
|
999
|
+
const __vue_inject_styles__$2 = undefined;
|
|
1000
|
+
/* scoped */
|
|
1001
|
+
const __vue_scope_id__$2 = undefined;
|
|
1002
|
+
/* module identifier */
|
|
1003
|
+
const __vue_module_identifier__$2 = undefined;
|
|
1004
|
+
/* functional template */
|
|
1005
|
+
const __vue_is_functional_template__$2 = false;
|
|
1006
|
+
/* style inject */
|
|
1007
|
+
|
|
1008
|
+
/* style inject SSR */
|
|
1009
|
+
|
|
1010
|
+
/* style inject shadow dom */
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
|
|
1015
|
+
{ render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
|
|
1016
|
+
__vue_inject_styles__$2,
|
|
1017
|
+
__vue_script__$2,
|
|
1018
|
+
__vue_scope_id__$2,
|
|
1019
|
+
__vue_is_functional_template__$2,
|
|
1020
|
+
__vue_module_identifier__$2,
|
|
1021
|
+
false,
|
|
1022
|
+
undefined,
|
|
1023
|
+
undefined,
|
|
1024
|
+
undefined
|
|
1025
|
+
);
|
|
1026
|
+
|
|
1027
|
+
var CarouselItem = __vue_component__$2;
|
|
1028
|
+
|
|
1029
|
+
var script$1 = {
|
|
1030
|
+
name: 'BImage',
|
|
1031
|
+
props: {
|
|
1032
|
+
src: String,
|
|
1033
|
+
alt: String,
|
|
1034
|
+
srcFallback: String,
|
|
1035
|
+
webpFallback: {
|
|
1036
|
+
type: String,
|
|
1037
|
+
default: function _default() {
|
|
1038
|
+
return config.defaultImageWebpFallback;
|
|
1039
|
+
}
|
|
1040
|
+
},
|
|
1041
|
+
lazy: {
|
|
1042
|
+
type: Boolean,
|
|
1043
|
+
default: function _default() {
|
|
1044
|
+
return config.defaultImageLazy;
|
|
1045
|
+
}
|
|
1046
|
+
},
|
|
1047
|
+
responsive: {
|
|
1048
|
+
type: Boolean,
|
|
1049
|
+
default: function _default() {
|
|
1050
|
+
return config.defaultImageResponsive;
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
ratio: {
|
|
1054
|
+
type: String,
|
|
1055
|
+
default: function _default() {
|
|
1056
|
+
return config.defaultImageRatio;
|
|
1057
|
+
}
|
|
1058
|
+
},
|
|
1059
|
+
placeholder: String,
|
|
1060
|
+
srcset: String,
|
|
1061
|
+
srcsetSizes: Array,
|
|
1062
|
+
srcsetFormatter: {
|
|
1063
|
+
type: Function,
|
|
1064
|
+
default: function _default(src, size, vm) {
|
|
1065
|
+
{
|
|
1066
|
+
return vm.formatSrcset(src, size);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
},
|
|
1070
|
+
rounded: {
|
|
1071
|
+
type: Boolean,
|
|
1072
|
+
default: false
|
|
1073
|
+
},
|
|
1074
|
+
captionFirst: {
|
|
1075
|
+
type: Boolean,
|
|
1076
|
+
default: false
|
|
1077
|
+
},
|
|
1078
|
+
customClass: String
|
|
1079
|
+
},
|
|
1080
|
+
data: function data() {
|
|
1081
|
+
return {
|
|
1082
|
+
clientWidth: 0,
|
|
1083
|
+
webpSupportVerified: false,
|
|
1084
|
+
webpSupported: false,
|
|
1085
|
+
useNativeLazy: false,
|
|
1086
|
+
observer: null,
|
|
1087
|
+
inViewPort: false,
|
|
1088
|
+
bulmaKnownRatio: ['square', '1by1', '5by4', '4by3', '3by2', '5by3', '16by9', 'b2y1', '3by1', '4by5', '3by4', '2by3', '3by5', '9by16', '1by2', '1by3'],
|
|
1089
|
+
loaded: false,
|
|
1090
|
+
failed: false
|
|
1091
|
+
};
|
|
1092
|
+
},
|
|
1093
|
+
computed: {
|
|
1094
|
+
ratioPattern: function ratioPattern() {
|
|
1095
|
+
return new RegExp(/([0-9]+)by([0-9]+)/);
|
|
1096
|
+
},
|
|
1097
|
+
hasRatio: function hasRatio() {
|
|
1098
|
+
return this.ratio && this.ratioPattern.test(this.ratio);
|
|
1099
|
+
},
|
|
1100
|
+
figureClasses: function figureClasses() {
|
|
1101
|
+
var classes = {
|
|
1102
|
+
image: this.responsive
|
|
1103
|
+
};
|
|
1104
|
+
if (this.hasRatio && this.bulmaKnownRatio.indexOf(this.ratio) >= 0) {
|
|
1105
|
+
classes["is-".concat(this.ratio)] = true;
|
|
1106
|
+
}
|
|
1107
|
+
return classes;
|
|
1108
|
+
},
|
|
1109
|
+
figureStyles: function figureStyles() {
|
|
1110
|
+
if (this.hasRatio && this.bulmaKnownRatio.indexOf(this.ratio) < 0) {
|
|
1111
|
+
var ratioValues = this.ratioPattern.exec(this.ratio);
|
|
1112
|
+
return {
|
|
1113
|
+
paddingTop: "".concat(ratioValues[2] / ratioValues[1] * 100, "%")
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
},
|
|
1117
|
+
imgClasses: function imgClasses() {
|
|
1118
|
+
return _defineProperty({
|
|
1119
|
+
'is-rounded': this.rounded,
|
|
1120
|
+
'has-ratio': this.hasRatio
|
|
1121
|
+
}, this.customClass, !!this.customClass);
|
|
1122
|
+
},
|
|
1123
|
+
srcExt: function srcExt() {
|
|
1124
|
+
return this.getExt(this.src);
|
|
1125
|
+
},
|
|
1126
|
+
isWepb: function isWepb() {
|
|
1127
|
+
return this.srcExt === 'webp';
|
|
1128
|
+
},
|
|
1129
|
+
computedSrc: function computedSrc() {
|
|
1130
|
+
var src = this.src;
|
|
1131
|
+
if (this.failed && this.srcFallback) {
|
|
1132
|
+
src = this.srcFallback;
|
|
1133
|
+
}
|
|
1134
|
+
if (!this.webpSupported && this.isWepb && this.webpFallback) {
|
|
1135
|
+
if (this.webpFallback.startsWith('.')) {
|
|
1136
|
+
return src.replace(/\.webp/gi, "".concat(this.webpFallback));
|
|
1137
|
+
}
|
|
1138
|
+
return this.webpFallback;
|
|
1139
|
+
}
|
|
1140
|
+
return src;
|
|
1141
|
+
},
|
|
1142
|
+
computedWidth: function computedWidth() {
|
|
1143
|
+
if (this.responsive && this.clientWidth > 0) {
|
|
1144
|
+
return this.clientWidth;
|
|
1145
|
+
}
|
|
1146
|
+
},
|
|
1147
|
+
computedNativeLazy: function computedNativeLazy() {
|
|
1148
|
+
if (this.lazy && this.useNativeLazy) {
|
|
1149
|
+
return 'lazy';
|
|
1150
|
+
}
|
|
1151
|
+
},
|
|
1152
|
+
isDisplayed: function isDisplayed() {
|
|
1153
|
+
return (this.webpSupportVerified || !this.isWepb) && (!this.lazy || this.useNativeLazy || this.inViewPort);
|
|
1154
|
+
},
|
|
1155
|
+
placeholderExt: function placeholderExt() {
|
|
1156
|
+
if (this.placeholder) {
|
|
1157
|
+
return this.getExt(this.placeholder);
|
|
1158
|
+
}
|
|
1159
|
+
},
|
|
1160
|
+
isPlaceholderWepb: function isPlaceholderWepb() {
|
|
1161
|
+
if (this.placeholder) {
|
|
1162
|
+
return this.placeholderExt === 'webp';
|
|
1163
|
+
}
|
|
1164
|
+
},
|
|
1165
|
+
computedPlaceholder: function computedPlaceholder() {
|
|
1166
|
+
if (!this.webpSupported && this.isPlaceholderWepb && this.webpFallback && this.webpFallback.startsWith('.')) {
|
|
1167
|
+
return this.placeholder.replace(/\.webp/gi, "".concat(this.webpFallback));
|
|
1168
|
+
}
|
|
1169
|
+
return this.placeholder;
|
|
1170
|
+
},
|
|
1171
|
+
isPlaceholderDisplayed: function isPlaceholderDisplayed() {
|
|
1172
|
+
return !this.loaded && (this.$slots.placeholder || this.placeholder && (this.webpSupportVerified || !this.isPlaceholderWepb));
|
|
1173
|
+
},
|
|
1174
|
+
computedSrcset: function computedSrcset() {
|
|
1175
|
+
var _this = this;
|
|
1176
|
+
if (this.srcset) {
|
|
1177
|
+
if (!this.webpSupported && this.isWepb && this.webpFallback && this.webpFallback.startsWith('.')) {
|
|
1178
|
+
return this.srcset.replace(/\.webp/gi, "".concat(this.webpFallback));
|
|
1179
|
+
}
|
|
1180
|
+
return this.srcset;
|
|
1181
|
+
}
|
|
1182
|
+
if (this.srcsetSizes && Array.isArray(this.srcsetSizes) && this.srcsetSizes.length > 0) {
|
|
1183
|
+
return this.srcsetSizes.map(function (size) {
|
|
1184
|
+
return "".concat(_this.srcsetFormatter(_this.computedSrc, size, _this), " ").concat(size, "w");
|
|
1185
|
+
}).join(',');
|
|
1186
|
+
}
|
|
1187
|
+
},
|
|
1188
|
+
computedSizes: function computedSizes() {
|
|
1189
|
+
if (this.computedSrcset && this.computedWidth) {
|
|
1190
|
+
return "".concat(this.computedWidth, "px");
|
|
1191
|
+
}
|
|
1192
|
+
},
|
|
1193
|
+
isCaptionFirst: function isCaptionFirst() {
|
|
1194
|
+
return this.$slots.caption && this.captionFirst;
|
|
1195
|
+
},
|
|
1196
|
+
isCaptionLast: function isCaptionLast() {
|
|
1197
|
+
return this.$slots.caption && !this.captionFirst;
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
methods: {
|
|
1201
|
+
getExt: function getExt(filename) {
|
|
1202
|
+
var clean = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
1203
|
+
if (filename) {
|
|
1204
|
+
var noParam = clean ? filename.split('?')[0] : filename;
|
|
1205
|
+
return noParam.split('.').pop();
|
|
1206
|
+
}
|
|
1207
|
+
return '';
|
|
1208
|
+
},
|
|
1209
|
+
setWidth: function setWidth() {
|
|
1210
|
+
this.clientWidth = this.$el.clientWidth;
|
|
1211
|
+
},
|
|
1212
|
+
formatSrcset: function formatSrcset(src, size) {
|
|
1213
|
+
var ext = this.getExt(src, false);
|
|
1214
|
+
var name = src.split('.').slice(0, -1).join('.');
|
|
1215
|
+
return "".concat(name, "-").concat(size, ".").concat(ext);
|
|
1216
|
+
},
|
|
1217
|
+
onLoad: function onLoad(event) {
|
|
1218
|
+
this.loaded = true;
|
|
1219
|
+
this.emit('load', event);
|
|
1220
|
+
},
|
|
1221
|
+
onError: function onError(event) {
|
|
1222
|
+
this.emit('error', event);
|
|
1223
|
+
if (!this.failed) {
|
|
1224
|
+
this.failed = true;
|
|
1225
|
+
}
|
|
1226
|
+
},
|
|
1227
|
+
emit: function emit(eventName, event) {
|
|
1228
|
+
var target = event.target;
|
|
1229
|
+
this.$emit(eventName, event, target.currentSrc || target.src || this.computedSrc);
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
1232
|
+
created: function created() {
|
|
1233
|
+
var _this2 = this;
|
|
1234
|
+
if (this.isWepb) {
|
|
1235
|
+
isWebpSupported().then(function (supported) {
|
|
1236
|
+
_this2.webpSupportVerified = true;
|
|
1237
|
+
_this2.webpSupported = supported;
|
|
1238
|
+
});
|
|
1239
|
+
}
|
|
1240
|
+
if (this.lazy) {
|
|
1241
|
+
// We use native lazy loading if supported
|
|
1242
|
+
// We try to use Intersection Observer if native lazy loading is not supported
|
|
1243
|
+
// We use the lazy attribute anyway if we cannot detect support (SSR for example).
|
|
1244
|
+
var nativeLazySupported = typeof window !== 'undefined' && 'HTMLImageElement' in window && 'loading' in HTMLImageElement.prototype;
|
|
1245
|
+
var intersectionObserverSupported = typeof window !== 'undefined' && 'IntersectionObserver' in window;
|
|
1246
|
+
if (!nativeLazySupported && intersectionObserverSupported) {
|
|
1247
|
+
this.observer = new IntersectionObserver(function (events) {
|
|
1248
|
+
var _events$ = events[0],
|
|
1249
|
+
target = _events$.target,
|
|
1250
|
+
isIntersecting = _events$.isIntersecting;
|
|
1251
|
+
if (isIntersecting && !_this2.inViewPort) {
|
|
1252
|
+
_this2.inViewPort = true;
|
|
1253
|
+
_this2.observer.unobserve(target);
|
|
1254
|
+
}
|
|
1255
|
+
});
|
|
1256
|
+
} else {
|
|
1257
|
+
this.useNativeLazy = true;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
},
|
|
1261
|
+
mounted: function mounted() {
|
|
1262
|
+
if (this.lazy && this.observer) {
|
|
1263
|
+
this.observer.observe(this.$el);
|
|
1264
|
+
}
|
|
1265
|
+
this.setWidth();
|
|
1266
|
+
if (typeof window !== 'undefined') {
|
|
1267
|
+
window.addEventListener('resize', this.setWidth);
|
|
1268
|
+
}
|
|
1269
|
+
},
|
|
1270
|
+
beforeDestroy: function beforeDestroy() {
|
|
1271
|
+
if (this.observer) {
|
|
1272
|
+
this.observer.disconnect();
|
|
1273
|
+
}
|
|
1274
|
+
if (typeof window !== 'undefined') {
|
|
1275
|
+
window.removeEventListener('resize', this.setWidth);
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
};
|
|
1279
|
+
|
|
1280
|
+
/* script */
|
|
1281
|
+
const __vue_script__$1 = script$1;
|
|
1282
|
+
|
|
1283
|
+
/* template */
|
|
1284
|
+
var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('figure',{staticClass:"b-image-wrapper",class:_vm.figureClasses,style:(_vm.figureStyles)},[(_vm.isCaptionFirst)?_c('figcaption',[_vm._t("caption")],2):_vm._e(),_c('transition',{attrs:{"name":"fade"}},[(_vm.isDisplayed)?_c('img',{class:_vm.imgClasses,attrs:{"srcset":_vm.computedSrcset,"src":_vm.computedSrc,"alt":_vm.alt,"width":_vm.computedWidth,"sizes":_vm.computedSizes,"loading":_vm.computedNativeLazy},on:{"load":_vm.onLoad,"error":_vm.onError}}):_vm._e()]),_c('transition',{attrs:{"name":"fade"}},[(_vm.isPlaceholderDisplayed)?_vm._t("placeholder",[_c('img',{staticClass:"placeholder",class:_vm.imgClasses,attrs:{"src":_vm.computedPlaceholder,"alt":_vm.alt}})]):_vm._e()],2),(_vm.isCaptionLast)?_c('figcaption',[_vm._t("caption")],2):_vm._e()],1)};
|
|
1285
|
+
var __vue_staticRenderFns__$1 = [];
|
|
1286
|
+
|
|
1287
|
+
/* style */
|
|
1288
|
+
const __vue_inject_styles__$1 = undefined;
|
|
1289
|
+
/* scoped */
|
|
1290
|
+
const __vue_scope_id__$1 = undefined;
|
|
1291
|
+
/* module identifier */
|
|
1292
|
+
const __vue_module_identifier__$1 = undefined;
|
|
1293
|
+
/* functional template */
|
|
1294
|
+
const __vue_is_functional_template__$1 = false;
|
|
1295
|
+
/* style inject */
|
|
1296
|
+
|
|
1297
|
+
/* style inject SSR */
|
|
1298
|
+
|
|
1299
|
+
/* style inject shadow dom */
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
|
|
1304
|
+
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
|
|
1305
|
+
__vue_inject_styles__$1,
|
|
1306
|
+
__vue_script__$1,
|
|
1307
|
+
__vue_scope_id__$1,
|
|
1308
|
+
__vue_is_functional_template__$1,
|
|
1309
|
+
__vue_module_identifier__$1,
|
|
1310
|
+
false,
|
|
1311
|
+
undefined,
|
|
1312
|
+
undefined,
|
|
1313
|
+
undefined
|
|
1314
|
+
);
|
|
1315
|
+
|
|
1316
|
+
var Image$1 = __vue_component__$1;
|
|
1317
|
+
|
|
1318
|
+
var script = {
|
|
1319
|
+
name: 'BCarouselList',
|
|
1320
|
+
components: _defineProperty(_defineProperty({}, Icon.name, Icon), Image$1.name, Image$1),
|
|
1321
|
+
props: {
|
|
1322
|
+
data: {
|
|
1323
|
+
type: Array,
|
|
1324
|
+
default: function _default() {
|
|
1325
|
+
return [];
|
|
1326
|
+
}
|
|
1327
|
+
},
|
|
1328
|
+
value: {
|
|
1329
|
+
type: Number,
|
|
1330
|
+
default: 0
|
|
1331
|
+
},
|
|
1332
|
+
scrollValue: {
|
|
1333
|
+
type: Number,
|
|
1334
|
+
default: 0
|
|
1335
|
+
},
|
|
1336
|
+
hasDrag: {
|
|
1337
|
+
type: Boolean,
|
|
1338
|
+
default: true
|
|
1339
|
+
},
|
|
1340
|
+
hasGrayscale: Boolean,
|
|
1341
|
+
hasOpacity: Boolean,
|
|
1342
|
+
repeat: Boolean,
|
|
1343
|
+
itemsToShow: {
|
|
1344
|
+
type: Number,
|
|
1345
|
+
default: 4
|
|
1346
|
+
},
|
|
1347
|
+
itemsToList: {
|
|
1348
|
+
type: Number,
|
|
1349
|
+
default: 1
|
|
1350
|
+
},
|
|
1351
|
+
asIndicator: Boolean,
|
|
1352
|
+
arrow: {
|
|
1353
|
+
type: Boolean,
|
|
1354
|
+
default: true
|
|
1355
|
+
},
|
|
1356
|
+
arrowHover: {
|
|
1357
|
+
type: Boolean,
|
|
1358
|
+
default: true
|
|
1359
|
+
},
|
|
1360
|
+
iconPack: String,
|
|
1361
|
+
iconSize: String,
|
|
1362
|
+
iconPrev: {
|
|
1363
|
+
type: String,
|
|
1364
|
+
default: function _default() {
|
|
1365
|
+
return config.defaultIconPrev;
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
iconNext: {
|
|
1369
|
+
type: String,
|
|
1370
|
+
default: function _default() {
|
|
1371
|
+
return config.defaultIconNext;
|
|
1372
|
+
}
|
|
1373
|
+
},
|
|
1374
|
+
breakpoints: {
|
|
1375
|
+
type: Object,
|
|
1376
|
+
default: function _default() {
|
|
1377
|
+
return {};
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
data: function data() {
|
|
1382
|
+
return {
|
|
1383
|
+
activeItem: this.value,
|
|
1384
|
+
scrollIndex: this.asIndicator ? this.scrollValue : this.value,
|
|
1385
|
+
delta: 0,
|
|
1386
|
+
dragX: false,
|
|
1387
|
+
hold: 0,
|
|
1388
|
+
windowWidth: 0,
|
|
1389
|
+
touch: false,
|
|
1390
|
+
observer: null,
|
|
1391
|
+
refresh_: 0
|
|
1392
|
+
};
|
|
1393
|
+
},
|
|
1394
|
+
computed: {
|
|
1395
|
+
dragging: function dragging() {
|
|
1396
|
+
return this.dragX !== false;
|
|
1397
|
+
},
|
|
1398
|
+
listClass: function listClass() {
|
|
1399
|
+
return [{
|
|
1400
|
+
'has-grayscale': this.settings.hasGrayscale,
|
|
1401
|
+
'has-opacity': this.settings.hasOpacity,
|
|
1402
|
+
'is-dragging': this.dragging
|
|
1403
|
+
}];
|
|
1404
|
+
},
|
|
1405
|
+
itemStyle: function itemStyle() {
|
|
1406
|
+
return "width: ".concat(this.itemWidth, "px;");
|
|
1407
|
+
},
|
|
1408
|
+
translation: function translation() {
|
|
1409
|
+
return -bound(this.delta + this.scrollIndex * this.itemWidth, 0, (this.data.length - this.settings.itemsToShow) * this.itemWidth);
|
|
1410
|
+
},
|
|
1411
|
+
total: function total() {
|
|
1412
|
+
return this.data.length - this.settings.itemsToShow;
|
|
1413
|
+
},
|
|
1414
|
+
hasPrev: function hasPrev() {
|
|
1415
|
+
return this.settings.repeat || this.scrollIndex > 0;
|
|
1416
|
+
},
|
|
1417
|
+
hasNext: function hasNext() {
|
|
1418
|
+
return this.settings.repeat || this.scrollIndex < this.total;
|
|
1419
|
+
},
|
|
1420
|
+
breakpointKeys: function breakpointKeys() {
|
|
1421
|
+
return Object.keys(this.breakpoints).sort(function (a, b) {
|
|
1422
|
+
return b - a;
|
|
1423
|
+
});
|
|
1424
|
+
},
|
|
1425
|
+
settings: function settings() {
|
|
1426
|
+
var _this = this;
|
|
1427
|
+
var breakpoint = this.breakpointKeys.filter(function (breakpoint) {
|
|
1428
|
+
if (_this.windowWidth >= breakpoint) {
|
|
1429
|
+
return true;
|
|
1430
|
+
}
|
|
1431
|
+
})[0];
|
|
1432
|
+
if (breakpoint) {
|
|
1433
|
+
return _objectSpread2(_objectSpread2({}, this.$props), this.breakpoints[breakpoint]);
|
|
1434
|
+
}
|
|
1435
|
+
return this.$props;
|
|
1436
|
+
},
|
|
1437
|
+
itemWidth: function itemWidth() {
|
|
1438
|
+
if (this.windowWidth) {
|
|
1439
|
+
// Ensure component is mounted
|
|
1440
|
+
/* eslint-disable-next-line */
|
|
1441
|
+
this.refresh_; // We force the computed property to refresh if this prop is changed
|
|
1442
|
+
|
|
1443
|
+
var rect = this.$el.getBoundingClientRect();
|
|
1444
|
+
return rect.width / this.settings.itemsToShow;
|
|
1445
|
+
}
|
|
1446
|
+
return 0;
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
watch: {
|
|
1450
|
+
/**
|
|
1451
|
+
* When v-model is changed set the new active item.
|
|
1452
|
+
*/
|
|
1453
|
+
value: function value(_value) {
|
|
1454
|
+
this.switchTo(this.asIndicator ? _value - (this.itemsToShow - 3) / 2 : _value);
|
|
1455
|
+
if (this.activeItem !== _value) {
|
|
1456
|
+
this.activeItem = bound(_value, 0, this.data.length - 1);
|
|
1457
|
+
}
|
|
1458
|
+
},
|
|
1459
|
+
scrollValue: function scrollValue(value) {
|
|
1460
|
+
this.switchTo(value);
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
methods: {
|
|
1464
|
+
resized: function resized() {
|
|
1465
|
+
this.windowWidth = window.innerWidth;
|
|
1466
|
+
},
|
|
1467
|
+
switchTo: function switchTo(newIndex) {
|
|
1468
|
+
if (newIndex === this.scrollIndex || isNaN(newIndex)) {
|
|
1469
|
+
return;
|
|
1470
|
+
}
|
|
1471
|
+
if (this.settings.repeat) {
|
|
1472
|
+
newIndex = mod(newIndex, this.total + 1);
|
|
1473
|
+
}
|
|
1474
|
+
newIndex = bound(newIndex, 0, this.total);
|
|
1475
|
+
this.scrollIndex = newIndex;
|
|
1476
|
+
if (!this.asIndicator && this.value !== newIndex) {
|
|
1477
|
+
this.$emit('input', newIndex);
|
|
1478
|
+
} else if (this.scrollIndex !== newIndex) {
|
|
1479
|
+
this.$emit('updated:scroll', newIndex);
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
next: function next() {
|
|
1483
|
+
this.switchTo(this.scrollIndex + this.settings.itemsToList);
|
|
1484
|
+
},
|
|
1485
|
+
prev: function prev() {
|
|
1486
|
+
this.switchTo(this.scrollIndex - this.settings.itemsToList);
|
|
1487
|
+
},
|
|
1488
|
+
checkAsIndicator: function checkAsIndicator(value, event) {
|
|
1489
|
+
if (!this.asIndicator) return;
|
|
1490
|
+
var dragEndX = event.changedTouches ? event.changedTouches[0].clientX : event.clientX;
|
|
1491
|
+
if (this.hold - Date.now() > 2000 || Math.abs(this.dragX - dragEndX) > 10) return;
|
|
1492
|
+
this.dragX = false;
|
|
1493
|
+
this.hold = 0;
|
|
1494
|
+
event.preventDefault();
|
|
1495
|
+
|
|
1496
|
+
// Make the item appear in the middle
|
|
1497
|
+
this.activeItem = value;
|
|
1498
|
+
this.$emit('switch', value);
|
|
1499
|
+
},
|
|
1500
|
+
// handle drag event
|
|
1501
|
+
dragStart: function dragStart(event) {
|
|
1502
|
+
if (this.dragging || !this.settings.hasDrag || event.button !== 0 && event.type !== 'touchstart') return;
|
|
1503
|
+
this.hold = Date.now();
|
|
1504
|
+
this.touch = !!event.touches;
|
|
1505
|
+
this.dragX = this.touch ? event.touches[0].clientX : event.clientX;
|
|
1506
|
+
window.addEventListener(this.touch ? 'touchmove' : 'mousemove', this.dragMove);
|
|
1507
|
+
window.addEventListener(this.touch ? 'touchend' : 'mouseup', this.dragEnd);
|
|
1508
|
+
},
|
|
1509
|
+
dragMove: function dragMove(event) {
|
|
1510
|
+
if (!this.dragging) return;
|
|
1511
|
+
var dragEndX = event.touches ? (event.changedTouches[0] || event.touches[0]).clientX : event.clientX;
|
|
1512
|
+
this.delta = this.dragX - dragEndX;
|
|
1513
|
+
if (!event.touches) {
|
|
1514
|
+
event.preventDefault();
|
|
1515
|
+
}
|
|
1516
|
+
},
|
|
1517
|
+
dragEnd: function dragEnd() {
|
|
1518
|
+
if (!this.dragging && !this.hold) return;
|
|
1519
|
+
if (this.hold) {
|
|
1520
|
+
var signCheck = sign(this.delta);
|
|
1521
|
+
var results = Math.round(Math.abs(this.delta / this.itemWidth) + 0.15); // Hack
|
|
1522
|
+
this.switchTo(this.scrollIndex + signCheck * results);
|
|
1523
|
+
}
|
|
1524
|
+
this.delta = 0;
|
|
1525
|
+
this.dragX = false;
|
|
1526
|
+
window.removeEventListener(this.touch ? 'touchmove' : 'mousemove', this.dragMove);
|
|
1527
|
+
window.removeEventListener(this.touch ? 'touchend' : 'mouseup', this.dragEnd);
|
|
1528
|
+
},
|
|
1529
|
+
refresh: function refresh() {
|
|
1530
|
+
var _this2 = this;
|
|
1531
|
+
this.$nextTick(function () {
|
|
1532
|
+
_this2.refresh_++;
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
},
|
|
1536
|
+
mounted: function mounted() {
|
|
1537
|
+
if (typeof window !== 'undefined') {
|
|
1538
|
+
if (window.ResizeObserver) {
|
|
1539
|
+
this.observer = new ResizeObserver(this.refresh);
|
|
1540
|
+
this.observer.observe(this.$el);
|
|
1541
|
+
}
|
|
1542
|
+
window.addEventListener('resize', this.resized);
|
|
1543
|
+
document.addEventListener('animationend', this.refresh);
|
|
1544
|
+
document.addEventListener('transitionend', this.refresh);
|
|
1545
|
+
document.addEventListener('transitionstart', this.refresh);
|
|
1546
|
+
this.resized();
|
|
1547
|
+
}
|
|
1548
|
+
if (this.$attrs.config) {
|
|
1549
|
+
throw new Error('The config prop was removed, you need to use v-bind instead');
|
|
1550
|
+
}
|
|
1551
|
+
},
|
|
1552
|
+
beforeDestroy: function beforeDestroy() {
|
|
1553
|
+
if (typeof window !== 'undefined') {
|
|
1554
|
+
if (window.ResizeObserver) {
|
|
1555
|
+
this.observer.disconnect();
|
|
1556
|
+
}
|
|
1557
|
+
window.removeEventListener('resize', this.resized);
|
|
1558
|
+
document.removeEventListener('animationend', this.refresh);
|
|
1559
|
+
document.removeEventListener('transitionend', this.refresh);
|
|
1560
|
+
document.removeEventListener('transitionstart', this.refresh);
|
|
1561
|
+
this.dragEnd();
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
};
|
|
1565
|
+
|
|
1566
|
+
/* script */
|
|
1567
|
+
const __vue_script__ = script;
|
|
1568
|
+
|
|
1569
|
+
/* template */
|
|
1570
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"carousel-list",class:{'has-shadow': _vm.scrollIndex > 0},on:{"mousedown":function($event){$event.preventDefault();return _vm.dragStart($event)},"touchstart":_vm.dragStart}},[_c('div',{staticClass:"carousel-slides",class:_vm.listClass,style:('transform:translateX('+_vm.translation+'px)')},_vm._l((_vm.data),function(list,index){return _c('div',{key:index,staticClass:"carousel-slide",class:{'is-active': _vm.asIndicator ? _vm.activeItem === index : _vm.scrollIndex === index},style:(_vm.itemStyle),on:{"mouseup":function($event){return _vm.checkAsIndicator(index, $event)},"touchend":function($event){return _vm.checkAsIndicator(index, $event)}}},[_vm._t("item",[_c('b-image',_vm._b({attrs:{"src":list.image}},'b-image',list,false))],{"index":index,"active":_vm.activeItem,"scroll":_vm.scrollIndex,"list":list},list)],2)}),0),(_vm.arrow)?_c('div',{staticClass:"carousel-arrow",class:{'is-hovered': _vm.settings.arrowHover}},[_c('b-icon',{directives:[{name:"show",rawName:"v-show",value:(_vm.hasPrev),expression:"hasPrev"}],staticClass:"has-icons-left",attrs:{"pack":_vm.settings.iconPack,"icon":_vm.settings.iconPrev,"size":_vm.settings.iconSize,"both":""},nativeOn:{"click":function($event){$event.preventDefault();return _vm.prev($event)}}}),_c('b-icon',{directives:[{name:"show",rawName:"v-show",value:(_vm.hasNext),expression:"hasNext"}],staticClass:"has-icons-right",attrs:{"pack":_vm.settings.iconPack,"icon":_vm.settings.iconNext,"size":_vm.settings.iconSize,"both":""},nativeOn:{"click":function($event){$event.preventDefault();return _vm.next($event)}}})],1):_vm._e()])};
|
|
1571
|
+
var __vue_staticRenderFns__ = [];
|
|
1572
|
+
|
|
1573
|
+
/* style */
|
|
1574
|
+
const __vue_inject_styles__ = undefined;
|
|
1575
|
+
/* scoped */
|
|
1576
|
+
const __vue_scope_id__ = undefined;
|
|
1577
|
+
/* module identifier */
|
|
1578
|
+
const __vue_module_identifier__ = undefined;
|
|
1579
|
+
/* functional template */
|
|
1580
|
+
const __vue_is_functional_template__ = false;
|
|
1581
|
+
/* style inject */
|
|
1582
|
+
|
|
1583
|
+
/* style inject SSR */
|
|
1584
|
+
|
|
1585
|
+
/* style inject shadow dom */
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent(
|
|
1590
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
1591
|
+
__vue_inject_styles__,
|
|
1592
|
+
__vue_script__,
|
|
1593
|
+
__vue_scope_id__,
|
|
1594
|
+
__vue_is_functional_template__,
|
|
1595
|
+
__vue_module_identifier__,
|
|
1596
|
+
false,
|
|
1597
|
+
undefined,
|
|
1598
|
+
undefined,
|
|
1599
|
+
undefined
|
|
1600
|
+
);
|
|
1601
|
+
|
|
1602
|
+
var CarouselList = __vue_component__;
|
|
1603
|
+
|
|
1604
|
+
var use = function use(plugin) {
|
|
1605
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
1606
|
+
window.Vue.use(plugin);
|
|
1607
|
+
}
|
|
1608
|
+
};
|
|
1609
|
+
var registerComponent = function registerComponent(Vue, component) {
|
|
1610
|
+
Vue.component(component.name, component);
|
|
1611
|
+
};
|
|
1612
|
+
|
|
1613
|
+
var Plugin = {
|
|
1614
|
+
install: function install(Vue) {
|
|
1615
|
+
registerComponent(Vue, Carousel);
|
|
1616
|
+
registerComponent(Vue, CarouselItem);
|
|
1617
|
+
registerComponent(Vue, CarouselList);
|
|
1618
|
+
}
|
|
1619
|
+
};
|
|
1620
|
+
use(Plugin);
|
|
1621
|
+
|
|
1622
|
+
exports.BCarousel = Carousel;
|
|
1623
|
+
exports.BCarouselItem = CarouselItem;
|
|
1624
|
+
exports.BCarouselList = CarouselList;
|
|
1625
|
+
exports["default"] = Plugin;
|
|
1626
|
+
|
|
1627
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1628
|
+
|
|
1629
|
+
}));
|