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,525 @@
|
|
|
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.Upload = {}));
|
|
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
|
+
defaultTooltipCloseDelay: null,
|
|
26
|
+
defaultSidebarDelay: null,
|
|
27
|
+
defaultInputAutocomplete: 'on',
|
|
28
|
+
defaultDateFormatter: null,
|
|
29
|
+
defaultDateParser: null,
|
|
30
|
+
defaultDateCreator: null,
|
|
31
|
+
defaultTimeCreator: null,
|
|
32
|
+
defaultDayNames: null,
|
|
33
|
+
defaultMonthNames: null,
|
|
34
|
+
defaultFirstDayOfWeek: null,
|
|
35
|
+
defaultUnselectableDaysOfWeek: null,
|
|
36
|
+
defaultTimeFormatter: null,
|
|
37
|
+
defaultTimeParser: null,
|
|
38
|
+
defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
|
|
39
|
+
defaultModalScroll: null,
|
|
40
|
+
defaultDatepickerMobileNative: true,
|
|
41
|
+
defaultTimepickerMobileNative: true,
|
|
42
|
+
defaultTimepickerMobileModal: true,
|
|
43
|
+
defaultNoticeQueue: true,
|
|
44
|
+
defaultInputHasCounter: true,
|
|
45
|
+
defaultTaginputHasCounter: true,
|
|
46
|
+
defaultUseHtml5Validation: true,
|
|
47
|
+
defaultDropdownMobileModal: true,
|
|
48
|
+
defaultFieldLabelPosition: null,
|
|
49
|
+
defaultDatepickerYearsRange: [-100, 10],
|
|
50
|
+
defaultDatepickerNearbyMonthDays: true,
|
|
51
|
+
defaultDatepickerNearbySelectableMonthDays: false,
|
|
52
|
+
defaultDatepickerShowWeekNumber: false,
|
|
53
|
+
defaultDatepickerWeekNumberClickable: false,
|
|
54
|
+
defaultDatepickerMobileModal: true,
|
|
55
|
+
defaultTrapFocus: true,
|
|
56
|
+
defaultAutoFocus: true,
|
|
57
|
+
defaultButtonRounded: false,
|
|
58
|
+
defaultSwitchRounded: true,
|
|
59
|
+
defaultCarouselInterval: 3500,
|
|
60
|
+
defaultTabsExpanded: false,
|
|
61
|
+
defaultTabsAnimated: true,
|
|
62
|
+
defaultTabsType: null,
|
|
63
|
+
defaultStatusIcon: true,
|
|
64
|
+
defaultProgrammaticPromise: false,
|
|
65
|
+
defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
|
|
66
|
+
defaultImageWebpFallback: null,
|
|
67
|
+
defaultImageLazy: true,
|
|
68
|
+
defaultImageResponsive: true,
|
|
69
|
+
defaultImageRatio: null,
|
|
70
|
+
defaultImageSrcsetFormatter: null,
|
|
71
|
+
defaultBreadcrumbTag: 'a',
|
|
72
|
+
defaultBreadcrumbAlign: 'is-left',
|
|
73
|
+
defaultBreadcrumbSeparator: '',
|
|
74
|
+
defaultBreadcrumbSize: 'is-medium',
|
|
75
|
+
customIconPacks: null
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
function isVueComponent(c) {
|
|
79
|
+
return c && c._isVue;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
var FormElementMixin = {
|
|
83
|
+
props: {
|
|
84
|
+
size: String,
|
|
85
|
+
expanded: Boolean,
|
|
86
|
+
loading: Boolean,
|
|
87
|
+
rounded: Boolean,
|
|
88
|
+
icon: String,
|
|
89
|
+
iconPack: String,
|
|
90
|
+
// Native options to use in HTML5 validation
|
|
91
|
+
autocomplete: String,
|
|
92
|
+
maxlength: [Number, String],
|
|
93
|
+
useHtml5Validation: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: function _default() {
|
|
96
|
+
return config.defaultUseHtml5Validation;
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
validationMessage: String,
|
|
100
|
+
locale: {
|
|
101
|
+
type: [String, Array],
|
|
102
|
+
default: function _default() {
|
|
103
|
+
return config.defaultLocale;
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
statusIcon: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: function _default() {
|
|
109
|
+
return config.defaultStatusIcon;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
data: function data() {
|
|
114
|
+
return {
|
|
115
|
+
isValid: true,
|
|
116
|
+
isFocused: false,
|
|
117
|
+
newIconPack: this.iconPack || config.defaultIconPack
|
|
118
|
+
};
|
|
119
|
+
},
|
|
120
|
+
computed: {
|
|
121
|
+
/**
|
|
122
|
+
* Find parent Field, max 3 levels deep.
|
|
123
|
+
*/
|
|
124
|
+
parentField: function parentField() {
|
|
125
|
+
var parent = this.$parent;
|
|
126
|
+
for (var i = 0; i < 3; i++) {
|
|
127
|
+
if (parent && !parent.$data._isField) {
|
|
128
|
+
parent = parent.$parent;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return parent;
|
|
132
|
+
},
|
|
133
|
+
/**
|
|
134
|
+
* Get the type prop from parent if it's a Field.
|
|
135
|
+
*/
|
|
136
|
+
statusType: function statusType() {
|
|
137
|
+
var _ref = this.parentField || {},
|
|
138
|
+
newType = _ref.newType;
|
|
139
|
+
if (!newType) return;
|
|
140
|
+
if (typeof newType === 'string') {
|
|
141
|
+
return newType;
|
|
142
|
+
} else {
|
|
143
|
+
for (var key in newType) {
|
|
144
|
+
if (newType[key]) {
|
|
145
|
+
return key;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* Get the message prop from parent if it's a Field.
|
|
152
|
+
*/
|
|
153
|
+
statusMessage: function statusMessage() {
|
|
154
|
+
if (!this.parentField) return;
|
|
155
|
+
return this.parentField.newMessage || this.parentField.$slots.message;
|
|
156
|
+
},
|
|
157
|
+
/**
|
|
158
|
+
* Fix icon size for inputs, large was too big
|
|
159
|
+
*/
|
|
160
|
+
iconSize: function iconSize() {
|
|
161
|
+
switch (this.size) {
|
|
162
|
+
case 'is-small':
|
|
163
|
+
return this.size;
|
|
164
|
+
case 'is-medium':
|
|
165
|
+
return;
|
|
166
|
+
case 'is-large':
|
|
167
|
+
return this.newIconPack === 'mdi' ? 'is-medium' : '';
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
methods: {
|
|
172
|
+
/**
|
|
173
|
+
* Focus method that work dynamically depending on the component.
|
|
174
|
+
*/
|
|
175
|
+
focus: function focus() {
|
|
176
|
+
var el = this.getElement();
|
|
177
|
+
if (el === undefined) return;
|
|
178
|
+
this.$nextTick(function () {
|
|
179
|
+
if (el) el.focus();
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
onBlur: function onBlur($event) {
|
|
183
|
+
this.isFocused = false;
|
|
184
|
+
this.$emit('blur', $event);
|
|
185
|
+
this.checkHtml5Validity();
|
|
186
|
+
},
|
|
187
|
+
onFocus: function onFocus($event) {
|
|
188
|
+
this.isFocused = true;
|
|
189
|
+
this.$emit('focus', $event);
|
|
190
|
+
},
|
|
191
|
+
getElement: function getElement() {
|
|
192
|
+
var el = this.$refs[this.$data._elementRef];
|
|
193
|
+
while (isVueComponent(el)) {
|
|
194
|
+
el = el.$refs[el.$data._elementRef];
|
|
195
|
+
}
|
|
196
|
+
return el;
|
|
197
|
+
},
|
|
198
|
+
setInvalid: function setInvalid() {
|
|
199
|
+
var type = 'is-danger';
|
|
200
|
+
var message = this.validationMessage || this.getElement().validationMessage;
|
|
201
|
+
this.setValidity(type, message);
|
|
202
|
+
},
|
|
203
|
+
setValidity: function setValidity(type, message) {
|
|
204
|
+
var _this = this;
|
|
205
|
+
this.$nextTick(function () {
|
|
206
|
+
if (_this.parentField) {
|
|
207
|
+
// Set type only if not defined
|
|
208
|
+
if (!_this.parentField.type) {
|
|
209
|
+
_this.parentField.newType = type;
|
|
210
|
+
}
|
|
211
|
+
// Set message only if not defined
|
|
212
|
+
if (!_this.parentField.message) {
|
|
213
|
+
_this.parentField.newMessage = message;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
},
|
|
218
|
+
/**
|
|
219
|
+
* Check HTML5 validation, set isValid property.
|
|
220
|
+
* If validation fail, send 'is-danger' type,
|
|
221
|
+
* and error message to parent if it's a Field.
|
|
222
|
+
*/
|
|
223
|
+
checkHtml5Validity: function checkHtml5Validity() {
|
|
224
|
+
if (!this.useHtml5Validation) return;
|
|
225
|
+
var el = this.getElement();
|
|
226
|
+
if (el === undefined) return;
|
|
227
|
+
if (!el.checkValidity()) {
|
|
228
|
+
this.setInvalid();
|
|
229
|
+
this.isValid = false;
|
|
230
|
+
} else {
|
|
231
|
+
this.setValidity(null, null);
|
|
232
|
+
this.isValid = true;
|
|
233
|
+
}
|
|
234
|
+
return this.isValid;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
// Polyfills for SSR
|
|
240
|
+
|
|
241
|
+
var isSSR = typeof window === 'undefined';
|
|
242
|
+
var File = isSSR ? Object : window.File;
|
|
243
|
+
|
|
244
|
+
//
|
|
245
|
+
var script = {
|
|
246
|
+
name: 'BUpload',
|
|
247
|
+
mixins: [FormElementMixin],
|
|
248
|
+
inheritAttrs: false,
|
|
249
|
+
props: {
|
|
250
|
+
value: {
|
|
251
|
+
type: [Object, Function, File, Array]
|
|
252
|
+
},
|
|
253
|
+
multiple: Boolean,
|
|
254
|
+
disabled: Boolean,
|
|
255
|
+
accept: String,
|
|
256
|
+
dragDrop: Boolean,
|
|
257
|
+
type: {
|
|
258
|
+
type: String,
|
|
259
|
+
default: 'is-primary'
|
|
260
|
+
},
|
|
261
|
+
native: {
|
|
262
|
+
type: Boolean,
|
|
263
|
+
default: false
|
|
264
|
+
},
|
|
265
|
+
expanded: {
|
|
266
|
+
type: Boolean,
|
|
267
|
+
default: false
|
|
268
|
+
},
|
|
269
|
+
rounded: {
|
|
270
|
+
type: Boolean,
|
|
271
|
+
default: false
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
data: function data() {
|
|
275
|
+
return {
|
|
276
|
+
newValue: this.value,
|
|
277
|
+
dragDropFocus: false,
|
|
278
|
+
_elementRef: 'input'
|
|
279
|
+
};
|
|
280
|
+
},
|
|
281
|
+
watch: {
|
|
282
|
+
/**
|
|
283
|
+
* When v-model is changed:
|
|
284
|
+
* 1. Set internal value.
|
|
285
|
+
* 2. Reset internal input file value
|
|
286
|
+
* 3. If it's invalid, validate again.
|
|
287
|
+
*/
|
|
288
|
+
value: function value(_value) {
|
|
289
|
+
this.newValue = _value;
|
|
290
|
+
if (!_value || Array.isArray(_value) && _value.length === 0) {
|
|
291
|
+
this.$refs.input.value = null;
|
|
292
|
+
}
|
|
293
|
+
!this.isValid && !this.dragDrop && this.checkHtml5Validity();
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
methods: {
|
|
297
|
+
/**
|
|
298
|
+
* Listen change event on input type 'file',
|
|
299
|
+
* emit 'input' event and validate
|
|
300
|
+
*/
|
|
301
|
+
onFileChange: function onFileChange(event) {
|
|
302
|
+
if (this.disabled || this.loading) return;
|
|
303
|
+
if (this.dragDrop) this.updateDragDropFocus(false);
|
|
304
|
+
var value = event.target.files || event.dataTransfer.files;
|
|
305
|
+
if (value.length === 0) {
|
|
306
|
+
if (!this.newValue) return;
|
|
307
|
+
if (this.native) this.newValue = null;
|
|
308
|
+
} else if (!this.multiple) {
|
|
309
|
+
// only one element in case drag drop mode and isn't multiple
|
|
310
|
+
if (this.dragDrop && value.length !== 1) return;else {
|
|
311
|
+
var file = value[0];
|
|
312
|
+
if (this.checkType(file)) this.newValue = file;else if (this.newValue) {
|
|
313
|
+
this.newValue = null;
|
|
314
|
+
this.clearInput();
|
|
315
|
+
} else {
|
|
316
|
+
// Force input back to empty state and recheck validity
|
|
317
|
+
this.clearInput();
|
|
318
|
+
this.checkHtml5Validity();
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
} else {
|
|
323
|
+
// always new values if native or undefined local
|
|
324
|
+
var newValues = false;
|
|
325
|
+
if (this.native || !this.newValue) {
|
|
326
|
+
this.newValue = [];
|
|
327
|
+
newValues = true;
|
|
328
|
+
}
|
|
329
|
+
for (var i = 0; i < value.length; i++) {
|
|
330
|
+
var _file = value[i];
|
|
331
|
+
if (this.checkType(_file)) {
|
|
332
|
+
this.newValue.push(_file);
|
|
333
|
+
newValues = true;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
if (!newValues) return;
|
|
337
|
+
}
|
|
338
|
+
this.$emit('input', this.newValue);
|
|
339
|
+
!this.dragDrop && this.checkHtml5Validity();
|
|
340
|
+
},
|
|
341
|
+
/*
|
|
342
|
+
* Reset file input value
|
|
343
|
+
*/
|
|
344
|
+
clearInput: function clearInput() {
|
|
345
|
+
this.$refs.input.value = null;
|
|
346
|
+
},
|
|
347
|
+
/**
|
|
348
|
+
* Listen drag-drop to update internal variable
|
|
349
|
+
*/
|
|
350
|
+
updateDragDropFocus: function updateDragDropFocus(focus) {
|
|
351
|
+
if (!this.disabled && !this.loading) {
|
|
352
|
+
this.dragDropFocus = focus;
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
/**
|
|
356
|
+
* Check mime type of file
|
|
357
|
+
*/
|
|
358
|
+
checkType: function checkType(file) {
|
|
359
|
+
if (!this.accept) return true;
|
|
360
|
+
var types = this.accept.split(',');
|
|
361
|
+
if (types.length === 0) return true;
|
|
362
|
+
var valid = false;
|
|
363
|
+
for (var i = 0; i < types.length && !valid; i++) {
|
|
364
|
+
var type = types[i].trim();
|
|
365
|
+
if (type) {
|
|
366
|
+
if (type.substring(0, 1) === '.') {
|
|
367
|
+
// check extension
|
|
368
|
+
var extension = file.name.toLowerCase().slice(-type.length);
|
|
369
|
+
if (extension === type.toLowerCase()) {
|
|
370
|
+
valid = true;
|
|
371
|
+
}
|
|
372
|
+
} else {
|
|
373
|
+
// check mime type
|
|
374
|
+
if (file.type.match(type)) {
|
|
375
|
+
valid = true;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if (!valid) this.$emit('invalid');
|
|
381
|
+
return valid;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
387
|
+
if (typeof shadowMode !== 'boolean') {
|
|
388
|
+
createInjectorSSR = createInjector;
|
|
389
|
+
createInjector = shadowMode;
|
|
390
|
+
shadowMode = false;
|
|
391
|
+
}
|
|
392
|
+
// Vue.extend constructor export interop.
|
|
393
|
+
const options = typeof script === 'function' ? script.options : script;
|
|
394
|
+
// render functions
|
|
395
|
+
if (template && template.render) {
|
|
396
|
+
options.render = template.render;
|
|
397
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
398
|
+
options._compiled = true;
|
|
399
|
+
// functional template
|
|
400
|
+
if (isFunctionalTemplate) {
|
|
401
|
+
options.functional = true;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
// scopedId
|
|
405
|
+
if (scopeId) {
|
|
406
|
+
options._scopeId = scopeId;
|
|
407
|
+
}
|
|
408
|
+
let hook;
|
|
409
|
+
if (moduleIdentifier) {
|
|
410
|
+
// server build
|
|
411
|
+
hook = function (context) {
|
|
412
|
+
// 2.3 injection
|
|
413
|
+
context =
|
|
414
|
+
context || // cached call
|
|
415
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
416
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
|
|
417
|
+
// 2.2 with runInNewContext: true
|
|
418
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
419
|
+
context = __VUE_SSR_CONTEXT__;
|
|
420
|
+
}
|
|
421
|
+
// inject component styles
|
|
422
|
+
if (style) {
|
|
423
|
+
style.call(this, createInjectorSSR(context));
|
|
424
|
+
}
|
|
425
|
+
// register component module identifier for async chunk inference
|
|
426
|
+
if (context && context._registeredComponents) {
|
|
427
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
// used by ssr in case component is cached and beforeCreate
|
|
431
|
+
// never gets called
|
|
432
|
+
options._ssrRegister = hook;
|
|
433
|
+
}
|
|
434
|
+
else if (style) {
|
|
435
|
+
hook = shadowMode
|
|
436
|
+
? function (context) {
|
|
437
|
+
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
438
|
+
}
|
|
439
|
+
: function (context) {
|
|
440
|
+
style.call(this, createInjector(context));
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
if (hook) {
|
|
444
|
+
if (options.functional) {
|
|
445
|
+
// register for functional component in vue file
|
|
446
|
+
const originalRender = options.render;
|
|
447
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
448
|
+
hook.call(context);
|
|
449
|
+
return originalRender(h, context);
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
// inject component registration as beforeCreate hook
|
|
454
|
+
const existing = options.beforeCreate;
|
|
455
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
return script;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/* script */
|
|
462
|
+
const __vue_script__ = script;
|
|
463
|
+
|
|
464
|
+
/* template */
|
|
465
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('label',{staticClass:"upload control",class:{'is-expanded' : _vm.expanded, 'is-rounded' : _vm.rounded}},[(!_vm.dragDrop)?[_vm._t("default")]:_c('div',{staticClass:"upload-draggable",class:[_vm.type, {
|
|
466
|
+
'is-loading': _vm.loading,
|
|
467
|
+
'is-disabled': _vm.disabled,
|
|
468
|
+
'is-hovered': _vm.dragDropFocus,
|
|
469
|
+
'is-expanded': _vm.expanded,
|
|
470
|
+
}],on:{"dragover":function($event){$event.preventDefault();return _vm.updateDragDropFocus(true)},"dragleave":function($event){$event.preventDefault();return _vm.updateDragDropFocus(false)},"dragenter":function($event){$event.preventDefault();return _vm.updateDragDropFocus(true)},"drop":function($event){$event.preventDefault();return _vm.onFileChange($event)}}},[_vm._t("default")],2),_c('input',_vm._b({ref:"input",attrs:{"type":"file","multiple":_vm.multiple,"accept":_vm.accept,"disabled":_vm.disabled},on:{"change":_vm.onFileChange}},'input',_vm.$attrs,false))],2)};
|
|
471
|
+
var __vue_staticRenderFns__ = [];
|
|
472
|
+
|
|
473
|
+
/* style */
|
|
474
|
+
const __vue_inject_styles__ = undefined;
|
|
475
|
+
/* scoped */
|
|
476
|
+
const __vue_scope_id__ = undefined;
|
|
477
|
+
/* module identifier */
|
|
478
|
+
const __vue_module_identifier__ = undefined;
|
|
479
|
+
/* functional template */
|
|
480
|
+
const __vue_is_functional_template__ = false;
|
|
481
|
+
/* style inject */
|
|
482
|
+
|
|
483
|
+
/* style inject SSR */
|
|
484
|
+
|
|
485
|
+
/* style inject shadow dom */
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent(
|
|
490
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
491
|
+
__vue_inject_styles__,
|
|
492
|
+
__vue_script__,
|
|
493
|
+
__vue_scope_id__,
|
|
494
|
+
__vue_is_functional_template__,
|
|
495
|
+
__vue_module_identifier__,
|
|
496
|
+
false,
|
|
497
|
+
undefined,
|
|
498
|
+
undefined,
|
|
499
|
+
undefined
|
|
500
|
+
);
|
|
501
|
+
|
|
502
|
+
var Upload = __vue_component__;
|
|
503
|
+
|
|
504
|
+
var use = function use(plugin) {
|
|
505
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
506
|
+
window.Vue.use(plugin);
|
|
507
|
+
}
|
|
508
|
+
};
|
|
509
|
+
var registerComponent = function registerComponent(Vue, component) {
|
|
510
|
+
Vue.component(component.name, component);
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
var Plugin = {
|
|
514
|
+
install: function install(Vue) {
|
|
515
|
+
registerComponent(Vue, Upload);
|
|
516
|
+
}
|
|
517
|
+
};
|
|
518
|
+
use(Plugin);
|
|
519
|
+
|
|
520
|
+
exports.BUpload = Upload;
|
|
521
|
+
exports["default"] = Plugin;
|
|
522
|
+
|
|
523
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
524
|
+
|
|
525
|
+
}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! Buefy v0.9.28 | 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="undefined"!=typeof globalThis?globalThis:e||self).Upload={})}(this,(function(e){"use strict";var t={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,defaultTooltipCloseDelay: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,defaultTimepickerMobileModal:!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};var a={props:{size:String,expanded:Boolean,loading:Boolean,rounded:Boolean,icon:String,iconPack:String,autocomplete:String,maxlength:[Number,String],useHtml5Validation:{type:Boolean,default:function(){return t.defaultUseHtml5Validation}},validationMessage:String,locale:{type:[String,Array],default:function(){return t.defaultLocale}},statusIcon:{type:Boolean,default:function(){return t.defaultStatusIcon}}},data:function(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||t.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)},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 a=this;this.$nextTick((function(){a.parentField&&(a.parentField.type||(a.parentField.newType=e),a.parentField.message||(a.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}}}},n="undefined"==typeof window?Object:window.File;function i(e,t,a,n,i,l,u,o,r,s){"boolean"!=typeof u&&(r=o,o=u,u=!1);const d="function"==typeof a?a.options:a;let f;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,i&&(d.functional=!0)),n&&(d._scopeId=n),l?(f=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,r(e)),e&&e._registeredComponents&&e._registeredComponents.add(l)},d._ssrRegister=f):t&&(f=u?function(e){t.call(this,s(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,o(e))}),f)if(d.functional){const e=d.render;d.render=function(t,a){return f.call(a),e(t,a)}}else{const e=d.beforeCreate;d.beforeCreate=e?[].concat(e,f):[f]}return a}var l,u=i({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("label",{staticClass:"upload control",class:{"is-expanded":e.expanded,"is-rounded":e.rounded}},[e.dragDrop?a("div",{staticClass:"upload-draggable",class:[e.type,{"is-loading":e.loading,"is-disabled":e.disabled,"is-hovered":e.dragDropFocus,"is-expanded":e.expanded}],on:{dragover:function(t){return t.preventDefault(),e.updateDragDropFocus(!0)},dragleave:function(t){return t.preventDefault(),e.updateDragDropFocus(!1)},dragenter:function(t){return t.preventDefault(),e.updateDragDropFocus(!0)},drop:function(t){return t.preventDefault(),e.onFileChange(t)}}},[e._t("default")],2):[e._t("default")],a("input",e._b({ref:"input",attrs:{type:"file",multiple:e.multiple,accept:e.accept,disabled:e.disabled},on:{change:e.onFileChange}},"input",e.$attrs,!1))],2)},staticRenderFns:[]},undefined,{name:"BUpload",mixins:[a],inheritAttrs:!1,props:{value:{type:[Object,Function,n,Array]},multiple:Boolean,disabled:Boolean,accept:String,dragDrop:Boolean,type:{type:String,default:"is-primary"},native:{type:Boolean,default:!1},expanded:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1}},data:function(){return{newValue:this.value,dragDropFocus:!1,_elementRef:"input"}},watch:{value:function(e){this.newValue=e,(!e||Array.isArray(e)&&0===e.length)&&(this.$refs.input.value=null),!this.isValid&&!this.dragDrop&&this.checkHtml5Validity()}},methods:{onFileChange:function(e){if(!this.disabled&&!this.loading){this.dragDrop&&this.updateDragDropFocus(!1);var t=e.target.files||e.dataTransfer.files;if(0===t.length){if(!this.newValue)return;this.native&&(this.newValue=null)}else if(this.multiple){var a=!1;!this.native&&this.newValue||(this.newValue=[],a=!0);for(var n=0;n<t.length;n++){var i=t[n];this.checkType(i)&&(this.newValue.push(i),a=!0)}if(!a)return}else{if(this.dragDrop&&1!==t.length)return;var l=t[0];if(this.checkType(l))this.newValue=l;else{if(!this.newValue)return this.clearInput(),void this.checkHtml5Validity();this.newValue=null,this.clearInput()}}this.$emit("input",this.newValue),!this.dragDrop&&this.checkHtml5Validity()}},clearInput:function(){this.$refs.input.value=null},updateDragDropFocus:function(e){this.disabled||this.loading||(this.dragDropFocus=e)},checkType:function(e){if(!this.accept)return!0;var t=this.accept.split(",");if(0===t.length)return!0;for(var a=!1,n=0;n<t.length&&!a;n++){var i=t[n].trim();if(i)if("."===i.substring(0,1))e.name.toLowerCase().slice(-i.length)===i.toLowerCase()&&(a=!0);else e.type.match(i)&&(a=!0)}return a||this.$emit("invalid"),a}}},undefined,false,undefined,!1,void 0,void 0,void 0),o={install:function(e){!function(e,t){e.component(t.name,t)}(e,u)}};l=o,"undefined"!=typeof window&&window.Vue&&window.Vue.use(l),e.BUpload=u,e.default=o,Object.defineProperty(e,"__esModule",{value:!0})}));
|