buefy 0.7.9 → 0.8.2
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 +82 -0
- package/dist/buefy.css +13759 -8263
- package/dist/buefy.js +9073 -14866
- package/dist/buefy.min.css +1 -5
- package/dist/buefy.min.js +2 -2
- package/dist/cjs/autocomplete.js +22 -0
- package/dist/cjs/button.js +106 -0
- package/dist/cjs/checkbox.js +135 -0
- package/dist/cjs/chunk-07fe6fc0.js +247 -0
- package/dist/cjs/chunk-0af453a7.js +105 -0
- package/dist/cjs/chunk-0e89e51b.js +394 -0
- package/dist/cjs/chunk-13e039f5.js +104 -0
- package/dist/cjs/chunk-143d9e6d.js +404 -0
- package/dist/cjs/chunk-19ebd649.js +114 -0
- package/dist/cjs/chunk-1b1231ce.js +94 -0
- package/dist/cjs/chunk-1e6abfcf.js +94 -0
- package/dist/cjs/chunk-28d164b1.js +172 -0
- package/dist/cjs/chunk-3396605d.js +394 -0
- package/dist/cjs/chunk-364a37a0.js +404 -0
- package/dist/cjs/chunk-3b066933.js +103 -0
- package/dist/cjs/chunk-3dffe6e7.js +54 -0
- package/dist/cjs/chunk-4a03b064.js +199 -0
- package/dist/cjs/chunk-50b06939.js +153 -0
- package/dist/cjs/chunk-52623128.js +105 -0
- package/dist/cjs/chunk-53d4f332.js +94 -0
- package/dist/cjs/chunk-544a95da.js +404 -0
- package/dist/cjs/chunk-545f01b1.js +49 -0
- package/dist/cjs/chunk-59b91990.js +64 -0
- package/dist/cjs/chunk-5b2a3329.js +394 -0
- package/dist/cjs/chunk-60061aa8.js +172 -0
- package/dist/cjs/chunk-67658e54.js +404 -0
- package/dist/cjs/chunk-6963026a.js +86 -0
- package/dist/cjs/chunk-6cece6b7.js +140 -0
- package/dist/cjs/chunk-6d6465c1.js +140 -0
- package/dist/cjs/chunk-6e9c0aca.js +94 -0
- package/dist/cjs/chunk-77f69fca.js +106 -0
- package/dist/cjs/chunk-7a25d736.js +114 -0
- package/dist/cjs/chunk-876befa8.js +247 -0
- package/dist/cjs/chunk-8985ffff.js +105 -0
- package/dist/cjs/chunk-8a05c8c9.js +207 -0
- package/dist/cjs/chunk-90407463.js +258 -0
- package/dist/cjs/chunk-956525c9.js +106 -0
- package/dist/cjs/chunk-96ce35a2.js +114 -0
- package/dist/cjs/chunk-9da1d120.js +86 -0
- package/dist/cjs/chunk-9f6a8079.js +54 -0
- package/dist/cjs/chunk-a60dc21d.js +281 -0
- package/dist/cjs/chunk-b628277d.js +199 -0
- package/dist/cjs/chunk-c146745e.js +153 -0
- package/dist/cjs/chunk-c2aec7a9.js +547 -0
- package/dist/cjs/chunk-c9641331.js +86 -0
- package/dist/cjs/chunk-d492406b.js +172 -0
- package/dist/cjs/chunk-e0aa62a0.js +404 -0
- package/dist/cjs/chunk-e45e0329.js +48 -0
- package/dist/cjs/chunk-e5de6583.js +207 -0
- package/dist/cjs/chunk-e85cceb6.js +258 -0
- package/dist/cjs/chunk-ed5addd6.js +547 -0
- package/dist/cjs/chunk-ef4753d5.js +283 -0
- package/dist/cjs/chunk-f0c597f9.js +199 -0
- package/dist/cjs/chunk-f1df1c63.js +9 -0
- package/dist/cjs/chunk-f1ee2f5c.js +207 -0
- package/dist/cjs/chunk-fbd4d545.js +247 -0
- package/dist/cjs/clockpicker.js +447 -0
- package/dist/cjs/collapse.js +102 -0
- package/dist/cjs/datepicker.js +1281 -0
- package/dist/cjs/dialog.js +237 -0
- package/dist/cjs/dropdown.js +19 -0
- package/dist/cjs/field.js +18 -0
- package/dist/cjs/icon.js +17 -0
- package/dist/cjs/index.js +164 -0
- package/dist/cjs/input.js +20 -0
- package/dist/cjs/loading.js +166 -0
- package/dist/cjs/menu.js +231 -0
- package/dist/cjs/message.js +65 -0
- package/dist/cjs/modal.js +48 -0
- package/dist/cjs/navbar.js +258 -0
- package/dist/cjs/notification.js +142 -0
- package/dist/cjs/numberinput.js +191 -0
- package/dist/cjs/pagination.js +19 -0
- package/dist/cjs/progress.js +151 -0
- package/dist/cjs/radio.js +224 -0
- package/dist/cjs/select.js +20 -0
- package/dist/cjs/slider.js +511 -0
- package/dist/cjs/snackbar.js +114 -0
- package/dist/cjs/steps.js +352 -0
- package/dist/cjs/switch.js +144 -0
- package/dist/cjs/table.js +877 -0
- package/dist/cjs/tabs.js +258 -0
- package/dist/cjs/tag.js +63 -0
- package/dist/cjs/taginput.js +297 -0
- package/dist/cjs/timepicker.js +75 -0
- package/dist/cjs/toast.js +89 -0
- package/dist/cjs/tooltip.js +17 -0
- package/dist/cjs/upload.js +210 -0
- package/dist/components/autocomplete/index.js +1084 -2
- package/dist/components/autocomplete/index.min.js +2 -0
- package/dist/components/button/index.js +425 -2
- package/dist/components/button/index.min.js +2 -0
- package/dist/components/checkbox/index.js +342 -2
- package/dist/components/checkbox/index.min.js +2 -0
- package/dist/components/clockpicker/index.js +2340 -2
- package/dist/components/clockpicker/index.min.js +2 -0
- package/dist/components/collapse/index.js +201 -2
- package/dist/components/collapse/index.min.js +2 -0
- package/dist/components/datepicker/index.js +2720 -2
- package/dist/components/datepicker/index.min.js +2 -0
- package/dist/components/dialog/index.js +768 -2
- package/dist/components/dialog/index.min.js +2 -0
- package/dist/components/dropdown/index.js +555 -2
- package/dist/components/dropdown/index.min.js +2 -0
- package/dist/components/field/index.js +447 -2
- package/dist/components/field/index.min.js +2 -0
- package/dist/components/icon/index.js +322 -2
- package/dist/components/icon/index.min.js +2 -0
- package/dist/components/input/index.js +675 -2
- package/dist/components/input/index.min.js +2 -0
- package/dist/components/loading/index.js +282 -2
- package/dist/components/loading/index.min.js +2 -0
- package/dist/components/menu/index.js +550 -2
- package/dist/components/menu/index.min.js +2 -0
- package/dist/components/message/index.js +482 -2
- package/dist/components/message/index.min.js +2 -0
- package/dist/components/modal/index.js +400 -2
- package/dist/components/modal/index.min.js +2 -0
- package/dist/components/navbar/index.js +371 -0
- package/dist/components/navbar/index.min.js +2 -0
- package/dist/components/notification/index.js +705 -2
- package/dist/components/notification/index.min.js +2 -0
- package/dist/components/numberinput/index.js +846 -2
- package/dist/components/numberinput/index.min.js +2 -0
- package/dist/components/pagination/index.js +577 -2
- package/dist/components/pagination/index.min.js +2 -0
- package/dist/components/progress/index.js +250 -0
- package/dist/components/progress/index.min.js +2 -0
- package/dist/components/radio/index.js +323 -2
- package/dist/components/radio/index.min.js +2 -0
- package/dist/components/select/index.js +571 -2
- package/dist/components/select/index.min.js +2 -0
- package/dist/components/slider/index.js +764 -0
- package/dist/components/slider/index.min.js +2 -0
- package/dist/components/snackbar/index.js +397 -2
- package/dist/components/snackbar/index.min.js +2 -0
- package/dist/components/steps/index.js +721 -2
- package/dist/components/steps/index.min.js +2 -0
- package/dist/components/switch/index.js +243 -2
- package/dist/components/switch/index.min.js +2 -0
- package/dist/components/table/index.js +1870 -2
- package/dist/components/table/index.min.js +2 -0
- package/dist/components/tabs/index.js +627 -2
- package/dist/components/tabs/index.min.js +2 -0
- package/dist/components/tag/index.js +262 -2
- package/dist/components/tag/index.min.js +2 -0
- package/dist/components/taginput/index.js +1459 -2
- package/dist/components/taginput/index.min.js +2 -0
- package/dist/components/timepicker/index.js +2053 -2
- package/dist/components/timepicker/index.min.js +2 -0
- package/dist/components/toast/index.js +372 -2
- package/dist/components/toast/index.min.js +2 -0
- package/dist/components/tooltip/index.js +236 -2
- package/dist/components/tooltip/index.min.js +2 -0
- package/dist/components/upload/index.js +501 -2
- package/dist/components/upload/index.min.js +2 -0
- package/dist/esm/autocomplete.js +18 -0
- package/dist/esm/button.js +102 -0
- package/dist/esm/checkbox.js +131 -0
- package/dist/esm/chunk-00e3e67f.js +401 -0
- package/dist/esm/chunk-051f8b06.js +105 -0
- package/dist/esm/chunk-0566c90d.js +152 -0
- package/dist/esm/chunk-07e19446.js +545 -0
- package/dist/esm/chunk-085a700d.js +7 -0
- package/dist/esm/chunk-0ad6938a.js +53 -0
- package/dist/esm/chunk-0e3f4fb5.js +52 -0
- package/dist/esm/chunk-10c85529.js +151 -0
- package/dist/esm/chunk-121b1efa.js +197 -0
- package/dist/esm/chunk-19dad95e.js +256 -0
- package/dist/esm/chunk-231b6066.js +113 -0
- package/dist/esm/chunk-24d1a01f.js +279 -0
- package/dist/esm/chunk-297bff6b.js +393 -0
- package/dist/esm/chunk-2b2ae5c6.js +245 -0
- package/dist/esm/chunk-2cb6f867.js +46 -0
- package/dist/esm/chunk-33717194.js +392 -0
- package/dist/esm/chunk-3b811b77.js +139 -0
- package/dist/esm/chunk-3e47308f.js +104 -0
- package/dist/esm/chunk-411d6eea.js +84 -0
- package/dist/esm/chunk-4535dec5.js +92 -0
- package/dist/esm/chunk-47a5f3a1.js +103 -0
- package/dist/esm/chunk-4a5384da.js +205 -0
- package/dist/esm/chunk-4b663574.js +112 -0
- package/dist/esm/chunk-4d393f09.js +170 -0
- package/dist/esm/chunk-4d695899.js +257 -0
- package/dist/esm/chunk-4f508891.js +171 -0
- package/dist/esm/chunk-531b8274.js +281 -0
- package/dist/esm/chunk-591ee4a2.js +151 -0
- package/dist/esm/chunk-5d3bf82e.js +170 -0
- package/dist/esm/chunk-5e0b0665.js +104 -0
- package/dist/esm/chunk-648b9aa4.js +45 -0
- package/dist/esm/chunk-666940cf.js +546 -0
- package/dist/esm/chunk-67c97e13.js +246 -0
- package/dist/esm/chunk-6844653e.js +401 -0
- package/dist/esm/chunk-699b7cb4.js +245 -0
- package/dist/esm/chunk-6f881e7d.js +51 -0
- package/dist/esm/chunk-7123d158.js +256 -0
- package/dist/esm/chunk-7cf87590.js +60 -0
- package/dist/esm/chunk-823177ac.js +545 -0
- package/dist/esm/chunk-8838757a.js +401 -0
- package/dist/esm/chunk-8ca878c0.js +198 -0
- package/dist/esm/chunk-8fc2e874.js +85 -0
- package/dist/esm/chunk-912ed715.js +92 -0
- package/dist/esm/chunk-92acc21f.js +392 -0
- package/dist/esm/chunk-98e86f40.js +197 -0
- package/dist/esm/chunk-99a1f9df.js +92 -0
- package/dist/esm/chunk-9a776697.js +112 -0
- package/dist/esm/chunk-9e3207cc.js +46 -0
- package/dist/esm/chunk-9ec14e09.js +112 -0
- package/dist/esm/chunk-a5ea70d0.js +205 -0
- package/dist/esm/chunk-ac3f4847.js +138 -0
- package/dist/esm/chunk-b5376f3e.js +92 -0
- package/dist/esm/chunk-b56eb2c8.js +197 -0
- package/dist/esm/chunk-b796d1b2.js +392 -0
- package/dist/esm/chunk-b822a5db.js +205 -0
- package/dist/esm/chunk-b9bdb0e4.js +6 -0
- package/dist/esm/chunk-bfe15983.js +401 -0
- package/dist/esm/chunk-c9039f68.js +104 -0
- package/dist/esm/chunk-cc718c15.js +245 -0
- package/dist/esm/chunk-cca88db8.js +99 -0
- package/dist/esm/chunk-d6200087.js +50 -0
- package/dist/esm/chunk-daeac852.js +138 -0
- package/dist/esm/chunk-db31c548.js +103 -0
- package/dist/esm/chunk-e5568f45.js +84 -0
- package/dist/esm/chunk-e5fce48f.js +59 -0
- package/dist/esm/chunk-e84b4047.js +170 -0
- package/dist/esm/chunk-e8d90b72.js +98 -0
- package/dist/esm/chunk-e932bb68.js +206 -0
- package/dist/esm/chunk-edd8ff91.js +103 -0
- package/dist/esm/chunk-f0465d8d.js +84 -0
- package/dist/esm/chunk-f743d154.js +93 -0
- package/dist/esm/chunk-f8036b32.js +402 -0
- package/dist/esm/chunk-f984748f.js +401 -0
- package/dist/esm/chunk-fd5b0e1e.js +99 -0
- package/dist/esm/clockpicker.js +443 -0
- package/dist/esm/collapse.js +98 -0
- package/dist/esm/datepicker.js +1277 -0
- package/dist/esm/dialog.js +231 -0
- package/dist/esm/dropdown.js +14 -0
- package/dist/esm/field.js +14 -0
- package/dist/esm/icon.js +13 -0
- package/dist/esm/index.js +154 -0
- package/dist/esm/input.js +16 -0
- package/dist/esm/loading.js +159 -0
- package/dist/esm/menu.js +225 -0
- package/dist/esm/message.js +61 -0
- package/dist/esm/modal.js +42 -0
- package/dist/esm/navbar.js +253 -0
- package/dist/esm/notification.js +135 -0
- package/dist/esm/numberinput.js +187 -0
- package/dist/esm/pagination.js +15 -0
- package/dist/esm/progress.js +147 -0
- package/dist/esm/radio.js +219 -0
- package/dist/esm/select.js +16 -0
- package/dist/esm/slider.js +506 -0
- package/dist/esm/snackbar.js +108 -0
- package/dist/esm/steps.js +347 -0
- package/dist/esm/switch.js +140 -0
- package/dist/esm/table.js +872 -0
- package/dist/esm/tabs.js +253 -0
- package/dist/esm/tag.js +59 -0
- package/dist/esm/taginput.js +293 -0
- package/dist/esm/timepicker.js +71 -0
- package/dist/esm/toast.js +83 -0
- package/dist/esm/tooltip.js +13 -0
- package/dist/esm/upload.js +206 -0
- package/package.json +26 -4
- package/src/components/checkbox/Checkbox.vue +12 -4
- package/src/components/checkbox/CheckboxButton.vue +10 -2
- package/src/components/clockpicker/Clockpicker.vue +0 -5
- package/src/components/datepicker/Datepicker.spec.js +60 -0
- package/src/components/datepicker/Datepicker.vue +46 -19
- package/src/components/datepicker/DatepickerTable.spec.js +107 -2
- package/src/components/datepicker/DatepickerTable.vue +73 -4
- package/src/components/datepicker/DatepickerTableRow.spec.js +127 -17
- package/src/components/datepicker/DatepickerTableRow.vue +103 -4
- package/src/components/dialog/Dialog.vue +5 -3
- package/src/components/dialog/index.js +2 -2
- package/src/components/dropdown/Dropdown.vue +1 -4
- package/src/components/dropdown/DropdownItem.vue +7 -3
- package/src/components/field/Field.spec.js +18 -0
- package/src/components/field/Field.vue +21 -2
- package/src/components/index.js +6 -0
- package/src/components/input/Input.vue +2 -2
- package/src/components/loading/index.js +1 -1
- package/src/components/modal/index.js +1 -1
- package/src/components/navbar/NavBar.spec.js +76 -0
- package/src/components/navbar/Navbar.vue +127 -0
- package/src/components/navbar/NavbarBurger.vue +25 -0
- package/src/components/navbar/NavbarItem.vue +21 -0
- package/src/components/navbar/index.js +20 -0
- package/src/components/notification/index.js +1 -1
- package/src/components/pagination/Pagination.vue +28 -6
- package/src/components/progress/Progress.spec.js +77 -0
- package/src/components/progress/Progress.vue +108 -0
- package/src/components/progress/__snapshots__/Progress.spec.js.snap +7 -0
- package/src/components/progress/index.js +17 -0
- package/src/components/radio/Radio.spec.js +18 -1
- package/src/components/radio/Radio.vue +11 -5
- package/src/components/radio/RadioButton.spec.js +18 -1
- package/src/components/radio/RadioButton.vue +20 -8
- package/src/components/select/Select.spec.js +22 -1
- package/src/components/select/Select.vue +2 -1
- package/src/components/select/__snapshots__/Select.spec.js.snap +7 -0
- package/src/components/slider/Slider.spec.js +10 -0
- package/src/components/slider/Slider.vue +240 -0
- package/src/components/slider/SliderThumb.vue +188 -0
- package/src/components/slider/SliderTick.vue +43 -0
- package/src/components/slider/index.js +20 -0
- package/src/components/snackbar/index.js +2 -2
- package/src/components/steps/StepItem.vue +2 -3
- package/src/components/steps/Steps.vue +7 -5
- package/src/components/switch/Switch.spec.js +29 -0
- package/src/components/switch/Switch.vue +29 -5
- package/src/components/switch/__snapshots__/Switch.spec.js.snap +3 -0
- package/src/components/table/Table.vue +30 -8
- package/src/components/table/TableColumn.vue +2 -2
- package/src/components/tag/Tag.vue +4 -1
- package/src/components/taginput/Taginput.spec.js +10 -0
- package/src/components/taginput/Taginput.vue +8 -3
- package/src/components/toast/index.js +2 -2
- package/src/components/tooltip/Tooltip.vue +5 -5
- package/src/components/upload/Upload.vue +15 -8
- package/src/index.js +11 -4
- package/src/scss/buefy-build.scss +3 -3
- package/src/scss/buefy.scss +4 -0
- package/src/scss/components/_datepicker.scss +40 -1
- package/src/scss/components/_form.scss +52 -1
- package/src/scss/components/_progress.scss +45 -0
- package/src/scss/components/_radio.scss +14 -14
- package/src/scss/components/_slider.scss +138 -0
- package/src/scss/components/_steps.scss +4 -4
- package/src/scss/components/_switch.scss +54 -2
- package/src/scss/components/_taginput.scss +3 -0
- package/src/scss/components/_upload.scss +1 -3
- package/src/utils/SlotComponent.js +9 -2
- package/src/utils/TimepickerMixin.js +17 -6
- package/src/utils/config.js +4 -1
- package/src/utils/helpers.spec.js +67 -0
- package/src/utils/plugins.js +2 -1
- package/types/components.d.ts +3 -3
- package/types/index.d.ts +24 -11
- package/dist/components/index.js +0 -2
|
@@ -1,2 +1,501 @@
|
|
|
1
|
-
/*! Buefy v0.
|
|
2
|
-
|
|
1
|
+
/*! Buefy v0.8.2 | 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.Upload = {}));
|
|
6
|
+
}(this, function (exports) { 'use strict';
|
|
7
|
+
|
|
8
|
+
var config = {
|
|
9
|
+
defaultContainerElement: null,
|
|
10
|
+
defaultIconPack: 'mdi',
|
|
11
|
+
defaultIconComponent: null,
|
|
12
|
+
defaultDialogConfirmText: null,
|
|
13
|
+
defaultDialogCancelText: null,
|
|
14
|
+
defaultSnackbarDuration: 3500,
|
|
15
|
+
defaultSnackbarPosition: null,
|
|
16
|
+
defaultToastDuration: 2000,
|
|
17
|
+
defaultToastPosition: null,
|
|
18
|
+
defaultNotificationDuration: 2000,
|
|
19
|
+
defaultNotificationPosition: null,
|
|
20
|
+
defaultTooltipType: 'is-primary',
|
|
21
|
+
defaultTooltipAnimated: false,
|
|
22
|
+
defaultTooltipDelay: 0,
|
|
23
|
+
defaultInputAutocomplete: 'on',
|
|
24
|
+
defaultDateFormatter: null,
|
|
25
|
+
defaultDateParser: null,
|
|
26
|
+
defaultDateCreator: null,
|
|
27
|
+
defaultDayNames: null,
|
|
28
|
+
defaultMonthNames: null,
|
|
29
|
+
defaultFirstDayOfWeek: null,
|
|
30
|
+
defaultUnselectableDaysOfWeek: null,
|
|
31
|
+
defaultTimeFormatter: null,
|
|
32
|
+
defaultTimeParser: null,
|
|
33
|
+
defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
|
|
34
|
+
defaultModalScroll: null,
|
|
35
|
+
defaultDatepickerMobileNative: true,
|
|
36
|
+
defaultTimepickerMobileNative: true,
|
|
37
|
+
defaultNoticeQueue: true,
|
|
38
|
+
defaultInputHasCounter: true,
|
|
39
|
+
defaultTaginputHasCounter: true,
|
|
40
|
+
defaultUseHtml5Validation: true,
|
|
41
|
+
defaultDropdownMobileModal: true,
|
|
42
|
+
defaultFieldLabelPosition: null,
|
|
43
|
+
defaultDatepickerYearsRange: [-100, 3],
|
|
44
|
+
defaultDatepickerNearbyMonthDays: true,
|
|
45
|
+
defaultDatepickerNearbySelectableMonthDays: false,
|
|
46
|
+
defaultDatepickerShowWeekNumber: false
|
|
47
|
+
};
|
|
48
|
+
var config$1 = config;
|
|
49
|
+
|
|
50
|
+
var FormElementMixin = {
|
|
51
|
+
props: {
|
|
52
|
+
size: String,
|
|
53
|
+
expanded: Boolean,
|
|
54
|
+
loading: Boolean,
|
|
55
|
+
rounded: Boolean,
|
|
56
|
+
icon: String,
|
|
57
|
+
iconPack: String,
|
|
58
|
+
// Native options to use in HTML5 validation
|
|
59
|
+
autocomplete: String,
|
|
60
|
+
maxlength: [Number, String],
|
|
61
|
+
useHtml5Validation: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: function _default() {
|
|
64
|
+
return config$1.defaultUseHtml5Validation;
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
validationMessage: String
|
|
68
|
+
},
|
|
69
|
+
data: function data() {
|
|
70
|
+
return {
|
|
71
|
+
isValid: true,
|
|
72
|
+
isFocused: false,
|
|
73
|
+
newIconPack: this.iconPack || config$1.defaultIconPack
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
computed: {
|
|
77
|
+
/**
|
|
78
|
+
* Find parent Field, max 3 levels deep.
|
|
79
|
+
*/
|
|
80
|
+
parentField: function parentField() {
|
|
81
|
+
var parent = this.$parent;
|
|
82
|
+
|
|
83
|
+
for (var i = 0; i < 3; i++) {
|
|
84
|
+
if (parent && !parent.$data._isField) {
|
|
85
|
+
parent = parent.$parent;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return parent;
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Get the type prop from parent if it's a Field.
|
|
94
|
+
*/
|
|
95
|
+
statusType: function statusType() {
|
|
96
|
+
if (!this.parentField) return;
|
|
97
|
+
if (!this.parentField.newType) return;
|
|
98
|
+
|
|
99
|
+
if (typeof this.parentField.newType === 'string') {
|
|
100
|
+
return this.parentField.newType;
|
|
101
|
+
} else {
|
|
102
|
+
for (var key in this.parentField.newType) {
|
|
103
|
+
if (this.parentField.newType[key]) {
|
|
104
|
+
return key;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Get the message prop from parent if it's a Field.
|
|
112
|
+
*/
|
|
113
|
+
statusMessage: function statusMessage() {
|
|
114
|
+
if (!this.parentField) return;
|
|
115
|
+
return this.parentField.newMessage;
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Fix icon size for inputs, large was too big
|
|
120
|
+
*/
|
|
121
|
+
iconSize: function iconSize() {
|
|
122
|
+
switch (this.size) {
|
|
123
|
+
case 'is-small':
|
|
124
|
+
return this.size;
|
|
125
|
+
|
|
126
|
+
case 'is-medium':
|
|
127
|
+
return;
|
|
128
|
+
|
|
129
|
+
case 'is-large':
|
|
130
|
+
return this.newIconPack === 'mdi' ? 'is-medium' : '';
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
methods: {
|
|
135
|
+
/**
|
|
136
|
+
* Focus method that work dynamically depending on the component.
|
|
137
|
+
*/
|
|
138
|
+
focus: function focus() {
|
|
139
|
+
var _this = this;
|
|
140
|
+
|
|
141
|
+
if (this.$data._elementRef === undefined) return;
|
|
142
|
+
this.$nextTick(function () {
|
|
143
|
+
var el = _this.$el.querySelector(_this.$data._elementRef);
|
|
144
|
+
|
|
145
|
+
if (el) el.focus();
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
onBlur: function onBlur($event) {
|
|
149
|
+
this.isFocused = false;
|
|
150
|
+
this.$emit('blur', $event);
|
|
151
|
+
this.checkHtml5Validity();
|
|
152
|
+
},
|
|
153
|
+
onFocus: function onFocus($event) {
|
|
154
|
+
this.isFocused = true;
|
|
155
|
+
this.$emit('focus', $event);
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Check HTML5 validation, set isValid property.
|
|
160
|
+
* If validation fail, send 'is-danger' type,
|
|
161
|
+
* and error message to parent if it's a Field.
|
|
162
|
+
*/
|
|
163
|
+
checkHtml5Validity: function checkHtml5Validity() {
|
|
164
|
+
var _this2 = this;
|
|
165
|
+
|
|
166
|
+
if (!this.useHtml5Validation) return;
|
|
167
|
+
if (this.$refs[this.$data._elementRef] === undefined) return;
|
|
168
|
+
var el = this.$el.querySelector(this.$data._elementRef);
|
|
169
|
+
var type = null;
|
|
170
|
+
var message = null;
|
|
171
|
+
var isValid = true;
|
|
172
|
+
|
|
173
|
+
if (!el.checkValidity()) {
|
|
174
|
+
type = 'is-danger';
|
|
175
|
+
message = this.validationMessage || el.validationMessage;
|
|
176
|
+
isValid = false;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
this.isValid = isValid;
|
|
180
|
+
this.$nextTick(function () {
|
|
181
|
+
if (_this2.parentField) {
|
|
182
|
+
// Set type only if not defined
|
|
183
|
+
if (!_this2.parentField.type) {
|
|
184
|
+
_this2.parentField.newType = type;
|
|
185
|
+
} // Set message only if not defined
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
if (!_this2.parentField.message) {
|
|
189
|
+
_this2.parentField.newMessage = message;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
return this.isValid;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
// Polyfills for SSR
|
|
199
|
+
var isSSR = typeof window === 'undefined';
|
|
200
|
+
var HTMLElement = isSSR ? Object : window.HTMLElement;
|
|
201
|
+
var File = isSSR ? Object : window.File;
|
|
202
|
+
|
|
203
|
+
//
|
|
204
|
+
var script = {
|
|
205
|
+
name: 'BUpload',
|
|
206
|
+
mixins: [FormElementMixin],
|
|
207
|
+
inheritAttrs: false,
|
|
208
|
+
props: {
|
|
209
|
+
value: {
|
|
210
|
+
type: [Object, Function, File, Array]
|
|
211
|
+
},
|
|
212
|
+
multiple: Boolean,
|
|
213
|
+
disabled: Boolean,
|
|
214
|
+
accept: String,
|
|
215
|
+
dragDrop: Boolean,
|
|
216
|
+
type: {
|
|
217
|
+
type: String,
|
|
218
|
+
default: 'is-primary'
|
|
219
|
+
},
|
|
220
|
+
native: {
|
|
221
|
+
type: Boolean,
|
|
222
|
+
default: false
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
data: function data() {
|
|
226
|
+
return {
|
|
227
|
+
newValue: this.value,
|
|
228
|
+
dragDropFocus: false,
|
|
229
|
+
_elementRef: 'input'
|
|
230
|
+
};
|
|
231
|
+
},
|
|
232
|
+
watch: {
|
|
233
|
+
/**
|
|
234
|
+
* When v-model is changed:
|
|
235
|
+
* 1. Get value from input file
|
|
236
|
+
* 2. Set internal value.
|
|
237
|
+
* 3. Reset input value if array is empty or when input file is not found in newValue
|
|
238
|
+
* 4. If it's invalid, validate again.
|
|
239
|
+
*/
|
|
240
|
+
value: function value(_value) {
|
|
241
|
+
var inputFiles = this.$refs.input.files;
|
|
242
|
+
this.newValue = _value;
|
|
243
|
+
|
|
244
|
+
if (!this.newValue || Array.isArray(this.newValue) && this.newValue.length === 0 || !inputFiles[0] || Array.isArray(this.newValue) && !this.newValue.some(function (a) {
|
|
245
|
+
return a.name === inputFiles[0].name;
|
|
246
|
+
})) {
|
|
247
|
+
this.$refs.input.value = null;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
!this.isValid && !this.dragDrop && this.checkHtml5Validity();
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
methods: {
|
|
254
|
+
/**
|
|
255
|
+
* Listen change event on input type 'file',
|
|
256
|
+
* emit 'input' event and validate
|
|
257
|
+
*/
|
|
258
|
+
onFileChange: function onFileChange(event) {
|
|
259
|
+
if (this.disabled || this.loading) return;
|
|
260
|
+
|
|
261
|
+
if (this.dragDrop) {
|
|
262
|
+
this.updateDragDropFocus(false);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
var value = event.target.files || event.dataTransfer.files;
|
|
266
|
+
|
|
267
|
+
if (value.length === 0) {
|
|
268
|
+
if (!this.newValue) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (this.native) {
|
|
273
|
+
this.newValue = null;
|
|
274
|
+
}
|
|
275
|
+
} else if (!this.multiple) {
|
|
276
|
+
// only one element in case drag drop mode and isn't multiple
|
|
277
|
+
if (this.dragDrop && value.length !== 1) return;else {
|
|
278
|
+
var file = value[0];
|
|
279
|
+
|
|
280
|
+
if (this.checkType(file)) {
|
|
281
|
+
this.newValue = file;
|
|
282
|
+
} else if (this.newValue) {
|
|
283
|
+
this.newValue = null;
|
|
284
|
+
} else {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
} else {
|
|
289
|
+
// always new values if native or undefined local
|
|
290
|
+
var newValues = false;
|
|
291
|
+
|
|
292
|
+
if (this.native || !this.newValue) {
|
|
293
|
+
this.newValue = [];
|
|
294
|
+
newValues = true;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
for (var i = 0; i < value.length; i++) {
|
|
298
|
+
var _file = value[i];
|
|
299
|
+
|
|
300
|
+
if (this.checkType(_file)) {
|
|
301
|
+
this.newValue.push(_file);
|
|
302
|
+
newValues = true;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
if (!newValues) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
this.$emit('input', this.newValue);
|
|
312
|
+
!this.dragDrop && this.checkHtml5Validity();
|
|
313
|
+
},
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Listen drag-drop to update internal variable
|
|
317
|
+
*/
|
|
318
|
+
updateDragDropFocus: function updateDragDropFocus(focus) {
|
|
319
|
+
if (!this.disabled && !this.loading) {
|
|
320
|
+
this.dragDropFocus = focus;
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Check mime type of file
|
|
326
|
+
*/
|
|
327
|
+
checkType: function checkType(file) {
|
|
328
|
+
if (!this.accept) return true;
|
|
329
|
+
var types = this.accept.split(',');
|
|
330
|
+
if (types.length === 0) return true;
|
|
331
|
+
var valid = false;
|
|
332
|
+
|
|
333
|
+
for (var i = 0; i < types.length && !valid; i++) {
|
|
334
|
+
var type = types[i].trim();
|
|
335
|
+
|
|
336
|
+
if (type) {
|
|
337
|
+
if (type.substring(0, 1) === '.') {
|
|
338
|
+
// check extension
|
|
339
|
+
var extIndex = file.name.lastIndexOf('.');
|
|
340
|
+
var extension = extIndex >= 0 ? file.name.substring(extIndex) : '';
|
|
341
|
+
|
|
342
|
+
if (extension.toLowerCase() === type.toLowerCase()) {
|
|
343
|
+
valid = true;
|
|
344
|
+
}
|
|
345
|
+
} else {
|
|
346
|
+
// check mime type
|
|
347
|
+
if (file.type.match(type)) {
|
|
348
|
+
valid = true;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
return valid;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
|
|
360
|
+
/* server only */
|
|
361
|
+
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
362
|
+
if (typeof shadowMode !== 'boolean') {
|
|
363
|
+
createInjectorSSR = createInjector;
|
|
364
|
+
createInjector = shadowMode;
|
|
365
|
+
shadowMode = false;
|
|
366
|
+
} // Vue.extend constructor export interop.
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
var options = typeof script === 'function' ? script.options : script; // render functions
|
|
370
|
+
|
|
371
|
+
if (template && template.render) {
|
|
372
|
+
options.render = template.render;
|
|
373
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
374
|
+
options._compiled = true; // functional template
|
|
375
|
+
|
|
376
|
+
if (isFunctionalTemplate) {
|
|
377
|
+
options.functional = true;
|
|
378
|
+
}
|
|
379
|
+
} // scopedId
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
if (scopeId) {
|
|
383
|
+
options._scopeId = scopeId;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
var hook;
|
|
387
|
+
|
|
388
|
+
if (moduleIdentifier) {
|
|
389
|
+
// server build
|
|
390
|
+
hook = function hook(context) {
|
|
391
|
+
// 2.3 injection
|
|
392
|
+
context = context || // cached call
|
|
393
|
+
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
394
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
|
|
395
|
+
// 2.2 with runInNewContext: true
|
|
396
|
+
|
|
397
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
398
|
+
context = __VUE_SSR_CONTEXT__;
|
|
399
|
+
} // inject component styles
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
if (style) {
|
|
403
|
+
style.call(this, createInjectorSSR(context));
|
|
404
|
+
} // register component module identifier for async chunk inference
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
if (context && context._registeredComponents) {
|
|
408
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
409
|
+
}
|
|
410
|
+
}; // used by ssr in case component is cached and beforeCreate
|
|
411
|
+
// never gets called
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
options._ssrRegister = hook;
|
|
415
|
+
} else if (style) {
|
|
416
|
+
hook = shadowMode ? function () {
|
|
417
|
+
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
|
|
418
|
+
} : function (context) {
|
|
419
|
+
style.call(this, createInjector(context));
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
if (hook) {
|
|
424
|
+
if (options.functional) {
|
|
425
|
+
// register for functional component in vue file
|
|
426
|
+
var originalRender = options.render;
|
|
427
|
+
|
|
428
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
429
|
+
hook.call(context);
|
|
430
|
+
return originalRender(h, context);
|
|
431
|
+
};
|
|
432
|
+
} else {
|
|
433
|
+
// inject component registration as beforeCreate hook
|
|
434
|
+
var existing = options.beforeCreate;
|
|
435
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
return script;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
var normalizeComponent_1 = normalizeComponent;
|
|
443
|
+
|
|
444
|
+
/* script */
|
|
445
|
+
const __vue_script__ = script;
|
|
446
|
+
|
|
447
|
+
/* template */
|
|
448
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('label',{staticClass:"upload control"},[(!_vm.dragDrop)?[_vm._t("default")]:_c('div',{staticClass:"upload-draggable",class:[_vm.type, {
|
|
449
|
+
'is-loading': _vm.loading,
|
|
450
|
+
'is-disabled': _vm.disabled,
|
|
451
|
+
'is-hovered': _vm.dragDropFocus
|
|
452
|
+
}],on:{"dragover":function($event){$event.preventDefault();_vm.updateDragDropFocus(true);},"dragleave":function($event){$event.preventDefault();_vm.updateDragDropFocus(false);},"dragenter":function($event){$event.preventDefault();_vm.updateDragDropFocus(true);},"drop":function($event){$event.preventDefault();_vm.onFileChange($event);}}},[_vm._t("default")],2),_vm._v(" "),_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)};
|
|
453
|
+
var __vue_staticRenderFns__ = [];
|
|
454
|
+
|
|
455
|
+
/* style */
|
|
456
|
+
const __vue_inject_styles__ = undefined;
|
|
457
|
+
/* scoped */
|
|
458
|
+
const __vue_scope_id__ = undefined;
|
|
459
|
+
/* module identifier */
|
|
460
|
+
const __vue_module_identifier__ = undefined;
|
|
461
|
+
/* functional template */
|
|
462
|
+
const __vue_is_functional_template__ = false;
|
|
463
|
+
/* style inject */
|
|
464
|
+
|
|
465
|
+
/* style inject SSR */
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
var Upload = normalizeComponent_1(
|
|
470
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
471
|
+
__vue_inject_styles__,
|
|
472
|
+
__vue_script__,
|
|
473
|
+
__vue_scope_id__,
|
|
474
|
+
__vue_is_functional_template__,
|
|
475
|
+
__vue_module_identifier__,
|
|
476
|
+
undefined,
|
|
477
|
+
undefined
|
|
478
|
+
);
|
|
479
|
+
|
|
480
|
+
var use = function use(plugin) {
|
|
481
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
482
|
+
window.Vue.use(plugin);
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
var registerComponent = function registerComponent(Vue, component) {
|
|
486
|
+
Vue.component(component.name, component);
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
var Plugin = {
|
|
490
|
+
install: function install(Vue) {
|
|
491
|
+
registerComponent(Vue, Upload);
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
use(Plugin);
|
|
495
|
+
|
|
496
|
+
exports.Upload = Upload;
|
|
497
|
+
exports.default = Plugin;
|
|
498
|
+
|
|
499
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
500
|
+
|
|
501
|
+
}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! Buefy v0.8.2 | 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).Upload={})}(this,function(e){"use strict";var t={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultSnackbarPosition:null,defaultToastDuration:2e3,defaultToastPosition:null,defaultNotificationDuration:2e3,defaultNotificationPosition:null,defaultTooltipType:"is-primary",defaultTooltipAnimated:!1,defaultTooltipDelay:0,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator: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,3],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1,defaultDatepickerShowWeekNumber:!1},i={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},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(){if(this.parentField&&this.parentField.newType){if("string"==typeof this.parentField.newType)return this.parentField.newType;for(var e in this.parentField.newType)if(this.parentField.newType[e])return e}},statusMessage:function(){if(this.parentField)return this.parentField.newMessage},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;void 0!==this.$data._elementRef&&this.$nextTick(function(){var t=e.$el.querySelector(e.$data._elementRef);t&&t.focus()})},onBlur:function(e){this.isFocused=!1,this.$emit("blur",e),this.checkHtml5Validity()},onFocus:function(e){this.isFocused=!0,this.$emit("focus",e)},checkHtml5Validity:function(){var e=this;if(this.useHtml5Validation&&void 0!==this.$refs[this.$data._elementRef]){var t=this.$el.querySelector(this.$data._elementRef),i=null,n=null,a=!0;return t.checkValidity()||(i="is-danger",n=this.validationMessage||t.validationMessage,a=!1),this.isValid=a,this.$nextTick(function(){e.parentField&&(e.parentField.type||(e.parentField.newType=i),e.parentField.message||(e.parentField.newMessage=n))}),this.isValid}}}},n="undefined"==typeof window,a=(n?Object:window.HTMLElement,n?Object:window.File);var l,o=function(e,t,i,n,a,l,o,r,s,u){"boolean"!=typeof o&&(s=r,r=o,o=!1);var d,f="function"==typeof i?i.options:i;if(e&&e.render&&(f.render=e.render,f.staticRenderFns=e.staticRenderFns,f._compiled=!0,a&&(f.functional=!0)),n&&(f._scopeId=n),l?(d=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,s(e)),e&&e._registeredComponents&&e._registeredComponents.add(l)},f._ssrRegister=d):t&&(d=o?function(){t.call(this,u(this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),d)if(f.functional){var c=f.render;f.render=function(e,t){return d.call(t),c(e,t)}}else{var p=f.beforeCreate;f.beforeCreate=p?[].concat(p,d):[d]}return i}({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("label",{staticClass:"upload control"},[e.dragDrop?i("div",{staticClass:"upload-draggable",class:[e.type,{"is-loading":e.loading,"is-disabled":e.disabled,"is-hovered":e.dragDropFocus}],on:{dragover:function(t){t.preventDefault(),e.updateDragDropFocus(!0)},dragleave:function(t){t.preventDefault(),e.updateDragDropFocus(!1)},dragenter:function(t){t.preventDefault(),e.updateDragDropFocus(!0)},drop:function(t){t.preventDefault(),e.onFileChange(t)}}},[e._t("default")],2):[e._t("default")],e._v(" "),i("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:[]},void 0,{name:"BUpload",mixins:[i],inheritAttrs:!1,props:{value:{type:[Object,Function,a,Array]},multiple:Boolean,disabled:Boolean,accept:String,dragDrop:Boolean,type:{type:String,default:"is-primary"},native:{type:Boolean,default:!1}},data:function(){return{newValue:this.value,dragDropFocus:!1,_elementRef:"input"}},watch:{value:function(e){var t=this.$refs.input.files;this.newValue=e,(!this.newValue||Array.isArray(this.newValue)&&0===this.newValue.length||!t[0]||Array.isArray(this.newValue)&&!this.newValue.some(function(e){return e.name===t[0].name}))&&(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 i=!1;!this.native&&this.newValue||(this.newValue=[],i=!0);for(var n=0;n<t.length;n++){var a=t[n];this.checkType(a)&&(this.newValue.push(a),i=!0)}if(!i)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.newValue=null}}this.$emit("input",this.newValue),!this.dragDrop&&this.checkHtml5Validity()}},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 i=!1,n=0;n<t.length&&!i;n++){var a=t[n].trim();if(a)if("."===a.substring(0,1)){var l=e.name.lastIndexOf(".");(l>=0?e.name.substring(l):"").toLowerCase()===a.toLowerCase()&&(i=!0)}else e.type.match(a)&&(i=!0)}return i}}},void 0,!1,void 0,void 0,void 0),r={install:function(e){!function(e,t){e.component(t.name,t)}(e,o)}};l=r,"undefined"!=typeof window&&window.Vue&&window.Vue.use(l),e.Upload=o,e.default=r,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import './chunk-d6200087.js';
|
|
2
|
+
import './chunk-e5fce48f.js';
|
|
3
|
+
import './chunk-9e3207cc.js';
|
|
4
|
+
import './chunk-10c85529.js';
|
|
5
|
+
import './chunk-e84b4047.js';
|
|
6
|
+
import { r as registerComponent, u as use } from './chunk-cca88db8.js';
|
|
7
|
+
import './chunk-98e86f40.js';
|
|
8
|
+
import { A as Autocomplete } from './chunk-92acc21f.js';
|
|
9
|
+
export { A as Autocomplete } from './chunk-92acc21f.js';
|
|
10
|
+
|
|
11
|
+
var Plugin = {
|
|
12
|
+
install: function install(Vue) {
|
|
13
|
+
registerComponent(Vue, Autocomplete);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
use(Plugin);
|
|
17
|
+
|
|
18
|
+
export default Plugin;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { _ as _defineProperty } from './chunk-d6200087.js';
|
|
2
|
+
import './chunk-9e3207cc.js';
|
|
3
|
+
import { I as Icon } from './chunk-e84b4047.js';
|
|
4
|
+
import { _ as __vue_normalize__, r as registerComponent, u as use } from './chunk-cca88db8.js';
|
|
5
|
+
|
|
6
|
+
var script = {
|
|
7
|
+
name: 'BButton',
|
|
8
|
+
components: _defineProperty({}, Icon.name, Icon),
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
props: {
|
|
11
|
+
type: [String, Object],
|
|
12
|
+
size: String,
|
|
13
|
+
label: String,
|
|
14
|
+
iconPack: String,
|
|
15
|
+
iconLeft: String,
|
|
16
|
+
iconRight: String,
|
|
17
|
+
rounded: Boolean,
|
|
18
|
+
loading: Boolean,
|
|
19
|
+
outlined: Boolean,
|
|
20
|
+
inverted: Boolean,
|
|
21
|
+
focused: Boolean,
|
|
22
|
+
active: Boolean,
|
|
23
|
+
hovered: Boolean,
|
|
24
|
+
selected: Boolean,
|
|
25
|
+
nativeType: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: 'button',
|
|
28
|
+
validator: function validator(value) {
|
|
29
|
+
return ['button', 'submit', 'reset'].indexOf(value) >= 0;
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
tag: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: 'button',
|
|
35
|
+
validator: function validator(value) {
|
|
36
|
+
return ['button', 'a', 'input', 'router-link', 'nuxt-link', 'n-link', 'NuxtLink', 'NLink'].indexOf(value) >= 0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
iconSize: function iconSize() {
|
|
42
|
+
if (!this.size || this.size === 'is-medium') {
|
|
43
|
+
return 'is-small';
|
|
44
|
+
} else if (this.size === 'is-large') {
|
|
45
|
+
return 'is-medium';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return this.size;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/* script */
|
|
54
|
+
const __vue_script__ = script;
|
|
55
|
+
|
|
56
|
+
/* template */
|
|
57
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.tag,_vm._b({tag:"component",staticClass:"button",class:[_vm.size, _vm.type, {
|
|
58
|
+
'is-rounded': _vm.rounded,
|
|
59
|
+
'is-loading': _vm.loading,
|
|
60
|
+
'is-outlined': _vm.outlined,
|
|
61
|
+
'is-inverted': _vm.inverted,
|
|
62
|
+
'is-focused': _vm.focused,
|
|
63
|
+
'is-active': _vm.active,
|
|
64
|
+
'is-hovered': _vm.hovered,
|
|
65
|
+
'is-selected': _vm.selected
|
|
66
|
+
}],attrs:{"type":_vm.nativeType},on:{"click":function($event){_vm.$emit('click', $event);}}},'component',_vm.$attrs,false),[(_vm.iconLeft)?_c('b-icon',{attrs:{"pack":_vm.iconPack,"icon":_vm.iconLeft,"size":_vm.iconSize}}):_vm._e(),_vm._v(" "),(_vm.label)?_c('span',[_vm._v(_vm._s(_vm.label))]):(_vm.$slots.default)?_c('span',[_vm._t("default")],2):_vm._e(),_vm._v(" "),(_vm.iconRight)?_c('b-icon',{attrs:{"pack":_vm.iconPack,"icon":_vm.iconRight,"size":_vm.iconSize}}):_vm._e()],1)};
|
|
67
|
+
var __vue_staticRenderFns__ = [];
|
|
68
|
+
|
|
69
|
+
/* style */
|
|
70
|
+
const __vue_inject_styles__ = undefined;
|
|
71
|
+
/* scoped */
|
|
72
|
+
const __vue_scope_id__ = undefined;
|
|
73
|
+
/* module identifier */
|
|
74
|
+
const __vue_module_identifier__ = undefined;
|
|
75
|
+
/* functional template */
|
|
76
|
+
const __vue_is_functional_template__ = false;
|
|
77
|
+
/* style inject */
|
|
78
|
+
|
|
79
|
+
/* style inject SSR */
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
var Button = __vue_normalize__(
|
|
84
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
85
|
+
__vue_inject_styles__,
|
|
86
|
+
__vue_script__,
|
|
87
|
+
__vue_scope_id__,
|
|
88
|
+
__vue_is_functional_template__,
|
|
89
|
+
__vue_module_identifier__,
|
|
90
|
+
undefined,
|
|
91
|
+
undefined
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
var Plugin = {
|
|
95
|
+
install: function install(Vue) {
|
|
96
|
+
registerComponent(Vue, Button);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
use(Plugin);
|
|
100
|
+
|
|
101
|
+
export default Plugin;
|
|
102
|
+
export { Button };
|