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,2340 @@
|
|
|
1
|
-
/*! Buefy v0.
|
|
2
|
-
!(function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}})("undefined"!=typeof self?self:this,(function(){return (function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=272)})([(function(e,t){e.exports=function(e,t,n,i,r){var s,o=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(s=e,o=e.default);var u="function"==typeof o?o.options:o;t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns),i&&(u._scopeId=i);var l;if(r?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},u._ssrRegister=l):n&&(l=n),l){var c=u.functional,d=c?u.render:u.beforeCreate;c?u.render=function(e,t){return l.call(t),d(e,t)}:u.beforeCreate=d?[].concat(d,l):[l]}return{esModule:s,exports:o,options:u}}}),(function(e,t,n){e.exports=!n(7)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))}),(function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)}),(function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)}),(function(e,t,n){var i=n(10),r=n(20),s=n(15),o=Object.defineProperty;t.f=n(1)?Object.defineProperty:function(e,t,n){if(i(e),t=s(t,!0),i(n),r)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}}),(function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}}),(function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}}),(function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}}),(function(e,t,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};t.a=i}),(function(e,t,n){var i=n(4),r=n(14);e.exports=n(1)?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}}),(function(e,t,n){var i=n(5);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}}),(function(e,t,n){var i=n(36),r=n(28);e.exports=function(e){return i(r(e))}}),(function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s}));var i=function(e){"undefined"!=typeof window&&window.Vue&&window.Vue.use(e)},r=function(e,t){e.component(t.name,t)},s=function(e,t,n){e.prototype[t]=n}}),(function(e,t,n){var i=n(26)("wks"),r=n(17),s=n(2).Symbol,o="function"==typeof s;(e.exports=function(e){return i[e]||(i[e]=o&&s[e]||(o?s:r)("Symbol."+e))}).store=i}),(function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}}),(function(e,t,n){var i=n(5);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}}),(function(e,t,n){var i=n(2),r=n(3),s=n(29),o=n(9),a=n(6),u=function(e,t,n){var l,c,d,f=e&u.F,h=e&u.G,p=e&u.S,m=e&u.P,v=e&u.B,g=e&u.W,b=h?r:r[t]||(r[t]={}),y=b.prototype,S=h?i:p?i[t]:(i[t]||{}).prototype;h&&(n=t);for(l in n)(c=!f&&S&&void 0!==S[l])&&a(b,l)||(d=c?S[l]:n[l],b[l]=h&&"function"!=typeof S[l]?n[l]:v&&c?s(d,i):g&&S[l]==d?(function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t.prototype=e.prototype,t})(d):m&&"function"==typeof d?s(Function.call,d):d,m&&((b.virtual||(b.virtual={}))[l]=d,e&u.R&&y&&!y[l]&&o(y,l,d)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u}),(function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}}),(function(e,t,n){"use strict";t.__esModule=!0;var i=n(42),r=(function(e){return e&&e.__esModule?e:{default:e}})(i);t.default=function(e,t,n){return t in e?(0,r.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}),(function(e,t){e.exports=!0}),(function(e,t,n){e.exports=!n(1)&&!n(7)((function(){return 7!=Object.defineProperty(n(21)("div"),"a",{get:function(){return 7}}).a}))}),(function(e,t,n){var i=n(5),r=n(2).document,s=i(r)&&i(r.createElement);e.exports=function(e){return s?r.createElement(e):{}}}),(function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}}),(function(e,t,n){var i=n(0)(n(46),n(47),null,null,null);e.exports=i.exports}),(function(e,t,n){var i=n(34),r=n(27);e.exports=Object.keys||function(e){return i(e,r)}}),(function(e,t){t.f={}.propertyIsEnumerable}),(function(e,t,n){var i=n(3),r=n(2),s=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n(19)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})}),(function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")}),(function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}}),(function(e,t,n){var i=n(32);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}}),(function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}}),(function(e,t,n){var i=n(26)("keys"),r=n(17);e.exports=function(e){return i[e]||(i[e]=r(e))}}),(function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}}),(function(e,t){t.f=Object.getOwnPropertySymbols}),(function(e,t,n){var i=n(6),r=n(11),s=n(48)(!1),o=n(31)("IE_PROTO");e.exports=function(e,t){var n,a=r(e),u=0,l=[];for(n in a)n!=o&&i(a,n)&&l.push(n);for(;t.length>u;)i(a,n=t[u++])&&(~s(l,n)||l.push(n));return l}}),(function(e,t,n){var i=n(2),r=n(3),s=n(19),o=n(40),a=n(4).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=s?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:o.f(e)})}}),(function(e,t,n){var i=n(30);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}}),(function(e,t,n){e.exports={default:n(57),__esModule:!0}}),(function(e,t){e.exports={}}),(function(e,t,n){var i=n(4).f,r=n(6),s=n(13)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,s)&&i(e,s,{configurable:!0,value:t})}}),(function(e,t,n){t.f=n(13)}),(function(e,t,n){var i=n(22),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}}),(function(e,t,n){e.exports={default:n(43),__esModule:!0}}),(function(e,t,n){n(44);var i=n(3).Object;e.exports=function(e,t,n){return i.defineProperty(e,t,n)}}),(function(e,t,n){var i=n(16);i(i.S+i.F*!n(1),"Object",{defineProperty:n(4).f})}),(function(e,t,n){"use strict";var i=n(8);t.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 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),n=null,i=null,r=!0;return t.checkValidity()||(n="is-danger",i=this.validationMessage||t.validationMessage,r=!1),this.isValid=r,this.$nextTick((function(){e.parentField&&(e.parentField.type||(e.parentField.newType=n),e.parentField.message||(e.parentField.newMessage=i))})),this.isValid}}}}}),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(8);t.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 e=[];if("string"==typeof this.type)e=this.type.split("-");else for(var t in this.type)if(this.type[t]){e=t.split("-");break}if(!(e.length<=1))return"has-text-"+e[1]}},newCustomSize:function(){return this.customSize||this.customSizeByPack},customSizeByPack:function(){var e="mdi"===this.newPack?"mdi-24px":this.addFAPrefix("lg"),t="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 t;case"is-large":return n;default:return e}},useIconComponent:function(){return i.a.defaultIconComponent}},methods:{addFAPrefix:function(e){return this.useIconComponent?e:"fa-"+e},getEquivalentIconOf:function(e){if(!this.both)return e;switch(e){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 e}}}}}),(function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"icon",class:[e.newType,e.size]},[e.useIconComponent?n(e.useIconComponent,{tag:"component",class:[e.customClass],attrs:{icon:[e.newPack,e.newIcon],size:e.newCustomSize}}):n("i",{class:[e.newPack,e.newIcon,e.newCustomSize,e.customClass]})],1)},staticRenderFns:[]}}),(function(e,t,n){var i=n(11),r=n(41),s=n(49);e.exports=function(e){return function(t,n,o){var a,u=i(t),l=r(u.length),c=s(o,l);if(e&&n!=n){for(;l>c;)if((a=u[c++])!=a)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}}}),(function(e,t,n){var i=n(22),r=Math.max,s=Math.min;e.exports=function(e,t){return e=i(e),e<0?r(e+t,0):s(e,t)}}),(function(e,t,n){var i=n(34),r=n(27).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}}),(function(e,t,n){"use strict";function i(e,t){return t.split(".").reduce((function(e,t){return e[t]}),e)}function r(e,t,n){if(!e)return-1;if(!n||"function"!=typeof n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(e[i],t))return i;return-1}function s(e){void 0!==e.remove?e.remove():void 0!==e.parentNode&&e.parentNode.removeChild(e)}t.a=i,t.b=r,n.d(t,"c",(function(){return o})),t.d=s;var o={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 o.Android()||o.BlackBerry()||o.iOS()||o.Opera()||o.Windows()}}}),(function(e,t,n){e.exports=n(9)}),(function(e,t,n){var i=n(10),r=n(55),s=n(27),o=n(31)("IE_PROTO"),a=function(){},u=function(){var e,t=n(21)("iframe"),i=s.length;for(t.style.display="none",n(56).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;i--;)delete u.prototype[s[i]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(a.prototype=i(e),n=new a,a.prototype=null,n[o]=e):n=u(),void 0===t?n:r(n,t)}}),(function(e,t,n){var i=n(28);e.exports=function(e){return Object(i(e))}}),(function(e,t,n){var i=n(4),r=n(10),s=n(24);e.exports=n(1)?Object.defineProperties:function(e,t){r(e);for(var n,o=s(t),a=o.length,u=0;a>u;)i.f(e,n=o[u++],t[n]);return e}}),(function(e,t,n){var i=n(2).document;e.exports=i&&i.documentElement}),(function(e,t,n){n(58),n(64),n(65),n(66),e.exports=n(3).Symbol}),(function(e,t,n){"use strict";var i=n(2),r=n(6),s=n(1),o=n(16),a=n(52),u=n(59).KEY,l=n(7),c=n(26),d=n(39),f=n(17),h=n(13),p=n(40),m=n(35),v=n(60),g=n(61),b=n(10),y=n(5),S=n(11),w=n(15),k=n(14),x=n(53),_=n(62),M=n(63),C=n(4),P=n(24),T=M.f,O=C.f,F=_.f,A=i.Symbol,H=i.JSON,V=H&&H.stringify,D=h("_hidden"),N=h("toPrimitive"),I={}.propertyIsEnumerable,R=c("symbol-registry"),$=c("symbols"),j=c("op-symbols"),B=Object.prototype,z="function"==typeof A,E=i.QObject,L=!E||!E.prototype||!E.prototype.findChild,U=s&&l((function(){return 7!=x(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=T(B,t);i&&delete B[t],O(e,t,n),i&&e!==B&&O(B,t,i)}:O,W=function(e){var t=$[e]=x(A.prototype);return t._k=e,t},q=z&&"symbol"==typeof A.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof A},G=function(e,t,n){return e===B&&G(j,t,n),b(e),t=w(t,!0),b(n),r($,t)?(n.enumerable?(r(e,D)&&e[D][t]&&(e[D][t]=!1),n=x(n,{enumerable:k(0,!1)})):(r(e,D)||O(e,D,k(1,{})),e[D][t]=!0),U(e,t,n)):O(e,t,n)},Y=function(e,t){b(e);for(var n,i=v(t=S(t)),r=0,s=i.length;s>r;)G(e,n=i[r++],t[n]);return e},J=function(e,t){return void 0===t?x(e):Y(x(e),t)},K=function(e){var t=I.call(this,e=w(e,!0));return!(this===B&&r($,e)&&!r(j,e))&&(!(t||!r(this,e)||!r($,e)||r(this,D)&&this[D][e])||t)},X=function(e,t){if(e=S(e),t=w(t,!0),e!==B||!r($,t)||r(j,t)){var n=T(e,t);return!n||!r($,t)||r(e,D)&&e[D][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=F(S(e)),i=[],s=0;n.length>s;)r($,t=n[s++])||t==D||t==u||i.push(t);return i},Z=function(e){for(var t,n=e===B,i=F(n?j:S(e)),s=[],o=0;i.length>o;)!r($,t=i[o++])||n&&!r(B,t)||s.push($[t]);return s};z||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(j,n),r(this,D)&&r(this[D],e)&&(this[D][e]=!1),U(this,e,k(1,n))};return s&&L&&U(B,e,{configurable:!0,set:t}),W(e)},a(A.prototype,"toString",(function(){return this._k})),M.f=X,C.f=G,n(50).f=_.f=Q,n(25).f=K,n(33).f=Z,s&&!n(19)&&a(B,"propertyIsEnumerable",K,!0),p.f=function(e){return W(h(e))}),o(o.G+o.W+o.F*!z,{Symbol:A});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)h(ee[te++]);for(var ne=P(h.store),ie=0;ne.length>ie;)m(ne[ie++]);o(o.S+o.F*!z,"Symbol",{for:function(e){return r(R,e+="")?R[e]:R[e]=A(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in R)if(R[t]===e)return t},useSetter:function(){L=!0},useSimple:function(){L=!1}}),o(o.S+o.F*!z,"Object",{create:J,defineProperty:G,defineProperties:Y,getOwnPropertyDescriptor:X,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),H&&o(o.S+o.F*(!z||l((function(){var e=A();return"[null]"!=V([e])||"{}"!=V({a:e})||"{}"!=V(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,i=[e],r=1;arguments.length>r;)i.push(arguments[r++]);if(n=t=i[1],(y(t)||void 0!==e)&&!q(e))return g(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!q(t))return t}),i[1]=t,V.apply(H,i)}}),A.prototype[N]||n(9)(A.prototype,N,A.prototype.valueOf),d(A,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)}),(function(e,t,n){var i=n(17)("meta"),r=n(5),s=n(6),o=n(4).f,a=0,u=Object.isExtensible||function(){return!0},l=!n(7)((function(){return u(Object.preventExtensions({}))})),c=function(e){o(e,i,{value:{i:"O"+ ++a,w:{}}})},d=function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,i)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[i].i},f=function(e,t){if(!s(e,i)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[i].w},h=function(e){return l&&p.NEED&&u(e)&&!s(e,i)&&c(e),e},p=e.exports={KEY:i,NEED:!1,fastKey:d,getWeak:f,onFreeze:h}}),(function(e,t,n){var i=n(24),r=n(33),s=n(25);e.exports=function(e){var t=i(e),n=r.f;if(n)for(var o,a=n(e),u=s.f,l=0;a.length>l;)u.call(e,o=a[l++])&&t.push(o);return t}}),(function(e,t,n){var i=n(30);e.exports=Array.isArray||function(e){return"Array"==i(e)}}),(function(e,t,n){var i=n(11),r=n(50).f,s={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return r(e)}catch(e){return o.slice()}};e.exports.f=function(e){return o&&"[object Window]"==s.call(e)?a(e):r(i(e))}}),(function(e,t,n){var i=n(25),r=n(14),s=n(11),o=n(15),a=n(6),u=n(20),l=Object.getOwnPropertyDescriptor;t.f=n(1)?l:function(e,t){if(e=s(e),t=o(t,!0),u)try{return l(e,t)}catch(e){}if(a(e,t))return r(!i.f.call(e,t),e[t])}}),(function(e,t){}),(function(e,t,n){n(35)("asyncIterator")}),(function(e,t,n){n(35)("observable")}),(function(e,t,n){"use strict";var i=n(19),r=n(16),s=n(52),o=n(9),a=n(38),u=n(75),l=n(39),c=n(76),d=n(13)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,p,m,v,g){u(n,t,p);var b,y,S,w=function(e){if(!f&&e in M)return M[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",x="values"==m,_=!1,M=e.prototype,C=M[d]||M["@@iterator"]||m&&M[m],P=C||w(m),T=m?x?w("entries"):P:void 0,O="Array"==t?M.entries||C:C;if(O&&(S=c(O.call(new e)))!==Object.prototype&&S.next&&(l(S,k,!0),i||"function"==typeof S[d]||o(S,d,h)),x&&C&&"values"!==C.name&&(_=!0,P=function(){return C.call(this)}),i&&!g||!f&&!_&&M[d]||o(M,d,P),a[t]=P,a[k]=h,m)if(b={values:x?P:w("values"),keys:v?P:w("keys"),entries:T},g)for(y in b)y in M||s(M,y,b[y]);else r(r.P+r.F*(f||_),t,b);return b}}),(function(e,t,n){var i=n(0)(n(78),n(79),null,null,null);e.exports=i.exports}),(function(e,t,n){"use strict";var i=n(74)(!0);n(67)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})}))}),,,(function(e,t,n){n(81);for(var i=n(2),r=n(9),s=n(38),o=n(13)("toStringTag"),a="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(","),u=0;u<a.length;u++){var l=a[u],c=i[l],d=c&&c.prototype;d&&!d[o]&&r(d,o,l),s[l]=s.Array}}),(function(e,t,n){var i=n(77),r=n(13)("iterator"),s=n(38);e.exports=n(3).getIteratorMethod=function(e){if(void 0!=e)return e[r]||e["@@iterator"]||s[i(e)]}}),(function(e,t,n){var i=n(22),r=n(28);e.exports=function(e){return function(t,n){var s,o,a=String(r(t)),u=i(n),l=a.length;return u<0||u>=l?e?"":void 0:(s=a.charCodeAt(u),s<55296||s>56319||u+1===l||(o=a.charCodeAt(u+1))<56320||o>57343?e?a.charAt(u):s:e?a.slice(u,u+2):o-56320+(s-55296<<10)+65536)}}}),(function(e,t,n){"use strict";var i=n(53),r=n(14),s=n(39),o={};n(9)(o,n(13)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=i(o,{next:r(1,n)}),s(e,t+" Iterator")}}),(function(e,t,n){var i=n(6),r=n(54),s=n(31)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),i(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}}),(function(e,t,n){var i=n(30),r=n(13)("toStringTag"),s="Arguments"==i(function(){return arguments}()),o=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=o(t=Object(e),r))?n:s?i(t):"Object"==(a=i(t))&&"function"==typeof t.callee?"Arguments":a}}),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=n.n(i),s=n(23),o=n.n(s),a=n(8),u=n(45);t.default={name:"BInput",components:r()({},o.a.name,o.a),mixins:[u.a],inheritAttrs:!1,props:{value:[Number,String],type:{type:String,default:"text"},passwordReveal:Boolean,hasCounter:{type:Boolean,default:function(){return a.a.defaultInputHasCounter}},customClass:{type:String,default:""}},data:function(){return{newValue:this.value,newType:this.type,newAutocomplete:this.autocomplete||a.a.defaultInputAutocomplete,isPasswordVisible:!1,_elementRef:"textarea"===this.type?"textarea":"input"}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){this.newValue=e,this.$emit("input",e),!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(e){this.newValue=e}},methods:{togglePasswordVisibility:function(){var e=this;this.isPasswordVisible=!this.isPasswordVisible,this.newType=this.isPasswordVisible?"text":"password",this.$nextTick((function(){e.$refs.input.focus()}))},onInput:function(e){var t=this;this.$nextTick((function(){e.target&&(t.computedValue=e.target.value)}))}}}}),(function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"control",class:e.rootClasses},["textarea"!==e.type?n("input",e._b({ref:"input",staticClass:"input",class:[e.inputClasses,e.customClass],attrs:{type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,blur:e.onBlur,focus:e.onFocus}},"input",e.$attrs,!1)):n("textarea",e._b({ref:"textarea",staticClass:"textarea",class:[e.inputClasses,e.customClass],attrs:{maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,blur:e.onBlur,focus:e.onFocus}},"textarea",e.$attrs,!1)),e._v(" "),e.icon?n("b-icon",{staticClass:"is-left",attrs:{icon:e.icon,pack:e.iconPack,size:e.iconSize}}):e._e(),e._v(" "),e.loading||!e.passwordReveal&&!e.statusType?e._e():n("b-icon",{staticClass:"is-right",class:{"is-clickable":e.passwordReveal},attrs:{icon:e.passwordReveal?e.passwordVisibleIcon:e.statusTypeIcon,pack:e.iconPack,size:e.iconSize,type:e.passwordReveal?"is-primary":e.statusType,both:""},nativeOn:{click:function(t){e.togglePasswordVisibility(t)}}}),e._v(" "),e.maxlength&&e.hasCounter&&"number"!==e.type?n("small",{staticClass:"help counter",class:{"is-invisible":!e.isFocused}},[e._v("\n "+e._s(e.valueLength)+" / "+e._s(e.maxlength)+"\n ")]):e._e()],1)},staticRenderFns:[]}}),(function(e,t,n){e.exports={default:n(84),__esModule:!0}}),(function(e,t,n){"use strict";var i=n(82),r=n(83),s=n(38),o=n(11);e.exports=n(67)(Array,"Array",(function(e,t){this._t=o(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):"keys"==t?r(0,n):"values"==t?r(0,e[n]):r(0,[n,e[n]])}),"values"),s.Arguments=s.Array,i("keys"),i("values"),i("entries")}),(function(e,t){e.exports=function(){}}),(function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}}),(function(e,t,n){n(72),n(69),e.exports=n(85)}),(function(e,t,n){var i=n(10),r=n(73);e.exports=n(3).getIterator=function(e){var t=r(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return i(t.call(e))}}),,,,(function(e,t,n){var i=n(0)(n(93),n(94),null,null,null);e.exports=i.exports}),(function(e,t,n){var i=n(0)(n(95),n(96),null,null,null);e.exports=i.exports}),(function(e,t,n){var i=n(0)(n(97),n(100),null,null,null);e.exports=i.exports}),,(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(80),r=n.n(i),s=n(37),o=n.n(s),a=n(8);t.default={name:"BDropdown",props:{value:{type:[String,Number,Boolean,Object,Array,o.a,Function],default:null},disabled:Boolean,hoverable:Boolean,inline:Boolean,position:{type:String,validator:function(e){return["is-top-right","is-top-left","is-bottom-left"].indexOf(e)>-1}},mobileModal:{type:Boolean,default:function(){return a.a.defaultDropdownMobileModal}},ariaRole:{type:String,default:""},animation:{type:String,default:"fade"},multiple:Boolean,closeOnClick:{type:Boolean,default:!0}},data:function(){return{selected:this.value,isActive:!1,isHoverable:this.hoverable,_isDropdown:!0}},computed:{rootClasses:function(){return[this.position,{"is-disabled":this.disabled,"is-hoverable":this.hoverable,"is-inline":this.inline,"is-active":this.isActive||this.inline,"is-mobile-modal":this.isMobileModal}]},isMobileModal:function(){return this.mobileModal&&!this.inline&&!this.hoverable},ariaRoleMenu:function(){return"menu"===this.ariaRole||"list"===this.ariaRole?this.ariaRole:null}},watch:{value:function(e){this.selected=e},isActive:function(e){this.$emit("active-change",e)}},methods:{selectItem:function(e){if(this.multiple){if(this.selected){var t=this.selected.indexOf(e);-1===t?this.selected.push(e):this.selected.splice(t,1)}else this.selected=[e];this.$emit("change",this.selected)}else this.selected!==e&&(this.selected=e,this.$emit("change",this.selected));this.$emit("input",this.selected),this.multiple||(this.isActive=!this.closeOnClick)},isInWhiteList:function(e){if(e===this.$refs.dropdownMenu)return!0;if(e===this.$refs.trigger)return!0;if(void 0!==this.$refs.dropdownMenu){var t=this.$refs.dropdownMenu.querySelectorAll("*"),n=!0,i=!1,s=void 0;try{for(var o,a=r()(t);!(n=(o=a.next()).done);n=!0){if(e===o.value)return!0}}catch(e){i=!0,s=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw s}}}if(void 0!==this.$refs.trigger){var u=this.$refs.trigger.querySelectorAll("*"),l=!0,c=!1,d=void 0;try{for(var f,h=r()(u);!(l=(f=h.next()).done);l=!0){if(e===f.value)return!0}}catch(e){c=!0,d=e}finally{try{!l&&h.return&&h.return()}finally{if(c)throw d}}}return!1},clickedOutside:function(e){this.inline||this.isInWhiteList(e.target)||(this.isActive=!1)},toggle:function(){var e=this;this.disabled||(this.isActive?this.isActive=!this.isActive:this.$nextTick((function(){var t=!e.isActive;e.isActive=t,setTimeout((function(){return e.isActive=t}))})))}},created:function(){"undefined"!=typeof window&&document.addEventListener("click",this.clickedOutside)},beforeDestroy:function(){"undefined"!=typeof window&&document.removeEventListener("click",this.clickedOutside)}}}),(function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"dropdown",class:e.rootClasses},[e.inline?e._e():n("div",{ref:"trigger",staticClass:"dropdown-trigger",attrs:{role:"button","aria-haspopup":"true"},on:{click:e.toggle}},[e._t("trigger")],2),e._v(" "),n("transition",{attrs:{name:e.animation}},[e.isMobileModal?n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"background",attrs:{"aria-hidden":!e.isActive}}):e._e()]),e._v(" "),n("transition",{attrs:{name:e.animation}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!e.disabled&&(e.isActive||e.isHoverable)||e.inline,expression:"(!disabled && (isActive || isHoverable)) || inline"}],ref:"dropdownMenu",staticClass:"dropdown-menu",attrs:{"aria-hidden":!e.isActive}},[n("div",{staticClass:"dropdown-content",attrs:{role:e.ariaRoleMenu}},[e._t("default")],2)])])],1)},staticRenderFns:[]}}),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(37),r=n.n(i);t.default={name:"BDropdownItem",props:{value:{type:[String,Number,Boolean,Object,Array,r.a,Function],default:null},separator:Boolean,disabled:Boolean,custom:Boolean,paddingless:Boolean,hasLink:Boolean,ariaRole:{type:String,default:""}},computed:{anchorClasses:function(){return{"is-disabled":this.$parent.disabled||this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive}},itemClasses:function(){return{"dropdown-item":!this.hasLink,"is-disabled":this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive,"has-link":this.hasLink}},ariaRoleItem:function(){return"menuitem"===this.ariaRole||"listitem"===this.ariaRole?this.ariaRole:null},isClickable:function(){return!(this.$parent.disabled||this.separator||this.disabled||this.custom)},isActive:function(){return null!==this.$parent.selected&&(this.$parent.multiple?this.$parent.selected.indexOf(this.value)>=0:this.value===this.$parent.selected)}},methods:{selectItem:function(){this.isClickable&&(this.$parent.selectItem(this.value),this.$emit("click"))}},created:function(){if(!this.$parent.$data._isDropdown)throw this.$destroy(),new Error("You should wrap bDropdownItem on a bDropdown")}}}),(function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.separator?n("hr",{staticClass:"dropdown-divider"}):e.custom||e.hasLink?n("div",{class:e.itemClasses,attrs:{role:e.ariaRoleItem,tabindex:"0"},on:{click:e.selectItem}},[e._t("default")],2):n("a",{staticClass:"dropdown-item",class:e.anchorClasses,attrs:{role:e.ariaRoleItem,tabindex:"0"},on:{click:e.selectItem}},[e._t("default")],2)},staticRenderFns:[]}}),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),r=n.n(i),s=n(8),o=n(98),a=n.n(o);t.default={name:"BField",components:r()({},a.a.name,a.a),props:{type:[String,Object],label:String,labelFor:String,message:[String,Array,Object],grouped:Boolean,groupMultiline:Boolean,position:String,expanded:Boolean,horizontal:Boolean,addons:{type:Boolean,default:!0},customClass:String,labelPosition:{type:String,default:function(){return s.a.defaultFieldLabelPosition}}},data:function(){return{newType:this.type,newMessage:this.message,fieldLabelSize:null,_isField:!0}},computed:{rootClasses:function(){return[this.newPosition,{"is-expanded":this.expanded,"is-grouped-multiline":this.groupMultiline,"is-horizontal":this.horizontal,"is-floating-in-label":this.hasLabel&&!this.horizontal&&"inside"===this.labelPosition,"is-floating-label":this.hasLabel&&!this.horizontal&&"on-border"===this.labelPosition}]},newPosition:function(){if(void 0!==this.position){var e=this.position.split("-");if(!(e.length<1)){var t=this.grouped?"is-grouped-":"has-addons-";return this.position?t+e[1]:void 0}}},formattedMessage:function(){if("string"==typeof this.newMessage)return this.newMessage;var e=[];if(Array.isArray(this.newMessage))this.newMessage.forEach((function(t){if("string"==typeof t)e.push(t);else for(var n in t)t[n]&&e.push(n)}));else for(var t in this.newMessage)this.newMessage[t]&&e.push(t);return e.filter((function(e){if(e)return e})).join(" <br> ")},hasLabel:function(){return this.label||this.$slots.label}},watch:{type:function(e){this.newType=e},message:function(e){this.newMessage=e}},methods:{fieldType:function(){if(this.grouped)return"is-grouped";var e=0;return this.$slots.default&&(e=this.$slots.default.reduce((function(e,t){return t.tag?e+1:e}),0)),e>1&&this.addons&&!this.horizontal?"has-addons":void 0}},mounted:function(){if(this.horizontal){this.$el.querySelectorAll(".input, .select, .button, .textarea").length>0&&(this.fieldLabelSize="is-normal")}}}}),(function(e,t,n){var i=n(0)(n(99),null,null,null,null);e.exports=i.exports}),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"BFieldBody",props:{message:{type:String},type:{type:[String,Object]}},render:function(e){var t=this;return e("div",{attrs:{class:"field-body"}},this.$slots.default.map((function(n){return n.tag?t.message?e("b-field",{attrs:{message:t.message,type:t.type}},[n]):e("b-field",{attrs:{type:t.type}},[n]):n})))}}}),(function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"field",class:[e.rootClasses,e.fieldType()]},[e.horizontal?n("div",{staticClass:"field-label",class:[e.customClass,e.fieldLabelSize]},[e.hasLabel?n("label",{staticClass:"label",class:e.customClass,attrs:{for:e.labelFor}},[e.$slots.label?e._t("label"):[e._v(e._s(e.label))]],2):e._e()]):[e.hasLabel?n("label",{staticClass:"label",class:e.customClass,attrs:{for:e.labelFor}},[e.$slots.label?e._t("label"):[e._v(e._s(e.label))]],2):e._e()],e._v(" "),e.horizontal?n("b-field-body",{attrs:{message:e.newMessage?e.formattedMessage:"",type:e.newType}},[e._t("default")],2):[e._t("default")],e._v(" "),e.newMessage&&!e.horizontal?n("p",{staticClass:"help",class:e.newType,domProps:{innerHTML:e._s(e.formattedMessage)}}):e._e()],2)},staticRenderFns:[]}}),,,,,,,(function(e,t,n){"use strict";var i=n(45),r=n(51),s=n(8),o="AM",a="PM",u=function(e,t){var n=e.getHours(),i=e.getMinutes(),r=e.getSeconds(),s="";return"12"===t.hourFormat&&(s=" "+(n<12?o:a),n>12?n-=12:0===n&&(n=12)),t.pad(n)+":"+t.pad(i)+(t.enableSeconds?":"+t.pad(r):"")+s},l=function(e,t){if(e){var n=!1;if("12"===t.hourFormat){var i=e.split(" ");e=i[0],n=i[1]===o}var r=e.split(":"),s=parseInt(r[0],10),a=parseInt(r[1],10),u=t.enableSeconds?parseInt(r[2],10):0;if(isNaN(s)||s<0||s>23||"12"===t.hourFormat&&(s<1||s>12)||isNaN(a)||a<0||a>59)return null;var l=null;return t.computedValue&&!isNaN(t.computedValue)?l=new Date(t.computedValue):(l=new Date,l.setMilliseconds(0)),l.setSeconds(u),l.setMinutes(a),"12"===t.hourFormat&&(n&&12===s?s=0:n||12===s||(s+=12)),l.setHours(s),new Date(l.getTime())}return null};t.a={mixins:[i.a],inheritAttrs:!1,props:{value:Date,inline:Boolean,minTime:Date,maxTime:Date,placeholder:String,editable:Boolean,disabled:Boolean,hourFormat:{type:String,default:"24",validator:function(e){return"24"===e||"12"===e}},incrementMinutes:{type:Number,default:1},incrementSeconds:{type:Number,default:1},timeFormatter:{type:Function,default:function(e,t){return"function"==typeof s.a.defaultTimeFormatter?s.a.defaultTimeFormatter(e):u(e,t)}},timeParser:{type:Function,default:function(e,t){return"function"==typeof s.a.defaultTimeParser?s.a.defaultTimeParser(e):l(e,t)}},mobileNative:{type:Boolean,default:function(){return s.a.defaultTimepickerMobileNative}},position:String,unselectableTimes:Array,openOnFocus:Boolean,enableSeconds:Boolean},data:function(){return{dateSelected:this.value,hoursSelected:null,minutesSelected:null,secondsSelected:null,meridienSelected:null,_elementRef:"input",AM:o,PM:a,HOUR_FORMAT_24:"24",HOUR_FORMAT_12:"12"}},computed:{computedValue:{get:function(){return this.dateSelected},set:function(e){this.dateSelected=e,this.$emit("input",e)}},hours:function(){for(var e=[],t=this.isHourFormat24?24:12,n=0;n<t;n++){var i=n,r=i;this.isHourFormat24||(i=n+1,r=i,this.meridienSelected===this.AM?12===i&&(i=0):this.meridienSelected===this.PM&&12!==i&&(i+=12)),e.push({label:this.formatNumber(r),value:i})}return e},minutes:function(){for(var e=[],t=0;t<60;t+=this.incrementMinutes)e.push({label:this.formatNumber(t),value:t});return e},seconds:function(){for(var e=[],t=0;t<60;t+=this.incrementSeconds)e.push({label:this.formatNumber(t),value:t});return e},meridiens:function(){return[o,a]},isMobile:function(){return this.mobileNative&&r.c.any()},isHourFormat24:function(){return"24"===this.hourFormat}},watch:{hourFormat:function(){null!==this.hoursSelected&&(this.meridienSelected=this.hoursSelected>=12?a:o)},value:{handler:function(e){this.updateInternalState(e),!this.isValid&&this.$refs.input.checkHtml5Validity()},immediate:!0}},methods:{onMeridienChange:function(e){null!==this.hoursSelected&&(e===a?this.hoursSelected+=12:e===o&&(this.hoursSelected-=12)),this.updateDateSelected(this.hoursSelected,this.minutesSelected,this.enableSeconds?this.secondsSelected:0,e)},onHoursChange:function(e){this.updateDateSelected(parseInt(e,10),this.minutesSelected,this.enableSeconds?this.secondsSelected:0,this.meridienSelected)},onMinutesChange:function(e){this.updateDateSelected(this.hoursSelected,parseInt(e,10),this.enableSeconds?this.secondsSelected:0,this.meridienSelected)},onSecondsChange:function(e){this.updateDateSelected(this.hoursSelected,this.minutesSelected,parseInt(e,10),this.meridienSelected)},updateDateSelected:function(e,t,n,i){if(null!=e&&null!=t&&(!this.isHourFormat24&&null!==i||this.isHourFormat24)){var r=null;this.computedValue&&!isNaN(this.computedValue)?r=new Date(this.computedValue):(r=new Date,r.setMilliseconds(0)),r.setHours(e),r.setMinutes(t),r.setSeconds(n),this.computedValue=new Date(r.getTime())}},updateInternalState:function(e){e?(this.hoursSelected=e.getHours(),this.minutesSelected=e.getMinutes(),this.secondsSelected=e.getSeconds(),this.meridienSelected=e.getHours()>=12?a:o):(this.hoursSelected=null,this.minutesSelected=null,this.secondsSelected=null,this.meridienSelected=o),this.dateSelected=e},isHourDisabled:function(e){var t=this,n=!1;if(this.minTime){var i=this.minTime.getHours();n=e<i}if(this.maxTime&&!n){var r=this.maxTime.getHours();n=e>r}if(this.unselectableTimes&&!n){n=this.unselectableTimes.filter((function(n){return t.enableSeconds&&null!==t.secondsSelected?n.getHours()===e&&n.getMinutes()===t.minutesSelected&&n.getSeconds()===t.secondsSelected:null!==t.minutesSelected?n.getHours()===e&&n.getMinutes()===t.minutesSelected:n.getHours()===e})).length>0}return n},isMinuteDisabled:function(e){var t=this,n=!1;if(null!==this.hoursSelected){if(this.isHourDisabled(this.hoursSelected))n=!0;else{if(this.minTime){var i=this.minTime.getHours(),r=this.minTime.getMinutes();n=this.hoursSelected===i&&e<r}if(this.maxTime&&!n){var s=this.maxTime.getHours(),o=this.maxTime.getMinutes();n=this.hoursSelected===s&&e>o}}if(this.unselectableTimes&&!n){n=this.unselectableTimes.filter((function(n){return t.enableSeconds&&null!==t.secondsSelected?n.getHours()===t.hoursSelected&&n.getMinutes()===e&&n.getSeconds()===t.secondsSelected:n.getHours()===t.hoursSelected&&n.getMinutes()===e})).length>0}}return n},isSecondDisabled:function(e){var t=this,n=!1;if(null!==this.minutesSelected){if(this.isMinuteDisabled(this.minutesSelected))n=!0;else{if(this.minTime){var i=this.minTime.getHours(),r=this.minTime.getMinutes(),s=this.minTime.getSeconds();n=this.hoursSelected===i&&this.minutesSelected===r&&e<s}if(this.maxTime&&!n){var o=this.maxTime.getHours(),a=this.maxTime.getMinutes(),u=this.maxTime.getSeconds();n=this.hoursSelected===o&&this.minutesSelected===a&&e>u}}if(this.unselectableTimes&&!n){n=this.unselectableTimes.filter((function(n){return n.getHours()===t.hoursSelected&&n.getMinutes()===t.minutesSelected&&n.getSeconds()===e})).length>0}}return n},onChange:function(e){var t=this.timeParser(e,this);this.updateInternalState(t),t&&!isNaN(t)?this.computedValue=t:(this.computedValue=null,this.$refs.input.newValue=this.computedValue)},toggle:function(e){this.$refs.dropdown&&(this.$refs.dropdown.isActive="boolean"==typeof e?e:!this.$refs.dropdown.isActive)},close:function(){this.toggle(!1)},handleOnFocus:function(){this.onFocus(),this.openOnFocus&&this.toggle(!0)},formatHHMMSS:function(e){var t=new Date(e);if(e&&!isNaN(t)){var n=t.getHours(),i=t.getMinutes(),r=t.getSeconds();return this.formatNumber(n)+":"+this.formatNumber(i,!0)+":"+this.formatNumber(r,!0)}return""},onChangeNativePicker:function(e){var t=e.target.value;if(t){var n=null;this.computedValue&&!isNaN(this.computedValue)?n=new Date(this.computedValue):(n=new Date,n.setMilliseconds(0));var i=t.split(":");n.setHours(parseInt(i[0],10)),n.setMinutes(parseInt(i[1],10)),n.setSeconds(i[2]?parseInt(i[2],10):0),this.computedValue=new Date(n.getTime())}else this.computedValue=null},formatNumber:function(e,t){return this.isHourFormat24||t?this.pad(e):e},pad:function(e){return(e<10?"0":"")+e},formatValue:function(e){return e&&!isNaN(e)?this.timeFormatter(e,this):null},keyPress:function(e){this.$refs.dropdown&&this.$refs.dropdown.isActive&&27===e.keyCode&&this.toggle(!1)}},created:function(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},beforeDestroy:function(){"undefined"!=typeof window&&document.removeEventListener("keyup",this.keyPress)}}}),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(141),r=n.n(i),s=n(12);n.d(t,"Clockpicker",(function(){return r.a}));var o={install:function(e){Object(s.a)(e,r.a)}};Object(s.c)(o),t.default=o}),(function(e,t,n){var i=n(0)(n(142),n(146),null,null,null);e.exports=i.exports}),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(18),s=n.n(r),o=n(107),a=n(89),u=n.n(a),l=n(90),c=n.n(l),d=n(68),f=n.n(d),h=n(91),p=n.n(h),m=n(23),v=n.n(m),g=n(143),b=n.n(g);t.default={name:"BClockpicker",components:(i={},s()(i,b.a.name,b.a),s()(i,f.a.name,f.a),s()(i,p.a.name,p.a),s()(i,v.a.name,v.a),s()(i,u.a.name,u.a),s()(i,c.a.name,c.a),i),mixins:[o.a],props:{pickerSize:{type:Number,default:290},hourFormat:{type:String,default:"12",validator:function(e){return"24"===e||"12"===e}},incrementMinutes:{type:Number,default:5},autoSwitch:{type:Boolean,default:!0},type:{type:String,default:"is-primary"}},data:function(){return{isSelectingHour:!0,isDragging:!1,_isClockpicker:!0}},computed:{hoursDisplay:function(){if(null==this.hoursSelected)return"--";if(this.isHourFormat24)return this.pad(this.hoursSelected);var e=this.hoursSelected;return this.meridienSelected===this.PM&&(e-=12),0===e&&(e=12),e},minutesDisplay:function(){return null==this.minutesSelected?"--":this.pad(this.minutesSelected)},minFaceValue:function(){return this.isSelectingHour&&!this.isHourFormat24&&this.meridienSelected===this.PM?12:0},maxFaceValue:function(){return this.isSelectingHour?this.isHourFormat24||this.meridienSelected!==this.AM?23:11:59},faceFormatter:function(){return this.isSelectingHour&&!this.isHourFormat24?function(e){return e}:this.formatNumber},faceSize:function(){return this.pickerSize-24},faceDisabledValues:function(){return this.isSelectingHour?this.isHourDisabled:this.isMinuteDisabled}},methods:{onClockInput:function(e){this.isSelectingHour?(this.hoursSelected=e,this.onHoursChange(e)):(this.minutesSelected=e,this.onMinutesChange(e))},onClockChange:function(e){this.autoSwitch&&this.isSelectingHour&&(this.isSelectingHour=!this.isSelectingHour)},onMeridienClick:function(e){this.meridienSelected!==e&&(this.meridienSelected=e,this.onMeridienChange(e))}}}}),(function(e,t,n){var i=n(0)(n(144),n(145),null,null,null);e.exports=i.exports}),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={name:"BClockpickerFace",props:{pickerSize:Number,min:Number,max:Number,double:Boolean,value:Number,faceNumbers:Array,disabledValues:Function},data:function(){return{isDragging:!1,inputValue:this.value,prevAngle:720}},computed:{count:function(){return this.max-this.min+1},countPerRing:function(){return this.double?this.count/2:this.count},radius:function(){return this.pickerSize/2},outerRadius:function(){return this.radius-5-20},innerRadius:function(){return Math.max(.6*this.outerRadius,this.outerRadius-5-40)},degreesPerUnit:function(){return 360/this.countPerRing},degrees:function(){return this.degreesPerUnit*Math.PI/180},handRotateAngle:function(){for(var e=this.prevAngle;e<0;)e+=360;var t=this.calcHandAngle(this.displayedValue),n=this.shortestDistanceDegrees(e,t);return this.prevAngle+n},handScale:function(){return this.calcHandScale(this.displayedValue)},handStyle:function(){return{transform:"rotate("+this.handRotateAngle+"deg) scaleY("+this.handScale+")",transition:".3s cubic-bezier(.25,.8,.50,1)"}},displayedValue:function(){return null==this.inputValue?this.min:this.inputValue}},watch:{value:function(e){e!==this.inputValue&&(this.prevAngle=this.handRotateAngle),this.inputValue=e}},methods:{isDisabled:function(e){return this.disabledValues&&this.disabledValues(e)},euclidean:function(e,t){var n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)},shortestDistanceDegrees:function(e,t){var n=(t-e)%360,i=180-Math.abs(Math.abs(n)-180);return(n+360)%360<180?1*i:-1*i},coordToAngle:function(e,t){var n=2*Math.atan2(t.y-e.y-this.euclidean(e,t),t.x-e.x);return Math.abs(180*n/Math.PI)},getNumberTranslate:function(e){var t=this.getNumberCoords(e);return"translate("+t.x+"px, "+t.y+"px)"},getNumberCoords:function(e){var t=this.isInnerRing(e)?this.innerRadius:this.outerRadius;return{x:Math.round(t*Math.sin((e-this.min)*this.degrees)),y:Math.round(-t*Math.cos((e-this.min)*this.degrees))}},getFaceNumberClasses:function(e){return{active:e.value===this.displayedValue,disabled:this.isDisabled(e.value)}},isInnerRing:function(e){return this.double&&e-this.min>=this.countPerRing},calcHandAngle:function(e){var t=this.degreesPerUnit*(e-this.min);return this.isInnerRing(e)&&(t-=360),t},calcHandScale:function(e){return this.isInnerRing(e)?this.innerRadius/this.outerRadius:1},onMouseDown:function(e){e.preventDefault(),this.isDragging=!0,this.onDragMove(e)},onMouseUp:function(){this.isDragging=!1,this.isDisabled(this.inputValue)||this.$emit("change",this.inputValue)},onDragMove:function(e){if(e.preventDefault(),this.isDragging||"click"===e.type){var t=this.$refs.clock.getBoundingClientRect(),n=t.width,i=t.top,r=t.left,s="touches"in e?e.touches[0]:e,o=s.clientX,a=s.clientY,u={x:n/2,y:-n/2},l={x:o-r,y:i-a},c=Math.round(this.coordToAngle(u,l)+360)%360,d=this.double&&this.euclidean(u,l)<(this.outerRadius+this.innerRadius)/2-16,f=Math.round(c/this.degreesPerUnit)+this.min+(d?this.countPerRing:0);c>=360-this.degreesPerUnit/2&&(f=d?this.max:this.min),this.update(f)}},update:function(e){this.inputValue===e||this.isDisabled(e)||(this.prevAngle=this.handRotateAngle,this.inputValue=e,this.$emit("input",e))}}}}),(function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-clockpicker-face",on:{mousedown:e.onMouseDown,mouseup:e.onMouseUp,mousemove:e.onDragMove,touchstart:e.onMouseDown,touchend:e.onMouseUp,touchmove:e.onDragMove}},[n("div",{ref:"clock",staticClass:"b-clockpicker-face-outer-ring"},[n("div",{staticClass:"b-clockpicker-face-hand",style:e.handStyle}),e._v(" "),e._l(e.faceNumbers,(function(t,i){return n("span",{key:i,staticClass:"b-clockpicker-face-number",class:e.getFaceNumberClasses(t),style:{transform:e.getNumberTranslate(t.value)}},[n("span",[e._v(e._s(t.label))])])}))],2)])},staticRenderFns:[]}}),(function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-clockpicker control",class:[e.size,e.type,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?n("b-dropdown",{ref:"dropdown",attrs:{position:e.position,disabled:e.disabled,inline:e.inline}},[e.inline?e._e():n("b-input",e._b({ref:"input",attrs:{slot:"trigger",autocomplete:"off",value:e.formatValue(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,loading:e.loading,disabled:e.disabled,readonly:!e.editable,rounded:e.rounded,"use-html5-validation":e.useHtml5Validation},on:{focus:e.handleOnFocus,blur:function(t){e.onBlur()&&e.checkHtml5Validity()}},nativeOn:{click:function(t){t.stopPropagation(),e.toggle(!0)},keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key))return null;e.toggle(!0)},change:function(t){e.onChangeNativePicker(t)}},slot:"trigger"},"b-input",e.$attrs,!1)),e._v(" "),n("div",{staticClass:"card",attrs:{disabled:e.disabled,custom:""}},[e.inline?n("header",{staticClass:"card-header"},[n("div",{staticClass:"b-clockpicker-header card-header-title"},[n("div",{staticClass:"b-clockpicker-time"},[n("span",{staticClass:"b-clockpicker-btn",class:{active:e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!0}}},[e._v(e._s(e.hoursDisplay))]),e._v(" "),n("span",[e._v(":")]),e._v(" "),n("span",{staticClass:"b-clockpicker-btn",class:{active:!e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!1}}},[e._v(e._s(e.minutesDisplay))])]),e._v(" "),e.isHourFormat24?e._e():n("div",{staticClass:"b-clockpicker-period"},[n("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected==e.AM},on:{click:function(t){e.onMeridienClick(e.AM)}}},[e._v("am")]),e._v(" "),n("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected==e.PM},on:{click:function(t){e.onMeridienClick(e.PM)}}},[e._v("pm")])])])]):e._e(),e._v(" "),n("div",{staticClass:"card-content"},[n("div",{staticClass:"b-clockpicker-body",style:{width:e.faceSize+"px",height:e.faceSize+"px"}},[e.inline?e._e():n("div",{staticClass:"b-clockpicker-time"},[n("div",{staticClass:"b-clockpicker-btn",class:{active:e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!0}}},[e._v("Hours")]),e._v(" "),n("span",{staticClass:"b-clockpicker-btn",class:{active:!e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!1}}},[e._v("Min")])]),e._v(" "),e.isHourFormat24||e.inline?e._e():n("div",{staticClass:"b-clockpicker-period"},[n("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected==e.AM},on:{click:function(t){e.onMeridienClick(e.AM)}}},[e._v(e._s(e.AM))]),e._v(" "),n("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected==e.PM},on:{click:function(t){e.onMeridienClick(e.PM)}}},[e._v(e._s(e.PM))])]),e._v(" "),n("b-clockpicker-face",{attrs:{"picker-size":e.faceSize,min:e.minFaceValue,max:e.maxFaceValue,"face-numbers":e.isSelectingHour?e.hours:e.minutes,"disabled-values":e.faceDisabledValues,double:e.isSelectingHour&&e.isHourFormat24,value:e.isSelectingHour?e.hoursSelected:e.minutesSelected},on:{input:e.onClockInput,change:e.onClockChange}})],1)]),e._v(" "),void 0!==e.$slots.default&&e.$slots.default.length?n("footer",{staticClass:"b-clockpicker-footer card-footer"},[e._t("default")],2):e._e()])],1):n("b-input",e._b({ref:"input",attrs:{type:"time",autocomplete:"off",value:e.formatHHMMSS(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,loading:e.loading,max:e.formatHHMMSS(e.maxTime),min:e.formatHHMMSS(e.minTime),disabled:e.disabled,readonly:!1,"use-html5-validation":e.useHtml5Validation},on:{focus:e.handleOnFocus,blur:function(t){e.onBlur()&&e.checkHtml5Validity()}},nativeOn:{click:function(t){t.stopPropagation(),e.toggle(!0)},keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key))return null;e.toggle(!0)},change:function(t){e.onChangeNativePicker(t)}}},"b-input",e.$attrs,!1))],1)},staticRenderFns:[]}}),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,(function(e,t,n){e.exports=n(140)})])}));
|
|
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.Clockpicker = {}));
|
|
6
|
+
}(this, function (exports) { 'use strict';
|
|
7
|
+
|
|
8
|
+
function _defineProperty(obj, key, value) {
|
|
9
|
+
if (key in obj) {
|
|
10
|
+
Object.defineProperty(obj, key, {
|
|
11
|
+
value: value,
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true
|
|
15
|
+
});
|
|
16
|
+
} else {
|
|
17
|
+
obj[key] = value;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return obj;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var config = {
|
|
24
|
+
defaultContainerElement: null,
|
|
25
|
+
defaultIconPack: 'mdi',
|
|
26
|
+
defaultIconComponent: null,
|
|
27
|
+
defaultDialogConfirmText: null,
|
|
28
|
+
defaultDialogCancelText: null,
|
|
29
|
+
defaultSnackbarDuration: 3500,
|
|
30
|
+
defaultSnackbarPosition: null,
|
|
31
|
+
defaultToastDuration: 2000,
|
|
32
|
+
defaultToastPosition: null,
|
|
33
|
+
defaultNotificationDuration: 2000,
|
|
34
|
+
defaultNotificationPosition: null,
|
|
35
|
+
defaultTooltipType: 'is-primary',
|
|
36
|
+
defaultTooltipAnimated: false,
|
|
37
|
+
defaultTooltipDelay: 0,
|
|
38
|
+
defaultInputAutocomplete: 'on',
|
|
39
|
+
defaultDateFormatter: null,
|
|
40
|
+
defaultDateParser: null,
|
|
41
|
+
defaultDateCreator: null,
|
|
42
|
+
defaultDayNames: null,
|
|
43
|
+
defaultMonthNames: null,
|
|
44
|
+
defaultFirstDayOfWeek: null,
|
|
45
|
+
defaultUnselectableDaysOfWeek: null,
|
|
46
|
+
defaultTimeFormatter: null,
|
|
47
|
+
defaultTimeParser: null,
|
|
48
|
+
defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
|
|
49
|
+
defaultModalScroll: null,
|
|
50
|
+
defaultDatepickerMobileNative: true,
|
|
51
|
+
defaultTimepickerMobileNative: true,
|
|
52
|
+
defaultNoticeQueue: true,
|
|
53
|
+
defaultInputHasCounter: true,
|
|
54
|
+
defaultTaginputHasCounter: true,
|
|
55
|
+
defaultUseHtml5Validation: true,
|
|
56
|
+
defaultDropdownMobileModal: true,
|
|
57
|
+
defaultFieldLabelPosition: null,
|
|
58
|
+
defaultDatepickerYearsRange: [-100, 3],
|
|
59
|
+
defaultDatepickerNearbyMonthDays: true,
|
|
60
|
+
defaultDatepickerNearbySelectableMonthDays: false,
|
|
61
|
+
defaultDatepickerShowWeekNumber: false
|
|
62
|
+
};
|
|
63
|
+
var config$1 = config;
|
|
64
|
+
|
|
65
|
+
var FormElementMixin = {
|
|
66
|
+
props: {
|
|
67
|
+
size: String,
|
|
68
|
+
expanded: Boolean,
|
|
69
|
+
loading: Boolean,
|
|
70
|
+
rounded: Boolean,
|
|
71
|
+
icon: String,
|
|
72
|
+
iconPack: String,
|
|
73
|
+
// Native options to use in HTML5 validation
|
|
74
|
+
autocomplete: String,
|
|
75
|
+
maxlength: [Number, String],
|
|
76
|
+
useHtml5Validation: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: function _default() {
|
|
79
|
+
return config$1.defaultUseHtml5Validation;
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
validationMessage: String
|
|
83
|
+
},
|
|
84
|
+
data: function data() {
|
|
85
|
+
return {
|
|
86
|
+
isValid: true,
|
|
87
|
+
isFocused: false,
|
|
88
|
+
newIconPack: this.iconPack || config$1.defaultIconPack
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
computed: {
|
|
92
|
+
/**
|
|
93
|
+
* Find parent Field, max 3 levels deep.
|
|
94
|
+
*/
|
|
95
|
+
parentField: function parentField() {
|
|
96
|
+
var parent = this.$parent;
|
|
97
|
+
|
|
98
|
+
for (var i = 0; i < 3; i++) {
|
|
99
|
+
if (parent && !parent.$data._isField) {
|
|
100
|
+
parent = parent.$parent;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return parent;
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Get the type prop from parent if it's a Field.
|
|
109
|
+
*/
|
|
110
|
+
statusType: function statusType() {
|
|
111
|
+
if (!this.parentField) return;
|
|
112
|
+
if (!this.parentField.newType) return;
|
|
113
|
+
|
|
114
|
+
if (typeof this.parentField.newType === 'string') {
|
|
115
|
+
return this.parentField.newType;
|
|
116
|
+
} else {
|
|
117
|
+
for (var key in this.parentField.newType) {
|
|
118
|
+
if (this.parentField.newType[key]) {
|
|
119
|
+
return key;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Get the message prop from parent if it's a Field.
|
|
127
|
+
*/
|
|
128
|
+
statusMessage: function statusMessage() {
|
|
129
|
+
if (!this.parentField) return;
|
|
130
|
+
return this.parentField.newMessage;
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Fix icon size for inputs, large was too big
|
|
135
|
+
*/
|
|
136
|
+
iconSize: function iconSize() {
|
|
137
|
+
switch (this.size) {
|
|
138
|
+
case 'is-small':
|
|
139
|
+
return this.size;
|
|
140
|
+
|
|
141
|
+
case 'is-medium':
|
|
142
|
+
return;
|
|
143
|
+
|
|
144
|
+
case 'is-large':
|
|
145
|
+
return this.newIconPack === 'mdi' ? 'is-medium' : '';
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
methods: {
|
|
150
|
+
/**
|
|
151
|
+
* Focus method that work dynamically depending on the component.
|
|
152
|
+
*/
|
|
153
|
+
focus: function focus() {
|
|
154
|
+
var _this = this;
|
|
155
|
+
|
|
156
|
+
if (this.$data._elementRef === undefined) return;
|
|
157
|
+
this.$nextTick(function () {
|
|
158
|
+
var el = _this.$el.querySelector(_this.$data._elementRef);
|
|
159
|
+
|
|
160
|
+
if (el) el.focus();
|
|
161
|
+
});
|
|
162
|
+
},
|
|
163
|
+
onBlur: function onBlur($event) {
|
|
164
|
+
this.isFocused = false;
|
|
165
|
+
this.$emit('blur', $event);
|
|
166
|
+
this.checkHtml5Validity();
|
|
167
|
+
},
|
|
168
|
+
onFocus: function onFocus($event) {
|
|
169
|
+
this.isFocused = true;
|
|
170
|
+
this.$emit('focus', $event);
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Check HTML5 validation, set isValid property.
|
|
175
|
+
* If validation fail, send 'is-danger' type,
|
|
176
|
+
* and error message to parent if it's a Field.
|
|
177
|
+
*/
|
|
178
|
+
checkHtml5Validity: function checkHtml5Validity() {
|
|
179
|
+
var _this2 = this;
|
|
180
|
+
|
|
181
|
+
if (!this.useHtml5Validation) return;
|
|
182
|
+
if (this.$refs[this.$data._elementRef] === undefined) return;
|
|
183
|
+
var el = this.$el.querySelector(this.$data._elementRef);
|
|
184
|
+
var type = null;
|
|
185
|
+
var message = null;
|
|
186
|
+
var isValid = true;
|
|
187
|
+
|
|
188
|
+
if (!el.checkValidity()) {
|
|
189
|
+
type = 'is-danger';
|
|
190
|
+
message = this.validationMessage || el.validationMessage;
|
|
191
|
+
isValid = false;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
this.isValid = isValid;
|
|
195
|
+
this.$nextTick(function () {
|
|
196
|
+
if (_this2.parentField) {
|
|
197
|
+
// Set type only if not defined
|
|
198
|
+
if (!_this2.parentField.type) {
|
|
199
|
+
_this2.parentField.newType = type;
|
|
200
|
+
} // Set message only if not defined
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
if (!_this2.parentField.message) {
|
|
204
|
+
_this2.parentField.newMessage = message;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
return this.isValid;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Get value of an object property/path even if it's nested
|
|
215
|
+
*/
|
|
216
|
+
/**
|
|
217
|
+
* Mobile detection
|
|
218
|
+
* https://www.abeautifulsite.net/detecting-mobile-devices-with-javascript
|
|
219
|
+
*/
|
|
220
|
+
|
|
221
|
+
var isMobile = {
|
|
222
|
+
Android: function Android() {
|
|
223
|
+
return typeof window !== 'undefined' && window.navigator.userAgent.match(/Android/i);
|
|
224
|
+
},
|
|
225
|
+
BlackBerry: function BlackBerry() {
|
|
226
|
+
return typeof window !== 'undefined' && window.navigator.userAgent.match(/BlackBerry/i);
|
|
227
|
+
},
|
|
228
|
+
iOS: function iOS() {
|
|
229
|
+
return typeof window !== 'undefined' && window.navigator.userAgent.match(/iPhone|iPad|iPod/i);
|
|
230
|
+
},
|
|
231
|
+
Opera: function Opera() {
|
|
232
|
+
return typeof window !== 'undefined' && window.navigator.userAgent.match(/Opera Mini/i);
|
|
233
|
+
},
|
|
234
|
+
Windows: function Windows() {
|
|
235
|
+
return typeof window !== 'undefined' && window.navigator.userAgent.match(/IEMobile/i);
|
|
236
|
+
},
|
|
237
|
+
any: function any() {
|
|
238
|
+
return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows();
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
var AM = 'AM';
|
|
243
|
+
var PM = 'PM';
|
|
244
|
+
var HOUR_FORMAT_24 = '24';
|
|
245
|
+
var HOUR_FORMAT_12 = '12';
|
|
246
|
+
|
|
247
|
+
var defaultTimeFormatter = function defaultTimeFormatter(date, vm) {
|
|
248
|
+
var hours = date.getHours();
|
|
249
|
+
var minutes = date.getMinutes();
|
|
250
|
+
var seconds = date.getSeconds();
|
|
251
|
+
var period = '';
|
|
252
|
+
|
|
253
|
+
if (vm.hourFormat === HOUR_FORMAT_12) {
|
|
254
|
+
period = ' ' + (hours < 12 ? AM : PM);
|
|
255
|
+
|
|
256
|
+
if (hours > 12) {
|
|
257
|
+
hours -= 12;
|
|
258
|
+
} else if (hours === 0) {
|
|
259
|
+
hours = 12;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return vm.pad(hours) + ':' + vm.pad(minutes) + (vm.enableSeconds ? ':' + vm.pad(seconds) : '') + period;
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
var defaultTimeParser = function defaultTimeParser(timeString, vm) {
|
|
267
|
+
if (timeString) {
|
|
268
|
+
var am = false;
|
|
269
|
+
|
|
270
|
+
if (vm.hourFormat === HOUR_FORMAT_12) {
|
|
271
|
+
var dateString12 = timeString.split(' ');
|
|
272
|
+
timeString = dateString12[0];
|
|
273
|
+
am = dateString12[1] === AM;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
var time = timeString.split(':');
|
|
277
|
+
var hours = parseInt(time[0], 10);
|
|
278
|
+
var minutes = parseInt(time[1], 10);
|
|
279
|
+
var seconds = vm.enableSeconds ? parseInt(time[2], 10) : 0;
|
|
280
|
+
|
|
281
|
+
if (isNaN(hours) || hours < 0 || hours > 23 || vm.hourFormat === HOUR_FORMAT_12 && (hours < 1 || hours > 12) || isNaN(minutes) || minutes < 0 || minutes > 59) {
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
var d = null;
|
|
286
|
+
|
|
287
|
+
if (vm.computedValue && !isNaN(vm.computedValue)) {
|
|
288
|
+
d = new Date(vm.computedValue);
|
|
289
|
+
} else {
|
|
290
|
+
d = new Date();
|
|
291
|
+
d.setMilliseconds(0);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
d.setSeconds(seconds);
|
|
295
|
+
d.setMinutes(minutes);
|
|
296
|
+
|
|
297
|
+
if (vm.hourFormat === HOUR_FORMAT_12) {
|
|
298
|
+
if (am && hours === 12) {
|
|
299
|
+
hours = 0;
|
|
300
|
+
} else if (!am && hours !== 12) {
|
|
301
|
+
hours += 12;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
d.setHours(hours);
|
|
306
|
+
return new Date(d.getTime());
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return null;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
var TimepickerMixin = {
|
|
313
|
+
mixins: [FormElementMixin],
|
|
314
|
+
inheritAttrs: false,
|
|
315
|
+
props: {
|
|
316
|
+
value: Date,
|
|
317
|
+
inline: Boolean,
|
|
318
|
+
minTime: Date,
|
|
319
|
+
maxTime: Date,
|
|
320
|
+
placeholder: String,
|
|
321
|
+
editable: Boolean,
|
|
322
|
+
disabled: Boolean,
|
|
323
|
+
hourFormat: {
|
|
324
|
+
type: String,
|
|
325
|
+
default: HOUR_FORMAT_24,
|
|
326
|
+
validator: function validator(value) {
|
|
327
|
+
return value === HOUR_FORMAT_24 || value === HOUR_FORMAT_12;
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
incrementMinutes: {
|
|
331
|
+
type: Number,
|
|
332
|
+
default: 1
|
|
333
|
+
},
|
|
334
|
+
incrementSeconds: {
|
|
335
|
+
type: Number,
|
|
336
|
+
default: 1
|
|
337
|
+
},
|
|
338
|
+
timeFormatter: {
|
|
339
|
+
type: Function,
|
|
340
|
+
default: function _default(date, vm) {
|
|
341
|
+
if (typeof config$1.defaultTimeFormatter === 'function') {
|
|
342
|
+
return config$1.defaultTimeFormatter(date);
|
|
343
|
+
} else {
|
|
344
|
+
return defaultTimeFormatter(date, vm);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
timeParser: {
|
|
349
|
+
type: Function,
|
|
350
|
+
default: function _default(date, vm) {
|
|
351
|
+
if (typeof config$1.defaultTimeParser === 'function') {
|
|
352
|
+
return config$1.defaultTimeParser(date);
|
|
353
|
+
} else {
|
|
354
|
+
return defaultTimeParser(date, vm);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
mobileNative: {
|
|
359
|
+
type: Boolean,
|
|
360
|
+
default: function _default() {
|
|
361
|
+
return config$1.defaultTimepickerMobileNative;
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
position: String,
|
|
365
|
+
unselectableTimes: Array,
|
|
366
|
+
openOnFocus: Boolean,
|
|
367
|
+
enableSeconds: Boolean,
|
|
368
|
+
defaultMinutes: Number,
|
|
369
|
+
defaultSeconds: Number
|
|
370
|
+
},
|
|
371
|
+
data: function data() {
|
|
372
|
+
return {
|
|
373
|
+
dateSelected: this.value,
|
|
374
|
+
hoursSelected: null,
|
|
375
|
+
minutesSelected: null,
|
|
376
|
+
secondsSelected: null,
|
|
377
|
+
meridienSelected: null,
|
|
378
|
+
_elementRef: 'input',
|
|
379
|
+
AM: AM,
|
|
380
|
+
PM: PM,
|
|
381
|
+
HOUR_FORMAT_24: HOUR_FORMAT_24,
|
|
382
|
+
HOUR_FORMAT_12: HOUR_FORMAT_12
|
|
383
|
+
};
|
|
384
|
+
},
|
|
385
|
+
computed: {
|
|
386
|
+
computedValue: {
|
|
387
|
+
get: function get() {
|
|
388
|
+
return this.dateSelected;
|
|
389
|
+
},
|
|
390
|
+
set: function set(value) {
|
|
391
|
+
this.dateSelected = value;
|
|
392
|
+
this.$emit('input', value);
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
hours: function hours() {
|
|
396
|
+
var hours = [];
|
|
397
|
+
var numberOfHours = this.isHourFormat24 ? 24 : 12;
|
|
398
|
+
|
|
399
|
+
for (var i = 0; i < numberOfHours; i++) {
|
|
400
|
+
var value = i;
|
|
401
|
+
var label = value;
|
|
402
|
+
|
|
403
|
+
if (!this.isHourFormat24) {
|
|
404
|
+
value = i + 1;
|
|
405
|
+
label = value;
|
|
406
|
+
|
|
407
|
+
if (this.meridienSelected === this.AM) {
|
|
408
|
+
if (value === 12) {
|
|
409
|
+
value = 0;
|
|
410
|
+
}
|
|
411
|
+
} else if (this.meridienSelected === this.PM) {
|
|
412
|
+
if (value !== 12) {
|
|
413
|
+
value += 12;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
hours.push({
|
|
419
|
+
label: this.formatNumber(label),
|
|
420
|
+
value: value
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
return hours;
|
|
425
|
+
},
|
|
426
|
+
minutes: function minutes() {
|
|
427
|
+
var minutes = [];
|
|
428
|
+
|
|
429
|
+
for (var i = 0; i < 60; i += this.incrementMinutes) {
|
|
430
|
+
minutes.push({
|
|
431
|
+
label: this.formatNumber(i, true),
|
|
432
|
+
value: i
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
return minutes;
|
|
437
|
+
},
|
|
438
|
+
seconds: function seconds() {
|
|
439
|
+
var seconds = [];
|
|
440
|
+
|
|
441
|
+
for (var i = 0; i < 60; i += this.incrementSeconds) {
|
|
442
|
+
seconds.push({
|
|
443
|
+
label: this.formatNumber(i, true),
|
|
444
|
+
value: i
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
return seconds;
|
|
449
|
+
},
|
|
450
|
+
meridiens: function meridiens() {
|
|
451
|
+
return [AM, PM];
|
|
452
|
+
},
|
|
453
|
+
isMobile: function isMobile$1() {
|
|
454
|
+
return this.mobileNative && isMobile.any();
|
|
455
|
+
},
|
|
456
|
+
isHourFormat24: function isHourFormat24() {
|
|
457
|
+
return this.hourFormat === HOUR_FORMAT_24;
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
watch: {
|
|
461
|
+
hourFormat: function hourFormat() {
|
|
462
|
+
if (this.hoursSelected !== null) {
|
|
463
|
+
this.meridienSelected = this.hoursSelected >= 12 ? PM : AM;
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* When v-model is changed:
|
|
469
|
+
* 1. Update internal value.
|
|
470
|
+
* 2. If it's invalid, validate again.
|
|
471
|
+
*/
|
|
472
|
+
value: {
|
|
473
|
+
handler: function handler(value) {
|
|
474
|
+
this.updateInternalState(value);
|
|
475
|
+
!this.isValid && this.$refs.input.checkHtml5Validity();
|
|
476
|
+
},
|
|
477
|
+
immediate: true
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
methods: {
|
|
481
|
+
onMeridienChange: function onMeridienChange(value) {
|
|
482
|
+
if (this.hoursSelected !== null) {
|
|
483
|
+
if (value === PM) {
|
|
484
|
+
this.hoursSelected += 12;
|
|
485
|
+
} else if (value === AM) {
|
|
486
|
+
this.hoursSelected -= 12;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
this.updateDateSelected(this.hoursSelected, this.minutesSelected, this.enableSeconds ? this.secondsSelected : 0, value);
|
|
491
|
+
},
|
|
492
|
+
onHoursChange: function onHoursChange(value) {
|
|
493
|
+
if (!this.minutesSelected && this.defaultMinutes) {
|
|
494
|
+
this.minutesSelected = this.defaultMinutes;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
if (!this.secondsSelected && this.defaultSeconds) {
|
|
498
|
+
this.secondsSelected = this.defaultSeconds;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
this.updateDateSelected(parseInt(value, 10), this.minutesSelected, this.enableSeconds ? this.secondsSelected : 0, this.meridienSelected);
|
|
502
|
+
},
|
|
503
|
+
onMinutesChange: function onMinutesChange(value) {
|
|
504
|
+
if (!this.secondsSelected && this.defaultSeconds) {
|
|
505
|
+
this.secondsSelected = this.defaultSeconds;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
this.updateDateSelected(this.hoursSelected, parseInt(value, 10), this.enableSeconds ? this.secondsSelected : 0, this.meridienSelected);
|
|
509
|
+
},
|
|
510
|
+
onSecondsChange: function onSecondsChange(value) {
|
|
511
|
+
this.updateDateSelected(this.hoursSelected, this.minutesSelected, parseInt(value, 10), this.meridienSelected);
|
|
512
|
+
},
|
|
513
|
+
updateDateSelected: function updateDateSelected(hours, minutes, seconds, meridiens) {
|
|
514
|
+
if (hours != null && minutes != null && (!this.isHourFormat24 && meridiens !== null || this.isHourFormat24)) {
|
|
515
|
+
var time = null;
|
|
516
|
+
|
|
517
|
+
if (this.computedValue && !isNaN(this.computedValue)) {
|
|
518
|
+
time = new Date(this.computedValue);
|
|
519
|
+
} else {
|
|
520
|
+
time = new Date();
|
|
521
|
+
time.setMilliseconds(0);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
time.setHours(hours);
|
|
525
|
+
time.setMinutes(minutes);
|
|
526
|
+
time.setSeconds(seconds);
|
|
527
|
+
this.computedValue = new Date(time.getTime());
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
updateInternalState: function updateInternalState(value) {
|
|
531
|
+
if (value) {
|
|
532
|
+
this.hoursSelected = value.getHours();
|
|
533
|
+
this.minutesSelected = value.getMinutes();
|
|
534
|
+
this.secondsSelected = value.getSeconds();
|
|
535
|
+
this.meridienSelected = value.getHours() >= 12 ? PM : AM;
|
|
536
|
+
} else {
|
|
537
|
+
this.hoursSelected = null;
|
|
538
|
+
this.minutesSelected = null;
|
|
539
|
+
this.secondsSelected = null;
|
|
540
|
+
this.meridienSelected = AM;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
this.dateSelected = value;
|
|
544
|
+
},
|
|
545
|
+
isHourDisabled: function isHourDisabled(hour) {
|
|
546
|
+
var _this = this;
|
|
547
|
+
|
|
548
|
+
var disabled = false;
|
|
549
|
+
|
|
550
|
+
if (this.minTime) {
|
|
551
|
+
var minHours = this.minTime.getHours();
|
|
552
|
+
disabled = hour < minHours;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
if (this.maxTime) {
|
|
556
|
+
if (!disabled) {
|
|
557
|
+
var maxHours = this.maxTime.getHours();
|
|
558
|
+
disabled = hour > maxHours;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
if (this.unselectableTimes) {
|
|
563
|
+
if (!disabled) {
|
|
564
|
+
var unselectable = this.unselectableTimes.filter(function (time) {
|
|
565
|
+
if (_this.enableSeconds && _this.secondsSelected !== null) {
|
|
566
|
+
return time.getHours() === hour && time.getMinutes() === _this.minutesSelected && time.getSeconds() === _this.secondsSelected;
|
|
567
|
+
} else if (_this.minutesSelected !== null) {
|
|
568
|
+
return time.getHours() === hour && time.getMinutes() === _this.minutesSelected;
|
|
569
|
+
} else {
|
|
570
|
+
return time.getHours() === hour;
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
disabled = unselectable.length > 0;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
return disabled;
|
|
578
|
+
},
|
|
579
|
+
isMinuteDisabled: function isMinuteDisabled(minute) {
|
|
580
|
+
var _this2 = this;
|
|
581
|
+
|
|
582
|
+
var disabled = false;
|
|
583
|
+
|
|
584
|
+
if (this.hoursSelected !== null) {
|
|
585
|
+
if (this.isHourDisabled(this.hoursSelected)) {
|
|
586
|
+
disabled = true;
|
|
587
|
+
} else {
|
|
588
|
+
if (this.minTime) {
|
|
589
|
+
var minHours = this.minTime.getHours();
|
|
590
|
+
var minMinutes = this.minTime.getMinutes();
|
|
591
|
+
disabled = this.hoursSelected === minHours && minute < minMinutes;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
if (this.maxTime) {
|
|
595
|
+
if (!disabled) {
|
|
596
|
+
var maxHours = this.maxTime.getHours();
|
|
597
|
+
var maxMinutes = this.maxTime.getMinutes();
|
|
598
|
+
disabled = this.hoursSelected === maxHours && minute > maxMinutes;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
if (this.unselectableTimes) {
|
|
604
|
+
if (!disabled) {
|
|
605
|
+
var unselectable = this.unselectableTimes.filter(function (time) {
|
|
606
|
+
if (_this2.enableSeconds && _this2.secondsSelected !== null) {
|
|
607
|
+
return time.getHours() === _this2.hoursSelected && time.getMinutes() === minute && time.getSeconds() === _this2.secondsSelected;
|
|
608
|
+
} else {
|
|
609
|
+
return time.getHours() === _this2.hoursSelected && time.getMinutes() === minute;
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
disabled = unselectable.length > 0;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
return disabled;
|
|
618
|
+
},
|
|
619
|
+
isSecondDisabled: function isSecondDisabled(second) {
|
|
620
|
+
var _this3 = this;
|
|
621
|
+
|
|
622
|
+
var disabled = false;
|
|
623
|
+
|
|
624
|
+
if (this.minutesSelected !== null) {
|
|
625
|
+
if (this.isMinuteDisabled(this.minutesSelected)) {
|
|
626
|
+
disabled = true;
|
|
627
|
+
} else {
|
|
628
|
+
if (this.minTime) {
|
|
629
|
+
var minHours = this.minTime.getHours();
|
|
630
|
+
var minMinutes = this.minTime.getMinutes();
|
|
631
|
+
var minSeconds = this.minTime.getSeconds();
|
|
632
|
+
disabled = this.hoursSelected === minHours && this.minutesSelected === minMinutes && second < minSeconds;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
if (this.maxTime) {
|
|
636
|
+
if (!disabled) {
|
|
637
|
+
var maxHours = this.maxTime.getHours();
|
|
638
|
+
var maxMinutes = this.maxTime.getMinutes();
|
|
639
|
+
var maxSeconds = this.maxTime.getSeconds();
|
|
640
|
+
disabled = this.hoursSelected === maxHours && this.minutesSelected === maxMinutes && second > maxSeconds;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
if (this.unselectableTimes) {
|
|
646
|
+
if (!disabled) {
|
|
647
|
+
var unselectable = this.unselectableTimes.filter(function (time) {
|
|
648
|
+
return time.getHours() === _this3.hoursSelected && time.getMinutes() === _this3.minutesSelected && time.getSeconds() === second;
|
|
649
|
+
});
|
|
650
|
+
disabled = unselectable.length > 0;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
return disabled;
|
|
656
|
+
},
|
|
657
|
+
|
|
658
|
+
/*
|
|
659
|
+
* Parse string into date
|
|
660
|
+
*/
|
|
661
|
+
onChange: function onChange(value) {
|
|
662
|
+
var date = this.timeParser(value, this);
|
|
663
|
+
this.updateInternalState(date);
|
|
664
|
+
|
|
665
|
+
if (date && !isNaN(date)) {
|
|
666
|
+
this.computedValue = date;
|
|
667
|
+
} else {
|
|
668
|
+
// Force refresh input value when not valid date
|
|
669
|
+
this.computedValue = null;
|
|
670
|
+
this.$refs.input.newValue = this.computedValue;
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
|
|
674
|
+
/*
|
|
675
|
+
* Toggle timepicker
|
|
676
|
+
*/
|
|
677
|
+
toggle: function toggle(active) {
|
|
678
|
+
if (this.$refs.dropdown) {
|
|
679
|
+
this.$refs.dropdown.isActive = typeof active === 'boolean' ? active : !this.$refs.dropdown.isActive;
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
|
|
683
|
+
/*
|
|
684
|
+
* Close timepicker
|
|
685
|
+
*/
|
|
686
|
+
close: function close() {
|
|
687
|
+
this.toggle(false);
|
|
688
|
+
},
|
|
689
|
+
|
|
690
|
+
/*
|
|
691
|
+
* Call default onFocus method and show timepicker
|
|
692
|
+
*/
|
|
693
|
+
handleOnFocus: function handleOnFocus() {
|
|
694
|
+
this.onFocus();
|
|
695
|
+
|
|
696
|
+
if (this.openOnFocus) {
|
|
697
|
+
this.toggle(true);
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
|
|
701
|
+
/*
|
|
702
|
+
* Format date into string 'HH-MM-SS'
|
|
703
|
+
*/
|
|
704
|
+
formatHHMMSS: function formatHHMMSS(value) {
|
|
705
|
+
var date = new Date(value);
|
|
706
|
+
|
|
707
|
+
if (value && !isNaN(date)) {
|
|
708
|
+
var hours = date.getHours();
|
|
709
|
+
var minutes = date.getMinutes();
|
|
710
|
+
var seconds = date.getSeconds();
|
|
711
|
+
return this.formatNumber(hours, true) + ':' + this.formatNumber(minutes, true) + ':' + this.formatNumber(seconds, true);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
return '';
|
|
715
|
+
},
|
|
716
|
+
|
|
717
|
+
/*
|
|
718
|
+
* Parse time from string
|
|
719
|
+
*/
|
|
720
|
+
onChangeNativePicker: function onChangeNativePicker(event) {
|
|
721
|
+
var date = event.target.value;
|
|
722
|
+
|
|
723
|
+
if (date) {
|
|
724
|
+
var time = null;
|
|
725
|
+
|
|
726
|
+
if (this.computedValue && !isNaN(this.computedValue)) {
|
|
727
|
+
time = new Date(this.computedValue);
|
|
728
|
+
} else {
|
|
729
|
+
time = new Date();
|
|
730
|
+
time.setMilliseconds(0);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
var t = date.split(':');
|
|
734
|
+
time.setHours(parseInt(t[0], 10));
|
|
735
|
+
time.setMinutes(parseInt(t[1], 10));
|
|
736
|
+
time.setSeconds(t[2] ? parseInt(t[2], 10) : 0);
|
|
737
|
+
this.computedValue = new Date(time.getTime());
|
|
738
|
+
} else {
|
|
739
|
+
this.computedValue = null;
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
formatNumber: function formatNumber(value, prependZero) {
|
|
743
|
+
return this.isHourFormat24 || prependZero ? this.pad(value) : value;
|
|
744
|
+
},
|
|
745
|
+
pad: function pad(value) {
|
|
746
|
+
return (value < 10 ? '0' : '') + value;
|
|
747
|
+
},
|
|
748
|
+
|
|
749
|
+
/*
|
|
750
|
+
* Format date into string
|
|
751
|
+
*/
|
|
752
|
+
formatValue: function formatValue(date) {
|
|
753
|
+
if (date && !isNaN(date)) {
|
|
754
|
+
return this.timeFormatter(date, this);
|
|
755
|
+
} else {
|
|
756
|
+
return null;
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Keypress event that is bound to the document.
|
|
762
|
+
*/
|
|
763
|
+
keyPress: function keyPress(event) {
|
|
764
|
+
// Esc key
|
|
765
|
+
if (this.$refs.dropdown && this.$refs.dropdown.isActive && event.keyCode === 27) {
|
|
766
|
+
this.toggle(false);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
created: function created() {
|
|
771
|
+
if (typeof window !== 'undefined') {
|
|
772
|
+
document.addEventListener('keyup', this.keyPress);
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
beforeDestroy: function beforeDestroy() {
|
|
776
|
+
if (typeof window !== 'undefined') {
|
|
777
|
+
document.removeEventListener('keyup', this.keyPress);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
|
|
782
|
+
//
|
|
783
|
+
var script = {
|
|
784
|
+
name: 'BDropdown',
|
|
785
|
+
props: {
|
|
786
|
+
value: {
|
|
787
|
+
type: [String, Number, Boolean, Object, Array, Function],
|
|
788
|
+
default: null
|
|
789
|
+
},
|
|
790
|
+
disabled: Boolean,
|
|
791
|
+
hoverable: Boolean,
|
|
792
|
+
inline: Boolean,
|
|
793
|
+
position: {
|
|
794
|
+
type: String,
|
|
795
|
+
validator: function validator(value) {
|
|
796
|
+
return ['is-top-right', 'is-top-left', 'is-bottom-left'].indexOf(value) > -1;
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
mobileModal: {
|
|
800
|
+
type: Boolean,
|
|
801
|
+
default: function _default() {
|
|
802
|
+
return config$1.defaultDropdownMobileModal;
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
ariaRole: {
|
|
806
|
+
type: String,
|
|
807
|
+
default: ''
|
|
808
|
+
},
|
|
809
|
+
animation: {
|
|
810
|
+
type: String,
|
|
811
|
+
default: 'fade'
|
|
812
|
+
},
|
|
813
|
+
multiple: Boolean,
|
|
814
|
+
closeOnClick: {
|
|
815
|
+
type: Boolean,
|
|
816
|
+
default: true
|
|
817
|
+
}
|
|
818
|
+
},
|
|
819
|
+
data: function data() {
|
|
820
|
+
return {
|
|
821
|
+
selected: this.value,
|
|
822
|
+
isActive: false,
|
|
823
|
+
isHoverable: this.hoverable,
|
|
824
|
+
_isDropdown: true // Used internally by DropdownItem
|
|
825
|
+
|
|
826
|
+
};
|
|
827
|
+
},
|
|
828
|
+
computed: {
|
|
829
|
+
rootClasses: function rootClasses() {
|
|
830
|
+
return [this.position, {
|
|
831
|
+
'is-disabled': this.disabled,
|
|
832
|
+
'is-hoverable': this.hoverable,
|
|
833
|
+
'is-inline': this.inline,
|
|
834
|
+
'is-active': this.isActive || this.inline,
|
|
835
|
+
'is-mobile-modal': this.isMobileModal
|
|
836
|
+
}];
|
|
837
|
+
},
|
|
838
|
+
isMobileModal: function isMobileModal() {
|
|
839
|
+
return this.mobileModal && !this.inline && !this.hoverable;
|
|
840
|
+
},
|
|
841
|
+
ariaRoleMenu: function ariaRoleMenu() {
|
|
842
|
+
return this.ariaRole === 'menu' || this.ariaRole === 'list' ? this.ariaRole : null;
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
watch: {
|
|
846
|
+
/**
|
|
847
|
+
* When v-model is changed set the new selected item.
|
|
848
|
+
*/
|
|
849
|
+
value: function value(_value) {
|
|
850
|
+
this.selected = _value;
|
|
851
|
+
},
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Emit event when isActive value is changed.
|
|
855
|
+
*/
|
|
856
|
+
isActive: function isActive(value) {
|
|
857
|
+
this.$emit('active-change', value);
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
methods: {
|
|
861
|
+
/**
|
|
862
|
+
* Click listener from DropdownItem.
|
|
863
|
+
* 1. Set new selected item.
|
|
864
|
+
* 2. Emit input event to update the user v-model.
|
|
865
|
+
* 3. Close the dropdown.
|
|
866
|
+
*/
|
|
867
|
+
selectItem: function selectItem(value) {
|
|
868
|
+
var _this = this;
|
|
869
|
+
|
|
870
|
+
if (this.multiple) {
|
|
871
|
+
if (this.selected) {
|
|
872
|
+
var index = this.selected.indexOf(value);
|
|
873
|
+
|
|
874
|
+
if (index === -1) {
|
|
875
|
+
this.selected.push(value);
|
|
876
|
+
} else {
|
|
877
|
+
this.selected.splice(index, 1);
|
|
878
|
+
}
|
|
879
|
+
} else {
|
|
880
|
+
this.selected = [value];
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
this.$emit('change', this.selected);
|
|
884
|
+
} else {
|
|
885
|
+
if (this.selected !== value) {
|
|
886
|
+
this.selected = value;
|
|
887
|
+
this.$emit('change', this.selected);
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
this.$emit('input', this.selected);
|
|
892
|
+
|
|
893
|
+
if (!this.multiple) {
|
|
894
|
+
this.isActive = !this.closeOnClick;
|
|
895
|
+
|
|
896
|
+
if (this.hoverable && this.closeOnClick) {
|
|
897
|
+
this.isHoverable = false; // Timeout for the animation complete before destroying
|
|
898
|
+
|
|
899
|
+
setTimeout(function () {
|
|
900
|
+
_this.isHoverable = true;
|
|
901
|
+
}, 250);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* White-listed items to not close when clicked.
|
|
908
|
+
*/
|
|
909
|
+
isInWhiteList: function isInWhiteList(el) {
|
|
910
|
+
if (el === this.$refs.dropdownMenu) return true;
|
|
911
|
+
if (el === this.$refs.trigger) return true; // All chidren from dropdown
|
|
912
|
+
|
|
913
|
+
if (this.$refs.dropdownMenu !== undefined) {
|
|
914
|
+
var children = this.$refs.dropdownMenu.querySelectorAll('*');
|
|
915
|
+
var _iteratorNormalCompletion = true;
|
|
916
|
+
var _didIteratorError = false;
|
|
917
|
+
var _iteratorError = undefined;
|
|
918
|
+
|
|
919
|
+
try {
|
|
920
|
+
for (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
921
|
+
var child = _step.value;
|
|
922
|
+
|
|
923
|
+
if (el === child) {
|
|
924
|
+
return true;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
} catch (err) {
|
|
928
|
+
_didIteratorError = true;
|
|
929
|
+
_iteratorError = err;
|
|
930
|
+
} finally {
|
|
931
|
+
try {
|
|
932
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
933
|
+
_iterator.return();
|
|
934
|
+
}
|
|
935
|
+
} finally {
|
|
936
|
+
if (_didIteratorError) {
|
|
937
|
+
throw _iteratorError;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
} // All children from trigger
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
if (this.$refs.trigger !== undefined) {
|
|
945
|
+
var _children = this.$refs.trigger.querySelectorAll('*');
|
|
946
|
+
|
|
947
|
+
var _iteratorNormalCompletion2 = true;
|
|
948
|
+
var _didIteratorError2 = false;
|
|
949
|
+
var _iteratorError2 = undefined;
|
|
950
|
+
|
|
951
|
+
try {
|
|
952
|
+
for (var _iterator2 = _children[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
953
|
+
var _child = _step2.value;
|
|
954
|
+
|
|
955
|
+
if (el === _child) {
|
|
956
|
+
return true;
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
} catch (err) {
|
|
960
|
+
_didIteratorError2 = true;
|
|
961
|
+
_iteratorError2 = err;
|
|
962
|
+
} finally {
|
|
963
|
+
try {
|
|
964
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
965
|
+
_iterator2.return();
|
|
966
|
+
}
|
|
967
|
+
} finally {
|
|
968
|
+
if (_didIteratorError2) {
|
|
969
|
+
throw _iteratorError2;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
return false;
|
|
976
|
+
},
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* Close dropdown if clicked outside.
|
|
980
|
+
*/
|
|
981
|
+
clickedOutside: function clickedOutside(event) {
|
|
982
|
+
if (this.inline) return;
|
|
983
|
+
if (!this.isInWhiteList(event.target)) this.isActive = false;
|
|
984
|
+
},
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Toggle dropdown if it's not disabled.
|
|
988
|
+
*/
|
|
989
|
+
toggle: function toggle() {
|
|
990
|
+
var _this2 = this;
|
|
991
|
+
|
|
992
|
+
if (this.disabled) return;
|
|
993
|
+
|
|
994
|
+
if (!this.isActive) {
|
|
995
|
+
// if not active, toggle after clickOutside event
|
|
996
|
+
// this fixes toggling programmatic
|
|
997
|
+
this.$nextTick(function () {
|
|
998
|
+
var value = !_this2.isActive;
|
|
999
|
+
_this2.isActive = value; // Vue 2.6.x ???
|
|
1000
|
+
|
|
1001
|
+
setTimeout(function () {
|
|
1002
|
+
return _this2.isActive = value;
|
|
1003
|
+
});
|
|
1004
|
+
});
|
|
1005
|
+
} else {
|
|
1006
|
+
this.isActive = !this.isActive;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
},
|
|
1010
|
+
created: function created() {
|
|
1011
|
+
if (typeof window !== 'undefined') {
|
|
1012
|
+
document.addEventListener('click', this.clickedOutside);
|
|
1013
|
+
}
|
|
1014
|
+
},
|
|
1015
|
+
beforeDestroy: function beforeDestroy() {
|
|
1016
|
+
if (typeof window !== 'undefined') {
|
|
1017
|
+
document.removeEventListener('click', this.clickedOutside);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
};
|
|
1021
|
+
|
|
1022
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
|
|
1023
|
+
/* server only */
|
|
1024
|
+
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
1025
|
+
if (typeof shadowMode !== 'boolean') {
|
|
1026
|
+
createInjectorSSR = createInjector;
|
|
1027
|
+
createInjector = shadowMode;
|
|
1028
|
+
shadowMode = false;
|
|
1029
|
+
} // Vue.extend constructor export interop.
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
var options = typeof script === 'function' ? script.options : script; // render functions
|
|
1033
|
+
|
|
1034
|
+
if (template && template.render) {
|
|
1035
|
+
options.render = template.render;
|
|
1036
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
1037
|
+
options._compiled = true; // functional template
|
|
1038
|
+
|
|
1039
|
+
if (isFunctionalTemplate) {
|
|
1040
|
+
options.functional = true;
|
|
1041
|
+
}
|
|
1042
|
+
} // scopedId
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
if (scopeId) {
|
|
1046
|
+
options._scopeId = scopeId;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
var hook;
|
|
1050
|
+
|
|
1051
|
+
if (moduleIdentifier) {
|
|
1052
|
+
// server build
|
|
1053
|
+
hook = function hook(context) {
|
|
1054
|
+
// 2.3 injection
|
|
1055
|
+
context = context || // cached call
|
|
1056
|
+
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
1057
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
|
|
1058
|
+
// 2.2 with runInNewContext: true
|
|
1059
|
+
|
|
1060
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
1061
|
+
context = __VUE_SSR_CONTEXT__;
|
|
1062
|
+
} // inject component styles
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
if (style) {
|
|
1066
|
+
style.call(this, createInjectorSSR(context));
|
|
1067
|
+
} // register component module identifier for async chunk inference
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
if (context && context._registeredComponents) {
|
|
1071
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
1072
|
+
}
|
|
1073
|
+
}; // used by ssr in case component is cached and beforeCreate
|
|
1074
|
+
// never gets called
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
options._ssrRegister = hook;
|
|
1078
|
+
} else if (style) {
|
|
1079
|
+
hook = shadowMode ? function () {
|
|
1080
|
+
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
|
|
1081
|
+
} : function (context) {
|
|
1082
|
+
style.call(this, createInjector(context));
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
if (hook) {
|
|
1087
|
+
if (options.functional) {
|
|
1088
|
+
// register for functional component in vue file
|
|
1089
|
+
var originalRender = options.render;
|
|
1090
|
+
|
|
1091
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
1092
|
+
hook.call(context);
|
|
1093
|
+
return originalRender(h, context);
|
|
1094
|
+
};
|
|
1095
|
+
} else {
|
|
1096
|
+
// inject component registration as beforeCreate hook
|
|
1097
|
+
var existing = options.beforeCreate;
|
|
1098
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
return script;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
var normalizeComponent_1 = normalizeComponent;
|
|
1106
|
+
|
|
1107
|
+
/* script */
|
|
1108
|
+
const __vue_script__ = script;
|
|
1109
|
+
|
|
1110
|
+
/* template */
|
|
1111
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"dropdown",class:_vm.rootClasses},[(!_vm.inline)?_c('div',{ref:"trigger",staticClass:"dropdown-trigger",attrs:{"role":"button","aria-haspopup":"true"},on:{"click":_vm.toggle}},[_vm._t("trigger")],2):_vm._e(),_vm._v(" "),_c('transition',{attrs:{"name":_vm.animation}},[(_vm.isMobileModal)?_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"background",attrs:{"aria-hidden":!_vm.isActive}}):_vm._e()]),_vm._v(" "),_c('transition',{attrs:{"name":_vm.animation}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:((!_vm.disabled && (_vm.isActive || _vm.isHoverable)) || _vm.inline),expression:"(!disabled && (isActive || isHoverable)) || inline"}],ref:"dropdownMenu",staticClass:"dropdown-menu",attrs:{"aria-hidden":!_vm.isActive}},[_c('div',{staticClass:"dropdown-content",attrs:{"role":_vm.ariaRoleMenu}},[_vm._t("default")],2)])])],1)};
|
|
1112
|
+
var __vue_staticRenderFns__ = [];
|
|
1113
|
+
|
|
1114
|
+
/* style */
|
|
1115
|
+
const __vue_inject_styles__ = undefined;
|
|
1116
|
+
/* scoped */
|
|
1117
|
+
const __vue_scope_id__ = undefined;
|
|
1118
|
+
/* module identifier */
|
|
1119
|
+
const __vue_module_identifier__ = undefined;
|
|
1120
|
+
/* functional template */
|
|
1121
|
+
const __vue_is_functional_template__ = false;
|
|
1122
|
+
/* style inject */
|
|
1123
|
+
|
|
1124
|
+
/* style inject SSR */
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
var Dropdown = normalizeComponent_1(
|
|
1129
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
1130
|
+
__vue_inject_styles__,
|
|
1131
|
+
__vue_script__,
|
|
1132
|
+
__vue_scope_id__,
|
|
1133
|
+
__vue_is_functional_template__,
|
|
1134
|
+
__vue_module_identifier__,
|
|
1135
|
+
undefined,
|
|
1136
|
+
undefined
|
|
1137
|
+
);
|
|
1138
|
+
|
|
1139
|
+
//
|
|
1140
|
+
//
|
|
1141
|
+
//
|
|
1142
|
+
//
|
|
1143
|
+
//
|
|
1144
|
+
//
|
|
1145
|
+
//
|
|
1146
|
+
//
|
|
1147
|
+
//
|
|
1148
|
+
//
|
|
1149
|
+
//
|
|
1150
|
+
//
|
|
1151
|
+
//
|
|
1152
|
+
//
|
|
1153
|
+
//
|
|
1154
|
+
//
|
|
1155
|
+
//
|
|
1156
|
+
//
|
|
1157
|
+
//
|
|
1158
|
+
//
|
|
1159
|
+
//
|
|
1160
|
+
var script$1 = {
|
|
1161
|
+
name: 'BDropdownItem',
|
|
1162
|
+
props: {
|
|
1163
|
+
value: {
|
|
1164
|
+
type: [String, Number, Boolean, Object, Array, Function],
|
|
1165
|
+
default: null
|
|
1166
|
+
},
|
|
1167
|
+
separator: Boolean,
|
|
1168
|
+
disabled: Boolean,
|
|
1169
|
+
custom: Boolean,
|
|
1170
|
+
focusable: {
|
|
1171
|
+
type: Boolean,
|
|
1172
|
+
default: true
|
|
1173
|
+
},
|
|
1174
|
+
paddingless: Boolean,
|
|
1175
|
+
hasLink: Boolean,
|
|
1176
|
+
ariaRole: {
|
|
1177
|
+
type: String,
|
|
1178
|
+
default: ''
|
|
1179
|
+
}
|
|
1180
|
+
},
|
|
1181
|
+
computed: {
|
|
1182
|
+
anchorClasses: function anchorClasses() {
|
|
1183
|
+
return {
|
|
1184
|
+
'is-disabled': this.$parent.disabled || this.disabled,
|
|
1185
|
+
'is-paddingless': this.paddingless,
|
|
1186
|
+
'is-active': this.isActive
|
|
1187
|
+
};
|
|
1188
|
+
},
|
|
1189
|
+
itemClasses: function itemClasses() {
|
|
1190
|
+
return {
|
|
1191
|
+
'dropdown-item': !this.hasLink,
|
|
1192
|
+
'is-disabled': this.disabled,
|
|
1193
|
+
'is-paddingless': this.paddingless,
|
|
1194
|
+
'is-active': this.isActive,
|
|
1195
|
+
'has-link': this.hasLink
|
|
1196
|
+
};
|
|
1197
|
+
},
|
|
1198
|
+
ariaRoleItem: function ariaRoleItem() {
|
|
1199
|
+
return this.ariaRole === 'menuitem' || this.ariaRole === 'listitem' ? this.ariaRole : null;
|
|
1200
|
+
},
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* Check if item can be clickable.
|
|
1204
|
+
*/
|
|
1205
|
+
isClickable: function isClickable() {
|
|
1206
|
+
return !this.$parent.disabled && !this.separator && !this.disabled && !this.custom;
|
|
1207
|
+
},
|
|
1208
|
+
isActive: function isActive() {
|
|
1209
|
+
if (this.$parent.selected === null) return false;
|
|
1210
|
+
if (this.$parent.multiple) return this.$parent.selected.indexOf(this.value) >= 0;
|
|
1211
|
+
return this.value === this.$parent.selected;
|
|
1212
|
+
}
|
|
1213
|
+
},
|
|
1214
|
+
methods: {
|
|
1215
|
+
/**
|
|
1216
|
+
* Click listener, select the item.
|
|
1217
|
+
*/
|
|
1218
|
+
selectItem: function selectItem() {
|
|
1219
|
+
if (!this.isClickable) return;
|
|
1220
|
+
this.$parent.selectItem(this.value);
|
|
1221
|
+
this.$emit('click');
|
|
1222
|
+
}
|
|
1223
|
+
},
|
|
1224
|
+
created: function created() {
|
|
1225
|
+
if (!this.$parent.$data._isDropdown) {
|
|
1226
|
+
this.$destroy();
|
|
1227
|
+
throw new Error('You should wrap bDropdownItem on a bDropdown');
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1231
|
+
|
|
1232
|
+
/* script */
|
|
1233
|
+
const __vue_script__$1 = script$1;
|
|
1234
|
+
|
|
1235
|
+
/* template */
|
|
1236
|
+
var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.separator)?_c('hr',{staticClass:"dropdown-divider"}):(!_vm.custom && !_vm.hasLink)?_c('a',{staticClass:"dropdown-item",class:_vm.anchorClasses,attrs:{"role":_vm.ariaRoleItem,"tabindex":_vm.focusable ? 0 : null},on:{"click":_vm.selectItem}},[_vm._t("default")],2):_c('div',{class:_vm.itemClasses,attrs:{"role":_vm.ariaRoleItem,"tabindex":_vm.focusable ? 0 : null},on:{"click":_vm.selectItem}},[_vm._t("default")],2)};
|
|
1237
|
+
var __vue_staticRenderFns__$1 = [];
|
|
1238
|
+
|
|
1239
|
+
/* style */
|
|
1240
|
+
const __vue_inject_styles__$1 = undefined;
|
|
1241
|
+
/* scoped */
|
|
1242
|
+
const __vue_scope_id__$1 = undefined;
|
|
1243
|
+
/* module identifier */
|
|
1244
|
+
const __vue_module_identifier__$1 = undefined;
|
|
1245
|
+
/* functional template */
|
|
1246
|
+
const __vue_is_functional_template__$1 = false;
|
|
1247
|
+
/* style inject */
|
|
1248
|
+
|
|
1249
|
+
/* style inject SSR */
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
var DropdownItem = normalizeComponent_1(
|
|
1254
|
+
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
|
|
1255
|
+
__vue_inject_styles__$1,
|
|
1256
|
+
__vue_script__$1,
|
|
1257
|
+
__vue_scope_id__$1,
|
|
1258
|
+
__vue_is_functional_template__$1,
|
|
1259
|
+
__vue_module_identifier__$1,
|
|
1260
|
+
undefined,
|
|
1261
|
+
undefined
|
|
1262
|
+
);
|
|
1263
|
+
|
|
1264
|
+
//
|
|
1265
|
+
var script$2 = {
|
|
1266
|
+
name: 'BIcon',
|
|
1267
|
+
props: {
|
|
1268
|
+
type: [String, Object],
|
|
1269
|
+
pack: String,
|
|
1270
|
+
icon: String,
|
|
1271
|
+
size: String,
|
|
1272
|
+
customSize: String,
|
|
1273
|
+
customClass: String,
|
|
1274
|
+
both: Boolean // This is used internally to show both MDI and FA icon
|
|
1275
|
+
|
|
1276
|
+
},
|
|
1277
|
+
computed: {
|
|
1278
|
+
/**
|
|
1279
|
+
* Internal icon name based on the pack.
|
|
1280
|
+
* If pack is 'fa', gets the equivalent FA icon name of the MDI,
|
|
1281
|
+
* internal icons are always MDI.
|
|
1282
|
+
*/
|
|
1283
|
+
newIcon: function newIcon() {
|
|
1284
|
+
return this.newPack === 'mdi' ? "".concat(this.newPack, "-").concat(this.icon) : this.addFAPrefix(this.getEquivalentIconOf(this.icon));
|
|
1285
|
+
},
|
|
1286
|
+
newPack: function newPack() {
|
|
1287
|
+
return this.pack || config$1.defaultIconPack;
|
|
1288
|
+
},
|
|
1289
|
+
newType: function newType() {
|
|
1290
|
+
if (!this.type) return;
|
|
1291
|
+
var splitType = [];
|
|
1292
|
+
|
|
1293
|
+
if (typeof this.type === 'string') {
|
|
1294
|
+
splitType = this.type.split('-');
|
|
1295
|
+
} else {
|
|
1296
|
+
for (var key in this.type) {
|
|
1297
|
+
if (this.type[key]) {
|
|
1298
|
+
splitType = key.split('-');
|
|
1299
|
+
break;
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
if (splitType.length <= 1) return;
|
|
1305
|
+
return "has-text-".concat(splitType[1]);
|
|
1306
|
+
},
|
|
1307
|
+
newCustomSize: function newCustomSize() {
|
|
1308
|
+
return this.customSize || this.customSizeByPack;
|
|
1309
|
+
},
|
|
1310
|
+
customSizeByPack: function customSizeByPack() {
|
|
1311
|
+
var defaultSize = this.newPack === 'mdi' ? 'mdi-24px' : this.addFAPrefix('lg');
|
|
1312
|
+
var mediumSize = this.newPack === 'mdi' ? 'mdi-36px' : this.addFAPrefix('2x');
|
|
1313
|
+
var largeSize = this.newPack === 'mdi' ? 'mdi-48px' : this.addFAPrefix('3x');
|
|
1314
|
+
|
|
1315
|
+
switch (this.size) {
|
|
1316
|
+
case 'is-small':
|
|
1317
|
+
return;
|
|
1318
|
+
|
|
1319
|
+
case 'is-medium':
|
|
1320
|
+
return mediumSize;
|
|
1321
|
+
|
|
1322
|
+
case 'is-large':
|
|
1323
|
+
return largeSize;
|
|
1324
|
+
|
|
1325
|
+
default:
|
|
1326
|
+
return defaultSize;
|
|
1327
|
+
}
|
|
1328
|
+
},
|
|
1329
|
+
useIconComponent: function useIconComponent() {
|
|
1330
|
+
return config$1.defaultIconComponent;
|
|
1331
|
+
}
|
|
1332
|
+
},
|
|
1333
|
+
methods: {
|
|
1334
|
+
addFAPrefix: function addFAPrefix(value) {
|
|
1335
|
+
if (this.useIconComponent) {
|
|
1336
|
+
return value;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
return "fa-".concat(value);
|
|
1340
|
+
},
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* Equivalent FA icon name of the MDI.
|
|
1344
|
+
*/
|
|
1345
|
+
getEquivalentIconOf: function getEquivalentIconOf(value) {
|
|
1346
|
+
// Only transform the class if the both prop is set to true
|
|
1347
|
+
if (!this.both) {
|
|
1348
|
+
return value;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
switch (value) {
|
|
1352
|
+
case 'check':
|
|
1353
|
+
return 'check';
|
|
1354
|
+
|
|
1355
|
+
case 'information':
|
|
1356
|
+
return 'info-circle';
|
|
1357
|
+
|
|
1358
|
+
case 'check-circle':
|
|
1359
|
+
return 'check-circle';
|
|
1360
|
+
|
|
1361
|
+
case 'alert':
|
|
1362
|
+
return 'exclamation-triangle';
|
|
1363
|
+
|
|
1364
|
+
case 'alert-circle':
|
|
1365
|
+
return 'exclamation-circle';
|
|
1366
|
+
|
|
1367
|
+
case 'arrow-up':
|
|
1368
|
+
return 'arrow-up';
|
|
1369
|
+
|
|
1370
|
+
case 'chevron-right':
|
|
1371
|
+
return 'angle-right';
|
|
1372
|
+
|
|
1373
|
+
case 'chevron-left':
|
|
1374
|
+
return 'angle-left';
|
|
1375
|
+
|
|
1376
|
+
case 'chevron-down':
|
|
1377
|
+
return 'angle-down';
|
|
1378
|
+
|
|
1379
|
+
case 'eye':
|
|
1380
|
+
return 'eye';
|
|
1381
|
+
|
|
1382
|
+
case 'eye-off':
|
|
1383
|
+
return 'eye-slash';
|
|
1384
|
+
|
|
1385
|
+
case 'menu-down':
|
|
1386
|
+
return 'caret-down';
|
|
1387
|
+
|
|
1388
|
+
case 'menu-up':
|
|
1389
|
+
return 'caret-up';
|
|
1390
|
+
|
|
1391
|
+
default:
|
|
1392
|
+
return value;
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
};
|
|
1397
|
+
|
|
1398
|
+
/* script */
|
|
1399
|
+
const __vue_script__$2 = script$2;
|
|
1400
|
+
|
|
1401
|
+
/* template */
|
|
1402
|
+
var __vue_render__$2 = 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)};
|
|
1403
|
+
var __vue_staticRenderFns__$2 = [];
|
|
1404
|
+
|
|
1405
|
+
/* style */
|
|
1406
|
+
const __vue_inject_styles__$2 = undefined;
|
|
1407
|
+
/* scoped */
|
|
1408
|
+
const __vue_scope_id__$2 = undefined;
|
|
1409
|
+
/* module identifier */
|
|
1410
|
+
const __vue_module_identifier__$2 = undefined;
|
|
1411
|
+
/* functional template */
|
|
1412
|
+
const __vue_is_functional_template__$2 = false;
|
|
1413
|
+
/* style inject */
|
|
1414
|
+
|
|
1415
|
+
/* style inject SSR */
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
var Icon = normalizeComponent_1(
|
|
1420
|
+
{ render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
|
|
1421
|
+
__vue_inject_styles__$2,
|
|
1422
|
+
__vue_script__$2,
|
|
1423
|
+
__vue_scope_id__$2,
|
|
1424
|
+
__vue_is_functional_template__$2,
|
|
1425
|
+
__vue_module_identifier__$2,
|
|
1426
|
+
undefined,
|
|
1427
|
+
undefined
|
|
1428
|
+
);
|
|
1429
|
+
|
|
1430
|
+
var script$3 = {
|
|
1431
|
+
name: 'BInput',
|
|
1432
|
+
components: _defineProperty({}, Icon.name, Icon),
|
|
1433
|
+
mixins: [FormElementMixin],
|
|
1434
|
+
inheritAttrs: false,
|
|
1435
|
+
props: {
|
|
1436
|
+
value: [Number, String],
|
|
1437
|
+
type: {
|
|
1438
|
+
type: String,
|
|
1439
|
+
default: 'text'
|
|
1440
|
+
},
|
|
1441
|
+
passwordReveal: Boolean,
|
|
1442
|
+
hasCounter: {
|
|
1443
|
+
type: Boolean,
|
|
1444
|
+
default: function _default() {
|
|
1445
|
+
return config$1.defaultInputHasCounter;
|
|
1446
|
+
}
|
|
1447
|
+
},
|
|
1448
|
+
customClass: {
|
|
1449
|
+
type: String,
|
|
1450
|
+
default: ''
|
|
1451
|
+
}
|
|
1452
|
+
},
|
|
1453
|
+
data: function data() {
|
|
1454
|
+
return {
|
|
1455
|
+
newValue: this.value,
|
|
1456
|
+
newType: this.type,
|
|
1457
|
+
newAutocomplete: this.autocomplete || config$1.defaultInputAutocomplete,
|
|
1458
|
+
isPasswordVisible: false,
|
|
1459
|
+
_elementRef: this.type === 'textarea' ? 'textarea' : 'input'
|
|
1460
|
+
};
|
|
1461
|
+
},
|
|
1462
|
+
computed: {
|
|
1463
|
+
computedValue: {
|
|
1464
|
+
get: function get() {
|
|
1465
|
+
return this.newValue;
|
|
1466
|
+
},
|
|
1467
|
+
set: function set(value) {
|
|
1468
|
+
this.newValue = value;
|
|
1469
|
+
this.$emit('input', value);
|
|
1470
|
+
!this.isValid && this.checkHtml5Validity();
|
|
1471
|
+
}
|
|
1472
|
+
},
|
|
1473
|
+
rootClasses: function rootClasses() {
|
|
1474
|
+
return [this.iconPosition, this.size, {
|
|
1475
|
+
'is-expanded': this.expanded,
|
|
1476
|
+
'is-loading': this.loading,
|
|
1477
|
+
'is-clearfix': !this.hasMessage
|
|
1478
|
+
}];
|
|
1479
|
+
},
|
|
1480
|
+
inputClasses: function inputClasses() {
|
|
1481
|
+
return [this.statusType, this.size, {
|
|
1482
|
+
'is-rounded': this.rounded
|
|
1483
|
+
}];
|
|
1484
|
+
},
|
|
1485
|
+
hasIconRight: function hasIconRight() {
|
|
1486
|
+
return this.passwordReveal || this.loading || this.statusTypeIcon;
|
|
1487
|
+
},
|
|
1488
|
+
|
|
1489
|
+
/**
|
|
1490
|
+
* Position of the icon or if it's both sides.
|
|
1491
|
+
*/
|
|
1492
|
+
iconPosition: function iconPosition() {
|
|
1493
|
+
if (this.icon && this.hasIconRight) {
|
|
1494
|
+
return 'has-icons-left has-icons-right';
|
|
1495
|
+
} else if (!this.icon && this.hasIconRight) {
|
|
1496
|
+
return 'has-icons-right';
|
|
1497
|
+
} else if (this.icon) {
|
|
1498
|
+
return 'has-icons-left';
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
|
|
1502
|
+
/**
|
|
1503
|
+
* Icon name (MDI) based on the type.
|
|
1504
|
+
*/
|
|
1505
|
+
statusTypeIcon: function statusTypeIcon() {
|
|
1506
|
+
switch (this.statusType) {
|
|
1507
|
+
case 'is-success':
|
|
1508
|
+
return 'check';
|
|
1509
|
+
|
|
1510
|
+
case 'is-danger':
|
|
1511
|
+
return 'alert-circle';
|
|
1512
|
+
|
|
1513
|
+
case 'is-info':
|
|
1514
|
+
return 'information';
|
|
1515
|
+
|
|
1516
|
+
case 'is-warning':
|
|
1517
|
+
return 'alert';
|
|
1518
|
+
}
|
|
1519
|
+
},
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
* Check if have any message prop from parent if it's a Field.
|
|
1523
|
+
*/
|
|
1524
|
+
hasMessage: function hasMessage() {
|
|
1525
|
+
return !!this.statusMessage;
|
|
1526
|
+
},
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* Current password-reveal icon name.
|
|
1530
|
+
*/
|
|
1531
|
+
passwordVisibleIcon: function passwordVisibleIcon() {
|
|
1532
|
+
return !this.isPasswordVisible ? 'eye' : 'eye-off';
|
|
1533
|
+
},
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* Get value length
|
|
1537
|
+
*/
|
|
1538
|
+
valueLength: function valueLength() {
|
|
1539
|
+
if (typeof this.computedValue === 'string') {
|
|
1540
|
+
return this.computedValue.length;
|
|
1541
|
+
} else if (typeof this.computedValue === 'number') {
|
|
1542
|
+
return this.computedValue.toString().length;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
return 0;
|
|
1546
|
+
}
|
|
1547
|
+
},
|
|
1548
|
+
watch: {
|
|
1549
|
+
/**
|
|
1550
|
+
* When v-model is changed:
|
|
1551
|
+
* 1. Set internal value.
|
|
1552
|
+
*/
|
|
1553
|
+
value: function value(_value) {
|
|
1554
|
+
this.newValue = _value;
|
|
1555
|
+
}
|
|
1556
|
+
},
|
|
1557
|
+
methods: {
|
|
1558
|
+
/**
|
|
1559
|
+
* Toggle the visibility of a password-reveal input
|
|
1560
|
+
* by changing the type and focus the input right away.
|
|
1561
|
+
*/
|
|
1562
|
+
togglePasswordVisibility: function togglePasswordVisibility() {
|
|
1563
|
+
var _this = this;
|
|
1564
|
+
|
|
1565
|
+
this.isPasswordVisible = !this.isPasswordVisible;
|
|
1566
|
+
this.newType = this.isPasswordVisible ? 'text' : 'password';
|
|
1567
|
+
this.$nextTick(function () {
|
|
1568
|
+
_this.$refs.input.focus();
|
|
1569
|
+
});
|
|
1570
|
+
},
|
|
1571
|
+
|
|
1572
|
+
/**
|
|
1573
|
+
* Input's 'input' event listener, 'nextTick' is used to prevent event firing
|
|
1574
|
+
* before ui update, helps when using masks (Cleavejs and potentially others).
|
|
1575
|
+
*/
|
|
1576
|
+
onInput: function onInput(event) {
|
|
1577
|
+
var _this2 = this;
|
|
1578
|
+
|
|
1579
|
+
this.$nextTick(function () {
|
|
1580
|
+
if (event.target) {
|
|
1581
|
+
_this2.computedValue = event.target.value;
|
|
1582
|
+
}
|
|
1583
|
+
});
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
};
|
|
1587
|
+
|
|
1588
|
+
/* script */
|
|
1589
|
+
const __vue_script__$3 = script$3;
|
|
1590
|
+
|
|
1591
|
+
/* template */
|
|
1592
|
+
var __vue_render__$3 = 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)};
|
|
1593
|
+
var __vue_staticRenderFns__$3 = [];
|
|
1594
|
+
|
|
1595
|
+
/* style */
|
|
1596
|
+
const __vue_inject_styles__$3 = undefined;
|
|
1597
|
+
/* scoped */
|
|
1598
|
+
const __vue_scope_id__$3 = undefined;
|
|
1599
|
+
/* module identifier */
|
|
1600
|
+
const __vue_module_identifier__$3 = undefined;
|
|
1601
|
+
/* functional template */
|
|
1602
|
+
const __vue_is_functional_template__$3 = false;
|
|
1603
|
+
/* style inject */
|
|
1604
|
+
|
|
1605
|
+
/* style inject SSR */
|
|
1606
|
+
|
|
1607
|
+
|
|
1608
|
+
|
|
1609
|
+
var Input = normalizeComponent_1(
|
|
1610
|
+
{ render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
|
|
1611
|
+
__vue_inject_styles__$3,
|
|
1612
|
+
__vue_script__$3,
|
|
1613
|
+
__vue_scope_id__$3,
|
|
1614
|
+
__vue_is_functional_template__$3,
|
|
1615
|
+
__vue_module_identifier__$3,
|
|
1616
|
+
undefined,
|
|
1617
|
+
undefined
|
|
1618
|
+
);
|
|
1619
|
+
|
|
1620
|
+
var script$4 = {
|
|
1621
|
+
name: 'BFieldBody',
|
|
1622
|
+
props: {
|
|
1623
|
+
message: {
|
|
1624
|
+
type: String
|
|
1625
|
+
},
|
|
1626
|
+
type: {
|
|
1627
|
+
type: [String, Object]
|
|
1628
|
+
}
|
|
1629
|
+
},
|
|
1630
|
+
render: function render(createElement) {
|
|
1631
|
+
var _this = this;
|
|
1632
|
+
|
|
1633
|
+
return createElement('div', {
|
|
1634
|
+
attrs: {
|
|
1635
|
+
'class': 'field-body'
|
|
1636
|
+
}
|
|
1637
|
+
}, this.$slots.default.map(function (element) {
|
|
1638
|
+
// skip returns and comments
|
|
1639
|
+
if (!element.tag) {
|
|
1640
|
+
return element;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
if (_this.message) {
|
|
1644
|
+
return createElement('b-field', {
|
|
1645
|
+
attrs: {
|
|
1646
|
+
message: _this.message,
|
|
1647
|
+
'type': _this.type
|
|
1648
|
+
}
|
|
1649
|
+
}, [element]);
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
return createElement('b-field', {
|
|
1653
|
+
attrs: {
|
|
1654
|
+
'type': _this.type
|
|
1655
|
+
}
|
|
1656
|
+
}, [element]);
|
|
1657
|
+
}));
|
|
1658
|
+
}
|
|
1659
|
+
};
|
|
1660
|
+
|
|
1661
|
+
/* script */
|
|
1662
|
+
const __vue_script__$4 = script$4;
|
|
1663
|
+
|
|
1664
|
+
/* template */
|
|
1665
|
+
|
|
1666
|
+
/* style */
|
|
1667
|
+
const __vue_inject_styles__$4 = undefined;
|
|
1668
|
+
/* scoped */
|
|
1669
|
+
const __vue_scope_id__$4 = undefined;
|
|
1670
|
+
/* module identifier */
|
|
1671
|
+
const __vue_module_identifier__$4 = undefined;
|
|
1672
|
+
/* functional template */
|
|
1673
|
+
const __vue_is_functional_template__$4 = undefined;
|
|
1674
|
+
/* style inject */
|
|
1675
|
+
|
|
1676
|
+
/* style inject SSR */
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
|
|
1680
|
+
var FieldBody = normalizeComponent_1(
|
|
1681
|
+
{},
|
|
1682
|
+
__vue_inject_styles__$4,
|
|
1683
|
+
__vue_script__$4,
|
|
1684
|
+
__vue_scope_id__$4,
|
|
1685
|
+
__vue_is_functional_template__$4,
|
|
1686
|
+
__vue_module_identifier__$4,
|
|
1687
|
+
undefined,
|
|
1688
|
+
undefined
|
|
1689
|
+
);
|
|
1690
|
+
|
|
1691
|
+
var script$5 = {
|
|
1692
|
+
name: 'BField',
|
|
1693
|
+
components: _defineProperty({}, FieldBody.name, FieldBody),
|
|
1694
|
+
props: {
|
|
1695
|
+
type: [String, Object],
|
|
1696
|
+
label: String,
|
|
1697
|
+
labelFor: String,
|
|
1698
|
+
message: [String, Array, Object],
|
|
1699
|
+
grouped: Boolean,
|
|
1700
|
+
groupMultiline: Boolean,
|
|
1701
|
+
position: String,
|
|
1702
|
+
expanded: Boolean,
|
|
1703
|
+
horizontal: Boolean,
|
|
1704
|
+
addons: {
|
|
1705
|
+
type: Boolean,
|
|
1706
|
+
default: true
|
|
1707
|
+
},
|
|
1708
|
+
customClass: String,
|
|
1709
|
+
labelPosition: {
|
|
1710
|
+
type: String,
|
|
1711
|
+
default: function _default() {
|
|
1712
|
+
return config$1.defaultFieldLabelPosition;
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
},
|
|
1716
|
+
data: function data() {
|
|
1717
|
+
return {
|
|
1718
|
+
newType: this.type,
|
|
1719
|
+
newMessage: this.message,
|
|
1720
|
+
fieldLabelSize: null,
|
|
1721
|
+
_isField: true // Used internally by Input and Select
|
|
1722
|
+
|
|
1723
|
+
};
|
|
1724
|
+
},
|
|
1725
|
+
computed: {
|
|
1726
|
+
rootClasses: function rootClasses() {
|
|
1727
|
+
return [this.newPosition, {
|
|
1728
|
+
'is-expanded': this.expanded,
|
|
1729
|
+
'is-grouped-multiline': this.groupMultiline,
|
|
1730
|
+
'is-horizontal': this.horizontal,
|
|
1731
|
+
'is-floating-in-label': this.hasLabel && !this.horizontal && this.labelPosition === 'inside',
|
|
1732
|
+
'is-floating-label': this.hasLabel && !this.horizontal && this.labelPosition === 'on-border'
|
|
1733
|
+
}, this.numberInputClasses];
|
|
1734
|
+
},
|
|
1735
|
+
|
|
1736
|
+
/**
|
|
1737
|
+
* Correct Bulma class for the side of the addon or group.
|
|
1738
|
+
*
|
|
1739
|
+
* This is not kept like the others (is-small, etc.),
|
|
1740
|
+
* because since 'has-addons' is set automatically it
|
|
1741
|
+
* doesn't make sense to teach users what addons are exactly.
|
|
1742
|
+
*/
|
|
1743
|
+
newPosition: function newPosition() {
|
|
1744
|
+
if (this.position === undefined) return;
|
|
1745
|
+
var position = this.position.split('-');
|
|
1746
|
+
if (position.length < 1) return;
|
|
1747
|
+
var prefix = this.grouped ? 'is-grouped-' : 'has-addons-';
|
|
1748
|
+
if (this.position) return prefix + position[1];
|
|
1749
|
+
},
|
|
1750
|
+
|
|
1751
|
+
/**
|
|
1752
|
+
* Formatted message in case it's an array
|
|
1753
|
+
* (each element is separated by <br> tag)
|
|
1754
|
+
*/
|
|
1755
|
+
formattedMessage: function formattedMessage() {
|
|
1756
|
+
if (typeof this.newMessage === 'string') {
|
|
1757
|
+
return this.newMessage;
|
|
1758
|
+
} else {
|
|
1759
|
+
var messages = [];
|
|
1760
|
+
|
|
1761
|
+
if (Array.isArray(this.newMessage)) {
|
|
1762
|
+
this.newMessage.forEach(function (message) {
|
|
1763
|
+
if (typeof message === 'string') {
|
|
1764
|
+
messages.push(message);
|
|
1765
|
+
} else {
|
|
1766
|
+
for (var key in message) {
|
|
1767
|
+
if (message[key]) {
|
|
1768
|
+
messages.push(key);
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
});
|
|
1773
|
+
} else {
|
|
1774
|
+
for (var key in this.newMessage) {
|
|
1775
|
+
if (this.newMessage[key]) {
|
|
1776
|
+
messages.push(key);
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
return messages.filter(function (m) {
|
|
1782
|
+
if (m) return m;
|
|
1783
|
+
}).join(' <br> ');
|
|
1784
|
+
}
|
|
1785
|
+
},
|
|
1786
|
+
hasLabel: function hasLabel() {
|
|
1787
|
+
return this.label || this.$slots.label;
|
|
1788
|
+
},
|
|
1789
|
+
numberInputClasses: function numberInputClasses() {
|
|
1790
|
+
if (this.$slots.default) {
|
|
1791
|
+
var numberinput = this.$slots.default.filter(function (node) {
|
|
1792
|
+
return node.tag && node.tag.toLowerCase().indexOf('numberinput') >= 0;
|
|
1793
|
+
})[0];
|
|
1794
|
+
|
|
1795
|
+
if (numberinput) {
|
|
1796
|
+
var classes = ['has-numberinput'];
|
|
1797
|
+
var controlsPosition = numberinput.componentOptions.propsData.controlsPosition;
|
|
1798
|
+
var size = numberinput.componentOptions.propsData.size;
|
|
1799
|
+
|
|
1800
|
+
if (controlsPosition) {
|
|
1801
|
+
classes.push("has-numberinput-".concat(controlsPosition));
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
if (size) {
|
|
1805
|
+
classes.push("has-numberinput-".concat(size));
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
return classes;
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
return null;
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
watch: {
|
|
1816
|
+
/**
|
|
1817
|
+
* Set internal type when prop change.
|
|
1818
|
+
*/
|
|
1819
|
+
type: function type(value) {
|
|
1820
|
+
this.newType = value;
|
|
1821
|
+
},
|
|
1822
|
+
|
|
1823
|
+
/**
|
|
1824
|
+
* Set internal message when prop change.
|
|
1825
|
+
*/
|
|
1826
|
+
message: function message(value) {
|
|
1827
|
+
this.newMessage = value;
|
|
1828
|
+
}
|
|
1829
|
+
},
|
|
1830
|
+
methods: {
|
|
1831
|
+
/**
|
|
1832
|
+
* Field has addons if there are more than one slot
|
|
1833
|
+
* (element / component) in the Field.
|
|
1834
|
+
* Or is grouped when prop is set.
|
|
1835
|
+
* Is a method to be called when component re-render.
|
|
1836
|
+
*/
|
|
1837
|
+
fieldType: function fieldType() {
|
|
1838
|
+
if (this.grouped) return 'is-grouped';
|
|
1839
|
+
var renderedNode = 0;
|
|
1840
|
+
|
|
1841
|
+
if (this.$slots.default) {
|
|
1842
|
+
renderedNode = this.$slots.default.reduce(function (i, node) {
|
|
1843
|
+
return node.tag ? i + 1 : i;
|
|
1844
|
+
}, 0);
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
if (renderedNode > 1 && this.addons && !this.horizontal) {
|
|
1848
|
+
return 'has-addons';
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
},
|
|
1852
|
+
mounted: function mounted() {
|
|
1853
|
+
if (this.horizontal) {
|
|
1854
|
+
// Bulma docs: .is-normal for any .input or .button
|
|
1855
|
+
var elements = this.$el.querySelectorAll('.input, .select, .button, .textarea, .b-slider');
|
|
1856
|
+
|
|
1857
|
+
if (elements.length > 0) {
|
|
1858
|
+
this.fieldLabelSize = 'is-normal';
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
};
|
|
1863
|
+
|
|
1864
|
+
/* script */
|
|
1865
|
+
const __vue_script__$5 = script$5;
|
|
1866
|
+
|
|
1867
|
+
/* template */
|
|
1868
|
+
var __vue_render__$4 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"field",class:[_vm.rootClasses, _vm.fieldType()]},[(_vm.horizontal)?_c('div',{staticClass:"field-label",class:[_vm.customClass, _vm.fieldLabelSize]},[(_vm.hasLabel)?_c('label',{staticClass:"label",class:_vm.customClass,attrs:{"for":_vm.labelFor}},[(_vm.$slots.label)?_vm._t("label"):[_vm._v(_vm._s(_vm.label))]],2):_vm._e()]):[(_vm.hasLabel)?_c('label',{staticClass:"label",class:_vm.customClass,attrs:{"for":_vm.labelFor}},[(_vm.$slots.label)?_vm._t("label"):[_vm._v(_vm._s(_vm.label))]],2):_vm._e()],_vm._v(" "),(_vm.horizontal)?_c('b-field-body',{attrs:{"message":_vm.newMessage ? _vm.formattedMessage : '',"type":_vm.newType}},[_vm._t("default")],2):[_vm._t("default")],_vm._v(" "),(_vm.newMessage && !_vm.horizontal)?_c('p',{staticClass:"help",class:_vm.newType,domProps:{"innerHTML":_vm._s(_vm.formattedMessage)}}):_vm._e()],2)};
|
|
1869
|
+
var __vue_staticRenderFns__$4 = [];
|
|
1870
|
+
|
|
1871
|
+
/* style */
|
|
1872
|
+
const __vue_inject_styles__$5 = undefined;
|
|
1873
|
+
/* scoped */
|
|
1874
|
+
const __vue_scope_id__$5 = undefined;
|
|
1875
|
+
/* module identifier */
|
|
1876
|
+
const __vue_module_identifier__$5 = undefined;
|
|
1877
|
+
/* functional template */
|
|
1878
|
+
const __vue_is_functional_template__$5 = false;
|
|
1879
|
+
/* style inject */
|
|
1880
|
+
|
|
1881
|
+
/* style inject SSR */
|
|
1882
|
+
|
|
1883
|
+
|
|
1884
|
+
|
|
1885
|
+
var Field = normalizeComponent_1(
|
|
1886
|
+
{ render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
|
|
1887
|
+
__vue_inject_styles__$5,
|
|
1888
|
+
__vue_script__$5,
|
|
1889
|
+
__vue_scope_id__$5,
|
|
1890
|
+
__vue_is_functional_template__$5,
|
|
1891
|
+
__vue_module_identifier__$5,
|
|
1892
|
+
undefined,
|
|
1893
|
+
undefined
|
|
1894
|
+
);
|
|
1895
|
+
|
|
1896
|
+
//
|
|
1897
|
+
//
|
|
1898
|
+
//
|
|
1899
|
+
//
|
|
1900
|
+
//
|
|
1901
|
+
//
|
|
1902
|
+
//
|
|
1903
|
+
//
|
|
1904
|
+
//
|
|
1905
|
+
//
|
|
1906
|
+
//
|
|
1907
|
+
//
|
|
1908
|
+
//
|
|
1909
|
+
//
|
|
1910
|
+
//
|
|
1911
|
+
//
|
|
1912
|
+
//
|
|
1913
|
+
//
|
|
1914
|
+
//
|
|
1915
|
+
//
|
|
1916
|
+
//
|
|
1917
|
+
//
|
|
1918
|
+
//
|
|
1919
|
+
//
|
|
1920
|
+
//
|
|
1921
|
+
//
|
|
1922
|
+
//
|
|
1923
|
+
// These should match the variables in clockpicker.scss
|
|
1924
|
+
var indicatorSize = 40;
|
|
1925
|
+
var paddingInner = 5;
|
|
1926
|
+
var script$6 = {
|
|
1927
|
+
name: 'BClockpickerFace',
|
|
1928
|
+
props: {
|
|
1929
|
+
pickerSize: Number,
|
|
1930
|
+
min: Number,
|
|
1931
|
+
max: Number,
|
|
1932
|
+
double: Boolean,
|
|
1933
|
+
value: Number,
|
|
1934
|
+
faceNumbers: Array,
|
|
1935
|
+
disabledValues: Function
|
|
1936
|
+
},
|
|
1937
|
+
data: function data() {
|
|
1938
|
+
return {
|
|
1939
|
+
isDragging: false,
|
|
1940
|
+
inputValue: this.value,
|
|
1941
|
+
prevAngle: 720
|
|
1942
|
+
};
|
|
1943
|
+
},
|
|
1944
|
+
computed: {
|
|
1945
|
+
/**
|
|
1946
|
+
* How many number indicators are shown on the face
|
|
1947
|
+
*/
|
|
1948
|
+
count: function count() {
|
|
1949
|
+
return this.max - this.min + 1;
|
|
1950
|
+
},
|
|
1951
|
+
|
|
1952
|
+
/**
|
|
1953
|
+
* How many number indicators are shown per ring on the face
|
|
1954
|
+
*/
|
|
1955
|
+
countPerRing: function countPerRing() {
|
|
1956
|
+
return this.double ? this.count / 2 : this.count;
|
|
1957
|
+
},
|
|
1958
|
+
|
|
1959
|
+
/**
|
|
1960
|
+
* Radius of the clock face
|
|
1961
|
+
*/
|
|
1962
|
+
radius: function radius() {
|
|
1963
|
+
return this.pickerSize / 2;
|
|
1964
|
+
},
|
|
1965
|
+
|
|
1966
|
+
/**
|
|
1967
|
+
* Radius of the outer ring of number indicators
|
|
1968
|
+
*/
|
|
1969
|
+
outerRadius: function outerRadius() {
|
|
1970
|
+
return this.radius - paddingInner - indicatorSize / 2;
|
|
1971
|
+
},
|
|
1972
|
+
|
|
1973
|
+
/**
|
|
1974
|
+
* Radius of the inner ring of number indicators
|
|
1975
|
+
*/
|
|
1976
|
+
innerRadius: function innerRadius() {
|
|
1977
|
+
return Math.max(this.outerRadius * 0.6, this.outerRadius - paddingInner - indicatorSize); // 48px gives enough room for the outer ring of numbers
|
|
1978
|
+
},
|
|
1979
|
+
|
|
1980
|
+
/**
|
|
1981
|
+
* The angle for each selectable value
|
|
1982
|
+
* For hours this ends up being 30 degrees, for minutes 6 degrees
|
|
1983
|
+
*/
|
|
1984
|
+
degreesPerUnit: function degreesPerUnit() {
|
|
1985
|
+
return 360 / this.countPerRing;
|
|
1986
|
+
},
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* Used for calculating x/y grid location based on degrees
|
|
1990
|
+
*/
|
|
1991
|
+
degrees: function degrees() {
|
|
1992
|
+
return this.degreesPerUnit * Math.PI / 180;
|
|
1993
|
+
},
|
|
1994
|
+
|
|
1995
|
+
/**
|
|
1996
|
+
* Calculates the angle the clock hand should be rotated for the
|
|
1997
|
+
* selected value
|
|
1998
|
+
*/
|
|
1999
|
+
handRotateAngle: function handRotateAngle() {
|
|
2000
|
+
var currentAngle = this.prevAngle;
|
|
2001
|
+
|
|
2002
|
+
while (currentAngle < 0) {
|
|
2003
|
+
currentAngle += 360;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
var targetAngle = this.calcHandAngle(this.displayedValue);
|
|
2007
|
+
var degreesDiff = this.shortestDistanceDegrees(currentAngle, targetAngle);
|
|
2008
|
+
var angle = this.prevAngle + degreesDiff;
|
|
2009
|
+
return angle;
|
|
2010
|
+
},
|
|
2011
|
+
|
|
2012
|
+
/**
|
|
2013
|
+
* Determines how long the selector hand is based on if the
|
|
2014
|
+
* selected value is located along the outer or inner ring
|
|
2015
|
+
*/
|
|
2016
|
+
handScale: function handScale() {
|
|
2017
|
+
return this.calcHandScale(this.displayedValue);
|
|
2018
|
+
},
|
|
2019
|
+
handStyle: function handStyle() {
|
|
2020
|
+
return {
|
|
2021
|
+
transform: "rotate(".concat(this.handRotateAngle, "deg) scaleY(").concat(this.handScale, ")"),
|
|
2022
|
+
transition: '.3s cubic-bezier(.25,.8,.50,1)'
|
|
2023
|
+
};
|
|
2024
|
+
},
|
|
2025
|
+
|
|
2026
|
+
/**
|
|
2027
|
+
* The value the hand should be pointing at
|
|
2028
|
+
*/
|
|
2029
|
+
displayedValue: function displayedValue() {
|
|
2030
|
+
return this.inputValue == null ? this.min : this.inputValue;
|
|
2031
|
+
}
|
|
2032
|
+
},
|
|
2033
|
+
watch: {
|
|
2034
|
+
value: function value(_value) {
|
|
2035
|
+
if (_value !== this.inputValue) {
|
|
2036
|
+
this.prevAngle = this.handRotateAngle;
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
this.inputValue = _value;
|
|
2040
|
+
}
|
|
2041
|
+
},
|
|
2042
|
+
methods: {
|
|
2043
|
+
isDisabled: function isDisabled(value) {
|
|
2044
|
+
return this.disabledValues && this.disabledValues(value);
|
|
2045
|
+
},
|
|
2046
|
+
|
|
2047
|
+
/**
|
|
2048
|
+
* Calculates the distance between two points
|
|
2049
|
+
*/
|
|
2050
|
+
euclidean: function euclidean(p0, p1) {
|
|
2051
|
+
var dx = p1.x - p0.x;
|
|
2052
|
+
var dy = p1.y - p0.y;
|
|
2053
|
+
return Math.sqrt(dx * dx + dy * dy);
|
|
2054
|
+
},
|
|
2055
|
+
shortestDistanceDegrees: function shortestDistanceDegrees(start, stop) {
|
|
2056
|
+
var modDiff = (stop - start) % 360;
|
|
2057
|
+
var shortestDistance = 180 - Math.abs(Math.abs(modDiff) - 180);
|
|
2058
|
+
return (modDiff + 360) % 360 < 180 ? shortestDistance * 1 : shortestDistance * -1;
|
|
2059
|
+
},
|
|
2060
|
+
|
|
2061
|
+
/**
|
|
2062
|
+
* Calculates the angle of the line from the center point
|
|
2063
|
+
* to the given point.
|
|
2064
|
+
*/
|
|
2065
|
+
coordToAngle: function coordToAngle(center, p1) {
|
|
2066
|
+
var value = 2 * Math.atan2(p1.y - center.y - this.euclidean(center, p1), p1.x - center.x);
|
|
2067
|
+
return Math.abs(value * 180 / Math.PI);
|
|
2068
|
+
},
|
|
2069
|
+
|
|
2070
|
+
/**
|
|
2071
|
+
* Generates the inline style translate() property for a
|
|
2072
|
+
* number indicator, which determines it's location on the
|
|
2073
|
+
* clock face
|
|
2074
|
+
*/
|
|
2075
|
+
getNumberTranslate: function getNumberTranslate(value) {
|
|
2076
|
+
var _this$getNumberCoords = this.getNumberCoords(value),
|
|
2077
|
+
x = _this$getNumberCoords.x,
|
|
2078
|
+
y = _this$getNumberCoords.y;
|
|
2079
|
+
|
|
2080
|
+
return "translate(".concat(x, "px, ").concat(y, "px)");
|
|
2081
|
+
},
|
|
2082
|
+
|
|
2083
|
+
/***
|
|
2084
|
+
* Calculates the coordinates on the clock face for a number
|
|
2085
|
+
* indicator value
|
|
2086
|
+
*/
|
|
2087
|
+
getNumberCoords: function getNumberCoords(value) {
|
|
2088
|
+
var radius = this.isInnerRing(value) ? this.innerRadius : this.outerRadius;
|
|
2089
|
+
return {
|
|
2090
|
+
x: Math.round(radius * Math.sin((value - this.min) * this.degrees)),
|
|
2091
|
+
y: Math.round(-radius * Math.cos((value - this.min) * this.degrees))
|
|
2092
|
+
};
|
|
2093
|
+
},
|
|
2094
|
+
getFaceNumberClasses: function getFaceNumberClasses(num) {
|
|
2095
|
+
return {
|
|
2096
|
+
'active': num.value === this.displayedValue,
|
|
2097
|
+
'disabled': this.isDisabled(num.value)
|
|
2098
|
+
};
|
|
2099
|
+
},
|
|
2100
|
+
|
|
2101
|
+
/**
|
|
2102
|
+
* Determines if a value resides on the inner ring
|
|
2103
|
+
*/
|
|
2104
|
+
isInnerRing: function isInnerRing(value) {
|
|
2105
|
+
return this.double && value - this.min >= this.countPerRing;
|
|
2106
|
+
},
|
|
2107
|
+
calcHandAngle: function calcHandAngle(value) {
|
|
2108
|
+
var angle = this.degreesPerUnit * (value - this.min);
|
|
2109
|
+
if (this.isInnerRing(value)) angle -= 360;
|
|
2110
|
+
return angle;
|
|
2111
|
+
},
|
|
2112
|
+
calcHandScale: function calcHandScale(value) {
|
|
2113
|
+
return this.isInnerRing(value) ? this.innerRadius / this.outerRadius : 1;
|
|
2114
|
+
},
|
|
2115
|
+
onMouseDown: function onMouseDown(e) {
|
|
2116
|
+
e.preventDefault();
|
|
2117
|
+
this.isDragging = true;
|
|
2118
|
+
this.onDragMove(e);
|
|
2119
|
+
},
|
|
2120
|
+
onMouseUp: function onMouseUp() {
|
|
2121
|
+
this.isDragging = false;
|
|
2122
|
+
|
|
2123
|
+
if (!this.isDisabled(this.inputValue)) {
|
|
2124
|
+
this.$emit('change', this.inputValue);
|
|
2125
|
+
}
|
|
2126
|
+
},
|
|
2127
|
+
onDragMove: function onDragMove(e) {
|
|
2128
|
+
e.preventDefault();
|
|
2129
|
+
if (!this.isDragging && e.type !== 'click') return;
|
|
2130
|
+
|
|
2131
|
+
var _this$$refs$clock$get = this.$refs.clock.getBoundingClientRect(),
|
|
2132
|
+
width = _this$$refs$clock$get.width,
|
|
2133
|
+
top = _this$$refs$clock$get.top,
|
|
2134
|
+
left = _this$$refs$clock$get.left;
|
|
2135
|
+
|
|
2136
|
+
var _ref = 'touches' in e ? e.touches[0] : e,
|
|
2137
|
+
clientX = _ref.clientX,
|
|
2138
|
+
clientY = _ref.clientY;
|
|
2139
|
+
|
|
2140
|
+
var center = {
|
|
2141
|
+
x: width / 2,
|
|
2142
|
+
y: -width / 2
|
|
2143
|
+
};
|
|
2144
|
+
var coords = {
|
|
2145
|
+
x: clientX - left,
|
|
2146
|
+
y: top - clientY
|
|
2147
|
+
};
|
|
2148
|
+
var handAngle = Math.round(this.coordToAngle(center, coords) + 360) % 360;
|
|
2149
|
+
var insideClick = this.double && this.euclidean(center, coords) < (this.outerRadius + this.innerRadius) / 2 - 16;
|
|
2150
|
+
var value = Math.round(handAngle / this.degreesPerUnit) + this.min + (insideClick ? this.countPerRing : 0); // Necessary to fix edge case when selecting left part of max value
|
|
2151
|
+
|
|
2152
|
+
if (handAngle >= 360 - this.degreesPerUnit / 2) {
|
|
2153
|
+
value = insideClick ? this.max : this.min;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
this.update(value);
|
|
2157
|
+
},
|
|
2158
|
+
update: function update(value) {
|
|
2159
|
+
if (this.inputValue !== value && !this.isDisabled(value)) {
|
|
2160
|
+
this.prevAngle = this.handRotateAngle;
|
|
2161
|
+
this.inputValue = value;
|
|
2162
|
+
this.$emit('input', value);
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
};
|
|
2167
|
+
|
|
2168
|
+
/* script */
|
|
2169
|
+
const __vue_script__$6 = script$6;
|
|
2170
|
+
|
|
2171
|
+
/* template */
|
|
2172
|
+
var __vue_render__$5 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"b-clockpicker-face",on:{"mousedown":_vm.onMouseDown,"mouseup":_vm.onMouseUp,"mousemove":_vm.onDragMove,"touchstart":_vm.onMouseDown,"touchend":_vm.onMouseUp,"touchmove":_vm.onDragMove}},[_c('div',{ref:"clock",staticClass:"b-clockpicker-face-outer-ring"},[_c('div',{staticClass:"b-clockpicker-face-hand",style:(_vm.handStyle)}),_vm._v(" "),_vm._l((_vm.faceNumbers),function(num,index){return _c('span',{key:index,staticClass:"b-clockpicker-face-number",class:_vm.getFaceNumberClasses(num),style:({ transform: _vm.getNumberTranslate(num.value) })},[_c('span',[_vm._v(_vm._s(num.label))])])})],2)])};
|
|
2173
|
+
var __vue_staticRenderFns__$5 = [];
|
|
2174
|
+
|
|
2175
|
+
/* style */
|
|
2176
|
+
const __vue_inject_styles__$6 = undefined;
|
|
2177
|
+
/* scoped */
|
|
2178
|
+
const __vue_scope_id__$6 = undefined;
|
|
2179
|
+
/* module identifier */
|
|
2180
|
+
const __vue_module_identifier__$6 = undefined;
|
|
2181
|
+
/* functional template */
|
|
2182
|
+
const __vue_is_functional_template__$6 = false;
|
|
2183
|
+
/* style inject */
|
|
2184
|
+
|
|
2185
|
+
/* style inject SSR */
|
|
2186
|
+
|
|
2187
|
+
|
|
2188
|
+
|
|
2189
|
+
var ClockpickerFace = normalizeComponent_1(
|
|
2190
|
+
{ render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
|
|
2191
|
+
__vue_inject_styles__$6,
|
|
2192
|
+
__vue_script__$6,
|
|
2193
|
+
__vue_scope_id__$6,
|
|
2194
|
+
__vue_is_functional_template__$6,
|
|
2195
|
+
__vue_module_identifier__$6,
|
|
2196
|
+
undefined,
|
|
2197
|
+
undefined
|
|
2198
|
+
);
|
|
2199
|
+
|
|
2200
|
+
var _components;
|
|
2201
|
+
var outerPadding = 12;
|
|
2202
|
+
var script$7 = {
|
|
2203
|
+
name: 'BClockpicker',
|
|
2204
|
+
components: (_components = {}, _defineProperty(_components, ClockpickerFace.name, ClockpickerFace), _defineProperty(_components, Input.name, Input), _defineProperty(_components, Field.name, Field), _defineProperty(_components, Icon.name, Icon), _defineProperty(_components, Dropdown.name, Dropdown), _defineProperty(_components, DropdownItem.name, DropdownItem), _components),
|
|
2205
|
+
mixins: [TimepickerMixin],
|
|
2206
|
+
props: {
|
|
2207
|
+
pickerSize: {
|
|
2208
|
+
type: Number,
|
|
2209
|
+
default: 290
|
|
2210
|
+
},
|
|
2211
|
+
hourFormat: {
|
|
2212
|
+
type: String,
|
|
2213
|
+
default: '12',
|
|
2214
|
+
validator: function validator(value) {
|
|
2215
|
+
return value === '24' || value === '12';
|
|
2216
|
+
}
|
|
2217
|
+
},
|
|
2218
|
+
incrementMinutes: {
|
|
2219
|
+
type: Number,
|
|
2220
|
+
default: 5
|
|
2221
|
+
},
|
|
2222
|
+
autoSwitch: {
|
|
2223
|
+
type: Boolean,
|
|
2224
|
+
default: true
|
|
2225
|
+
},
|
|
2226
|
+
type: {
|
|
2227
|
+
type: String,
|
|
2228
|
+
default: 'is-primary'
|
|
2229
|
+
}
|
|
2230
|
+
},
|
|
2231
|
+
data: function data() {
|
|
2232
|
+
return {
|
|
2233
|
+
isSelectingHour: true,
|
|
2234
|
+
isDragging: false,
|
|
2235
|
+
_isClockpicker: true
|
|
2236
|
+
};
|
|
2237
|
+
},
|
|
2238
|
+
computed: {
|
|
2239
|
+
hoursDisplay: function hoursDisplay() {
|
|
2240
|
+
if (this.hoursSelected == null) return '--';
|
|
2241
|
+
if (this.isHourFormat24) return this.pad(this.hoursSelected);
|
|
2242
|
+
var display = this.hoursSelected;
|
|
2243
|
+
if (this.meridienSelected === this.PM) display -= 12;
|
|
2244
|
+
if (display === 0) display = 12;
|
|
2245
|
+
return display;
|
|
2246
|
+
},
|
|
2247
|
+
minutesDisplay: function minutesDisplay() {
|
|
2248
|
+
return this.minutesSelected == null ? '--' : this.pad(this.minutesSelected);
|
|
2249
|
+
},
|
|
2250
|
+
minFaceValue: function minFaceValue() {
|
|
2251
|
+
return this.isSelectingHour && !this.isHourFormat24 && this.meridienSelected === this.PM ? 12 : 0;
|
|
2252
|
+
},
|
|
2253
|
+
maxFaceValue: function maxFaceValue() {
|
|
2254
|
+
return this.isSelectingHour ? !this.isHourFormat24 && this.meridienSelected === this.AM ? 11 : 23 : 59;
|
|
2255
|
+
},
|
|
2256
|
+
faceSize: function faceSize() {
|
|
2257
|
+
return this.pickerSize - outerPadding * 2;
|
|
2258
|
+
},
|
|
2259
|
+
faceDisabledValues: function faceDisabledValues() {
|
|
2260
|
+
return this.isSelectingHour ? this.isHourDisabled : this.isMinuteDisabled;
|
|
2261
|
+
}
|
|
2262
|
+
},
|
|
2263
|
+
methods: {
|
|
2264
|
+
onClockInput: function onClockInput(value) {
|
|
2265
|
+
if (this.isSelectingHour) {
|
|
2266
|
+
this.hoursSelected = value;
|
|
2267
|
+
this.onHoursChange(value);
|
|
2268
|
+
} else {
|
|
2269
|
+
this.minutesSelected = value;
|
|
2270
|
+
this.onMinutesChange(value);
|
|
2271
|
+
}
|
|
2272
|
+
},
|
|
2273
|
+
onClockChange: function onClockChange(value) {
|
|
2274
|
+
if (this.autoSwitch && this.isSelectingHour) {
|
|
2275
|
+
this.isSelectingHour = !this.isSelectingHour;
|
|
2276
|
+
}
|
|
2277
|
+
},
|
|
2278
|
+
onMeridienClick: function onMeridienClick(value) {
|
|
2279
|
+
if (this.meridienSelected !== value) {
|
|
2280
|
+
this.meridienSelected = value;
|
|
2281
|
+
this.onMeridienChange(value);
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
};
|
|
2286
|
+
|
|
2287
|
+
/* script */
|
|
2288
|
+
const __vue_script__$7 = script$7;
|
|
2289
|
+
|
|
2290
|
+
/* template */
|
|
2291
|
+
var __vue_render__$6 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"b-clockpicker control",class:[_vm.size, _vm.type, {'is-expanded': _vm.expanded}]},[(!_vm.isMobile || _vm.inline)?_c('b-dropdown',{ref:"dropdown",attrs:{"position":_vm.position,"disabled":_vm.disabled,"inline":_vm.inline}},[(!_vm.inline)?_c('b-input',_vm._b({ref:"input",attrs:{"slot":"trigger","autocomplete":"off","value":_vm.formatValue(_vm.computedValue),"placeholder":_vm.placeholder,"size":_vm.size,"icon":_vm.icon,"icon-pack":_vm.iconPack,"loading":_vm.loading,"disabled":_vm.disabled,"readonly":!_vm.editable,"rounded":_vm.rounded,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.handleOnFocus,"blur":function($event){_vm.onBlur() && _vm.checkHtml5Validity();}},nativeOn:{"click":function($event){$event.stopPropagation();_vm.toggle(true);},"keyup":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }_vm.toggle(true);},"change":function($event){_vm.onChangeNativePicker($event);}},slot:"trigger"},'b-input',_vm.$attrs,false)):_vm._e(),_vm._v(" "),_c('div',{staticClass:"card",attrs:{"disabled":_vm.disabled,"custom":""}},[(_vm.inline)?_c('header',{staticClass:"card-header"},[_c('div',{staticClass:"b-clockpicker-header card-header-title"},[_c('div',{staticClass:"b-clockpicker-time"},[_c('span',{staticClass:"b-clockpicker-btn",class:{ active: _vm.isSelectingHour },on:{"click":function($event){_vm.isSelectingHour = true;}}},[_vm._v(_vm._s(_vm.hoursDisplay))]),_vm._v(" "),_c('span',[_vm._v(":")]),_vm._v(" "),_c('span',{staticClass:"b-clockpicker-btn",class:{ active: !_vm.isSelectingHour },on:{"click":function($event){_vm.isSelectingHour = false;}}},[_vm._v(_vm._s(_vm.minutesDisplay))])]),_vm._v(" "),(!_vm.isHourFormat24)?_c('div',{staticClass:"b-clockpicker-period"},[_c('div',{staticClass:"b-clockpicker-btn",class:{ active: _vm.meridienSelected == _vm.AM },on:{"click":function($event){_vm.onMeridienClick(_vm.AM);}}},[_vm._v("am")]),_vm._v(" "),_c('div',{staticClass:"b-clockpicker-btn",class:{ active: _vm.meridienSelected == _vm.PM },on:{"click":function($event){_vm.onMeridienClick(_vm.PM);}}},[_vm._v("pm")])]):_vm._e()])]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"card-content"},[_c('div',{staticClass:"b-clockpicker-body",style:({ width: _vm.faceSize + 'px', height: _vm.faceSize + 'px' })},[(!_vm.inline)?_c('div',{staticClass:"b-clockpicker-time"},[_c('div',{staticClass:"b-clockpicker-btn",class:{ active: _vm.isSelectingHour },on:{"click":function($event){_vm.isSelectingHour = true;}}},[_vm._v("Hours")]),_vm._v(" "),_c('span',{staticClass:"b-clockpicker-btn",class:{ active: !_vm.isSelectingHour },on:{"click":function($event){_vm.isSelectingHour = false;}}},[_vm._v("Min")])]):_vm._e(),_vm._v(" "),(!_vm.isHourFormat24 && !_vm.inline)?_c('div',{staticClass:"b-clockpicker-period"},[_c('div',{staticClass:"b-clockpicker-btn",class:{ active: _vm.meridienSelected == _vm.AM },on:{"click":function($event){_vm.onMeridienClick(_vm.AM);}}},[_vm._v(_vm._s(_vm.AM))]),_vm._v(" "),_c('div',{staticClass:"b-clockpicker-btn",class:{ active: _vm.meridienSelected == _vm.PM },on:{"click":function($event){_vm.onMeridienClick(_vm.PM);}}},[_vm._v(_vm._s(_vm.PM))])]):_vm._e(),_vm._v(" "),_c('b-clockpicker-face',{attrs:{"picker-size":_vm.faceSize,"min":_vm.minFaceValue,"max":_vm.maxFaceValue,"face-numbers":_vm.isSelectingHour ? _vm.hours : _vm.minutes,"disabled-values":_vm.faceDisabledValues,"double":_vm.isSelectingHour && _vm.isHourFormat24,"value":_vm.isSelectingHour ? _vm.hoursSelected : _vm.minutesSelected},on:{"input":_vm.onClockInput,"change":_vm.onClockChange}})],1)]),_vm._v(" "),(_vm.$slots.default !== undefined && _vm.$slots.default.length)?_c('footer',{staticClass:"b-clockpicker-footer card-footer"},[_vm._t("default")],2):_vm._e()])],1):_c('b-input',_vm._b({ref:"input",attrs:{"type":"time","autocomplete":"off","value":_vm.formatHHMMSS(_vm.computedValue),"placeholder":_vm.placeholder,"size":_vm.size,"icon":_vm.icon,"icon-pack":_vm.iconPack,"loading":_vm.loading,"max":_vm.formatHHMMSS(_vm.maxTime),"min":_vm.formatHHMMSS(_vm.minTime),"disabled":_vm.disabled,"readonly":false,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.handleOnFocus,"blur":function($event){_vm.onBlur() && _vm.checkHtml5Validity();}},nativeOn:{"click":function($event){$event.stopPropagation();_vm.toggle(true);},"keyup":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }_vm.toggle(true);},"change":function($event){_vm.onChangeNativePicker($event);}}},'b-input',_vm.$attrs,false))],1)};
|
|
2292
|
+
var __vue_staticRenderFns__$6 = [];
|
|
2293
|
+
|
|
2294
|
+
/* style */
|
|
2295
|
+
const __vue_inject_styles__$7 = undefined;
|
|
2296
|
+
/* scoped */
|
|
2297
|
+
const __vue_scope_id__$7 = undefined;
|
|
2298
|
+
/* module identifier */
|
|
2299
|
+
const __vue_module_identifier__$7 = undefined;
|
|
2300
|
+
/* functional template */
|
|
2301
|
+
const __vue_is_functional_template__$7 = false;
|
|
2302
|
+
/* style inject */
|
|
2303
|
+
|
|
2304
|
+
/* style inject SSR */
|
|
2305
|
+
|
|
2306
|
+
|
|
2307
|
+
|
|
2308
|
+
var Clockpicker = normalizeComponent_1(
|
|
2309
|
+
{ render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
|
|
2310
|
+
__vue_inject_styles__$7,
|
|
2311
|
+
__vue_script__$7,
|
|
2312
|
+
__vue_scope_id__$7,
|
|
2313
|
+
__vue_is_functional_template__$7,
|
|
2314
|
+
__vue_module_identifier__$7,
|
|
2315
|
+
undefined,
|
|
2316
|
+
undefined
|
|
2317
|
+
);
|
|
2318
|
+
|
|
2319
|
+
var use = function use(plugin) {
|
|
2320
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
2321
|
+
window.Vue.use(plugin);
|
|
2322
|
+
}
|
|
2323
|
+
};
|
|
2324
|
+
var registerComponent = function registerComponent(Vue, component) {
|
|
2325
|
+
Vue.component(component.name, component);
|
|
2326
|
+
};
|
|
2327
|
+
|
|
2328
|
+
var Plugin = {
|
|
2329
|
+
install: function install(Vue) {
|
|
2330
|
+
registerComponent(Vue, Clockpicker);
|
|
2331
|
+
}
|
|
2332
|
+
};
|
|
2333
|
+
use(Plugin);
|
|
2334
|
+
|
|
2335
|
+
exports.Clockpicker = Clockpicker;
|
|
2336
|
+
exports.default = Plugin;
|
|
2337
|
+
|
|
2338
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2339
|
+
|
|
2340
|
+
}));
|