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,1084 @@
|
|
|
1
|
-
/*! Buefy v0.
|
|
2
|
-
!(function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}})("undefined"!=typeof self?self:this,(function(){return (function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=269)})([(function(t,e){t.exports=function(t,e,n,i,r){var o,s=t=t||{},u=typeof t.default;"object"!==u&&"function"!==u||(o=t,s=t.default);var a="function"==typeof s?s.options:s;e&&(a.render=e.render,a.staticRenderFns=e.staticRenderFns),i&&(a._scopeId=i);var c;if(r?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},a._ssrRegister=c):n&&(c=n),c){var l=a.functional,f=l?a.render:a.beforeCreate;l?a.render=function(t,e){return c.call(e),f(t,e)}:a.beforeCreate=f?[].concat(f,c):[c]}return{esModule:o,exports:s,options:a}}}),(function(t,e,n){t.exports=!n(7)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))}),(function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)}),(function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)}),(function(t,e,n){var i=n(10),r=n(20),o=n(15),s=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}}),(function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}}),(function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}}),(function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}}),(function(t,e,n){"use strict";var i={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,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,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerYearsRange:[-100,3],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1};e.a=i}),(function(t,e,n){var i=n(4),r=n(14);t.exports=n(1)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}}),(function(t,e,n){var i=n(5);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}}),(function(t,e,n){var i=n(36),r=n(28);t.exports=function(t){return i(r(t))}}),(function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var i=function(t){"undefined"!=typeof window&&window.Vue&&window.Vue.use(t)},r=function(t,e){t.component(e.name,e)},o=function(t,e,n){t.prototype[e]=n}}),(function(t,e,n){var i=n(26)("wks"),r=n(17),o=n(2).Symbol,s="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i}),(function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}}),(function(t,e,n){var i=n(5);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}}),(function(t,e,n){var i=n(2),r=n(3),o=n(29),s=n(9),u=n(6),a=function(t,e,n){var c,l,f,d=t&a.F,p=t&a.G,h=t&a.S,v=t&a.P,y=t&a.B,m=t&a.W,w=p?r:r[e]||(r[e]={}),g=w.prototype,b=p?i:h?i[e]:(i[e]||{}).prototype;p&&(n=e);for(c in n)(l=!d&&b&&void 0!==b[c])&&u(w,c)||(f=l?b[c]:n[c],w[c]=p&&"function"!=typeof b[c]?n[c]:y&&l?o(f,i):m&&b[c]==f?(function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e})(f):v&&"function"==typeof f?o(Function.call,f):f,v&&((w.virtual||(w.virtual={}))[c]=f,t&a.R&&g&&!g[c]&&s(g,c,f)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a}),(function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}}),(function(t,e,n){"use strict";e.__esModule=!0;var i=n(42),r=(function(t){return t&&t.__esModule?t:{default:t}})(i);e.default=function(t,e,n){return e in t?(0,r.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}}),(function(t,e){t.exports=!0}),(function(t,e,n){t.exports=!n(1)&&!n(7)((function(){return 7!=Object.defineProperty(n(21)("div"),"a",{get:function(){return 7}}).a}))}),(function(t,e,n){var i=n(5),r=n(2).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}}),(function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}}),(function(t,e,n){var i=n(0)(n(46),n(47),null,null,null);t.exports=i.exports}),(function(t,e,n){var i=n(34),r=n(27);t.exports=Object.keys||function(t){return i(t,r)}}),(function(t,e){e.f={}.propertyIsEnumerable}),(function(t,e,n){var i=n(3),r=n(2),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:i.version,mode:n(19)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})}),(function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")}),(function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}}),(function(t,e,n){var i=n(32);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}}),(function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}}),(function(t,e,n){var i=n(26)("keys"),r=n(17);t.exports=function(t){return i[t]||(i[t]=r(t))}}),(function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}}),(function(t,e){e.f=Object.getOwnPropertySymbols}),(function(t,e,n){var i=n(6),r=n(11),o=n(48)(!1),s=n(31)("IE_PROTO");t.exports=function(t,e){var n,u=r(t),a=0,c=[];for(n in u)n!=s&&i(u,n)&&c.push(n);for(;e.length>a;)i(u,n=e[a++])&&(~o(c,n)||c.push(n));return c}}),(function(t,e,n){var i=n(2),r=n(3),o=n(19),s=n(40),u=n(4).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:s.f(t)})}}),(function(t,e,n){var i=n(30);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}}),(function(t,e,n){t.exports={default:n(57),__esModule:!0}}),(function(t,e){t.exports={}}),(function(t,e,n){var i=n(4).f,r=n(6),o=n(13)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}}),(function(t,e,n){e.f=n(13)}),(function(t,e,n){var i=n(22),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}}),(function(t,e,n){t.exports={default:n(43),__esModule:!0}}),(function(t,e,n){n(44);var i=n(3).Object;t.exports=function(t,e,n){return i.defineProperty(t,e,n)}}),(function(t,e,n){var i=n(16);i(i.S+i.F*!n(1),"Object",{defineProperty:n(4).f})}),(function(t,e,n){"use strict";var i=n(8);e.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 i.a.defaultUseHtml5Validation}},validationMessage:String},data:function(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||i.a.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(){if(this.parentField&&this.parentField.newType){if("string"==typeof this.parentField.newType)return this.parentField.newType;for(var t in this.parentField.newType)if(this.parentField.newType[t])return t}},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 t=this;void 0!==this.$data._elementRef&&this.$nextTick((function(){var e=t.$el.querySelector(t.$data._elementRef);e&&e.focus()}))},onBlur:function(t){this.isFocused=!1,this.$emit("blur",t),this.checkHtml5Validity()},onFocus:function(t){this.isFocused=!0,this.$emit("focus",t)},checkHtml5Validity:function(){var t=this;if(this.useHtml5Validation&&void 0!==this.$refs[this.$data._elementRef]){var e=this.$el.querySelector(this.$data._elementRef),n=null,i=null,r=!0;return e.checkValidity()||(n="is-danger",i=this.validationMessage||e.validationMessage,r=!1),this.isValid=r,this.$nextTick((function(){t.parentField&&(t.parentField.type||(t.parentField.newType=n),t.parentField.message||(t.parentField.newMessage=i))})),this.isValid}}}}}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8);e.default={name:"BIcon",props:{type:[String,Object],pack:String,icon:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{newIcon:function(){return"mdi"===this.newPack?this.newPack+"-"+this.icon:this.addFAPrefix(this.getEquivalentIconOf(this.icon))},newPack:function(){return this.pack||i.a.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))return"has-text-"+t[1]}},newCustomSize:function(){return this.customSize||this.customSizeByPack},customSizeByPack:function(){var t="mdi"===this.newPack?"mdi-24px":this.addFAPrefix("lg"),e="mdi"===this.newPack?"mdi-36px":this.addFAPrefix("2x"),n="mdi"===this.newPack?"mdi-48px":this.addFAPrefix("3x");switch(this.size){case"is-small":return;case"is-medium":return e;case"is-large":return n;default:return t}},useIconComponent:function(){return i.a.defaultIconComponent}},methods:{addFAPrefix:function(t){return this.useIconComponent?t:"fa-"+t},getEquivalentIconOf:function(t){if(!this.both)return t;switch(t){case"check":return"check";case"information":return"info-circle";case"check-circle":return"check-circle";case"alert":return"exclamation-triangle";case"alert-circle":return"exclamation-circle";case"arrow-up":return"arrow-up";case"chevron-right":return"angle-right";case"chevron-left":return"angle-left";case"chevron-down":return"angle-down";case"eye":return"eye";case"eye-off":return"eye-slash";case"menu-down":return"caret-down";case"menu-up":return"caret-up";default:return t}}}}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"icon",class:[t.newType,t.size]},[t.useIconComponent?n(t.useIconComponent,{tag:"component",class:[t.customClass],attrs:{icon:[t.newPack,t.newIcon],size:t.newCustomSize}}):n("i",{class:[t.newPack,t.newIcon,t.newCustomSize,t.customClass]})],1)},staticRenderFns:[]}}),(function(t,e,n){var i=n(11),r=n(41),o=n(49);t.exports=function(t){return function(e,n,s){var u,a=i(e),c=r(a.length),l=o(s,c);if(t&&n!=n){for(;c>l;)if((u=a[l++])!=u)return!0}else for(;c>l;l++)if((t||l in a)&&a[l]===n)return t||l||0;return!t&&-1}}}),(function(t,e,n){var i=n(22),r=Math.max,o=Math.min;t.exports=function(t,e){return t=i(t),t<0?r(t+e,0):o(t,e)}}),(function(t,e,n){var i=n(34),r=n(27).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}}),(function(t,e,n){"use strict";function i(t,e){return e.split(".").reduce((function(t,e){return t[e]}),t)}function r(t,e,n){if(!t)return-1;if(!n||"function"!=typeof n)return t.indexOf(e);for(var i=0;i<t.length;i++)if(n(t[i],e))return i;return-1}function o(t){void 0!==t.remove?t.remove():void 0!==t.parentNode&&t.parentNode.removeChild(t)}e.a=i,e.b=r,n.d(e,"c",(function(){return s})),e.d=o;var s={Android:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Android/i)},BlackBerry:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/IEMobile/i)},any:function(){return s.Android()||s.BlackBerry()||s.iOS()||s.Opera()||s.Windows()}}}),(function(t,e,n){t.exports=n(9)}),(function(t,e,n){var i=n(10),r=n(55),o=n(27),s=n(31)("IE_PROTO"),u=function(){},a=function(){var t,e=n(21)("iframe"),i=o.length;for(e.style.display="none",n(56).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;i--;)delete a.prototype[o[i]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(u.prototype=i(t),n=new u,u.prototype=null,n[s]=t):n=a(),void 0===e?n:r(n,e)}}),(function(t,e,n){var i=n(28);t.exports=function(t){return Object(i(t))}}),(function(t,e,n){var i=n(4),r=n(10),o=n(24);t.exports=n(1)?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),u=s.length,a=0;u>a;)i.f(t,n=s[a++],e[n]);return t}}),(function(t,e,n){var i=n(2).document;t.exports=i&&i.documentElement}),(function(t,e,n){n(58),n(64),n(65),n(66),t.exports=n(3).Symbol}),(function(t,e,n){"use strict";var i=n(2),r=n(6),o=n(1),s=n(16),u=n(52),a=n(59).KEY,c=n(7),l=n(26),f=n(39),d=n(17),p=n(13),h=n(40),v=n(35),y=n(60),m=n(61),w=n(10),g=n(5),b=n(11),x=n(15),S=n(14),_=n(53),k=n(62),O=n(63),P=n(4),V=n(24),T=O.f,C=P.f,F=k.f,A=i.Symbol,I=i.JSON,M=I&&I.stringify,j=p("_hidden"),$=p("toPrimitive"),E={}.propertyIsEnumerable,D=l("symbol-registry"),L=l("symbols"),N=l("op-symbols"),R=Object.prototype,B="function"==typeof A,H=i.QObject,z=!H||!H.prototype||!H.prototype.findChild,q=o&&c((function(){return 7!=_(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a}))?function(t,e,n){var i=T(R,e);i&&delete R[e],C(t,e,n),i&&t!==R&&C(R,e,i)}:C,W=function(t){var e=L[t]=_(A.prototype);return e._k=t,e},G=B&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},U=function(t,e,n){return t===R&&U(N,e,n),w(t),e=x(e,!0),w(n),r(L,e)?(n.enumerable?(r(t,j)&&t[j][e]&&(t[j][e]=!1),n=_(n,{enumerable:S(0,!1)})):(r(t,j)||C(t,j,S(1,{})),t[j][e]=!0),q(t,e,n)):C(t,e,n)},J=function(t,e){w(t);for(var n,i=y(e=b(e)),r=0,o=i.length;o>r;)U(t,n=i[r++],e[n]);return t},K=function(t,e){return void 0===e?_(t):J(_(t),e)},Y=function(t){var e=E.call(this,t=x(t,!0));return!(this===R&&r(L,t)&&!r(N,t))&&(!(e||!r(this,t)||!r(L,t)||r(this,j)&&this[j][t])||e)},Q=function(t,e){if(t=b(t),e=x(e,!0),t!==R||!r(L,e)||r(N,e)){var n=T(t,e);return!n||!r(L,e)||r(t,j)&&t[j][e]||(n.enumerable=!0),n}},X=function(t){for(var e,n=F(b(t)),i=[],o=0;n.length>o;)r(L,e=n[o++])||e==j||e==a||i.push(e);return i},Z=function(t){for(var e,n=t===R,i=F(n?N:b(t)),o=[],s=0;i.length>s;)!r(L,e=i[s++])||n&&!r(R,e)||o.push(L[e]);return o};B||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=d(arguments.length>0?arguments[0]:void 0),e=function(n){this===R&&e.call(N,n),r(this,j)&&r(this[j],t)&&(this[j][t]=!1),q(this,t,S(1,n))};return o&&z&&q(R,t,{configurable:!0,set:e}),W(t)},u(A.prototype,"toString",(function(){return this._k})),O.f=Q,P.f=U,n(50).f=k.f=X,n(25).f=Y,n(33).f=Z,o&&!n(19)&&u(R,"propertyIsEnumerable",Y,!0),h.f=function(t){return W(p(t))}),s(s.G+s.W+s.F*!B,{Symbol:A});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)p(tt[et++]);for(var nt=V(p.store),it=0;nt.length>it;)v(nt[it++]);s(s.S+s.F*!B,"Symbol",{for:function(t){return r(D,t+="")?D[t]:D[t]=A(t)},keyFor:function(t){if(!G(t))throw TypeError(t+" is not a symbol!");for(var e in D)if(D[e]===t)return e},useSetter:function(){z=!0},useSimple:function(){z=!1}}),s(s.S+s.F*!B,"Object",{create:K,defineProperty:U,defineProperties:J,getOwnPropertyDescriptor:Q,getOwnPropertyNames:X,getOwnPropertySymbols:Z}),I&&s(s.S+s.F*(!B||c((function(){var t=A();return"[null]"!=M([t])||"{}"!=M({a:t})||"{}"!=M(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);if(n=e=i[1],(g(e)||void 0!==t)&&!G(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!G(e))return e}),i[1]=e,M.apply(I,i)}}),A.prototype[$]||n(9)(A.prototype,$,A.prototype.valueOf),f(A,"Symbol"),f(Math,"Math",!0),f(i.JSON,"JSON",!0)}),(function(t,e,n){var i=n(17)("meta"),r=n(5),o=n(6),s=n(4).f,u=0,a=Object.isExtensible||function(){return!0},c=!n(7)((function(){return a(Object.preventExtensions({}))})),l=function(t){s(t,i,{value:{i:"O"+ ++u,w:{}}})},f=function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,i)){if(!a(t))return"F";if(!e)return"E";l(t)}return t[i].i},d=function(t,e){if(!o(t,i)){if(!a(t))return!0;if(!e)return!1;l(t)}return t[i].w},p=function(t){return c&&h.NEED&&a(t)&&!o(t,i)&&l(t),t},h=t.exports={KEY:i,NEED:!1,fastKey:f,getWeak:d,onFreeze:p}}),(function(t,e,n){var i=n(24),r=n(33),o=n(25);t.exports=function(t){var e=i(t),n=r.f;if(n)for(var s,u=n(t),a=o.f,c=0;u.length>c;)a.call(t,s=u[c++])&&e.push(s);return e}}),(function(t,e,n){var i=n(30);t.exports=Array.isArray||function(t){return"Array"==i(t)}}),(function(t,e,n){var i=n(11),r=n(50).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(t){try{return r(t)}catch(t){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?u(t):r(i(t))}}),(function(t,e,n){var i=n(25),r=n(14),o=n(11),s=n(15),u=n(6),a=n(20),c=Object.getOwnPropertyDescriptor;e.f=n(1)?c:function(t,e){if(t=o(t),e=s(e,!0),a)try{return c(t,e)}catch(t){}if(u(t,e))return r(!i.f.call(t,e),t[e])}}),(function(t,e){}),(function(t,e,n){n(35)("asyncIterator")}),(function(t,e,n){n(35)("observable")}),(function(t,e,n){"use strict";var i=n(19),r=n(16),o=n(52),s=n(9),u=n(38),a=n(75),c=n(39),l=n(76),f=n(13)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,h,v,y,m){a(n,e,h);var w,g,b,x=function(t){if(!d&&t in O)return O[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",_="values"==v,k=!1,O=t.prototype,P=O[f]||O["@@iterator"]||v&&O[v],V=P||x(v),T=v?_?x("entries"):V:void 0,C="Array"==e?O.entries||P:P;if(C&&(b=l(C.call(new t)))!==Object.prototype&&b.next&&(c(b,S,!0),i||"function"==typeof b[f]||s(b,f,p)),_&&P&&"values"!==P.name&&(k=!0,V=function(){return P.call(this)}),i&&!m||!d&&!k&&O[f]||s(O,f,V),u[e]=V,u[S]=p,v)if(w={values:_?V:x("values"),keys:y?V:x("keys"),entries:T},m)for(g in w)g in O||o(O,g,w[g]);else r(r.P+r.F*(d||k),e,w);return w}}),(function(t,e,n){var i=n(0)(n(78),n(79),null,null,null);t.exports=i.exports}),(function(t,e,n){"use strict";var i=n(74)(!0);n(67)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})}))}),,,(function(t,e,n){n(81);for(var i=n(2),r=n(9),o=n(38),s=n(13)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),a=0;a<u.length;a++){var c=u[a],l=i[c],f=l&&l.prototype;f&&!f[s]&&r(f,s,c),o[c]=o.Array}}),(function(t,e,n){var i=n(77),r=n(13)("iterator"),o=n(38);t.exports=n(3).getIteratorMethod=function(t){if(void 0!=t)return t[r]||t["@@iterator"]||o[i(t)]}}),(function(t,e,n){var i=n(22),r=n(28);t.exports=function(t){return function(e,n){var o,s,u=String(r(e)),a=i(n),c=u.length;return a<0||a>=c?t?"":void 0:(o=u.charCodeAt(a),o<55296||o>56319||a+1===c||(s=u.charCodeAt(a+1))<56320||s>57343?t?u.charAt(a):o:t?u.slice(a,a+2):s-56320+(o-55296<<10)+65536)}}}),(function(t,e,n){"use strict";var i=n(53),r=n(14),o=n(39),s={};n(9)(s,n(13)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=i(s,{next:r(1,n)}),o(t,e+" Iterator")}}),(function(t,e,n){var i=n(6),r=n(54),o=n(31)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}}),(function(t,e,n){var i=n(30),r=n(13)("toStringTag"),o="Arguments"==i(function(){return arguments}()),s=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=s(e=Object(t),r))?n:o?i(e):"Object"==(u=i(e))&&"function"==typeof e.callee?"Arguments":u}}),(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),r=n.n(i),o=n(23),s=n.n(o),u=n(8),a=n(45);e.default={name:"BInput",components:r()({},s.a.name,s.a),mixins:[a.a],inheritAttrs:!1,props:{value:[Number,String],type:{type:String,default:"text"},passwordReveal:Boolean,hasCounter:{type:Boolean,default:function(){return u.a.defaultInputHasCounter}},customClass:{type:String,default:""}},data:function(){return{newValue:this.value,newType:this.type,newAutocomplete:this.autocomplete||u.a.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),!this.isValid&&this.checkHtml5Validity()}},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.statusType},iconPosition:function(){return this.icon&&this.hasIconRight?"has-icons-left has-icons-right":!this.icon&&this.hasIconRight?"has-icons-right":this.icon?"has-icons-left":void 0},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.$refs.input.focus()}))},onInput:function(t){var e=this;this.$nextTick((function(){t.target&&(e.computedValue=t.target.value)}))}}}}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"control",class:t.rootClasses},["textarea"!==t.type?n("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,blur:t.onBlur,focus:t.onFocus}},"input",t.$attrs,!1)):n("textarea",t._b({ref:"textarea",staticClass:"textarea",class:[t.inputClasses,t.customClass],attrs:{maxlength:t.maxlength},domProps:{value:t.computedValue},on:{input:t.onInput,blur:t.onBlur,focus:t.onFocus}},"textarea",t.$attrs,!1)),t._v(" "),t.icon?n("b-icon",{staticClass:"is-left",attrs:{icon:t.icon,pack:t.iconPack,size:t.iconSize}}):t._e(),t._v(" "),t.loading||!t.passwordReveal&&!t.statusType?t._e():n("b-icon",{staticClass:"is-right",class:{"is-clickable":t.passwordReveal},attrs:{icon:t.passwordReveal?t.passwordVisibleIcon:t.statusTypeIcon,pack:t.iconPack,size:t.iconSize,type:t.passwordReveal?"is-primary":t.statusType,both:""},nativeOn:{click:function(e){t.togglePasswordVisibility(e)}}}),t._v(" "),t.maxlength&&t.hasCounter&&"number"!==t.type?n("small",{staticClass:"help counter",class:{"is-invisible":!t.isFocused}},[t._v("\n "+t._s(t.valueLength)+" / "+t._s(t.maxlength)+"\n ")]):t._e()],1)},staticRenderFns:[]}}),(function(t,e,n){t.exports={default:n(84),__esModule:!0}}),(function(t,e,n){"use strict";var i=n(82),r=n(83),o=n(38),s=n(11);t.exports=n(67)(Array,"Array",(function(t,e){this._t=s(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):"keys"==e?r(0,n):"values"==e?r(0,t[n]):r(0,[n,t[n]])}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")}),(function(t,e){t.exports=function(){}}),(function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}}),(function(t,e,n){n(72),n(69),t.exports=n(85)}),(function(t,e,n){var i=n(10),r=n(73);t.exports=n(3).getIterator=function(t){var e=r(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return i(e.call(t))}}),,,,,,,,,,,,,,,,,,,(function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(115),o=i(r),s=n(37),u=i(s),a="function"==typeof u.default&&"symbol"==typeof o.default?function(t){return typeof t}:function(t){return t&&"function"==typeof u.default&&t.constructor===u.default&&t!==u.default.prototype?"symbol":typeof t};e.default="function"==typeof u.default&&"symbol"===a(o.default)?function(t){return void 0===t?"undefined":a(t)}:function(t){return t&&"function"==typeof u.default&&t.constructor===u.default&&t!==u.default.prototype?"symbol":void 0===t?"undefined":a(t)}}),(function(t,e,n){var i=n(0)(n(114),n(117),null,null,null);t.exports=i.exports}),,,,,,,,,(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(104),r=n.n(i),o=n(80),s=n.n(o),u=n(18),a=n.n(u),c=n(51),l=n(45),f=n(68),d=n.n(f);e.default={name:"BAutocomplete",components:a()({},d.a.name,d.a),mixins:[l.a],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},data:function(){return{selected:null,hovered:null,isActive:!1,newValue:this.value,newAutocomplete:this.autocomplete||"off",isListInViewportVertically:!0,hasFocus:!1,_isAutocomplete:!0,_elementRef:"input"}},computed:{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("*"),n=!0,i=!1,r=void 0;try{for(var o,u=s()(e);!(n=(o=u.next()).done);n=!0){var a=o.value;t.push(a)}}catch(t){i=!0,r=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw r}}}return t},hasDefaultSlot:function(){return!!this.$scopedSlots.default},hasEmptySlot:function(){return!!this.$slots.empty},hasHeaderSlot:function(){return!!this.$slots.header},hasFooterSlot:function(){return!!this.$slots.footer}},watch:{isActive:function(t){var e=this;t?this.calcDropdownInViewportVertical():(this.$nextTick((function(){return e.setHovered(null)})),setTimeout((function(){e.calcDropdownInViewportVertical()}),100))},newValue:function(t){this.$emit("input",t);var e=this.getValue(this.selected);e&&e!==t&&this.setSelected(null,!1),!this.hasFocus||this.openOnFocus&&!t||(this.isActive=!!t)},value:function(t){this.newValue=t,!this.isValid&&this.$refs.input.checkHtml5Validity()},data:function(t){this.keepFirst&&this.selectFirstOption(t)}},methods:{setHovered:function(t){void 0!==t&&(this.hovered=t)},setSelected:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];void 0!==t&&(this.selected=t,this.$emit("select",this.selected),null!==this.selected&&(this.newValue=this.clearOnSelect?"":this.getValue(this.selected)),n&&this.$nextTick((function(){e.isActive=!1})))},selectFirstOption:function(t){var e=this;this.$nextTick((function(){t.length?(e.openOnFocus||""!==e.newValue&&e.hovered!==t[0])&&e.setHovered(t[0]):e.setHovered(null)}))},enterPressed:function(){null!==this.hovered&&this.setSelected(this.hovered)},tabPressed:function(){if(null===this.hovered)return void(this.isActive=!1);this.setSelected(this.hovered)},clickedOutside:function(t){this.whiteList.indexOf(t.target)<0&&(this.isActive=!1)},getValue:function(t){if(t)return void 0!==this.customFormatter?this.customFormatter(t):"object"===(void 0===t?"undefined":r()(t))?Object(c.a)(t,this.field):t},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)}}))},keyArrows:function(t){var e="down"===t?1:-1;if(this.isActive){var n=this.data.indexOf(this.hovered)+e;n=n>this.data.length-1?this.data.length:n,n=n<0?0:n,this.setHovered(this.data[n]);var i=this.$refs.dropdown.querySelector(".dropdown-content"),r=i.querySelectorAll("a.dropdown-item:not(.is-disabled)")[n];if(!r)return;var o=i.scrollTop,s=i.scrollTop+i.clientHeight-r.clientHeight;r.offsetTop<o?i.scrollTop=r.offsetTop:r.offsetTop>=s&&(i.scrollTop=r.offsetTop-i.clientHeight+r.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.data)),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)}},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),window.addEventListener("resize",this.calcDropdownInViewportVertical))},beforeDestroy:function(){"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),window.removeEventListener("resize",this.calcDropdownInViewportVertical))}}}),(function(t,e,n){t.exports={default:n(116),__esModule:!0}}),(function(t,e,n){n(69),n(72),t.exports=n(40).f("iterator")}),(function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"autocomplete control",class:{"is-expanded":t.expanded}},[n("b-input",t._b({ref:"input",attrs:{type:"text",size:t.size,loading:t.loading,rounded:t.rounded,icon:t.icon,"icon-pack":t.iconPack,maxlength:t.maxlength,autocomplete:t.newAutocomplete,"use-html5-validation":t.useHtml5Validation},on:{input:t.onInput,focus:t.focused,blur:t.onBlur},nativeOn:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"esc",27,e.key))return null;e.preventDefault(),t.isActive=!1},keydown:[function(e){if(!("button"in e)&&t._k(e.keyCode,"tab",9,e.key))return null;t.tabPressed(e)},function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key))return null;e.preventDefault(),t.enterPressed(e)},function(e){if(!("button"in e)&&t._k(e.keyCode,"up",38,e.key))return null;e.preventDefault(),t.keyArrows("up")},function(e){if(!("button"in e)&&t._k(e.keyCode,"down",40,e.key))return null;e.preventDefault(),t.keyArrows("down")}]},model:{value:t.newValue,callback:function(e){t.newValue=e},expression:"newValue"}},"b-input",t.$attrs,!1)),t._v(" "),n("transition",{attrs:{name:"fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive&&(t.data.length>0||t.hasEmptySlot||t.hasHeaderSlot),expression:"isActive && (data.length > 0 || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{"is-opened-top":!t.isListInViewportVertically}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"dropdown-content"},[t.hasHeaderSlot?n("div",{staticClass:"dropdown-item"},[t._t("header")],2):t._e(),t._v(" "),t._l(t.data,(function(e,i){return n("a",{key:i,staticClass:"dropdown-item",class:{"is-hovered":e===t.hovered},on:{click:function(n){t.setSelected(e)}}},[t.hasDefaultSlot?t._t("default",null,{option:e,index:i}):n("span",[t._v("\n "+t._s(t.getValue(e,!0))+"\n ")])],2)})),t._v(" "),0===t.data.length&&t.hasEmptySlot?n("div",{staticClass:"dropdown-item is-disabled"},[t._t("empty")],2):t._e(),t._v(" "),t.hasFooterSlot?n("div",{staticClass:"dropdown-item"},[t._t("footer")],2):t._e()],2)])])],1)},staticRenderFns:[]}}),,,,,,,,,,(function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(105),r=n.n(i),o=n(12);n.d(e,"Autocomplete",(function(){return r.a}));var s={install:function(t){Object(o.a)(t,r.a)}};Object(o.c)(s),e.default=s}),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,(function(t,e,n){t.exports=n(127)})])}));
|
|
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.Autocomplete = {}));
|
|
6
|
+
}(this, function (exports) { 'use strict';
|
|
7
|
+
|
|
8
|
+
function _typeof(obj) {
|
|
9
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
10
|
+
_typeof = function (obj) {
|
|
11
|
+
return typeof obj;
|
|
12
|
+
};
|
|
13
|
+
} else {
|
|
14
|
+
_typeof = function (obj) {
|
|
15
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return _typeof(obj);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function _defineProperty(obj, key, value) {
|
|
23
|
+
if (key in obj) {
|
|
24
|
+
Object.defineProperty(obj, key, {
|
|
25
|
+
value: value,
|
|
26
|
+
enumerable: true,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true
|
|
29
|
+
});
|
|
30
|
+
} else {
|
|
31
|
+
obj[key] = value;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return obj;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Get value of an object property/path even if it's nested
|
|
39
|
+
*/
|
|
40
|
+
function getValueByPath(obj, path) {
|
|
41
|
+
var value = path.split('.').reduce(function (o, i) {
|
|
42
|
+
return o[i];
|
|
43
|
+
}, obj);
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var config = {
|
|
48
|
+
defaultContainerElement: null,
|
|
49
|
+
defaultIconPack: 'mdi',
|
|
50
|
+
defaultIconComponent: null,
|
|
51
|
+
defaultDialogConfirmText: null,
|
|
52
|
+
defaultDialogCancelText: null,
|
|
53
|
+
defaultSnackbarDuration: 3500,
|
|
54
|
+
defaultSnackbarPosition: null,
|
|
55
|
+
defaultToastDuration: 2000,
|
|
56
|
+
defaultToastPosition: null,
|
|
57
|
+
defaultNotificationDuration: 2000,
|
|
58
|
+
defaultNotificationPosition: null,
|
|
59
|
+
defaultTooltipType: 'is-primary',
|
|
60
|
+
defaultTooltipAnimated: false,
|
|
61
|
+
defaultTooltipDelay: 0,
|
|
62
|
+
defaultInputAutocomplete: 'on',
|
|
63
|
+
defaultDateFormatter: null,
|
|
64
|
+
defaultDateParser: null,
|
|
65
|
+
defaultDateCreator: null,
|
|
66
|
+
defaultDayNames: null,
|
|
67
|
+
defaultMonthNames: null,
|
|
68
|
+
defaultFirstDayOfWeek: null,
|
|
69
|
+
defaultUnselectableDaysOfWeek: null,
|
|
70
|
+
defaultTimeFormatter: null,
|
|
71
|
+
defaultTimeParser: null,
|
|
72
|
+
defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
|
|
73
|
+
defaultModalScroll: null,
|
|
74
|
+
defaultDatepickerMobileNative: true,
|
|
75
|
+
defaultTimepickerMobileNative: true,
|
|
76
|
+
defaultNoticeQueue: true,
|
|
77
|
+
defaultInputHasCounter: true,
|
|
78
|
+
defaultTaginputHasCounter: true,
|
|
79
|
+
defaultUseHtml5Validation: true,
|
|
80
|
+
defaultDropdownMobileModal: true,
|
|
81
|
+
defaultFieldLabelPosition: null,
|
|
82
|
+
defaultDatepickerYearsRange: [-100, 3],
|
|
83
|
+
defaultDatepickerNearbyMonthDays: true,
|
|
84
|
+
defaultDatepickerNearbySelectableMonthDays: false,
|
|
85
|
+
defaultDatepickerShowWeekNumber: false
|
|
86
|
+
};
|
|
87
|
+
var config$1 = config;
|
|
88
|
+
|
|
89
|
+
var FormElementMixin = {
|
|
90
|
+
props: {
|
|
91
|
+
size: String,
|
|
92
|
+
expanded: Boolean,
|
|
93
|
+
loading: Boolean,
|
|
94
|
+
rounded: Boolean,
|
|
95
|
+
icon: String,
|
|
96
|
+
iconPack: String,
|
|
97
|
+
// Native options to use in HTML5 validation
|
|
98
|
+
autocomplete: String,
|
|
99
|
+
maxlength: [Number, String],
|
|
100
|
+
useHtml5Validation: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: function _default() {
|
|
103
|
+
return config$1.defaultUseHtml5Validation;
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
validationMessage: String
|
|
107
|
+
},
|
|
108
|
+
data: function data() {
|
|
109
|
+
return {
|
|
110
|
+
isValid: true,
|
|
111
|
+
isFocused: false,
|
|
112
|
+
newIconPack: this.iconPack || config$1.defaultIconPack
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
computed: {
|
|
116
|
+
/**
|
|
117
|
+
* Find parent Field, max 3 levels deep.
|
|
118
|
+
*/
|
|
119
|
+
parentField: function parentField() {
|
|
120
|
+
var parent = this.$parent;
|
|
121
|
+
|
|
122
|
+
for (var i = 0; i < 3; i++) {
|
|
123
|
+
if (parent && !parent.$data._isField) {
|
|
124
|
+
parent = parent.$parent;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return parent;
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Get the type prop from parent if it's a Field.
|
|
133
|
+
*/
|
|
134
|
+
statusType: function statusType() {
|
|
135
|
+
if (!this.parentField) return;
|
|
136
|
+
if (!this.parentField.newType) return;
|
|
137
|
+
|
|
138
|
+
if (typeof this.parentField.newType === 'string') {
|
|
139
|
+
return this.parentField.newType;
|
|
140
|
+
} else {
|
|
141
|
+
for (var key in this.parentField.newType) {
|
|
142
|
+
if (this.parentField.newType[key]) {
|
|
143
|
+
return key;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Get the message prop from parent if it's a Field.
|
|
151
|
+
*/
|
|
152
|
+
statusMessage: function statusMessage() {
|
|
153
|
+
if (!this.parentField) return;
|
|
154
|
+
return this.parentField.newMessage;
|
|
155
|
+
},
|
|
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
|
+
|
|
165
|
+
case 'is-medium':
|
|
166
|
+
return;
|
|
167
|
+
|
|
168
|
+
case 'is-large':
|
|
169
|
+
return this.newIconPack === 'mdi' ? 'is-medium' : '';
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
methods: {
|
|
174
|
+
/**
|
|
175
|
+
* Focus method that work dynamically depending on the component.
|
|
176
|
+
*/
|
|
177
|
+
focus: function focus() {
|
|
178
|
+
var _this = this;
|
|
179
|
+
|
|
180
|
+
if (this.$data._elementRef === undefined) return;
|
|
181
|
+
this.$nextTick(function () {
|
|
182
|
+
var el = _this.$el.querySelector(_this.$data._elementRef);
|
|
183
|
+
|
|
184
|
+
if (el) el.focus();
|
|
185
|
+
});
|
|
186
|
+
},
|
|
187
|
+
onBlur: function onBlur($event) {
|
|
188
|
+
this.isFocused = false;
|
|
189
|
+
this.$emit('blur', $event);
|
|
190
|
+
this.checkHtml5Validity();
|
|
191
|
+
},
|
|
192
|
+
onFocus: function onFocus($event) {
|
|
193
|
+
this.isFocused = true;
|
|
194
|
+
this.$emit('focus', $event);
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Check HTML5 validation, set isValid property.
|
|
199
|
+
* If validation fail, send 'is-danger' type,
|
|
200
|
+
* and error message to parent if it's a Field.
|
|
201
|
+
*/
|
|
202
|
+
checkHtml5Validity: function checkHtml5Validity() {
|
|
203
|
+
var _this2 = this;
|
|
204
|
+
|
|
205
|
+
if (!this.useHtml5Validation) return;
|
|
206
|
+
if (this.$refs[this.$data._elementRef] === undefined) return;
|
|
207
|
+
var el = this.$el.querySelector(this.$data._elementRef);
|
|
208
|
+
var type = null;
|
|
209
|
+
var message = null;
|
|
210
|
+
var isValid = true;
|
|
211
|
+
|
|
212
|
+
if (!el.checkValidity()) {
|
|
213
|
+
type = 'is-danger';
|
|
214
|
+
message = this.validationMessage || el.validationMessage;
|
|
215
|
+
isValid = false;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
this.isValid = isValid;
|
|
219
|
+
this.$nextTick(function () {
|
|
220
|
+
if (_this2.parentField) {
|
|
221
|
+
// Set type only if not defined
|
|
222
|
+
if (!_this2.parentField.type) {
|
|
223
|
+
_this2.parentField.newType = type;
|
|
224
|
+
} // Set message only if not defined
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
if (!_this2.parentField.message) {
|
|
228
|
+
_this2.parentField.newMessage = message;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
return this.isValid;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
//
|
|
238
|
+
var script = {
|
|
239
|
+
name: 'BIcon',
|
|
240
|
+
props: {
|
|
241
|
+
type: [String, Object],
|
|
242
|
+
pack: String,
|
|
243
|
+
icon: String,
|
|
244
|
+
size: String,
|
|
245
|
+
customSize: String,
|
|
246
|
+
customClass: String,
|
|
247
|
+
both: Boolean // This is used internally to show both MDI and FA icon
|
|
248
|
+
|
|
249
|
+
},
|
|
250
|
+
computed: {
|
|
251
|
+
/**
|
|
252
|
+
* Internal icon name based on the pack.
|
|
253
|
+
* If pack is 'fa', gets the equivalent FA icon name of the MDI,
|
|
254
|
+
* internal icons are always MDI.
|
|
255
|
+
*/
|
|
256
|
+
newIcon: function newIcon() {
|
|
257
|
+
return this.newPack === 'mdi' ? "".concat(this.newPack, "-").concat(this.icon) : this.addFAPrefix(this.getEquivalentIconOf(this.icon));
|
|
258
|
+
},
|
|
259
|
+
newPack: function newPack() {
|
|
260
|
+
return this.pack || config$1.defaultIconPack;
|
|
261
|
+
},
|
|
262
|
+
newType: function newType() {
|
|
263
|
+
if (!this.type) return;
|
|
264
|
+
var splitType = [];
|
|
265
|
+
|
|
266
|
+
if (typeof this.type === 'string') {
|
|
267
|
+
splitType = this.type.split('-');
|
|
268
|
+
} else {
|
|
269
|
+
for (var key in this.type) {
|
|
270
|
+
if (this.type[key]) {
|
|
271
|
+
splitType = key.split('-');
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (splitType.length <= 1) return;
|
|
278
|
+
return "has-text-".concat(splitType[1]);
|
|
279
|
+
},
|
|
280
|
+
newCustomSize: function newCustomSize() {
|
|
281
|
+
return this.customSize || this.customSizeByPack;
|
|
282
|
+
},
|
|
283
|
+
customSizeByPack: function customSizeByPack() {
|
|
284
|
+
var defaultSize = this.newPack === 'mdi' ? 'mdi-24px' : this.addFAPrefix('lg');
|
|
285
|
+
var mediumSize = this.newPack === 'mdi' ? 'mdi-36px' : this.addFAPrefix('2x');
|
|
286
|
+
var largeSize = this.newPack === 'mdi' ? 'mdi-48px' : this.addFAPrefix('3x');
|
|
287
|
+
|
|
288
|
+
switch (this.size) {
|
|
289
|
+
case 'is-small':
|
|
290
|
+
return;
|
|
291
|
+
|
|
292
|
+
case 'is-medium':
|
|
293
|
+
return mediumSize;
|
|
294
|
+
|
|
295
|
+
case 'is-large':
|
|
296
|
+
return largeSize;
|
|
297
|
+
|
|
298
|
+
default:
|
|
299
|
+
return defaultSize;
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
useIconComponent: function useIconComponent() {
|
|
303
|
+
return config$1.defaultIconComponent;
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
methods: {
|
|
307
|
+
addFAPrefix: function addFAPrefix(value) {
|
|
308
|
+
if (this.useIconComponent) {
|
|
309
|
+
return value;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return "fa-".concat(value);
|
|
313
|
+
},
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Equivalent FA icon name of the MDI.
|
|
317
|
+
*/
|
|
318
|
+
getEquivalentIconOf: function getEquivalentIconOf(value) {
|
|
319
|
+
// Only transform the class if the both prop is set to true
|
|
320
|
+
if (!this.both) {
|
|
321
|
+
return value;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
switch (value) {
|
|
325
|
+
case 'check':
|
|
326
|
+
return 'check';
|
|
327
|
+
|
|
328
|
+
case 'information':
|
|
329
|
+
return 'info-circle';
|
|
330
|
+
|
|
331
|
+
case 'check-circle':
|
|
332
|
+
return 'check-circle';
|
|
333
|
+
|
|
334
|
+
case 'alert':
|
|
335
|
+
return 'exclamation-triangle';
|
|
336
|
+
|
|
337
|
+
case 'alert-circle':
|
|
338
|
+
return 'exclamation-circle';
|
|
339
|
+
|
|
340
|
+
case 'arrow-up':
|
|
341
|
+
return 'arrow-up';
|
|
342
|
+
|
|
343
|
+
case 'chevron-right':
|
|
344
|
+
return 'angle-right';
|
|
345
|
+
|
|
346
|
+
case 'chevron-left':
|
|
347
|
+
return 'angle-left';
|
|
348
|
+
|
|
349
|
+
case 'chevron-down':
|
|
350
|
+
return 'angle-down';
|
|
351
|
+
|
|
352
|
+
case 'eye':
|
|
353
|
+
return 'eye';
|
|
354
|
+
|
|
355
|
+
case 'eye-off':
|
|
356
|
+
return 'eye-slash';
|
|
357
|
+
|
|
358
|
+
case 'menu-down':
|
|
359
|
+
return 'caret-down';
|
|
360
|
+
|
|
361
|
+
case 'menu-up':
|
|
362
|
+
return 'caret-up';
|
|
363
|
+
|
|
364
|
+
default:
|
|
365
|
+
return value;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
|
|
372
|
+
/* server only */
|
|
373
|
+
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
374
|
+
if (typeof shadowMode !== 'boolean') {
|
|
375
|
+
createInjectorSSR = createInjector;
|
|
376
|
+
createInjector = shadowMode;
|
|
377
|
+
shadowMode = false;
|
|
378
|
+
} // Vue.extend constructor export interop.
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
var options = typeof script === 'function' ? script.options : script; // render functions
|
|
382
|
+
|
|
383
|
+
if (template && template.render) {
|
|
384
|
+
options.render = template.render;
|
|
385
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
386
|
+
options._compiled = true; // functional template
|
|
387
|
+
|
|
388
|
+
if (isFunctionalTemplate) {
|
|
389
|
+
options.functional = true;
|
|
390
|
+
}
|
|
391
|
+
} // scopedId
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
if (scopeId) {
|
|
395
|
+
options._scopeId = scopeId;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
var hook;
|
|
399
|
+
|
|
400
|
+
if (moduleIdentifier) {
|
|
401
|
+
// server build
|
|
402
|
+
hook = function hook(context) {
|
|
403
|
+
// 2.3 injection
|
|
404
|
+
context = context || // cached call
|
|
405
|
+
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
406
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
|
|
407
|
+
// 2.2 with runInNewContext: true
|
|
408
|
+
|
|
409
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
410
|
+
context = __VUE_SSR_CONTEXT__;
|
|
411
|
+
} // inject component styles
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
if (style) {
|
|
415
|
+
style.call(this, createInjectorSSR(context));
|
|
416
|
+
} // register component module identifier for async chunk inference
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
if (context && context._registeredComponents) {
|
|
420
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
421
|
+
}
|
|
422
|
+
}; // used by ssr in case component is cached and beforeCreate
|
|
423
|
+
// never gets called
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
options._ssrRegister = hook;
|
|
427
|
+
} else if (style) {
|
|
428
|
+
hook = shadowMode ? function () {
|
|
429
|
+
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
|
|
430
|
+
} : function (context) {
|
|
431
|
+
style.call(this, createInjector(context));
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
if (hook) {
|
|
436
|
+
if (options.functional) {
|
|
437
|
+
// register for functional component in vue file
|
|
438
|
+
var originalRender = options.render;
|
|
439
|
+
|
|
440
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
441
|
+
hook.call(context);
|
|
442
|
+
return originalRender(h, context);
|
|
443
|
+
};
|
|
444
|
+
} else {
|
|
445
|
+
// inject component registration as beforeCreate hook
|
|
446
|
+
var existing = options.beforeCreate;
|
|
447
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
return script;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
var normalizeComponent_1 = normalizeComponent;
|
|
455
|
+
|
|
456
|
+
/* script */
|
|
457
|
+
const __vue_script__ = script;
|
|
458
|
+
|
|
459
|
+
/* template */
|
|
460
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:"icon",class:[_vm.newType, _vm.size]},[(!_vm.useIconComponent)?_c('i',{class:[_vm.newPack, _vm.newIcon, _vm.newCustomSize, _vm.customClass]}):_c(_vm.useIconComponent,{tag:"component",class:[_vm.customClass],attrs:{"icon":[_vm.newPack, _vm.newIcon],"size":_vm.newCustomSize}})],1)};
|
|
461
|
+
var __vue_staticRenderFns__ = [];
|
|
462
|
+
|
|
463
|
+
/* style */
|
|
464
|
+
const __vue_inject_styles__ = undefined;
|
|
465
|
+
/* scoped */
|
|
466
|
+
const __vue_scope_id__ = undefined;
|
|
467
|
+
/* module identifier */
|
|
468
|
+
const __vue_module_identifier__ = undefined;
|
|
469
|
+
/* functional template */
|
|
470
|
+
const __vue_is_functional_template__ = false;
|
|
471
|
+
/* style inject */
|
|
472
|
+
|
|
473
|
+
/* style inject SSR */
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
var Icon = normalizeComponent_1(
|
|
478
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
479
|
+
__vue_inject_styles__,
|
|
480
|
+
__vue_script__,
|
|
481
|
+
__vue_scope_id__,
|
|
482
|
+
__vue_is_functional_template__,
|
|
483
|
+
__vue_module_identifier__,
|
|
484
|
+
undefined,
|
|
485
|
+
undefined
|
|
486
|
+
);
|
|
487
|
+
|
|
488
|
+
var script$1 = {
|
|
489
|
+
name: 'BInput',
|
|
490
|
+
components: _defineProperty({}, Icon.name, Icon),
|
|
491
|
+
mixins: [FormElementMixin],
|
|
492
|
+
inheritAttrs: false,
|
|
493
|
+
props: {
|
|
494
|
+
value: [Number, String],
|
|
495
|
+
type: {
|
|
496
|
+
type: String,
|
|
497
|
+
default: 'text'
|
|
498
|
+
},
|
|
499
|
+
passwordReveal: Boolean,
|
|
500
|
+
hasCounter: {
|
|
501
|
+
type: Boolean,
|
|
502
|
+
default: function _default() {
|
|
503
|
+
return config$1.defaultInputHasCounter;
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
customClass: {
|
|
507
|
+
type: String,
|
|
508
|
+
default: ''
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
data: function data() {
|
|
512
|
+
return {
|
|
513
|
+
newValue: this.value,
|
|
514
|
+
newType: this.type,
|
|
515
|
+
newAutocomplete: this.autocomplete || config$1.defaultInputAutocomplete,
|
|
516
|
+
isPasswordVisible: false,
|
|
517
|
+
_elementRef: this.type === 'textarea' ? 'textarea' : 'input'
|
|
518
|
+
};
|
|
519
|
+
},
|
|
520
|
+
computed: {
|
|
521
|
+
computedValue: {
|
|
522
|
+
get: function get() {
|
|
523
|
+
return this.newValue;
|
|
524
|
+
},
|
|
525
|
+
set: function set(value) {
|
|
526
|
+
this.newValue = value;
|
|
527
|
+
this.$emit('input', value);
|
|
528
|
+
!this.isValid && this.checkHtml5Validity();
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
rootClasses: function rootClasses() {
|
|
532
|
+
return [this.iconPosition, this.size, {
|
|
533
|
+
'is-expanded': this.expanded,
|
|
534
|
+
'is-loading': this.loading,
|
|
535
|
+
'is-clearfix': !this.hasMessage
|
|
536
|
+
}];
|
|
537
|
+
},
|
|
538
|
+
inputClasses: function inputClasses() {
|
|
539
|
+
return [this.statusType, this.size, {
|
|
540
|
+
'is-rounded': this.rounded
|
|
541
|
+
}];
|
|
542
|
+
},
|
|
543
|
+
hasIconRight: function hasIconRight() {
|
|
544
|
+
return this.passwordReveal || this.loading || this.statusTypeIcon;
|
|
545
|
+
},
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Position of the icon or if it's both sides.
|
|
549
|
+
*/
|
|
550
|
+
iconPosition: function iconPosition() {
|
|
551
|
+
if (this.icon && this.hasIconRight) {
|
|
552
|
+
return 'has-icons-left has-icons-right';
|
|
553
|
+
} else if (!this.icon && this.hasIconRight) {
|
|
554
|
+
return 'has-icons-right';
|
|
555
|
+
} else if (this.icon) {
|
|
556
|
+
return 'has-icons-left';
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Icon name (MDI) based on the type.
|
|
562
|
+
*/
|
|
563
|
+
statusTypeIcon: function statusTypeIcon() {
|
|
564
|
+
switch (this.statusType) {
|
|
565
|
+
case 'is-success':
|
|
566
|
+
return 'check';
|
|
567
|
+
|
|
568
|
+
case 'is-danger':
|
|
569
|
+
return 'alert-circle';
|
|
570
|
+
|
|
571
|
+
case 'is-info':
|
|
572
|
+
return 'information';
|
|
573
|
+
|
|
574
|
+
case 'is-warning':
|
|
575
|
+
return 'alert';
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Check if have any message prop from parent if it's a Field.
|
|
581
|
+
*/
|
|
582
|
+
hasMessage: function hasMessage() {
|
|
583
|
+
return !!this.statusMessage;
|
|
584
|
+
},
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Current password-reveal icon name.
|
|
588
|
+
*/
|
|
589
|
+
passwordVisibleIcon: function passwordVisibleIcon() {
|
|
590
|
+
return !this.isPasswordVisible ? 'eye' : 'eye-off';
|
|
591
|
+
},
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Get value length
|
|
595
|
+
*/
|
|
596
|
+
valueLength: function valueLength() {
|
|
597
|
+
if (typeof this.computedValue === 'string') {
|
|
598
|
+
return this.computedValue.length;
|
|
599
|
+
} else if (typeof this.computedValue === 'number') {
|
|
600
|
+
return this.computedValue.toString().length;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
return 0;
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
watch: {
|
|
607
|
+
/**
|
|
608
|
+
* When v-model is changed:
|
|
609
|
+
* 1. Set internal value.
|
|
610
|
+
*/
|
|
611
|
+
value: function value(_value) {
|
|
612
|
+
this.newValue = _value;
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
methods: {
|
|
616
|
+
/**
|
|
617
|
+
* Toggle the visibility of a password-reveal input
|
|
618
|
+
* by changing the type and focus the input right away.
|
|
619
|
+
*/
|
|
620
|
+
togglePasswordVisibility: function togglePasswordVisibility() {
|
|
621
|
+
var _this = this;
|
|
622
|
+
|
|
623
|
+
this.isPasswordVisible = !this.isPasswordVisible;
|
|
624
|
+
this.newType = this.isPasswordVisible ? 'text' : 'password';
|
|
625
|
+
this.$nextTick(function () {
|
|
626
|
+
_this.$refs.input.focus();
|
|
627
|
+
});
|
|
628
|
+
},
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Input's 'input' event listener, 'nextTick' is used to prevent event firing
|
|
632
|
+
* before ui update, helps when using masks (Cleavejs and potentially others).
|
|
633
|
+
*/
|
|
634
|
+
onInput: function onInput(event) {
|
|
635
|
+
var _this2 = this;
|
|
636
|
+
|
|
637
|
+
this.$nextTick(function () {
|
|
638
|
+
if (event.target) {
|
|
639
|
+
_this2.computedValue = event.target.value;
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
/* script */
|
|
647
|
+
const __vue_script__$1 = script$1;
|
|
648
|
+
|
|
649
|
+
/* template */
|
|
650
|
+
var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"control",class:_vm.rootClasses},[(_vm.type !== 'textarea')?_c('input',_vm._b({ref:"input",staticClass:"input",class:[_vm.inputClasses, _vm.customClass],attrs:{"type":_vm.newType,"autocomplete":_vm.newAutocomplete,"maxlength":_vm.maxlength},domProps:{"value":_vm.computedValue},on:{"input":_vm.onInput,"blur":_vm.onBlur,"focus":_vm.onFocus}},'input',_vm.$attrs,false)):_c('textarea',_vm._b({ref:"textarea",staticClass:"textarea",class:[_vm.inputClasses, _vm.customClass],attrs:{"maxlength":_vm.maxlength},domProps:{"value":_vm.computedValue},on:{"input":_vm.onInput,"blur":_vm.onBlur,"focus":_vm.onFocus}},'textarea',_vm.$attrs,false)),_vm._v(" "),(_vm.icon)?_c('b-icon',{staticClass:"is-left",attrs:{"icon":_vm.icon,"pack":_vm.iconPack,"size":_vm.iconSize}}):_vm._e(),_vm._v(" "),(!_vm.loading && (_vm.passwordReveal || _vm.statusTypeIcon))?_c('b-icon',{staticClass:"is-right",class:{ 'is-clickable': _vm.passwordReveal },attrs:{"icon":_vm.passwordReveal ? _vm.passwordVisibleIcon : _vm.statusTypeIcon,"pack":_vm.iconPack,"size":_vm.iconSize,"type":!_vm.passwordReveal ? _vm.statusType : 'is-primary',"both":""},nativeOn:{"click":function($event){_vm.togglePasswordVisibility($event);}}}):_vm._e(),_vm._v(" "),(_vm.maxlength && _vm.hasCounter && _vm.type !== 'number')?_c('small',{staticClass:"help counter",class:{ 'is-invisible': !_vm.isFocused }},[_vm._v("\n "+_vm._s(_vm.valueLength)+" / "+_vm._s(_vm.maxlength)+"\n ")]):_vm._e()],1)};
|
|
651
|
+
var __vue_staticRenderFns__$1 = [];
|
|
652
|
+
|
|
653
|
+
/* style */
|
|
654
|
+
const __vue_inject_styles__$1 = undefined;
|
|
655
|
+
/* scoped */
|
|
656
|
+
const __vue_scope_id__$1 = undefined;
|
|
657
|
+
/* module identifier */
|
|
658
|
+
const __vue_module_identifier__$1 = undefined;
|
|
659
|
+
/* functional template */
|
|
660
|
+
const __vue_is_functional_template__$1 = false;
|
|
661
|
+
/* style inject */
|
|
662
|
+
|
|
663
|
+
/* style inject SSR */
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
var Input = normalizeComponent_1(
|
|
668
|
+
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
|
|
669
|
+
__vue_inject_styles__$1,
|
|
670
|
+
__vue_script__$1,
|
|
671
|
+
__vue_scope_id__$1,
|
|
672
|
+
__vue_is_functional_template__$1,
|
|
673
|
+
__vue_module_identifier__$1,
|
|
674
|
+
undefined,
|
|
675
|
+
undefined
|
|
676
|
+
);
|
|
677
|
+
|
|
678
|
+
var script$2 = {
|
|
679
|
+
name: 'BAutocomplete',
|
|
680
|
+
components: _defineProperty({}, Input.name, Input),
|
|
681
|
+
mixins: [FormElementMixin],
|
|
682
|
+
inheritAttrs: false,
|
|
683
|
+
props: {
|
|
684
|
+
value: [Number, String],
|
|
685
|
+
data: {
|
|
686
|
+
type: Array,
|
|
687
|
+
default: function _default() {
|
|
688
|
+
return [];
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
field: {
|
|
692
|
+
type: String,
|
|
693
|
+
default: 'value'
|
|
694
|
+
},
|
|
695
|
+
keepFirst: Boolean,
|
|
696
|
+
clearOnSelect: Boolean,
|
|
697
|
+
openOnFocus: Boolean,
|
|
698
|
+
customFormatter: Function
|
|
699
|
+
},
|
|
700
|
+
data: function data() {
|
|
701
|
+
return {
|
|
702
|
+
selected: null,
|
|
703
|
+
hovered: null,
|
|
704
|
+
isActive: false,
|
|
705
|
+
newValue: this.value,
|
|
706
|
+
newAutocomplete: this.autocomplete || 'off',
|
|
707
|
+
isListInViewportVertically: true,
|
|
708
|
+
hasFocus: false,
|
|
709
|
+
_isAutocomplete: true,
|
|
710
|
+
_elementRef: 'input'
|
|
711
|
+
};
|
|
712
|
+
},
|
|
713
|
+
computed: {
|
|
714
|
+
/**
|
|
715
|
+
* White-listed items to not close when clicked.
|
|
716
|
+
* Add input, dropdown and all children.
|
|
717
|
+
*/
|
|
718
|
+
whiteList: function whiteList() {
|
|
719
|
+
var whiteList = [];
|
|
720
|
+
whiteList.push(this.$refs.input.$el.querySelector('input'));
|
|
721
|
+
whiteList.push(this.$refs.dropdown); // Add all chidren from dropdown
|
|
722
|
+
|
|
723
|
+
if (this.$refs.dropdown !== undefined) {
|
|
724
|
+
var children = this.$refs.dropdown.querySelectorAll('*');
|
|
725
|
+
var _iteratorNormalCompletion = true;
|
|
726
|
+
var _didIteratorError = false;
|
|
727
|
+
var _iteratorError = undefined;
|
|
728
|
+
|
|
729
|
+
try {
|
|
730
|
+
for (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
731
|
+
var child = _step.value;
|
|
732
|
+
whiteList.push(child);
|
|
733
|
+
}
|
|
734
|
+
} catch (err) {
|
|
735
|
+
_didIteratorError = true;
|
|
736
|
+
_iteratorError = err;
|
|
737
|
+
} finally {
|
|
738
|
+
try {
|
|
739
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
740
|
+
_iterator.return();
|
|
741
|
+
}
|
|
742
|
+
} finally {
|
|
743
|
+
if (_didIteratorError) {
|
|
744
|
+
throw _iteratorError;
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
return whiteList;
|
|
751
|
+
},
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Check if exists default slot
|
|
755
|
+
*/
|
|
756
|
+
hasDefaultSlot: function hasDefaultSlot() {
|
|
757
|
+
return !!this.$scopedSlots.default;
|
|
758
|
+
},
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Check if exists "empty" slot
|
|
762
|
+
*/
|
|
763
|
+
hasEmptySlot: function hasEmptySlot() {
|
|
764
|
+
return !!this.$slots.empty;
|
|
765
|
+
},
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Check if exists "header" slot
|
|
769
|
+
*/
|
|
770
|
+
hasHeaderSlot: function hasHeaderSlot() {
|
|
771
|
+
return !!this.$slots.header;
|
|
772
|
+
},
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Check if exists "footer" slot
|
|
776
|
+
*/
|
|
777
|
+
hasFooterSlot: function hasFooterSlot() {
|
|
778
|
+
return !!this.$slots.footer;
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
watch: {
|
|
782
|
+
/**
|
|
783
|
+
* When dropdown is toggled, check the visibility to know when
|
|
784
|
+
* to open upwards.
|
|
785
|
+
*/
|
|
786
|
+
isActive: function isActive(active) {
|
|
787
|
+
var _this = this;
|
|
788
|
+
|
|
789
|
+
if (active) {
|
|
790
|
+
this.calcDropdownInViewportVertical();
|
|
791
|
+
} else {
|
|
792
|
+
this.$nextTick(function () {
|
|
793
|
+
return _this.setHovered(null);
|
|
794
|
+
}); // Timeout to wait for the animation to finish before recalculating
|
|
795
|
+
|
|
796
|
+
setTimeout(function () {
|
|
797
|
+
_this.calcDropdownInViewportVertical();
|
|
798
|
+
}, 100);
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* When updating input's value
|
|
804
|
+
* 1. Emit changes
|
|
805
|
+
* 2. If value isn't the same as selected, set null
|
|
806
|
+
* 3. Close dropdown if value is clear or else open it
|
|
807
|
+
*/
|
|
808
|
+
newValue: function newValue(value) {
|
|
809
|
+
this.$emit('input', value); // Check if selected is invalid
|
|
810
|
+
|
|
811
|
+
var currentValue = this.getValue(this.selected);
|
|
812
|
+
|
|
813
|
+
if (currentValue && currentValue !== value) {
|
|
814
|
+
this.setSelected(null, false);
|
|
815
|
+
} // Close dropdown if input is clear or else open it
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
if (this.hasFocus && (!this.openOnFocus || value)) {
|
|
819
|
+
this.isActive = !!value;
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* When v-model is changed:
|
|
825
|
+
* 1. Update internal value.
|
|
826
|
+
* 2. If it's invalid, validate again.
|
|
827
|
+
*/
|
|
828
|
+
value: function value(_value) {
|
|
829
|
+
this.newValue = _value;
|
|
830
|
+
!this.isValid && this.$refs.input.checkHtml5Validity();
|
|
831
|
+
},
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* Select first option if "keep-first
|
|
835
|
+
*/
|
|
836
|
+
data: function data(value) {
|
|
837
|
+
// Keep first option always pre-selected
|
|
838
|
+
if (this.keepFirst) {
|
|
839
|
+
this.selectFirstOption(value);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
methods: {
|
|
844
|
+
/**
|
|
845
|
+
* Set which option is currently hovered.
|
|
846
|
+
*/
|
|
847
|
+
setHovered: function setHovered(option) {
|
|
848
|
+
if (option === undefined) return;
|
|
849
|
+
this.hovered = option;
|
|
850
|
+
},
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* Set which option is currently selected, update v-model,
|
|
854
|
+
* update input value and close dropdown.
|
|
855
|
+
*/
|
|
856
|
+
setSelected: function setSelected(option) {
|
|
857
|
+
var _this2 = this;
|
|
858
|
+
|
|
859
|
+
var closeDropdown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
860
|
+
if (option === undefined) return;
|
|
861
|
+
this.selected = option;
|
|
862
|
+
this.$emit('select', this.selected);
|
|
863
|
+
|
|
864
|
+
if (this.selected !== null) {
|
|
865
|
+
this.newValue = this.clearOnSelect ? '' : this.getValue(this.selected);
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
closeDropdown && this.$nextTick(function () {
|
|
869
|
+
_this2.isActive = false;
|
|
870
|
+
});
|
|
871
|
+
},
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Select first option
|
|
875
|
+
*/
|
|
876
|
+
selectFirstOption: function selectFirstOption(options) {
|
|
877
|
+
var _this3 = this;
|
|
878
|
+
|
|
879
|
+
this.$nextTick(function () {
|
|
880
|
+
if (options.length) {
|
|
881
|
+
// If has visible data or open on focus, keep updating the hovered
|
|
882
|
+
if (_this3.openOnFocus || _this3.newValue !== '' && _this3.hovered !== options[0]) {
|
|
883
|
+
_this3.setHovered(options[0]);
|
|
884
|
+
}
|
|
885
|
+
} else {
|
|
886
|
+
_this3.setHovered(null);
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
},
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* Enter key listener.
|
|
893
|
+
* Select the hovered option.
|
|
894
|
+
*/
|
|
895
|
+
enterPressed: function enterPressed() {
|
|
896
|
+
if (this.hovered === null) return;
|
|
897
|
+
this.setSelected(this.hovered);
|
|
898
|
+
},
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Tab key listener.
|
|
902
|
+
* Select hovered option if it exists, close dropdown, then allow
|
|
903
|
+
* native handling to move to next tabbable element.
|
|
904
|
+
*/
|
|
905
|
+
tabPressed: function tabPressed() {
|
|
906
|
+
if (this.hovered === null) {
|
|
907
|
+
this.isActive = false;
|
|
908
|
+
return;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
this.setSelected(this.hovered);
|
|
912
|
+
},
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* Close dropdown if clicked outside.
|
|
916
|
+
*/
|
|
917
|
+
clickedOutside: function clickedOutside(event) {
|
|
918
|
+
if (this.whiteList.indexOf(event.target) < 0) this.isActive = false;
|
|
919
|
+
},
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* Return display text for the input.
|
|
923
|
+
* If object, get value from path, or else just the value.
|
|
924
|
+
*/
|
|
925
|
+
getValue: function getValue(option) {
|
|
926
|
+
if (!option) return;
|
|
927
|
+
|
|
928
|
+
if (typeof this.customFormatter !== 'undefined') {
|
|
929
|
+
return this.customFormatter(option);
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
return _typeof(option) === 'object' ? getValueByPath(option, this.field) : option;
|
|
933
|
+
},
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Calculate if the dropdown is vertically visible when activated,
|
|
937
|
+
* otherwise it is openened upwards.
|
|
938
|
+
*/
|
|
939
|
+
calcDropdownInViewportVertical: function calcDropdownInViewportVertical() {
|
|
940
|
+
var _this4 = this;
|
|
941
|
+
|
|
942
|
+
this.$nextTick(function () {
|
|
943
|
+
/**
|
|
944
|
+
* this.$refs.dropdown may be undefined
|
|
945
|
+
* when Autocomplete is conditional rendered
|
|
946
|
+
*/
|
|
947
|
+
if (_this4.$refs.dropdown === undefined) return;
|
|
948
|
+
|
|
949
|
+
var rect = _this4.$refs.dropdown.getBoundingClientRect();
|
|
950
|
+
|
|
951
|
+
_this4.isListInViewportVertically = rect.top >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight);
|
|
952
|
+
});
|
|
953
|
+
},
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Arrows keys listener.
|
|
957
|
+
* If dropdown is active, set hovered option, or else just open.
|
|
958
|
+
*/
|
|
959
|
+
keyArrows: function keyArrows(direction) {
|
|
960
|
+
var sum = direction === 'down' ? 1 : -1;
|
|
961
|
+
|
|
962
|
+
if (this.isActive) {
|
|
963
|
+
var index = this.data.indexOf(this.hovered) + sum;
|
|
964
|
+
index = index > this.data.length - 1 ? this.data.length : index;
|
|
965
|
+
index = index < 0 ? 0 : index;
|
|
966
|
+
this.setHovered(this.data[index]);
|
|
967
|
+
var list = this.$refs.dropdown.querySelector('.dropdown-content');
|
|
968
|
+
var element = list.querySelectorAll('a.dropdown-item:not(.is-disabled)')[index];
|
|
969
|
+
if (!element) return;
|
|
970
|
+
var visMin = list.scrollTop;
|
|
971
|
+
var visMax = list.scrollTop + list.clientHeight - element.clientHeight;
|
|
972
|
+
|
|
973
|
+
if (element.offsetTop < visMin) {
|
|
974
|
+
list.scrollTop = element.offsetTop;
|
|
975
|
+
} else if (element.offsetTop >= visMax) {
|
|
976
|
+
list.scrollTop = element.offsetTop - list.clientHeight + element.clientHeight;
|
|
977
|
+
}
|
|
978
|
+
} else {
|
|
979
|
+
this.isActive = true;
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* Focus listener.
|
|
985
|
+
* If value is the same as selected, select all text.
|
|
986
|
+
*/
|
|
987
|
+
focused: function focused(event) {
|
|
988
|
+
if (this.getValue(this.selected) === this.newValue) {
|
|
989
|
+
this.$el.querySelector('input').select();
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
if (this.openOnFocus) {
|
|
993
|
+
this.isActive = true;
|
|
994
|
+
|
|
995
|
+
if (this.keepFirst) {
|
|
996
|
+
this.selectFirstOption(this.data);
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
this.hasFocus = true;
|
|
1001
|
+
this.$emit('focus', event);
|
|
1002
|
+
},
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Blur listener.
|
|
1006
|
+
*/
|
|
1007
|
+
onBlur: function onBlur(event) {
|
|
1008
|
+
this.hasFocus = false;
|
|
1009
|
+
this.$emit('blur', event);
|
|
1010
|
+
},
|
|
1011
|
+
onInput: function onInput(event) {
|
|
1012
|
+
var currentValue = this.getValue(this.selected);
|
|
1013
|
+
if (currentValue && currentValue === this.newValue) return;
|
|
1014
|
+
this.$emit('typing', this.newValue);
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
created: function created() {
|
|
1018
|
+
if (typeof window !== 'undefined') {
|
|
1019
|
+
document.addEventListener('click', this.clickedOutside);
|
|
1020
|
+
window.addEventListener('resize', this.calcDropdownInViewportVertical);
|
|
1021
|
+
}
|
|
1022
|
+
},
|
|
1023
|
+
beforeDestroy: function beforeDestroy() {
|
|
1024
|
+
if (typeof window !== 'undefined') {
|
|
1025
|
+
document.removeEventListener('click', this.clickedOutside);
|
|
1026
|
+
window.removeEventListener('resize', this.calcDropdownInViewportVertical);
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
};
|
|
1030
|
+
|
|
1031
|
+
/* script */
|
|
1032
|
+
const __vue_script__$2 = script$2;
|
|
1033
|
+
|
|
1034
|
+
/* template */
|
|
1035
|
+
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":"text","size":_vm.size,"loading":_vm.loading,"rounded":_vm.rounded,"icon":_vm.icon,"icon-pack":_vm.iconPack,"maxlength":_vm.maxlength,"autocomplete":_vm.newAutocomplete,"use-html5-validation":_vm.useHtml5Validation},on:{"input":_vm.onInput,"focus":_vm.focused,"blur":_vm.onBlur},nativeOn:{"keyup":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"esc",27,$event.key)){ return null; }$event.preventDefault();_vm.isActive = false;},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"tab",9,$event.key)){ return null; }_vm.tabPressed($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.enterPressed($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"up",38,$event.key)){ return null; }$event.preventDefault();_vm.keyArrows('up');},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"down",40,$event.key)){ return null; }$event.preventDefault();_vm.keyArrows('down');}]},model:{value:(_vm.newValue),callback:function ($$v) {_vm.newValue=$$v;},expression:"newValue"}},'b-input',_vm.$attrs,false)),_vm._v(" "),_c('transition',{attrs:{"name":"fade"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive && (_vm.data.length > 0 || _vm.hasEmptySlot || _vm.hasHeaderSlot)),expression:"isActive && (data.length > 0 || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{ 'is-opened-top': !_vm.isListInViewportVertically }},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"dropdown-content"},[(_vm.hasHeaderSlot)?_c('div',{staticClass:"dropdown-item"},[_vm._t("header")],2):_vm._e(),_vm._v(" "),_vm._l((_vm.data),function(option,index){return _c('a',{key:index,staticClass:"dropdown-item",class:{ 'is-hovered': option === _vm.hovered },on:{"click":function($event){_vm.setSelected(option);}}},[(_vm.hasDefaultSlot)?_vm._t("default",null,{option:option,index:index}):_c('span',[_vm._v("\n "+_vm._s(_vm.getValue(option, true))+"\n ")])],2)}),_vm._v(" "),(_vm.data.length === 0 && _vm.hasEmptySlot)?_c('div',{staticClass:"dropdown-item is-disabled"},[_vm._t("empty")],2):_vm._e(),_vm._v(" "),(_vm.hasFooterSlot)?_c('div',{staticClass:"dropdown-item"},[_vm._t("footer")],2):_vm._e()],2)])])],1)};
|
|
1036
|
+
var __vue_staticRenderFns__$2 = [];
|
|
1037
|
+
|
|
1038
|
+
/* style */
|
|
1039
|
+
const __vue_inject_styles__$2 = undefined;
|
|
1040
|
+
/* scoped */
|
|
1041
|
+
const __vue_scope_id__$2 = undefined;
|
|
1042
|
+
/* module identifier */
|
|
1043
|
+
const __vue_module_identifier__$2 = undefined;
|
|
1044
|
+
/* functional template */
|
|
1045
|
+
const __vue_is_functional_template__$2 = false;
|
|
1046
|
+
/* style inject */
|
|
1047
|
+
|
|
1048
|
+
/* style inject SSR */
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
var Autocomplete = normalizeComponent_1(
|
|
1053
|
+
{ render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
|
|
1054
|
+
__vue_inject_styles__$2,
|
|
1055
|
+
__vue_script__$2,
|
|
1056
|
+
__vue_scope_id__$2,
|
|
1057
|
+
__vue_is_functional_template__$2,
|
|
1058
|
+
__vue_module_identifier__$2,
|
|
1059
|
+
undefined,
|
|
1060
|
+
undefined
|
|
1061
|
+
);
|
|
1062
|
+
|
|
1063
|
+
var use = function use(plugin) {
|
|
1064
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
1065
|
+
window.Vue.use(plugin);
|
|
1066
|
+
}
|
|
1067
|
+
};
|
|
1068
|
+
var registerComponent = function registerComponent(Vue, component) {
|
|
1069
|
+
Vue.component(component.name, component);
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1072
|
+
var Plugin = {
|
|
1073
|
+
install: function install(Vue) {
|
|
1074
|
+
registerComponent(Vue, Autocomplete);
|
|
1075
|
+
}
|
|
1076
|
+
};
|
|
1077
|
+
use(Plugin);
|
|
1078
|
+
|
|
1079
|
+
exports.Autocomplete = Autocomplete;
|
|
1080
|
+
exports.default = Plugin;
|
|
1081
|
+
|
|
1082
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1083
|
+
|
|
1084
|
+
}));
|