buefy 0.9.9 → 0.9.13
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/CHANGELOG.md +1639 -1609
- package/dist/buefy.css +20 -2
- package/dist/buefy.esm.js +2227 -1869
- package/dist/buefy.esm.min.js +2 -2
- package/dist/buefy.js +2266 -1907
- package/dist/buefy.min.css +1 -1
- package/dist/buefy.min.js +2 -2
- package/dist/cjs/autocomplete.js +6 -6
- package/dist/cjs/breadcrumb.js +127 -0
- package/dist/cjs/button.js +6 -107
- package/dist/cjs/carousel.js +9 -7
- package/dist/cjs/checkbox.js +5 -5
- package/dist/cjs/{chunk-d33a8a78.js → chunk-114191ae.js} +3 -3
- package/dist/cjs/{chunk-dafdb70c.js → chunk-2062216d.js} +39 -3
- package/dist/cjs/{chunk-64efc596.js → chunk-2911aa4b.js} +20 -16
- package/dist/cjs/{chunk-96ab31c1.js → chunk-2ae50815.js} +7 -7
- package/dist/cjs/{chunk-c3032504.js → chunk-2c7de785.js} +3 -3
- package/dist/cjs/{chunk-50ff3a78.js → chunk-30670fac.js} +96 -15
- package/dist/cjs/{chunk-e57b3891.js → chunk-34949503.js} +2 -2
- package/dist/cjs/{chunk-0abd2223.js → chunk-3b43d77a.js} +2 -2
- package/dist/cjs/{chunk-dcdbe2e8.js → chunk-3cc5d9a6.js} +1 -1
- package/dist/cjs/{chunk-0b57168e.js → chunk-61023b09.js} +3 -3
- package/dist/cjs/chunk-6cb902f8.js +314 -0
- package/dist/cjs/{chunk-adb01a93.js → chunk-7da0c017.js} +26 -24
- package/dist/cjs/{chunk-60255743.js → chunk-9103eeda.js} +4 -0
- package/dist/cjs/{chunk-14c82365.js → chunk-92621ff7.js} +37 -0
- package/dist/cjs/{chunk-816cba7a.js → chunk-9e4cf4c5.js} +1 -1
- package/dist/cjs/{chunk-33b9d1cf.js → chunk-a11294f9.js} +27 -26
- package/dist/cjs/{chunk-430b5370.js → chunk-bfcad370.js} +25 -2
- package/dist/cjs/{chunk-cc470e7c.js → chunk-c6fbc7b4.js} +7 -7
- package/dist/cjs/{chunk-993f89de.js → chunk-c7b2aa4b.js} +5 -4
- package/dist/cjs/{chunk-6474e963.js → chunk-d0f8ea39.js} +9 -9
- package/dist/cjs/{chunk-3acb500b.js → chunk-d120e215.js} +2 -2
- package/dist/cjs/{chunk-f5baaa70.js → chunk-d54e40f6.js} +2 -1
- package/dist/cjs/{chunk-916a2858.js → chunk-f5106717.js} +4 -4
- package/dist/cjs/chunk-fe2f57ee.js +110 -0
- package/dist/cjs/{chunk-2571dc7c.js → chunk-fefd7b77.js} +0 -0
- package/dist/cjs/clockpicker.js +11 -11
- package/dist/cjs/config.js +2 -2
- package/dist/cjs/datepicker.js +12 -12
- package/dist/cjs/datetimepicker.js +22 -15
- package/dist/cjs/dialog.js +13 -11
- package/dist/cjs/dropdown.js +8 -8
- package/dist/cjs/field.js +5 -5
- package/dist/cjs/helpers.js +2 -3
- package/dist/cjs/icon.js +3 -3
- package/dist/cjs/image.js +6 -311
- package/dist/cjs/index.js +29 -23
- package/dist/cjs/input.js +5 -5
- package/dist/cjs/loading.js +6 -6
- package/dist/cjs/menu.js +3 -3
- package/dist/cjs/message.js +6 -6
- package/dist/cjs/modal.js +6 -6
- package/dist/cjs/navbar.js +16 -4
- package/dist/cjs/notification.js +23 -11
- package/dist/cjs/numberinput.js +9 -7
- package/dist/cjs/pagination.js +8 -8
- package/dist/cjs/progress.js +10 -6
- package/dist/cjs/radio.js +3 -3
- package/dist/cjs/rate.js +3 -3
- package/dist/cjs/select.js +7 -7
- package/dist/cjs/sidebar.js +2 -2
- package/dist/cjs/slider.js +4 -4
- package/dist/cjs/snackbar.js +5 -5
- package/dist/cjs/steps.js +8 -8
- package/dist/cjs/switch.js +1 -1
- package/dist/cjs/table.js +13 -13
- package/dist/cjs/tabs.js +8 -8
- package/dist/cjs/tag.js +3 -3
- package/dist/cjs/taginput.js +34 -22
- package/dist/cjs/timepicker.js +13 -13
- package/dist/cjs/toast.js +5 -5
- package/dist/cjs/tooltip.js +5 -5
- package/dist/cjs/upload.js +5 -5
- package/dist/components/autocomplete/index.js +98 -13
- package/dist/components/autocomplete/index.min.js +2 -2
- package/dist/components/breadcrumb/index.js +293 -0
- package/dist/components/breadcrumb/index.min.js +2 -0
- package/dist/components/button/index.js +5 -1
- package/dist/components/button/index.min.js +2 -2
- package/dist/components/carousel/index.js +348 -15
- package/dist/components/carousel/index.min.js +2 -2
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.min.js +1 -1
- package/dist/components/clockpicker/index.js +54 -47
- package/dist/components/clockpicker/index.min.js +2 -2
- package/dist/components/collapse/index.js +1 -1
- package/dist/components/collapse/index.min.js +1 -1
- package/dist/components/datepicker/index.js +41 -32
- package/dist/components/datepicker/index.min.js +2 -2
- package/dist/components/datetimepicker/index.js +75 -58
- package/dist/components/datetimepicker/index.min.js +2 -2
- package/dist/components/dialog/index.js +126 -18
- package/dist/components/dialog/index.min.js +2 -2
- package/dist/components/dropdown/index.js +5 -1
- package/dist/components/dropdown/index.min.js +1 -1
- package/dist/components/field/index.js +29 -23
- package/dist/components/field/index.min.js +2 -2
- package/dist/components/icon/index.js +5 -1
- package/dist/components/icon/index.min.js +2 -2
- package/dist/components/image/index.js +463 -444
- package/dist/components/image/index.min.js +2 -2
- package/dist/components/input/index.js +5 -1
- package/dist/components/input/index.min.js +2 -2
- package/dist/components/loading/index.js +2 -2
- package/dist/components/loading/index.min.js +2 -2
- package/dist/components/menu/index.js +5 -1
- package/dist/components/menu/index.min.js +2 -2
- package/dist/components/message/index.js +43 -3
- package/dist/components/message/index.min.js +2 -2
- package/dist/components/modal/index.js +7 -2
- package/dist/components/modal/index.min.js +2 -2
- package/dist/components/navbar/index.js +16 -4
- package/dist/components/navbar/index.min.js +2 -2
- package/dist/components/notification/index.js +59 -6
- package/dist/components/notification/index.min.js +2 -2
- package/dist/components/numberinput/index.js +9 -3
- package/dist/components/numberinput/index.min.js +2 -2
- package/dist/components/pagination/index.js +5 -1
- package/dist/components/pagination/index.min.js +2 -2
- package/dist/components/progress/index.js +10 -2
- package/dist/components/progress/index.min.js +2 -2
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/index.min.js +1 -1
- package/dist/components/rate/index.js +5 -1
- package/dist/components/rate/index.min.js +2 -2
- package/dist/components/select/index.js +5 -1
- package/dist/components/select/index.min.js +2 -2
- package/dist/components/sidebar/index.js +5 -1
- package/dist/components/sidebar/index.min.js +1 -1
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/skeleton/index.min.js +1 -1
- package/dist/components/slider/index.js +5 -1
- package/dist/components/slider/index.min.js +2 -2
- package/dist/components/snackbar/index.js +7 -2
- package/dist/components/snackbar/index.min.js +2 -2
- package/dist/components/steps/index.js +5 -1
- package/dist/components/steps/index.min.js +2 -2
- package/dist/components/switch/index.js +5 -1
- package/dist/components/switch/index.min.js +1 -1
- package/dist/components/table/index.js +6 -2
- package/dist/components/table/index.min.js +2 -2
- package/dist/components/tabs/index.js +5 -1
- package/dist/components/tabs/index.min.js +2 -2
- package/dist/components/tag/index.js +26 -3
- package/dist/components/tag/index.min.js +2 -2
- package/dist/components/taginput/index.js +185 -29
- package/dist/components/taginput/index.min.js +2 -2
- package/dist/components/timepicker/index.js +54 -47
- package/dist/components/timepicker/index.min.js +2 -2
- package/dist/components/toast/index.js +7 -2
- package/dist/components/toast/index.min.js +2 -2
- package/dist/components/tooltip/index.js +5 -1
- package/dist/components/tooltip/index.min.js +1 -1
- package/dist/components/upload/index.js +5 -1
- package/dist/components/upload/index.min.js +2 -2
- package/dist/esm/autocomplete.js +7 -7
- package/dist/esm/breadcrumb.js +122 -0
- package/dist/esm/button.js +6 -107
- package/dist/esm/carousel.js +7 -5
- package/dist/esm/{chunk-56040896.js → chunk-18e8b067.js} +3 -3
- package/dist/esm/{chunk-fa404a2c.js → chunk-21fc0948.js} +7 -7
- package/dist/esm/{chunk-f9299099.js → chunk-22e9f916.js} +19 -15
- package/dist/esm/{chunk-1fafdf15.js → chunk-2452e3d3.js} +37 -1
- package/dist/esm/{chunk-1297c2c9.js → chunk-29ca0df8.js} +1 -1
- package/dist/esm/{chunk-3c2169d7.js → chunk-2f2f0a74.js} +25 -2
- package/dist/esm/{chunk-cf72ce36.js → chunk-3773c62d.js} +2 -2
- package/dist/esm/{chunk-2c957994.js → chunk-4b67a181.js} +3 -3
- package/dist/esm/{chunk-45740cdc.js → chunk-6019fd7a.js} +96 -15
- package/dist/esm/chunk-71a547bc.js +312 -0
- package/dist/esm/{chunk-516e4877.js → chunk-75a5af93.js} +1 -1
- package/dist/esm/{chunk-4e380ee2.js → chunk-799e084d.js} +2 -1
- package/dist/esm/{chunk-37678809.js → chunk-83eb0d37.js} +3 -3
- package/dist/esm/{chunk-34c74085.js → chunk-8d0f95b8.js} +4 -4
- package/dist/esm/{chunk-652f2dad.js → chunk-8ed29c41.js} +4 -0
- package/dist/esm/{chunk-742a9694.js → chunk-9f7f7441.js} +3 -2
- package/dist/esm/{chunk-f160efb9.js → chunk-ae8ab23a.js} +4 -4
- package/dist/esm/{chunk-c3b09672.js → chunk-b07e3182.js} +26 -24
- package/dist/esm/{chunk-e36a4f2c.js → chunk-b0c0c6b0.js} +0 -0
- package/dist/esm/{chunk-ee935ae6.js → chunk-c9c58d0c.js} +1 -1
- package/dist/esm/{chunk-1d62828e.js → chunk-d7f92d97.js} +39 -3
- package/dist/esm/{chunk-7fd02ffe.js → chunk-d92f0cd9.js} +2 -2
- package/dist/esm/chunk-e7c9b2cb.js +108 -0
- package/dist/esm/{chunk-0e22ae0a.js → chunk-ece062a7.js} +27 -26
- package/dist/esm/clockpicker.js +9 -9
- package/dist/esm/config.js +2 -2
- package/dist/esm/datepicker.js +11 -11
- package/dist/esm/datetimepicker.js +21 -14
- package/dist/esm/dialog.js +10 -8
- package/dist/esm/dropdown.js +5 -5
- package/dist/esm/field.js +4 -4
- package/dist/esm/helpers.js +2 -3
- package/dist/esm/icon.js +4 -4
- package/dist/esm/image.js +6 -311
- package/dist/esm/index.js +106 -100
- package/dist/esm/input.js +6 -6
- package/dist/esm/loading.js +4 -4
- package/dist/esm/menu.js +3 -3
- package/dist/esm/message.js +5 -5
- package/dist/esm/modal.js +4 -4
- package/dist/esm/navbar.js +16 -4
- package/dist/esm/notification.js +22 -10
- package/dist/esm/numberinput.js +9 -7
- package/dist/esm/pagination.js +5 -5
- package/dist/esm/progress.js +8 -4
- package/dist/esm/rate.js +3 -3
- package/dist/esm/select.js +6 -6
- package/dist/esm/sidebar.js +2 -2
- package/dist/esm/slider.js +3 -3
- package/dist/esm/snackbar.js +4 -4
- package/dist/esm/steps.js +6 -6
- package/dist/esm/switch.js +1 -1
- package/dist/esm/table.js +9 -9
- package/dist/esm/tabs.js +6 -6
- package/dist/esm/tag.js +2 -2
- package/dist/esm/taginput.js +33 -21
- package/dist/esm/timepicker.js +12 -12
- package/dist/esm/toast.js +4 -4
- package/dist/esm/tooltip.js +4 -4
- package/dist/esm/upload.js +3 -3
- package/dist/vetur/attributes.json +95 -19
- package/dist/vetur/tags.json +37 -4
- package/package.json +2 -2
- package/src/components/autocomplete/Autocomplete.spec.js +70 -0
- package/src/components/autocomplete/Autocomplete.vue +93 -18
- package/src/components/breadcrumb/Breadcrumb.spec.js +63 -0
- package/src/components/breadcrumb/Breadcrumb.vue +43 -0
- package/src/components/breadcrumb/BreadcrumbItem.spec.js +25 -0
- package/src/components/breadcrumb/BreadcrumbItem.vue +33 -0
- package/src/components/breadcrumb/__snapshots__/Breadcrumb.spec.js.snap +7 -0
- package/src/components/breadcrumb/__snapshots__/BreadcrumbItem.spec.js.snap +7 -0
- package/src/components/breadcrumb/index.js +20 -0
- package/src/components/carousel/CarouselList.vue +3 -1
- package/src/components/carousel/__snapshots__/CarouselList.spec.js.snap +128 -8
- package/src/components/clockpicker/Clockpicker.vue +259 -259
- package/src/components/datepicker/Datepicker.vue +10 -6
- package/src/components/datetimepicker/Datetimepicker.vue +8 -1
- package/src/components/dialog/Dialog.vue +10 -10
- package/src/components/field/Field.vue +271 -270
- package/src/components/image/Image.spec.js +197 -183
- package/src/components/image/Image.vue +4 -2
- package/src/components/index.js +2 -0
- package/src/components/loading/Loading.vue +1 -1
- package/src/components/loading/__snapshots__/Loading.spec.js.snap +1 -1
- package/src/components/message/Message.vue +7 -1
- package/src/components/message/__snapshots__/Message.spec.js.snap +1 -0
- package/src/components/modal/Modal.vue +2 -0
- package/src/components/navbar/Navbar.vue +5 -1
- package/src/components/navbar/NavbarBurger.vue +1 -0
- package/src/components/navbar/NavbarDropdown.vue +8 -2
- package/src/components/navbar/__snapshots__/NavBar.spec.js.snap +11 -11
- package/src/components/navbar/__snapshots__/NavBarBurger.spec.js.snap +3 -0
- package/src/components/navbar/__snapshots__/NavbarDropdown.spec.js.snap +1 -1
- package/src/components/notification/Notification.vue +6 -0
- package/src/components/notification/NotificationNotice.vue +16 -3
- package/src/components/notification/__snapshots__/Notification.spec.js.snap +1 -0
- package/src/components/numberinput/Numberinput.spec.js +10 -0
- package/src/components/numberinput/Numberinput.vue +4 -2
- package/src/components/progress/Progress.vue +6 -2
- package/src/components/snackbar/Snackbar.vue +2 -0
- package/src/components/tag/Tag.vue +25 -2
- package/src/components/tag/__snapshots__/Tag.spec.js.snap +1 -1
- package/src/components/taginput/Taginput.spec.js +57 -1
- package/src/components/taginput/Taginput.vue +373 -364
- package/src/components/toast/Toast.vue +1 -1
- package/src/index.js +2 -0
- package/src/scss/buefy.scss +1 -0
- package/src/scss/components/_loading.scss +2 -1
- package/src/scss/components/_message.scss +3 -0
- package/src/scss/components/_notification.scss +8 -0
- package/src/scss/components/_progress.scss +8 -0
- package/src/utils/MessageMixin.js +32 -1
- package/src/utils/NoticeMixin.js +1 -0
- package/src/utils/TimepickerMixin.js +718 -716
- package/src/utils/config.js +4 -0
- package/src/utils/helpers.js +1 -2
- package/types/components.d.ts +5 -0
- package/src/components/navbar/__snapshots__/NavbarBurger.spec.js.snap +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Buefy v0.9.
|
|
1
|
+
/*! Buefy v0.9.13 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -229,6 +229,10 @@
|
|
|
229
229
|
defaultImageResponsive: true,
|
|
230
230
|
defaultImageRatio: null,
|
|
231
231
|
defaultImageSrcsetFormatter: null,
|
|
232
|
+
defaultBreadcrumbTag: 'a',
|
|
233
|
+
defaultBreadcrumbAlign: 'is-left',
|
|
234
|
+
defaultBreadcrumbSeparator: '',
|
|
235
|
+
defaultBreadcrumbSize: 'is-medium',
|
|
232
236
|
customIconPacks: null
|
|
233
237
|
};
|
|
234
238
|
|
|
@@ -953,12 +957,16 @@
|
|
|
953
957
|
default: function _default() {
|
|
954
958
|
return ['Tab', 'Enter'];
|
|
955
959
|
}
|
|
956
|
-
}
|
|
960
|
+
},
|
|
961
|
+
selectableHeader: Boolean,
|
|
962
|
+
selectableFooter: Boolean
|
|
957
963
|
},
|
|
958
964
|
data: function data() {
|
|
959
965
|
return {
|
|
960
966
|
selected: null,
|
|
961
967
|
hovered: null,
|
|
968
|
+
headerHovered: null,
|
|
969
|
+
footerHovered: null,
|
|
962
970
|
isActive: false,
|
|
963
971
|
newValue: this.value,
|
|
964
972
|
newAutocomplete: this.autocomplete || 'off',
|
|
@@ -1176,9 +1184,9 @@
|
|
|
1176
1184
|
newValue: function newValue(value) {
|
|
1177
1185
|
this.$emit('input', value); // Check if selected is invalid
|
|
1178
1186
|
|
|
1179
|
-
var currentValue = this.getValue(this.selected);
|
|
1187
|
+
var currentValue = this.getValue(this.selected);
|
|
1180
1188
|
|
|
1181
|
-
if (
|
|
1189
|
+
if (currentValue && currentValue !== value) {
|
|
1182
1190
|
this.setSelected(null, false);
|
|
1183
1191
|
} // Close dropdown if input is clear or else open it
|
|
1184
1192
|
|
|
@@ -1238,7 +1246,14 @@
|
|
|
1238
1246
|
this.$emit('select', this.selected, event);
|
|
1239
1247
|
|
|
1240
1248
|
if (this.selected !== null) {
|
|
1241
|
-
|
|
1249
|
+
if (this.clearOnSelect) {
|
|
1250
|
+
var input = this.$refs.input;
|
|
1251
|
+
input.newValue = '';
|
|
1252
|
+
input.$refs.input.value = '';
|
|
1253
|
+
} else {
|
|
1254
|
+
this.newValue = this.getValue(this.selected);
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1242
1257
|
this.setHovered(null);
|
|
1243
1258
|
}
|
|
1244
1259
|
|
|
@@ -1275,20 +1290,51 @@
|
|
|
1275
1290
|
if (key === 'Enter') event.preventDefault(); // Close dropdown on Tab & no hovered
|
|
1276
1291
|
|
|
1277
1292
|
if (key === 'Escape' || key === 'Tab') {
|
|
1278
|
-
event.preventDefault();
|
|
1279
1293
|
this.isActive = false;
|
|
1280
1294
|
}
|
|
1281
1295
|
|
|
1282
|
-
if (this.hovered === null) return;
|
|
1283
|
-
|
|
1284
1296
|
if (this.confirmKeys.indexOf(key) >= 0) {
|
|
1285
1297
|
// If adding by comma, don't add the comma to the input
|
|
1286
1298
|
if (key === ',') event.preventDefault(); // Close dropdown on select by Tab
|
|
1287
1299
|
|
|
1288
1300
|
var closeDropdown = !this.keepOpen || key === 'Tab';
|
|
1301
|
+
|
|
1302
|
+
if (this.hovered === null) {
|
|
1303
|
+
// header and footer uses headerHovered && footerHovered. If header or footer
|
|
1304
|
+
// was selected then fire event otherwise just return so a value isn't selected
|
|
1305
|
+
this.checkIfHeaderOrFooterSelected(event, null, closeDropdown);
|
|
1306
|
+
return;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1289
1309
|
this.setSelected(this.hovered, closeDropdown, event);
|
|
1290
1310
|
}
|
|
1291
1311
|
},
|
|
1312
|
+
selectHeaderOrFoterByClick: function selectHeaderOrFoterByClick(event, origin) {
|
|
1313
|
+
this.checkIfHeaderOrFooterSelected(event, {
|
|
1314
|
+
origin: origin
|
|
1315
|
+
});
|
|
1316
|
+
},
|
|
1317
|
+
|
|
1318
|
+
/**
|
|
1319
|
+
* Check if header or footer was selected.
|
|
1320
|
+
*/
|
|
1321
|
+
checkIfHeaderOrFooterSelected: function checkIfHeaderOrFooterSelected(event, triggerClick) {
|
|
1322
|
+
var closeDropdown = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
1323
|
+
|
|
1324
|
+
if (this.selectableHeader && (this.headerHovered || triggerClick && triggerClick.origin === 'header')) {
|
|
1325
|
+
this.$emit('select-header', event);
|
|
1326
|
+
this.headerHovered = false;
|
|
1327
|
+
if (triggerClick) this.setHovered(null);
|
|
1328
|
+
if (closeDropdown) this.isActive = false;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
if (this.selectableFooter && (this.footerHovered || triggerClick && triggerClick.origin === 'footer')) {
|
|
1332
|
+
this.$emit('select-footer', event);
|
|
1333
|
+
this.footerHovered = false;
|
|
1334
|
+
if (triggerClick) this.setHovered(null);
|
|
1335
|
+
if (closeDropdown) this.isActive = false;
|
|
1336
|
+
}
|
|
1337
|
+
},
|
|
1292
1338
|
|
|
1293
1339
|
/**
|
|
1294
1340
|
* Close dropdown if clicked outside.
|
|
@@ -1366,12 +1412,51 @@
|
|
|
1366
1412
|
}).reduce(function (a, b) {
|
|
1367
1413
|
return [].concat(_toConsumableArray(a), _toConsumableArray(b));
|
|
1368
1414
|
}, []);
|
|
1369
|
-
|
|
1415
|
+
|
|
1416
|
+
if (this.hasHeaderSlot && this.selectableHeader) {
|
|
1417
|
+
data.unshift(undefined);
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
if (this.hasFooterSlot && this.selectableFooter) {
|
|
1421
|
+
data.push(undefined);
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
var index;
|
|
1425
|
+
|
|
1426
|
+
if (this.headerHovered) {
|
|
1427
|
+
index = 0 + sum;
|
|
1428
|
+
} else if (this.footerHovered) {
|
|
1429
|
+
index = data.length - 1 + sum;
|
|
1430
|
+
} else {
|
|
1431
|
+
index = data.indexOf(this.hovered) + sum;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1370
1434
|
index = index > data.length - 1 ? data.length - 1 : index;
|
|
1371
1435
|
index = index < 0 ? 0 : index;
|
|
1372
|
-
this.
|
|
1436
|
+
this.footerHovered = false;
|
|
1437
|
+
this.headerHovered = false;
|
|
1438
|
+
this.setHovered(data[index] !== undefined ? data[index] : null);
|
|
1439
|
+
|
|
1440
|
+
if (this.hasFooterSlot && this.selectableFooter && index === data.length - 1) {
|
|
1441
|
+
this.footerHovered = true;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
if (this.hasHeaderSlot && this.selectableHeader && index === 0) {
|
|
1445
|
+
this.headerHovered = true;
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1373
1448
|
var list = this.$refs.dropdown.querySelector('.dropdown-content');
|
|
1374
|
-
var
|
|
1449
|
+
var querySelectorText = 'a.dropdown-item:not(.is-disabled)';
|
|
1450
|
+
|
|
1451
|
+
if (this.hasHeaderSlot && this.selectableHeader) {
|
|
1452
|
+
querySelectorText += ',div.dropdown-header';
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
if (this.hasFooterSlot && this.selectableFooter) {
|
|
1456
|
+
querySelectorText += ',div.dropdown-footer';
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
var element = list.querySelectorAll(querySelectorText)[index];
|
|
1375
1460
|
if (!element) return;
|
|
1376
1461
|
var visMin = list.scrollTop;
|
|
1377
1462
|
var visMax = list.scrollTop + list.clientHeight - element.clientHeight;
|
|
@@ -1415,7 +1500,7 @@
|
|
|
1415
1500
|
this.hasFocus = false;
|
|
1416
1501
|
this.$emit('blur', event);
|
|
1417
1502
|
},
|
|
1418
|
-
onInput: function onInput(
|
|
1503
|
+
onInput: function onInput() {
|
|
1419
1504
|
var currentValue = this.getValue(this.selected);
|
|
1420
1505
|
if (currentValue && currentValue === this.newValue) return;
|
|
1421
1506
|
this.$emit('typing', this.newValue);
|
|
@@ -1528,7 +1613,7 @@
|
|
|
1528
1613
|
const __vue_script__$2 = script$2;
|
|
1529
1614
|
|
|
1530
1615
|
/* template */
|
|
1531
|
-
var __vue_render__$2 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"autocomplete control",class:{ 'is-expanded': _vm.expanded }},[_c('b-input',_vm._b({ref:"input",attrs:{"type":_vm.type,"size":_vm.size,"loading":_vm.loading,"rounded":_vm.rounded,"icon":_vm.icon,"icon-right":_vm.newIconRight,"icon-right-clickable":_vm.newIconRightClickable,"icon-pack":_vm.iconPack,"maxlength":_vm.maxlength,"autocomplete":_vm.newAutocomplete,"use-html5-validation":false,"aria-autocomplete":_vm.ariaAutocomplete},on:{"input":_vm.onInput,"focus":_vm.focused,"blur":_vm.onBlur,"icon-right-click":_vm.rightIconClick,"icon-click":function (event) { return _vm.$emit('icon-click', event); }},nativeOn:{"keydown":[function($event){return _vm.keydown($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }$event.preventDefault();return _vm.keyArrows('up')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }$event.preventDefault();return _vm.keyArrows('down')}]},model:{value:(_vm.newValue),callback:function ($$v) {_vm.newValue=$$v;},expression:"newValue"}},'b-input',_vm.$attrs,false)),_c('transition',{attrs:{"name":"fade"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive && (!_vm.isEmpty || _vm.hasEmptySlot || _vm.hasHeaderSlot)),expression:"isActive && (!isEmpty || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{ 'is-opened-top': _vm.isOpenedTop && !_vm.appendToBody },style:(_vm.style)},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"dropdown-content",style:(_vm.contentStyle)},[(_vm.hasHeaderSlot)?_c('div',{staticClass:"dropdown-item"},[_vm._t("header")],2):_vm._e(),_vm._l((_vm.computedData),function(element,groupindex){return [(element.group)?_c('div',{key:groupindex + 'group',staticClass:"dropdown-item"},[(_vm.hasGroupSlot)?_vm._t("group",null,{"group":element.group,"index":groupindex}):_c('span',{staticClass:"has-text-weight-bold"},[_vm._v(" "+_vm._s(element.group)+" ")])],2):_vm._e(),_vm._l((element.items),function(option,index){return _c('a',{key:groupindex + ':' + index,staticClass:"dropdown-item",class:{ 'is-hovered': option === _vm.hovered },attrs:{"role":"button","tabindex":"0"},on:{"click":function($event){return _vm.setSelected(option,
|
|
1616
|
+
var __vue_render__$2 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"autocomplete control",class:{ 'is-expanded': _vm.expanded }},[_c('b-input',_vm._b({ref:"input",attrs:{"type":_vm.type,"size":_vm.size,"loading":_vm.loading,"rounded":_vm.rounded,"icon":_vm.icon,"icon-right":_vm.newIconRight,"icon-right-clickable":_vm.newIconRightClickable,"icon-pack":_vm.iconPack,"maxlength":_vm.maxlength,"autocomplete":_vm.newAutocomplete,"use-html5-validation":false,"aria-autocomplete":_vm.ariaAutocomplete},on:{"input":_vm.onInput,"focus":_vm.focused,"blur":_vm.onBlur,"icon-right-click":_vm.rightIconClick,"icon-click":function (event) { return _vm.$emit('icon-click', event); }},nativeOn:{"keydown":[function($event){return _vm.keydown($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }$event.preventDefault();return _vm.keyArrows('up')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }$event.preventDefault();return _vm.keyArrows('down')}]},model:{value:(_vm.newValue),callback:function ($$v) {_vm.newValue=$$v;},expression:"newValue"}},'b-input',_vm.$attrs,false)),_c('transition',{attrs:{"name":"fade"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive && (!_vm.isEmpty || _vm.hasEmptySlot || _vm.hasHeaderSlot)),expression:"isActive && (!isEmpty || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{ 'is-opened-top': _vm.isOpenedTop && !_vm.appendToBody },style:(_vm.style)},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"dropdown-content",style:(_vm.contentStyle)},[(_vm.hasHeaderSlot)?_c('div',{staticClass:"dropdown-item dropdown-header",class:{ 'is-hovered': _vm.headerHovered },attrs:{"role":"button","tabindex":"0"},on:{"click":function($event){return _vm.selectHeaderOrFoterByClick($event, 'header')}}},[_vm._t("header")],2):_vm._e(),_vm._l((_vm.computedData),function(element,groupindex){return [(element.group)?_c('div',{key:groupindex + 'group',staticClass:"dropdown-item"},[(_vm.hasGroupSlot)?_vm._t("group",null,{"group":element.group,"index":groupindex}):_c('span',{staticClass:"has-text-weight-bold"},[_vm._v(" "+_vm._s(element.group)+" ")])],2):_vm._e(),_vm._l((element.items),function(option,index){return _c('a',{key:groupindex + ':' + index,staticClass:"dropdown-item",class:{ 'is-hovered': option === _vm.hovered },attrs:{"role":"button","tabindex":"0"},on:{"click":function($event){$event.stopPropagation();return _vm.setSelected(option, !_vm.keepOpen, $event)}}},[(_vm.hasDefaultSlot)?_vm._t("default",null,{"option":option,"index":index}):_c('span',[_vm._v(" "+_vm._s(_vm.getValue(option, true))+" ")])],2)})]}),(_vm.isEmpty && _vm.hasEmptySlot)?_c('div',{staticClass:"dropdown-item is-disabled"},[_vm._t("empty")],2):_vm._e(),(_vm.hasFooterSlot)?_c('div',{staticClass:"dropdown-item dropdown-footer",class:{ 'is-hovered': _vm.footerHovered },attrs:{"role":"button","tabindex":"0"},on:{"click":function($event){return _vm.selectHeaderOrFoterByClick($event, 'footer')}}},[_vm._t("footer")],2):_vm._e()],2)])])],1)};
|
|
1532
1617
|
var __vue_staticRenderFns__$2 = [];
|
|
1533
1618
|
|
|
1534
1619
|
/* style */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Buefy v0.9.
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).Autocomplete={})}(this,function(t){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function n(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach(function(e){i(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function s(t){return function(t){if(Array.isArray(t))return t}(t)||r(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||r(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function r(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function l(t,e){return e.split(".").reduce(function(t,e){return t?t[e]:null},t)}var c=function(t){return"object"===e(t)&&!Array.isArray(t)},u=function t(e,n){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(s||!Object.assign){var a=Object.getOwnPropertyNames(n).map(function(o){return i({},o,function(t){return c(n[t])&&null!==e&&e.hasOwnProperty(t)&&c(e[t])}(o)?t(e[o],n[o],s):n[o])}).reduce(function(t,e){return o({},t,{},e)},{});return o({},e,{},a)}return Object.assign(e,n)};var d={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultIconPrev:"chevron-left",defaultIconNext:"chevron-right",defaultLocale:void 0,defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultSnackbarPosition:null,defaultToastDuration:2e3,defaultToastPosition:null,defaultNotificationDuration:2e3,defaultNotificationPosition:null,defaultTooltipType:"is-primary",defaultTooltipDelay:null,defaultSidebarDelay:null,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultTimeCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:["escape","x","outside","button"],defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultTaginputHasCounter:!0,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerYearsRange:[-100,10],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1,defaultDatepickerShowWeekNumber:!1,defaultDatepickerWeekNumberClickable:!1,defaultDatepickerMobileModal:!0,defaultTrapFocus:!0,defaultAutoFocus:!0,defaultButtonRounded:!1,defaultSwitchRounded:!0,defaultCarouselInterval:3500,defaultTabsExpanded:!1,defaultTabsAnimated:!0,defaultTabsType:null,defaultStatusIcon:!0,defaultProgrammaticPromise:!1,defaultLinkTags:["a","button","input","router-link","nuxt-link","n-link","RouterLink","NuxtLink","NLink"],defaultImageWebpFallback:null,defaultImageLazy:!0,defaultImageResponsive:!0,defaultImageRatio:null,defaultImageSrcsetFormatter:null,customIconPacks:null},h={props:{size:String,expanded:Boolean,loading:Boolean,rounded:Boolean,icon:String,iconPack:String,autocomplete:String,maxlength:[Number,String],useHtml5Validation:{type:Boolean,default:function(){return d.defaultUseHtml5Validation}},validationMessage:String,locale:{type:[String,Array],default:function(){return d.defaultLocale}},statusIcon:{type:Boolean,default:function(){return d.defaultStatusIcon}}},data:function(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||d.defaultIconPack}},computed:{parentField:function(){for(var t=this.$parent,e=0;e<3;e++)t&&!t.$data._isField&&(t=t.$parent);return t},statusType:function(){var t=(this.parentField||{}).newType;if(t){if("string"==typeof t)return t;for(var e in t)if(t[e])return e}},statusMessage:function(){if(this.parentField)return this.parentField.newMessage||this.parentField.$slots.message},iconSize:function(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus:function(){var t=this.getElement();void 0!==t&&this.$nextTick(function(){t&&t.focus()})},onBlur:function(t){this.isFocused=!1,this.$emit("blur",t),this.checkHtml5Validity()},onFocus:function(t){this.isFocused=!0,this.$emit("focus",t),this.checkHtml5Validity()},getElement:function(){for(var t,e=this.$refs[this.$data._elementRef];(t=e)&&t._isVue;)e=e.$refs[e.$data._elementRef];return e},setInvalid:function(){var t=this.validationMessage||this.getElement().validationMessage;this.setValidity("is-danger",t)},setValidity:function(t,e){var i=this;this.$nextTick(function(){i.parentField&&(i.parentField.type||(i.parentField.newType=t),i.parentField.message||(i.parentField.newMessage=e))})},checkHtml5Validity:function(){if(this.useHtml5Validation){var t=this.getElement();if(void 0!==t)return t.checkValidity()?(this.setValidity(null,null),this.isValid=!0):(this.setInvalid(),this.isValid=!1),this.isValid}}}},f={sizes:{default:"mdi-24px","is-small":null,"is-medium":"mdi-36px","is-large":"mdi-48px"},iconPrefix:"mdi-"},p=function(){var t=d&&d.defaultIconComponent?"":"fa-";return{sizes:{default:null,"is-small":null,"is-medium":t+"lg","is-large":t+"2x"},iconPrefix:t,internalIcons:{information:"info-circle",alert:"exclamation-triangle","alert-circle":"exclamation-circle","chevron-right":"angle-right","chevron-left":"angle-left","chevron-down":"angle-down","eye-off":"eye-slash","menu-down":"caret-down","menu-up":"caret-up","close-circle":"times-circle"}}};var m=function(t,e,i,n,o,s,a,r,l,c){"boolean"!=typeof a&&(l=r,r=a,a=!1);var u,d="function"==typeof i?i.options:i;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),n&&(d._scopeId=n),s?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(s)},d._ssrRegister=u):e&&(u=a?function(){e.call(this,c(this.$root.$options.shadowRoot))}:function(t){e.call(this,r(t))}),u)if(d.functional){var h=d.render;d.render=function(t,e){return u.call(e),h(t,e)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,u):[u]}return i};var v=m({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span",{staticClass:"icon",class:[t.newType,t.size]},[t.useIconComponent?i(t.useIconComponent,{tag:"component",class:[t.customClass],attrs:{icon:[t.newPack,t.newIcon],size:t.newCustomSize}}):i("i",{class:[t.newPack,t.newIcon,t.newCustomSize,t.customClass]})],1)},staticRenderFns:[]},void 0,{name:"BIcon",props:{type:[String,Object],component:String,pack:String,icon:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{iconConfig:function(){var t;return(t={mdi:f,fa:p(),fas:p(),far:p(),fad:p(),fab:p(),fal:p()},d&&d.customIconPacks&&(t=u(t,d.customIconPacks,!0)),t)[this.newPack]},iconPrefix:function(){return this.iconConfig&&this.iconConfig.iconPrefix?this.iconConfig.iconPrefix:""},newIcon:function(){return"".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon))},newPack:function(){return this.pack||d.defaultIconPack},newType:function(){if(this.type){var t=[];if("string"==typeof this.type)t=this.type.split("-");else for(var e in this.type)if(this.type[e]){t=e.split("-");break}if(!(t.length<=1)){var i=s(t).slice(1);return"has-text-".concat(i.join("-"))}}},newCustomSize:function(){return this.customSize||this.customSizeByPack},customSizeByPack:function(){if(this.iconConfig&&this.iconConfig.sizes){if(this.size&&void 0!==this.iconConfig.sizes[this.size])return this.iconConfig.sizes[this.size];if(this.iconConfig.sizes.default)return this.iconConfig.sizes.default}return null},useIconComponent:function(){return this.component||d.defaultIconComponent}},methods:{getEquivalentIconOf:function(t){return this.both&&this.iconConfig&&this.iconConfig.internalIcons&&this.iconConfig.internalIcons[t]?this.iconConfig.internalIcons[t]:t}}},void 0,!1,void 0,void 0,void 0);var g=m({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"control",class:t.rootClasses},["textarea"!==t.type?i("input",t._b({ref:"input",staticClass:"input",class:[t.inputClasses,t.customClass],attrs:{type:t.newType,autocomplete:t.newAutocomplete,maxlength:t.maxlength},domProps:{value:t.computedValue},on:{input:t.onInput,change:t.onChange,blur:t.onBlur,focus:t.onFocus}},"input",t.$attrs,!1)):i("textarea",t._b({ref:"textarea",staticClass:"textarea",class:[t.inputClasses,t.customClass],attrs:{maxlength:t.maxlength},domProps:{value:t.computedValue},on:{input:t.onInput,change:t.onChange,blur:t.onBlur,focus:t.onFocus}},"textarea",t.$attrs,!1)),t.icon?i("b-icon",{staticClass:"is-left",class:{"is-clickable":t.iconClickable},attrs:{icon:t.icon,pack:t.iconPack,size:t.iconSize},nativeOn:{click:function(e){return t.iconClick("icon-click",e)}}}):t._e(),!t.loading&&t.hasIconRight?i("b-icon",{staticClass:"is-right",class:{"is-clickable":t.passwordReveal||t.iconRightClickable},attrs:{icon:t.rightIcon,pack:t.iconPack,size:t.iconSize,type:t.rightIconType,both:""},nativeOn:{click:function(e){return t.rightIconClick(e)}}}):t._e(),t.maxlength&&t.hasCounter&&"number"!==t.type?i("small",{staticClass:"help counter",class:{"is-invisible":!t.isFocused}},[t._v(" "+t._s(t.valueLength)+" / "+t._s(t.maxlength)+" ")]):t._e()],1)},staticRenderFns:[]},void 0,{name:"BInput",components:i({},v.name,v),mixins:[h],inheritAttrs:!1,props:{value:[Number,String],type:{type:String,default:"text"},lazy:{type:Boolean,default:!1},passwordReveal:Boolean,iconClickable:Boolean,hasCounter:{type:Boolean,default:function(){return d.defaultInputHasCounter}},customClass:{type:String,default:""},iconRight:String,iconRightClickable:Boolean,iconRightType:String},data:function(){return{newValue:this.value,newType:this.type,newAutocomplete:this.autocomplete||d.defaultInputAutocomplete,isPasswordVisible:!1,_elementRef:"textarea"===this.type?"textarea":"input"}},computed:{computedValue:{get:function(){return this.newValue},set:function(t){this.newValue=t,this.$emit("input",t)}},rootClasses:function(){return[this.iconPosition,this.size,{"is-expanded":this.expanded,"is-loading":this.loading,"is-clearfix":!this.hasMessage}]},inputClasses:function(){return[this.statusType,this.size,{"is-rounded":this.rounded}]},hasIconRight:function(){return this.passwordReveal||this.loading||this.statusIcon&&this.statusTypeIcon||this.iconRight},rightIcon:function(){return this.passwordReveal?this.passwordVisibleIcon:this.iconRight?this.iconRight:this.statusTypeIcon},rightIconType:function(){return this.passwordReveal?"is-primary":this.iconRight?this.iconRightType||null:this.statusType},iconPosition:function(){var t="";return this.icon&&(t+="has-icons-left "),this.hasIconRight&&(t+="has-icons-right"),t},statusTypeIcon:function(){switch(this.statusType){case"is-success":return"check";case"is-danger":return"alert-circle";case"is-info":return"information";case"is-warning":return"alert"}},hasMessage:function(){return!!this.statusMessage},passwordVisibleIcon:function(){return this.isPasswordVisible?"eye-off":"eye"},valueLength:function(){return"string"==typeof this.computedValue?this.computedValue.length:"number"==typeof this.computedValue?this.computedValue.toString().length:0}},watch:{value:function(t){this.newValue=t}},methods:{togglePasswordVisibility:function(){var t=this;this.isPasswordVisible=!this.isPasswordVisible,this.newType=this.isPasswordVisible?"text":"password",this.$nextTick(function(){t.focus()})},iconClick:function(t,e){var i=this;this.$emit(t,e),this.$nextTick(function(){i.focus()})},rightIconClick:function(t){this.passwordReveal?this.togglePasswordVisibility():this.iconRightClickable&&this.iconClick("icon-right-click",t)},onInput:function(t){if(!this.lazy){var e=t.target.value;this.updateValue(e)}},onChange:function(t){if(this.lazy){var e=t.target.value;this.updateValue(e)}},updateValue:function(t){this.computedValue=t,!this.isValid&&this.checkHtml5Validity()}}},void 0,!1,void 0,void 0,void 0);var y,w=m({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"autocomplete control",class:{"is-expanded":t.expanded}},[i("b-input",t._b({ref:"input",attrs:{type:t.type,size:t.size,loading:t.loading,rounded:t.rounded,icon:t.icon,"icon-right":t.newIconRight,"icon-right-clickable":t.newIconRightClickable,"icon-pack":t.iconPack,maxlength:t.maxlength,autocomplete:t.newAutocomplete,"use-html5-validation":!1,"aria-autocomplete":t.ariaAutocomplete},on:{input:t.onInput,focus:t.focused,blur:t.onBlur,"icon-right-click":t.rightIconClick,"icon-click":function(e){return t.$emit("icon-click",e)}},nativeOn:{keydown:[function(e){return t.keydown(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.keyArrows("up"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.keyArrows("down"))}]},model:{value:t.newValue,callback:function(e){t.newValue=e},expression:"newValue"}},"b-input",t.$attrs,!1)),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive&&(!t.isEmpty||t.hasEmptySlot||t.hasHeaderSlot),expression:"isActive && (!isEmpty || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{"is-opened-top":t.isOpenedTop&&!t.appendToBody},style:t.style},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"dropdown-content",style:t.contentStyle},[t.hasHeaderSlot?i("div",{staticClass:"dropdown-item"},[t._t("header")],2):t._e(),t._l(t.computedData,function(e,n){return[e.group?i("div",{key:n+"group",staticClass:"dropdown-item"},[t.hasGroupSlot?t._t("group",null,{group:e.group,index:n}):i("span",{staticClass:"has-text-weight-bold"},[t._v(" "+t._s(e.group)+" ")])],2):t._e(),t._l(e.items,function(e,o){return i("a",{key:n+":"+o,staticClass:"dropdown-item",class:{"is-hovered":e===t.hovered},attrs:{role:"button",tabindex:"0"},on:{click:function(i){return t.setSelected(e,void 0,i)}}},[t.hasDefaultSlot?t._t("default",null,{option:e,index:o}):i("span",[t._v(" "+t._s(t.getValue(e,!0))+" ")])],2)})]}),t.isEmpty&&t.hasEmptySlot?i("div",{staticClass:"dropdown-item is-disabled"},[t._t("empty")],2):t._e(),t.hasFooterSlot?i("div",{staticClass:"dropdown-item"},[t._t("footer")],2):t._e()],2)])])],1)},staticRenderFns:[]},void 0,{name:"BAutocomplete",components:i({},g.name,g),mixins:[h],inheritAttrs:!1,props:{value:[Number,String],data:{type:Array,default:function(){return[]}},field:{type:String,default:"value"},keepFirst:Boolean,clearOnSelect:Boolean,openOnFocus:Boolean,customFormatter:Function,checkInfiniteScroll:Boolean,keepOpen:Boolean,selectOnClickOutside:Boolean,clearable:Boolean,maxHeight:[String,Number],dropdownPosition:{type:String,default:"auto"},groupField:String,groupOptions:String,iconRight:String,iconRightClickable:Boolean,appendToBody:Boolean,type:{type:String,default:"text"},confirmKeys:{type:Array,default:function(){return["Tab","Enter"]}}},data:function(){return{selected:null,hovered:null,isActive:!1,newValue:this.value,newAutocomplete:this.autocomplete||"off",ariaAutocomplete:this.keepFirst?"both":"list",isListInViewportVertically:!0,hasFocus:!1,style:{},_isAutocomplete:!0,_elementRef:"input",_bodyEl:void 0}},computed:{computedData:function(){var t=this;if(this.groupField){if(this.groupOptions){var e=[];return this.data.forEach(function(i){var n=l(i,t.groupField),o=l(i,t.groupOptions);e.push({group:n,items:o})}),e}var i={};this.data.forEach(function(e){var n=l(e,t.groupField);i[n]||(i[n]=[]),i[n].push(e)});var n=[];return Object.keys(i).forEach(function(t){n.push({group:t,items:i[t]})}),n}return[{items:this.data}]},isEmpty:function(){return!this.computedData||!this.computedData.some(function(t){return t.items&&t.items.length})},whiteList:function(){var t=[];if(t.push(this.$refs.input.$el.querySelector("input")),t.push(this.$refs.dropdown),void 0!==this.$refs.dropdown){var e=this.$refs.dropdown.querySelectorAll("*"),i=!0,n=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done);i=!0){var r=s.value;t.push(r)}}catch(t){n=!0,o=t}finally{try{i||null==a.return||a.return()}finally{if(n)throw o}}}if(this.$parent.$data._isTaginput){t.push(this.$parent.$el);var l=this.$parent.$el.querySelectorAll("*"),c=!0,u=!1,d=void 0;try{for(var h,f=l[Symbol.iterator]();!(c=(h=f.next()).done);c=!0){var p=h.value;t.push(p)}}catch(t){u=!0,d=t}finally{try{c||null==f.return||f.return()}finally{if(u)throw d}}}return t},hasDefaultSlot:function(){return!!this.$scopedSlots.default},hasGroupSlot:function(){return!!this.$scopedSlots.group},hasEmptySlot:function(){return!!this.$slots.empty},hasHeaderSlot:function(){return!!this.$slots.header},hasFooterSlot:function(){return!!this.$slots.footer},isOpenedTop:function(){return"top"===this.dropdownPosition||"auto"===this.dropdownPosition&&!this.isListInViewportVertically},newIconRight:function(){return this.clearable&&this.newValue?"close-circle":this.iconRight},newIconRightClickable:function(){return!!this.clearable||this.iconRightClickable},contentStyle:function(){return{maxHeight:(t=this.maxHeight,void 0===t?null:isNaN(t)?t:t+"px")};var t}},watch:{isActive:function(t){var e=this;"auto"===this.dropdownPosition&&(t?this.calcDropdownInViewportVertical():setTimeout(function(){e.calcDropdownInViewportVertical()},100))},newValue:function(t){this.$emit("input",t);var e=this.getValue(this.selected);(null==e||e&&e!==t)&&this.setSelected(null,!1),!this.hasFocus||this.openOnFocus&&!t||(this.isActive=!!t)},value:function(t){this.newValue=t},data:function(){var t=this;this.keepFirst&&this.$nextTick(function(){t.isActive?t.selectFirstOption(t.computedData):t.setHovered(null)})}},methods:{setHovered:function(t){void 0!==t&&(this.hovered=t)},setSelected:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==t&&(this.selected=t,this.$emit("select",this.selected,n),null!==this.selected&&(this.newValue=this.clearOnSelect?"":this.getValue(this.selected),this.setHovered(null)),i&&this.$nextTick(function(){e.isActive=!1}),this.checkValidity())},selectFirstOption:function(t){var e=this;this.$nextTick(function(){var i=t.filter(function(t){return t.items&&t.items.length});if(i.length){var n=i[0].items[0];e.setHovered(n)}else e.setHovered(null)})},keydown:function(t){var e=t.key;if("Enter"===e&&t.preventDefault(),"Escape"!==e&&"Tab"!==e||(t.preventDefault(),this.isActive=!1),null!==this.hovered&&this.confirmKeys.indexOf(e)>=0){","===e&&t.preventDefault();var i=!this.keepOpen||"Tab"===e;this.setSelected(this.hovered,i,t)}},clickedOutside:function(t){var e="shadowRoot"in this.$root.$options?t.composedPath()[0]:t.target;!this.hasFocus&&this.whiteList.indexOf(e)<0&&(this.keepFirst&&this.hovered&&this.selectOnClickOutside?this.setSelected(this.hovered,!0):this.isActive=!1)},getValue:function(t){if(null!==t)return void 0!==this.customFormatter?this.customFormatter(t):"object"===e(t)?l(t,this.field):t},checkIfReachedTheEndOfScroll:function(t){t.clientHeight!==t.scrollHeight&&t.scrollTop+t.clientHeight>=t.scrollHeight&&this.$emit("infinite-scroll")},calcDropdownInViewportVertical:function(){var t=this;this.$nextTick(function(){if(void 0!==t.$refs.dropdown){var e=t.$refs.dropdown.getBoundingClientRect();t.isListInViewportVertically=e.top>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight),t.appendToBody&&t.updateAppendToBody()}})},keyArrows:function(t){var e="down"===t?1:-1;if(this.isActive){var i=this.computedData.map(function(t){return t.items}).reduce(function(t,e){return[].concat(a(t),a(e))},[]),n=i.indexOf(this.hovered)+e;n=(n=n>i.length-1?i.length-1:n)<0?0:n,this.setHovered(i[n]);var o=this.$refs.dropdown.querySelector(".dropdown-content"),s=o.querySelectorAll("a.dropdown-item:not(.is-disabled)")[n];if(!s)return;var r=o.scrollTop,l=o.scrollTop+o.clientHeight-s.clientHeight;s.offsetTop<r?o.scrollTop=s.offsetTop:s.offsetTop>=l&&(o.scrollTop=s.offsetTop-o.clientHeight+s.clientHeight)}else this.isActive=!0},focused:function(t){this.getValue(this.selected)===this.newValue&&this.$el.querySelector("input").select(),this.openOnFocus&&(this.isActive=!0,this.keepFirst&&this.selectFirstOption(this.computedData)),this.hasFocus=!0,this.$emit("focus",t)},onBlur:function(t){this.hasFocus=!1,this.$emit("blur",t)},onInput:function(t){var e=this.getValue(this.selected);e&&e===this.newValue||(this.$emit("typing",this.newValue),this.checkValidity())},rightIconClick:function(t){this.clearable?(this.newValue="",this.setSelected(null,!1),this.openOnFocus&&this.$refs.input.$el.focus()):this.$emit("icon-right-click",t)},checkValidity:function(){var t=this;this.useHtml5Validation&&this.$nextTick(function(){t.checkHtml5Validity()})},updateAppendToBody:function(){var t=this.$refs.dropdown,e=this.$refs.input.$el;if(t&&e){var i=this.$data._bodyEl;i.classList.forEach(function(t){return i.classList.remove(t)}),i.classList.add("autocomplete"),i.classList.add("control"),this.expandend&&i.classList.add("is-expandend");var n=e.getBoundingClientRect(),o=n.top+window.scrollY,s=n.left+window.scrollX;this.isOpenedTop?o-=t.clientHeight:o+=e.clientHeight,this.style={position:"absolute",top:"".concat(o,"px"),left:"".concat(s,"px"),width:"".concat(e.clientWidth,"px"),maxWidth:"".concat(e.clientWidth,"px"),zIndex:"99"}}}},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),"auto"===this.dropdownPosition&&window.addEventListener("resize",this.calcDropdownInViewportVertical))},mounted:function(){var t=this;if(this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content")){var e=this.$refs.dropdown.querySelector(".dropdown-content");e.addEventListener("scroll",function(){return t.checkIfReachedTheEndOfScroll(e)})}this.appendToBody&&(this.$data._bodyEl=function(t){var e=document.createElement("div");e.style.position="absolute",e.style.left="0px",e.style.top="0px",e.style.width="100%";var i=document.createElement("div");return e.appendChild(i),i.appendChild(t),document.body.appendChild(e),e}(this.$refs.dropdown),this.updateAppendToBody())},beforeDestroy:function(){var t;("undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),"auto"===this.dropdownPosition&&window.removeEventListener("resize",this.calcDropdownInViewportVertical)),this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content"))&&this.$refs.dropdown.querySelector(".dropdown-content").removeEventListener("scroll",this.checkIfReachedTheEndOfScroll);this.appendToBody&&(void 0!==(t=this.$data._bodyEl).remove?t.remove():void 0!==t.parentNode&&null!==t.parentNode&&t.parentNode.removeChild(t))}},void 0,!1,void 0,void 0,void 0),b={install:function(t){!function(t,e){t.component(e.name,e)}(t,w)}};y=b,"undefined"!=typeof window&&window.Vue&&window.Vue.use(y),t.BAutocomplete=w,t.default=b,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
1
|
+
/*! Buefy v0.9.13 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Autocomplete={})}(this,function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function n(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach(function(t){i(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function s(e){return function(e){if(Array.isArray(e))return e}(e)||a(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function r(e){return function(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t<e.length;t++)i[t]=e[t];return i}}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function l(e,t){return t.split(".").reduce(function(e,t){return e?e[t]:null},e)}var c=function(e){return"object"===t(e)&&!Array.isArray(e)},u=function e(t,n){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(s||!Object.assign){var r=Object.getOwnPropertyNames(n).map(function(o){return i({},o,function(e){return c(n[e])&&null!==t&&t.hasOwnProperty(e)&&c(t[e])}(o)?e(t[o],n[o],s):n[o])}).reduce(function(e,t){return o({},e,{},t)},{});return o({},t,{},r)}return Object.assign(t,n)};var d={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultIconPrev:"chevron-left",defaultIconNext:"chevron-right",defaultLocale:void 0,defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultSnackbarPosition:null,defaultToastDuration:2e3,defaultToastPosition:null,defaultNotificationDuration:2e3,defaultNotificationPosition:null,defaultTooltipType:"is-primary",defaultTooltipDelay:null,defaultSidebarDelay:null,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultTimeCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:["escape","x","outside","button"],defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultTaginputHasCounter:!0,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerYearsRange:[-100,10],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1,defaultDatepickerShowWeekNumber:!1,defaultDatepickerWeekNumberClickable:!1,defaultDatepickerMobileModal:!0,defaultTrapFocus:!0,defaultAutoFocus:!0,defaultButtonRounded:!1,defaultSwitchRounded:!0,defaultCarouselInterval:3500,defaultTabsExpanded:!1,defaultTabsAnimated:!0,defaultTabsType:null,defaultStatusIcon:!0,defaultProgrammaticPromise:!1,defaultLinkTags:["a","button","input","router-link","nuxt-link","n-link","RouterLink","NuxtLink","NLink"],defaultImageWebpFallback:null,defaultImageLazy:!0,defaultImageResponsive:!0,defaultImageRatio:null,defaultImageSrcsetFormatter:null,defaultBreadcrumbTag:"a",defaultBreadcrumbAlign:"is-left",defaultBreadcrumbSeparator:"",defaultBreadcrumbSize:"is-medium",customIconPacks:null},h={props:{size:String,expanded:Boolean,loading:Boolean,rounded:Boolean,icon:String,iconPack:String,autocomplete:String,maxlength:[Number,String],useHtml5Validation:{type:Boolean,default:function(){return d.defaultUseHtml5Validation}},validationMessage:String,locale:{type:[String,Array],default:function(){return d.defaultLocale}},statusIcon:{type:Boolean,default:function(){return d.defaultStatusIcon}}},data:function(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||d.defaultIconPack}},computed:{parentField:function(){for(var e=this.$parent,t=0;t<3;t++)e&&!e.$data._isField&&(e=e.$parent);return e},statusType:function(){var e=(this.parentField||{}).newType;if(e){if("string"==typeof e)return e;for(var t in e)if(e[t])return t}},statusMessage:function(){if(this.parentField)return this.parentField.newMessage||this.parentField.$slots.message},iconSize:function(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus:function(){var e=this.getElement();void 0!==e&&this.$nextTick(function(){e&&e.focus()})},onBlur:function(e){this.isFocused=!1,this.$emit("blur",e),this.checkHtml5Validity()},onFocus:function(e){this.isFocused=!0,this.$emit("focus",e),this.checkHtml5Validity()},getElement:function(){for(var e,t=this.$refs[this.$data._elementRef];(e=t)&&e._isVue;)t=t.$refs[t.$data._elementRef];return t},setInvalid:function(){var e=this.validationMessage||this.getElement().validationMessage;this.setValidity("is-danger",e)},setValidity:function(e,t){var i=this;this.$nextTick(function(){i.parentField&&(i.parentField.type||(i.parentField.newType=e),i.parentField.message||(i.parentField.newMessage=t))})},checkHtml5Validity:function(){if(this.useHtml5Validation){var e=this.getElement();if(void 0!==e)return e.checkValidity()?(this.setValidity(null,null),this.isValid=!0):(this.setInvalid(),this.isValid=!1),this.isValid}}}},f={sizes:{default:"mdi-24px","is-small":null,"is-medium":"mdi-36px","is-large":"mdi-48px"},iconPrefix:"mdi-"},p=function(){var e=d&&d.defaultIconComponent?"":"fa-";return{sizes:{default:null,"is-small":null,"is-medium":e+"lg","is-large":e+"2x"},iconPrefix:e,internalIcons:{information:"info-circle",alert:"exclamation-triangle","alert-circle":"exclamation-circle","chevron-right":"angle-right","chevron-left":"angle-left","chevron-down":"angle-down","eye-off":"eye-slash","menu-down":"caret-down","menu-up":"caret-up","close-circle":"times-circle"}}};var m=function(e,t,i,n,o,s,r,a,l,c){"boolean"!=typeof r&&(l=a,a=r,r=!1);var u,d="function"==typeof i?i.options:i;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),n&&(d._scopeId=n),s?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(s)},d._ssrRegister=u):t&&(u=r?function(){t.call(this,c(this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),u)if(d.functional){var h=d.render;d.render=function(e,t){return u.call(t),h(e,t)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,u):[u]}return i};var v=m({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",{staticClass:"icon",class:[e.newType,e.size]},[e.useIconComponent?i(e.useIconComponent,{tag:"component",class:[e.customClass],attrs:{icon:[e.newPack,e.newIcon],size:e.newCustomSize}}):i("i",{class:[e.newPack,e.newIcon,e.newCustomSize,e.customClass]})],1)},staticRenderFns:[]},void 0,{name:"BIcon",props:{type:[String,Object],component:String,pack:String,icon:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{iconConfig:function(){var e;return(e={mdi:f,fa:p(),fas:p(),far:p(),fad:p(),fab:p(),fal:p()},d&&d.customIconPacks&&(e=u(e,d.customIconPacks,!0)),e)[this.newPack]},iconPrefix:function(){return this.iconConfig&&this.iconConfig.iconPrefix?this.iconConfig.iconPrefix:""},newIcon:function(){return"".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon))},newPack:function(){return this.pack||d.defaultIconPack},newType:function(){if(this.type){var e=[];if("string"==typeof this.type)e=this.type.split("-");else for(var t in this.type)if(this.type[t]){e=t.split("-");break}if(!(e.length<=1)){var i=s(e).slice(1);return"has-text-".concat(i.join("-"))}}},newCustomSize:function(){return this.customSize||this.customSizeByPack},customSizeByPack:function(){if(this.iconConfig&&this.iconConfig.sizes){if(this.size&&void 0!==this.iconConfig.sizes[this.size])return this.iconConfig.sizes[this.size];if(this.iconConfig.sizes.default)return this.iconConfig.sizes.default}return null},useIconComponent:function(){return this.component||d.defaultIconComponent}},methods:{getEquivalentIconOf:function(e){return this.both&&this.iconConfig&&this.iconConfig.internalIcons&&this.iconConfig.internalIcons[e]?this.iconConfig.internalIcons[e]:e}}},void 0,!1,void 0,void 0,void 0);var g=m({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"control",class:e.rootClasses},["textarea"!==e.type?i("input",e._b({ref:"input",staticClass:"input",class:[e.inputClasses,e.customClass],attrs:{type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,change:e.onChange,blur:e.onBlur,focus:e.onFocus}},"input",e.$attrs,!1)):i("textarea",e._b({ref:"textarea",staticClass:"textarea",class:[e.inputClasses,e.customClass],attrs:{maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,change:e.onChange,blur:e.onBlur,focus:e.onFocus}},"textarea",e.$attrs,!1)),e.icon?i("b-icon",{staticClass:"is-left",class:{"is-clickable":e.iconClickable},attrs:{icon:e.icon,pack:e.iconPack,size:e.iconSize},nativeOn:{click:function(t){return e.iconClick("icon-click",t)}}}):e._e(),!e.loading&&e.hasIconRight?i("b-icon",{staticClass:"is-right",class:{"is-clickable":e.passwordReveal||e.iconRightClickable},attrs:{icon:e.rightIcon,pack:e.iconPack,size:e.iconSize,type:e.rightIconType,both:""},nativeOn:{click:function(t){return e.rightIconClick(t)}}}):e._e(),e.maxlength&&e.hasCounter&&"number"!==e.type?i("small",{staticClass:"help counter",class:{"is-invisible":!e.isFocused}},[e._v(" "+e._s(e.valueLength)+" / "+e._s(e.maxlength)+" ")]):e._e()],1)},staticRenderFns:[]},void 0,{name:"BInput",components:i({},v.name,v),mixins:[h],inheritAttrs:!1,props:{value:[Number,String],type:{type:String,default:"text"},lazy:{type:Boolean,default:!1},passwordReveal:Boolean,iconClickable:Boolean,hasCounter:{type:Boolean,default:function(){return d.defaultInputHasCounter}},customClass:{type:String,default:""},iconRight:String,iconRightClickable:Boolean,iconRightType:String},data:function(){return{newValue:this.value,newType:this.type,newAutocomplete:this.autocomplete||d.defaultInputAutocomplete,isPasswordVisible:!1,_elementRef:"textarea"===this.type?"textarea":"input"}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){this.newValue=e,this.$emit("input",e)}},rootClasses:function(){return[this.iconPosition,this.size,{"is-expanded":this.expanded,"is-loading":this.loading,"is-clearfix":!this.hasMessage}]},inputClasses:function(){return[this.statusType,this.size,{"is-rounded":this.rounded}]},hasIconRight:function(){return this.passwordReveal||this.loading||this.statusIcon&&this.statusTypeIcon||this.iconRight},rightIcon:function(){return this.passwordReveal?this.passwordVisibleIcon:this.iconRight?this.iconRight:this.statusTypeIcon},rightIconType:function(){return this.passwordReveal?"is-primary":this.iconRight?this.iconRightType||null:this.statusType},iconPosition:function(){var e="";return this.icon&&(e+="has-icons-left "),this.hasIconRight&&(e+="has-icons-right"),e},statusTypeIcon:function(){switch(this.statusType){case"is-success":return"check";case"is-danger":return"alert-circle";case"is-info":return"information";case"is-warning":return"alert"}},hasMessage:function(){return!!this.statusMessage},passwordVisibleIcon:function(){return this.isPasswordVisible?"eye-off":"eye"},valueLength:function(){return"string"==typeof this.computedValue?this.computedValue.length:"number"==typeof this.computedValue?this.computedValue.toString().length:0}},watch:{value:function(e){this.newValue=e}},methods:{togglePasswordVisibility:function(){var e=this;this.isPasswordVisible=!this.isPasswordVisible,this.newType=this.isPasswordVisible?"text":"password",this.$nextTick(function(){e.focus()})},iconClick:function(e,t){var i=this;this.$emit(e,t),this.$nextTick(function(){i.focus()})},rightIconClick:function(e){this.passwordReveal?this.togglePasswordVisibility():this.iconRightClickable&&this.iconClick("icon-right-click",e)},onInput:function(e){if(!this.lazy){var t=e.target.value;this.updateValue(t)}},onChange:function(e){if(this.lazy){var t=e.target.value;this.updateValue(t)}},updateValue:function(e){this.computedValue=e,!this.isValid&&this.checkHtml5Validity()}}},void 0,!1,void 0,void 0,void 0);var y,w=m({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"autocomplete control",class:{"is-expanded":e.expanded}},[i("b-input",e._b({ref:"input",attrs:{type:e.type,size:e.size,loading:e.loading,rounded:e.rounded,icon:e.icon,"icon-right":e.newIconRight,"icon-right-clickable":e.newIconRightClickable,"icon-pack":e.iconPack,maxlength:e.maxlength,autocomplete:e.newAutocomplete,"use-html5-validation":!1,"aria-autocomplete":e.ariaAutocomplete},on:{input:e.onInput,focus:e.focused,blur:e.onBlur,"icon-right-click":e.rightIconClick,"icon-click":function(t){return e.$emit("icon-click",t)}},nativeOn:{keydown:[function(t){return e.keydown(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),e.keyArrows("up"))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),e.keyArrows("down"))}]},model:{value:e.newValue,callback:function(t){e.newValue=t},expression:"newValue"}},"b-input",e.$attrs,!1)),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive&&(!e.isEmpty||e.hasEmptySlot||e.hasHeaderSlot),expression:"isActive && (!isEmpty || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{"is-opened-top":e.isOpenedTop&&!e.appendToBody},style:e.style},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"dropdown-content",style:e.contentStyle},[e.hasHeaderSlot?i("div",{staticClass:"dropdown-item dropdown-header",class:{"is-hovered":e.headerHovered},attrs:{role:"button",tabindex:"0"},on:{click:function(t){return e.selectHeaderOrFoterByClick(t,"header")}}},[e._t("header")],2):e._e(),e._l(e.computedData,function(t,n){return[t.group?i("div",{key:n+"group",staticClass:"dropdown-item"},[e.hasGroupSlot?e._t("group",null,{group:t.group,index:n}):i("span",{staticClass:"has-text-weight-bold"},[e._v(" "+e._s(t.group)+" ")])],2):e._e(),e._l(t.items,function(t,o){return i("a",{key:n+":"+o,staticClass:"dropdown-item",class:{"is-hovered":t===e.hovered},attrs:{role:"button",tabindex:"0"},on:{click:function(i){return i.stopPropagation(),e.setSelected(t,!e.keepOpen,i)}}},[e.hasDefaultSlot?e._t("default",null,{option:t,index:o}):i("span",[e._v(" "+e._s(e.getValue(t,!0))+" ")])],2)})]}),e.isEmpty&&e.hasEmptySlot?i("div",{staticClass:"dropdown-item is-disabled"},[e._t("empty")],2):e._e(),e.hasFooterSlot?i("div",{staticClass:"dropdown-item dropdown-footer",class:{"is-hovered":e.footerHovered},attrs:{role:"button",tabindex:"0"},on:{click:function(t){return e.selectHeaderOrFoterByClick(t,"footer")}}},[e._t("footer")],2):e._e()],2)])])],1)},staticRenderFns:[]},void 0,{name:"BAutocomplete",components:i({},g.name,g),mixins:[h],inheritAttrs:!1,props:{value:[Number,String],data:{type:Array,default:function(){return[]}},field:{type:String,default:"value"},keepFirst:Boolean,clearOnSelect:Boolean,openOnFocus:Boolean,customFormatter:Function,checkInfiniteScroll:Boolean,keepOpen:Boolean,selectOnClickOutside:Boolean,clearable:Boolean,maxHeight:[String,Number],dropdownPosition:{type:String,default:"auto"},groupField:String,groupOptions:String,iconRight:String,iconRightClickable:Boolean,appendToBody:Boolean,type:{type:String,default:"text"},confirmKeys:{type:Array,default:function(){return["Tab","Enter"]}},selectableHeader:Boolean,selectableFooter:Boolean},data:function(){return{selected:null,hovered:null,headerHovered:null,footerHovered:null,isActive:!1,newValue:this.value,newAutocomplete:this.autocomplete||"off",ariaAutocomplete:this.keepFirst?"both":"list",isListInViewportVertically:!0,hasFocus:!1,style:{},_isAutocomplete:!0,_elementRef:"input",_bodyEl:void 0}},computed:{computedData:function(){var e=this;if(this.groupField){if(this.groupOptions){var t=[];return this.data.forEach(function(i){var n=l(i,e.groupField),o=l(i,e.groupOptions);t.push({group:n,items:o})}),t}var i={};this.data.forEach(function(t){var n=l(t,e.groupField);i[n]||(i[n]=[]),i[n].push(t)});var n=[];return Object.keys(i).forEach(function(e){n.push({group:e,items:i[e]})}),n}return[{items:this.data}]},isEmpty:function(){return!this.computedData||!this.computedData.some(function(e){return e.items&&e.items.length})},whiteList:function(){var e=[];if(e.push(this.$refs.input.$el.querySelector("input")),e.push(this.$refs.dropdown),void 0!==this.$refs.dropdown){var t=this.$refs.dropdown.querySelectorAll("*"),i=!0,n=!1,o=void 0;try{for(var s,r=t[Symbol.iterator]();!(i=(s=r.next()).done);i=!0){var a=s.value;e.push(a)}}catch(e){n=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(n)throw o}}}if(this.$parent.$data._isTaginput){e.push(this.$parent.$el);var l=this.$parent.$el.querySelectorAll("*"),c=!0,u=!1,d=void 0;try{for(var h,f=l[Symbol.iterator]();!(c=(h=f.next()).done);c=!0){var p=h.value;e.push(p)}}catch(e){u=!0,d=e}finally{try{c||null==f.return||f.return()}finally{if(u)throw d}}}return e},hasDefaultSlot:function(){return!!this.$scopedSlots.default},hasGroupSlot:function(){return!!this.$scopedSlots.group},hasEmptySlot:function(){return!!this.$slots.empty},hasHeaderSlot:function(){return!!this.$slots.header},hasFooterSlot:function(){return!!this.$slots.footer},isOpenedTop:function(){return"top"===this.dropdownPosition||"auto"===this.dropdownPosition&&!this.isListInViewportVertically},newIconRight:function(){return this.clearable&&this.newValue?"close-circle":this.iconRight},newIconRightClickable:function(){return!!this.clearable||this.iconRightClickable},contentStyle:function(){return{maxHeight:(e=this.maxHeight,void 0===e?null:isNaN(e)?e:e+"px")};var e}},watch:{isActive:function(e){var t=this;"auto"===this.dropdownPosition&&(e?this.calcDropdownInViewportVertical():setTimeout(function(){t.calcDropdownInViewportVertical()},100))},newValue:function(e){this.$emit("input",e);var t=this.getValue(this.selected);t&&t!==e&&this.setSelected(null,!1),!this.hasFocus||this.openOnFocus&&!e||(this.isActive=!!e)},value:function(e){this.newValue=e},data:function(){var e=this;this.keepFirst&&this.$nextTick(function(){e.isActive?e.selectFirstOption(e.computedData):e.setHovered(null)})}},methods:{setHovered:function(e){void 0!==e&&(this.hovered=e)},setSelected:function(e){var t=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(void 0!==e){if(this.selected=e,this.$emit("select",this.selected,n),null!==this.selected){if(this.clearOnSelect){var o=this.$refs.input;o.newValue="",o.$refs.input.value=""}else this.newValue=this.getValue(this.selected);this.setHovered(null)}i&&this.$nextTick(function(){t.isActive=!1}),this.checkValidity()}},selectFirstOption:function(e){var t=this;this.$nextTick(function(){var i=e.filter(function(e){return e.items&&e.items.length});if(i.length){var n=i[0].items[0];t.setHovered(n)}else t.setHovered(null)})},keydown:function(e){var t=e.key;if("Enter"===t&&e.preventDefault(),"Escape"!==t&&"Tab"!==t||(this.isActive=!1),this.confirmKeys.indexOf(t)>=0){","===t&&e.preventDefault();var i=!this.keepOpen||"Tab"===t;if(null===this.hovered)return void this.checkIfHeaderOrFooterSelected(e,null,i);this.setSelected(this.hovered,i,e)}},selectHeaderOrFoterByClick:function(e,t){this.checkIfHeaderOrFooterSelected(e,{origin:t})},checkIfHeaderOrFooterSelected:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.selectableHeader&&(this.headerHovered||t&&"header"===t.origin)&&(this.$emit("select-header",e),this.headerHovered=!1,t&&this.setHovered(null),i&&(this.isActive=!1)),this.selectableFooter&&(this.footerHovered||t&&"footer"===t.origin)&&(this.$emit("select-footer",e),this.footerHovered=!1,t&&this.setHovered(null),i&&(this.isActive=!1))},clickedOutside:function(e){var t="shadowRoot"in this.$root.$options?e.composedPath()[0]:e.target;!this.hasFocus&&this.whiteList.indexOf(t)<0&&(this.keepFirst&&this.hovered&&this.selectOnClickOutside?this.setSelected(this.hovered,!0):this.isActive=!1)},getValue:function(e){if(null!==e)return void 0!==this.customFormatter?this.customFormatter(e):"object"===t(e)?l(e,this.field):e},checkIfReachedTheEndOfScroll:function(e){e.clientHeight!==e.scrollHeight&&e.scrollTop+e.clientHeight>=e.scrollHeight&&this.$emit("infinite-scroll")},calcDropdownInViewportVertical:function(){var e=this;this.$nextTick(function(){if(void 0!==e.$refs.dropdown){var t=e.$refs.dropdown.getBoundingClientRect();e.isListInViewportVertically=t.top>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight),e.appendToBody&&e.updateAppendToBody()}})},keyArrows:function(e){var t="down"===e?1:-1;if(this.isActive){var i,n=this.computedData.map(function(e){return e.items}).reduce(function(e,t){return[].concat(r(e),r(t))},[]);this.hasHeaderSlot&&this.selectableHeader&&n.unshift(void 0),this.hasFooterSlot&&this.selectableFooter&&n.push(void 0),i=(i=(i=this.headerHovered?0+t:this.footerHovered?n.length-1+t:n.indexOf(this.hovered)+t)>n.length-1?n.length-1:i)<0?0:i,this.footerHovered=!1,this.headerHovered=!1,this.setHovered(void 0!==n[i]?n[i]:null),this.hasFooterSlot&&this.selectableFooter&&i===n.length-1&&(this.footerHovered=!0),this.hasHeaderSlot&&this.selectableHeader&&0===i&&(this.headerHovered=!0);var o=this.$refs.dropdown.querySelector(".dropdown-content"),s="a.dropdown-item:not(.is-disabled)";this.hasHeaderSlot&&this.selectableHeader&&(s+=",div.dropdown-header"),this.hasFooterSlot&&this.selectableFooter&&(s+=",div.dropdown-footer");var a=o.querySelectorAll(s)[i];if(!a)return;var l=o.scrollTop,c=o.scrollTop+o.clientHeight-a.clientHeight;a.offsetTop<l?o.scrollTop=a.offsetTop:a.offsetTop>=c&&(o.scrollTop=a.offsetTop-o.clientHeight+a.clientHeight)}else this.isActive=!0},focused:function(e){this.getValue(this.selected)===this.newValue&&this.$el.querySelector("input").select(),this.openOnFocus&&(this.isActive=!0,this.keepFirst&&this.selectFirstOption(this.computedData)),this.hasFocus=!0,this.$emit("focus",e)},onBlur:function(e){this.hasFocus=!1,this.$emit("blur",e)},onInput:function(){var e=this.getValue(this.selected);e&&e===this.newValue||(this.$emit("typing",this.newValue),this.checkValidity())},rightIconClick:function(e){this.clearable?(this.newValue="",this.setSelected(null,!1),this.openOnFocus&&this.$refs.input.$el.focus()):this.$emit("icon-right-click",e)},checkValidity:function(){var e=this;this.useHtml5Validation&&this.$nextTick(function(){e.checkHtml5Validity()})},updateAppendToBody:function(){var e=this.$refs.dropdown,t=this.$refs.input.$el;if(e&&t){var i=this.$data._bodyEl;i.classList.forEach(function(e){return i.classList.remove(e)}),i.classList.add("autocomplete"),i.classList.add("control"),this.expandend&&i.classList.add("is-expandend");var n=t.getBoundingClientRect(),o=n.top+window.scrollY,s=n.left+window.scrollX;this.isOpenedTop?o-=e.clientHeight:o+=t.clientHeight,this.style={position:"absolute",top:"".concat(o,"px"),left:"".concat(s,"px"),width:"".concat(t.clientWidth,"px"),maxWidth:"".concat(t.clientWidth,"px"),zIndex:"99"}}}},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),"auto"===this.dropdownPosition&&window.addEventListener("resize",this.calcDropdownInViewportVertical))},mounted:function(){var e=this;if(this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content")){var t=this.$refs.dropdown.querySelector(".dropdown-content");t.addEventListener("scroll",function(){return e.checkIfReachedTheEndOfScroll(t)})}this.appendToBody&&(this.$data._bodyEl=function(e){var t=document.createElement("div");t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.width="100%";var i=document.createElement("div");return t.appendChild(i),i.appendChild(e),document.body.appendChild(t),t}(this.$refs.dropdown),this.updateAppendToBody())},beforeDestroy:function(){var e;("undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),"auto"===this.dropdownPosition&&window.removeEventListener("resize",this.calcDropdownInViewportVertical)),this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content"))&&this.$refs.dropdown.querySelector(".dropdown-content").removeEventListener("scroll",this.checkIfReachedTheEndOfScroll);this.appendToBody&&(void 0!==(e=this.$data._bodyEl).remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e))}},void 0,!1,void 0,void 0,void 0),b={install:function(e){!function(e,t){e.component(t.name,t)}(e,w)}};y=b,"undefined"!=typeof window&&window.Vue&&window.Vue.use(y),e.BAutocomplete=w,e.default=b,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/*! Buefy v0.9.13 | 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 = global || self, factory(global.Breadcrumb = {}));
|
|
6
|
+
}(this, function (exports) { 'use strict';
|
|
7
|
+
|
|
8
|
+
var config = {
|
|
9
|
+
defaultContainerElement: null,
|
|
10
|
+
defaultIconPack: 'mdi',
|
|
11
|
+
defaultIconComponent: null,
|
|
12
|
+
defaultIconPrev: 'chevron-left',
|
|
13
|
+
defaultIconNext: 'chevron-right',
|
|
14
|
+
defaultLocale: undefined,
|
|
15
|
+
defaultDialogConfirmText: null,
|
|
16
|
+
defaultDialogCancelText: null,
|
|
17
|
+
defaultSnackbarDuration: 3500,
|
|
18
|
+
defaultSnackbarPosition: null,
|
|
19
|
+
defaultToastDuration: 2000,
|
|
20
|
+
defaultToastPosition: null,
|
|
21
|
+
defaultNotificationDuration: 2000,
|
|
22
|
+
defaultNotificationPosition: null,
|
|
23
|
+
defaultTooltipType: 'is-primary',
|
|
24
|
+
defaultTooltipDelay: null,
|
|
25
|
+
defaultSidebarDelay: null,
|
|
26
|
+
defaultInputAutocomplete: 'on',
|
|
27
|
+
defaultDateFormatter: null,
|
|
28
|
+
defaultDateParser: null,
|
|
29
|
+
defaultDateCreator: null,
|
|
30
|
+
defaultTimeCreator: null,
|
|
31
|
+
defaultDayNames: null,
|
|
32
|
+
defaultMonthNames: null,
|
|
33
|
+
defaultFirstDayOfWeek: null,
|
|
34
|
+
defaultUnselectableDaysOfWeek: null,
|
|
35
|
+
defaultTimeFormatter: null,
|
|
36
|
+
defaultTimeParser: null,
|
|
37
|
+
defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
|
|
38
|
+
defaultModalScroll: null,
|
|
39
|
+
defaultDatepickerMobileNative: true,
|
|
40
|
+
defaultTimepickerMobileNative: true,
|
|
41
|
+
defaultNoticeQueue: true,
|
|
42
|
+
defaultInputHasCounter: true,
|
|
43
|
+
defaultTaginputHasCounter: true,
|
|
44
|
+
defaultUseHtml5Validation: true,
|
|
45
|
+
defaultDropdownMobileModal: true,
|
|
46
|
+
defaultFieldLabelPosition: null,
|
|
47
|
+
defaultDatepickerYearsRange: [-100, 10],
|
|
48
|
+
defaultDatepickerNearbyMonthDays: true,
|
|
49
|
+
defaultDatepickerNearbySelectableMonthDays: false,
|
|
50
|
+
defaultDatepickerShowWeekNumber: false,
|
|
51
|
+
defaultDatepickerWeekNumberClickable: false,
|
|
52
|
+
defaultDatepickerMobileModal: true,
|
|
53
|
+
defaultTrapFocus: true,
|
|
54
|
+
defaultAutoFocus: true,
|
|
55
|
+
defaultButtonRounded: false,
|
|
56
|
+
defaultSwitchRounded: true,
|
|
57
|
+
defaultCarouselInterval: 3500,
|
|
58
|
+
defaultTabsExpanded: false,
|
|
59
|
+
defaultTabsAnimated: true,
|
|
60
|
+
defaultTabsType: null,
|
|
61
|
+
defaultStatusIcon: true,
|
|
62
|
+
defaultProgrammaticPromise: false,
|
|
63
|
+
defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
|
|
64
|
+
defaultImageWebpFallback: null,
|
|
65
|
+
defaultImageLazy: true,
|
|
66
|
+
defaultImageResponsive: true,
|
|
67
|
+
defaultImageRatio: null,
|
|
68
|
+
defaultImageSrcsetFormatter: null,
|
|
69
|
+
defaultBreadcrumbTag: 'a',
|
|
70
|
+
defaultBreadcrumbAlign: 'is-left',
|
|
71
|
+
defaultBreadcrumbSeparator: '',
|
|
72
|
+
defaultBreadcrumbSize: 'is-medium',
|
|
73
|
+
customIconPacks: null
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
//
|
|
77
|
+
var script = {
|
|
78
|
+
name: 'BBreadcrumb',
|
|
79
|
+
props: {
|
|
80
|
+
align: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: function _default() {
|
|
83
|
+
return config.defaultBreadcrumbAlign;
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
separator: {
|
|
87
|
+
type: String,
|
|
88
|
+
default: function _default() {
|
|
89
|
+
return config.defaultBreadcrumbSeparator;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
size: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: function _default() {
|
|
95
|
+
return config.defaultBreadcrumbSize;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
computed: {
|
|
100
|
+
breadcrumbClasses: function breadcrumbClasses() {
|
|
101
|
+
return ['breadcrumb', this.align, this.separator, this.size];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
|
|
107
|
+
/* server only */
|
|
108
|
+
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
109
|
+
if (typeof shadowMode !== 'boolean') {
|
|
110
|
+
createInjectorSSR = createInjector;
|
|
111
|
+
createInjector = shadowMode;
|
|
112
|
+
shadowMode = false;
|
|
113
|
+
} // Vue.extend constructor export interop.
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
var options = typeof script === 'function' ? script.options : script; // render functions
|
|
117
|
+
|
|
118
|
+
if (template && template.render) {
|
|
119
|
+
options.render = template.render;
|
|
120
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
121
|
+
options._compiled = true; // functional template
|
|
122
|
+
|
|
123
|
+
if (isFunctionalTemplate) {
|
|
124
|
+
options.functional = true;
|
|
125
|
+
}
|
|
126
|
+
} // scopedId
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
if (scopeId) {
|
|
130
|
+
options._scopeId = scopeId;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
var hook;
|
|
134
|
+
|
|
135
|
+
if (moduleIdentifier) {
|
|
136
|
+
// server build
|
|
137
|
+
hook = function hook(context) {
|
|
138
|
+
// 2.3 injection
|
|
139
|
+
context = context || // cached call
|
|
140
|
+
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
141
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
|
|
142
|
+
// 2.2 with runInNewContext: true
|
|
143
|
+
|
|
144
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
145
|
+
context = __VUE_SSR_CONTEXT__;
|
|
146
|
+
} // inject component styles
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
if (style) {
|
|
150
|
+
style.call(this, createInjectorSSR(context));
|
|
151
|
+
} // register component module identifier for async chunk inference
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
if (context && context._registeredComponents) {
|
|
155
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
156
|
+
}
|
|
157
|
+
}; // used by ssr in case component is cached and beforeCreate
|
|
158
|
+
// never gets called
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
options._ssrRegister = hook;
|
|
162
|
+
} else if (style) {
|
|
163
|
+
hook = shadowMode ? function () {
|
|
164
|
+
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
|
|
165
|
+
} : function (context) {
|
|
166
|
+
style.call(this, createInjector(context));
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (hook) {
|
|
171
|
+
if (options.functional) {
|
|
172
|
+
// register for functional component in vue file
|
|
173
|
+
var originalRender = options.render;
|
|
174
|
+
|
|
175
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
176
|
+
hook.call(context);
|
|
177
|
+
return originalRender(h, context);
|
|
178
|
+
};
|
|
179
|
+
} else {
|
|
180
|
+
// inject component registration as beforeCreate hook
|
|
181
|
+
var existing = options.beforeCreate;
|
|
182
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return script;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
var normalizeComponent_1 = normalizeComponent;
|
|
190
|
+
|
|
191
|
+
/* script */
|
|
192
|
+
const __vue_script__ = script;
|
|
193
|
+
|
|
194
|
+
/* template */
|
|
195
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{class:_vm.breadcrumbClasses},[_c('ul',[_vm._t("default")],2)])};
|
|
196
|
+
var __vue_staticRenderFns__ = [];
|
|
197
|
+
|
|
198
|
+
/* style */
|
|
199
|
+
const __vue_inject_styles__ = undefined;
|
|
200
|
+
/* scoped */
|
|
201
|
+
const __vue_scope_id__ = undefined;
|
|
202
|
+
/* module identifier */
|
|
203
|
+
const __vue_module_identifier__ = undefined;
|
|
204
|
+
/* functional template */
|
|
205
|
+
const __vue_is_functional_template__ = false;
|
|
206
|
+
/* style inject */
|
|
207
|
+
|
|
208
|
+
/* style inject SSR */
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
var Breadcrumb = normalizeComponent_1(
|
|
213
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
214
|
+
__vue_inject_styles__,
|
|
215
|
+
__vue_script__,
|
|
216
|
+
__vue_scope_id__,
|
|
217
|
+
__vue_is_functional_template__,
|
|
218
|
+
__vue_module_identifier__,
|
|
219
|
+
undefined,
|
|
220
|
+
undefined
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
//
|
|
224
|
+
var script$1 = {
|
|
225
|
+
name: 'BBreadcrumbItem',
|
|
226
|
+
inheritAttrs: false,
|
|
227
|
+
props: {
|
|
228
|
+
tag: {
|
|
229
|
+
type: String,
|
|
230
|
+
default: function _default() {
|
|
231
|
+
return config.defaultBreadcrumbTag;
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
active: Boolean
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/* script */
|
|
239
|
+
const __vue_script__$1 = script$1;
|
|
240
|
+
|
|
241
|
+
/* template */
|
|
242
|
+
var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('li',{class:{ 'is-active': _vm.active }},[_c(_vm.tag,_vm._g(_vm._b({tag:"component"},'component',_vm.$attrs,false),_vm.$listeners),[_vm._t("default")],2)],1)};
|
|
243
|
+
var __vue_staticRenderFns__$1 = [];
|
|
244
|
+
|
|
245
|
+
/* style */
|
|
246
|
+
const __vue_inject_styles__$1 = undefined;
|
|
247
|
+
/* scoped */
|
|
248
|
+
const __vue_scope_id__$1 = undefined;
|
|
249
|
+
/* module identifier */
|
|
250
|
+
const __vue_module_identifier__$1 = undefined;
|
|
251
|
+
/* functional template */
|
|
252
|
+
const __vue_is_functional_template__$1 = false;
|
|
253
|
+
/* style inject */
|
|
254
|
+
|
|
255
|
+
/* style inject SSR */
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
var BreadcrumbItem = normalizeComponent_1(
|
|
260
|
+
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
|
|
261
|
+
__vue_inject_styles__$1,
|
|
262
|
+
__vue_script__$1,
|
|
263
|
+
__vue_scope_id__$1,
|
|
264
|
+
__vue_is_functional_template__$1,
|
|
265
|
+
__vue_module_identifier__$1,
|
|
266
|
+
undefined,
|
|
267
|
+
undefined
|
|
268
|
+
);
|
|
269
|
+
|
|
270
|
+
var use = function use(plugin) {
|
|
271
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
272
|
+
window.Vue.use(plugin);
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
var registerComponent = function registerComponent(Vue, component) {
|
|
276
|
+
Vue.component(component.name, component);
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
var Plugin = {
|
|
280
|
+
install: function install(Vue) {
|
|
281
|
+
registerComponent(Vue, Breadcrumb);
|
|
282
|
+
registerComponent(Vue, BreadcrumbItem);
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
use(Plugin);
|
|
286
|
+
|
|
287
|
+
exports.BBreadcrumb = Breadcrumb;
|
|
288
|
+
exports.BBreadcrumbItem = BreadcrumbItem;
|
|
289
|
+
exports.default = Plugin;
|
|
290
|
+
|
|
291
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
292
|
+
|
|
293
|
+
}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! Buefy v0.9.13 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Breadcrumb={})}(this,function(e){"use strict";var t="a",n="is-left",i="",r="is-medium";var o=function(e,t,n,i,r,o,s,a,d,u){"boolean"!=typeof s&&(d=a,a=s,s=!1);var c,f="function"==typeof n?n.options:n;if(e&&e.render&&(f.render=e.render,f.staticRenderFns=e.staticRenderFns,f._compiled=!0,r&&(f.functional=!0)),i&&(f._scopeId=i),o?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,d(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},f._ssrRegister=c):t&&(c=s?function(){t.call(this,u(this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),c)if(f.functional){var l=f.render;f.render=function(e,t){return c.call(t),l(e,t)}}else{var p=f.beforeCreate;f.beforeCreate=p?[].concat(p,c):[c]}return n};var s=o({render:function(){var e=this.$createElement,t=this._self._c||e;return t("nav",{class:this.breadcrumbClasses},[t("ul",[this._t("default")],2)])},staticRenderFns:[]},void 0,{name:"BBreadcrumb",props:{align:{type:String,default:function(){return n}},separator:{type:String,default:function(){return i}},size:{type:String,default:function(){return r}}},computed:{breadcrumbClasses:function(){return["breadcrumb",this.align,this.separator,this.size]}}},void 0,!1,void 0,void 0,void 0);var a,d=o({render:function(){var e=this.$createElement,t=this._self._c||e;return t("li",{class:{"is-active":this.active}},[t(this.tag,this._g(this._b({tag:"component"},"component",this.$attrs,!1),this.$listeners),[this._t("default")],2)],1)},staticRenderFns:[]},void 0,{name:"BBreadcrumbItem",inheritAttrs:!1,props:{tag:{type:String,default:function(){return t}},active:Boolean}},void 0,!1,void 0,void 0,void 0),u=function(e,t){e.component(t.name,t)},c={install:function(e){u(e,s),u(e,d)}};a=c,"undefined"!=typeof window&&window.Vue&&window.Vue.use(a),e.BBreadcrumb=s,e.BBreadcrumbItem=d,e.default=c,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Buefy v0.9.
|
|
1
|
+
/*! Buefy v0.9.13 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -147,6 +147,10 @@
|
|
|
147
147
|
defaultImageResponsive: true,
|
|
148
148
|
defaultImageRatio: null,
|
|
149
149
|
defaultImageSrcsetFormatter: null,
|
|
150
|
+
defaultBreadcrumbTag: 'a',
|
|
151
|
+
defaultBreadcrumbAlign: 'is-left',
|
|
152
|
+
defaultBreadcrumbSeparator: '',
|
|
153
|
+
defaultBreadcrumbSize: 'is-medium',
|
|
150
154
|
customIconPacks: null
|
|
151
155
|
};
|
|
152
156
|
|