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,868 @@
|
|
|
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.Pagination = {}));
|
|
6
|
+
})(this, (function (exports) { 'use strict';
|
|
7
|
+
|
|
8
|
+
function ownKeys(e, r) {
|
|
9
|
+
var t = Object.keys(e);
|
|
10
|
+
if (Object.getOwnPropertySymbols) {
|
|
11
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
12
|
+
r && (o = o.filter(function (r) {
|
|
13
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
14
|
+
})), t.push.apply(t, o);
|
|
15
|
+
}
|
|
16
|
+
return t;
|
|
17
|
+
}
|
|
18
|
+
function _objectSpread2(e) {
|
|
19
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
20
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
21
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
22
|
+
_defineProperty(e, r, t[r]);
|
|
23
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
24
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return e;
|
|
28
|
+
}
|
|
29
|
+
function _toPrimitive(t, r) {
|
|
30
|
+
if ("object" != typeof t || !t) return t;
|
|
31
|
+
var e = t[Symbol.toPrimitive];
|
|
32
|
+
if (void 0 !== e) {
|
|
33
|
+
var i = e.call(t, r || "default");
|
|
34
|
+
if ("object" != typeof i) return i;
|
|
35
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
36
|
+
}
|
|
37
|
+
return ("string" === r ? String : Number)(t);
|
|
38
|
+
}
|
|
39
|
+
function _toPropertyKey(t) {
|
|
40
|
+
var i = _toPrimitive(t, "string");
|
|
41
|
+
return "symbol" == typeof i ? i : String(i);
|
|
42
|
+
}
|
|
43
|
+
function _typeof(o) {
|
|
44
|
+
"@babel/helpers - typeof";
|
|
45
|
+
|
|
46
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
47
|
+
return typeof o;
|
|
48
|
+
} : function (o) {
|
|
49
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
50
|
+
}, _typeof(o);
|
|
51
|
+
}
|
|
52
|
+
function _defineProperty(obj, key, value) {
|
|
53
|
+
key = _toPropertyKey(key);
|
|
54
|
+
if (key in obj) {
|
|
55
|
+
Object.defineProperty(obj, key, {
|
|
56
|
+
value: value,
|
|
57
|
+
enumerable: true,
|
|
58
|
+
configurable: true,
|
|
59
|
+
writable: true
|
|
60
|
+
});
|
|
61
|
+
} else {
|
|
62
|
+
obj[key] = value;
|
|
63
|
+
}
|
|
64
|
+
return obj;
|
|
65
|
+
}
|
|
66
|
+
function _toArray(arr) {
|
|
67
|
+
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
68
|
+
}
|
|
69
|
+
function _arrayWithHoles(arr) {
|
|
70
|
+
if (Array.isArray(arr)) return arr;
|
|
71
|
+
}
|
|
72
|
+
function _iterableToArray(iter) {
|
|
73
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
74
|
+
}
|
|
75
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
76
|
+
if (!o) return;
|
|
77
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
78
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
79
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
80
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
81
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
82
|
+
}
|
|
83
|
+
function _arrayLikeToArray(arr, len) {
|
|
84
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
85
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
86
|
+
return arr2;
|
|
87
|
+
}
|
|
88
|
+
function _nonIterableRest() {
|
|
89
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
var config = {
|
|
93
|
+
defaultContainerElement: null,
|
|
94
|
+
defaultIconPack: 'mdi',
|
|
95
|
+
defaultIconComponent: null,
|
|
96
|
+
defaultIconPrev: 'chevron-left',
|
|
97
|
+
defaultIconNext: 'chevron-right',
|
|
98
|
+
defaultLocale: undefined,
|
|
99
|
+
defaultDialogConfirmText: null,
|
|
100
|
+
defaultDialogCancelText: null,
|
|
101
|
+
defaultSnackbarDuration: 3500,
|
|
102
|
+
defaultSnackbarPosition: null,
|
|
103
|
+
defaultToastDuration: 2000,
|
|
104
|
+
defaultToastPosition: null,
|
|
105
|
+
defaultNotificationDuration: 2000,
|
|
106
|
+
defaultNotificationPosition: null,
|
|
107
|
+
defaultTooltipType: 'is-primary',
|
|
108
|
+
defaultTooltipDelay: null,
|
|
109
|
+
defaultTooltipCloseDelay: null,
|
|
110
|
+
defaultSidebarDelay: null,
|
|
111
|
+
defaultInputAutocomplete: 'on',
|
|
112
|
+
defaultDateFormatter: null,
|
|
113
|
+
defaultDateParser: null,
|
|
114
|
+
defaultDateCreator: null,
|
|
115
|
+
defaultTimeCreator: null,
|
|
116
|
+
defaultDayNames: null,
|
|
117
|
+
defaultMonthNames: null,
|
|
118
|
+
defaultFirstDayOfWeek: null,
|
|
119
|
+
defaultUnselectableDaysOfWeek: null,
|
|
120
|
+
defaultTimeFormatter: null,
|
|
121
|
+
defaultTimeParser: null,
|
|
122
|
+
defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
|
|
123
|
+
defaultModalScroll: null,
|
|
124
|
+
defaultDatepickerMobileNative: true,
|
|
125
|
+
defaultTimepickerMobileNative: true,
|
|
126
|
+
defaultTimepickerMobileModal: true,
|
|
127
|
+
defaultNoticeQueue: true,
|
|
128
|
+
defaultInputHasCounter: true,
|
|
129
|
+
defaultTaginputHasCounter: true,
|
|
130
|
+
defaultUseHtml5Validation: true,
|
|
131
|
+
defaultDropdownMobileModal: true,
|
|
132
|
+
defaultFieldLabelPosition: null,
|
|
133
|
+
defaultDatepickerYearsRange: [-100, 10],
|
|
134
|
+
defaultDatepickerNearbyMonthDays: true,
|
|
135
|
+
defaultDatepickerNearbySelectableMonthDays: false,
|
|
136
|
+
defaultDatepickerShowWeekNumber: false,
|
|
137
|
+
defaultDatepickerWeekNumberClickable: false,
|
|
138
|
+
defaultDatepickerMobileModal: true,
|
|
139
|
+
defaultTrapFocus: true,
|
|
140
|
+
defaultAutoFocus: true,
|
|
141
|
+
defaultButtonRounded: false,
|
|
142
|
+
defaultSwitchRounded: true,
|
|
143
|
+
defaultCarouselInterval: 3500,
|
|
144
|
+
defaultTabsExpanded: false,
|
|
145
|
+
defaultTabsAnimated: true,
|
|
146
|
+
defaultTabsType: null,
|
|
147
|
+
defaultStatusIcon: true,
|
|
148
|
+
defaultProgrammaticPromise: false,
|
|
149
|
+
defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
|
|
150
|
+
defaultImageWebpFallback: null,
|
|
151
|
+
defaultImageLazy: true,
|
|
152
|
+
defaultImageResponsive: true,
|
|
153
|
+
defaultImageRatio: null,
|
|
154
|
+
defaultImageSrcsetFormatter: null,
|
|
155
|
+
defaultBreadcrumbTag: 'a',
|
|
156
|
+
defaultBreadcrumbAlign: 'is-left',
|
|
157
|
+
defaultBreadcrumbSeparator: '',
|
|
158
|
+
defaultBreadcrumbSize: 'is-medium',
|
|
159
|
+
customIconPacks: null
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
//
|
|
163
|
+
var script$2 = {
|
|
164
|
+
name: 'BPaginationButton',
|
|
165
|
+
props: {
|
|
166
|
+
page: {
|
|
167
|
+
type: Object,
|
|
168
|
+
required: true
|
|
169
|
+
},
|
|
170
|
+
tag: {
|
|
171
|
+
type: String,
|
|
172
|
+
default: 'a',
|
|
173
|
+
validator: function validator(value) {
|
|
174
|
+
return config.defaultLinkTags.indexOf(value) >= 0;
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
disabled: {
|
|
178
|
+
type: Boolean,
|
|
179
|
+
default: false
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
computed: {
|
|
183
|
+
href: function href() {
|
|
184
|
+
if (this.tag === 'a') {
|
|
185
|
+
return '#';
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
isDisabled: function isDisabled() {
|
|
189
|
+
return this.disabled || this.page.disabled;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
195
|
+
if (typeof shadowMode !== 'boolean') {
|
|
196
|
+
createInjectorSSR = createInjector;
|
|
197
|
+
createInjector = shadowMode;
|
|
198
|
+
shadowMode = false;
|
|
199
|
+
}
|
|
200
|
+
// Vue.extend constructor export interop.
|
|
201
|
+
const options = typeof script === 'function' ? script.options : script;
|
|
202
|
+
// render functions
|
|
203
|
+
if (template && template.render) {
|
|
204
|
+
options.render = template.render;
|
|
205
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
206
|
+
options._compiled = true;
|
|
207
|
+
// functional template
|
|
208
|
+
if (isFunctionalTemplate) {
|
|
209
|
+
options.functional = true;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// scopedId
|
|
213
|
+
if (scopeId) {
|
|
214
|
+
options._scopeId = scopeId;
|
|
215
|
+
}
|
|
216
|
+
let hook;
|
|
217
|
+
if (moduleIdentifier) {
|
|
218
|
+
// server build
|
|
219
|
+
hook = function (context) {
|
|
220
|
+
// 2.3 injection
|
|
221
|
+
context =
|
|
222
|
+
context || // cached call
|
|
223
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
224
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
|
|
225
|
+
// 2.2 with runInNewContext: true
|
|
226
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
227
|
+
context = __VUE_SSR_CONTEXT__;
|
|
228
|
+
}
|
|
229
|
+
// inject component styles
|
|
230
|
+
if (style) {
|
|
231
|
+
style.call(this, createInjectorSSR(context));
|
|
232
|
+
}
|
|
233
|
+
// register component module identifier for async chunk inference
|
|
234
|
+
if (context && context._registeredComponents) {
|
|
235
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
// used by ssr in case component is cached and beforeCreate
|
|
239
|
+
// never gets called
|
|
240
|
+
options._ssrRegister = hook;
|
|
241
|
+
}
|
|
242
|
+
else if (style) {
|
|
243
|
+
hook = shadowMode
|
|
244
|
+
? function (context) {
|
|
245
|
+
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
246
|
+
}
|
|
247
|
+
: function (context) {
|
|
248
|
+
style.call(this, createInjector(context));
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
if (hook) {
|
|
252
|
+
if (options.functional) {
|
|
253
|
+
// register for functional component in vue file
|
|
254
|
+
const originalRender = options.render;
|
|
255
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
256
|
+
hook.call(context);
|
|
257
|
+
return originalRender(h, context);
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
// inject component registration as beforeCreate hook
|
|
262
|
+
const existing = options.beforeCreate;
|
|
263
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return script;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* script */
|
|
270
|
+
const __vue_script__$2 = script$2;
|
|
271
|
+
|
|
272
|
+
/* template */
|
|
273
|
+
var __vue_render__$2 = function () {
|
|
274
|
+
var _obj;
|
|
275
|
+
var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.tag,_vm._b({tag:"component",staticClass:"pagination-link",class:( _obj = { 'is-current': _vm.page.isCurrent }, _obj[_vm.page.class] = true, _obj ),attrs:{"role":"button","href":_vm.href,"disabled":_vm.isDisabled,"aria-label":_vm.page['aria-label'],"aria-current":_vm.page.isCurrent},on:{"click":function($event){$event.preventDefault();return _vm.page.click($event)}}},'component',_vm.$attrs,false),[_vm._t("default",[_vm._v(_vm._s(_vm.page.number))])],2)};
|
|
276
|
+
var __vue_staticRenderFns__$2 = [];
|
|
277
|
+
|
|
278
|
+
/* style */
|
|
279
|
+
const __vue_inject_styles__$2 = undefined;
|
|
280
|
+
/* scoped */
|
|
281
|
+
const __vue_scope_id__$2 = undefined;
|
|
282
|
+
/* module identifier */
|
|
283
|
+
const __vue_module_identifier__$2 = undefined;
|
|
284
|
+
/* functional template */
|
|
285
|
+
const __vue_is_functional_template__$2 = false;
|
|
286
|
+
/* style inject */
|
|
287
|
+
|
|
288
|
+
/* style inject SSR */
|
|
289
|
+
|
|
290
|
+
/* style inject shadow dom */
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
|
|
295
|
+
{ render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
|
|
296
|
+
__vue_inject_styles__$2,
|
|
297
|
+
__vue_script__$2,
|
|
298
|
+
__vue_scope_id__$2,
|
|
299
|
+
__vue_is_functional_template__$2,
|
|
300
|
+
__vue_module_identifier__$2,
|
|
301
|
+
false,
|
|
302
|
+
undefined,
|
|
303
|
+
undefined,
|
|
304
|
+
undefined
|
|
305
|
+
);
|
|
306
|
+
|
|
307
|
+
var PaginationButton = __vue_component__$2;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Merge function to replace Object.assign with deep merging possibility
|
|
311
|
+
*/
|
|
312
|
+
var isObject = function isObject(item) {
|
|
313
|
+
return _typeof(item) === 'object' && !Array.isArray(item);
|
|
314
|
+
};
|
|
315
|
+
var mergeFn = function mergeFn(target, source) {
|
|
316
|
+
var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
317
|
+
if (deep || !Object.assign) {
|
|
318
|
+
var isDeep = function isDeep(prop) {
|
|
319
|
+
return isObject(source[prop]) && target !== null && target.hasOwnProperty(prop) && isObject(target[prop]);
|
|
320
|
+
};
|
|
321
|
+
var replaced = Object.getOwnPropertyNames(source).map(function (prop) {
|
|
322
|
+
return _defineProperty({}, prop, isDeep(prop) ? mergeFn(target[prop], source[prop], deep) : source[prop]);
|
|
323
|
+
}).reduce(function (a, b) {
|
|
324
|
+
return _objectSpread2(_objectSpread2({}, a), b);
|
|
325
|
+
}, {});
|
|
326
|
+
return _objectSpread2(_objectSpread2({}, target), replaced);
|
|
327
|
+
} else {
|
|
328
|
+
return Object.assign(target, source);
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
var merge = mergeFn;
|
|
332
|
+
|
|
333
|
+
var mdiIcons = {
|
|
334
|
+
sizes: {
|
|
335
|
+
'default': 'mdi-24px',
|
|
336
|
+
'is-small': null,
|
|
337
|
+
'is-medium': 'mdi-36px',
|
|
338
|
+
'is-large': 'mdi-48px'
|
|
339
|
+
},
|
|
340
|
+
iconPrefix: 'mdi-'
|
|
341
|
+
};
|
|
342
|
+
var faIcons = function faIcons() {
|
|
343
|
+
var faIconPrefix = config && config.defaultIconComponent ? '' : 'fa-';
|
|
344
|
+
return {
|
|
345
|
+
sizes: {
|
|
346
|
+
'default': null,
|
|
347
|
+
'is-small': null,
|
|
348
|
+
'is-medium': faIconPrefix + 'lg',
|
|
349
|
+
'is-large': faIconPrefix + '2x'
|
|
350
|
+
},
|
|
351
|
+
iconPrefix: faIconPrefix,
|
|
352
|
+
internalIcons: {
|
|
353
|
+
'information': 'info-circle',
|
|
354
|
+
'alert': 'exclamation-triangle',
|
|
355
|
+
'alert-circle': 'exclamation-circle',
|
|
356
|
+
'chevron-right': 'angle-right',
|
|
357
|
+
'chevron-left': 'angle-left',
|
|
358
|
+
'chevron-down': 'angle-down',
|
|
359
|
+
'eye-off': 'eye-slash',
|
|
360
|
+
'menu-down': 'caret-down',
|
|
361
|
+
'menu-up': 'caret-up',
|
|
362
|
+
'close-circle': 'times-circle'
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
var getIcons = function getIcons() {
|
|
367
|
+
var icons = {
|
|
368
|
+
mdi: mdiIcons,
|
|
369
|
+
fa: faIcons(),
|
|
370
|
+
fas: faIcons(),
|
|
371
|
+
far: faIcons(),
|
|
372
|
+
fad: faIcons(),
|
|
373
|
+
fab: faIcons(),
|
|
374
|
+
fal: faIcons(),
|
|
375
|
+
'fa-solid': faIcons(),
|
|
376
|
+
'fa-regular': faIcons(),
|
|
377
|
+
'fa-light': faIcons(),
|
|
378
|
+
'fa-thin': faIcons(),
|
|
379
|
+
'fa-duotone': faIcons(),
|
|
380
|
+
'fa-brands': faIcons()
|
|
381
|
+
};
|
|
382
|
+
if (config && config.customIconPacks) {
|
|
383
|
+
icons = merge(icons, config.customIconPacks, true);
|
|
384
|
+
}
|
|
385
|
+
return icons;
|
|
386
|
+
};
|
|
387
|
+
var getIcons$1 = getIcons;
|
|
388
|
+
|
|
389
|
+
var script$1 = {
|
|
390
|
+
name: 'BIcon',
|
|
391
|
+
props: {
|
|
392
|
+
type: [String, Object],
|
|
393
|
+
component: String,
|
|
394
|
+
pack: String,
|
|
395
|
+
icon: String,
|
|
396
|
+
size: String,
|
|
397
|
+
customSize: String,
|
|
398
|
+
customClass: String,
|
|
399
|
+
both: Boolean // This is used internally to show both MDI and FA icon
|
|
400
|
+
},
|
|
401
|
+
computed: {
|
|
402
|
+
iconConfig: function iconConfig() {
|
|
403
|
+
var allIcons = getIcons$1();
|
|
404
|
+
return allIcons[this.newPack];
|
|
405
|
+
},
|
|
406
|
+
iconPrefix: function iconPrefix() {
|
|
407
|
+
if (this.iconConfig && this.iconConfig.iconPrefix) {
|
|
408
|
+
return this.iconConfig.iconPrefix;
|
|
409
|
+
}
|
|
410
|
+
return '';
|
|
411
|
+
},
|
|
412
|
+
/**
|
|
413
|
+
* Internal icon name based on the pack.
|
|
414
|
+
* If pack is 'fa', gets the equivalent FA icon name of the MDI,
|
|
415
|
+
* internal icons are always MDI.
|
|
416
|
+
*/
|
|
417
|
+
newIcon: function newIcon() {
|
|
418
|
+
return "".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon));
|
|
419
|
+
},
|
|
420
|
+
newPack: function newPack() {
|
|
421
|
+
return this.pack || config.defaultIconPack;
|
|
422
|
+
},
|
|
423
|
+
newType: function newType() {
|
|
424
|
+
if (!this.type) return;
|
|
425
|
+
var splitType = [];
|
|
426
|
+
if (typeof this.type === 'string') {
|
|
427
|
+
splitType = this.type.split('-');
|
|
428
|
+
} else {
|
|
429
|
+
for (var key in this.type) {
|
|
430
|
+
if (this.type[key]) {
|
|
431
|
+
splitType = key.split('-');
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
if (splitType.length <= 1) return;
|
|
437
|
+
var _splitType = splitType,
|
|
438
|
+
_splitType2 = _toArray(_splitType),
|
|
439
|
+
type = _splitType2.slice(1);
|
|
440
|
+
return "has-text-".concat(type.join('-'));
|
|
441
|
+
},
|
|
442
|
+
newCustomSize: function newCustomSize() {
|
|
443
|
+
return this.customSize || this.customSizeByPack;
|
|
444
|
+
},
|
|
445
|
+
customSizeByPack: function customSizeByPack() {
|
|
446
|
+
if (this.iconConfig && this.iconConfig.sizes) {
|
|
447
|
+
if (this.size && this.iconConfig.sizes[this.size] !== undefined) {
|
|
448
|
+
return this.iconConfig.sizes[this.size];
|
|
449
|
+
} else if (this.iconConfig.sizes.default) {
|
|
450
|
+
return this.iconConfig.sizes.default;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
return null;
|
|
454
|
+
},
|
|
455
|
+
useIconComponent: function useIconComponent() {
|
|
456
|
+
return this.component || config.defaultIconComponent;
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
methods: {
|
|
460
|
+
/**
|
|
461
|
+
* Equivalent icon name of the MDI.
|
|
462
|
+
*/
|
|
463
|
+
getEquivalentIconOf: function getEquivalentIconOf(value) {
|
|
464
|
+
// Only transform the class if the both prop is set to true
|
|
465
|
+
if (!this.both) {
|
|
466
|
+
return value;
|
|
467
|
+
}
|
|
468
|
+
if (this.iconConfig && this.iconConfig.internalIcons && this.iconConfig.internalIcons[value]) {
|
|
469
|
+
return this.iconConfig.internalIcons[value];
|
|
470
|
+
}
|
|
471
|
+
return value;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
/* script */
|
|
477
|
+
const __vue_script__$1 = script$1;
|
|
478
|
+
|
|
479
|
+
/* template */
|
|
480
|
+
var __vue_render__$1 = 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)};
|
|
481
|
+
var __vue_staticRenderFns__$1 = [];
|
|
482
|
+
|
|
483
|
+
/* style */
|
|
484
|
+
const __vue_inject_styles__$1 = undefined;
|
|
485
|
+
/* scoped */
|
|
486
|
+
const __vue_scope_id__$1 = undefined;
|
|
487
|
+
/* module identifier */
|
|
488
|
+
const __vue_module_identifier__$1 = undefined;
|
|
489
|
+
/* functional template */
|
|
490
|
+
const __vue_is_functional_template__$1 = false;
|
|
491
|
+
/* style inject */
|
|
492
|
+
|
|
493
|
+
/* style inject SSR */
|
|
494
|
+
|
|
495
|
+
/* style inject shadow dom */
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
|
|
500
|
+
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
|
|
501
|
+
__vue_inject_styles__$1,
|
|
502
|
+
__vue_script__$1,
|
|
503
|
+
__vue_scope_id__$1,
|
|
504
|
+
__vue_is_functional_template__$1,
|
|
505
|
+
__vue_module_identifier__$1,
|
|
506
|
+
false,
|
|
507
|
+
undefined,
|
|
508
|
+
undefined,
|
|
509
|
+
undefined
|
|
510
|
+
);
|
|
511
|
+
|
|
512
|
+
var Icon = __vue_component__$1;
|
|
513
|
+
|
|
514
|
+
function debounce (func, wait, immediate) {
|
|
515
|
+
var timeout;
|
|
516
|
+
return function () {
|
|
517
|
+
var context = this;
|
|
518
|
+
var args = arguments;
|
|
519
|
+
var later = function later() {
|
|
520
|
+
timeout = null;
|
|
521
|
+
if (!immediate) func.apply(context, args);
|
|
522
|
+
};
|
|
523
|
+
var callNow = immediate && !timeout;
|
|
524
|
+
clearTimeout(timeout);
|
|
525
|
+
timeout = setTimeout(later, wait);
|
|
526
|
+
if (callNow) func.apply(context, args);
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
var script = {
|
|
531
|
+
name: 'BPagination',
|
|
532
|
+
components: _defineProperty(_defineProperty({}, Icon.name, Icon), PaginationButton.name, PaginationButton),
|
|
533
|
+
// deprecated, to replace with default 'value' in the next breaking change
|
|
534
|
+
model: {
|
|
535
|
+
prop: 'current',
|
|
536
|
+
event: 'update:current'
|
|
537
|
+
},
|
|
538
|
+
props: {
|
|
539
|
+
total: [Number, String],
|
|
540
|
+
perPage: {
|
|
541
|
+
type: [Number, String],
|
|
542
|
+
default: 20
|
|
543
|
+
},
|
|
544
|
+
current: {
|
|
545
|
+
type: [Number, String],
|
|
546
|
+
default: 1
|
|
547
|
+
},
|
|
548
|
+
rangeBefore: {
|
|
549
|
+
type: [Number, String],
|
|
550
|
+
default: 1
|
|
551
|
+
},
|
|
552
|
+
rangeAfter: {
|
|
553
|
+
type: [Number, String],
|
|
554
|
+
default: 1
|
|
555
|
+
},
|
|
556
|
+
size: String,
|
|
557
|
+
simple: Boolean,
|
|
558
|
+
rounded: Boolean,
|
|
559
|
+
order: String,
|
|
560
|
+
iconPack: String,
|
|
561
|
+
iconPrev: {
|
|
562
|
+
type: String,
|
|
563
|
+
default: function _default() {
|
|
564
|
+
return config.defaultIconPrev;
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
iconNext: {
|
|
568
|
+
type: String,
|
|
569
|
+
default: function _default() {
|
|
570
|
+
return config.defaultIconNext;
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
ariaNextLabel: String,
|
|
574
|
+
ariaPreviousLabel: String,
|
|
575
|
+
ariaPageLabel: String,
|
|
576
|
+
ariaCurrentLabel: String,
|
|
577
|
+
pageInput: {
|
|
578
|
+
type: Boolean,
|
|
579
|
+
default: false
|
|
580
|
+
},
|
|
581
|
+
pageInputPosition: String,
|
|
582
|
+
debouncePageInput: [Number, String]
|
|
583
|
+
},
|
|
584
|
+
data: function data() {
|
|
585
|
+
return {
|
|
586
|
+
inputValue: this.current
|
|
587
|
+
};
|
|
588
|
+
},
|
|
589
|
+
computed: {
|
|
590
|
+
rootClasses: function rootClasses() {
|
|
591
|
+
return [this.order, this.size, this.pageInputPosition, {
|
|
592
|
+
'is-simple': this.simple,
|
|
593
|
+
'is-rounded': this.rounded,
|
|
594
|
+
'has-input': this.pageInput
|
|
595
|
+
}];
|
|
596
|
+
},
|
|
597
|
+
beforeCurrent: function beforeCurrent() {
|
|
598
|
+
return parseInt(this.rangeBefore);
|
|
599
|
+
},
|
|
600
|
+
afterCurrent: function afterCurrent() {
|
|
601
|
+
return parseInt(this.rangeAfter);
|
|
602
|
+
},
|
|
603
|
+
/**
|
|
604
|
+
* Total page size (count).
|
|
605
|
+
*/
|
|
606
|
+
pageCount: function pageCount() {
|
|
607
|
+
return Math.ceil(this.total / this.perPage);
|
|
608
|
+
},
|
|
609
|
+
/**
|
|
610
|
+
* First item of the page (count).
|
|
611
|
+
*/
|
|
612
|
+
firstItem: function firstItem() {
|
|
613
|
+
var firstItem = this.current * this.perPage - this.perPage + 1;
|
|
614
|
+
return firstItem >= 0 ? firstItem : 0;
|
|
615
|
+
},
|
|
616
|
+
/**
|
|
617
|
+
* Check if previous button is available.
|
|
618
|
+
*/
|
|
619
|
+
hasPrev: function hasPrev() {
|
|
620
|
+
return this.current > 1;
|
|
621
|
+
},
|
|
622
|
+
/**
|
|
623
|
+
* Check if first page button should be visible.
|
|
624
|
+
*/
|
|
625
|
+
hasFirst: function hasFirst() {
|
|
626
|
+
return this.current >= 2 + this.beforeCurrent;
|
|
627
|
+
},
|
|
628
|
+
/**
|
|
629
|
+
* Check if first ellipsis should be visible.
|
|
630
|
+
*/
|
|
631
|
+
hasFirstEllipsis: function hasFirstEllipsis() {
|
|
632
|
+
return this.current >= this.beforeCurrent + 4;
|
|
633
|
+
},
|
|
634
|
+
/**
|
|
635
|
+
* Check if last page button should be visible.
|
|
636
|
+
*/
|
|
637
|
+
hasLast: function hasLast() {
|
|
638
|
+
return this.current <= this.pageCount - (1 + this.afterCurrent);
|
|
639
|
+
},
|
|
640
|
+
/**
|
|
641
|
+
* Check if last ellipsis should be visible.
|
|
642
|
+
*/
|
|
643
|
+
hasLastEllipsis: function hasLastEllipsis() {
|
|
644
|
+
return this.current < this.pageCount - (2 + this.afterCurrent);
|
|
645
|
+
},
|
|
646
|
+
/**
|
|
647
|
+
* Check if next button is available.
|
|
648
|
+
*/
|
|
649
|
+
hasNext: function hasNext() {
|
|
650
|
+
return this.current < this.pageCount;
|
|
651
|
+
},
|
|
652
|
+
/**
|
|
653
|
+
* Get near pages, 1 before and 1 after the current.
|
|
654
|
+
* Also add the click event to the array.
|
|
655
|
+
*/
|
|
656
|
+
pagesInRange: function pagesInRange() {
|
|
657
|
+
if (this.simple) return;
|
|
658
|
+
var left = Math.max(1, this.current - this.beforeCurrent);
|
|
659
|
+
if (left - 1 === 2) {
|
|
660
|
+
left--; // Do not show the ellipsis if there is only one to hide
|
|
661
|
+
}
|
|
662
|
+
var right = Math.min(this.current + this.afterCurrent, this.pageCount);
|
|
663
|
+
if (this.pageCount - right === 2) {
|
|
664
|
+
right++; // Do not show the ellipsis if there is only one to hide
|
|
665
|
+
}
|
|
666
|
+
var pages = [];
|
|
667
|
+
for (var i = left; i <= right; i++) {
|
|
668
|
+
pages.push(this.getPage(i));
|
|
669
|
+
}
|
|
670
|
+
return pages;
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
watch: {
|
|
674
|
+
/**
|
|
675
|
+
* If current page is trying to be greater than page count, set to last.
|
|
676
|
+
*/
|
|
677
|
+
pageCount: function pageCount(value) {
|
|
678
|
+
if (this.current > value) this.last();
|
|
679
|
+
},
|
|
680
|
+
current: function current(value) {
|
|
681
|
+
this.inputValue = value;
|
|
682
|
+
},
|
|
683
|
+
debouncePageInput: {
|
|
684
|
+
handler: function handler(value) {
|
|
685
|
+
this.debounceHandlePageInput = debounce(this.handleOnInputPageChange, value);
|
|
686
|
+
},
|
|
687
|
+
immediate: true
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
methods: {
|
|
691
|
+
/**
|
|
692
|
+
* Previous button click listener.
|
|
693
|
+
*/
|
|
694
|
+
prev: function prev(event) {
|
|
695
|
+
this.changePage(this.current - 1, event);
|
|
696
|
+
},
|
|
697
|
+
/**
|
|
698
|
+
* Next button click listener.
|
|
699
|
+
*/
|
|
700
|
+
next: function next(event) {
|
|
701
|
+
this.changePage(this.current + 1, event);
|
|
702
|
+
},
|
|
703
|
+
/**
|
|
704
|
+
* First button click listener.
|
|
705
|
+
*/
|
|
706
|
+
first: function first(event) {
|
|
707
|
+
this.changePage(1, event);
|
|
708
|
+
},
|
|
709
|
+
/**
|
|
710
|
+
* Last button click listener.
|
|
711
|
+
*/
|
|
712
|
+
last: function last(event) {
|
|
713
|
+
this.changePage(this.pageCount, event);
|
|
714
|
+
},
|
|
715
|
+
changePage: function changePage(num, event) {
|
|
716
|
+
if (this.current === num || num < 1 || num > this.pageCount) return;
|
|
717
|
+
this.$emit('update:current', num);
|
|
718
|
+
this.$emit('change', num);
|
|
719
|
+
|
|
720
|
+
// Set focus on element to keep tab order
|
|
721
|
+
if (event && event.target) {
|
|
722
|
+
this.$nextTick(function () {
|
|
723
|
+
return event.target.focus();
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
getPage: function getPage(num) {
|
|
728
|
+
var _this = this;
|
|
729
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
730
|
+
return {
|
|
731
|
+
number: num,
|
|
732
|
+
isCurrent: this.current === num,
|
|
733
|
+
click: function click(event) {
|
|
734
|
+
return _this.changePage(num, event);
|
|
735
|
+
},
|
|
736
|
+
input: function input(event, inputNum) {
|
|
737
|
+
return _this.changePage(+inputNum, event);
|
|
738
|
+
},
|
|
739
|
+
disabled: options.disabled || false,
|
|
740
|
+
class: options.class || '',
|
|
741
|
+
'aria-label': options['aria-label'] || this.getAriaPageLabel(num, this.current === num)
|
|
742
|
+
};
|
|
743
|
+
},
|
|
744
|
+
/**
|
|
745
|
+
* Get text for aria-label according to page number.
|
|
746
|
+
*/
|
|
747
|
+
getAriaPageLabel: function getAriaPageLabel(pageNumber, isCurrent) {
|
|
748
|
+
if (this.ariaPageLabel && (!isCurrent || !this.ariaCurrentLabel)) {
|
|
749
|
+
return this.ariaPageLabel + ' ' + pageNumber + '.';
|
|
750
|
+
} else if (this.ariaPageLabel && isCurrent && this.ariaCurrentLabel) {
|
|
751
|
+
return this.ariaCurrentLabel + ', ' + this.ariaPageLabel + ' ' + pageNumber + '.';
|
|
752
|
+
}
|
|
753
|
+
return null;
|
|
754
|
+
},
|
|
755
|
+
handleOnInputPageChange: function handleOnInputPageChange(event) {
|
|
756
|
+
this.getPage(this.inputValue).input(event, this.inputValue);
|
|
757
|
+
},
|
|
758
|
+
handleOnInputDebounce: function handleOnInputDebounce(event) {
|
|
759
|
+
if (this.debouncePageInput) {
|
|
760
|
+
this.debounceHandlePageInput(event);
|
|
761
|
+
} else {
|
|
762
|
+
this.handleOnInputPageChange(event);
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
handleOnKeyPress: function handleOnKeyPress(event) {
|
|
766
|
+
// --- This is required to only allow numeric inputs for the page input - --- //
|
|
767
|
+
// --- size attribute does not work with input type number. --- //
|
|
768
|
+
var ASCIICode = event.which || event.keyCode;
|
|
769
|
+
if (ASCIICode >= 48 && ASCIICode <= 57) {
|
|
770
|
+
return true;
|
|
771
|
+
} else {
|
|
772
|
+
return event.preventDefault();
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
handleAllowableInputPageRange: function handleAllowableInputPageRange(event) {
|
|
776
|
+
if (+event.target.value > 0 && +event.target.value <= this.pageCount) {
|
|
777
|
+
this.handleOnInputValue(event);
|
|
778
|
+
} else {
|
|
779
|
+
// --- It is nessacery to set inputValue to 1 and then to '' so that the DOM- --- //
|
|
780
|
+
// --- will update the input component even when Backspace is used and then-
|
|
781
|
+
// --- 0 us entered. --- //
|
|
782
|
+
this.inputValue = 1;
|
|
783
|
+
this.inputValue = '';
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
handleOnInputValue: function handleOnInputValue(event) {
|
|
787
|
+
var inputValue = +event.target.value;
|
|
788
|
+
this.inputValue = inputValue;
|
|
789
|
+
if (Number.isInteger(this.inputValue)) {
|
|
790
|
+
this.handleOnInputDebounce(event);
|
|
791
|
+
} else {
|
|
792
|
+
// --- if NaN, then set inputValue back to current --- //
|
|
793
|
+
this.inputValue = this.current;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
/* script */
|
|
800
|
+
const __vue_script__ = script;
|
|
801
|
+
|
|
802
|
+
/* template */
|
|
803
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:"pagination",class:_vm.rootClasses},[(_vm.$scopedSlots.previous)?_vm._t("previous",[_c('b-icon',{attrs:{"icon":_vm.iconPrev,"pack":_vm.iconPack,"both":"","aria-hidden":"true"}})],{"page":_vm.getPage(_vm.current - 1, {
|
|
804
|
+
disabled: !_vm.hasPrev,
|
|
805
|
+
class: 'pagination-previous',
|
|
806
|
+
'aria-label': _vm.ariaPreviousLabel,
|
|
807
|
+
})}):_c('BPaginationButton',{staticClass:"pagination-previous",attrs:{"disabled":!_vm.hasPrev,"page":_vm.getPage(_vm.current - 1),"aria-label":_vm.ariaPreviousLabel}},[_c('b-icon',{attrs:{"icon":_vm.iconPrev,"pack":_vm.iconPack,"both":"","aria-hidden":"true"}})],1),(_vm.$scopedSlots.next)?_vm._t("next",[_c('b-icon',{attrs:{"icon":_vm.iconNext,"pack":_vm.iconPack,"both":"","aria-hidden":"true"}})],{"page":_vm.getPage(_vm.current + 1, {
|
|
808
|
+
disabled: !_vm.hasNext,
|
|
809
|
+
class: 'pagination-next',
|
|
810
|
+
'aria-label': _vm.ariaNextLabel,
|
|
811
|
+
})}):_c('BPaginationButton',{staticClass:"pagination-next",attrs:{"disabled":!_vm.hasNext,"page":_vm.getPage(_vm.current + 1),"aria-label":_vm.ariaNextLabel}},[_c('b-icon',{attrs:{"icon":_vm.iconNext,"pack":_vm.iconPack,"both":"","aria-hidden":"true"}})],1),_c('div',{staticClass:"control pagination-input"},[(_vm.pageInput)?_c('input',{staticClass:"input",attrs:{"size":_vm.pageCount.toString().length,"maxlength":_vm.pageCount.toString().length},domProps:{"value":_vm.inputValue},on:{"input":_vm.handleAllowableInputPageRange,"keypress":_vm.handleOnKeyPress}}):_vm._e()]),(_vm.simple)?_c('small',{staticClass:"info"},[(_vm.perPage == 1)?[_vm._v(" "+_vm._s(_vm.firstItem)+" / "+_vm._s(_vm.total)+" ")]:[_vm._v(" "+_vm._s(_vm.firstItem)+"-"+_vm._s(Math.min(_vm.current * _vm.perPage, _vm.total))+" / "+_vm._s(_vm.total)+" ")]],2):_c('ul',{staticClass:"pagination-list"},[(_vm.hasFirst)?_c('li',[(_vm.$scopedSlots.default)?_vm._t("default",null,{"page":_vm.getPage(1)}):_c('BPaginationButton',{attrs:{"page":_vm.getPage(1)}})],2):_vm._e(),(_vm.hasFirstEllipsis)?_c('li',[_c('span',{staticClass:"pagination-ellipsis"},[_vm._v("…")])]):_vm._e(),_vm._l((_vm.pagesInRange),function(page){return _c('li',{key:page.number},[(_vm.$scopedSlots.default)?_vm._t("default",null,{"page":page}):_c('BPaginationButton',{attrs:{"page":page}})],2)}),(_vm.hasLastEllipsis)?_c('li',[_c('span',{staticClass:"pagination-ellipsis"},[_vm._v("…")])]):_vm._e(),(_vm.hasLast)?_c('li',[(_vm.$scopedSlots.default)?_vm._t("default",null,{"page":_vm.getPage(_vm.pageCount)}):_c('BPaginationButton',{attrs:{"page":_vm.getPage(_vm.pageCount)}})],2):_vm._e()],2)],2)};
|
|
812
|
+
var __vue_staticRenderFns__ = [];
|
|
813
|
+
|
|
814
|
+
/* style */
|
|
815
|
+
const __vue_inject_styles__ = undefined;
|
|
816
|
+
/* scoped */
|
|
817
|
+
const __vue_scope_id__ = undefined;
|
|
818
|
+
/* module identifier */
|
|
819
|
+
const __vue_module_identifier__ = undefined;
|
|
820
|
+
/* functional template */
|
|
821
|
+
const __vue_is_functional_template__ = false;
|
|
822
|
+
/* style inject */
|
|
823
|
+
|
|
824
|
+
/* style inject SSR */
|
|
825
|
+
|
|
826
|
+
/* style inject shadow dom */
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent(
|
|
831
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
832
|
+
__vue_inject_styles__,
|
|
833
|
+
__vue_script__,
|
|
834
|
+
__vue_scope_id__,
|
|
835
|
+
__vue_is_functional_template__,
|
|
836
|
+
__vue_module_identifier__,
|
|
837
|
+
false,
|
|
838
|
+
undefined,
|
|
839
|
+
undefined,
|
|
840
|
+
undefined
|
|
841
|
+
);
|
|
842
|
+
|
|
843
|
+
var Pagination = __vue_component__;
|
|
844
|
+
|
|
845
|
+
var use = function use(plugin) {
|
|
846
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
847
|
+
window.Vue.use(plugin);
|
|
848
|
+
}
|
|
849
|
+
};
|
|
850
|
+
var registerComponent = function registerComponent(Vue, component) {
|
|
851
|
+
Vue.component(component.name, component);
|
|
852
|
+
};
|
|
853
|
+
|
|
854
|
+
var Plugin = {
|
|
855
|
+
install: function install(Vue) {
|
|
856
|
+
registerComponent(Vue, Pagination);
|
|
857
|
+
registerComponent(Vue, PaginationButton);
|
|
858
|
+
}
|
|
859
|
+
};
|
|
860
|
+
use(Plugin);
|
|
861
|
+
|
|
862
|
+
exports.BPagination = Pagination;
|
|
863
|
+
exports.BPaginationButton = PaginationButton;
|
|
864
|
+
exports["default"] = Plugin;
|
|
865
|
+
|
|
866
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
867
|
+
|
|
868
|
+
}));
|